/* ============================================
   MODALE - Styles génériques
   ============================================ */

/* Bloquer le scroll quand modale ouverte */
html.modale_ouverte {
  overflow: clip;
}

/* Overlay fond sombre */
.modale_overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 2000;
  overflow: hidden;
}

.modale_overlay.ouvert {
  display: flex;
}

/* Container de la modale */
.modale_container {
  background: #ffffff;
  border-radius: 10px;
  width: 100%;
  max-width: 800px;
  max-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: modaleApparition 0.3s ease;
}

/* Container plus petit (réclamation, contact) */
.modale_container_small {
  max-width: 700px;
}

@keyframes modaleApparition {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header de la modale */
.modale_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: var(--couleur-theme, #622081);
  border-radius: 10px 10px 0 0;
  flex-shrink: 0;
}

.modale_header h2 {
  color: #ffffff;
  font-size: 18px;
  margin: 0;
}

.modale_fermer {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.modale_fermer:hover {
  opacity: 1;
}

/* Contenu de la modale (scrollable) */
.modale_contenu {
  padding: 25px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  position: relative;
}

/* Modale sans header - bouton fermer positionné */
.modale_contenu > .modale_fermer {
  position: absolute;
  top: 15px;
  right: 15px;
}

/* ============================================
   MODALE OFFRE - Sans header, contenu centré
   ============================================ */

.modale_contenu_simple {
  text-align: center;
  padding-top: 35px;
}

.modale_contenu_simple h2 {
  margin-bottom: 5px;
}

.modale_contenu_simple > h3 {
  font-weight: 500;
  margin-bottom: 20px;
}

.modale_contenu_simple hr {
  border: none;
  height: 1px;
  background: #e0e0e0;
  margin: 20px 0;
}

/* Encadré conditions aligné à gauche */
.modale_contenu_simple .encadre {
  text-align: left;
  margin-top: 20px;
}

.modale_contenu_simple .encadre h4 {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin: 0 0 10px 0;
}

.modale_contenu_simple .encadre ul {
  margin: 0;
  padding-left: 20px;
}

.modale_contenu_simple .encadre li {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

/* Section alignée à gauche dans modale centrée */
.modale_section {
  text-align: left;
  margin-bottom: 20px;
}

.modale_section h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin-bottom: 12px;
}

/* Liste avantages avec checks */
.modale_liste_avantages {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modale_liste_avantages li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

/* Footer de la modale */
.modale_footer {
  padding: 15px 20px;
  border-top: 1px solid #e0e0e0;
  background-color: #f8f9fa;
  border-radius: 0 0 10px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modale_footer_obligatoire {
  font-size: 12px;
  color: #666;
}

.modale_footer_boutons {
  display: flex;
  gap: 10px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
  .modale_overlay {
    padding: 10px;
  }

  .modale_container {
    max-height: calc(100dvh - 20px);
  }

  .modale_header {
    padding: 12px 15px;
  }

  .modale_header h2 {
    font-size: 16px;
  }

  .modale_contenu {
    padding: 15px;
  }

  .modale_footer {
    padding: 12px 15px;
    flex-direction: column;
  }
}

/* ============================================
   MODALE AVIS - Afficher tous les avis
   ============================================ */

.modale_container_large {
  max-width: 720px;
}

/* Header avis */
.modale_avis_header {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.modale_avis_retour {
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
  padding: 5px;
  display: flex;
}

.modale_avis_retour:hover {
  color: var(--couleur-theme, #622081);
}

.modale_avis_titre {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
  flex: 1;
}

/* Zone scrollable */
.modale_avis_scrollable {
  overflow-y: auto;
  flex: 1;
}

/* Note globale */
.modale_avis_note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 25px;
  background: #fff;
}

.note_chiffre {
  font-size: 42px;
  font-weight: 700;
  color: #333;
}

.note_etoiles {
  font-size: 22px;
  color: #f5b400;
}

.note_total {
  font-size: 15px;
  color: #666;
}

/* Filtres */
.modale_avis_filtres {
  padding: 15px 25px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

.filtres_groupe {
  margin-bottom: 12px;
}

.filtres_groupe:last-child {
  margin-bottom: 0;
}

.filtres_label {
  font-size: 13px;
  font-weight: 600;
  color: #666;
  margin-bottom: 8px;
  display: block;
}

.filtres_liste {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Tri sticky */
.modale_avis_tri {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 25px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.tri_label {
  font-size: 13px;
  color: #666;
}

/* Liste avis */
.modale_avis_liste {
  padding: 0 25px;
}

/* Carte avis */
.avis_carte {
  padding: 20px 0;
}

.avis_auteur {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.avis_meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.avis_etoiles {
  font-size: 16px;
  color: #f5b400;
}

.avis_date {
  font-size: 13px;
  color: #888;
}

.avis_texte {
  font-size: 15px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 8px;
}

.avis_voir_complet {
  font-size: 14px;
  color: var(--couleur-theme, #622081);
  cursor: pointer;
  font-weight: 500;
}

.avis_voir_complet:hover {
  text-decoration: underline;
}

/* Réponse équipe (utilise --couleur-theme définie sur .avis_carte) */
.avis_reponse {
  margin-top: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-left: 3px solid var(--couleur-theme);
  border-radius: 0 8px 8px 0;
}

.avis_reponse_titre {
  font-size: 13px;
  font-weight: 600;
  color: var(--couleur-theme);
  margin-bottom: 8px;
}

.avis_reponse_texte {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  margin: 0;
}

.avis_separateur {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 0;
}

/* Bouton plus d'avis */
.avis_plus_wrapper {
  padding: 30px 0;
  text-align: center;
}

/* Message vide / chargement */
.avis_message_vide {
  padding: 40px 20px;
  text-align: center;
  color: #888;
  font-size: 15px;
}

.avis_loader {
  padding: 30px;
  text-align: center;
}

/* État de chargement subtil (opacity réduite) */
.avis_liste_chargement {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

/* Responsive modale avis */
@media (max-width: 480px) {
  .modale_avis_note,
  .modale_avis_filtres,
  .modale_avis_tri {
    padding: 10px 15px 10px 15px;
    flex-wrap: wrap;
  }

  .modale_avis_liste {
    padding: 0 15px;
  }

  .note_chiffre {
    font-size: 32px;
  }

  /* Boutons filtres et tri plus compacts */
  .filtres_liste .btn_filtre,
  .modale_avis_tri .btn_gris {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
    min-width: auto;
  }

  .filtres_liste {
    gap: 6px;
  }

  .modale_avis_tri {
    gap: 8px;
  }

}
