:root { --fond:#101216; --menu:#171b22; --carte:#1d232d; --creux:#12161d; --bord:#2e3644; --texte:#f1f3f6; --doux:#9aa6b6;
        --accent:#2f7bf6; --ok:#22a55b; --alerte:#dc2f2f; --ambre:#d99a1c; }
* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html, body { height:100%; }
body { margin:0; background:var(--fond); color:var(--texte); font:14px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif; }

/* ---------- Ossature ---------- */
.app { display:grid; height:100vh; grid-template-columns:205px minmax(0,1.1fr) minmax(380px,1fr); grid-template-rows:auto minmax(0,1fr); }
.menu { grid-row:1 / 3; background:var(--menu); border-right:1px solid var(--bord); padding:14px 12px; display:flex; flex-direction:column; gap:8px; }
.barre { grid-column:2 / 4; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 16px;
         background:#191e27; border-bottom:1px solid var(--bord); }
.scene { grid-column:2; grid-row:2; position:relative; min-height:0; background:#1a2029; }
.volet { grid-column:3; grid-row:2; overflow-y:auto; padding:12px; border-left:1px solid var(--bord); }

.marque { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.logo { width:42px; height:42px; border-radius:11px; background:var(--accent); display:flex; align-items:center; justify-content:center; font-weight:800; font-size:13px; }
.marque-titre { font-weight:700; font-size:16px; } .marque-sous { color:var(--doux); font-size:12px; }
#nav { display:flex; flex-direction:column; gap:4px; }
#nav button { text-align:left; background:transparent; border:0; color:#cfd6e0; padding:10px 11px; border-radius:9px; font-size:14px; min-height:0; }
#nav button:hover, #nav button.actif { background:#263246; color:#fff; }

.titres h1 { margin:0; font-size:20px; } .titres p { margin:2px 0 0; color:var(--doux); font-size:12px; }
.badges { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.badge { padding:6px 12px; border-radius:99px; font-size:12px; font-weight:700; background:#24406b; color:#b9d4ff; white-space:nowrap; }
.badge.gris { background:#333a46; color:#b6bfcc; } .badge.vert { background:#16603a; color:#c4f3d7; }
.badge.ambre { background:#6b4a0c; color:#ffe0a0; }

.scene canvas { display:block; width:100%; height:100%; touch-action:none; cursor:grab; }
.scene-etiquette { position:absolute; left:12px; top:10px; padding:5px 11px; border-radius:99px; font-size:12px; font-weight:700;
                   background:rgba(20,26,34,.78); border:1px solid var(--bord); pointer-events:none; }
.scene-info { position:absolute; left:12px; bottom:9px; font-size:12px; color:var(--doux); pointer-events:none; }

/* ---------- Vues et cartes ---------- */
.vue { display:none; flex-direction:column; gap:12px; } .vue.active { display:flex; }
.carte { background:var(--carte); border:1px solid var(--bord); border-radius:12px; padding:12px 13px; }
h2 { font-size:14px; margin:0 0 10px; padding-bottom:7px; border-bottom:1px solid var(--bord); }
h3 { font-size:12px; margin:14px 0 8px; color:var(--doux); text-transform:uppercase; letter-spacing:.06em; font-weight:600; }
.entete { display:flex; justify-content:space-between; align-items:center; gap:8px; border-bottom:1px solid var(--bord); margin-bottom:10px; padding-bottom:7px; }
.entete h2 { border:0; margin:0; padding:0; }
.note { color:var(--doux); font-size:12px; margin:8px 0 0; }
.rang { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }

button { font:inherit; color:#fff; background:var(--accent); border:0; border-radius:9px; padding:9px 13px; min-height:40px; cursor:pointer; }
button:hover { filter:brightness(1.1); } button:active { transform:scale(.98); }
button:disabled { opacity:.45; cursor:not-allowed; filter:none; }
button.on { background:var(--ok); } button.danger { background:var(--alerte); }
button.petit { min-height:32px; padding:5px 11px; font-size:13px; background:#33415a; } button.petit.on { background:var(--ok); }
button.large { width:100%; font-weight:700; margin-top:10px; }
button.neutre { background:#33415a; }

.voyants { display:flex; gap:8px; flex-wrap:wrap; }
.voyant { padding:5px 10px 5px 26px; border-radius:99px; background:var(--creux); border:1px solid var(--bord); font-size:12px; position:relative; }
.voyant::before { content:""; position:absolute; left:10px; top:50%; width:9px; height:9px; margin-top:-4.5px; border-radius:50%; background:#c23b3b; }
.voyant.ok::before { background:#2fc46f; }

.rapides { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:10px; }
.rapides button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; height:74px; background:#33415a; font-size:22px; padding:4px; }
.rapides button span { font-size:12px; }

.etats { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.etats div { background:var(--creux); border:1px solid var(--bord); border-radius:9px; padding:8px 10px; min-width:0; }
.etats span { display:block; color:var(--doux); font-size:11px; } .etats strong { display:block; margin-top:2px; font-size:13px; overflow-wrap:anywhere; }

.camera { position:relative; background:#0b0d11; border-radius:9px; overflow:hidden; aspect-ratio:4 / 3; display:flex; align-items:center; justify-content:center; }
.camera img { width:100%; height:100%; object-fit:contain; display:none; }
#cameraVide { color:var(--doux); font-size:13px; }

/* ---------- Pilotage ---------- */
.colonnes { display:grid; grid-template-columns:1fr 1fr; gap:16px; } .colonnes h3 { margin-top:0; }
.curseur { padding:4px 0 7px; }
.curseur .ligne { display:flex; justify-content:space-between; gap:6px; font-size:12.5px; color:#cdd5e0; }
.curseur output { font:12px ui-monospace,Consolas,monospace; color:#fff; white-space:nowrap; }
.curseur input { width:100%; height:26px; accent-color:var(--accent); margin:0; }
.curseur.simu .ligne span::after { content:" · simu"; color:var(--ambre); }
.curseur.bloque { opacity:.45; }
.pave { display:grid; grid-template-columns:repeat(3,62px); gap:8px; justify-content:center; }
.pave button { height:54px; font-size:20px; padding:0; background:#33415a; } .pave button.on { background:var(--accent); } .pave .vide { visibility:hidden; }

/* ---------- Servos ---------- */
.table-defile { overflow-x:auto; margin-top:10px; }
table { border-collapse:collapse; width:100%; font-size:12.5px; }
th, td { padding:6px 8px; border-bottom:1px solid var(--bord); text-align:right; white-space:nowrap; }
th { color:var(--doux); font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.04em; }
th:nth-child(2), td:nth-child(2) { text-align:left; white-space:normal; }
td.mono { font-family:ui-monospace,Consolas,monospace; } td.faible { color:var(--doux); }

/* ---------- Mouvements ---------- */
.liste-poses { margin-top:12px; display:flex; flex-direction:column; gap:8px; min-height:60px; }
.vide-liste { color:var(--doux); border:1px dashed #475266; border-radius:10px; padding:14px; }
.pose { display:flex; align-items:center; gap:8px; background:var(--creux); border:1px solid var(--bord); border-radius:10px; padding:8px 10px; flex-wrap:wrap; }
.pose .nom { flex:1; min-width:110px; font-weight:600; overflow-wrap:anywhere; }
.pose label { color:var(--doux); font-size:12px; display:flex; align-items:center; gap:5px; }
.pose input[type=number] { width:58px; background:#0c0f14; color:#fff; border:1px solid var(--bord); border-radius:7px; padding:6px; font:inherit; }

/* ---------- Journal ---------- */
.journal { font:12px/1.5 ui-monospace,Consolas,monospace; height:46vh; min-height:220px; overflow:auto; background:#0b0d11; border-radius:9px; padding:8px 10px;
           white-space:pre-wrap; word-break:break-word; margin-top:10px; }
.journal.court { height:150px; min-height:0; margin-top:0; }
.j-dxl-TX { color:#8cc4ff; } .j-dxl-RX { color:#9be3bd; } .j-detail { color:#7d8998; }
.j-robot { color:#ffc56b; } .j-action { color:#f1f3f6; } .j-info { color:#b9c2cf; } .j-mode { color:#c9a6ff; } .j-erreur { color:#ff8a80; }
.filtres label { display:flex; align-items:center; gap:5px; font-size:13px; }
.saisie { flex:1; min-width:0; font:13px ui-monospace,Consolas,monospace; background:#0b0d11; color:var(--texte); border:1px solid var(--bord); border-radius:9px; padding:10px; }

/* ---------- Maintenance ---------- */
.reseau { display:grid; grid-template-columns:auto 1fr; gap:5px 14px; font-size:13px; }
.reseau span { color:var(--doux); } .reseau strong { font-family:ui-monospace,Consolas,monospace; font-weight:500; overflow-wrap:anywhere; }
.couleur { display:flex; align-items:center; gap:8px; color:var(--doux); }
.couleur input { width:42px; height:40px; border:1px solid var(--bord); border-radius:9px; background:none; padding:2px; }

#toast { position:fixed; left:50%; bottom:18px; transform:translateX(-50%); background:var(--alerte); color:#fff; padding:11px 16px; border-radius:10px;
         max-width:min(92vw,560px); display:none; z-index:50; font-weight:600; box-shadow:0 6px 24px rgba(0,0,0,.45); }

/* ---------- Ecrans moyens : le menu passe en haut ---------- */
@media (max-width:1180px) {
  .app { grid-template-columns:minmax(0,1fr) minmax(360px,1fr); grid-template-rows:auto auto minmax(0,1fr); }
  .menu { grid-row:1; grid-column:1 / 3; flex-direction:row; align-items:center; padding:8px 12px; border-right:0; border-bottom:1px solid var(--bord); overflow-x:auto; }
  .marque { margin:0 8px 0 0; } .marque > div:last-child { display:none; } .logo { width:36px; height:36px; }
  #nav { flex-direction:row; } #nav button { white-space:nowrap; padding:8px 11px; }
  .barre { grid-row:2; grid-column:1 / 3; } .scene { grid-column:1; grid-row:3; } .volet { grid-column:2; grid-row:3; }
}
/* ---------- Smartphone : tout en une colonne, vue 3D fixe en haut ---------- */
@media (max-width:760px) {
  html, body { height:auto; }
  .app { display:block; height:auto; }
  .menu { position:sticky; top:0; z-index:20; }
  .barre { padding:8px 12px; } .titres p { display:none; } .titres h1 { font-size:16px; }
  .scene { position:sticky; top:53px; z-index:10; height:36vh; border-bottom:1px solid var(--bord); }
  .volet { overflow:visible; border-left:0; padding:8px; }
  .colonnes { gap:10px; } .etats { grid-template-columns:1fr 1fr; }
  .journal { height:40vh; }
}

/* Filtres du journal */
.journal.sans-dxl .t-dxl, .journal.sans-robot .t-robot,
.journal.sans-infos .t-action, .journal.sans-infos .t-info, .journal.sans-infos .t-mode { display:none; }

/* ---------- Fenetre de decodage des trames ---------- */
.fenetre { position:fixed; left:222px; top:128px; z-index:40; width:500px; max-width:calc(100vw - 16px); max-height:calc(100vh - 150px);
           display:flex; flex-direction:column; background:#161b23; border:1px solid #3b4658; border-radius:12px; box-shadow:0 12px 40px rgba(0,0,0,.55); }
.fenetre[hidden] { display:none; }
.fen-titre { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:8px 10px 8px 14px; cursor:move; touch-action:none;
             border-bottom:1px solid var(--bord); font-weight:700; user-select:none; }
.fen-onglets { display:flex; gap:6px; padding:8px 12px 0; }
.fen-onglets button { min-height:32px; padding:5px 12px; font-size:13px; background:#283244; }
.fen-onglets button.on { background:var(--accent); }
.fen-corps { padding:10px 12px 12px; overflow-y:auto; }
.fen-corps .note { margin:0 0 8px; }
.octets { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:10px; }
.octet { font:12.5px ui-monospace,Consolas,monospace; padding:3px 6px; border-radius:5px; color:#fff; border:1px solid transparent; }
.o-e { background:#475266; } .o-i { background:#7a4fc0; } .o-l { background:#2f6f9f; } .o-n { background:#b0562a; }
.o-p { background:#1f7f72; } .o-d { background:#2f7bf6; } .o-c { background:#8a6a14; }
.octet.change { border-color:#fff; filter:brightness(1.18); }
#decTable { font-size:12.5px; }
#decTable td { text-align:left; white-space:normal; vertical-align:top; padding:5px 6px; }
#decTable td:first-child { color:var(--doux); white-space:nowrap; } #decTable td:nth-child(2) { font-family:ui-monospace,Consolas,monospace; white-space:nowrap; }
#decTable tr.faux td:last-child { color:#ff8a80; }
.legende { display:flex; flex-wrap:wrap; gap:4px; margin-top:10px; } .legende .octet { font-size:11px; font-family:inherit; }
@media (max-width:760px) { .fenetre { left:8px; right:8px; width:auto; top:auto; bottom:8px; max-height:56vh; } }

/* ---------- Actions compactes, mode visiteur ---------- */
.groupe { display:grid; grid-template-columns:52px 1fr; gap:8px; align-items:center; padding:4px 0; }
.groupe > span { color:var(--doux); font-size:12px; }
.rang.serre { gap:6px; }
button.compact { min-height:34px; padding:6px 12px; font-size:13px; background:#33415a; }
button.compact.on { background:var(--ok); }
.visiteur { display:flex; gap:14px; align-items:center; }
.qr { width:108px; flex:none; background:#fff; border-radius:8px; padding:5px; line-height:0; }
.qr svg { width:100%; height:auto; display:block; }
.qr.ferme { opacity:.18; }
.adresse { font:13px ui-monospace,Consolas,monospace; overflow-wrap:anywhere; margin:6px 0 10px; }
.affiche { position:fixed; inset:0; z-index:60; background:rgba(8,10,14,.94); display:flex; align-items:center; justify-content:center; padding:16px; }
.affiche[hidden] { display:none; }
.affiche-carte { text-align:center; max-width:560px; }
.affiche-carte h1 { font-size:40px; margin:0 0 6px; } .affiche-carte p { font-size:18px; color:#cfd6e0; margin:0 0 16px; }
.qr.grand { width:min(62vh,86vw); margin:0 auto 14px; padding:12px; border-radius:14px; }
.affiche-carte .adresse { font-size:20px; color:#fff; }

/* ---------- Pages simples : visiteurs, code d'acces ---------- */
body.page-simple { height:auto; min-height:100%; }
.v-barre { display:flex; align-items:center; gap:10px; padding:10px 14px; background:#191e27; border-bottom:1px solid var(--bord); }
.v-barre .titres { flex:1; } .v-barre .titres p { display:block; }
.v-scene { position:relative; height:46vh; min-height:240px; background:#1a2029; }
.v-scene canvas { display:block; width:100%; height:100%; touch-action:none; }
.v-charge { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:var(--doux); }
.v-charge[hidden] { display:none; }
.v-actions { padding:12px 14px 24px; max-width:640px; margin:0 auto; }
.v-message { min-height:22px; margin:0 0 12px; font-weight:600; text-align:center; }
.v-grille { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.v-grille button { min-height:64px; font-size:16px; font-weight:600; }
.acces { max-width:340px; margin:12vh auto 0; padding:0 16px; text-align:center; }
.acces .logo { margin:0 auto 12px; } .acces h1 { font-size:22px; margin:0 0 6px; }
.acces form { display:flex; gap:8px; margin:16px 0 10px; } .acces a { color:#8cc4ff; }

.scene-aide { position:absolute; right:12px; top:14px; font-size:11.5px; color:#77839a; pointer-events:none; }
@media (max-width:1180px), (pointer:coarse) { .scene-aide { display:none; } }

/* ---------- Mode visiteur dans la colonne de gauche ---------- */
.bloc-visiteur { margin-top:auto; background:var(--carte); border:1px solid var(--bord); border-radius:12px; padding:11px; text-align:center; }
.bloc-visiteur h2 { text-align:left; }
.bloc-visiteur button.large { margin:0 0 10px; }
.bloc-visiteur .qr { width:100%; max-width:158px; margin:0 auto; }
.bloc-visiteur .adresse { font-size:11.5px; margin:8px 0 4px; }
.bloc-visiteur .note { margin:0 0 9px; }
.volet .bloc-visiteur { margin-top:0; }                      /* petit ecran : dans le tableau de bord */
.volet .bloc-visiteur .qr { max-width:130px; }

/* ---------- Portes ouvertes : attraction, vitrine, voix ---------- */
.menu { overflow-y:auto; }
.bloc-visiteur .qr { max-width:124px; }
.duo { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-bottom:6px; }
.duo button, button.pleine { padding:5px 4px; font-size:12px; }
button.pleine { width:100%; margin-bottom:8px; }
.coche { display:flex; align-items:center; justify-content:center; gap:6px; font-size:12px; color:var(--doux); }

body.page-vitrine { display:grid; grid-template-columns:minmax(0,1fr) min(34vw,460px); height:100vh; overflow:hidden; }
.vt-scene { position:relative; min-width:0; background:#1a2029; }
.vt-scene canvas { display:block; width:100%; height:100%; touch-action:none; }
.vt-annonce { position:absolute; left:50%; bottom:5vh; transform:translateX(-50%); background:var(--accent); color:#fff; font-size:clamp(20px,2.6vw,40px);
              font-weight:700; padding:.5em 1em; border-radius:.5em; white-space:nowrap; box-shadow:0 8px 30px rgba(0,0,0,.5); }
.vt-annonce[hidden] { display:none; }
.vt-panneau { background:#141920; border-left:1px solid var(--bord); padding:4vh 2.4vw; display:flex; flex-direction:column; align-items:center; text-align:center; gap:1.6vh; }
.vt-tete { display:flex; align-items:center; gap:12px; text-align:left; align-self:stretch; margin-bottom:3vh; }
.vt-ecole { font-size:clamp(18px,1.7vw,28px); font-weight:700; } .vt-sous { color:var(--doux); font-size:clamp(11px,.9vw,15px); }
.vt-panneau h1 { font-size:clamp(28px,3.2vw,54px); margin:0; line-height:1.1; }
.vt-texte { font-size:clamp(15px,1.4vw,24px); color:#cfd6e0; margin:0; }
.vt-panneau .qr { width:min(100%,46vh); padding:10px; border-radius:14px; }
.vt-panneau .qr[hidden], .vt-panneau .adresse[hidden] { display:none; }
.vt-panneau .adresse { font-size:clamp(13px,1.2vw,20px); color:#fff; margin:0; }
.vt-etat { margin-top:auto; color:var(--doux); font-size:clamp(12px,1vw,16px); }
@media (max-width:760px) { body.page-vitrine { grid-template-columns:1fr; grid-template-rows:55vh auto; height:auto; overflow:auto; } }

/* ---------- Page des visiteurs : tout tient dans l'ecran du telephone, sans defilement ---------- */
body.page-visiteur { display:flex; flex-direction:column; height:100vh; height:100dvh; min-height:0; overflow:hidden; }
.page-visiteur .v-barre { flex:none; padding:7px 12px; }
.page-visiteur .v-barre .logo { width:34px; height:34px; font-size:11px; }
.page-visiteur .titres h1 { font-size:16px; } .page-visiteur .titres p { font-size:11px; margin:0; }
.page-visiteur .v-scene { flex:1 1 auto; height:auto; min-height:0; }
.page-visiteur .v-actions { flex:none; width:100%; padding:8px 10px 10px; }
.page-visiteur .v-message { font-size:13px; min-height:18px; margin:0 0 7px; }
.page-visiteur .v-grille { gap:7px; }
.page-visiteur .v-grille button { min-height:42px; padding:4px 6px; font-size:14px; line-height:1.15; }
@media (max-height:520px) { .page-visiteur .v-grille { grid-template-columns:repeat(5,1fr); } .page-visiteur .v-grille button { min-height:36px; font-size:13px; } }

/* Ecran vitrine : logo du lycee sur fond blanc, intitule du BTS sur une seule ligne */
.vt-logo { align-self:stretch; background:#fff; border-radius:12px; padding:14px 18px; line-height:0; }
.vt-logo img { width:100%; height:auto; display:block; }
.vt-panneau .vt-ecole { margin-top:1vh; }
.vt-panneau .vt-sous { white-space:nowrap; font-size:clamp(9px,.95vw,15px); margin-bottom:2vh; }


/* Sous-titres des phrases prononcees : discrets, en bas de la scene */
.vt-annonce.sous-titre { white-space:normal; max-width:70%; width:max-content; text-align:center; bottom:3vh; background:rgba(12,15,20,.8);
                         border:1px solid #3b4658; font-weight:500; font-size:clamp(13px,1.2vw,20px); line-height:1.3; padding:.45em .9em; box-shadow:none; }

.choix-voix { width:100%; margin-top:6px; background:#0c0f14; color:var(--texte); border:1px solid var(--bord); border-radius:8px; padding:6px; font:inherit; font-size:12px; }

.saisie.ip { flex:none; width:150px; padding:7px 9px; }
.bloc-visiteur .qr + .note { margin-top:8px; }

/* ecran vitrine : image de la camera du robot, en medaillon */
.vt-coin { position:absolute; left:2vw; top:3vh; bottom:12vh; width:min(24vw,360px); display:flex; flex-direction:column; gap:1.4vh; }
.vt-camera { margin:0; background:#0c0f14; border:1px solid var(--bord); border-radius:12px; overflow:hidden; box-shadow:0 8px 30px rgba(0,0,0,.45); }
.vt-camera[hidden] { display:none; }
.vt-camera img { display:block; width:100%; aspect-ratio:4/3; object-fit:cover; }
.vt-camera figcaption { padding:6px 10px; font-size:clamp(11px,.95vw,15px); color:#cfd6e0; text-align:center; }
/* ecran vitrine : les trames qui partent vers le robot, sous la camera */
.vt-trames { background:rgba(12,15,20,.88); border:1px solid var(--bord); border-radius:12px; padding:8px 10px; box-shadow:0 8px 30px rgba(0,0,0,.45); overflow:hidden; }
.vt-trames[hidden] { display:none; }
.vt-trames-titre { font-size:clamp(11px,.95vw,15px); color:#cfd6e0; text-align:center; margin-bottom:6px; }
.vt-trame { padding:3px 0; border-top:1px solid rgba(255,255,255,.07); }
.vt-trame code { display:block; font:clamp(9px,.72vw,12px)/1.3 ui-monospace,Consolas,monospace; color:#7fd4ff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vt-trame.robot code { color:#8ff0a4; }
.vt-trame span { display:block; font-size:clamp(9px,.7vw,11.5px); color:var(--doux); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vt-trame.neuve code { color:#fff; }
.vt-camera { flex:none; }
.vt-trames { flex:1; min-height:0; display:flex; flex-direction:column; }      /* occupe toute la hauteur restante */
#vtTramesListe { flex:1; min-height:0; overflow:hidden; display:flex; flex-direction:column; justify-content:flex-end; }
.vt-trame { flex:none; }
.vt-trames { padding-bottom:14px; }
.vt-legende { display:flex; flex-direction:column; gap:2px; margin-bottom:6px; font-size:clamp(9px,.74vw,12px); color:#cfd6e0; }
.vt-legende i { display:inline-block; width:.8em; height:.8em; border-radius:50%; margin-right:.5em; }
.vt-legende i.dxl { background:#7fd4ff; } .vt-legende i.robot { background:#8ff0a4; }
/* ecran vitrine : la scene a exactement la hauteur de l'ecran, quel que soit son format (ecran tres large compris) */
body.page-vitrine { grid-template-rows:minmax(0,100vh); }
.vt-scene { height:100vh; min-height:0; overflow:hidden; }
.vt-scene canvas { position:absolute; inset:0; }
.vt-legende { margin:8px 0 0; padding-top:6px; border-top:1px solid rgba(255,255,255,.12); }
@media (max-width:760px) { body.page-vitrine { grid-template-rows:55vh auto; } .vt-scene { height:55vh; } }
/* ecran vitrine : colonne de gauche de largeur reglable (poignee sur le bord droit de la fenetre des trames) */
.vt-coin { bottom:3vh; width:var(--coin, min(24vw,360px)); }
.vt-camera { width:min(100%, min(24vw,360px)); }
.vt-trames { position:relative; }
.vt-trame { padding:2px 0; border-top:0; }
.vt-poignee { position:absolute; top:0; right:0; bottom:0; width:10px; cursor:ew-resize; touch-action:none; }
.vt-poignee:hover, .vt-poignee.active { background:rgba(127,212,255,.25); }
.vt-annonce { left:calc(50% + var(--coin-px, 0px) / 2 + 1vw); max-width:calc(100% - var(--coin-px, 0px) - 6vw); }
.vt-annonce.sous-titre { max-width:calc(100% - var(--coin-px, 0px) - 6vw); }
/* trames toujours entieres : retour a la ligne si besoin, un petit espace entre deux trames */
.vt-trame { padding:0 0 5px; }
.vt-trame code { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
/* ecran vitrine : panneau de droite plus accueillant et plus lisible */
.vt-panneau { background:linear-gradient(180deg,#1b2636 0%,#121821 60%,#0f141b 100%); gap:1.8vh; padding:3.5vh 2vw; }
.vt-panneau .vt-ecole { font-size:clamp(22px,2.1vw,34px); letter-spacing:.01em; color:#fff; margin-top:.6vh; }
.vt-panneau .vt-sous { display:flex; justify-content:center; gap:.45vw; flex-wrap:nowrap; white-space:nowrap; margin-bottom:.6vh; color:#e6eefb; font-size:clamp(9px,.92vw,15px); }
.vt-sous span { padding:.35em .8em; border-radius:999px; background:rgba(92,160,255,.16); border:1px solid rgba(120,175,255,.45); }
.vt-carte { align-self:stretch; display:flex; flex-direction:column; align-items:center; gap:1.5vh; padding:2.4vh 1.4vw; border-radius:20px;
  background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.14); box-shadow:0 10px 34px rgba(0,0,0,.35); }
.vt-carte h1 { font-size:clamp(28px,2.9vw,50px); color:#fff; }
.vt-carte .vt-texte { font-size:clamp(16px,1.45vw,25px); color:#f1f5fb; }
.vt-panneau .qr { width:min(100%,40vh); padding:12px; border-radius:16px; box-shadow:0 6px 20px rgba(0,0,0,.4); }
.vt-etapes, .vt-atouts { list-style:none; margin:0; padding:0; display:flex; justify-content:center; gap:1vw; flex-wrap:wrap; font-size:clamp(13px,1.15vw,20px); color:#f1f5fb; }
.vt-etapes[hidden], .vt-atouts[hidden] { display:none; }
.vt-etapes li, .vt-atouts li { display:flex; align-items:center; gap:.45em; white-space:nowrap; }
.vt-etapes b { display:inline-grid; place-items:center; width:1.7em; height:1.7em; border-radius:50%; background:var(--accent); color:#fff; font-size:.9em; }
.vt-atouts { flex-direction:column; align-items:center; gap:1.4vh; font-size:clamp(17px,1.6vw,28px); padding:1vh 0; }
.vt-atouts b { color:#8fc0ff; font-size:1.5em; min-width:1.6em; text-align:right; }
.vt-panneau .vt-etat { margin-top:auto; color:#c9d3e0; font-size:clamp(12px,1vw,16px); }
/* panneau de droite : toutes les tailles suivent sa largeur (--pw), pour rester lisible du portable a l'ecran tres large */
body.page-vitrine { --pw:clamp(340px,min(30vw,48vh),600px); grid-template-columns:minmax(0,1fr) var(--pw); }
.vt-panneau { padding:3.2vh calc(var(--pw) * .06); }
.vt-panneau .vt-ecole { font-size:calc(var(--pw) * .068); }
.vt-panneau .vt-sous { font-size:calc(var(--pw) * .0285); gap:calc(var(--pw) * .012); }
.vt-carte { padding:2.2vh calc(var(--pw) * .04); }
.vt-carte h1 { font-size:calc(var(--pw) * .098); }
.vt-carte .vt-texte { font-size:calc(var(--pw) * .047); }
.vt-panneau .qr { width:min(100%,34vh); }
.vt-etapes { font-size:calc(var(--pw) * .036); gap:calc(var(--pw) * .028); flex-wrap:nowrap; }
.vt-atouts { font-size:calc(var(--pw) * .058); }
.vt-panneau .vt-etat { font-size:calc(var(--pw) * .031); white-space:nowrap; }
@media (max-width:760px) { body.page-vitrine { --pw:100vw; grid-template-columns:1fr; } }
.vt-trame mark { background:none; color:#ffc94d; font-weight:700; }
.vt-legende i.change { background:#ffc94d; }
/* maintenance : mesure a la main de la plage d'un servo */
.mesure { margin:10px 0 4px; font:14px/1.5 ui-monospace,Consolas,monospace; color:var(--texte); min-height:1.5em; }
.mesure b { color:#ffc94d; }

/* Vitrine publique (version en ligne) : lien vers la page de commande et bouton de la voix */
.vt-public { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; align-items:center; margin:1.2vh 0 0; font-size:clamp(13px,1.05vw,17px); }
.vt-public[hidden] { display:none; }
.vt-public a { color:#fff; background:#2f6fed; padding:8px 14px; border-radius:10px; text-decoration:none; font-weight:600; }
.vt-public a:hover { background:#3d7cf5; }
.vt-public button { width:auto; margin:0; padding:8px 14px; border-radius:10px; border:1px solid #4a5568; background:transparent; color:#dbe4f0; font:inherit; cursor:pointer; }
.vt-public button.actif { border-color:#2f6fed; color:#fff; }
