/* ═══════════════════════════════════════════════════════════════════════════
   /avis/ et /en/review/ : donner son avis sur Opti'
   Partagée par les deux pages, liée en chemin ABSOLU (/avis/avis.css) : une
   référence relative casserait la page anglaise (voir 00_siteweb/CLAUDE.md,
   « Les actifs en chemin relatif »).
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --bg-page: #f6f1fa; --bg-surface: #fff; --bg-tint: #faf7fd;
  --text-primary: #1a0e25; --text-secondary: #5a4878; --text-muted: #6e5f86;
  --border: #e6dcef; --border-strong: #cdbfe0;
  --ink: #3D1576; --deep: #130322; --glow: #f4eafa; --gold: #F5C26B;
  /* L'or des étoiles sur fond blanc : assez foncé pour 3:1 sur le contour. */
  --etoile: #E9A93A; --etoile-trait: #A9740E;
  --font-display: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-sans); color: var(--text-primary); background: var(--bg-page); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.av-wrap { max-width: 680px; margin: 0 auto; padding: 48px 16px 72px; }
.av-tete { margin-bottom: 28px; }
.av-tete h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 5vw, 44px); line-height: 1.08; letter-spacing: -.01em; margin-bottom: 12px; }
.av-tete p { color: var(--text-secondary); font-size: 17px; max-width: 54ch; }

.av-carte { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 20px; padding: clamp(22px, 5vw, 36px); }
.av-etat[hidden] { display: none; }
.av-etat h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 3.4vw, 28px); line-height: 1.15; margin-bottom: 10px; }
.av-etat > p { color: var(--text-secondary); margin-bottom: 18px; }
.av-petit { font-size: 14px; color: var(--text-muted); margin-top: 14px; }

.av-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border: 0; border-radius: 12px; font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; background: var(--ink); color: #fff; transition: background .2s; }
.av-btn:hover { background: #2c0f57; }
.av-btn:focus-visible, .av-lien:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.av-btn[disabled] { opacity: .6; cursor: progress; }
.av-btn-plein { width: 100%; }
.av-lien { color: var(--ink); font-weight: 600; border-bottom: 1px solid rgba(61,21,118,.3); }

/* Le chargement : des lignes à la forme du formulaire. */
.av-sk { display: grid; gap: 12px; }
.av-sk i { display: block; height: 14px; border-radius: 7px; background: #ece3f4; animation: av-sk 1.4s ease-in-out infinite; }
.av-sk i:nth-child(1) { width: 60%; height: 22px; }
.av-sk i:nth-child(2) { width: 90%; }
.av-sk i:nth-child(3) { width: 75%; }
@keyframes av-sk { 50% { opacity: .5; } }

/* Rien produit : trois façons de commencer. */
.av-pistes { display: grid; gap: 12px; margin-top: 6px; }
.av-piste { display: grid; grid-template-columns: 44px 1fr; gap: 4px 14px; align-items: center; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; transition: border-color .2s, background .2s; }
.av-piste:hover, .av-piste:focus-visible { border-color: var(--ink); background: var(--bg-tint); outline: none; }
.av-piste-ico { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; background: var(--glow); color: var(--ink); display: grid; place-content: center; }
.av-piste b { font-size: 16px; }
.av-piste span:last-child { font-size: 14px; color: var(--text-secondary); }

/* Le formulaire */
.av-bloc { border: 0; padding: 22px 0; border-top: 1px solid var(--border); }
.av-bloc:first-of-type { border-top: 0; padding-top: 0; }
/* Le legend flotte : sinon le navigateur le pose SUR la bordure du fieldset,
   et le filet de séparation lui passe derrière. */
.av-bloc legend { float: left; width: 100%; font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 1.25; padding: 0; margin-bottom: 6px; }
.av-bloc legend + * { clear: both; }
.av-aide { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }
.av-bloc label { display: block; font-size: 15px; margin: 14px 0 6px; }
.av-bloc input[type=text], .av-bloc input[type=number], .av-bloc select, .av-bloc textarea {
  width: 100%; padding: 12px 13px; border: 1px solid var(--border-strong); border-radius: 10px;
  font: inherit; font-size: 16px; background: #fff; color: var(--text-primary);
}
.av-bloc input:focus-visible, .av-bloc select:focus-visible, .av-bloc textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.av-bloc textarea { resize: vertical; min-height: 92px; }
.av-duo { display: flex; gap: 8px; }
.av-duo input { flex: 1 1 auto; min-width: 0; }
.av-duo select { flex: 0 0 116px; }
.av-compteur { font-size: 13px; color: var(--text-muted); text-align: right; margin-top: 4px; }
.av-coche { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; }
.av-coche input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--ink); }
.av-coche label { margin: 0; }
.av-identite { margin-top: 6px; padding: 4px 16px 16px; background: var(--bg-tint); border-radius: 12px; }
.av-identite[hidden] { display: none; }
.av-domaine { padding: 14px 16px 16px; border: 1px solid var(--border); border-radius: 14px; margin-top: 12px; }
.av-domaine h3 { font-size: 15px; font-weight: 700; color: var(--ink); }
.av-domaine label:first-of-type { margin-top: 8px; }

/* Les étoiles : cinq boutons radio. Le clavier passe d'une note à l'autre
   avec les flèches, comme n'importe quel groupe radio. */
.av-etoiles { display: flex; gap: 6px; margin: 4px 0 8px; }
.av-etoiles input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.av-etoiles label { margin: 0; cursor: pointer; padding: 4px; border-radius: 10px; line-height: 0; }
.av-etoiles svg { width: 44px; height: 44px; fill: #fff; stroke: var(--border-strong); stroke-width: 1.4; transition: fill .15s, stroke .15s, transform .15s; }
.av-etoiles label.on svg { fill: var(--etoile); stroke: var(--etoile-trait); }
.av-etoiles label:hover svg { transform: scale(1.08); }
.av-etoiles input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 1px; }
.av-note-mot { min-height: 1.5em; font-weight: 600; color: var(--ink); }
.av-erreur { color: #9b1c1c; font-size: 14px; margin-top: 6px; }
.av-erreur[hidden] { display: none; }
.av-deja { background: var(--glow); border-radius: 12px; padding: 12px 16px; font-size: 14.5px; color: var(--text-secondary); margin-bottom: 18px; }
.av-deja[hidden] { display: none; }
.av-envoi { padding-top: 22px; border-top: 1px solid var(--border); }

@media (prefers-reduced-motion: reduce) {
  .av-sk i { animation: none; }
  .av-etoiles svg, .av-piste, .av-btn { transition: none; }
}
@media (max-width: 420px) { .av-etoiles svg { width: 38px; height: 38px; } .av-duo select { flex-basis: 104px; } }
