/* =====================================================================
   CHOPÉ ! — identité « presse à scandale » : rouge scandale, jaune
   presse, encre noire, papier. Gros titres Anton, boutons « cube »
   épais, autocollants penchés, trame de points.
   ===================================================================== */
:root {
    --rouge: #ff2e3e; --jaune: #ffe500; --encre: #121014; --papier: #f4efe6; --rose: #ff4fb4; --ciel: #2de1fc; --vert: #5be35b;
    --titre: 'Anton', Impact, 'Arial Narrow', sans-serif; --texte: 'Archivo', system-ui, Arial, sans-serif;
    --trame: radial-gradient(rgba(18,16,20,.16) 1.2px, transparent 1.4px) 0 0 / 7px 7px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--encre); color: var(--papier); font-family: var(--texte); }
body { touch-action: none; user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
#jeu { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
body.au-menu #jeu { filter: brightness(.62) saturate(1.15); }
.ico { width: 1.15em; height: 1.15em; vertical-align: -.18em; flex: none; }

/* ------------------------------ les cubes ------------------------------ */
.cube {
    --fond: var(--papier); --txt: var(--encre);
    display: inline-flex; align-items: center; justify-content: center; gap: .45em;
    background: var(--fond); color: var(--txt); border: 3px solid var(--encre); border-radius: 14px;
    padding: .7em 1.1em; font-family: var(--titre); font-size: 1.05rem; letter-spacing: .03em; text-transform: uppercase;
    box-shadow: 0 5px 0 var(--encre); transition: transform .08s, box-shadow .08s; position: relative; line-height: 1.1;
}
.cube:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 7px 0 var(--encre); }
.cube:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--encre); }
.cube:disabled { opacity: .55; cursor: default; }
.cube-jaune { --fond: var(--jaune); } .cube-blanc { --fond: var(--papier); } .cube-noir { --fond: #26222c; --txt: var(--papier); }
.cube-rose { --fond: var(--rose); } .cube-rouge { --fond: var(--rouge); --txt: #fff; } .cube-pub { --fond: var(--ciel); font-size: .92rem; }
.cube-carre { width: 46px; height: 46px; padding: 0; } .cube-gros { font-size: 1.35rem; padding: .8em 1.4em; }
.cube-petit { font-size: .85rem; padding: .5em .8em; box-shadow: 0 3px 0 var(--encre); }
.po { display: inline-flex; align-items: center; gap: .25em; font-family: var(--titre); }
.ico-po { width: 1.1em; height: 1.1em; }
.etoile { color: rgba(255,255,255,.25); } .etoile.pleine { color: var(--jaune); filter: drop-shadow(0 2px 0 var(--encre)); }
.tag { display: inline-block; background: var(--encre); color: var(--jaune); font-family: var(--titre); font-size: .8rem; letter-spacing: .08em; padding: .2em .55em; border-radius: 6px; }

/* ------------------------------ les écrans ------------------------------ */
.ecran { position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden; padding: 16px; touch-action: pan-y; z-index: 5; }
.ecran:not(.ecran-accueil) { background: rgba(18,16,20,.86); }
.ecran > * { max-width: 980px; margin-left: auto; margin-right: auto; }
.tete-ecran { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.tete-ecran h2 { flex: 1; margin: 0; font-family: var(--titre); font-size: clamp(1.8rem, 5vw, 2.8rem); text-transform: uppercase; color: var(--papier); text-shadow: 4px 4px 0 var(--rouge); letter-spacing: .02em; }
.tete-po { font-size: 1.3rem; color: var(--jaune); }
.sous-titre { font-family: var(--titre); text-transform: uppercase; letter-spacing: .04em; margin: 22px auto 10px; color: var(--jaune); font-weight: 400; }
.legende { color: rgba(244,239,230,.75); font-size: .9rem; }
.vide { font-family: var(--titre); font-size: 1.5rem; text-align: center; margin: 40px auto; }

/* ------------------------------ la couverture (accueil) ------------------------------ */
.ecran-accueil { display: flex; align-items: center; justify-content: center; }
.couv {
    position: relative; width: min(520px, 100%); background: var(--papier); color: var(--encre); border: 4px solid var(--encre);
    border-radius: 8px; padding: 0 18px 18px; box-shadow: 12px 12px 0 rgba(0,0,0,.55); transform: rotate(-.6deg); margin: auto;
}
.couv::before { content: ''; position: absolute; inset: 0; background: var(--trame); pointer-events: none; border-radius: 6px; }
.couv-bandeau { display: flex; justify-content: space-between; gap: 10px; background: var(--encre); color: var(--jaune); margin: 0 -18px; padding: 7px 14px; font-weight: 800; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.logo { position: relative; margin: 6px -18px 0; background: var(--rouge); padding: 4px 18px 0; font-family: var(--titre); font-weight: 400; line-height: .9; font-size: clamp(5rem, 24vw, 8.6rem); color: #fff; letter-spacing: -.01em;
    text-shadow: -3px -3px 0 var(--encre), 3px -3px 0 var(--encre), -3px 3px 0 var(--encre), 3px 3px 0 var(--encre), 8px 8px 0 var(--encre); border-bottom: 4px solid var(--encre); }
.logo i { font-style: normal; color: var(--jaune); display: inline-block; transform: rotate(10deg); }
.accroche { position: relative; font-weight: 800; font-size: 1.05rem; margin: 12px 0; }
.accroche b { background: var(--jaune); padding: 0 .2em; }
.pastille-couv { position: absolute; right: 10px; top: 54px; width: 92px; height: 92px; border-radius: 50%; background: var(--jaune); border: 3px solid var(--encre);
    display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(14deg); font-family: var(--titre); box-shadow: 3px 3px 0 var(--encre); }
.pastille-couv b { font-size: 1.6rem; font-weight: 400; line-height: 1; } .pastille-couv span { font-size: .8rem; text-transform: uppercase; }
.une-jouer { position: relative; display: block; width: 100%; text-align: left; background: var(--encre); color: #fff; border: 4px solid var(--encre); border-radius: 12px; padding: 14px 16px 16px;
    box-shadow: 0 6px 0 var(--rouge); transition: transform .08s; overflow: hidden; }
.une-jouer:hover { transform: translateY(-2px) rotate(-.4deg); } .une-jouer:active { transform: translateY(4px); }
.une-jouer b { display: block; font-family: var(--titre); font-weight: 400; font-size: clamp(1.8rem, 8vw, 2.6rem); line-height: 1; margin: 6px 0 4px; color: var(--jaune); }
.une-jouer .sous { display: block; font-size: .9rem; opacity: .85; padding-right: 110px; }
.une-jouer .go { position: absolute; right: 12px; bottom: 12px; background: var(--rouge); border: 3px solid #fff; border-radius: 10px; padding: 6px 12px; font-family: var(--titre); font-size: 1.1rem; }
.grille-couv { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.grille-couv .cube { flex-direction: column; align-items: flex-start; text-align: left; padding: 12px; gap: 4px; }
.grille-couv .cube .ico { width: 26px; height: 26px; }
.grille-couv .cube b { font-weight: 400; font-size: 1.1rem; } .grille-couv .cube small { font-family: var(--texte); text-transform: none; font-size: .78rem; letter-spacing: 0; opacity: .85; }
.grille-couv .cube:nth-child(1) { transform: rotate(-1deg); } .grille-couv .cube:nth-child(4) { transform: rotate(1deg); }
.couv-bas { position: relative; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.couv-po { margin-left: auto; font-size: 1.25rem; }

/* ------------------------------ la carrière ------------------------------ */
.grille-lieux { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.carte-lieu { background: var(--papier); color: var(--encre); border: 4px solid var(--encre); border-radius: 14px; overflow: hidden; box-shadow: 6px 6px 0 var(--c); }
.lieu-tete { background: var(--c); padding: 12px 14px; border-bottom: 4px solid var(--encre); position: relative; }
.lieu-tete::after { content: ''; position: absolute; inset: 0; background: var(--trame); }
.lieu-tete b { display: block; font-family: var(--titre); font-weight: 400; font-size: 1.7rem; text-transform: uppercase; position: relative; z-index: 1; }
.lieu-tete small { font-weight: 800; position: relative; z-index: 1; }
.lieu-niveaux { padding: 12px; display: grid; gap: 10px; }
.niveau { justify-content: flex-start; text-align: left; width: 100%; text-transform: none; font-family: var(--texte); font-weight: 800; padding: .6em .8em; }
.niveau .num { font-family: var(--titre); font-size: 1.4rem; width: 1.6em; }
.niveau b { flex: 1; } .niveau.ferme { opacity: .55; }

/* ------------------------------ modale ------------------------------ */
#modale { position: fixed; inset: 0; background: rgba(10,8,14,.72); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 30; overflow-y: auto; }
.boite { position: relative; background: var(--papier); color: var(--encre); border: 4px solid var(--encre); border-radius: 16px; padding: 22px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 10px 10px 0 rgba(0,0,0,.5); touch-action: pan-y; }
.boite h2 { font-family: var(--titre); font-weight: 400; font-size: 2rem; margin: 0 0 10px; text-transform: uppercase; }
.boite .fermer { position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; }
.intro { border-top: 10px solid var(--c); margin: -22px -22px 0; padding: 18px 22px 4px; border-radius: 12px 12px 0 0; }
.intro-lieu { font-weight: 900; text-transform: uppercase; font-size: .85rem; } .intro-lieu small { opacity: .7; }
.intro h2 { font-size: clamp(2rem, 7vw, 2.8rem); line-height: 1; margin: 6px 0 12px; }
.commande { background: var(--jaune); border: 3px solid var(--encre); border-radius: 10px; padding: 10px 12px; transform: rotate(-.6deg); margin-bottom: 10px; box-shadow: 4px 4px 0 var(--encre); }
.commande b { display: block; font-family: var(--titre); font-weight: 400; font-size: 1.45rem; margin-top: 4px; }
.modif { background: var(--encre); color: var(--papier); border-radius: 8px; padding: 7px 10px; font-weight: 800; font-size: .9rem; margin-bottom: 8px; }
.intro-infos { display: flex; flex-wrap: wrap; gap: 8px 16px; font-weight: 800; margin: 10px 0; }
.intro-seuils { font-size: .9rem; font-weight: 600; } .intro-seuils .etoile { color: #c9c1b3; } .intro-seuils .etoile.pleine { color: #e8b100; }
.intro-aide { font-size: .82rem; opacity: .75; margin: 10px 0; }
.intro-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; } .intro-btns.col { flex-direction: column; } .intro-btns.col .cube { width: 100%; }
.intro-bonus { margin-top: 12px; } .intro-bonus .cube { width: 100%; }
.pause h2 { font-size: 3rem; text-align: center; }
.ident { font-family: var(--titre); font-weight: 400; letter-spacing: .08em; background: var(--jaune); padding: 0 .3em; border-radius: 4px; color: var(--encre); }

/* ------------------------------ HUD ------------------------------ */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
#hud button, #hud .zoom, #hud .viser { pointer-events: auto; }
.hud-haut { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); }
.hud-bloc { display: flex; align-items: center; gap: 6px; background: var(--encre); border: 3px solid var(--papier); border-radius: 12px; padding: 4px 10px; font-family: var(--titre); font-size: 1.6rem; line-height: 1.1; }
.hud-bloc .ico { width: 22px; height: 22px; color: var(--jaune); }
.hud-bloc.urgent { background: var(--rouge); border-color: var(--jaune); }
.hud-commande { flex: 1; min-width: 0; text-align: center; margin: 0 auto; max-width: 420px; background: var(--jaune); color: var(--encre); border: 3px solid var(--encre); border-radius: 12px; padding: 4px 10px 6px; box-shadow: 0 4px 0 var(--encre); transform: rotate(-.5deg); }
.hud-commande b { display: block; font-family: var(--titre); font-weight: 400; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-commande .tag { font-size: .65rem; }
.hud-commande.ok { background: var(--vert); } .hud-commande.ok .tag::after { content: ' ✓ REMPLIE'; }
.hud-repere { display: flex; align-items: center; gap: 6px; background: var(--encre); border: 3px solid var(--papier); border-radius: 12px; padding: 6px 10px; }
.hud-repere .ico { width: 22px; height: 22px; }
.hud-repere i { display: block; width: 70px; height: 10px; border-radius: 6px; background: #3a3540; overflow: hidden; }
.hud-repere s { display: block; height: 100%; width: 0; background: var(--jaune); transition: width .1s; }
.hud-repere.chaud s { background: var(--rouge); } .hud-repere.chaud .ico { color: var(--rouge); }
#radar { position: absolute; left: 50%; transform: translateX(-50%); }
.bandeau { position: absolute; left: 50%; top: 22%; transform: translate(-50%, -16px) rotate(-2deg); font-family: var(--titre); font-size: clamp(1.2rem, 4.2vw, 2.1rem); padding: .2em .7em;
    border: 4px solid var(--encre); border-radius: 10px; opacity: 0; transition: opacity .2s, transform .25s; white-space: nowrap; max-width: 94vw; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 6px 0 var(--encre); }
.bandeau.vu { opacity: 1; transform: translate(-50%, 0) rotate(-2deg); }
.bandeau.jaune { background: var(--jaune); color: var(--encre); } .bandeau.rouge { background: var(--rouge); color: #fff; }
.aide { position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%); background: var(--papier); color: var(--encre); border: 3px solid var(--encre); border-radius: 12px; padding: 8px 14px; font-weight: 900; max-width: 90vw; text-align: center; box-shadow: 0 4px 0 var(--encre); }
.pellicule { position: absolute; right: 12px; top: 80px; display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 260px); overflow: hidden; }
.vignette { position: relative; width: 52px; height: 65px; border: 3px solid var(--papier); border-radius: 4px; background: #000; animation: vole .45s cubic-bezier(.2,.9,.3,1.2) both; box-shadow: 2px 2px 0 var(--encre); }
.vignette.top { border-color: var(--jaune); }
.vignette .mini { width: 100%; height: 100%; display: block; }
.vignette b { position: absolute; left: -8px; bottom: -6px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--encre); color: var(--encre); font-family: var(--titre); font-weight: 400; font-size: .9rem; display: flex; align-items: center; justify-content: center; }
@keyframes vole { from { transform: translate(-40vw, 20vh) scale(3) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
.gain { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font-family: var(--titre); font-size: 2rem; text-shadow: 3px 3px 0 var(--encre); animation: monte 1.3s ease-out both; }
@keyframes monte { from { opacity: 0; transform: translate(-50%, 20px) scale(.8); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } to { opacity: 0; transform: translate(-50%, -50px); } }
.zoom { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 54px; height: min(46vh, 300px); border: 3px solid var(--papier); background: rgba(18,16,20,.75); border-radius: 30px; touch-action: none; }
.zoom i { position: absolute; left: 50%; top: 14px; bottom: 14px; width: 4px; transform: translateX(-50%); background: rgba(244,239,230,.35); border-radius: 2px; }
.zoom b { position: absolute; left: 50%; bottom: 14px; width: 36px; height: 36px; margin-left: -18px; border-radius: 50%; background: var(--jaune); border: 3px solid var(--encre); transform: translateY(50%); }
body:not(.tactile) .zoom b { width: 28px; height: 28px; margin-left: -14px; }
.zoom span { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); font-family: var(--titre); font-size: 1.1rem; text-shadow: 2px 2px 0 var(--encre); }
.declencheur { --point: 0; position: absolute; right: 22px; bottom: 26px; width: 104px; height: 104px; border-radius: 50%; border: 5px solid var(--encre); background: var(--rouge); box-shadow: 0 6px 0 var(--encre), inset 0 -8px 0 rgba(0,0,0,.2); touch-action: none; padding: 0; }
.declencheur svg { position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px); transform: rotate(-90deg); }
.declencheur .anneau { fill: none; stroke: rgba(244,239,230,.35); stroke-width: 5; }
.declencheur .mise-au-point { fill: none; stroke: var(--jaune); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 276.5; stroke-dashoffset: calc(276.5 * (1 - var(--point))); }
.declencheur.net .mise-au-point { stroke: var(--vert); }
.declencheur.tient { transform: translateY(4px) scale(.96); box-shadow: 0 2px 0 var(--encre), inset 0 -4px 0 rgba(0,0,0,.2); }
.declencheur.vide { background: #5a5560; }
.declencheur span { position: absolute; inset: 22px; border-radius: 50%; border: 4px solid rgba(255,255,255,.65); }
body:not(.tactile) .declencheur { width: 78px; height: 78px; opacity: .85; }
body:not(.tactile) .zoom { width: 40px; }
.viser { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--jaune); color: var(--encre); border: 4px solid var(--encre); border-radius: 14px; padding: 14px 22px; text-align: center; cursor: pointer; box-shadow: 0 6px 0 var(--encre); }
.viser b { display: block; font-family: var(--titre); font-weight: 400; font-size: 1.8rem; } .viser span { font-weight: 800; font-size: .85rem; }
body.portrait .zoom { left: 14px; top: auto; bottom: 30px; transform: none; height: 160px; }
body.portrait .pellicule { top: auto; bottom: 150px; right: 50%; transform: translateX(50%); flex-direction: row; max-width: 60vw; }
body.portrait .hud-commande { position: absolute; left: 12px; right: 12px; top: 64px; max-width: none; }
body.portrait .hud-haut { flex-wrap: wrap; }
body.portrait .hud-repere { margin-left: auto; }

/* ------------------------------ le tampon ------------------------------ */
#tampon { position: fixed; left: 50%; top: 42%; z-index: 20; pointer-events: none; font-family: var(--titre); font-size: clamp(3rem, 14vw, 7rem); color: var(--c, var(--jaune));
    -webkit-text-stroke: 4px var(--encre); paint-order: stroke fill; text-shadow: 6px 6px 0 var(--encre); opacity: 0; transform: translate(-50%, -50%) rotate(-10deg) scale(2.4); white-space: nowrap; }
#tampon.vu { animation: tampon 1.1s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes tampon { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-10deg) scale(2.4); } 18% { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); } 75% { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); } 100% { opacity: 0; transform: translate(-50%, -60%) rotate(-8deg) scale(.95); } }

/* ------------------------------ choix (jour, libre) ------------------------------ */
.carte-jour { background: var(--papier); color: var(--encre); border: 4px solid var(--encre); border-radius: 16px; padding: 18px; box-shadow: 8px 8px 0 var(--c); max-width: 560px; }
.carte-jour h3 { font-family: var(--titre); font-weight: 400; font-size: 2.6rem; margin: 8px 0; text-transform: uppercase; }
.carte-jour p { font-weight: 700; } .jour-regle { font-size: .9rem; opacity: .8; }
.jour-record, .jour-serie { margin: 8px 0; font-weight: 800; }
.carte-jour .cube { margin-top: 10px; }
.grille-choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.choix-lieu { --fond: var(--c); flex-direction: column; align-items: flex-start; text-align: left; }
.grille-choix .cube small { font-family: var(--texte); text-transform: none; letter-spacing: 0; font-size: .8rem; }
.grille-choix .cube.actif { outline: 4px solid var(--jaune); outline-offset: 3px; }
.choix-modif { flex-direction: column; align-items: flex-start; text-align: left; } .choix-modif.actif { --fond: var(--jaune); }
.ecran-libre > .cube-gros { display: flex; margin-top: 22px; }

/* ------------------------------ boutique ------------------------------ */
.onglets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.onglet { flex-direction: column; gap: 4px; padding: .6em .3em; font-size: .9rem; }
.onglet .ico { width: 26px; height: 26px; }
.onglet.actif { --fond: var(--jaune); background: linear-gradient(160deg, var(--jaune), #ffb000); }
.badge { display: inline-block; font-family: var(--titre); font-size: .72rem; letter-spacing: .05em; padding: .15em .5em; border-radius: 6px; border: 2px solid var(--encre); color: var(--encre); }
.badge.gratuit { background: var(--vert); } .badge.gagner { background: var(--jaune); } .badge.payant { background: var(--rose); }
.grille-objets { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.objet { background: var(--papier); color: var(--encre); border: 3px solid var(--encre); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 5px; }
.objet.equipe { box-shadow: 0 0 0 4px var(--jaune); }
.objet b { font-family: var(--titre); font-weight: 400; font-size: 1.15rem; } .objet small { font-size: .8rem; flex: 1; }
.objet .cube { margin-top: 6px; font-size: .9rem; padding: .55em .6em; }
.apercu-canvas { width: 100%; aspect-ratio: 4 / 5; height: auto; border: 2px solid var(--encre); border-radius: 6px; display: block; background: #000; }
.apercu-appareil { aspect-ratio: 4 / 5; border: 2px solid var(--encre); border-radius: 6px; background: var(--trame), var(--b); display: flex; align-items: center; justify-content: center; }
.apercu-appareil .ico { width: 70%; height: 70%; color: var(--a); filter: drop-shadow(4px 4px 0 var(--encre)); }
.grille-offres { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.offre { background: var(--papier); color: var(--encre); border: 4px solid var(--encre); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.offre.vedette { background: var(--jaune); transform: rotate(-.6deg); }
.offre h3 { font-family: var(--titre); font-weight: 400; font-size: 1.6rem; margin: 4px 0 0; } .offre .prix { font-family: var(--titre); font-size: 2.2rem; }
.offre ul { margin: 0 0 6px; padding-left: 1.2em; flex: 1; font-weight: 700; font-size: .9rem; }
.bloc-code { margin: 18px auto; background: #26222c; border: 3px solid var(--papier); border-radius: 14px; padding: 14px; }
.bloc-code h3 { font-family: var(--titre); font-weight: 400; margin: 0 0 6px; font-size: 1.4rem; }
.bloc-code input { width: min(100%, 420px); font: 700 1rem var(--texte); padding: .7em; border: 3px solid var(--encre); border-radius: 10px; margin-right: 8px; user-select: text; -webkit-user-select: text; }
.code-msg.ok { color: var(--vert); font-weight: 800; } .code-msg.ko { color: #ff8a8a; font-weight: 800; }

/* ------------------------------ Mes Unes, succès, réglages ------------------------------ */
.grille-unes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.une-mini { background: none; border: 0; padding: 0; text-align: left; color: var(--papier); }
.une-mini img { width: 100%; border: 3px solid var(--papier); border-radius: 6px; display: block; box-shadow: 4px 4px 0 var(--rouge); }
.une-mini b { display: block; font-family: var(--titre); font-weight: 400; margin-top: 6px; } .une-mini small { opacity: .7; }
.une-grande { width: 100%; border: 3px solid var(--encre); border-radius: 6px; display: block; }
.grille-succes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.succes { background: #26222c; border: 3px solid #3a3540; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 3px; opacity: .7; }
.succes.ok { background: var(--papier); color: var(--encre); border-color: var(--encre); opacity: 1; }
.succes > .ico { width: 26px; height: 26px; color: var(--jaune); } .succes.ok > .ico { color: #e8b100; }
.succes b { font-family: var(--titre); font-weight: 400; font-size: 1.1rem; } .succes small { font-size: .8rem; }
.reglages { display: grid; gap: 10px; max-width: 620px; }
.reglage { display: flex; align-items: center; gap: 14px; background: #26222c; border: 3px solid #3a3540; border-radius: 12px; padding: 12px 14px; font-weight: 800; }
.reglage > span { flex: 1; } .reglage small { display: block; font-weight: 600; opacity: .7; font-size: .8rem; }
.reglage input[type=range] { width: 46%; accent-color: var(--jaune); }
.bascule input { position: absolute; opacity: 0; width: 0; height: 0; }
.bascule i { width: 56px; height: 30px; border-radius: 16px; background: #4a4450; border: 3px solid var(--encre); position: relative; flex: none; transition: background .15s; }
.bascule i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--papier); transition: transform .15s; }
.bascule input:checked + i { background: var(--vert); } .bascule input:checked + i::after { transform: translateX(26px); }
.bascule input:focus-visible + i { outline: 3px solid var(--jaune); }
.commandes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; max-width: 620px; }
.commandes div { background: var(--papier); color: var(--encre); border-radius: 10px; padding: 8px 10px; font-size: .9rem; }
.donnees { max-width: 620px; margin-top: 18px; font-size: .9rem; }

/* ------------------------------ résultats ------------------------------ */
.titre-res { font-family: var(--titre); font-weight: 400; font-size: clamp(2rem, 7vw, 3.4rem); text-align: center; margin: 4px auto 10px; color: var(--jaune); text-shadow: 4px 4px 0 var(--rouge); }
.res-commande { text-align: center; font-weight: 800; padding: 8px; border-radius: 10px; border: 3px solid var(--encre); max-width: 560px; }
.res-commande.ok { background: var(--vert); color: var(--encre); } .res-commande.ko { background: #ff8a8a; color: var(--encre); }
.res-commande .tag { margin-right: 6px; }
.planche { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px; background: #1c1920; border: 3px solid #3a3540; border-radius: 10px; padding: 14px; margin: 12px auto; }
.tirage { position: relative; padding: 5px 5px 22px; background: var(--papier); border: 0; border-radius: 3px; box-shadow: 3px 3px 0 #000; transition: transform .1s; }
.tirage:nth-child(odd) { transform: rotate(-1.5deg); } .tirage:nth-child(even) { transform: rotate(1.2deg); }
.tirage canvas { width: 100%; height: auto; display: block; }
.tirage small { position: absolute; left: 0; right: 0; bottom: 3px; text-align: center; color: var(--encre); font-weight: 900; font-size: .78rem; }
.tirage .note { position: absolute; right: -8px; top: -8px; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--encre); color: var(--encre); font-family: var(--titre); font-size: 1.1rem; display: flex; align-items: center; justify-content: center; }
.tirage.choisie { outline: 5px solid var(--rouge); transform: scale(1.06) rotate(0); z-index: 1; }
.tirage.choisie::after { content: 'LA UNE'; position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%) rotate(-12deg); background: var(--rouge); color: #fff; font-family: var(--titre); padding: 2px 8px; border: 2px solid #fff; }
.res-total { text-align: center; font-size: 1.4rem; font-weight: 800; margin: 8px auto 16px; } .res-total b { font-family: var(--titre); font-weight: 400; color: var(--jaune); font-size: 2rem; }
.ecran-resultats > .cube-gros { display: flex; margin: 0 auto 30px; }
.une-finale { display: flex; gap: 24px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 6px 0 30px; }
.une-canvas { width: min(420px, 86vw); height: auto; border: 4px solid var(--encre); box-shadow: 12px 12px 0 rgba(0,0,0,.6); animation: tourne .9s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes tourne { from { transform: rotate(-540deg) scale(.1); opacity: 0; } to { transform: rotate(-2deg) scale(1); opacity: 1; } }
.une-droite { width: min(380px, 100%); display: flex; flex-direction: column; gap: 12px; }
.ventes-gros { background: var(--jaune); color: var(--encre); border: 4px solid var(--encre); border-radius: 14px; padding: 10px 16px; transform: rotate(1deg); box-shadow: 6px 6px 0 var(--encre); }
.ventes-gros small { font-weight: 900; letter-spacing: .1em; } .ventes-gros b { display: block; font-family: var(--titre); font-weight: 400; font-size: clamp(2.4rem, 10vw, 3.6rem); line-height: 1; } .ventes-gros span { font-weight: 800; }
.res-etoiles .etoile { width: 52px; height: 52px; }
.record { background: var(--rouge); color: #fff; font-family: var(--titre); font-size: 1.6rem; text-align: center; border-radius: 10px; border: 3px solid #fff; transform: rotate(-2deg); }
.gains { display: grid; gap: 6px; } .gains div { display: flex; justify-content: space-between; background: #26222c; border-radius: 8px; padding: 6px 10px; font-weight: 800; }
.res-bonus .cube { width: 100%; }
.res-btns { display: flex; flex-wrap: wrap; gap: 10px; } .res-btns .cube { flex: 1 1 140px; }

/* ------------------------------ toasts, pub de test ------------------------------ */
#toasts { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 40; pointer-events: none; width: max-content; max-width: 92vw; }
.toast { background: var(--papier); color: var(--encre); border: 3px solid var(--encre); border-radius: 12px; padding: 8px 14px; font-weight: 900; box-shadow: 0 4px 0 var(--encre); animation: entre .25s ease-out both; text-align: center; }
.toast.or { background: var(--jaune); } .toast.part { opacity: 0; transition: opacity .4s; }
@keyframes entre { from { transform: translateY(20px); opacity: 0; } }
.pub-test { position: fixed; inset: 0; background: rgba(10,8,14,.92); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pub-test > div { background: repeating-linear-gradient(45deg, var(--jaune) 0 22px, var(--encre) 22px 44px); padding: 10px; border-radius: 16px; width: min(440px, 100%); }
.pub-test > div > * { background: var(--papier); color: var(--encre); margin: 0; padding: 8px 14px; text-align: center; }
.pub-test b { display: block; font-family: var(--titre); font-weight: 400; font-size: 2.4rem; border-radius: 10px 10px 0 0; }
.pub-test .pt-t { display: block; font-family: var(--titre); font-size: 3rem; }
.pub-test .pt-btns { display: flex; gap: 10px; justify-content: center; border-radius: 0 0 10px 10px; padding-bottom: 14px; }

/* ------------------------------ petits écrans ------------------------------ */
@media (max-width: 560px) {
    .ecran { padding: 12px; }
    .couv { transform: none; padding: 0 12px 14px; }
    .couv-bandeau, .logo { margin-left: -12px; margin-right: -12px; }
    .pastille-couv { width: 72px; height: 72px; top: 46px; } .pastille-couv b { font-size: 1.2rem; }
    .onglets { grid-template-columns: repeat(4, 1fr); gap: 6px; } .onglet { font-size: .72rem; }
    .grille-objets { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .hud-bloc { font-size: 1.2rem; padding: 3px 8px; }
    .hud-repere i { width: 46px; }
    .declencheur { width: 92px; height: 92px; right: 16px; bottom: 22px; }
}
@media (max-height: 460px) and (orientation: landscape) {
    .hud-commande b { font-size: .9rem; } .hud-bloc { font-size: 1.1rem; }
    .declencheur { width: 84px; height: 84px; bottom: 14px; }
    .zoom { height: 52vh; }
}

/* ------------------------------ mode photosensible ------------------------------ */
body.photosensible .vignette, body.photosensible .une-canvas, body.photosensible .gain { animation: none; }
body.photosensible #tampon.vu { animation: tamponDoux 1.1s ease both; }
@keyframes tamponDoux { 0%, 100% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg); } 20%, 75% { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .une-jouer:hover, .cube:hover { transform: none; } }
