/* Jeux du jour (sous-projet 7) — page des jeux, carte d'accueil, rond de l'onglet. */

/* rond orange de l'onglet : il reste un jeu à jouer aujourd'hui */
.t-nav-item .t-rond--nav{position:absolute;top:6px;right:12px}
/* En haut, le point suit le texte (relative : son reflet clignotant reste dans le point, pas dans tout l'onglet). */
.t-nav--haut .t-nav-item .t-rond--nav{position:relative;top:auto;right:auto;margin-left:2px}

/* rangée « Jeux du jour » de l'accueil : une petite touche pastel par jeu */
.t-jeux-hote:empty{display:none}
.t-rail-jeux{grid-auto-columns:clamp(128px,38vw,160px)}
.t-jeu-mini{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:12px 12px 16px;color:var(--encre);text-decoration:none}
.t-jeu-mini .t-logo-jeu{width:44px;height:44px;border-radius:12px;margin-bottom:4px}
.t-jeu-mini-nom{font:900 .98rem/1.1 var(--f-texte);letter-spacing:-.03em;text-wrap:balance}
.t-jeu-mini-etat{font:400 .7rem var(--f-pixel);color:var(--encre-2)}
.t-jeu-mini--fait .t-jeu-mini-etat{color:var(--encre)}

/* logos : même carré arrondi pour tous, le relief d'une touche */
.t-logo-jeu{display:block;flex:none;width:56px;height:56px;border-radius:14px;box-shadow:0 3px 0 rgba(0,0,0,.22)}

