/* exoqual — espace expert et page d'avis. S'appuie sur les couleurs et classes du thème (style.css). */

.exo-espace { background: var(--offwhite); padding: 2.2rem 0 4rem; min-height: 70vh; }
.exo-espace h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); color: var(--navy); margin: 0 0 .3rem; }
.exo-espace h2 { font-size: 1.15rem; color: var(--navy); margin: 0 0 1rem; }
.exo-h3 { font-size: 1rem; margin: 1.6rem 0 .6rem; color: var(--navy); }
.exo-muted { color: var(--gray); }
.exo-small { font-size: .85rem; }
.exo-espace [hidden] { display: none !important; }

/* Le sélecteur de langue ne s'applique pas à l'espace expert (français uniquement). */
.exo-espace-page .lang-switcher { display: none; }

.exo-card { background: var(--white); border: 1px solid var(--gray-light); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.2rem; }
.exo-narrow { max-width: 620px; margin-left: auto; margin-right: auto; }
.exo-vide { text-align: center; padding: 2.5rem 1.5rem; }

/* Barre de l'espace */
.exo-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.1rem; padding: .8rem 1rem; margin-bottom: 1.4rem; background: var(--white); border: 1px solid var(--gray-light); border-radius: var(--radius); font-size: .92rem; }
.exo-nav a { color: var(--navy); text-decoration: none; }
.exo-nav a[aria-current] { color: var(--green-free); font-weight: 600; }
.exo-nav-titre { font-weight: 700; }
.exo-nav-moi { margin-inline-start: auto; color: var(--gray); }
.exo-nav-moi a { color: var(--gray); text-decoration: underline; }

