/* Presentation du module d'oral. Extrait de oral.astro pour etre partage avec
   /reviser, ou le meme moteur tourne dans une section reveleee : le candidat ne
   change plus de page pour passer son oral. */
/* Même largeur que le bandeau haut (1180px + padding identique) : le module d'oral est centré
     et va du niveau du logo à celui de « Mon compte », comme les QCM et les examens blancs. */
  .oral-wrap { max-width: 1180px; margin: 0 auto; padding: clamp(32px,5vw,60px) clamp(16px,5vw,40px) 90px; }
  .oral-eyebrow { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .5px; font-size: .8rem; }
  .oral-h1 { font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.9rem,4vw,2.7rem); color: var(--heading); line-height: 1.1; margin: 10px 0 12px; }
  .oral-lead { font-size: 1.04rem; line-height: 1.6; color: var(--text); margin: 0 0 24px; }

  .oral-voies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 22px; }
  .oral-voie { text-align: left; background: var(--card); border: 1.5px solid var(--line); border-top: 4px solid var(--c); border-radius: 16px; padding: 15px 16px; cursor: pointer; transition: .14s; }
  .oral-voie:hover { border-color: var(--c); }
  .oral-voie.on { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
  .oral-voie b { display: block; font-family: var(--font-serif); font-weight: 600; font-size: 1.05rem; color: var(--heading); }
  .oral-voie span { display: block; font-size: .8rem; color: var(--muted); margin-top: 3px; }

  /* Rappel discret quand la voie a déjà été choisie en amont (lien ?v=…) : on ne la redemande pas. */
  .oral-voiefix { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: .93rem; color: var(--muted); margin: 0 0 20px; }
  .oral-voiefix b { color: var(--heading); font-weight: 600; }
  .oral-voiefix-pt { width: 9px; height: 9px; border-radius: 50%; flex: none; }
  /* padding + marge negative : zone de tap decente (~44px) sans bouger le rendu. */
  .oral-voiefix-chg { background: none; border: none; padding: 12px 8px; margin: -12px -8px; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
  .oral-voiefix-chg:hover { text-decoration: none; }

  .oral-cadre { background: color-mix(in srgb, var(--accent) 5%, var(--card)); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin: 0 0 20px; }
  .oral-cadre h2 { font-family: var(--font-serif); font-weight: 600; font-size: 1.1rem; color: var(--heading); margin: 0 0 10px; }
  .oral-cadre ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
  .oral-cadre li { position: relative; padding-left: 24px; font-size: .95rem; line-height: 1.5; color: var(--text); }
  .oral-cadre li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }

  .oral-opts { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 0 0 18px; font-size: .92rem; color: var(--text); }
  .oral-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-weight: 700; }
  .oral-switch input { width: 16px; height: 16px; accent-color: var(--accent); }
  .oral-note { font-size: .82rem; color: var(--muted); }

  .oral-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--accent, #2F76E0); color: #fff; border: none; border-radius: 100px; padding: 15px 30px; font-family: var(--font-serif); font-weight: 600; font-size: 1.05rem; cursor: pointer; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
  .oral-cta:hover { filter: brightness(1.06); }
  .oral-cta:disabled { opacity: .55; cursor: default; filter: none; }
  /* Oral du jour deja passe : bouton eteint jusqu'a la reouverture (minuit + 1 min, heure de Paris). */
  .oral-cta.rv-off, .rv-btn.rv-off { opacity: .5; cursor: not-allowed; filter: grayscale(.35); box-shadow: none; }
  .rv-oral-quota-note { margin: 12px 0 0; font-size: .92rem; color: var(--muted); }
  .oral-err { margin-top: 14px; color: var(--bad, #E24A3B); font-weight: 700; font-size: .92rem; }
  .oral-err a { color: var(--accent); }

  /* Scene d'entretien */
  /* top sous l'en-tete : le site a un .topstick sticky de ~62px (z-index 80) ; a top:8px la
     barre chrono glissait DERRIERE lui au defilement, chronometre masque pendant l'epreuve. */
  .oral-bar-wrap { position: sticky; top: calc(var(--rv-hdr-h, 62px) + 8px); z-index: 5; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); margin: 0 0 18px; }
  .oral-bar-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .oral-badge { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card)); border-radius: 100px; padding: 3px 10px; }
  .oral-phase { font-weight: 700; color: var(--heading); font-size: .9rem; }
  .oral-clock { margin-left: auto; font-family: var(--font-mono); font-weight: 800; font-size: 1.05rem; color: var(--heading); }
  .oral-clock.warn { color: var(--warn, #B4841A); }
  .oral-clock.danger { color: var(--bad, #E24A3B); }
  .oral-bar { height: 7px; border-radius: 100px; background: var(--line); overflow: hidden; margin-top: 10px; }
  .oral-bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .5s linear; }

  /* Orbe vocal (100 % voix, aucune transcription) */
  .oral-orb-wrap { text-align: center; padding: 26px 0 6px; }
  .oral-orb { position: relative; width: 190px; height: 190px; margin: 0 auto 22px; display: flex; align-items: center; justify-content: center; }
  .oral-orb .core { position: absolute; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.75), rgba(255,255,255,0) 45%), conic-gradient(from 0deg, #E24A3B, #F5B301, #1FA36B, #2F76E0, #E24A3B); box-shadow: 0 12px 34px rgba(0,0,0,.2); transition: transform .3s, opacity .3s, background .3s; }
  .oral-orb .ring { position: absolute; width: 100px; height: 100px; border-radius: 50%; border: 2px solid #2F76E0; opacity: 0; }
  .oral-orb[data-state="speaking"] .core { animation: orbSpeak 1.1s ease-in-out infinite; }
  .oral-orb[data-state="speaking"] .ring { animation: orbWave 1.9s ease-out infinite; border-color: #2F76E0; }
  .oral-orb[data-state="listening"] .core { background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.75), rgba(255,255,255,0) 45%), #1FA36B; animation: orbListen 1.5s ease-in-out infinite; }
  .oral-orb[data-state="listening"] .ring { animation: orbWave 1.7s ease-out infinite; border-color: #1FA36B; }
  .oral-orb[data-state="thinking"] .core { opacity: .82; animation: orbThink 1.5s ease-in-out infinite; }
  .oral-orb[data-state="idle"] .core { opacity: .5; }
  .oral-orb .ring:nth-child(2) { animation-delay: .55s; }
  .oral-orb .ring:nth-child(3) { animation-delay: 1.1s; }
  @keyframes orbSpeak { 0%,100% { transform: scale(1); } 50% { transform: scale(1.13); } }
  @keyframes orbListen { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
  @keyframes orbThink { 0%,100% { transform: scale(.95); } 50% { transform: scale(1.03); } }
  @keyframes orbWave { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.9); opacity: 0; } }
  .oral-orb-label { font-family: var(--font-serif); font-weight: 600; font-size: 1.45rem; color: var(--heading); line-height: 1.2; }
  .oral-orb-hint { font-size: .92rem; color: var(--muted); margin-top: 7px; min-height: 1.3em; padding: 0 10px; }
  .oral-expose-clock-wrap { margin-top: 16px; }
  .oral-expose-clock { font-family: var(--font-mono); font-weight: 800; font-size: 2.4rem; color: var(--heading); }
  .oral-expose-clock.warn { color: var(--warn, #B4841A); }

  .oral-controls { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 22px; }
  .oral-primary { border: 1.5px solid var(--line); background: var(--card); color: var(--heading); border-radius: 100px; padding: 14px 30px; font-family: var(--font-serif); font-weight: 600; font-size: 1.05rem; cursor: pointer; min-width: 250px; transition: .14s; }
  .oral-primary.go { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
  .oral-primary:disabled { opacity: .6; cursor: default; box-shadow: none; }
  /* padding + marge negative : « Terminer l'oral » se tape en situation d'epreuve, la cible
     de ~17px etait quasi impossible a viser au doigt. */
  .oral-finish { border: none; background: none; color: var(--muted); font-size: .86rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 12px 10px; margin: -12px -10px; }
  .oral-kb-toggle { border: none; background: none; color: var(--muted); font-size: .8rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 12px 10px; margin: -12px -10px; }
  .oral-kb { width: 100%; max-width: 520px; margin: 0 auto 6px; }
  .oral-kb textarea { width: 100%; box-sizing: border-box; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; font-size: 1rem; font-family: var(--font-sans); background: var(--bg); color: var(--heading); min-height: 72px; margin-bottom: 10px; outline: none; }
  .oral-kb textarea:focus { border-color: var(--accent); }

  /* Bilan */
  .oral-bilan { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px,3vw,30px); box-shadow: var(--shadow); }
  .oral-bilan h2 { font-family: var(--font-serif); font-weight: 600; font-size: 1.4rem; color: var(--heading); margin: 0 0 6px; }
  .oral-bilan .niveau { display: inline-block; font-weight: 800; border-radius: 100px; padding: 5px 14px; margin: 6px 0 14px; text-transform: capitalize; }
  .oral-bilan .niveau.faible { color: var(--bad, #E24A3B); background: var(--badbg, #FDEAE7); }
  .oral-bilan .niveau.moyen { color: var(--warn, #B4841A); background: var(--warnbg, #FFF4D6); }
  .oral-bilan .niveau.solide { color: var(--ok, #1FA36B); background: var(--okbg, #E4F6EC); }
  .oral-bilan-body { font-size: 1rem; line-height: 1.65; color: var(--text); }
  .oral-bilan-body b, .oral-bilan-body strong { color: var(--heading); }
  .oral-bilan-body h3 { font-family: var(--font-serif); font-weight: 600; font-size: 1.06rem; color: var(--heading); margin: 20px 0 6px; padding-top: 4px; border-top: 1px solid var(--line); }
  .oral-bilan-body h3:first-child { border-top: none; margin-top: 0; padding-top: 0; }
  .oral-bilan-body p { margin: 0 0 10px; }
  .oral-bilan-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

  @media (max-width: 620px) {
    .oral-voies { grid-template-columns: 1fr; }
    .oral-clock { margin-left: 0; }
    .oral-orb { width: 160px; height: 160px; }
  }
  @media (prefers-reduced-motion: reduce) { .oral-orb .core, .oral-orb .ring { animation: none !important; } }
