/* L'interface se pose sur le décor; sa place ne dépend jamais de la caméra. */
body[data-view="course"] .site-footer{display:none}
body[data-view="course"] #main{padding:0}
#immersion{width:100%;margin:0;--glass:rgba(26,29,34,.9);--glass-line:rgba(255,255,255,.19);--glass-dim:#bfc8cb;--glass-ink:#fffaf1}
.field{position:relative;isolation:isolate;height:calc(100svh - 4.8rem);min-height:26rem;overflow:hidden;background:#191c26;color:var(--glass-ink);font:400 1rem/1.42 Funnel,system-ui,sans-serif}
.field:fullscreen{height:100dvh}
.field-engine,.field-poster,.field-shade{position:absolute;inset:0}
.field-engine{z-index:0;isolation:isolate;overflow:hidden}
.field-poster{z-index:-1;background-position:center;background-size:cover;filter:saturate(.85)}
.field-shade{pointer-events:none;background:linear-gradient(180deg,rgba(8,13,17,.3),transparent 22%,transparent 72%,rgba(8,13,17,.5));z-index:1}
.field-tools{position:absolute;z-index:3;inset:1.4rem 1.7rem auto;display:flex;align-items:flex-start;justify-content:space-between;gap:.6rem;pointer-events:none}
.field-tools>*{pointer-events:auto}
.field-where,.field-button,.field-square,.field-shortcuts,.field-state,.field-invitation{background:var(--glass);border:1px solid var(--glass-line);color:var(--glass-ink)}
.field-where{display:flex;align-items:center;gap:.8rem;border-radius:1rem;padding:.66rem 1rem .7rem .88rem}
.field-where>i{height:1.55rem;width:3px;background:linear-gradient(#f4c2a7,#d58262);border-radius:3px}
.field-where small,.speaker-info small{display:block;font-size:.72rem;line-height:1.35;color:#d5d0c9}
.field-where h1{font-size:clamp(1.17rem,1.65vw,1.62rem);font-weight:500;letter-spacing:-.045em}
.field-tools-right,.field-shortcuts{display:flex;align-items:center;gap:.4rem}
.field-button,.field-square{display:inline-flex;align-items:center;justify-content:center;gap:.55rem;border-radius:.8rem;padding:.63rem .88rem;font-size:.88rem;min-height:2.65rem}
.field-square{padding:0;width:2.65rem;flex:none}
.field-icon{display:inline-block;width:1.12rem;height:1.12rem;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round;flex:none}
.field button:hover{filter:brightness(1.13)}
.field button:focus-visible,.field input:focus-visible,.field textarea:focus-visible{outline:2px solid #f4bb92;outline-offset:2px}
.field-state{position:absolute;left:50%;top:49%;transform:translate(-50%,-50%);z-index:2;padding:.65rem 1rem;border-radius:.8rem;font-size:.88rem;max-width:85%;text-align:center}
.field-state button{display:block;color:#ffceaa;text-decoration:underline;padding:.36rem;margin:auto}
.field-dock{position:absolute;z-index:3;bottom:1.5rem;left:1.7rem;right:1.7rem;display:flex;align-items:center;justify-content:space-between;pointer-events:none;gap:1rem}
.field-dock>*{pointer-events:auto}
.field-invitation{display:flex;align-items:center;gap:.6rem;padding:.55rem .8rem;border-radius:.75rem;font-size:.86rem;background:rgba(21,25,28,.84)}
.field-invitation>i,.speaker-mark::after{width:.45rem;height:.45rem;border-radius:50%;background:#e9a77d}
.field-shortcuts{padding:.28rem;border-radius:1rem;gap:.12rem}
.field-shortcuts button,.field-tabs button{min-height:2.5rem;display:flex;align-items:center;justify-content:center;gap:.52rem;font-size:.88rem;border-radius:.72rem;padding:.44rem .8rem}
.field-shortcuts button:first-child{background:#f3eee6;color:#252522}
.field.in-conversation .field-dock{display:none}
.field-panel{position:absolute;width:min(25.5rem,calc(100% - 2rem));right:1.7rem;z-index:4;display:flex;flex-direction:column;background:rgba(30,31,35,.95);border:1px solid #ffffff2d;border-radius:1.35rem;box-shadow:0 14px 46px #04070d44;overflow:hidden;animation:arrive .2s ease-out}
@supports(backdrop-filter:blur(10px)){.field-panel{background:rgba(27,29,33,.9);backdrop-filter:blur(12px)}}
@keyframes arrive{from{opacity:0;transform:translateY(5px)}}
.field-index{top:5.95rem;bottom:auto;max-height:calc(100% - 10.8rem)}
.field-panel-head{display:flex;align-items:center;gap:.75rem;padding:1rem 1rem .9rem 1.1rem;border-bottom:1px solid #ffffff1c}
.field-panel-head h2{font-size:1.32rem;font-weight:500}
.field-panel-head .field-square{margin-left:auto;background:#ffffff0c;border-color:#ffffff12;min-height:2.25rem;width:2.25rem;height:2.25rem}
.field-tabs{display:flex;padding:.65rem .8rem .25rem;gap:.25rem}
.field-tabs button{color:var(--glass-dim);min-height:2.2rem;flex:auto}
.field-tabs button[aria-pressed="true"]{background:#eee8df;color:#292726}
.field-stops{padding:0 .9rem .7rem;overflow:auto;overscroll-behavior:contain}
.field-stops h3{font:500 .73rem/1.4 Funnel,sans-serif;color:#e8bda2;margin:.8rem .35rem .25rem;letter-spacing:.04em}
.field-stop{display:flex;width:100%;text-align:left;align-items:center;gap:.72rem;padding:.65rem .4rem;border-bottom:1px solid #ffffff16}
.field-stop strong,.field-stop small{display:block}
.field-stop strong{font-size:.96rem;font-weight:500}
.field-stop small{font-size:.77rem;color:#bbbec3}
.field-stop i{font-style:normal;color:#dbb295;margin-left:auto}
.field-stop b,.speaker-mark{width:2.25rem;height:2.25rem;display:grid;place-items:center;color:#ebd0b9;background:linear-gradient(150deg,#71523f,#3f414b);border-radius:.65rem;font-weight:500;font-size:.88rem}
.field-talk{bottom:1.5rem;max-height:calc(100% - 7.5rem)}
.speaker-info small{color:#dfbfa7;font-size:.77rem}
.speaker-mark{width:2.7rem;height:2.7rem;font-size:1.2rem;position:relative}
.field-portrait,.speaker-mark img{width:2.25rem;height:2.25rem;object-fit:cover;border-radius:.65rem}
.speaker-mark img{width:100%;height:100%}
#speaker-name:focus {outline:none}
.speaker-mark::after{content:"";position:absolute;right:-.09rem;bottom:.15rem;border:2px solid #29292c;width:.55rem;height:.55rem}
.field-history{overflow:auto;overscroll-behavior:contain;min-height:3rem;max-height:clamp(10rem,35svh,24rem);padding:.85rem 1.05rem;scrollbar-width:thin;font-size:.97rem;line-height:1.56}
.field-history p{margin:0 0 .7rem;white-space:pre-line;overflow-wrap:anywhere}
.field-history p:last-child{margin-bottom:0}
.field-history .from-user{margin-left:auto;background:#515356;border-radius:.75rem .75rem .18rem .75rem;padding:.45rem .7rem;width:fit-content;max-width:92%}
.field-compose{display:flex;align-items:center;gap:.3rem;margin:.1rem .8rem .4rem;padding:.27rem;background:#fffdf3;border-radius:.85rem;color:#222426}
.field-compose input{flex:1;min-width:0;width:0;border:0;background:transparent;color:#25282a;padding:.48rem;font-size:1rem;color-scheme:light}
.field-compose button{display:grid;place-items:center;flex:none;height:2.18rem;width:2.18rem;border-radius:.62rem;background:#303234;color:#fff}
.field-compose [data-field="mic"]{background:transparent;color:#272727}
.field-compose [data-field="vocal"]{background:transparent;color:#272727}
.field-compose [data-field="vocal"][aria-pressed="true"]{background:#c8462c;color:#fff;animation:vocal-pouls 1.6s ease-in-out infinite}
@keyframes vocal-pouls{50%{box-shadow:0 0 0 .35rem rgba(200,70,44,.18)}}
@media (prefers-reduced-motion:reduce){.field-compose [data-field="vocal"][aria-pressed="true"]{animation:none}}
.field-talk-tools{display:flex;align-items:center;gap:.25rem;padding:0 .72rem .6rem}
.field-talk-tools button,.field-redirect,.field-note button{display:inline-flex;align-items:center;gap:.32rem;font-size:.78rem;border-radius:.55rem;padding:.42rem .48rem;color:#e9ded2}
.field-talk-tools button:last-child{margin-left:auto}
.field-talk-tools button[aria-pressed="true"],.field-redirect,.field-note button{background:#59463a;color:#ffe5d1}
.field-talk-tools button:disabled{opacity:.48}
.field-redirect{margin:0 1rem .6rem;align-self:flex-start}
.field-note{padding:.5rem 1rem .8rem;border-top:1px solid #ffffff22}
.field-note label{display:block;font-size:.8rem}
.field-note textarea{color:#fff;width:100%;display:block;background:#ffffff12;border:1px solid #ffffff36;border-radius:.55rem;padding:.45rem}
.field-notice{font-size:.78rem;color:#d7c8ba;padding:0 1rem .65rem}
@media(max-width:47rem){
  .field{height:calc(100svh - 7.1rem);min-height:24rem}
  .field-tools{inset:.65rem .65rem auto}.field-where{padding:.5rem .66rem;gap:.45rem}.field-button{padding:.5rem .65rem}
  .field-dock{inset:auto .65rem .65rem;flex-direction:column;align-items:flex-start;gap:.38rem}
  .field-panel{right:.65rem;width:min(25.5rem,calc(100% - 1.3rem))}
  .field-index{top:4.2rem;max-height:calc(100% - 5rem)}.field-talk{bottom:.65rem;max-height:calc(100% - 4.4rem)}
  .field-history{max-height:26svh}.field-invitation{font-size:.78rem}.field-shortcuts button{min-height:2.3rem}
}
@media(max-height:570px) and (min-width:48rem){.field{min-height:20rem}.field-history{max-height:22svh}.field-talk{bottom:.5rem}}
@media(prefers-reduced-motion:reduce){.field-panel{animation:none}}

.field-engine .etiquette{width:max-content;max-width:16rem;display:flex;align-items:center;gap:.45rem;padding:.3rem .65rem;border-radius:.65rem;font-size:.78rem;color:#fffdf5;background:#23252cec;border:1px solid #ffffff30;pointer-events:none;white-space:nowrap}
.field-engine .etiquette .pastille{width:.36rem;height:.36rem;border-radius:50%}
.field-engine .etiquette .sep,.field-engine .etiquette small{display:none}
.field-engine .etiquette.figurant{font-size:0}
.field-engine .etiquette.figurant b{font-size:.8rem}

.dictation-choice{padding:.6rem 1rem .8rem;border-top:1px solid #ffffff20;font-size:.84rem}
.dictation-choice div{display:flex;gap:.6rem;margin-top:.6rem}
.dictation-choice button{padding:.45rem .65rem;border:1px solid #ffffff30;border-radius:.55rem}
.dictation-choice button:first-child{background:#eee7df;color:#272629}

.field-talk.is-speaking .speaker-mark::after{background:#f7d6a4;outline:2px solid #f6c08266;animation:parole 1.1s ease-in-out infinite alternate}
@keyframes parole{to{outline-width:5px;outline-color:#f6c08214}}
@media(prefers-reduced-motion:reduce){.field-talk.is-speaking .speaker-mark::after{animation:none}}

.table-parcours {
  position:absolute;z-index:5;right:clamp(.8rem,2.1vw,2.6rem);top:50%;transform:translateY(-50%);
  width:min(23rem,36%);padding:1.2rem 1.35rem 1.05rem;border:1px solid #eee1c938;
  border-radius:1rem;background:#17191cee;color:#f5f0e7;box-shadow:0 .85rem 3rem #10121835;
  max-height:calc(100% - 7.5rem);overflow:auto;overscroll-behavior:contain;
}
.table-parcours header,.table-parcours footer {display:flex;align-items:center;justify-content:space-between;gap:.7rem}
.table-parcours header p {color:#d6b593;font-size:.78rem}
.table-parcours header h2 {font-weight:470;font-size:clamp(1.45rem,2.4vw,2.1rem);margin:.22rem 0}
.table-parcours header button {color:#f6efe8;display:grid;place-items:center;width:2.6rem;height:2.6rem;font-size:1.65rem}
.table-parcours select {margin:1rem 0;width:100%;padding:.6rem .4rem;background:#222629;border:1px solid #666566;border-radius:.3rem;color:#fcf3e9}
.table-reperes {display:flex;align-items:stretch;gap:.8rem;border-bottom:1px solid #fff3}
.table-reperes button {padding:.5rem 0;font-size:.83rem;color:#c4c3c3}
.table-reperes [aria-pressed="true"] {color:#ffd2a8;box-shadow:inset 0 -2px #e7b17c}
.table-demonstration {min-height:9rem;padding:1rem 0}
.table-demonstration h3 {font-size:1.27rem;font-weight:470}
.table-demonstration p {color:#e0dbd7;margin-top:.55rem;font-size:.91rem}
.table-parcours footer {padding-top:.75rem;border-top:1px solid #fff3;color:#c1bcb6;font-size:.8rem}
.table-parcours footer button {color:#fff1dd;padding:.5rem 0;text-decoration:underline;text-underline-offset:.27em}
.table-ouverte .field-dock {display:none}
@media(max-width:44rem) {
  .table-parcours {width:calc(100% - 1.3rem);right:.65rem;bottom:.65rem;top:auto;max-height:47%;transform:none;padding:.68rem .9rem .6rem}
  .table-parcours header h2 {font-size:1.3rem}
  .table-parcours header p {font-size:.72rem}
  .table-parcours select {margin:.35rem 0 .05rem;min-height:2rem;padding:.22rem .4rem}
  .table-demonstration {min-height:0;padding:.6rem 0}
  .table-demonstration h3 {font-size:1.03rem}
  .table-demonstration p {font-size:.83rem;margin-top:.33rem}
  .table-parcours footer {padding-top:.25rem}
}
@media(max-height:32rem) and (orientation:landscape) {
  .table-parcours {top:3.6rem;bottom:.55rem;max-height:none;transform:none;width:min(23rem,48%)}
}
.table-schema {width:100%;height:clamp(4rem,11svh,6rem);display:block;margin-top:.65rem;overflow:visible}
.table-schema path {fill:none;stroke-width:1}
.table-schema .trace-attente {stroke:#494e52;stroke-dasharray:2 3}
.table-schema .trace-active {stroke:#c69364}
.table-schema circle {stroke:#202124;stroke-width:1}
.table-schema .point-attente {fill:#717477}
.table-schema .point-actif {fill:#ffc88d}
.table-schema text {font:8px/1 Funnel,system-ui,sans-serif;paint-order:stroke;stroke:#1d2022;stroke-width:2;stroke-linejoin:round}
.table-schema .texte-attente {fill:#a3a9ac}
.table-schema .texte-actif {fill:#f6e3cf}
.table-demonstration {min-height:7.25rem}
@media(prefers-reduced-motion:no-preference) {
  .table-schema .trace-active {stroke-dasharray:180;animation:tracer-liaison .6s ease-out}
  @keyframes tracer-liaison {from{stroke-dashoffset:180}to{stroke-dashoffset:0}}
}
@media(max-width:44rem) {
  .table-schema {height:3.7rem;margin-top:.26rem}
  .table-demonstration {min-height:0}
}

/* Tour d'accueil du hall (public/tour-accueil.js) */
.tour-voile{position:fixed;inset:0;z-index:60;pointer-events:none}
.tour-voile.sans-cible{background:rgba(24,20,18,.42)}
.tour-anneau{position:fixed;z-index:61;border-radius:.8rem;pointer-events:none;box-shadow:0 0 0 3px #f2b48f,0 0 0 9999px rgba(24,20,18,.42);transition:left .25s,top .25s,width .25s,height .25s}
.tour-bulle{position:fixed;z-index:62;width:min(21rem,calc(100vw - 32px));padding:1rem 1.05rem .85rem;border-radius:1rem;background:#fffdf6;color:#2a2522;box-shadow:0 18px 50px rgba(0,0,0,.28);font-size:.92rem;line-height:1.45}
.tour-bulle h2{margin:.1rem 0 .35rem;font-size:1.08rem;color:#1f1b18}
.tour-bulle .tour-etape{margin:0;font-size:.72rem;letter-spacing:.06em;color:#9a6b4c}
.tour-bulle .tour-texte{margin:0 0 .7rem}
.tour-plus{display:flex;align-items:center;gap:.45rem;font-size:.8rem;color:#6c5f56;margin-bottom:.7rem}
.tour-actions{display:flex;align-items:center;gap:.4rem}
.tour-actions span{flex:1}
.tour-actions button{border-radius:.6rem;padding:.45rem .75rem;font-size:.85rem;color:#4b4039;background:transparent}
.tour-actions button:hover{background:#f1e6dc}
.tour-actions .tour-principal{background:#303234;color:#fff}
.tour-actions .tour-principal:hover{background:#1c1d1e}
.tour-bulle button:focus-visible{outline:2px solid #c8462c;outline-offset:2px}
@media (prefers-reduced-motion:reduce){.tour-anneau{transition:none}}
:root[data-theme="dark"] .tour-bulle{background:#2a2523;color:#efe4da}
:root[data-theme="dark"] .tour-bulle h2{color:#fff3ea}
:root[data-theme="dark"] .tour-plus{color:#c7b8ac}
:root[data-theme="dark"] .tour-actions button{color:#e6d6ca}
:root[data-theme="dark"] .tour-actions button:hover{background:#3a332f}
:root[data-theme="dark"] .tour-actions .tour-principal{background:#f2e7dc;color:#1d1a18}
.field-note-garde{margin:.35rem 0 .5rem;font-size:.76rem;line-height:1.35;color:#f2c9a8}
/* Astuce : la conversation à voix haute (bouton des ondes), tant qu'on ne l'a pas essayée */
.astuce-vocale{position:absolute;right:.8rem;bottom:calc(100% + .45rem);max-width:15rem;padding:.55rem .7rem;border-radius:.7rem;background:#fffdf6;color:#2a2522;font-size:.8rem;line-height:1.35;box-shadow:0 10px 30px rgba(0,0,0,.25);z-index:5}
.astuce-vocale::after{content:"";position:absolute;right:var(--fleche,4.6rem);top:100%;border:7px solid transparent;border-top-color:#fffdf6}
.pause-vocale{background:#fff3e9;border:1px solid #f0c3a3}
.pause-vocale::after{border-top-color:#fff3e9}
.astuce-vocale button{margin-left:.4rem;font-size:.75rem;color:#9a4a2c;text-decoration:underline;background:none}
.field-compose{position:relative}
/* Choix du cas pratique (bouton Scénario) */
.field-scenarios .scenarios-intro{margin:.2rem 1rem .6rem;font-size:.82rem;line-height:1.4;color:#d9cdc2}
.field-scenarios h3{margin:.8rem 1rem .2rem;font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:#c99a6a}
.field-scenarios .field-stop{padding:.6rem 1rem}
.field-scenarios .field-stop span{flex:1}
.field-scenarios .field-stop strong{display:block;font-weight:500;font-size:.95rem}
.field-scenarios .field-stop small{display:block;font-size:.78rem;color:#cbbdb1}
.field-scenarios .field-stop em{font-style:normal;font-size:.72rem;padding:.15rem .45rem;border-radius:1rem;background:#59463a;color:#ffe5d1}
.field-scenarios .field-stop[aria-pressed="true"]{background:#ffffff0d}

/* Exposition IA : barre de lecture d'une fiche (précédente, suivante, quitter) */
.expo-nav{position:absolute;left:50%;bottom:calc(128px + env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;align-items:center;gap:.4rem;
  max-width:calc(100% - 32px);padding:.4rem;border-radius:16px;background:rgba(16,17,19,.82);backdrop-filter:blur(10px);color:#F2F2F0;
  box-shadow:0 8px 30px rgba(0,0,0,.25);z-index:4}
.expo-nav-bouton,.expo-nav-quitter{flex:none;width:44px;height:44px;border:0;border-radius:12px;background:rgba(255,255,255,.1);color:inherit;font-size:1.5rem;cursor:pointer}
.expo-nav-quitter{font-size:1rem;background:transparent}
.expo-nav-bouton:disabled{opacity:.35;cursor:default}
.expo-nav-bouton:not(:disabled):hover,.expo-nav-quitter:hover{background:rgba(255,255,255,.2)}
.expo-nav-titre{min-width:0;display:flex;flex-direction:column;padding:0 .4rem;line-height:1.2}
.expo-nav-titre span{font-size:.72rem;opacity:.7;text-transform:uppercase;letter-spacing:.04em}
.expo-nav-titre strong{font-size:.9rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46ch}

.speaker-mark img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}
.field-square.field-muet svg{opacity:.85}
.field-square.field-muet{position:relative}
/* Musique coupée : la note reste claire, la barre est un gris moyen cerné du fond du bouton pour se détacher. */
.field-square.field-muet::after{content:"";position:absolute;width:1.5rem;height:2.5px;background:#8b9296;box-shadow:0 0 0 1.5px var(--glass);transform:rotate(-45deg);border-radius:2px}