.exo-flash { background: var(--green-free-light); color: var(--green); border-radius: var(--radius); padding: .75rem 1rem; margin: 0 0 1.2rem; font-weight: 500; }
.exo-flash-erreur { background: #FDECEC; color: #8A1C1C; }

.exo-entete { margin-bottom: 1.2rem; }
.exo-entete-fiche { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.exo-entete-statut { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }

/* Chiffres clés */
.exo-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.exo-chiffre { background: var(--white); border: 1px solid var(--gray-light); border-radius: var(--radius); padding: 1rem 1.1rem; }
.exo-chiffre strong { display: block; font-family: 'Fraunces', serif; font-size: 1.9rem; color: var(--navy); line-height: 1.1; }
.exo-chiffre span { font-size: .85rem; color: var(--gray); }
.exo-chiffre-alerte { border-color: #E8A0A0; background: #FFF6F6; }
.exo-chiffre-alerte strong { color: #B42318; }

/* Onglets de filtre */
.exo-onglets { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.exo-onglets a { padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--gray-light); background: var(--white); color: var(--navy); text-decoration: none; font-size: .88rem; }
.exo-onglets a span { color: var(--gray); margin-inline-start: .2rem; }
.exo-onglets a[aria-current] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.exo-onglets a[aria-current] span { color: rgba(255,255,255,.7); }

/* Tableau des demandes */
.exo-table-wrap { position: relative; overflow-x: auto; max-width: 100%; background: var(--white); border: 1px solid var(--gray-light); border-radius: var(--radius-lg); }
.exo-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: .92rem; }
.exo-table th, .exo-table td { padding: .8rem 1rem; border-bottom: 1px solid var(--gray-light); text-align: start; vertical-align: top; }
.exo-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gray); font-weight: 600; background: var(--offwhite); }
.exo-table tbody tr:last-child td { border-bottom: 0; }
.exo-table a { color: var(--navy); }
.exo-ligne-retard td:first-child { box-shadow: inset 3px 0 0 #B42318; }

/* Statuts */
.exo-statut { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--offwhite); color: var(--navy); border: 1px solid var(--gray-light); white-space: nowrap; }
.exo-statut-nouvelle { background: var(--gold-light); color: #92400E; border-color: #F3D9A8; }
.exo-statut-rappelee, .exo-statut-rdv { background: #EAF2FB; color: #1E4E8C; border-color: #C9DCF2; }
.exo-statut-devis { background: #F3EEFB; color: #5B3A9E; border-color: #DDD0F2; }
.exo-statut-gagnee { background: var(--green-free-light); color: var(--green); border-color: #A9DCC6; }
.exo-statut-perdue { background: #F1F1F1; color: #666; }
.exo-retard { color: #B42318; font-weight: 600; font-size: .85rem; }

/* Fiche */
.exo-grille { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
@media (min-width: 980px) { .exo-grille { grid-template-columns: minmax(0, 1fr) 340px; } }
.exo-cote .exo-card { padding: 1.2rem; }
.exo-dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: .2rem; margin: 0; }
.exo-dl dt { font-size: .82rem; color: var(--gray); margin-top: .5rem; }
.exo-dl dd { margin: 0; font-weight: 500; }
.exo-details { margin-top: 1.2rem; }
.exo-details summary { cursor: pointer; font-weight: 600; color: var(--green-free); }
.exo-details h4 { margin: 1rem 0 .3rem; font-size: .95rem; }
.exo-details ul { margin: 0; padding-inline-start: 1.1rem; font-size: .9rem; color: var(--gray); }
.exo-espace .diag-score-head { display: flex; gap: 1.2rem; align-items: center; margin-bottom: 1rem; }
.exo-espace .diag-score-big { font-family: 'Fraunces', serif; font-size: 3rem; font-weight: 600; color: var(--green); line-height: 1; }
.exo-espace .diag-score-big small { font-size: .35em; color: var(--gray); }
.exo-espace .diag-score-level h3 { margin: 0 0 .2rem; font-size: 1.05rem; }
.exo-espace .diag-score-level p { margin: 0; color: var(--gray); font-size: .92rem; }
.exo-espace .diag-gap p { margin: .3rem 0 0; font-size: .9rem; }

.exo-form .form-group { margin-bottom: .9rem; }
.exo-form select, .exo-form textarea, .exo-form input[type="text"], .exo-form input[type="url"], .exo-form input[type="tel"], .exo-form input[type="datetime-local"] { width: 100%; padding: .6rem .7rem; border: 1px solid var(--gray-light); border-radius: var(--radius); font: inherit; background: var(--white); margin-bottom: .7rem; }
.exo-boutons { display: flex; flex-wrap: wrap; gap: .5rem; }
.exo-boutons-col { flex-direction: column; }
.exo-boutons-col .btn { width: 100%; justify-content: center; }
.exo-choix { border: 0; padding: 0; margin: 0 0 1rem; }
.exo-choix legend { font-weight: 600; margin-bottom: .4rem; color: var(--navy); }
.exo-choix label { display: block; padding: .3rem 0; cursor: pointer; }
.exo-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Avis dans la fiche */
.exo-avis-item { border-top: 1px solid var(--gray-light); padding: 1rem 0; }
.exo-avis-item:first-of-type { border-top: 0; padding-top: 0; }
.exo-avis-focus { background: var(--gold-light); margin: 0 -1.5rem; padding: 1rem 1.5rem; }
.exo-avis-tete { margin: 0 0 .4rem; display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: baseline; }
.exo-note-etoiles { color: var(--gold); font-size: 1.3rem; letter-spacing: .1em; margin: 0 0 .3rem; }
.exo-avis-item blockquote { margin: .5rem 0; padding: .6rem 1rem; border-inline-start: 3px solid var(--gold); background: var(--offwhite); font-style: italic; }
.exo-partage { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .5rem; }
.exo-partage input { flex: 1 1 260px; padding: .55rem .7rem; border: 1px solid var(--gray-light); border-radius: var(--radius); font-size: .85rem; background: var(--offwhite); }
.exo-partage .btn { padding: .55rem .9rem; font-size: .88rem; }
.exo-qr { margin-top: 1rem; text-align: center; }
.exo-qr svg { width: min(280px, 80vw); height: auto; background: #fff; padding: 8px; border-radius: 8px; }
.exo-qr p { font-size: .85rem; color: var(--gray); }
.exo-avis-demande { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px dashed var(--gray-light); }
.exo-avis-demande select { margin-top: .4rem; }

.exo-journal { list-style: none; margin: 0; padding: 0; }
.exo-journal li { padding: .6rem 0; border-bottom: 1px solid var(--gray-light); font-size: .9rem; }
.exo-journal li:last-child { border-bottom: 0; }
.exo-journal-consultation { color: var(--gray); font-size: .82rem !important; }
.exo-journal-alerte { color: #B42318; }

/* Page publique d'avis */
.exo-avis h1 { margin-bottom: .4rem; }
.exo-etoiles { border: 0; padding: 0; margin: 0 0 1.1rem; }
.exo-etoiles legend { font-weight: 600; color: var(--navy); margin-bottom: .2rem; }
/* Ordre inversé + sélecteur « ~ » : les étoiles se remplissent depuis le début de la ligne
   (la gauche en français et en anglais, la droite en arabe). */
.exo-etoiles-choix { display: inline-flex; flex-direction: row-reverse; gap: .15rem; }
.exo-etoiles-choix input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.exo-etoiles-choix label { font-size: 2.1rem; line-height: 1; color: #D9D3C7; cursor: pointer; padding: .1rem; transition: color .12s, transform .12s; }
.exo-etoiles-choix label:hover, .exo-etoiles-choix label:hover ~ label,
.exo-etoiles-choix input:checked ~ label { color: var(--gold); }
.exo-etoiles-choix label:hover { transform: scale(1.12); }
.exo-etoiles-choix input:focus-visible + label { outline: 2px solid var(--green-free); outline-offset: 2px; border-radius: 4px; }
.exo-avis .exo-form textarea, .exo-avis .exo-form input[type="text"] { margin-bottom: 0; }
.exo-avis-merci { color: var(--gold); font-size: 2rem; letter-spacing: .15em; margin-bottom: .5rem; }

@media (max-width: 600px) {
  .exo-card { padding: 1.1rem; }
  .exo-entete-statut { align-items: flex-start; }
  .exo-avis-focus { margin: 0 -1.1rem; padding: 1rem 1.1rem; }
}

/* V2 : avis, tableau de bord, Cal.com */
.exo-pastille { display: inline-block; min-width: 1.3em; padding: 0 .35em; border-radius: 999px; background: var(--gold); color: #fff; font-size: .75rem; font-weight: 700; text-align: center; line-height: 1.5; }
.exo-flash-info { background: var(--gold-light); color: #7A4A06; font-weight: 400; }
.exo-flash-info a { color: inherit; font-weight: 600; }
.exo-inline { display: inline-block; margin: 0; }
.exo-avis-carte blockquote { margin: .6rem 0; padding: .6rem 1rem; border-inline-start: 3px solid var(--gold); background: var(--offwhite); font-style: italic; }
.exo-avis-carte .exo-note-etoiles { font-size: 1.05rem; margin: 0; }
.exo-espace h2 .exo-muted { font-weight: 400; }
.exo-table-stats th[scope="row"] { font-weight: 600; color: var(--navy); white-space: nowrap; }
.exo-table-stats tbody tr:last-child th, .exo-table-stats tbody tr:last-child td { font-weight: 600; }
.exo-jauge { display: inline-block; width: 56px; height: 8px; border-radius: 4px; background: var(--gray-light); vertical-align: middle; overflow: hidden; }
.exo-jauge span { display: block; height: 100%; border-radius: 4px; }
.exo-jauge-ok span { background: var(--green-free); }
.exo-jauge-moyen span { background: var(--gold); }
.exo-jauge-bas span { background: #B42318; }
.exo-code { display: inline-block; max-width: 100%; overflow-wrap: anywhere; font-size: .82rem; background: var(--offwhite); border: 1px solid var(--gray-light); border-radius: 6px; padding: .2rem .45rem; }
.exo-mini { padding: .25rem .6rem !important; font-size: .8rem !important; margin-inline-start: .3rem; }
.exo-table-stats tbody th { text-transform: none; letter-spacing: 0; font-size: .92rem; background: transparent; color: var(--navy); }
.exo-table-stats td { white-space: nowrap; }
