/* Reviens — consumer scan page. « Le petit théâtre Reviens » paper-craft.
 * Mobile-first. Merchant colour (--m10k-brand) trims ACCENTS only; the scarce
 * spot-red drives buttons so the Reviens frame always holds. No webfonts/CDN. */
:root{
    --m10k-brand:#FFD600;                /* merchant accent (overridden inline) */
    --m10k-kraft:#0B0B0B; --m10k-kraft2:#1A1A1A; --m10k-cream:#161616;
    --m10k-ink:#FFFFFF; --m10k-ink2:#A3A3A3; --m10k-line:#2A2A2A;
    --m10k-spot:#FFD600; --m10k-spot-d:#E6C200; --m10k-gold:#FFD600;
    --m10k-radius:12px;
    --m10k-fd:Georgia,'Times New Roman',serif;
    --m10k-fb:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
}
/* APP SYSTEM shell (owner-approved direction 2026-08-13) in the Média10K
   dark palette: black ground, dark sheets, bold sans, brand-driven CTAs.
   The GAME tokens above stay — the game skins keep their approved look. */
:root{
    --app-bg:#0B0B0B; --app-sheet:#161616;
    --app-ink:#FFFFFF; --app-ink2:#A9AFB8; --app-line:#26262B;
    --app-shadow:0 1px 2px rgba(0,0,0,.5),0 10px 30px rgba(0,0,0,.55);
    --app-shadow-soft:0 1px 2px rgba(0,0,0,.4),0 4px 14px rgba(0,0,0,.4);
}
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
    font-family:var(--m10k-fb);
    color:var(--app-ink);
    background:var(--app-bg);
    min-height:100vh;
    -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
    display:flex;justify-content:center;
}
.m10k-shell{
    width:100%;max-width:460px;
    padding:24px 20px 40px;
    display:flex;flex-direction:column;align-items:center;text-align:center;
    min-height:100vh;
}

/* Header — merchant identity, app-clean. */
.m10k-head{margin:6px 0 20px;min-height:40px;display:flex;flex-direction:column;align-items:center;gap:8px}
.m10k-logo{max-height:56px;width:auto}
/* Un SVG sans attributs width/height s'effondre à 0×0 dans l'entête flex
 * (taille circulaire) : hauteur FIXE pour lui seul, les rasters gardent
 * leur taille naturelle. */
.m10k-logo[src$=".svg" i],.m10k-logo[src*=".svg?" i]{height:56px;max-width:240px;object-fit:contain}
.m10k-logo-text{
    font-size:24px;font-weight:800;letter-spacing:-.02em;color:var(--app-ink);
}

/* Steps — each one ENTERS as a sequence, not a lump: the direct children rise
   in with a small stagger (title first, then content, then the button). Runs
   whenever a step flips visible; games' own internals are untouched. */
