:root{
  box-sizing:border-box;
  color-scheme:dark;
  --page-ink:#FFFFFF;--page-soft:#B9B8D6;--hsk:#8A52F9;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){color-scheme:dark;--page-ink:#FFFFFF;--page-soft:#B9B8D6;}
}
:root[data-theme="dark"]{color-scheme:dark;--page-ink:#FFFFFF;--page-soft:#B9B8D6;}
*,*::before,*::after{box-sizing:inherit}
html,body{margin:0}
body{
  background:#1C1C38;color:var(--page-ink);
  font-family:"Inter",system-ui,-apple-system,"Segoe UI",sans-serif;
}

/* ===== La photo de l'appareil et ses zones actives ===== */
.stage{
  position:relative;aspect-ratio:1000/2010;container-type:inline-size;
  -webkit-user-select:none;user-select:none;
}
.stage img{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none;
  -webkit-mask-image:linear-gradient(to right,#0000,#000 5%,#000 95%,#0000),linear-gradient(to bottom,#0000,#000 3%,#000 97%,#0000);
  -webkit-mask-composite:source-in;
  mask-image:linear-gradient(to right,#0000,#000 5%,#000 95%,#0000),linear-gradient(to bottom,#0000,#000 3%,#000 97%,#0000);
  mask-composite:intersect}
.led,.hooktint,.mark,.ktint.recolor,.ktint.hsk{display:none}

/* afficheur : texte gris pose sur le grand panneau blanc */
.lcd{
  position:absolute;left:0;top:0;width:300px;height:154px;transform-origin:0 0;
  font-family:"VT323",ui-monospace,Menlo,Consolas,monospace;color:#6F6E76;
  padding:2px 6px 0 10px;display:flex;flex-direction:column;overflow:hidden;
  border-left:3px solid var(--accent,#0000);transition:border-color .25s;
  text-shadow:0 1px 0 #ffffffcc;mix-blend-mode:multiply;pointer-events:none;
}
.lcd .status{display:flex;justify-content:space-between;color:#A5A4AB;font-size:15px;margin-bottom:3px}
.lcd .status span,.lcd .typed{white-space:nowrap}
.lcd .msg{flex:1;min-height:0;overflow:hidden;font-size:18px;line-height:1.04;white-space:pre-line;overflow-wrap:break-word;text-transform:uppercase}
.lcd .typed{color:#A5A4AB;font-size:14px;min-height:1.1em;overflow:hidden}
.ticker{display:inline-block;padding-left:100%;white-space:nowrap;color:#8C8B92;animation:tick 26s linear 1 forwards}
@keyframes tick{to{transform:translateX(-100%)}}
.menu{display:grid;grid-template-columns:1fr 1fr;column-gap:3px;row-gap:3px;font-size:14.5px;white-space:normal}
.menu div{white-space:nowrap;overflow:hidden}
.menu i{font-style:normal;display:inline-block;width:1.15em;color:color-mix(in srgb,var(--c,#000) 78%,#000)}
.cursor::after{content:"_";animation:blink 1s steps(2) infinite}
@keyframes blink{50%{opacity:.3}}
.lcd canvas{max-width:100%;max-height:100%;width:auto;height:auto;margin:0 auto;display:block;image-rendering:pixelated;border:1px solid #BDBCC2;border-radius:3px}

/* touches : zones carrees posees sur les touches de la photo */
.key,.ktint,.home{
  position:absolute;width:21.4%;aspect-ratio:214/220;transform:translate(-50%,-50%);border-radius:2.2cqw;
}
.key,.home{
  appearance:none;border:0;background:none;padding:0;cursor:pointer;font-family:inherit;
  -webkit-tap-highlight-color:transparent;touch-action:manipulation;transition:background .08s;
}
.key b{display:none}
.key:active,.key.pressed,.home:active,.hook:active,.dial:active{background:radial-gradient(circle,#00000014 0 40%,#0000002e 100%)}
.ktint{pointer-events:none;background:#A886FF;mix-blend-mode:multiply;opacity:0;transition:opacity .12s}
.ktint.on{opacity:1}
.key.wave{animation:wave .5s ease}
@keyframes wave{40%{background:#8A52F94d;box-shadow:0 0 3cqw .6cqw #8A52F999}}
.klabel{
  position:absolute;transform:translate(-50%,-50%);white-space:nowrap;pointer-events:none;
  font-size:2.15cqw;letter-spacing:.05em;text-transform:uppercase;font-weight:600;color:#A6A5AB;
  text-shadow:0 .2cqw 0 #ffffffe6,0 -.1cqw .1cqw #0000001f;
}
.home{left:50.2%;top:40.89%}

/* les deux boutons ronds a point violet : decrocher (gauche) et raccrocher (droite) */
.hook,.dial{
  position:absolute;top:41.31%;width:18.8%;aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;
  appearance:none;border:0;background:none;padding:0;cursor:pointer;font-size:0;color:transparent;
  -webkit-tap-highlight-color:transparent;touch-action:manipulation;transition:background .08s;
}
.hook{left:27.97%}
.dial{left:72.72%}
.dial b{display:none}
.hook::after,.dial::after{
  content:"";position:absolute;left:50%;top:50%;width:24%;height:24%;transform:translate(-50%,-50%);border-radius:50%;
  box-shadow:0 0 2.6cqw 1cqw #A14DFFcc;opacity:0;transition:opacity .3s;pointer-events:none;
}
.stage:not(.offhook) .hook::after{animation:pulse 1.4s ease-in-out infinite}
.stage.offhook .dial::after{opacity:1}
/* son coupe : une barre orange traverse le pictogramme de la touche du milieu */
.stage.muted .home::after{content:"";position:absolute;left:24%;right:24%;top:50%;height:.7cqw;margin-top:-.35cqw;border-radius:1cqw;background:#F26B42;transform:rotate(-38deg);box-shadow:0 0 1.4cqw #F26B42b3}
/* points de couleur poses sur les points violets de la photo : vert a gauche tant qu'on n'a pas decroche, rouge a droite */
.dot{position:absolute;top:41.31%;width:4.9%;aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;pointer-events:none;transition:opacity .3s}
.dot-l{left:27.97%;background:#22C55E}
.dot-r{left:72.72%;background:#EF3B2D}
.stage.offhook .dot-l{opacity:0}
.hook::after{box-shadow:0 0 2.6cqw 1cqw #22C55Ecc}
.dial::after{box-shadow:0 0 2.6cqw 1cqw #EF3B2Dcc}
@keyframes pulse{0%,100%{opacity:.15}50%{opacity:1}}
.key:focus-visible,.home:focus-visible,.hook:focus-visible,.dial:focus-visible{outline:2px solid var(--hsk);outline-offset:-3px}

/* ===== Telephone HSK (maquette Figma du 30/11/2026) : ecran vert, touche d'appel, clavier ovale ===== */
/* fond : image du calque "HSK-Gradient" de la maquette Figma (02/12/2026), degrade CSS en secours pendant le chargement */
body{background:url("../assets/img/fond-degrade.webp") center top / cover no-repeat fixed,linear-gradient(180deg,#1d1326 0%,#1f152e 15%,#231c46 35%,#2c2667 55%,#42398a 75%,#514590 85%,#6b5090 100%) fixed #1d1326}
/* proportions de assets/img/telephone.webp (1000 x 2279) : a changer avec l'image */
.stage{aspect-ratio:1000/2279}
.stage img{-webkit-mask-image:none;mask-image:none;filter:drop-shadow(3.96cqw 0 6.6cqw #00000040)} /* Figma : 15px 0 25px rgba(0,0,0,.25) pour 379 px de large */
.lcd{width:300px;height:210px;color:#1B2B1A;text-shadow:none;mix-blend-mode:multiply;border-left:0;padding:5px 8px 2px}
.lcd .status,.lcd .typed{color:#3C573A}
.ticker{color:#2C432A}
.menu i{color:#1B2B1A;font-weight:700}
.lcd canvas{border-color:#3C573A}
/* touches : ovales mesures sur l'image (17 a 18,6 % de large, 4,6 % de haut) */
.key{width:18%;aspect-ratio:18/10.6;border-radius:50%}
/* surbrillance : calque decoupe a la forme exacte de chaque touche (masque tire de l'image, meme proportions 1000 x 2279) */
.ktint{width:20%;aspect-ratio:220/140;border-radius:0;
  -webkit-mask-image:url("../assets/img/touches-masque.png");mask-image:url("../assets/img/touches-masque.png");
  -webkit-mask-size:100cqw 227.9cqw;mask-size:100cqw 227.9cqw;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}
.klabel,.dot,.ktint.recolor,.ktint.hsk{display:none}
/* pendant le Snake, les touches 2, 4, 6 et 8 s'eclairent en bleu, comme le voyant de la grande touche */
.ktint{background:#6FE0FF;mix-blend-mode:multiply;opacity:0;transition:opacity .1s}
.ktint.on{opacity:.8}
.ktint.press{opacity:.85;background:#A9A8C4}
.key:active,.key.pressed{background:none}
/* touche d'appel (decrocher / raccrocher) et touche "=" (menu) */
.hook{left:50.2%;top:53%;width:37%;aspect-ratio:auto;height:6.2%;border-radius:50%}
.dial{left:25.6%;top:57.7%;width:17.2%;aspect-ratio:auto;height:6.6%;border-radius:30%}
.nav{position:absolute;transform:translate(-50%,-50%);appearance:none;border:0;background:none;padding:0;cursor:pointer;border-radius:40%;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
/* fleches : "<-" morceau precedent, "->" (en haut a droite) morceau suivant */
.navup{left:63.4%;top:60.7%;width:14.5%;height:6.4%}
.navdown{left:75.9%;top:57.5%;width:14.2%;height:6.6%}
.nav:active{background:none}
.nav:focus-visible{outline:2px solid #fff;outline-offset:-2px}
.hook:active,.dial:active{background:none}
.hook::after{left:50%;top:50%;width:88%;height:78%;border-radius:50%;box-shadow:0 0 2.4cqw .6cqw #35D0FFb3}
.stage.offhook .hook::after{animation:none;opacity:.9}
.dial::after{display:none}
/* zones tactiles : au moins 44 px, meme quand le telephone est affiche en petit */
.key::before,.nav::before,.hook::before,.dial::before{content:"";position:absolute;left:50%;top:50%;width:max(100%,44px);height:max(100%,44px);transform:translate(-50%,-50%)}
@media (prefers-reduced-motion:reduce){.cursor::after,.ticker{animation:none}.key.wave{animation:none}.stage:not(.offhook) .hook::after{animation:none;opacity:1}}
