/* Page d'essai sur de vrais téléphones : vidéo 16/9 avec le son, vote à trois boutons, pointage sur l'image arrêtée, pictogramme. */
html{background:var(--white)}
.es [hidden]{display:none!important}
body.es{margin:0;min-height:100vh;min-height:100dvh;background:var(--white);font-family:var(--f);font-size:16px;color:var(--ink);display:flex;flex-direction:column;-webkit-text-size-adjust:100%}
.es-top{display:flex;align-items:center;gap:10px;padding:10px 16px;padding-top:max(10px,env(safe-area-inset-top,0px));border-bottom:1px solid var(--line)}
.es-top img{width:84px;height:auto}
.es-top span{font-weight:800;color:var(--navy);flex:1}
.es-top b{font-size:13px;color:var(--grey);font-weight:600}
.es-main{flex:1;display:flex;flex-direction:column;padding:16px;padding-bottom:max(16px,env(safe-area-inset-bottom,0px));max-width:560px;width:100%;margin:0 auto;box-sizing:border-box}
#page{display:flex;flex-direction:column;gap:14px;flex:1}
.es h1{margin:0;font-size:24px;line-height:1.15;color:var(--navy);font-weight:800;letter-spacing:-.01em}
.es p{margin:0;line-height:1.45}
.es .gris{color:var(--grey);font-size:14.5px}
.es-b{min-height:60px;border-radius:14px;border:0;font:800 19px var(--f);background:var(--navy);color:#fff;padding:0 18px;transition:transform .12s}
.es-b:active{transform:scale(.97)}
.es-b:disabled{opacity:.45}
.es-b.clair{background:var(--white);color:var(--navy);border:2px solid var(--navy)}
.es-rang{display:grid;gap:10px}
.es-rang.trois{grid-template-columns:1fr 1fr 1fr}
.es-rang.deux{grid-template-columns:1fr 1fr}
.es-rang.trois .es-b{font-size:16px;padding:0 6px}
.es-barre{height:10px;border-radius:5px;background:var(--paper);overflow:hidden}
.es-barre i{display:block;height:100%;background:var(--navy);border-radius:5px;width:0;transition:width .2s linear}
.es-centre{flex:1;display:flex;flex-direction:column;justify-content:center;gap:16px;text-align:center}
.es-tourne{width:96px;height:96px;margin:0 auto;color:var(--navy)}
.es-rapport{border:1px solid var(--line);border-radius:12px;overflow:hidden;font-size:14.5px}
.es-rapport div{display:flex;justify-content:space-between;gap:12px;padding:9px 12px;border-top:1px solid var(--line)}
.es-rapport div:first-child{border-top:0}
.es-rapport span{color:var(--grey)}
.es-rapport b{text-align:right;color:var(--navy);word-break:break-word}
.es-rapport .alerte b{color:var(--nogo)}
.es-rapport .bon b{color:var(--go)}
.es-ok{color:var(--go);font-weight:700;text-align:center}

/* ---------- la scène, toujours en paysage ---------- */
.es-scene{display:none;position:fixed;z-index:5;top:0;left:0;width:100vw;height:100vh;height:100dvh;background:var(--night);color:#fff;box-sizing:border-box;
  padding:max(8px,env(safe-area-inset-top,0px)) max(10px,env(safe-area-inset-right,0px)) max(8px,env(safe-area-inset-bottom,0px)) max(10px,env(safe-area-inset-left,0px));
  grid-template-columns:minmax(0,1fr) var(--cote,0px);grid-template-rows:6px minmax(0,1fr);gap:8px 12px;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
body.scene .es-scene{display:grid}
body.scene{overflow:hidden}
/* téléphone tenu debout : la page couche la scène d'elle-même (quart de tour), la rotation verrouillée ne gêne pas */
body.couche .es-scene{left:100vw;width:100vh;width:100dvh;height:100vw;transform-origin:0 0;transform:rotate(90deg);
  padding:max(8px,env(safe-area-inset-left,0px)) max(10px,env(safe-area-inset-top,0px)) max(8px,env(safe-area-inset-right,0px)) max(10px,env(safe-area-inset-bottom,0px))}
.sc-temps{grid-column:1/-1;border-radius:3px;background:rgba(255,255,255,.14);overflow:hidden}
.sc-temps i{display:block;height:100%;width:0;background:var(--orange);border-radius:3px}
.sc-media{position:relative;min-width:0;min-height:0;display:flex;align-items:center;justify-content:center}
.sc-media video{max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain;background:#000;border-radius:10px}
.es-cadre{position:relative;display:inline-block;line-height:0;max-width:100%;max-height:100%}
.es-cadre img{display:block;max-width:100%;max-height:var(--mh,100vh);width:auto;height:auto;border-radius:10px;pointer-events:none;-webkit-user-drag:none}
.es-calque{position:absolute;inset:0;touch-action:none;cursor:crosshair}
.es-point{position:absolute;width:60px;height:60px;margin:-30px 0 0 -30px;border-radius:50%;border:4px solid #fff;box-shadow:0 0 0 3px var(--red),0 6px 16px rgba(0,0,0,.5);background:rgba(244,77,45,.22);pointer-events:none}
.es-point::after{content:"";position:absolute;left:50%;top:50%;width:8px;height:8px;margin:-4px;border-radius:50%;background:#fff;box-shadow:0 0 0 2px var(--red)}
.es-zone{position:absolute;border:3px dashed rgba(255,255,255,.85);border-radius:6px;pointer-events:none}
.es-zone.touchee{border-style:solid;border-color:var(--orange);background:rgba(247,149,79,.28)}
.es-toucher{position:absolute;inset:0;border:0;border-radius:10px;background:rgba(15,10,69,.82);color:#fff;font:800 20px var(--f);line-height:1.3;padding:20px}
.sc-cote{min-width:0;min-height:0;display:flex;flex-direction:column;gap:8px;justify-content:center}
.sc-cote h2{margin:0;font-size:17px;line-height:1.2;font-weight:800;color:#fff}
.sc-cote p{margin:0;font-size:13px;line-height:1.3;color:var(--lav)}
.sc-b{flex:1;min-height:0;max-height:84px;border:0;border-radius:12px;font:800 20px var(--f);color:#fff;background:rgba(255,255,255,.12);padding:0 8px;transition:transform .12s}
.sc-b:active{transform:scale(.96)}
.sc-b:disabled{opacity:.4}
/* les trois décisions : même taille, même ordre partout ; un mot et une forme en plus de la couleur */
.sc-b.go{background:var(--go)}.sc-b.nogo{background:var(--nogo)}.sc-b.stop{background:#0A0630;box-shadow:inset 0 0 0 3px var(--red)}
.sc-b.plein{background:var(--orange);color:var(--navy)}
.sc-b.petit{font-size:15px;flex:0 0 44px}
.sc-pictos{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:8px;flex:1;min-height:0}
.sc-pictos button{border:0;border-radius:12px;background:rgba(255,255,255,.1);color:#fff;font:700 11.5px/1.15 var(--f);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:4px 3px;min-height:0;min-width:0;overflow-wrap:anywhere;-webkit-hyphens:auto;hyphens:auto}
.sc-pictos button:active{transform:scale(.96);background:var(--orange);color:var(--navy)}
.sc-pictos svg{width:30px;height:30px;flex:none}
.sc-plein{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center}
.sc-compte{font-size:110px;font-weight:800;line-height:1;font-variant-numeric:tabular-nums}

/* téléphone réellement couché : on ne demande rien à personne. Si quelqu'un fait glisser la page, les barres du navigateur rentrent et l'image s'agrandit toute seule */
body.scene.paysage{overflow:auto;min-height:calc(100vh + 160px);min-height:calc(100lvh + 160px)}
body.barres .es-scene{touch-action:pan-y}

.es-txt{width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:10px;padding:10px;font:12px/1.4 ui-monospace,Menlo,monospace;color:var(--ink);background:var(--paper);-webkit-user-select:text;user-select:text}

/* ---------- Sur ordinateur : en large, à la souris ---------- */
body.es.ordi{background:var(--paper)}
body.ordi .es-top{background:var(--white);padding:14px 28px}
body.ordi .es-top img{width:104px}
body.ordi .es-top span{font-size:18px}
body.ordi .es-main{max-width:680px;margin:28px auto;padding:32px 36px;background:var(--white);border:1px solid var(--line);border-radius:22px;box-shadow:0 24px 60px rgba(21,14,92,.10);flex:none}
body.ordi #page{gap:18px}
body.ordi.es h1{font-size:30px}
body.ordi.es p{font-size:17px}
body.ordi .es-b,body.ordi .sc-b,body.ordi .sc-pictos button{cursor:pointer}
body.ordi .es-b:not(:disabled):hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(21,14,92,.18)}
body.ordi .es-centre{display:none}
body.ordi .es-rapport{font-size:15.5px}
body.ordi .es-scene{padding:22px max(28px,4vw) 28px;gap:18px 32px;grid-template-rows:8px minmax(0,1fr)}
body.ordi .sc-media video,body.ordi .es-cadre img{border-radius:16px;box-shadow:0 20px 60px rgba(0,0,0,.45)}
body.ordi .sc-cote{gap:14px}
body.ordi .sc-cote h2{font-size:30px;letter-spacing:-.01em}
body.ordi .sc-cote p{font-size:16px;line-height:1.4}
body.ordi .sc-b{flex:none;height:84px;max-height:none;font-size:26px;border-radius:16px}
body.ordi .sc-b:not(:disabled):hover{transform:translateY(-2px);filter:brightness(1.12)}
body.ordi .sc-pictos{flex:none;grid-auto-rows:132px;gap:12px}
body.ordi .sc-pictos button{font-size:15.5px;gap:10px;border-radius:16px;padding:8px}
body.ordi .sc-pictos button:hover{background:var(--orange);color:var(--navy)}
body.ordi .sc-pictos svg{width:40px;height:40px}
body.ordi .sc-plein p{font-size:20px}
body.ordi .sc-compte{font-size:180px}
body.ordi .es-point{width:52px;height:52px;margin:-26px 0 0 -26px}
body.ordi .sc-pictos button{font-size:14.5px;-webkit-hyphens:manual;hyphens:manual;overflow-wrap:normal}
body.ordi .sc-pictos{grid-auto-rows:120px}
