/* Styles pour le carrousel MAX */

/* ========================================
   CARROUSEL - Zone principale (85%)
   ======================================== */

/* Carrousel limité à 85vh (cohabitation avec news ticker) - Thème dark par défaut */
.max-carousel-container {
  position: relative;
  margin: 0 auto;
  background: var(--max-bg-dark);
  color: #fff;
  overflow: hidden;
  max-height: var(--max-carousel-height);
  height: var(--max-carousel-height);
}

/* Mode cohabitation : carrousel + ticker */
.max-carousel-container.max-cohabitation-mode {
  height: var(--max-carousel-height) !important;
  max-height: var(--max-carousel-height) !important;
  width: 100% !important;
  position: relative;
  margin: 0;
  border-radius: 0;
}

/* Layout complet pour cohabitation */
.max-fullscreen-layout .max-carousel-container {
  height: var(--max-carousel-height);
  max-height: var(--max-carousel-height);
  width: 100%;
  margin: 0;
}

/* Styles spécifiques pour la cohabitation */
.max-cohabitation-mode .max-swiper {
  height: 100%;
}

.max-cohabitation-mode .max-tiles-grid {
  height: 100%;
  padding: var(--max-space-5);
}

.max-swiper {
  width: 100%;
  height: 100%;
}

.max-tiles-grid {
  display: grid;
  grid-template-columns: repeat(var(--max-cols, 4), 1fr);
  grid-template-rows: repeat(var(--max-rows, 2), 1fr);
  gap: var(--max-gap, 25px);
  width: 100%;
  height: 100%;
  padding: var(--max-space-6);
  box-sizing: border-box;
}

.max-tile {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--max-border-radius-xl);
  padding: var(--max-space-5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: var(--max-shadow-xl);
}

/* Header de la tuile en mode responsive */
.max-responsive-mode .max-tile-header {
  margin-bottom: 10px;
}

/* Titre et métadonnées en mode responsive - exactement comme l'image */
.max-responsive-mode .max-tile-name {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.3;
}

.max-responsive-mode .max-tile-meta {
  font-size: 11px;
  color: #ffffff;
  text-align: center;
  margin-bottom: 12px;
  opacity: 1;
  line-height: 1.5;
  font-weight: 400;
}

/* Section prix en mode responsive - 3 lignes exactement comme l'image */
.max-responsive-mode .max-tile-prices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding-top: 12px;
}

