/* Labo, l'appli (10 nov. 2026). Verre façon Apple : barre du haut et barre d'onglets translucides qui flottent au-dessus du
   contenu, feuille de bienvenue, cartes. Ressorts amortis (pas de rebond) pour l'interface, rebond seulement pour le jeton.
   Mouvement réduit : fondus courts. Transparence réduite : surfaces pleines. */
:root{
  --glass:rgba(28,28,32,.62);
  --glass-hi:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.02) 40%, rgba(255,255,255,0) 64%, rgba(255,255,255,.03));
  --glass-edge:inset 0 1px 0 rgba(255,255,255,.28), inset 0 -1px 0 rgba(255,255,255,.05), inset 0 0 0 1px rgba(255,255,255,.07);
  --glass-shadow:0 1px 2px rgba(0,0,0,.35), 0 24px 48px -16px rgba(0,0,0,.85);
  --spring:cubic-bezier(.23,1,.32,1);
  --top-h:calc(env(safe-area-inset-top) + 56px);
  --tabs-h:calc(env(safe-area-inset-bottom) + 84px);
}
html{ scroll-padding-top:calc(var(--top-h) + 60px); }
body{ min-height:100dvh; overscroll-behavior-y:none; }
.glass{ background:var(--glass-hi), var(--glass); -webkit-backdrop-filter:blur(26px) saturate(180%); backdrop-filter:blur(26px) saturate(180%); box-shadow:var(--glass-edge), var(--glass-shadow); }

/* ---------- écran de lancement : le mot s'allume, le jeton tombe sur la règle et s'écrase ---------- */
.boot{ position:fixed; inset:0; z-index:100; display:grid; place-items:center; background:#0A0A0A;
  background-image:linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size:28px 28px;
  transition:opacity .45s ease, visibility 0s linear .45s; }
.boot.is-gone{ opacity:0; visibility:hidden; pointer-events:none; }
.boot__in{ display:grid; justify-items:center; gap:6px; transform:translateY(-4vh); }
.boot__word{ margin:0; font-size:clamp(84px, 26vw, 168px); line-height:.9; font-weight:600; letter-spacing:-.06em; color:#FAFAFA;
  animation:boot-word .7s var(--spring) both; }
