/* =========================================================
   Skoor — système visuel
   Blanc, noir, 5 couleurs pleines. Signatures : l'arche et le ticket.
   ========================================================= */
:root {
  --white: #fff;
  --ink: #111;
  --ink-2: #6b6b6b;
  --ink-3: #a3a3a3;
  --grey: #f3f3f1;
  --grey-2: #e7e7e4;
  --beige: #efeee8;
  --line: rgba(0, 0, 0, .08);

  --green: #1d8a4c;
  --pink: #f7a8dc;
  --yellow: #ede44c;
  --lilac: #b48ce0;
  --orange: #fa9a3a;
  --red: #d23b2a;

  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabbar: calc(84px + var(--safe-b));
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { font-family: var(--font); color: var(--ink); font-size: 16px; line-height: 1.35; -webkit-font-smoothing: antialiased; overflow: hidden; background: #141218; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
input { font: inherit; color: inherit; }
b { font-weight: 600; }
img { display: block; max-width: 100%; }
.muted { color: var(--ink-3); font-size: 15px; font-weight: 500; }
:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 2px; border-radius: 12px; }

/* ---------- Conteneur ---------- */
.app { position: relative; height: 100%; max-width: 430px; margin: 0 auto; overflow: hidden; background: var(--white); font-variant-numeric: tabular-nums; }
@media (min-width: 520px) {
  body { display: grid; place-items: center; padding: 24px; }
  .app { width: 400px; height: min(860px, calc(100vh - 48px)); border-radius: 48px; }
}

/* ---------- Écrans (s'arrêtent au-dessus des onglets) ---------- */
.screen { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; padding: calc(var(--safe-t) + 20px) 20px calc(var(--tabbar) + 24px); opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; scrollbar-width: none; }
.screen::-webkit-scrollbar { display: none; }
.screen.is-active { opacity: 1; visibility: visible; transition: opacity .2s; }

/* ---------- En-tête ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 2px; margin-bottom: 18px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-size: 25px; font-weight: 800; letter-spacing: -.045em; text-transform: lowercase; --logo-s: var(--yellow); }
.logo-mark { flex: none; width: 1.08em; height: 1.08em; color: var(--ink); }
.h1 { font-size: 28px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
.sub { font-size: 14px; color: var(--ink-2); margin-top: 3px; }
.me { display: flex; align-items: center; gap: 12px; min-width: 0; }
.me .h1 { font-size: 22px; }
.avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; font-weight: 700; background: var(--ink); color: #fff; }
.verified { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: 99px; background: rgba(29,138,76,.12); color: var(--green); font-size: 13px; font-weight: 600; }

/* =========================================================
   TICKET — encoches sur la ligne de découpe, talon pointillé
   ========================================================= */
.tk {
  --cut: 64px; --r: 8px; --dash: rgba(0,0,0,.28);
  position: relative; display: flex; align-items: stretch; border-radius: 14px; background: var(--yellow); color: var(--ink);
  -webkit-mask: radial-gradient(circle var(--r) at calc(100% - var(--cut)) 0, #0000 97%, #000 100%), radial-gradient(circle var(--r) at calc(100% - var(--cut)) 100%, #0000 97%, #000 100%);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(circle var(--r) at calc(100% - var(--cut)) 0, #0000 97%, #000 100%), radial-gradient(circle var(--r) at calc(100% - var(--cut)) 100%, #0000 97%, #000 100%);
  mask-composite: intersect;
}
.tk-main { flex: 1; min-width: 0; display: flex; }
.tk-stub { flex: none; width: var(--cut); display: flex; flex-direction: column; align-items: center; justify-content: center; border-left: 2px dashed var(--dash); }
.tk.dark { background: var(--ink); color: #fff; --dash: rgba(255,255,255,.3); }
button.tk { transition: transform .15s; }
button.tk:active { transform: scale(.96); }

/* Solde (en-tête) */
.tk-bal { --cut: 42px; --r: 6px; height: 44px; border-radius: 12px; flex: none; }
.tk-bal .tk-main { align-items: center; gap: 7px; padding: 0 12px 0 13px; font-size: 16px; }
.tk-bal .tk-main i { font-size: 19px; }
.tk-bal .tk-main b { font-weight: 700; }
.tk-bal .tk-stub i { font-size: 19px; }

/* Gros ticket (Gagner) */
.tk-big { --cut: 116px; --r: 12px; height: 150px; border-radius: 26px; }
.tk-big .tk-main { flex-direction: column; padding: 18px 20px; }
.tk-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.tk-lbl i { font-size: 17px; }
.tk-big .tk-main b { font-size: 52px; font-weight: 700; letter-spacing: -.045em; line-height: 1; margin-top: auto; }
.tk-big .tk-main small, .tk-big .tk-stub small { font-size: 13px; opacity: .65; margin-top: 4px; }
.tk-big .tk-stub b { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }

/* Petit ticket « mes tickets » sur les cartes (encoches latérales) */
.tk-chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 11px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap;
  -webkit-mask: radial-gradient(circle 5px at 0 50%, #0000 97%, #000 100%), radial-gradient(circle 5px at 100% 50%, #0000 97%, #000 100%); -webkit-mask-composite: source-in;
  mask: radial-gradient(circle 5px at 0 50%, #0000 97%, #000 100%), radial-gradient(circle 5px at 100% 50%, #0000 97%, #000 100%); mask-composite: intersect; }
.tk-chip i { color: var(--yellow); font-size: 13px; }
.tk-chip.gold { height: 30px; padding: 0 13px; background: var(--yellow); color: var(--ink); font-size: 14px; }

/* Ticket « mes tickets misés » dans la fiche */
.tk-mine { --cut: 92px; --r: 9px; margin-top: 14px; min-height: 72px; border-radius: 22px; }
.tk-mine .tk-main { flex-direction: column; justify-content: center; padding: 12px 16px; }
.tk-mine .tk-main b { font-size: 18px; font-weight: 700; }
.tk-mine .tk-main small { font-size: 13px; opacity: .7; }
.tk-mine .tk-stub { gap: 2px; font-size: 12px; font-weight: 600; }
.tk-mine .tk-stub i { font-size: 20px; }

/* Ticket de mise */
.tk-stake { --cut: 100px; --r: 11px; margin-top: 18px; height: 112px; border-radius: 22px; }
.tk-stake .tk-main { align-items: center; padding: 0 18px; }
.tk-stake .tk-stub small { font-size: 12px; opacity: .65; }
.tk-stake .tk-stub b { font-size: 18px; font-weight: 700; margin-top: 2px; }

/* Ticket cadeau (parrainage) */
.tk-gift { --cut: 54px; --r: 8px; height: 88px; width: 220px; border-radius: 16px; background: var(--ink); color: #fff; --dash: rgba(255,255,255,.3); transform: rotate(-6deg); }
.tk-gift .tk-main { flex-direction: column; justify-content: center; padding: 0 18px; }
.tk-gift .tk-main b { font-size: 40px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.tk-gift .tk-main small { font-size: 13px; opacity: .7; }
.tk-gift .tk-stub i { font-size: 22px; color: var(--yellow); }

/* Ticket lien de parrainage */
.tk-link { --cut: 86px; --r: 9px; --dash: rgba(0,0,0,.18); height: 64px; margin: 10px 0; border-radius: 16px; background: var(--grey); }
.tk-link .tk-main { flex-direction: column; justify-content: center; padding: 0 18px; font-size: 15px; color: var(--ink-2); }
.tk-link .tk-main small { font-size: 12px; color: var(--ink-3); }
.tk-link .tk-main b { color: var(--ink); }
.tk-link .tk-stub { gap: 3px; font-size: 12px; font-weight: 700; }
.tk-link .tk-stub i { font-size: 19px; }
.tk-link .tk-stub:active { background: var(--grey-2); }

/* Bouton « + » rond */
.plus { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: var(--ink); font-size: 15px; }
.plus.sm { width: 26px; height: 26px; font-size: 13px; }

/* ---------- Comment ça marche ---------- */
.howto { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 12px 10px 12px 14px; border-radius: 22px; background: var(--grey); }
.howto ol { flex: 1; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.howto li { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 13px; font-weight: 600; line-height: 1.2; }
.howto li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.x { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: #fff; }

/* Couleurs */
.c-green { background: var(--green); color: #fff; }
.c-pink { background: var(--pink); }
.c-yellow { background: var(--yellow); }
.c-lilac { background: var(--lilac); }
.c-orange { background: var(--orange); }
.c-grey { background: var(--grey-2); }
.group .ico.c-grey { background: #fff; }

/* =========================================================
   ARCHE + VISUEL — réglé par lot (--aw largeur d'arche,
   --iw/--ih taille max de l'image, --ib décalage du bas)
   ========================================================= */
.stage { position: relative; display: flex; justify-content: center; align-items: center; }
.arch { display: none; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: var(--aw, 64%); height: 88%; border-radius: 999px 999px 0 0; background: rgba(0, 0, 0, .08); }
.c-green .arch { background: rgba(0, 0, 0, .17); }
.stage img { position: relative; max-width: var(--iw, 60%); max-height: var(--ih, 88%); width: auto; height: auto; margin: 0; object-fit: contain; transform: rotate(var(--rot, 0deg)); filter: drop-shadow(0 10px 12px rgba(0,0,0,.2)); }
.stage .fallback { display: none; position: relative; font-size: 72px; opacity: .85; }
.stage.no-img img { display: none; }
.stage.no-img .fallback { display: block; }

/* Carte cadeau dessinée */
.giftcard { position: relative; container-type: inline-size; display: flex; flex-direction: column; justify-content: space-between; width: var(--iw, 70%); aspect-ratio: 1.586; margin: 0; padding: 7% 8%; border-radius: 9% / 14%; background: var(--ink); color: #fff; transform: rotate(-6deg); box-shadow: 0 14px 20px -10px rgba(0,0,0,.4); }
.gc-top span { text-transform: lowercase; }
.gc-top { display: flex; justify-content: space-between; align-items: center; font-size: 9cqw; font-weight: 700; letter-spacing: -.02em; }
.gc-top i { color: var(--yellow); font-size: 11cqw; }
.giftcard b { font-size: 25cqw; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.gc-bot { font-size: 7cqw; opacity: .6; white-space: nowrap; }

/* ---------- Étiquettes ---------- */
.label { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: rgba(255,255,255,.65); white-space: nowrap; }
.label i { font-size: 13px; }
.c-green .label { background: rgba(255,255,255,.2); }

/* ---------- Lot à la une ---------- */
.feature { display: flex; flex-direction: column; width: 100%; padding: 16px 16px 18px; border-radius: 32px; transition: transform .15s; }
.feature:active { transform: scale(.985); }
.f-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.f-top .label { height: 32px; font-size: 13px; padding: 0 13px; }
.cal { position: relative; flex: none; width: 58px; height: 64px; border-radius: 16px; background: #fff; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 8px; line-height: 1; overflow: hidden; }
.cal::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 15px; background: var(--ink); }
.cal::after { content: ""; position: absolute; top: 4px; left: 15px; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 21px 0 0 #fff; }
.cal b { font-size: 23px; font-weight: 700; letter-spacing: -.03em; }
.cal small { font-size: 10.5px; color: var(--ink-2); margin-top: 3px; }
.badge-sq { flex: none; width: 58px; height: 58px; border-radius: 16px; background: #fff; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.badge-sq b { font-size: 23px; font-weight: 700; letter-spacing: -.03em; }
.badge-sq small { font-size: 11px; color: var(--ink-2); margin-top: 3px; }
.feature .stage { height: 230px; margin: 8px 0 0; }
.f-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 16px 4px 0; }
.f-foot b { display: block; font-size: 25px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.f-foot small { display: block; font-size: 14px; opacity: .72; margin-top: 4px; }
.f-foot .pill-black { height: 48px; padding: 0 20px; }

/* ---------- Grille ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { display: flex; flex-direction: column; min-width: 0; padding: 12px 12px 14px; border-radius: 26px; transition: transform .15s; }
.tile:active { transform: scale(.97); }
.tile-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.tile-top .tk-chip { height: 28px; }
.tile .stage { height: 128px; margin: 8px 0 0; }
.tile-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin: 10px 2px 0; }
.tile-foot > span:first-child { min-width: 0; }
.tile-foot b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-foot small { display: block; font-size: 13px; opacity: .72; }
.c-green .tk-chip { background: #fff; color: var(--ink); }
.c-green .tk-chip i { color: var(--green); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { display: flex; flex-direction: column; height: 120px; padding: 18px; border-radius: 26px; }
.stat b { font-size: 42px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.stat span { margin-top: auto; font-size: 14px; }
.stat.light { background: var(--beige); }
.stat.light span { color: var(--ink-2); }
.stat.dark { background: var(--ink); color: #fff; }
.stat.dark span { color: rgba(255,255,255,.75); }

/* ---------- Boutons ---------- */
.btn-black, .btn-outline { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 56px; border-radius: 99px; font-size: 16px; font-weight: 700; text-align: center; transition: transform .15s; }
.btn-black { background: var(--ink); color: #fff; }
.btn-outline { border: 1.5px solid var(--ink); }
.btn-black:active, .btn-outline:active, .pill-black:active { transform: scale(.97); }
.btn-black i, .btn-outline i { font-size: 20px; }
.btn-black[disabled] { opacity: .35; pointer-events: none; }
.pill-black { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 18px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 700; white-space: nowrap; transition: transform .15s; }
.pill-black i { font-size: 16px; }
.c-green .pill-black { background: #fff; color: var(--ink); }
.mt { margin-top: 24px; }

/* ---------- Listes ---------- */
.sec { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 4px 12px; }
.sec h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.group { background: var(--grey); border-radius: 24px; padding: 2px 16px; }
.row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 11px 0; }
.row + .row { border-top: 1px solid var(--line); }
button.row:active { opacity: .6; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main b { font-size: 15px; }
.row-main small { font-size: 13px; color: var(--ink-2); margin-top: 1px; }
.chev { color: var(--ink-3); font-size: 15px; }
.ico { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; font-weight: 700; overflow: hidden; }
.ico img { width: 34px; height: 34px; object-fit: contain; }
.num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--ink); color: #fff; }
.tag { flex: none; display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 600; background: #fff; }
.reward { flex: none; height: 30px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 99px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; }
.win-tk { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.win-tk .tk-chip { background: #fff; color: var(--ink); }
.win-tk .tk-chip i { color: var(--ink-3); }
.win-tk small { font-size: 12px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.mini { display: block; height: 4px; border-radius: 4px; background: var(--grey-2); margin-top: 8px; overflow: hidden; }
.mini span { display: block; height: 100%; background: var(--ink); }
.note { display: flex; gap: 10px; font-size: 13px; color: var(--ink-2); line-height: 1.5; margin: 12px 4px 0; }
.note i { font-size: 18px; flex: none; margin-top: 1px; }
.legal { margin: 26px 4px 0; font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.legal p + p { margin-top: 8px; }

/* ---------- Carte de membre ---------- */
.member { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; height: 200px; padding: 20px; border-radius: 26px; background: var(--ink); color: #fff; }
.m-arch { position: absolute; right: -56px; bottom: -10px; width: 170px; height: 196px; border-radius: 999px 999px 0 0; background: rgba(255,255,255,.07); }
.m-arch::after { content: ""; position: absolute; left: 46px; right: 46px; bottom: 0; height: 100px; border-radius: 999px 999px 0 0; background: var(--ink); }
.m-top { position: relative; display: flex; justify-content: space-between; align-items: center; }
.logo.light { font-size: 19px; color: #fff; }
.logo.light .logo-mark { width: 18px; height: 20px; background: #fff; }
.logo.light .m-tag { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 8px; background: rgba(255,255,255,.12); font-size: 12px; font-weight: 600; }
.m-tag i { color: var(--yellow); }
.m-name { position: relative; }
.m-name b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.03em; }
.m-name small { font-size: 13px; opacity: .6; }
.m-foot { position: relative; display: flex; gap: 24px; }
.m-foot small { display: block; font-size: 11px; opacity: .55; }
.m-foot b { font-size: 14px; letter-spacing: .04em; }
.mt-s { margin-top: 10px; }

/* ---------- Parrainage ---------- */
.invite { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 20px; border-radius: 30px; height: 250px; }
.invite-head { position: relative; z-index: 1; }
.invite-head b { display: block; font-size: 23px; font-weight: 700; letter-spacing: -.03em; }
.invite-head small { font-size: 14px; opacity: .72; }
.invite-arch { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.link-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 56px; margin: 10px 0; padding: 0 7px 0 20px; border-radius: 99px; background: var(--grey); font-size: 15px; color: var(--ink-2); }
.link-box b { color: var(--ink); }

/* ---------- Onglets ---------- */
/* Barre d'onglets : capsule fine en verre qui flotte au-dessus du contenu.
   L'onglet actif garde l'arche de couleur qui monte du bas. */
.tabbar { position: absolute; z-index: 40; left: 14px; right: 14px; bottom: calc(10px + var(--safe-b)); height: 60px; padding: 4px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; border-radius: 30px;
  background: rgba(255, 255, 255, .74); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 0 0 .5px rgba(0,0,0,.08), 0 10px 30px -10px rgba(0,0,0,.25); }
.tabbar button { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 26px; font-size: 10.5px; font-weight: 600; letter-spacing: .01em; color: rgba(0,0,0,.5); transition: color .25s, transform .12s ease-out; }
.tabbar button::before { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: var(--tab-c); transform: translateY(102%); transition: transform .42s var(--ease); }
.tabbar i { font-size: 21px; line-height: 1; transition: transform .35s var(--ease); }
.tabbar .ph-fill { display: none; }
.tabbar button.is-on { color: var(--ink); }
.tabbar button.is-on.on-dark { color: #fff; }
.tabbar button.is-on::before { transform: none; }
.tabbar button.is-on .ph-fill { display: block; }
.tabbar button.is-on .ph-bold { display: none; }
.tabbar button.is-on i { transform: translateY(-1px); }
.tabbar button:active { transform: scale(.94); }
@media (prefers-reduced-transparency: reduce) { .tabbar { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* ---------- Feuilles ---------- */
.scrim { position: absolute; inset: 0; z-index: 50; background: rgba(30,30,30,.45); opacity: 0; pointer-events: none; transition: opacity .35s; }
.scrim.is-on { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 51; max-height: calc(100% - 50px); overflow-y: auto; padding: 10px 18px calc(18px + var(--safe-b)); border-radius: 40px; background: #fff; transform: translateY(110%); transition: transform .5s var(--ease), filter .3s; scrollbar-width: none; }
.sheet::-webkit-scrollbar { display: none; }
.sheet.is-on { transform: none; }
.sheet.is-behind { filter: brightness(.6); pointer-events: none; }
.stake { z-index: 53; background: #fff; }
.grabber { display: block; width: 40px; height: 5px; border-radius: 3px; background: rgba(0,0,0,.18); margin: 0 auto; }
.sheet-x { position: absolute; top: 36px; right: 22px; z-index: 3; width: 36px; height: 36px; background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.08); }

.art { height: 270px; margin: 10px -8px 0; border-radius: 30px; }

.d-title { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-top: 16px; }
.d-sub { font-size: 15px; color: var(--ink-2); margin-top: 4px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pills > span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--grey); }
.pills > span i { font-size: 15px; color: var(--ink-2); }

.info { margin-top: 12px; padding: 2px 16px; border-radius: 22px; background: var(--grey); }
.info.grey { background: var(--grey); }
.info > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 46px; padding: 7px 0; font-size: 14px; }
.info > div + div { border-top: 1px solid var(--line); }
.info span { color: var(--ink-2); }
.info b { font-weight: 600; text-align: right; display: inline-flex; align-items: center; gap: 8px; }
.info .mono { font-family: var(--mono); font-size: 13px; font-weight: 500; }

.sheet-actions { position: sticky; bottom: calc(-18px - var(--safe-b)); z-index: 2; display: grid; grid-template-columns: 1fr 1.7fr; gap: 10px; margin: 14px -18px calc(-18px - var(--safe-b)); padding: 10px 18px calc(18px + var(--safe-b)); background: inherit; }
.sheet-actions.one { grid-template-columns: 1fr; }
.sheet-actions .btn-black { gap: 6px; }
.sheet-actions.one .btn-black i { color: var(--yellow); }


.stake-val { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.stake-val input { width: 3em; min-width: 0; padding: 0; border: 0; outline: none; background: none; font-size: 60px; font-weight: 700; letter-spacing: -.05em; line-height: 1; -moz-appearance: textfield; }
.stake-val input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stake-val span { font-size: 16px; font-weight: 600; opacity: .65; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; margin: 22px 0 18px; border-radius: 6px; background: linear-gradient(var(--ink), var(--ink)) 0/var(--p, 10%) 100% no-repeat, var(--grey-2); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 24px; border-radius: 6px; background: var(--yellow); border: 2px solid var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.15); cursor: grab; }
input[type=range]::-moz-range-thumb { width: 30px; height: 20px; border-radius: 6px; background: var(--yellow); border: 2px solid var(--ink); cursor: grab; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick button { height: 44px; border-radius: 8px; background: var(--grey); text-align: center; font-size: 15px; font-weight: 700;
  -webkit-mask: radial-gradient(circle 6px at 0 50%, #0000 97%, #000 100%), radial-gradient(circle 6px at 100% 50%, #0000 97%, #000 100%); -webkit-mask-composite: source-in;
  mask: radial-gradient(circle 6px at 0 50%, #0000 97%, #000 100%), radial-gradient(circle 6px at 100% 50%, #0000 97%, #000 100%); mask-composite: intersect; }
.quick button:active { background: var(--ink); color: #fff; }
.over { color: var(--red); }
.more { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 12px 16px 12px 12px; border-radius: 22px; background: var(--beige); }
.more > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.more b { font-size: 15px; }
.more small { font-size: 13px; color: var(--ink-2); }
.more > i { color: var(--ink-3); }

/* ---------- Toast ---------- */
.toast { position: absolute; left: 50%; top: calc(var(--safe-t) + 12px); z-index: 60; display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100% - 32px); padding: 13px 22px; border-radius: 10px;
  -webkit-mask: radial-gradient(circle 7px at 0 50%, #0000 97%, #000 100%), radial-gradient(circle 7px at 100% 50%, #0000 97%, #000 100%); -webkit-mask-composite: source-in;
  mask: radial-gradient(circle 7px at 0 50%, #0000 97%, #000 100%), radial-gradient(circle 7px at 100% 50%, #0000 97%, #000 100%); mask-composite: intersect; background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; transform: translate(-50%, -160%); transition: transform .5s var(--ease); }
.toast.is-on { transform: translate(-50%, 0); }
.toast i { font-size: 18px; color: var(--yellow); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =========================================================
   PAGES LÉGALES — pas d'onglets, barre collante, texte long
   ========================================================= */
a { color: inherit; }
a.row { text-decoration: none; }
a.row:active { opacity: .6; }
.doc-screen { padding-top: 0; padding-bottom: calc(var(--safe-b) + 32px); }
.doc-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; margin: 0 -20px; padding: calc(var(--safe-t) + 12px) 20px 10px; background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.doc-back { width: 40px; height: 40px; font-size: 17px; background: var(--grey); text-decoration: none; }
.doc-back:active { transform: scale(.94); }
.doc-bar-title { font-size: 16px; font-weight: 700; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
.doc-screen.is-scrolled .doc-bar-title { opacity: 1; transform: none; }
.doc-head { margin: 6px 2px 22px; }

.toc { counter-reset: toc; }
.toc a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 0; font-size: 15px; font-weight: 500; text-decoration: none; }
.toc a + a { border-top: 1px solid var(--line); }
.toc a .num { width: 24px; height: 24px; font-size: 12px; background: #fff; color: var(--ink); }
.toc a:active { opacity: .6; }

.doc { font-size: 15px; line-height: 1.6; color: #2a2a2a; }
.doc section { scroll-margin-top: calc(var(--safe-t) + 70px); }
.doc h2 { display: flex; align-items: center; gap: 12px; margin: 34px 2px 12px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; color: var(--ink); }
.doc h3 { margin: 20px 2px 6px; font-size: 16px; font-weight: 700; color: var(--ink); }
.doc p, .doc ul, .doc ol { margin: 0 2px 12px; }
.doc ul, .doc ol { padding-left: 20px; }
.doc li + li { margin-top: 6px; }
.doc li::marker { color: var(--ink-3); }
.doc b, .doc strong { color: var(--ink); }
.doc a { text-decoration: underline; text-underline-offset: 2px; }
.doc .callout { display: flex; gap: 12px; margin: 14px 0; padding: 14px 16px; border-radius: 20px; background: var(--grey); font-size: 14px; line-height: 1.5; }
.doc .callout i { flex: none; font-size: 20px; margin-top: 1px; }
.doc .callout.yellow { background: var(--yellow); color: var(--ink); }
.doc .callout p { margin: 0; }

.tbl { margin: 12px 0 16px; border-radius: 20px; background: var(--grey); padding: 2px 16px; font-size: 14px; line-height: 1.45; }
.tbl > div { padding: 12px 0; }
.tbl > div + div { border-top: 1px solid var(--line); }
.tbl b { display: block; font-size: 14px; color: var(--ink); }
.tbl span { display: block; color: var(--ink-2); margin-top: 2px; }
.tbl em { display: inline-block; margin-top: 6px; padding: 2px 9px; border-radius: 99px; background: #fff; font-style: normal; font-size: 12px; font-weight: 600; color: var(--ink); }

mark.todo { padding: 0 4px; border-radius: 4px; background: var(--yellow); color: var(--ink); font-weight: 600; font-size: .92em; }

/* Interrupteur (préférences cookies) */
.switch { position: relative; flex: none; width: 51px; height: 31px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--grey-2); transition: background .25s; }
.group .switch span { background: #dcdcd8; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.15); transition: transform .3s var(--ease); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:disabled + span { opacity: .5; }
.switch input:focus-visible + span { outline: 2.5px solid var(--ink); outline-offset: 2px; }
.row.danger b { color: var(--red); }
.legal a { color: var(--ink-2); }
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; }

/* =========================================================
   PAGES DU COMPTE — segments, formulaires, vérification
   ========================================================= */
a.more, a.won, a.btn-black, a.btn-outline { text-decoration: none; }
.mono { font-family: var(--mono); }

/* Segments */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin: 18px 0 4px; padding: 4px; border-radius: 99px; background: var(--grey); }
.seg button { height: 40px; border-radius: 99px; font-size: 14px; font-weight: 600; text-align: center; color: var(--ink-2); transition: background .2s, color .2s; }
.seg button.is-on { background: var(--ink); color: #fff; }
.seg-n { margin-left: 4px; opacity: .55; }

/* Tickets supplémentaires */
.tk-sum, .tk-free { height: 140px; }
.tk-sum .tk-main small { opacity: .7; }
.tk-chip.off { background: var(--grey-2); color: var(--ink-3); text-decoration: line-through; }
.tag.ok { gap: 5px; color: var(--green); }
.tag.win { gap: 5px; background: var(--yellow); }
.btn-tag { cursor: pointer; }
.btn-tag:active { opacity: .6; }
.pill-black.sm { height: 36px; padding: 0 15px; font-size: 14px; }
.pill-black[disabled] { opacity: .35; pointer-events: none; }

/* Lot gagné */
.won { display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; border-radius: 26px; background: var(--yellow); color: var(--ink); }
.won.static { margin-bottom: 4px; }
.won-art { flex: none; width: 64px; height: 64px; border-radius: 16px; background: rgba(255,255,255,.55); display: grid; place-items: center; }
.won-art img { width: 50px; height: 50px; object-fit: contain; }
.won-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.won-main small { font-size: 12px; font-weight: 600; opacity: .7; }
.won-main b { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.won-main span { font-size: 13px; opacity: .75; }
.won .pill-black { height: 38px; padding: 0 14px; font-size: 14px; }
.won:active:not(.static) { transform: scale(.98); }

/* Vérification */
.tk-win { --cut: 72px; --r: 10px; height: 116px; border-radius: 24px; }
.tk-win .tk-main { flex-direction: column; justify-content: center; padding: 0 20px; }
.tk-win .tk-main small { font-size: 13px; font-weight: 600; opacity: .65; }
.tk-win .tk-main b { font-family: var(--mono); font-size: 38px; font-weight: 600; letter-spacing: -.04em; line-height: 1.1; }
.tk-win .tk-main span { font-size: 14px; opacity: .75; }
.tk-win .tk-stub i { font-size: 26px; }
.tk-win.is-ok { animation: pop .5s var(--ease); }
@keyframes pop { 40% { transform: scale(1.03); } }
.proof { border-radius: 22px; background: var(--grey); padding: 2px 16px; }
.proof > div { padding: 12px 0; }
.proof > div + div { border-top: 1px solid var(--line); }
.proof small { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.proof code { display: block; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; word-break: break-all; color: var(--ink); }
.vresult { margin-top: 12px; border-radius: 22px; background: var(--grey); padding: 2px 16px; }
.vresult > div { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 8px 0; font-size: 14px; }
.vresult > div + div { border-top: 1px solid var(--line); }
.vresult > div > span { flex: 1; color: var(--ink-2); }
.vresult b { font-weight: 600; }
.vresult i { font-size: 20px; }
.vresult .ok { color: var(--green); }
.vresult .ko { color: var(--red); }
.vresult code { font-family: var(--mono); font-size: 12px; }

/* Formulaires */
.form { display: flex; flex-direction: column; gap: 12px; }
.form .sec { margin-bottom: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span:first-child { font-size: 13px; font-weight: 600; color: var(--ink-2); padding-left: 4px; }
.field > small { font-size: 12px; color: var(--ink-3); padding-left: 4px; }
.field input { width: 100%; height: 54px; padding: 0 16px; border: 1.5px solid transparent; border-radius: 16px; background: var(--grey); font-size: 16px; outline: none; transition: border-color .15s, background .15s; }
.field input.mono { font-size: 13px; }
.field input:focus { border-color: var(--ink); background: #fff; }
.field input.is-bad { border-color: var(--red); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pw { position: relative; display: block; }
.pw input { padding-right: 52px; }
.pw-eye { position: absolute; right: 6px; top: 7px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; color: var(--ink-2); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--ink-2); cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border: 1.5px solid var(--ink-3); border-radius: 8px; display: grid; place-items: center; cursor: pointer; transition: background .15s, border-color .15s; }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.check input.is-bad { border-color: var(--red); }
.check a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.link-sm { align-self: flex-end; font-size: 14px; font-weight: 600; text-decoration: none; margin-top: -2px; }
.form-err { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(210,59,42,.08); color: var(--red); font-size: 14px; font-weight: 500; }
.form .btn-black { margin-top: 6px; }

/* Envoi de fichier */
.upload { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; border: 2px dashed var(--grey-2); border-radius: 22px; text-align: center; cursor: pointer; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload i { font-size: 28px; margin-bottom: 4px; }
.upload b { font-size: 15px; }
.upload small { font-size: 13px; color: var(--ink-2); }
.upload.has-file { border-style: solid; border-color: var(--green); background: rgba(29,138,76,.06); }
.upload.has-file i { color: var(--green); }
.upload.is-bad { border-color: var(--red); }

/* Choix d'un tirage */
.row.radio { cursor: pointer; }
.row.radio input { position: absolute; opacity: 0; pointer-events: none; }
.radio-dot { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--ink-3); background: #fff; transition: border .15s; }
.row.radio input:checked + .radio-dot { border: 7px solid var(--ink); }
.row.radio input:focus-visible + .radio-dot { outline: 2.5px solid var(--ink); outline-offset: 2px; }
.row.radio.off { opacity: .45; cursor: default; }

/* Connexion / inscription — épuré, confiant */
.doc-screen.bare { padding-top: calc(var(--safe-t) + 14px); display: flex; flex-direction: column; }
.auth-top { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-bottom: 8px; }
.auth-top .logo { font-size: 22px; }
.pill-line { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--grey-2); font-size: 14px; font-weight: 700; text-decoration: none; transition: border-color .15s; }
.pill-line:active { border-color: var(--ink); }
.auth { display: flex; flex-direction: column; }
.auth-h { margin-top: 22px; font-size: 32px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.auth-sub { margin: 8px 0 26px; font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.auth .form { gap: 16px; }
.auth .btn-black { margin-top: 4px; }
.auth-legal { margin-top: 14px; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); text-align: center; }
.auth-legal a { color: var(--ink-2); }
.auth-back { margin-bottom: -6px; }

/* Repères de confiance */
.trust { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; margin-top: auto; padding-top: 30px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.trust li { display: inline-flex; align-items: center; gap: 5px; }
.trust i { font-size: 15px; color: var(--green); }

/* Champs : libellé, lien à droite, erreur dessous */
.field-top { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px; }
.field-top label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field-top a { font-size: 13px; font-weight: 700; text-decoration: none; }
.auth .field input { height: 56px; border-radius: 16px; }
.field input::placeholder { color: var(--ink-3); }
.field-err { display: none; align-items: center; gap: 5px; padding-left: 4px; font-size: 13px; font-weight: 500; color: var(--red); }
.field.is-bad .field-err { display: flex; }
.field.is-bad input { border-color: var(--red); background: #fff; }

/* Jauge du mot de passe */
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 2px 4px 0; }
.meter span { height: 4px; border-radius: 99px; background: var(--grey-2); transition: background .25s; }
.meter[data-score="1"] span:nth-child(-n+1) { background: var(--red); }
.meter[data-score="2"] span:nth-child(-n+2) { background: var(--orange); }
.meter[data-score="3"] span:nth-child(-n+3) { background: var(--green); }
.meter[data-score="4"] span { background: var(--green); }
.meter-txt { padding-left: 4px; font-size: 12.5px; color: var(--ink-3); }

/* Bouton en cours d'envoi */
.btn-black .spin { display: none; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn-black.is-loading { pointer-events: none; }
.btn-black.is-loading .spin { display: block; }
.btn-black.is-loading .lbl { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Carte membre en aperçu (inscription) */
.member.mini { height: 158px; margin-top: 14px; padding: 18px; border-radius: 24px; }
.member.mini .m-name b { font-size: 22px; transition: opacity .2s; }
.member.mini .m-name b.is-empty { opacity: .35; }
.member.mini .m-foot b { font-family: var(--mono); font-size: 13px; }

/* Écran de confirmation */
.auth.sent { padding-top: 36px; }
.sent-ico { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); font-size: 34px; }
.sent .auth-h { margin-top: 24px; }
.sent .btn-black, .sent .btn-outline { width: 100%; }
.sent .btn-outline { margin-top: 10px; }
.sent .btn-outline[disabled] { opacity: .45; pointer-events: none; }
.tk-ref { --cut: 54px; --r: 7px; height: 60px; margin-bottom: 18px; border-radius: 14px; }
.tk-ref .tk-main { flex-direction: column; justify-content: center; padding: 0 16px; }
.tk-ref .tk-main small { font-size: 12px; opacity: .65; }
.tk-ref .tk-main b { font-family: var(--mono); font-size: 17px; }
.tk-ref .tk-stub i { font-size: 20px; }
[hidden] { display: none !important; }

/* Mur d'offres */
.doc-screen[data-screen="offres"] { display: flex; flex-direction: column; padding-bottom: calc(var(--safe-b) + 12px); }
.wall { flex: 1; display: flex; min-height: 460px; margin: 0 -8px; border-radius: 26px; overflow: hidden; background: var(--grey); }
.wall iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.wall-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 28px; text-align: center; }
.wall-empty b { font-size: 17px; margin-top: 8px; }
.wall-empty small { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.wall-empty .btn-black { width: auto; padding: 0 28px; }
.offers-cta { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 24px; background: var(--yellow); color: var(--ink); text-decoration: none; }
.offers-cta .ico { background: var(--ink); color: var(--yellow); }
.offers-cta span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.offers-cta b { font-size: 17px; }
.offers-cta small { font-size: 13px; opacity: .7; }
.offers-cta:active { transform: scale(.98); }

/* Sondages */
.row.survey { text-decoration: none; }
.row.survey:active { opacity: .6; }
.ico.dur { flex-direction: column; gap: 0; line-height: 1; }
.ico.dur b { font-size: 15px; font-weight: 700; }
.ico.dur small { font-size: 10px; font-weight: 600; opacity: .6; }
.row.skel .ico { background: var(--grey-2); }
.row.skel b, .row.skel small { display: block; height: 12px; width: 60%; border-radius: 6px; background: var(--grey-2); }
.row.skel small { width: 40%; margin-top: 8px; }
.row.skel { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.link-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.doc-screen[data-screen="offres"] .wall { margin-top: 12px; }