/* Cotation international - Label à gauche, prix à droite */
.max-responsive-mode .max-tile-international {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.max-responsive-mode .max-intl-label {
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  text-align: left;
}

.max-responsive-mode .max-intl-price {
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

/* Achat - Label à gauche, prix à droite */
.max-responsive-mode .max-tile-buy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.max-responsive-mode .max-tile-buy .max-price-label {
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  text-align: left;
}

.max-responsive-mode .max-tile-buy .max-price-value {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-align: right;
}

/* Vente - Label à gauche, prix à droite */
.max-responsive-mode .max-tile-sell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.max-responsive-mode .max-tile-sell .max-price-label {
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  text-align: left;
}

.max-responsive-mode .max-tile-sell .max-price-value {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-align: right;
}

.swiper-button-prev, .swiper-button-next {
  color: #fff;
}

.swiper-pagination-bullet { 
  background: rgba(255,255,255,0.6); 
}

.swiper-pagination-bullet-active { 
  background: #fff; 
}

/* ========================================
   MODE RESPONSIVE - Pour Elementor et sites web
   ======================================== */

/* Mode responsive : conteneur adaptatif avec fond vert marbre */
.max-carousel-container.max-responsive-mode {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 600px;
  max-height: none !important;
  position: relative;
  margin: 0 auto;
  box-sizing: border-box !important;
  overflow: visible !important;
  /* Fond vert marbre foncé - exactement comme l'image */
  background: 
    radial-gradient(ellipse at 25% 35%, rgba(45, 90, 61, 0.4) 0%, transparent 60%),
    radial-gradient(ellipse at 75% 65%, rgba(26, 58, 42, 0.4) 0%, transparent 60%),
    linear-gradient(135deg, #1a3a2a 0%, #2d5a3d 50%, #1a3a2a 100%);
  background-size: 100% 100%;
  padding: 30px 15px;
  border-radius: 0;
}

/* Forcer la largeur dans tous les conteneurs parents (Elementor, etc.) */
.elementor-widget-shortcode .max-carousel-container.max-responsive-mode,
.elementor-element .max-carousel-container.max-responsive-mode,
.wp-block-shortcode .max-carousel-container.max-responsive-mode {
  width: 100% !important;
  max-width: 100% !important;
}

/* Swiper en mode responsive */
.max-responsive-mode .max-swiper {
  height: auto;
  min-height: 600px;
  width: 100% !important;
  max-width: 100% !important;
}

/* Slides Swiper en mode responsive - prendre toute la largeur */
.max-responsive-mode .swiper-wrapper {
  width: 100% !important;
  display: flex !important;
}

.max-responsive-mode .swiper-slide {
  width: 100% !important;
  max-width: 100% !important;
  flex-shrink: 0 !important;
}

/* Grille responsive : 4 colonnes par ligne sur desktop */
.max-carousel-container.max-responsive-mode .max-tiles-grid,
.max-responsive-mode .swiper-slide .max-tiles-grid,
.max-responsive-mode .max-tiles-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important; /* Force 4 colonnes sur desktop */
  grid-template-rows: auto !important; /* Lignes automatiques selon le contenu */
  gap: var(--max-gap, 25px) !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: var(--max-space-5) !important;
  box-sizing: border-box !important;
  height: auto !important;
  min-height: 600px !important;
  margin: 0 !important;
}

/* Tuiles en mode responsive - Style bronze avec bordure dorée (exactement comme l'image) */
.max-responsive-mode .max-tile {
  min-height: 480px;
  height: 100%;
  /* Fond brun/bronze foncé - exactement comme l'image */
  background: #3d2817;
  background: linear-gradient(180deg, #4a3420 0%, #3d2817 50%, #2a1a0f 100%);
  /* Bordure dorée lumineuse - exactement comme l'image */
  border: 2px solid #d4af37;
  box-shadow: 
    0 0 6px rgba(212, 175, 55, 0.7),
    0 0 12px rgba(212, 175, 55, 0.5),
    0 4px 10px rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  padding: 16px;
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

/* Body de la tuile pour pousser les prix en bas */
.max-responsive-mode .max-tile-body {
  margin-top: auto;
  width: 100%;
}

/* Responsive : Desktop large (>1200px) - Force 4 colonnes */
@media (min-width: 1201px) {
  .max-carousel-container.max-responsive-mode .max-tiles-grid,
  .max-responsive-mode .swiper-slide .max-tiles-grid,
  .max-responsive-mode .max-tiles-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    display: grid !important;
  }
}

/* Responsive : Tablette large (≤1200px) - 3 colonnes */
@media (max-width: 1200px) {
  .max-carousel-container.max-responsive-mode .max-tiles-grid,
  .max-responsive-mode .swiper-slide .max-tiles-grid,
  .max-responsive-mode .max-tiles-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    display: grid !important;
  }
  
  .max-responsive-mode .max-tiles-grid {
    padding: var(--max-space-4) !important;
    gap: var(--max-space-4) !important;
  }
  
  .max-responsive-mode .max-tile {
    min-height: 350px;
  }
}

/* Responsive : Tablette moyenne (≤768px) - 2 colonnes */
@media (max-width: 768px) {
  .max-responsive-mode .max-carousel-container {
    min-height: 500px;
  }
  
  .max-responsive-mode .max-swiper {
    min-height: 500px;
  }
  
  .max-carousel-container.max-responsive-mode .max-tiles-grid,
  .max-responsive-mode .swiper-slide .max-tiles-grid,
  .max-responsive-mode .max-tiles-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    display: grid !important;
  }
  
  .max-responsive-mode .max-tiles-grid {
    padding: var(--max-space-4);
    gap: var(--max-space-3);
    min-height: 500px;
  }
  
  .max-responsive-mode .max-tile {
    min-height: 300px;
    padding: var(--max-space-4);
  }
  
  .max-responsive-mode .max-tile-name {
    font-size: var(--max-text-lg);
  }
  
  .max-responsive-mode .max-tile-meta {
    font-size: var(--max-text-xs);
  }
}

/* Responsive : Mobile (≤480px) - 1 colonne */
@media (max-width: 480px) {
  .max-responsive-mode .max-carousel-container {
    min-height: 400px;
  }
  
  .max-responsive-mode .max-swiper {
    min-height: 400px;
  }
  
  .max-carousel-container.max-responsive-mode .max-tiles-grid,
  .max-responsive-mode .swiper-slide .max-tiles-grid,
  .max-responsive-mode .max-tiles-grid {
    grid-template-columns: 1fr !important;
    display: grid !important;
  }
  
  .max-responsive-mode .max-tiles-grid {
    padding: var(--max-space-3);
    gap: var(--max-space-3);
    min-height: 400px;
  }
  
  .max-responsive-mode .max-tile {
    min-height: 280px;
    padding: var(--max-space-3);
  }
  
  .max-responsive-mode .max-tile-name {
    font-size: var(--max-text-base);
  }
  
  .max-responsive-mode .max-tile-meta {
    font-size: 10px;
  }
  
  .max-responsive-mode .max-tile-prices {
    font-size: var(--max-text-sm);
  }
}

/* Thème dark par défaut - plus besoin de classes de thème */