@keyframes boot-word{ from{ opacity:0; transform:translateY(14px); filter:blur(8px); } }
.boot__axis{ width:min(320px, 76vw); height:auto; overflow:visible; }
.boot__axis line, .boot__ticks line{ stroke:#FAFAFA; stroke-linecap:round; }
.boot__axis > line{ stroke-width:3; stroke-dasharray:310; stroke-dashoffset:310; animation:boot-line .6s var(--spring) .15s forwards; }
@keyframes boot-line{ to{ stroke-dashoffset:0; } }
.boot__ticks line{ opacity:0; animation:boot-tick .3s ease forwards; animation-delay:calc(.3s + var(--k) * 22ms); }
@keyframes boot-tick{ to{ opacity:var(--o, 1); } }
.boot__tok{ fill:#FAFAFA; transform-box:fill-box; transform-origin:50% 100%; animation:boot-drop .62s cubic-bezier(.3,1.35,.5,1) .55s both; }
@keyframes boot-drop{ 0%{ opacity:0; transform:translateY(-70px) scale(.9); } 55%{ opacity:1; transform:translateY(0) scale(1.18, .8); } 75%{ transform:translateY(-6px) scale(.96, 1.05); } 100%{ transform:none; } }
.boot__hi{ min-height:22px; margin:14px 0 0; font:400 13px/1.5 "Geist Mono", ui-monospace, monospace; letter-spacing:.02em; color:#8A8A8A; opacity:0; animation:boot-hi .4s ease .95s forwards; }
.boot__hi b{ color:#FAFAFA; font-weight:500; }
@keyframes boot-hi{ to{ opacity:1; } }

/* ---------- barre du haut ---------- */
.appbar{ position:fixed; z-index:20; top:0; left:0; right:0; height:var(--top-h); padding-top:env(safe-area-inset-top);
  background:linear-gradient(180deg, rgba(10,10,10,.9), rgba(10,10,10,.55) 70%, rgba(10,10,10,0)); pointer-events:none;
  transition:transform .4s var(--spring); }
.appbar__in{ display:flex; align-items:center; justify-content:space-between; gap:12px; max-width:1480px; height:56px; margin:0 auto; padding:0 max(16px, env(safe-area-inset-right)) 0 var(--gut); }
.appbar__in > *{ pointer-events:auto; }
.appbar__mark{ display:inline-flex; align-items:center; gap:9px; height:44px; text-decoration:none; font-weight:600; font-size:20px; letter-spacing:-.04em;
  opacity:0; transform:translateY(-4px); transition:opacity .25s ease, transform .35s var(--spring); }
.appbar__mark img{ border-radius:8px; }
body.is-scrolled .appbar__mark, body[data-view="scores"] .appbar__mark, body[data-view="profil"] .appbar__mark{ opacity:1; transform:none; }
.me{ display:inline-flex; align-items:center; gap:8px; height:40px; padding:0 14px 0 4px; border:0; border-radius:999px; cursor:pointer; color:var(--fg);
  font-size:14px; font-weight:500; letter-spacing:-.01em;
  background:var(--glass-hi), var(--glass); -webkit-backdrop-filter:blur(26px) saturate(180%); backdrop-filter:blur(26px) saturate(180%); box-shadow:var(--glass-edge), 0 10px 24px -14px rgba(0,0,0,.8);
  transition:transform .12s var(--spring); }
.me:active{ transform:scale(.95); }
.me__av{ display:grid; place-items:center; width:32px; height:32px; flex:none; border-radius:50%; background:var(--pc, #FAFAFA); color:#0A0A0A; font-size:14px; font-weight:650; letter-spacing:0; }
.me__av--lg{ width:72px; height:72px; font-size:30px; }
.me__n{ max-width:16ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---------- vues ---------- */
.hub{ padding-top:calc(var(--top-h) + 8px); padding-bottom:calc(var(--tabs-h) + 32px); }
.view[hidden]{ display:none; }
.view.is-enter{ animation:view-in .42s var(--spring) both; }
@keyframes view-in{ from{ opacity:0; transform:translateY(10px); } }
.bar{ top:var(--top-h); }
.vhead{ padding:8px 0 18px; }
.vhead__t{ margin:0; font-size:clamp(56px, 16vw, 104px); line-height:.86; font-weight:600; letter-spacing:-.05em; }
.vhead__s{ margin:12px 0 0; color:var(--fg-2); font-size:15px; }
.vh2{ margin:30px 0 10px; font-size:13px; font-weight:500; letter-spacing:.02em; color:var(--fg-3); font-family:"Geist Mono", ui-monospace, monospace; text-transform:uppercase; }

/* stats du haut */
.stats{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px; }
.stat{ padding:14px 14px 12px; border-radius:20px; background:var(--raised); box-shadow:inset 0 0 0 1px var(--line); }
.stat b{ display:block; font-size:30px; font-weight:560; letter-spacing:-.04em; line-height:1.05; font-variant-numeric:tabular-nums; }
.stat span{ display:block; margin-top:4px; font-size:12px; color:var(--fg-3); font-family:"Geist Mono", ui-monospace, monospace; letter-spacing:.02em; }

/* listes */
.rows{ list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.row{ display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:12px; min-height:64px; padding:10px 14px 10px 10px;
  border-radius:18px; background:var(--raised); box-shadow:inset 0 0 0 1px var(--line); color:inherit; text-decoration:none;
  transition:transform .12s var(--spring), background-color .2s ease; }
a.row:active{ transform:scale(.98); }
@media (hover:hover) and (pointer:fine){ a.row:hover{ background:var(--raised-2); } }
.row__dot{ width:44px; height:44px; border-radius:14px; background:color-mix(in oklab, var(--c, #FAFAFA) 22%, #131313); box-shadow:inset 0 0 0 1px color-mix(in oklab, var(--c, #FAFAFA) 40%, transparent);
  display:grid; place-items:center; color:var(--c); font:600 13px/1 "Geist Mono", ui-monospace, monospace; }
.row__t{ min-width:0; }
.row__n{ display:block; font-size:16px; font-weight:560; letter-spacing:-.02em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.row__m{ display:block; margin-top:2px; font-size:12.5px; color:var(--fg-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.row__v{ text-align:right; font-variant-numeric:tabular-nums; }
.row__v b{ display:block; font-size:20px; font-weight:560; letter-spacing:-.03em; }
.row__v small{ font-size:12px; color:var(--fg-3); }
.row__bar{ grid-column:2 / 4; height:3px; margin-top:-2px; border-radius:2px; background:var(--line); overflow:hidden; }
.row__bar i{ display:block; height:100%; width:var(--p, 0%); background:var(--c, #FAFAFA); border-radius:inherit; }
.rows--hist .row{ min-height:52px; grid-template-columns:10px minmax(0,1fr) auto; padding:8px 14px; }
.rows--hist .row__dot{ width:8px; height:8px; border-radius:50%; background:var(--c); box-shadow:none; }
.rec{ display:inline-block; margin-left:6px; padding:1px 7px; border-radius:999px; font-size:11px; font-weight:600; color:#0A0A0A; background:#FAFAFA; vertical-align:2px; }

/* record sur la tuile du jeu */
.t__rec{ display:inline-flex; align-items:center; gap:6px; margin:6px 8px 0; font:400 12px/1.3 "Geist Mono", ui-monospace, monospace; letter-spacing:.01em;
  color:var(--fg-3); font-variant-numeric:tabular-nums; }
.t__rec b{ color:var(--fg); font-weight:500; }
.t__rec::before{ content:""; width:6px; height:6px; flex:none; border-radius:50%; background:var(--c); }

/* profil */
.card{ margin-top:12px; border-radius:24px; background:var(--raised); box-shadow:inset 0 0 0 1px var(--line); }
.me-card{ display:grid; justify-items:center; gap:16px; padding:24px 18px 20px; }
.field{ display:grid; gap:6px; width:100%; max-width:420px; }
.field__l{ font-size:12px; color:var(--fg-3); font-family:"Geist Mono", ui-monospace, monospace; letter-spacing:.02em; }
.field input{ height:52px; padding:0 16px; border:0; border-radius:14px; background:#0A0A0A; color:var(--fg); font:500 17px/1 Geist, sans-serif; letter-spacing:-.01em;
  box-shadow:inset 0 0 0 1px var(--line-2); outline:none; transition:box-shadow .2s ease; }
.field input:focus{ box-shadow:inset 0 0 0 2px var(--fg); }
.swatches{ display:flex; flex-wrap:wrap; justify-content:center; gap:10px; }
.sw{ width:34px; height:34px; border-radius:50%; border:0; cursor:pointer; background:var(--c); box-shadow:inset 0 0 0 1px rgba(255,255,255,.15); transition:transform .15s var(--spring); }
.sw[aria-checked="true"]{ box-shadow:0 0 0 2px #0A0A0A, 0 0 0 4px #FAFAFA; }
.sw:active{ transform:scale(.9); }
.list{ overflow:hidden; }
.li{ display:flex; flex-direction:column; align-items:flex-start; gap:2px; width:100%; min-height:60px; padding:12px 18px; border:0; background:none; text-align:left; cursor:pointer;
  color:var(--fg); text-decoration:none; font-size:16px; font-weight:500; letter-spacing:-.01em; }
.li + .li{ box-shadow:inset 0 1px 0 var(--line); }
.li:active{ background:var(--raised-2); }
.li__s{ font-size:13px; font-weight:400; color:var(--fg-3); }
.li--danger{ color:#FF6961; }
.about{ padding:18px; }
.spec--block{ display:grid; gap:6px; margin:0 0 14px; }
.about__t{ margin:0; color:var(--fg-2); font-size:15px; line-height:1.5; }
.install-help{ margin:14px 2px 0; color:var(--fg-2); font-size:14px; line-height:1.5; }

/* ---------- barre d'onglets en verre ---------- */
.tabs{ position:fixed; z-index:30; left:50%; bottom:calc(env(safe-area-inset-bottom) + 14px); display:grid; grid-template-columns:repeat(3, 1fr);
  width:min(340px, calc(100vw - 32px)); height:64px; padding:6px; border-radius:999px; transform:translateX(-50%);
  background:var(--glass-hi), var(--glass); -webkit-backdrop-filter:blur(26px) saturate(180%); backdrop-filter:blur(26px) saturate(180%); box-shadow:var(--glass-edge), var(--glass-shadow); }
.tabs__pill{ position:absolute; top:6px; bottom:6px; left:6px; width:calc((100% - 12px) / 3); border-radius:999px; background:rgba(255,255,255,.14);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22); transform:translateX(calc(var(--i, 0) * 100%)); transition:transform .45s cubic-bezier(.3,1.25,.5,1); }
.tab{ position:relative; z-index:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; border-radius:999px; text-decoration:none;
  color:var(--fg-2); font-size:11.5px; font-weight:560; letter-spacing:0; -webkit-tap-highlight-color:transparent; transition:color .2s ease, transform .12s var(--spring); }
.tab svg{ width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.tab[aria-current="page"]{ color:var(--fg); }
.tab[aria-current="page"] svg rect, .tab[aria-current="page"] svg circle{ fill:currentColor; fill-opacity:.18; }
.tab:active{ transform:scale(.92); }
.tab:focus-visible{ outline:2px solid var(--fg); outline-offset:-4px; }

/* ---------- feuille de bienvenue ---------- */
.sheet{ width:min(460px, 100vw); max-width:100vw; margin:auto auto 0; padding:10px 22px calc(env(safe-area-inset-bottom) + 22px); border:0; border-radius:30px 30px 0 0; color:var(--fg);
  background:var(--glass-hi), rgba(26,26,30,.82); -webkit-backdrop-filter:blur(30px) saturate(180%); backdrop-filter:blur(30px) saturate(180%); box-shadow:var(--glass-edge), 0 -20px 60px -20px rgba(0,0,0,.9); }
.sheet::backdrop{ background:rgba(0,0,0,.5); }
.sheet[open]{ animation:sheet-in .5s cubic-bezier(.32,.72,0,1) both; }
@keyframes sheet-in{ from{ transform:translateY(100%); } }
.sheet__grab{ display:block; width:38px; height:5px; margin:0 auto 18px; border-radius:3px; background:rgba(255,255,255,.25); }
.sheet__k{ margin:0; font:400 13px/1.4 "Geist Mono", ui-monospace, monospace; color:var(--fg-3); letter-spacing:.02em; }
.sheet__t{ margin:0; font-size:72px; line-height:.9; font-weight:600; letter-spacing:-.06em; }
.sheet__p{ margin:12px 0 18px; color:var(--fg-2); font-size:15px; line-height:1.5; }
.sheet form{ display:grid; gap:10px; }
.sheet .field{ max-width:none; }
.btn{ height:54px; border:0; border-radius:999px; font:600 17px/1 Geist, sans-serif; letter-spacing:-.01em; cursor:pointer; transition:transform .12s var(--spring); }
.btn:active{ transform:scale(.97); }
.btn--white{ color:#0A0A0A; background:radial-gradient(140% 170% at 50% 0%, #FFFFFF 42%, #E8E8ED 100%); box-shadow:inset 0 1px 0 #fff, 0 10px 24px -12px rgba(0,0,0,.8); }
.btn--ghost{ color:var(--fg-2); background:transparent; }

/* ---------- ordinateur et tablette ---------- */
@media (min-width:768px){
  .stats{ grid-template-columns:repeat(4, minmax(0,1fr)); }
  .rows{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .sheet{ margin:auto; border-radius:30px; padding-bottom:24px; }
  .sheet[open]{ animation:sheet-pop .45s var(--spring) both; }
  @keyframes sheet-pop{ from{ opacity:0; transform:translateY(16px) scale(.97); } }
  #vProfil > *{ max-width:620px; }
}
@media (min-width:1024px){
  .tabs{ width:300px; height:56px; }
  .tab{ flex-direction:row; gap:8px; font-size:13.5px; }
  .tab svg{ width:20px; height:20px; }
}

/* ---------- accessibilité ---------- */
@media (prefers-reduced-motion:reduce){
  .boot *, .view.is-enter, .sheet[open]{ animation:none !important; }
  .boot__axis > line{ stroke-dashoffset:0; } .boot__ticks line{ opacity:var(--o, 1); } .boot__hi{ opacity:1; }
  .tabs__pill{ transition:none; }
}
@media (prefers-reduced-transparency:reduce){
  .tabs, .me, .sheet{ background:#1C1C1F; -webkit-backdrop-filter:none; backdrop-filter:none; }
}

/* ---------- 10 nov. 2026 (retour de Hugues) : comme un écran de choix d'applis ----------
   En-tête compact (les jeux apparaissent dès le premier écran), sous-titre d'une ligne, et sur chaque tuile la pastille
   « play » en bas, comme le bouton d'une boutique d'applis. La fiche technique passe dans le Profil sur téléphone. */
.top{ padding-bottom:10px; }
.mark{ font-size:clamp(44px, 13vw, 88px); }
.count b{ font-size:24px; }
.lead{ margin-top:6px; font-size:14px; }
@media (max-width:767px){ .top .spec{ display:none; } .sec{ padding-top:20px; } .sec__h{ font-size:24px; margin-bottom:10px; } }
.t__a{ padding-bottom:10px; }
.t__blurb{ display:-webkit-box; -webkit-line-clamp:1; padding-top:2px; font-size:12.5px; }
.t__foot{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:auto; padding:10px 6px 0 8px; }
.t__play{ display:inline-flex; align-items:center; gap:5px; height:30px; padding:0 13px 0 10px; border-radius:999px; margin-left:auto;
  font:650 13px/1 Geist, sans-serif; letter-spacing:.01em; text-transform:uppercase; color:#0A0A0A;
  background:radial-gradient(140% 170% at 50% 0%, #FFFFFF 42%, #E8E8ED 100%); box-shadow:inset 0 1px 0 #fff, 0 6px 14px -8px rgba(0,0,0,.8);
  transition:transform .14s var(--spring); }
.t__play svg{ width:12px; height:12px; fill:#0A0A0A; }
.t:has(.t__a:active) .t__play{ transform:scale(.94); }
@media (hover:hover) and (pointer:fine){ .t:hover .t__play{ background:var(--c); box-shadow:0 6px 18px -8px var(--c); } }
.t__rec{ margin:0; }
.t__foot .t__rec{ order:-1; }
.t.is-wip .t__foot{ display:none; }
@media (min-width:640px){ .t__blurb{ -webkit-line-clamp:2; } }
.t__foot{ flex-wrap:wrap; row-gap:8px; }
.t__foot .t__rec{ flex-basis:100%; }
/* la barre du haut devient un verre plein quand on défile : rien ne transparaît derrière le logo */
body.is-scrolled .appbar{ background:rgba(10,10,10,.78); -webkit-backdrop-filter:blur(22px) saturate(180%); backdrop-filter:blur(22px) saturate(180%); }