.m10k-step{width:100%;display:flex;flex-direction:column;align-items:center}
.m10k-step[hidden]{display:none}
.m10k-step>*{animation:m10k-fade .42s cubic-bezier(.165,.84,.44,1) both}
.m10k-step>*:nth-child(2){animation-delay:60ms}
.m10k-step>*:nth-child(3){animation-delay:120ms}
.m10k-step>*:nth-child(4){animation-delay:180ms}
.m10k-step>*:nth-child(n+5){animation-delay:240ms}
@keyframes m10k-fade{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

.m10k-title{font-size:28px;font-weight:800;line-height:1.1;letter-spacing:-.025em;color:var(--app-ink);margin-bottom:8px}
.m10k-sub{font-size:14.5px;color:var(--app-ink2);margin-left:auto;margin-right:auto;margin-bottom:22px;max-width:300px;line-height:1.5}
.m10k-prize{font-size:22px;font-weight:800;letter-spacing:-.015em;color:var(--app-ink);margin:4px 0 16px}

/* Buttons — the merchant's guarded accent, app-grade. */
.m10k-btn{
    width:100%;max-width:340px;min-height:56px;
    border:none;border-radius:16px;cursor:pointer;
    font-size:16.5px;font-weight:800;font-family:var(--m10k-fb);
    padding:16px 28px;
    background:var(--m10k-wa,#B23A2E);color:var(--m10k-wa-fg,#fff);
    box-shadow:0 10px 24px color-mix(in srgb, var(--m10k-wa,#B23A2E) 32%, transparent);
    transition:transform .12s ease,box-shadow .12s ease,opacity .2s ease;
}
.m10k-btn:hover{transform:translateY(-1px)}
.m10k-btn:active{transform:translateY(1px) scale(.99);transition-duration:.06s}
.m10k-btn:disabled{opacity:.55;cursor:not-allowed;transform:none}
.m10k-btn--claim{margin-top:8px}

/* Win beat — brand medallion (halo rings + gradient core + gift) pops in;
   the prize lands on a white card with the merchant's name. */
.m10k-winmedal{position:relative;width:124px;height:124px;margin:2px 0 16px;animation:m10k-pop .55s cubic-bezier(.2,.86,.3,1) both}
.m10k-winmedal .ring{position:absolute;inset:0;border-radius:50%;border:2px dashed color-mix(in srgb, var(--m10k-wa,#B23A2E) 35%, transparent)}
.m10k-winmedal .halo{position:absolute;inset:10px;border-radius:50%;background:color-mix(in srgb, var(--m10k-wa,#B23A2E) 10%, transparent)}
.m10k-winmedal .core{
    position:absolute;inset:22px;border-radius:50%;
    background:linear-gradient(150deg,
        color-mix(in srgb, var(--m10k-wa,#B23A2E) 80%, #fff) 0%,
        var(--m10k-wa,#B23A2E) 60%,
        color-mix(in srgb, var(--m10k-wa,#B23A2E) 70%, #000) 100%);
    display:flex;align-items:center;justify-content:center;
    box-shadow:0 12px 30px color-mix(in srgb, var(--m10k-wa,#B23A2E) 35%, transparent),inset 0 1px 0 rgba(255,255,255,.35);
}
.m10k-winmedal .core svg{width:32px;height:32px}
@keyframes m10k-pop{0%{transform:scale(0)}70%{transform:scale(1.12)}100%{transform:scale(1)}}
.m10k-winkick{font-size:12.5px;font-weight:800;letter-spacing:.16em;text-transform:uppercase;
    color:var(--m10k-wa,#B23A2E);margin-bottom:4px}
/* The prize IS the star: the biggest text on the screen after the title. */
.m10k-winprize{
    max-width:330px;margin:10px 0 2px;
    font-size:30px;font-weight:800;line-height:1.12;letter-spacing:-.025em;
    color:var(--app-ink);overflow-wrap:anywhere;
}
.m10k-winat{font-size:14px;font-weight:600;color:var(--app-ink2);margin-bottom:14px}

/* Form — a white app sheet. */
.m10k-form{
    width:100%;max-width:360px;display:flex;flex-direction:column;gap:14px;text-align:left;
    background:var(--app-sheet);
    border:1px solid var(--app-line);border-radius:22px;
    box-shadow:var(--app-shadow-soft);
    padding:20px 18px;
}
.m10k-field label{display:block;font-size:13.5px;font-weight:700;margin-bottom:6px;color:var(--app-ink)}
.m10k-opt{color:var(--app-ink2);font-weight:400}
.m10k-req{color:var(--m10k-spot)}
.m10k-field input{
    width:100%;min-height:52px;
    padding:14px 16px;font-size:16px;/* 16px prevents iOS zoom */
    border-radius:14px;border:1.5px solid var(--app-line);
    background:#fff;color:var(--app-ink);font-family:inherit;
}
.m10k-field input:focus{outline:none;border-color:var(--m10k-wa,#B23A2E);box-shadow:0 0 0 3px color-mix(in srgb,var(--m10k-wa,#B23A2E) 20%,transparent)}
.m10k-consent{display:flex;gap:10px;align-items:flex-start;font-size:13px;color:var(--app-ink2);line-height:1.4;cursor:pointer}
.m10k-consent input{margin-top:2px;width:20px;height:20px;flex-shrink:0;accent-color:var(--m10k-wa,#B23A2E)}
.m10k-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

/* Birthday capture (optional, collapsed behind a toggle) */
.m10k-bday{width:100%}
.m10k-bday-toggle{
    width:100%;min-height:48px;
    background:transparent;border:1.5px dashed var(--m10k-line);
    color:var(--m10k-ink2);border-radius:10px;padding:12px 14px;
    font-size:14px;font-weight:600;font-family:inherit;cursor:pointer;text-align:left;
}
.m10k-bday-toggle:hover{color:var(--m10k-ink);border-color:var(--m10k-brand)}
.m10k-bday-panel{margin-top:12px}
.m10k-bday-panel[hidden]{display:none}
.m10k-bday-selects{display:flex;gap:10px}
.m10k-bday-selects select{
    flex:1;min-height:52px;padding:14px 12px;font-size:16px;/* 16px prevents iOS zoom */
    border-radius:10px;border:2px solid var(--m10k-line);
    background:#fff;color:var(--m10k-ink);font-family:inherit;
}
.m10k-bday-selects select:focus{outline:none;border-color:var(--m10k-brand);box-shadow:0 0 0 4px color-mix(in srgb,var(--m10k-brand) 22%,transparent)}
.m10k-bday-hint{font-size:12px;color:var(--m10k-ink2);margin-top:8px;line-height:1.4}

/* Coupon code — dashed paper ticket on a light card. */
.m10k-code{
    font-family:'SF Mono',Consolas,monospace;
    font-size:30px;font-weight:700;letter-spacing:.12em;
    background:var(--m10k-kraft2);border:2px dashed var(--m10k-brand);
    border-radius:14px;padding:18px 20px;margin:4px 0 12px;
    color:var(--m10k-ink);
}

/* Coupon ticket — paper card with QR + code, shown on-screen after claim and on
 * the shareable /c/ coupon page. Staff scans the QR at the caisse. */
.m10k-ticket{
    width:100%;max-width:340px;margin:6px auto 4px;
    background:var(--m10k-cream);
    border:2px dashed var(--m10k-brand);border-radius:16px;
    box-shadow:4px 5px 0 rgba(44,35,24,.14);
    padding:22px 22px 24px;text-align:center;
}
.m10k-ticket__label{
    font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;
    color:var(--m10k-brand-text,var(--m10k-brand));margin-bottom:10px;
}
.m10k-ticket__prize{
    font-family:var(--m10k-fd);font-size:24px;font-weight:700;line-height:1.2;
    color:var(--m10k-ink);margin:0 0 16px;
}
.m10k-ticket__qr{
    background:#fff;border:1px solid var(--m10k-line);border-radius:12px;
    padding:12px;display:inline-block;line-height:0;margin-bottom:14px;
}
.m10k-ticket__qr canvas{display:block;width:200px;height:200px;image-rendering:pixelated}
.m10k-ticket__code{
    font-family:'SF Mono',Consolas,Monaco,monospace;
    font-size:26px;font-weight:700;letter-spacing:.1em;color:var(--m10k-ink);
}
.m10k-ticket__hint{font-size:14px;font-weight:600;color:var(--m10k-ink2);margin-top:10px}
.m10k-ticket__valid{font-size:13px;color:var(--m10k-ink2);margin-top:6px}
.m10k-ticket--void{border-style:solid;border-color:var(--m10k-line);opacity:.72}
.m10k-ticket--void .m10k-ticket__code{text-decoration:line-through}
.m10k-ticket__link{
    display:inline-block;margin-top:16px;font-size:14px;font-weight:600;
    color:var(--m10k-brand-text,var(--m10k-brand));text-decoration:underline;
}
.m10k-ticket__link[hidden]{display:none}

/* Coupon / carte reveal — the wallet Pass, inside the game shell. Mirrors the
 * wallet APP system (assets/wallet.css .w-band): full-bleed brand field with
 * watermark + state chip, white QR sheet below. Band colour = the contrast-
 * guarded wallet accent (--m10k-wa, emitted by scan.php), never the raw brand.
 * The pass carries its own z-index so the win confetti (z:50) falls BEHIND
 * it — never over the QR. */
.m10k-wpass{
    position:relative;z-index:60;
    width:100%;max-width:360px;margin:4px auto 0;
    background:var(--app-sheet);border-radius:22px;overflow:hidden;
    box-shadow:var(--app-shadow);
    text-align:left;
}
.m10k-wpass__band{
    position:relative;display:block;overflow:hidden;
    padding:14px 15px 13px;
    background:var(--m10k-wa,#31473A);
    background:linear-gradient(135deg,
        color-mix(in srgb, var(--m10k-wa,#31473A) 82%, #fff) 0%,
        var(--m10k-wa,#31473A) 55%,
        color-mix(in srgb, var(--m10k-wa,#31473A) 70%, #000) 100%);
    color:var(--m10k-wa-fg,#FFFFFF);
}
.m10k-wpass__band::after{
    content:"";position:absolute;inset:0;pointer-events:none;
    background:radial-gradient(130% 90% at 100% 0%,rgba(255,255,255,.18),transparent 55%),
               radial-gradient(90% 70% at 0% 100%,rgba(0,0,0,.16),transparent 60%);
}
.m10k-wpass__band::before{
    content:attr(data-wm);position:absolute;right:-12px;bottom:-36px;
    font-size:130px;font-weight:800;line-height:1;
    color:rgba(255,255,255,.07);transform:rotate(-8deg);
    pointer-events:none;user-select:none;
}
.m10k-wpass__row{display:flex;align-items:center;gap:12px;position:relative;z-index:1}
.m10k-wpass__logo{
    flex:0 0 auto;width:40px;height:40px;overflow:hidden;
    display:flex;align-items:center;justify-content:center;
    background:#fff;border-radius:12px;box-shadow:0 1px 3px rgba(0,0,0,.2);
}
.m10k-wpass__logo img{max-width:32px;max-height:32px;width:auto;height:auto;object-fit:contain;display:block}
.m10k-wpass__logo b{font-size:18px;font-weight:800;line-height:1;color:var(--m10k-wa,#31473A)}
.m10k-wpass__id{min-width:0;flex:1 1 auto}
.m10k-wpass__biz{display:block;font-size:15.5px;font-weight:800;line-height:1.25;overflow-wrap:anywhere}
.m10k-wpass__kind{display:block;margin-top:2px;font-size:10.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;opacity:.85}
.m10k-wpass__chip{
    flex:0 0 auto;padding:5px 11px;border-radius:999px;
    background:rgba(255,255,255,.93);color:#0E8345;
    font-size:11px;font-weight:800;letter-spacing:.03em;white-space:nowrap;
}
.m10k-wpass__chip--warn{color:#B45309}
.m10k-wpass__prize{position:relative;z-index:1;margin:16px 2px 2px;font-size:21px;font-weight:800;letter-spacing:-.015em;overflow-wrap:anywhere}
.m10k-wpass__prize:empty{display:none}
.m10k-wpass__body{padding:18px 16px;text-align:center;background:var(--app-sheet)}
.m10k-wpass__well{display:inline-block;line-height:0;padding:2px}
.m10k-wpass__well canvas{display:block;width:180px;height:180px;image-rendering:pixelated}
.m10k-wpass__code{margin-top:10px;font-family:'SF Mono',Consolas,Monaco,monospace;font-size:18px;font-weight:700;letter-spacing:.14em;color:var(--app-ink)}
.m10k-wpass__hint{font-size:13.5px;font-weight:600;color:var(--app-ink2);margin-top:8px}
.m10k-wpass__valid{font-size:12.5px;color:var(--app-ink2);margin-top:6px}
.m10k-wpass__valid[hidden],.m10k-wpass__valid:empty{display:none}
/* Online-store code (online-only merchants) — client-facing, unlike pos_ref. */
.m10k-wpass__online{
    display:inline-block;margin-top:12px;padding:9px 14px;
    background:var(--app-bg);border-radius:12px;
    font-size:13px;font-weight:600;color:var(--app-ink2);
}
.m10k-wpass__online b{font-family:'SF Mono',Consolas,Monaco,monospace;font-size:14px;letter-spacing:.08em;color:var(--app-ink);margin-left:4px}
.m10k-wpass__online[hidden]{display:none}
/* The pass LANDS: drops in with a slight overshoot and settles — the confetti
   burst (scan-core) is timed to the touchdown. Same beat for the punch card. */
[data-step="coupon"] .m10k-wpass,
.m10k-pass .m10k-wpass{animation:m10k-land .6s cubic-bezier(.2,.86,.3,1) both;animation-delay:140ms}
@keyframes m10k-land{
    0%{opacity:0;transform:translateY(-20px) scale(1.03)}
    62%{opacity:1;transform:translateY(3px) scale(1.005)}
    100%{opacity:1;transform:none}
}
/* Logistics read AFTER the reward: the sent-note sits below the pass. */
.m10k-wpass~.m10k-sent{margin:18px auto 0}
.m10k-wpass~.m10k-ticket__link,.m10k-sent~.m10k-ticket__link{margin-top:14px}

/* Status / errors */
.m10k-status{margin-top:14px;font-size:14px;font-weight:600;color:var(--m10k-spot-d)}
.m10k-status[hidden]{display:none}

.m10k-foot{font-size:13px;color:var(--m10k-ink2);margin-top:14px}

/* « C'est envoyé » note — the coupon reveal states plainly that the courriel is
 * already on its way, so nobody wonders whether they have to ask for it. Carries
 * .m10k-foot too, so the merchant's aperçu (which sends nothing) hides it. */
.m10k-sent{
    display:flex;gap:9px;align-items:flex-start;
    width:100%;max-width:340px;margin:2px auto 16px;
    padding:11px 13px;text-align:left;
    background:var(--app-sheet);
    border:1px solid var(--app-line);border-radius:14px;
    box-shadow:var(--app-shadow-soft);
    font-size:13px;line-height:1.45;color:var(--app-ink2);
}
.m10k-sent svg{flex:0 0 auto;margin-top:2px}

/* « Propulsé par Media10K » — discreet footer link. */
.m10k-footer{margin-top:auto;padding-top:28px;font-size:12px;color:var(--m10k-ink2)}
.m10k-footer a{color:var(--m10k-ink2);text-decoration:none;font-weight:600}
.m10k-footer a b{color:var(--m10k-spot);font-weight:700}
.m10k-footer a:hover{color:var(--m10k-ink)}

/* Paper confetti — one restrained burst on the coupon reveal.
 * Hard-edged squares in a desaturated palette (no gradients, no blur). */
.m10k-confetti{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:50}
.m10k-confetti i{
    position:absolute;top:-16px;width:10px;height:10px;
    opacity:.9;will-change:transform;
    animation:m10k-conf 1600ms cubic-bezier(.2,.6,.4,1) forwards;
}
@keyframes m10k-conf{
    0%{transform:translateY(-10px) rotate(0);opacity:0}
    12%{opacity:.95}
    100%{transform:translateY(105vh) rotate(540deg);opacity:.9}
}
@media(prefers-reduced-motion:reduce){
    .m10k-confetti{display:none}
    .m10k-btn,.m10k-step,.m10k-step>*,.m10k-winmedal,
    [data-step="coupon"] .m10k-wpass,.m10k-pass .m10k-wpass{transition:none;animation:none}
}

/* ═══════════════ Media10K dark shell (site background spec) ═══════════ */
/* Black page; the game object and light surfaces pop on it. Yellow CTAs
   with BLACK text; white inputs keep dark text. Sans everywhere. */
/* Text colour stays var(--m10k-wa-fg): the server pairs it to the accent with
   a contrast guard — forcing dark text here broke dark accents (purple). */
.m10k-btn{box-shadow:3px 3px 0 #000}
.m10k-btn:hover{box-shadow:5px 5px 0 #000}
.m10k-btn:active{box-shadow:0 0 0 #000}
.m10k-btn:disabled{box-shadow:3px 3px 0 #000}
.m10k-field input,.m10k-field select,.m10k-bday-selects select{color:#141414}
.m10k-form{border-color:#000;box-shadow:6px 7px 0 rgba(0,0,0,.5)}
.m10k-form,.m10k-form label{color:#FFFFFF}
.m10k-ticket{box-shadow:4px 5px 0 rgba(0,0,0,.5)}
.m10k-status{color:#F87171}


/* ============================================================
   Scene commune des jeux (« Révélation 9,5 », portée de Reviens) :
   salve d'etincelles + pulsation au gain (posées par RB.winBurst),
   et la carte de lot partagée. Couleurs LITTÉRALES : les cartes de
   jeu sont blanches — les jetons du thème sombre s'y inversent.
   ============================================================ */
.m10k-wspark{
    position:absolute;left:50%;top:50%;width:8px;height:8px;border-radius:2px;
    background:#D9A441;z-index:6;pointer-events:none;
    box-shadow:0 0 6px color-mix(in srgb, #D9A441 75%, transparent);
    animation:m10k-wspark-fly .9s cubic-bezier(.15,.6,.3,1) forwards;
    animation-delay:var(--d,0ms);
}
@keyframes m10k-wspark-fly{
    0%  {opacity:0;transform:translate(-50%,-50%) rotate(var(--a)) translateY(var(--r0)) scale(.4)}
    18% {opacity:1}
    100%{opacity:0;transform:translate(-50%,-50%) rotate(var(--a)) translateY(var(--r1)) scale(1)}
}
.m10k-won-pulse{animation:m10k-won-pulse .9s cubic-bezier(.2,.86,.3,1)}
@keyframes m10k-won-pulse{
    0%{transform:scale(1)} 35%{transform:scale(1.035)} 100%{transform:scale(1)}
}
@media(prefers-reduced-motion:reduce){
    .m10k-wspark{display:none}
    .m10k-won-pulse{animation:none}
}
/* La carte de lot — costume unique (crème, jonc d'or double, gros serif). */
.m10k-wintag{
    position:absolute;z-index:7;
    display:flex;flex-direction:column;align-items:center;gap:4px;
    padding:14px 14px 12px;box-sizing:border-box;
    background:#F6EFDF;
    border:2px solid #2C2318;border-radius:12px;
    box-shadow:
        inset 0 0 0 2.5px #F6EFDF,
        inset 0 0 0 4px #D9A441,
        0 10px 24px rgba(20,15,8,.22),
        0 0 54px 10px color-mix(in srgb, #D9A441 32%, transparent);
    text-align:center;color:#2C2318;
    opacity:0;pointer-events:none;
}
.m10k-wintag__kick{
    font-family:var(--m10k-fb);font-size:10.5px;font-weight:800;
    letter-spacing:.16em;text-transform:uppercase;color:#6E5D45;
}
.m10k-wintag__prize{
    font-family:var(--m10k-fd);font-size:20px;font-weight:700;line-height:1.15;
}

/* « Où réclamer » — le pont entre le carton scanné à la maison et la visite.
   Couleurs littérales (cartes blanches, jetons sombres inversés). */
.m10k-loc{
    margin:16px auto 0;max-width:340px;padding:13px 14px 12px;
    background:#fff;border:1.5px dashed #C9B896;border-radius:12px;
    text-align:center;
}
.m10k-loc__t{
    display:block;font-size:10px;font-weight:800;letter-spacing:.14em;
    text-transform:uppercase;color:#6E5D45;
}
.m10k-loc__addr{margin:6px 0 0;font-size:13.5px;font-weight:600;line-height:1.4;color:#2C2318}
.m10k-loc__row{display:flex;gap:8px;justify-content:center;margin-top:10px;flex-wrap:wrap}
.m10k-loc__btn{
    display:inline-flex;align-items:center;gap:7px;min-height:44px;padding:9px 16px;
    background:#2C2318;color:#fff;border-radius:10px;text-decoration:none;
    font-size:13.5px;font-weight:700;
}
.m10k-loc__btn:active{transform:translateY(1px)}
/* leads : l'appel direct après l'envoi — jamais un cul-de-sac.
   Il porte le costume CTA de la maison (jaune) : l'urgence mérite le bouton fort. */
.m10k-btn--call{margin-top:14px;text-decoration:none}

/* Démo prospect : le tour guidé raconte le produit, un ruban par étape. */
.m10k-prospect-note{
    margin:0 auto 14px;max-width:420px;padding:9px 14px;
    background:var(--app-sheet,#FFFFFF);border:1.5px dashed var(--app-line,#E7E2D8);
    border-radius:10px;text-align:center;
    font-size:13px;font-weight:600;line-height:1.45;color:var(--app-ink2,#5B6470);
}