/* pastels : une teinte par jeu (claire en thème clair, profonde en thème sombre) */
.t-jeu-p-plusmoins{--pj:#c9eef6}.t-jeu-p-casting{--pj:#ffd3d3}.t-jeu-p-taquin{--pj:#f3e6c4}
.t-jeu-p-titre{--pj:#e1f4b5}.t-jeu-p-ordre{--pj:#e6d9fb}.t-jeu-p-grille{--pj:#d4e4e2}
:root[data-theme="sombre"] .t-jeu-p-plusmoins{--pj:#173d46}:root[data-theme="sombre"] .t-jeu-p-casting{--pj:#4d2323}
:root[data-theme="sombre"] .t-jeu-p-taquin{--pj:#463c22}:root[data-theme="sombre"] .t-jeu-p-titre{--pj:#334416}
:root[data-theme="sombre"] .t-jeu-p-ordre{--pj:#392a58}:root[data-theme="sombre"] .t-jeu-p-grille{--pj:#26403d}
.t-touche.t-jeu-p-plusmoins,.t-touche.t-jeu-p-casting,.t-touche.t-jeu-p-taquin,.t-touche.t-jeu-p-titre,.t-touche.t-jeu-p-ordre,.t-touche.t-jeu-p-grille{background:var(--pj)}

/* page « Jeux du jour » */
.t-serie{font:800 1.05rem var(--f-texte);margin:0 0 20px}
.t-jeux-liste{list-style:none;margin:0;padding:0;display:grid;gap:18px;max-width:760px}
.t-jeu{position:relative;display:grid;grid-template-columns:auto 1fr;gap:14px 14px;align-items:start;padding:16px 16px 20px;color:var(--encre)}
.t-jeu-corps{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}
.t-jeu-lien{color:inherit;text-decoration:none}
/* Lien étiré : toute la bulle ouvre le jeu ; les classements, posés par-dessus, gardent leur propre clic. */
.t-jeu-lien::after{content:"";position:absolute;inset:0;border-radius:var(--r-touche)}
.t-jeu-lien:focus-visible{outline:none}
.t-jeu-lien:focus-visible::after{outline:3px solid var(--bleu-vif);outline-offset:3px}
.t-jeu-nom{font:900 1.35rem var(--f-texte);letter-spacing:-.035em}
.t-jeu-aide{font:500 .95rem var(--f-texte);color:var(--encre-2)}
.t-jeu-bas{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 14px}
.t-jeu-aller{font:800 .95rem var(--f-texte);white-space:nowrap}
.t-jeu-clas{position:relative;z-index:1;display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:9px 16px 10px;border-radius:var(--r-pastille);
  background:rgba(255,255,255,.62);color:var(--encre);font:800 .88rem var(--f-texte);text-decoration:none;
  box-shadow:inset 0 -3px 0 rgba(0,0,0,.1);transition:transform var(--duree-appui) ease,box-shadow var(--duree-appui) ease}
.t-jeu-clas svg{width:18px;height:18px}
.t-jeu-clas:active{transform:translateY(2px);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1)}
.t-jeu-clas:focus-visible{outline:3px solid var(--bleu-vif);outline-offset:2px}
:root[data-theme="sombre"] .t-jeu-clas{background:rgba(255,255,255,.12)}
@media (prefers-reduced-motion:reduce){.t-jeu-clas{transition:none}}
.t-attente-jeu{height:130px;border-radius:var(--r-touche);background:var(--creux);animation:t-pulse 1.4s ease-in-out infinite;max-width:760px}
@media (prefers-reduced-motion:reduce){.t-attente-jeu{animation:none}}

/* Devine l'image */
.t-jeu-page{max-width:760px}
.t-jeu-tete{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 10px}
.t-jeu-etape{font:400 .78rem var(--f-pixel);color:var(--encre-2);margin:0}
/* Chiffres de largeur fixe : le chrono ne saute pas d'une seconde à l'autre. */
.t-jeu-chrono{font:400 .95rem var(--f-mono);font-variant-numeric:tabular-nums;margin:0;padding:3px 9px 5px;border-radius:9px;background:var(--noir);color:var(--encre-inv)}
/* Relief posé à l'extérieur : un inset serait masqué par l'image. */
.t-jeu-cadre{position:relative;aspect-ratio:16/9;overflow:hidden;border-radius:var(--r-touche);background:var(--creux);margin:0 0 26px;
  box-shadow:0 5px 0 var(--touche-bord),0 7px 0 var(--touche-ombre)}
.t-jeu-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transform:scale(var(--zoom,1));transform-origin:var(--ox,50%) var(--oy,50%)}
.t-jeu-pixel{image-rendering:pixelated}
.t-jeu-msg{font:700 .98rem var(--f-texte);margin:0 0 14px}
.t-jeu-sous{font:400 .75rem var(--f-pixel);color:var(--encre-2);margin:0 0 8px}
.t-jeu-essais{list-style:none;margin:0 0 18px;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.t-jeu-essai{font:700 .92rem var(--f-texte);text-decoration:line-through;padding:6px 10px;border-radius:10px;background:var(--creux);color:var(--encre-2)}
.t-jeu-form{display:grid;gap:12px}
.t-jeu-form .t-champ{margin:0}
.t-jeu-liste{list-style:none;margin:0;padding:6px;border-radius:14px;background:var(--touche);display:grid;gap:2px;max-height:280px;overflow:auto;
  box-shadow:inset 0 -4px 0 var(--touche-bord),0 2px 0 var(--touche-ombre)}
.t-jeu-opt{display:flex;justify-content:space-between;gap:10px;padding:11px 12px;min-height:44px;align-items:center;border-radius:10px;cursor:pointer;font:700 1rem var(--f-texte)}
.t-jeu-opt small{font:400 .8rem var(--f-mono);opacity:.7}
.t-jeu-opt:hover,.t-jeu-opt[aria-selected="true"]{background:var(--jaune);color:var(--noir)}
.t-jeu-aucun{padding:12px;color:var(--encre-2);font:600 .95rem var(--f-texte)}
.t-jeu-fin{display:flex;gap:18px;align-items:flex-start}
.t-jeu-fin-t{display:grid;gap:14px;min-width:0}
.t-jeu-aff{flex:0 0 96px;width:96px;aspect-ratio:2/3;object-fit:cover;border-radius:var(--r-petit);background:var(--creux)}
@media (max-width:519px){.t-jeu-fin{flex-direction:column}.t-jeu-aff{width:84px}}
.t-jeu-titre{font:900 clamp(1.4rem,5vw,2.1rem) var(--f-texte);letter-spacing:-.04em;line-height:1.05;margin:0;text-wrap:balance}
.t-jeu-titre:focus{outline:none}
.t-jeu-score{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0}
.t-jeu-rang{font:700 .98rem var(--f-texte)}

/* Classements */
.t-clas-tete{display:flex;align-items:center;gap:14px}
.t-clas-tete .t-logo-jeu{width:48px;height:48px;border-radius:12px}
.t-clas-onglets{margin:0 0 18px}
.t-clas{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.t-clas-l{display:flex;align-items:center;gap:12px;padding:10px 14px 13px;border-radius:var(--r-touche);background:var(--ami-t,var(--touche));
  box-shadow:inset 0 -4px 0 rgba(0,0,0,.1),0 2px 0 var(--touche-ombre)}
.t-clas-l--moi{outline:3px solid var(--lien);outline-offset:2px}
.t-clas-rang{font:400 1.1rem var(--f-pixel);min-width:2ch;text-align:center}
.t-clas-nom{font:800 1rem var(--f-texte);flex:1;min-width:0;overflow-wrap:anywhere}
.t-clas-nom small{font:500 .85rem var(--f-texte);color:var(--encre-2)}
.t-clas-val{font:400 .88rem var(--f-mono);text-align:right}
.t-clas-note,.t-clas-att{font:600 1rem var(--f-texte);color:var(--encre-2);margin:0}
.t-clas-att{margin-top:18px}

/* Plus ou moins */
.t-pm-consigne{font:900 clamp(1.4rem,5vw,2rem) var(--f-texte);letter-spacing:-.04em;line-height:1.05;margin:0 0 16px;text-wrap:balance}
.t-pm-consigne:focus{outline:none}
.t-pm-duel{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:0 0 16px;max-width:560px}
.t-pm-touche{display:flex;flex-direction:column;gap:8px;padding:8px 8px 14px;text-align:center;align-items:stretch}
.t-pm-aff,.t-pm-repli{display:block;width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:calc(var(--r-touche) - 8px);background:var(--creux)}
.t-pm-repli{display:grid;place-items:center;padding:10px;font:800 .95rem var(--f-texte);letter-spacing:-.02em}
.t-pm-titre{font:800 .95rem/1.15 var(--f-texte);letter-spacing:-.02em;overflow-wrap:anywhere}
.t-pm-valeur{font:400 .9rem var(--f-mono);font-weight:600}
.t-pm-touche[disabled]{cursor:default}
.t-pm-bonne,.t-pm-bonne[disabled]{background:var(--menthe);color:var(--noir)}
.t-pm-mauvaise,.t-pm-mauvaise[disabled]{background:var(--orange);color:var(--noir)}
.t-pm-neutre{opacity:.75}
.t-pm-verdict{font:900 1.2rem var(--f-texte);letter-spacing:-.03em;margin:0 0 12px}
.t-pm-bilan{list-style:none;margin:0 0 20px;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.t-pm-pastille{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;font:800 1.05rem var(--f-texte);color:var(--noir)}
.t-pm-ok{background:var(--menthe)}
.t-pm-ko{background:var(--orange)}
@media (max-width:359px){.t-pm-duel{gap:10px}.t-pm-titre{font-size:.85rem}}

/* Petits écrans : « 50 points · 20 s » passe sous le nom, qui garde de la place pour s'écrire en entier. */
@media (max-width:419px){
  .t-clas-l{flex-wrap:wrap;row-gap:2px}
  .t-clas-nom{flex:1 1 40%}
  .t-clas-val{flex:1 0 100%;text-align:left;padding-left:calc(2ch + 52px)}
}

/* Casting mystère : une fiche par indice, la dernière arrivée se pose en douceur */
.t-cs-indices{display:grid;gap:12px;margin:0 0 22px;max-width:560px}
.t-cs-groupe{list-style:none;margin:0;padding:12px 14px 16px;display:grid;gap:10px;border-radius:var(--r-touche);background:var(--touche);color:var(--encre);
  box-shadow:0 5px 0 var(--touche-bord),0 7px 0 var(--touche-ombre)}
.t-cs-item{display:grid;gap:2px}
.t-cs-etiquette{font:400 .72rem var(--f-pixel);color:var(--encre-2)}
.t-cs-texte{font:800 1.05rem var(--f-texte);letter-spacing:-.02em;overflow-wrap:anywhere}
.t-cs-texte small{font:400 .85rem var(--f-mono);font-weight:600;opacity:.75}
.t-cs-groupe--neuf{animation:t-cs-entree .25s cubic-bezier(.22,1,.36,1) both}
@keyframes t-cs-entree{from{opacity:0;transform:translateY(8px)}}
@media (prefers-reduced-motion:reduce){.t-cs-groupe--neuf{animation:none}}

/* Taquin d'affiche : tuiles absolues déplacées par transform (animables), image découpée par background-position */
.t-tq-zone{display:flex;flex-wrap:wrap;gap:18px;align-items:flex-start;margin:0 0 14px}
.t-tq-plateau{position:relative;width:min(100%,300px);aspect-ratio:2/3;border-radius:var(--r-touche);background:var(--creux);overflow:hidden;
  touch-action:manipulation;box-shadow:0 5px 0 var(--touche-bord),0 7px 0 var(--touche-ombre)}
.t-tq-tuile{position:absolute;left:0;top:0;width:33.3333%;height:33.3333%;padding:0;border:0;border-radius:6px;cursor:pointer;
  background-color:var(--creux);background-image:var(--aff);background-size:300% 300%;
  transform:translate(calc(var(--c,0)*100%),calc(var(--l,0)*100%));transition:transform .18s cubic-bezier(.22,1,.36,1);
  box-shadow:inset 0 0 0 2px rgba(0,0,0,.35)}
.t-tq-tuile:focus-visible{outline:3px solid var(--jaune);outline-offset:-3px;z-index:1}
.t-tq-num{position:absolute;left:5px;top:5px;min-width:20px;padding:1px 5px 3px;border-radius:6px;background:var(--noir);color:var(--encre-inv);font:400 .72rem var(--f-mono);line-height:1.2}
.t-tq-modele{margin:0;display:grid;gap:6px;width:96px}
.t-tq-modele img{display:block;width:96px;aspect-ratio:2/3;object-fit:cover;border-radius:var(--r-petit);background:var(--creux)}
.t-tq-modele figcaption{font:400 .72rem var(--f-pixel);color:var(--encre-2)}
.t-tq-coups{font:400 .95rem var(--f-mono);font-variant-numeric:tabular-nums;margin:0 0 12px}
/* Téléphone : le modèle passe au-dessus du plateau (en vignette, légende à côté) pour rester sous les yeux ; le plateau suit la hauteur de l'écran. */
@media (max-width:519px){
  .t-tq-zone{flex-direction:column;gap:12px}
  .t-tq-modele{order:-1;grid-template-columns:auto 1fr;align-items:center;gap:10px;width:auto}
  .t-tq-modele img{width:48px}
  .t-tq-plateau{width:min(100%,calc((100svh - 330px) * 2 / 3));min-width:200px}
}
@media (prefers-reduced-motion:reduce){.t-tq-tuile{transition:none}}

.t-clas-expl{margin:0 0 14px;font-size:.92rem}

/* Titre mystère : grille de lettres colorées (le texte de chaque case double la couleur), clavier à l'écran */
.t-ti-indice{font:700 1rem var(--f-texte);margin:0 0 6px;text-align:center}
.t-ti-grille{display:grid;gap:6px;margin:14px auto;max-width:420px}
.t-ti-ligne{display:flex;gap:14px;flex-wrap:nowrap;justify-content:center}
.t-ti-mot{display:flex;gap:4px;flex:1 1 auto;min-width:0;justify-content:center}
.t-ti-case{flex:1 1 0;min-width:0;max-width:44px;aspect-ratio:1/1;display:grid;place-items:center;border-radius:8px;background:var(--creux);
  font:800 clamp(.8rem,3.6vw,1.2rem) var(--f-texte);color:var(--encre);box-shadow:inset 0 0 0 2px transparent}
.t-ti-plein{box-shadow:inset 0 0 0 2px var(--encre)}
/* Mot refusé : secousse horizontale de la ligne (320 ms) et cases orange qui s'éteignent (500 ms) */
.t-ti-refus{animation:t-ti-secoue .32s cubic-bezier(.36,.07,.19,.97)}
.t-ti-refus .t-ti-case{animation:t-ti-orange .5s var(--ease-smooth-out)}
@keyframes t-ti-secoue{15%{transform:translateX(-8px)}35%{transform:translateX(7px)}55%{transform:translateX(-5px)}75%{transform:translateX(3px)}}
@keyframes t-ti-orange{0%,35%{background:var(--orange);color:var(--noir);box-shadow:inset 0 0 0 2px var(--noir)}}
@media (prefers-reduced-motion:reduce){.t-ti-refus{animation:none}}
.t-ti-c2{background:var(--menthe);color:var(--noir)}
.t-ti-c1{background:var(--jaune);color:var(--noir);box-shadow:inset 0 -4px 0 rgba(0,0,0,.25)}
.t-ti-c0{background:var(--encre-2);color:var(--encre-inv)}
.t-ti-clavier{display:grid;gap:6px;max-width:480px;margin:0 auto 12px}
.t-ti-rang{display:flex;gap:4px;justify-content:center}
.t-ti-touche{flex:1 1 0;min-width:0;height:48px;padding:0;border:0;border-radius:8px;background:var(--touche);color:var(--encre);
  font:800 .95rem var(--f-texte);cursor:pointer;box-shadow:0 3px 0 var(--touche-bord);transition:transform .1s ease-out,box-shadow .1s ease-out;
  touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}
.t-ti-touche:active{transform:translateY(2px);box-shadow:0 1px 0 var(--touche-bord)}
.t-ti-touche:focus-visible{outline:3px solid var(--jaune);outline-offset:2px}
.t-ti-large{flex:1.6 1 0;font-size:.75rem}
.t-ti-touche.t-ti-c2{background:var(--menthe);color:var(--noir)}
.t-ti-touche.t-ti-c1{background:var(--jaune);color:var(--noir)}
.t-ti-touche.t-ti-c0{background:var(--encre-2);color:var(--encre-inv)}
.t-ti-grille--fin{margin-top:0}
@media (prefers-reduced-motion:reduce){.t-ti-touche{transition:none}}

/* Dans l'ordre : cartes empilées, flèches pour monter / descendre et poignée pour glisser */
.t-or-liste{list-style:none;margin:0 0 14px;padding:0;display:grid;gap:10px;max-width:560px}
.t-or-carte{display:grid;grid-template-columns:44px auto 56px 1fr auto;gap:10px;align-items:center;padding:8px 10px 12px;border-radius:var(--r-touche);
  background:var(--touche);color:var(--encre);box-shadow:0 4px 0 var(--touche-bord),0 6px 0 var(--touche-ombre)}
.t-or-num{font:400 .8rem var(--f-pixel);color:var(--encre-2);min-width:1.2em;text-align:center}
.t-or-aff,.t-or-repli{display:block;width:56px;aspect-ratio:2/3;object-fit:cover;border-radius:var(--r-petit);background:var(--creux)}
.t-or-repli{display:grid;place-items:center;padding:4px;font:800 .7rem var(--f-texte);overflow:hidden}
.t-or-poignee{display:grid;place-items:center;width:44px;height:44px;margin:-8px 0 -8px -10px;border-radius:10px;font:800 1.5rem/1 var(--f-texte);color:var(--encre-2)}
.t-or-corps{display:grid;gap:2px;min-width:0}
.t-or-titre{font:800 1rem/1.15 var(--f-texte);letter-spacing:-.02em;overflow-wrap:anywhere}
.t-or-valeur{font:600 .9rem var(--f-mono)}
.t-or-fleches{display:grid;gap:6px}
.t-or-fleche{touch-action:manipulation;-webkit-tap-highlight-color:transparent;width:44px;height:44px;border:0;border-radius:10px;background:var(--creux);color:var(--encre);font:800 1rem var(--f-texte);cursor:pointer}
.t-or-fleche:disabled{opacity:.35;cursor:default}
.t-or-fleche:focus-visible{outline:3px solid var(--jaune);outline-offset:2px}
.t-or-bonne{background:var(--menthe);color:var(--noir)}
.t-or-mauvaise{background:var(--orange);color:var(--noir)}
@media (max-width:359px){.t-or-carte{grid-template-columns:44px auto 44px 1fr auto;gap:6px}.t-or-aff,.t-or-repli{width:44px}}

/* Grille de films : grille 4 × 4 en cinq plaques (une par zone, d'un seul tenant), des touches de clavier posées dessus.
   Une plaque est pâle tant que sa zone n'est pas validée, puis s'allume à la couleur vive de sa zone. La couleur ne dit rien du film,
   seulement où il se range : bleu, orange, vert, violet fluo, et le jaune fluo pour la plus grande zone (4 cases). */
#jeugrille{--p0:#c9d6ff;--v0:#0231c9;--s0:#fff;--p1:#ffd2bf;--v1:#ff4d00;--s1:#0b0b0c;--p2:#c8f5de;--v2:#16d97c;--s2:#0b0b0c;
  --p3:#f1cffd;--v3:#d52bff;--s3:#0b0b0c;--p4:#f7ffa6;--v4:#edff00;--s4:#0b0b0c}
.t-gr-grille{display:grid;grid-template-columns:repeat(4,1fr);max-width:480px;margin:0 auto 18px}
:root[data-theme="sombre"] #jeugrille{--p0:#1c2a5e;--p1:#4d2a1a;--p2:#17432f;--p3:#47235a;--p4:#47491a}
.t-gr-z0{--pale:var(--p0);--vif:var(--v0);--sur:var(--s0)}.t-gr-z1{--pale:var(--p1);--vif:var(--v1);--sur:var(--s1)}
.t-gr-z2{--pale:var(--p2);--vif:var(--v2);--sur:var(--s2)}.t-gr-z3{--pale:var(--p3);--vif:var(--v3);--sur:var(--s3)}
.t-gr-z4{--pale:var(--p4);--vif:var(--v4);--sur:var(--s4)}
/* Un seul contexte d'empilement pour toute la grille : les plaques (z-index 0, en premier) dessous, les cases par-dessus dans l'ordre
   du document, SANS z-index propre. Ainsi le z-index d'une tuile (tenue 5, en train de glisser après l'échange 3, choisie 2) la place
   au-dessus de toutes les autres tuiles, au lieu de rester enfermé dans sa case (la tuile tenue passait derrière ses voisines). */
.t-gr-grille{position:relative;isolation:isolate}
.t-gr-case{position:relative;padding:4px}
#jeugrille .t-pm-consigne{margin-bottom:6px}
#jeugrille .t-clas-note{font-size:.84rem;line-height:1.35;margin:0 0 12px}
.t-gr-bh{padding-top:8px}.t-gr-bb{padding-bottom:8px}.t-gr-bg{padding-left:8px}.t-gr-bd{padding-right:8px}
.t-gr-fond{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:0}
.t-gr-fond path{fill:var(--pale)}
.t-gr-fond .t-gr-ok{fill:var(--vif)}
.t-gr-tuile{touch-action:manipulation;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none;position:relative;
  width:100%;height:100%;min-height:86px;padding:6px 5px 9px;border:0;border-radius:12px;background:var(--touche);color:var(--encre);
  font:700 .72rem/1.15 var(--f-texte);letter-spacing:-.01em;text-align:center;text-wrap:balance;overflow-wrap:anywhere;cursor:pointer;display:grid;place-items:center;
  box-shadow:inset 0 -5px 0 var(--touche-bord);
  transition:transform var(--duree-appui) ease,box-shadow var(--duration-quick) ease,background-color var(--duration-quick) ease,color var(--duration-quick) ease}
.t-gr-tuile:active:not(.t-glisse-pris){transform:translateY(2px);box-shadow:inset 0 -2px 0 var(--touche-bord)}
/* Glisser : toute la tuile est la poignée (pas de défilement qui démarre dessus) ; la transformation vient du JS, sans transition. */
.t-gr-tuile:not(:disabled){touch-action:none}
.t-gr-tuile.t-glisse-pris{transition:none}
/* Tuile survolée avant l'échange : contour à la couleur vive de SA zone. Le jaune et le vert se lisent mal sur leur plaque pâle
   (1,05 et 1,56:1), le bleu sur sa plaque sombre (1,48:1) : un filet d'encre de 1 px borde le contour (au moins 9:1 sur toutes
   les plaques, dans les deux thèmes), l'écart de 2 px garde la teinte de la plaque. */
.t-gr-case:not(.t-gr-ok) .t-glisse-cible{outline-color:var(--vif);box-shadow:inset 0 -5px 0 var(--touche-bord),0 0 0 2px var(--pale),0 0 0 6px var(--encre)}
/* Une tuile verrouillée n'est pas une cible : pas de contour de survol dessus. */
.t-gr-ok .t-glisse-cible{outline:none}
.t-gr-tuile:focus-visible{outline:3px solid var(--bleu-vif);outline-offset:2px;z-index:1}
/* Tuile choisie : la touche s'inverse selon le thème (sombre en clair, claire en sombre) et se soulève légèrement. */
.t-gr-sel,.t-gr-sel:active{background:var(--encre);color:var(--fond);transform:translateY(-2px) scale(1.04);z-index:2;
  box-shadow:inset 0 -3px 0 rgba(128,128,128,.45),0 10px 16px -8px rgba(0,0,0,.55)}
.t-gr-ok .t-gr-tuile{background:rgba(255,255,255,.9);color:var(--noir);box-shadow:inset 0 -3px 0 rgba(0,0,0,.12);cursor:default;opacity:1;transform:none}
:root[data-theme="sombre"] .t-gr-ok .t-gr-tuile{background:rgba(255,255,255,.9)}
/* Zone validée : la plaque s'allume (pâle → vive) puis les touches se posent l'une après l'autre. Après l'échange, jamais pendant. */
@keyframes t-gr-allume{from{fill:var(--pale)}to{fill:var(--vif)}}
@keyframes t-gr-pose{0%{transform:translateY(-5px) scale(.94)}100%{transform:none}}
.t-gr-fond .t-gr-neuf{animation:t-gr-allume .5s var(--ease-smooth-out) .22s backwards}
.t-gr-neuf .t-gr-tuile{animation:t-gr-pose .42s var(--ease-smooth-out) calc(.3s + var(--k,0) * 55ms) backwards}
@media (prefers-reduced-motion:reduce){.t-gr-neuf .t-gr-tuile{animation:none}.t-gr-fond .t-gr-neuf{animation-duration:.2s;animation-delay:0s}.t-gr-tuile{transition:none}.t-gr-sel,.t-gr-sel:active{transform:none}}
.t-gr-trouves,.t-gr-fiches{list-style:none;margin:0 auto 14px;padding:0;display:grid;gap:8px;max-width:480px}
.t-gr-film{display:flex;align-items:center;gap:8px;margin:0;font:900 1rem var(--f-texte);letter-spacing:-.02em}
.t-gr-aff{width:40px;aspect-ratio:2/3;object-fit:cover;border-radius:6px;background:var(--creux);flex:none}
.t-gr-coups{max-width:480px;margin:0 auto 14px}
.t-gr-liste{margin:8px 0 0;padding-left:1.1em;font:600 .9rem/1.4 var(--f-texte);color:var(--encre-2)}
.t-gr-trouves .t-gr-film{padding:8px 12px;border-radius:14px;background:var(--vif);color:var(--sur);box-shadow:inset 0 -3px 0 rgba(0,0,0,.14)}
.t-gr-fiche{padding:12px 14px 16px;border-radius:var(--r-touche);background:var(--touche);color:var(--encre);box-shadow:inset 0 -5px 0 var(--touche-bord),0 2px 0 var(--touche-ombre)}
@media (min-width:520px){.t-gr-tuile{font-size:.85rem;min-height:104px}}
@media (max-width:359px){.t-gr-tuile{font-size:.64rem;min-height:80px;padding:3px 3px 6px}}

/* Titre mystère : tout est centré (consigne, indices, grille, clavier, messages) ; taper vite ne zoome pas la page */
#jeutitre .t-pm-consigne,#jeutitre .t-jeu-msg,#jeutitre .t-err-l{text-align:center}
#jeutitre .t-jeu-tete{max-width:420px;margin-inline:auto}
#jeutitre .t-ti-grille,#jeutitre .t-ti-clavier{touch-action:manipulation}

/* Barre du haut d'un jeu : retour + logo et nom du jeu sur sa teinte */
.t-jeu-barre{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 16px}
.t-jeu-barre .t-retour{margin:0}
.t-jeu-id{display:inline-flex;align-items:center;gap:8px;padding:6px 14px 6px 6px;border-radius:var(--r-pastille);background:var(--pj);color:var(--encre);min-width:0}
.t-jeu-id .t-logo-jeu{width:32px;height:32px;border-radius:9px;box-shadow:0 2px 0 rgba(0,0,0,.2)}
.t-jeu-id b{font:800 .88rem var(--f-texte);letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:459px){.t-jeu-id{padding:5px;gap:0}.t-jeu-id b{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}}

/* Règle du jeu repliée : une ligne, ouverte à la demande */
.t-aide-jeu{margin:0 0 12px;max-width:560px}
.t-aide-jeu summary{display:inline-flex;align-items:center;min-height:44px;font:400 .75rem var(--f-pixel);color:var(--encre-2);cursor:pointer;list-style:none}
.t-aide-jeu summary::-webkit-details-marker{display:none}
.t-aide-jeu summary::before{content:"?";display:inline-grid;place-items:center;width:20px;height:20px;margin-right:8px;border-radius:50%;background:var(--creux);color:var(--encre);font:800 .8rem var(--f-texte)}
.t-aide-jeu summary:focus-visible{outline:3px solid var(--bleu-vif);outline-offset:2px;border-radius:8px}
.t-aide-jeu p{margin:0;font:600 .92rem/1.4 var(--f-texte);color:var(--encre-2)}

/* Plus ou moins : un « OU » entre les deux cartes */
.t-pm-duel{position:relative}
.t-pm-ou{position:absolute;left:50%;top:38%;transform:translate(-50%,-50%);z-index:1;display:grid;place-items:center;width:42px;height:42px;border-radius:50%;
  background:var(--noir);color:var(--encre-inv);font:400 .8rem var(--f-pixel);box-shadow:0 0 0 4px var(--fond);pointer-events:none}

/* Dans l'ordre : vraies flèches, pavé de repli à l'initiale, bouton « Valider » toujours à portée */
.t-or-fleche{display:grid;place-items:center}
.t-or-fleche svg{width:20px;height:20px}
.t-or-fleche[data-or-haut] svg{transform:rotate(180deg)}
.t-or-repli{background:var(--jaune);color:var(--noir);font:900 1.6rem var(--f-texte);letter-spacing:0;padding:0}
[data-or-valider]{position:sticky;bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:2;box-shadow:inset 0 -5px 0 var(--jaune-bord),0 10px 18px -8px rgba(0,0,0,.3)}

/* Titre mystère : la place du message est toujours réservée (vide ou non), pour que le clavier ne bouge jamais quand il apparaît ou disparaît */
#jeutitre [data-ti-err]{box-sizing:border-box;min-height:52px;margin:6px 0;align-items:center;justify-content:center}
#jeutitre [data-ti-err]:empty{display:flex;visibility:hidden}

/* ---------- Animations des jeux (jeuAnim.js et chaque jeu) : toutes tombent avec le mouvement réduit ---------- */
/* Plus ou moins : dix points de progression ; la carte gagnante se soulève, la perdante s'estompe */
.t-pm-points{list-style:none;display:flex;gap:6px;margin:0 0 14px;padding:0}
.t-pm-point{width:10px;height:10px;border-radius:50%;background:var(--creux)}
.t-pm-point--ok{background:var(--menthe)}
.t-pm-point--ko{background:var(--orange)}
.t-pm-point--ici{box-shadow:inset 0 0 0 2px var(--encre)}
.t-pm-bonne{animation:t-pm-gagne .45s var(--ease-smooth-out) both}
.t-pm-neutre,.t-pm-mauvaise{animation:t-pm-perd .45s var(--ease-smooth-out) both}
@keyframes t-pm-gagne{from{transform:none}to{transform:translateY(-6px)}}
@keyframes t-pm-perd{from{opacity:1}}

/* Titre mystère : la lettre tapée se pose ; les cases se retournent (perspective) */
.t-ti-grille{perspective:600px}
.t-ti-tape{animation:t-ti-tape .14s ease-out}
@keyframes t-ti-tape{50%{transform:scale(1.1)}}

/* Casting mystère : le dernier essai se barre d'un trait qui se trace ; la réponse passe du flou au net */
.t-jeu-essai{text-decoration:none;background-image:linear-gradient(currentColor,currentColor);background-repeat:no-repeat;
  background-size:calc(100% - 20px) 2px;background-position:10px 55%}
.t-jeu-essai--neuf{animation:t-cs-barre .35s var(--ease-smooth-out) .1s both}
@keyframes t-cs-barre{from{background-size:0 2px}}
.t-jeu-aff--revele{animation:t-revele .7s var(--ease-smooth-out) both}
@keyframes t-revele{from{filter:blur(14px);transform:scale(1.06);opacity:.4}}

/* Taquin : joints et numéros s'effacent, la dernière pièce comble le vide, un reflet traverse l'affiche */
.t-tq-tuile{transition:transform .18s cubic-bezier(.22,1,.36,1),box-shadow .5s ease,border-radius .5s ease}
.t-tq-num{transition:opacity .3s ease}
.t-tq-resolu .t-tq-tuile{box-shadow:none;border-radius:0}
.t-tq-resolu .t-tq-num{opacity:0}
.t-tq-derniere{pointer-events:none;animation:t-tq-pose .5s var(--ease-smooth-out) .25s both}
@keyframes t-tq-pose{from{opacity:0;transform:translate(200%,200%) scale(.85)}to{opacity:1;transform:translate(200%,200%)}}
.t-tq-resolu::after{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;
  background:linear-gradient(105deg,transparent 35%,rgba(255,255,255,.55) 50%,transparent 65%);transform:translateX(-120%);
  animation:t-tq-reflet .8s ease-in-out .55s forwards}
@keyframes t-tq-reflet{to{transform:translateX(120%)}}

/* Grille : le coup de pouce débloqué glisse en place avec un surlignage jaune */
.t-gr-coup--neuf{animation:t-gr-coup .9s var(--ease-smooth-out) both;border-radius:6px}
@keyframes t-gr-coup{0%{opacity:0;transform:translateX(-10px);background:var(--jaune)}35%{opacity:1;transform:none;background:var(--jaune)}100%{background:transparent}}

/* Page des jeux : tampon « Fait » sur la bulle d'un jeu fini, qui s'imprime la première fois */
.t-tampon{position:absolute;top:14px;right:14px;z-index:1;padding:3px 10px 4px;border:2px solid var(--encre);border-radius:8px;
  font:400 .72rem var(--f-pixel);color:var(--encre);transform:rotate(-8deg);opacity:.8;pointer-events:none}
.t-tampon--neuf{animation:t-tampon .45s cubic-bezier(.3,1.4,.5,1) .2s both}
@keyframes t-tampon{from{opacity:0;transform:rotate(-8deg) scale(2.4)}60%{opacity:.9;transform:rotate(-8deg) scale(.94)}to{opacity:.8;transform:rotate(-8deg) scale(1)}}

@media (prefers-reduced-motion:reduce){
  .t-pm-bonne,.t-pm-neutre,.t-pm-mauvaise,.t-ti-tape,.t-jeu-essai--neuf,.t-jeu-aff--revele,.t-tq-derniere,.t-gr-coup--neuf,.t-tampon--neuf{animation:none}
  .t-tq-resolu::after{display:none}
  .t-tq-tuile,.t-tq-num{transition:none}
  .t-pm-bonne{transform:translateY(-6px)}
}

/* ---------- Récapitulatifs de fin de partie (jeuRecap.js) : chaque film mène à sa fiche ----------
   Couleur en petites touches seulement (pastille de titre, point de couleur) : les surfaces restent celles du portail. */
.t-rc-jaune{--rc:var(--jaune);--rc-encre:var(--noir)}
.t-rc-bleu{--rc:var(--bleu-fond);--rc-encre:#fff}
.t-rc-orange{--rc:var(--orange);--rc-encre:var(--noir)}
.t-rc{margin:26px 0 18px;max-width:640px}
.t-rc-h{font:900 1.25rem var(--f-texte);letter-spacing:-.03em;margin:0 0 12px}
.t-rc-liste{list-style:none;margin:0;padding:0;display:grid;gap:18px}
.t-rc-groupe{padding:0}
.t-rc-groupe-h{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 10px;margin:0 0 8px;font:800 .95rem var(--f-texte);letter-spacing:-.02em}
/* La seule vraie couleur : une pastille devant le titre du groupe */
.t-rc-groupe-h>span:first-child::before{content:"";display:inline-block;width:10px;height:10px;margin-right:8px;border-radius:3px;background:var(--rc);vertical-align:1px;box-shadow:0 0 0 1px rgba(0,0,0,.12)}
.t-rc-verdict{font:400 .68rem var(--f-pixel);color:var(--encre-2)}
.t-rc-verdict--ok{color:var(--encre)}
.t-rc-verdict--ok::before{content:"";display:inline-block;width:7px;height:7px;margin-right:6px;border-radius:50%;background:var(--menthe);vertical-align:1px}
.t-rc-films{display:grid;grid-template-columns:1fr 1fr;gap:8px}
@media (max-width:379px){.t-rc-films{grid-template-columns:1fr}}
.t-rc-ordre{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.t-rc-rang{display:grid;grid-template-columns:22px 1fr;align-items:center;gap:6px}
.t-rc-num{font:400 .85rem var(--f-pixel);text-align:center;color:var(--encre-2)}
/* Un film : touche du portail, affiche, titre, valeur, flèche vers la fiche */
.t-rc-film{position:relative;display:grid;grid-template-columns:40px 1fr auto;align-items:center;gap:2px 10px;min-height:64px;padding:7px 10px 10px 7px;
  border-radius:12px;background:var(--touche);color:var(--encre);text-decoration:none;
  box-shadow:inset 0 -3px 0 var(--touche-bord),0 1px 0 var(--touche-ombre);transition:transform var(--duree-appui) ease,box-shadow var(--duree-appui) ease}
a.t-rc-film:active{transform:translateY(2px);box-shadow:inset 0 -1px 0 var(--touche-bord)}
a.t-rc-film:focus-visible{outline:3px solid var(--bleu-vif);outline-offset:2px}
.t-rc-aff{display:block;width:40px;aspect-ratio:2/3;object-fit:cover;border-radius:6px;background:var(--creux);outline:1px solid oklch(0 0 0 / .1);outline-offset:-1px}
.t-rc-repli{display:grid;place-items:center;background:var(--creux);color:var(--encre-2);font:900 1.1rem var(--f-texte)}
.t-rc-txt{display:grid;gap:2px;min-width:0}
.t-rc-titre{font:800 .92rem/1.2 var(--f-texte);letter-spacing:-.02em;overflow-wrap:anywhere;text-wrap:balance}
.t-rc-sous{font:600 .82rem var(--f-mono);color:var(--encre-2)}
.t-rc-marque{grid-column:2;justify-self:start;font:400 .6rem var(--f-pixel);color:var(--encre-2)}
.t-rc-fleche{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;color:var(--encre-2)}
.t-rc-fleche svg{width:16px;height:16px}
/* Bonne réponse / bien placé : un point vert devant le titre ; erreur : la marque passe en orange */
.t-rc-bonne .t-rc-titre::before{content:"";display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:50%;background:var(--menthe);vertical-align:1px;box-shadow:0 0 0 1px rgba(0,0,0,.15)}
.t-rc-mauvaise .t-rc-marque{color:#c23a00}
:root[data-theme="sombre"] .t-rc-mauvaise .t-rc-marque{color:var(--orange)}
.t-rc-film .t-rc-marque{grid-row:2}
.t-rc-film .t-rc-aff{grid-row:1/span 2}
.t-rc-film .t-rc-fleche{grid-row:1/span 2;grid-column:3}
/* Grille : la couleur de sa zone en petit carré devant l'année */
.t-rc-liste--films{gap:8px;grid-template-columns:1fr}
@media (min-width:560px){.t-rc-liste--films{grid-template-columns:1fr 1fr}}
.t-rc-zone .t-rc-sous::before{content:"";display:inline-block;width:10px;height:10px;margin-right:7px;border-radius:3px;background:var(--vif);vertical-align:-1px;box-shadow:0 0 0 1px rgba(0,0,0,.12)}
/* Casting : les indices restent sur leurs fiches blanches ; une pastille de couleur devant chaque étape */
.t-cs-groupe.t-rc-groupe{padding:12px 14px 16px}
.t-cs-groupe.t-rc-groupe .t-cs-item:first-child .t-cs-etiquette::before{content:"";display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:2px;background:var(--rc);vertical-align:0;box-shadow:0 0 0 1px rgba(0,0,0,.12)}
.t-rc-lien{color:inherit;text-decoration:underline;text-decoration-color:var(--encre-2);text-decoration-thickness:1px;text-underline-offset:3px}
.t-rc-lien:hover{text-decoration-color:currentColor}
.t-rc-lien:focus-visible{outline:3px solid var(--bleu-vif);outline-offset:2px;border-radius:4px}
/* Réponse (Casting, Taquin, Titre) : pas d'aplat, l'affiche mène à la fiche */
.t-jeu-fin--couleur{margin-top:14px}
.t-jeu-aff-lien{display:block;flex:0 0 auto;border-radius:var(--r-petit);transition:transform var(--duree-appui) ease}
.t-jeu-aff-lien:active{transform:translateY(2px)}
.t-jeu-aff-lien:focus-visible{outline:3px solid var(--bleu-vif);outline-offset:3px}
:root[data-theme="sombre"] .t-rc-aff{outline-color:oklch(1 0 0 / .1)}
@media (prefers-reduced-motion:reduce){.t-rc-film,.t-jeu-aff-lien{transition:none}}
/* Taquin et Casting : l'affiche (ou le portrait) de la réponse en grand, au-dessus du titre */
.t-jeu-fin--grand{flex-direction:column;align-items:stretch;gap:16px}
.t-jeu-fin--grand .t-jeu-aff-lien,.t-jeu-fin--grand>.t-jeu-aff{align-self:center}
.t-jeu-fin--grand .t-jeu-aff{flex:none;width:min(72vw,300px);border-radius:var(--r-touche);box-shadow:0 18px 30px -18px rgba(0,0,0,.55),0 2px 0 var(--touche-ombre)}
.t-jeu-fin--grand .t-jeu-aff-lien{border-radius:var(--r-touche)}
.t-jeu-fin--grand .t-jeu-titre{text-align:center}
.t-jeu-fin--grand .t-jeu-score,.t-jeu-fin--grand .t-actions{justify-content:center}

/* Taquin : consigne à gauche, petit modèle à droite ; le plateau prend toute la largeur disponible */
.t-tq-haut{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:start;margin:0 0 12px}
.t-tq-haut .t-pm-consigne{margin-bottom:4px}
.t-tq-haut .t-aide-jeu{margin:0}
.t-tq-haut .t-tq-modele{order:0;display:grid;grid-template-columns:none;gap:4px;width:auto;justify-items:center}
.t-tq-haut .t-tq-modele img{width:56px}
.t-tq-zone .t-tq-plateau{margin:0 auto}
@media (min-width:520px){.t-tq-plateau{width:min(100%,420px,calc((100svh - 260px) * 2 / 3))}}
/* Grille : chaque carte de film sur le pastel de sa zone (la couleur des cases avant qu'elles soient trouvées) */
.t-rc-film.t-rc-zone{background:var(--pale);box-shadow:inset 0 -3px 0 rgba(0,0,0,.1)}
.t-rc-zone .t-rc-sous{color:var(--encre)}

/* ---------- Classements : tous les jeux sur une page, deux colonnes sur ordinateur ---------- */
.t-jeux-haut{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 14px;margin:0 0 20px;max-width:760px}
.t-jeux-haut .t-serie{margin:0}
.t-clas-grille{display:grid;grid-template-columns:1fr;gap:18px;align-items:start}
@media (min-width:900px){.t-clas-grille{grid-template-columns:1fr 1fr}}
.t-clas-carte{padding:16px 16px 18px;border-radius:var(--r-touche);background:var(--touche);color:var(--encre);
  box-shadow:inset 0 -5px 0 var(--touche-bord),0 2px 0 var(--touche-ombre);scroll-margin-top:calc(var(--haut-h) + 16px)}
.t-clas-carte .t-clas-tete{margin:0 0 12px}
.t-clas-carte .t-clas-tete .t-logo-jeu{width:40px;height:40px;border-radius:11px}
.t-clas-carte h2{flex:1;min-width:0;margin:0;font:900 1.2rem var(--f-texte);letter-spacing:-.03em}
.t-clas-carte h2:focus{outline:none}
.t-clas-jouer{display:inline-flex;align-items:center;min-height:44px;font:800 .9rem var(--f-texte);color:var(--encre);text-decoration:none;white-space:nowrap}
.t-clas-jouer:focus-visible{outline:3px solid var(--bleu-vif);outline-offset:2px;border-radius:6px}
.t-clas-carte .t-clas-onglets{margin:0 0 12px}
.t-clas-carte .t-clas-l{padding:8px 12px 11px}
/* La carte visée (venue du bouton « Classements » d'un jeu) prend un instant la teinte pastel de son jeu */
.t-clas-carte--visee{animation:t-clas-vise 1.6s var(--ease-smooth-out) .35s}
@keyframes t-clas-vise{0%,30%{background:var(--pj)}100%{background:var(--touche)}}
@media (prefers-reduced-motion:reduce){.t-clas-carte--visee{animation:none}}

/* ---------- Glisser-déposer partagé (glisse.js) : la poignée ne défile pas, l'élément pris se soulève ---------- */
[data-glisse-poignee]{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;-webkit-touch-callout:none;cursor:grab}
.t-glisse-pris{position:relative;z-index:5;cursor:grabbing;box-shadow:inset 0 -5px 0 var(--touche-bord),0 10px 22px var(--touche-ombre)}
.t-glisse-cible{outline:3px solid var(--bleu-vif);outline-offset:2px}
/* « Dans l'ordre » : quand les cartes s'écartent en direct, la place libre suffit comme repère (le contour suivrait la carte qui part). */
.t-or-ecarte .t-glisse-cible{outline:none}
