/* ==========================================================================
   Emergence · Jeux concours — feuille de style unique
   Back-office (desktop d'abord) + parcours participant (mobile d'abord) + impression
   Charte : bleu / blanc, touche de rouge. Titres Bricolage Grotesque, texte Figtree.
   ========================================================================== */

/* ---------------------------------------------------------------- Polices */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("../fonts/figtree-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url("../fonts/figtree-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("../fonts/figtree-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("../fonts/figtree-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("../fonts/figtree-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url("../fonts/figtree-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("../fonts/figtree-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("../fonts/figtree-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }

/* ---------------------------------------------------------------- Jetons */
:root {
  --ink: #0F1B2D;
  --ink-2: #2E3D52;
  --muted: #5B6B80;
  --line: #E1E6EE;
  --line-2: #EDF1F6;
  --ground: #F5F7FA;
  --white: #FFFFFF;
  --primary: #1456B8;
  --primary-dark: #0E428F;
  --primary-soft: #E8F0FB;
  --primary-soft-2: #D3E2F7;
  --red: #D7263D;
  --red-dark: #B01B30;
  --red-soft: #FCE9EC;
  --green: #17803D;
  --green-soft: #E6F4EC;
  --amber-soft: #FFF6E0;
  --night: #0A1F3D;
  --night-2: #13305A;
  --accent: var(--primary);

  --font-title: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .06);
  --shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 6px 20px rgba(15, 27, 45, .07);
  --shadow-lg: 0 20px 50px rgba(15, 27, 45, .18);
  --focus: 0 0 0 3px rgba(20, 86, 184, .28);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------------------------------------------------------------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--ground); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
small { font-size: 12.5px; }
strong { font-weight: 700; }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon--xs { width: 13px; height: 13px; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 36px; height: 36px; stroke-width: 1.6; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; color: #fff; }
.muted { color: var(--muted); }
.text-red { color: var(--red); font-weight: 600; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: .95em; letter-spacing: .02em; }
.break { word-break: break-all; }
.grow { flex: 1; }
.mt-sm { margin-top: 8px; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 28px; }
.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row--end { justify-content: flex-end; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.plain-list { margin: 4px 0 0; padding-left: 18px; }
.link-sm { font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.link-sm:hover { text-decoration: underline; }
.linklike { background: none; border: 0; padding: 0; color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.linklike:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- Boutons */
.btn { --bg: var(--white); --fg: var(--ink); --bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px;
  border-radius: 10px; border: 1px solid var(--bd); background: var(--bg); color: var(--fg); font-weight: 600; font-size: 14.5px;
  text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; }
.btn:hover { color: var(--fg); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn--primary { --bg: var(--primary); --fg: #fff; --bd: var(--primary); box-shadow: 0 1px 2px rgba(20, 86, 184, .25); }
.btn--primary:hover:not(:disabled) { --bg: var(--primary-dark); --bd: var(--primary-dark); }
.btn--secondary:hover:not(:disabled) { --bg: var(--ground); --bd: #CFD7E3; }
.btn--outline { --fg: var(--primary); --bd: var(--primary); }
.btn--outline:hover:not(:disabled) { --bg: var(--primary-soft); }
.btn--ghost { --bd: transparent; --fg: var(--primary); --bg: transparent; }
.btn--ghost:hover:not(:disabled) { --bg: var(--primary-soft); }
.btn--danger-outline { --fg: var(--red); --bd: #F2B8C0; }
.btn--danger-outline:hover:not(:disabled) { --bg: var(--red-soft); }
.btn--sm { min-height: 34px; padding: 5px 12px; font-size: 13.5px; border-radius: 9px; }
.btn--xs { min-height: 28px; padding: 3px 10px; font-size: 12.5px; border-radius: 8px; }
.btn--lg { min-height: 52px; padding: 12px 22px; font-size: 16px; border-radius: 12px; }
.btn--block { width: 100%; }
.btn--grow { flex: 1; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-row form { display: contents; }

.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: var(--white); color: var(--ink-2); text-decoration: none; padding: 0; font-size: 18px; line-height: 1; }
.icon-btn:hover { background: var(--ground); color: var(--ink); }
.icon-btn--plain { border-color: transparent; background: transparent; }
.icon-btn--sm { width: 30px; height: 30px; }
.icon-btn--night { background: transparent; border-color: rgba(255, 255, 255, .15); color: #C9D6EA; }
.icon-btn--night:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* ---------------------------------------------------------------- Formulaires */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--inline { flex-direction: row; align-items: center; }
.label { font-weight: 600; font-size: 14px; color: var(--ink); display: block; }
label.label > .input { margin-top: 6px; font-weight: 400; }
.hint { font-size: 13px; color: var(--muted); }
.field-error { font-size: 13px; color: var(--red); font-weight: 600; }
.input, .select, .textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #CDD6E2; border-radius: 10px; background: var(--white); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.input::placeholder, .textarea::placeholder { color: #93A1B4; }
.input:hover, .select:hover, .textarea:hover { border-color: #AEBBCD; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--red); }
.input[readonly] { background: var(--ground); }
.input--sm, .select--sm { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.input--lg { min-height: 52px; font-size: 16px; padding: 12px 14px; border-radius: 12px; }
.input--mono { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.input--code { font-family: var(--font-mono); font-size: 24px; letter-spacing: .3em; text-align: center; min-height: 56px; }
.input--static { display: flex; align-items: center; gap: 8px; background: var(--ground); color: var(--ink-2); min-height: 42px; }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235B6B80' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.textarea--sm { min-height: 76px; }
.fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.fieldset:disabled { opacity: .65; }
.input-group { display: flex; align-items: stretch; }
.input-group > .input { border-radius: 0 10px 10px 0; flex: 1; min-width: 0; }
.input-group > .input:first-child { border-radius: 10px 0 0 10px; }
.input-group > .btn { border-radius: 0 10px 10px 0; margin-left: -1px; }
.input-group__prefix, .input-group__suffix { display: flex; align-items: center; padding: 0 12px; background: var(--ground); border: 1px solid #CDD6E2; color: var(--muted); font-size: 14px; white-space: nowrap; }
.input-group__prefix { border-right: 0; border-radius: 10px 0 0 10px; }
.input-group--suffix > .input { border-radius: 10px 0 0 10px; }
.input-group__suffix { border-left: 0; border-radius: 0 10px 10px 0; }
@media (max-width: 560px) { .input-group__prefix { max-width: 45%; overflow: hidden; text-overflow: ellipsis; } }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; flex: none; }
.check--sm { font-size: 13px; }
.check--block { display: flex; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); line-height: 1.45; }
.check--block input { margin-top: 2px; }
.check.is-invalid { border-color: var(--red); }

/* Interrupteur */
.switch { position: relative; flex: none; width: 44px; height: 26px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch__ui { position: absolute; inset: 0; border-radius: 999px; background: #C7D1DE; transition: background .2s; }
.switch__ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s var(--ease); }
.switch input:checked + .switch__ui { background: var(--primary); }
.switch input:checked + .switch__ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__ui { box-shadow: var(--focus); }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .switch__ui { opacity: .5; }
.switch-list { display: flex; flex-direction: column; border-top: 1px solid var(--line-2); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.switch-row > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.switch-row__title { font-weight: 600; font-size: 14.5px; }
.switch-row.is-disabled { cursor: default; opacity: .75; }
.switch-list--compact .switch-row { padding: 11px 0; }

/* Compteur +/- */
.stepper { display: inline-flex; align-items: stretch; border: 1px solid #CDD6E2; border-radius: 10px; overflow: hidden; background: #fff; height: 42px; width: max-content; }
.stepper button { width: 40px; border: 0; background: var(--ground); color: var(--ink-2); display: grid; place-items: center; }
.stepper button:hover { background: var(--line-2); }
.stepper button:disabled { opacity: .4; cursor: default; }
.stepper input { width: 64px; border: 0; text-align: center; font-weight: 700; font-size: 16px; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; box-shadow: inset var(--focus); }

.radio-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.radio-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 14px 46px; border: 1.5px solid var(--line); border-radius: var(--r); background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.radio-card input { position: absolute; left: 16px; top: 16px; width: 18px; height: 18px; accent-color: var(--primary); margin: 0; }
.radio-card__title { font-weight: 700; }
.radio-card__text { font-size: 13px; color: var(--muted); }
.radio-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.radio-card:has(input:focus-visible) { box-shadow: var(--focus); }

.dropzone { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1.5px dashed #C3CEDC; border-radius: var(--r); background: var(--ground); }
.dropzone.is-over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone__preview { width: 72px; height: 72px; flex: none; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: #9AA8BA; font-size: 11px; font-weight: 700; letter-spacing: .06em; overflow: hidden; }
.dropzone__preview img { max-width: 90%; max-height: 90%; object-fit: contain; }
.dropzone__body { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.dropzone__body .btn { cursor: pointer; }
.photo-drop { display: block; cursor: pointer; border: 1.5px dashed #C3CEDC; border-radius: var(--r); background: var(--ground); overflow: hidden; aspect-ratio: 4 / 3; transition: border-color .15s; }
.photo-drop:hover, .photo-drop.is-over { border-color: var(--primary); }
.photo-drop:focus-within { box-shadow: var(--focus); }
.photo-drop__preview { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.photo-drop__preview img { width: 100%; height: 100%; object-fit: cover; }
.prize-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }

.disclosure > summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--primary); list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::before { content: "+"; font-weight: 700; width: 14px; }
.disclosure[open] > summary::before { content: "–"; }
.summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; font-size: 14px; }
.summary.is-warning { background: var(--red-soft); color: var(--red-dark); }
.subpanel { padding: 16px; border-radius: var(--r); background: var(--ground); border: 1px solid var(--line-2); }

/* ---------------------------------------------------------------- Alertes, badges */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); border: 1px solid; font-size: 14px; margin-bottom: 16px; }
.alert .icon { margin-top: 1px; }
.alert p + p { margin-top: 4px; }
.alert--info { background: var(--primary-soft); border-color: var(--primary-soft-2); color: #133D7A; }
.alert--success { background: var(--green-soft); border-color: #BFE3CC; color: #125E2E; }
.alert--error { background: var(--red-soft); border-color: #F5C2CA; color: #8E1526; }
.panel .alert:last-child, .stack > .alert { margin-bottom: 0; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; line-height: 1.4; border: 1px solid transparent; }
.badge--blue { background: var(--primary); color: #fff; }
.badge--blue-soft { background: var(--primary-soft); color: var(--primary-dark); }
.badge--red { background: var(--red-soft); color: var(--red-dark); }
.badge--solid-red { background: var(--red); color: #fff; }
.badge--grey { background: var(--line-2); color: var(--ink-2); }
.badge--outline { border-color: #C3CEDC; color: var(--ink-2); background: #fff; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #AEBBCD; }
.pill--live::before { background: var(--green); box-shadow: 0 0 0 4px rgba(23, 128, 61, .15); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(23, 128, 61, 0); } }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; font-size: 14px; }
.kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }

/* ---------------------------------------------------------------- Back-office : structure */
.admin { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--night); color: #C9D6EA; display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; }
.brandmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-title); font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; }
.brandmark small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 12px; opacity: .7; }
.brandmark--light { color: #fff; }
.brandmark--light:hover { color: #fff; }
.brandmark__tile { width: 36px; height: 36px; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 18px; position: relative; flex: none; }
.brandmark__tile::after { content: ""; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); border: 2px solid var(--night); }
.sidebar .brandmark { padding: 4px 8px 22px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #C9D6EA; text-decoration: none; font-weight: 600; font-size: 14.5px; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a[aria-current="page"] { background: var(--night-2); color: #fff; box-shadow: inset 3px 0 0 var(--red); }
.sidebar__user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.sidebar__user form { margin-left: auto; }
.sidebar__who { display: flex; flex-direction: column; min-width: 0; font-size: 13.5px; }
.sidebar__who strong { color: #fff; }
.sidebar__who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; opacity: .75; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--night-2); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.admin__main { min-width: 0; }
.topbar { display: none; }
.page { padding: 28px 36px 60px; max-width: 1320px; }
.sidebar-scrim { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 28px; }
.page-head > div > p { margin-top: 4px; }
.page-head__title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.page-head__actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.crumbs { font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--primary); }

.steps { margin-bottom: 24px; }
.steps ol { list-style: none; margin: 0; padding: 4px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.step:hover { background: var(--ground); color: var(--ink); }
.step__num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); font-size: 13px; flex: none; }
.step__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step.is-current { background: var(--primary-soft); color: var(--primary-dark); }
.step.is-current .step__num { background: var(--primary); color: #fff; }
.step.is-done .step__num { background: var(--primary-soft-2); color: var(--primary); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split__main, .split__aside { min-width: 0; }
.sticky { position: sticky; top: 20px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); min-width: 0; }
.panel--flush { padding: 0; overflow: hidden; }
.panel__title { font-size: 18px; margin-bottom: 16px; }
.panel__title--sm { font-size: 16px; margin-bottom: 4px; }
.panel__desc { color: var(--muted); font-size: 14px; margin: -10px 0 16px; }
.panel__kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel__head .panel__title { margin: 0; }
.panel__foot { padding: 18px 22px; border-top: 1px solid var(--line); background: #FBFCFE; }
.panel__pad { padding: 18px 22px; }
.panel--flush > .empty { padding: 48px 20px; }
.form-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 6px; }
.publish-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.publish-row > div { flex: 1; min-width: 220px; }
.danger-zone { border-color: #F5C9CF; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.kpi__label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi__value { font-family: var(--font-title); font-size: 30px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi__value small { font-size: 16px; color: var(--muted); font-weight: 600; }
.kpi--alert { border-color: #F5C2CA; background: linear-gradient(0deg, #fff, var(--red-soft)); }
.kpi--alert .kpi__value { color: var(--red); }
.mini-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.mini-kpis > div { background: var(--ground); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; }
.mini-kpis small { color: var(--muted); font-weight: 600; }
.mini-kpis strong { font-family: var(--font-title); font-size: 24px; }

/* Barre d'outils, filtres, recherche */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.toolbar--wrap { justify-content: flex-start; }
.filters { display: flex; gap: 4px; flex-wrap: wrap; }
.filter { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 9px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.filter:hover { background: var(--ground); color: var(--ink); }
.filter[aria-current="true"] { background: var(--primary-soft); color: var(--primary-dark); }
.filter__count { font-size: 12px; background: var(--line-2); color: var(--muted); border-radius: 999px; padding: 0 7px; }
.filter[aria-current="true"] .filter__count { background: #fff; color: var(--primary); }
.search { position: relative; display: flex; align-items: center; }
.search .icon { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.search .input { padding-left: 34px; width: 240px; }

/* Tableaux */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 11px 16px; background: #FBFCFE; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FBFCFE; }
.table .num { text-align: right; }
.game-cell { display: flex; align-items: center; gap: 12px; }
.game-cell__logo { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; font-size: 9px; font-weight: 700; color: #9AA8BA; flex: none; overflow: hidden; }
.game-cell__logo img { max-width: 86%; max-height: 86%; object-fit: contain; }
.game-cell__name { display: block; font-weight: 700; color: var(--ink); text-decoration: none; }
.game-cell__name:hover { color: var(--primary); }
.game-cell__meta { display: block; font-size: 12.5px; color: var(--muted); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-top: 1px solid var(--line); }

/* Menu déroulant (details/summary) */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu__list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px; }
.menu__list form { margin: 0; }
.menu__list button, .menu__list a { display: flex; width: 100%; align-items: center; gap: 9px; padding: 9px 10px; border: 0; background: none; border-radius: 8px; text-align: left; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; white-space: nowrap; }
.menu__list button:hover, .menu__list a:hover { background: var(--ground); }
.menu__list .is-danger { color: var(--red); }
.menu__meta { font-size: 12px; color: var(--muted); padding: 6px 10px 4px; border-top: 1px solid var(--line-2); margin-top: 4px; }

.empty { text-align: center; padding: 36px 20px; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty .icon { color: #A8B6C8; margin-bottom: 6px; }
.empty .btn { margin-top: 10px; }
.empty--sm { padding: 20px 10px; }

/* ---------------------------------------------------------------- Aperçu téléphone (étape 1) */
.phone { width: 100%; max-width: 290px; margin: 0 auto; border-radius: 34px; background: var(--ink); padding: 10px; box-shadow: var(--shadow-lg); }
.phone__screen { border-radius: 26px; background: #fff; padding: 22px 16px; min-height: 480px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; overflow: hidden; }
.pv-logo { height: 34px; display: flex; align-items: center; justify-content: center; }
.pv-logo img { max-height: 34px; max-width: 150px; }
.pv-title { font-family: var(--font-title); font-weight: 700; font-size: 19px; line-height: 1.2; }
.pv-text { font-size: 12.5px; color: var(--muted); }
.pv-date { font-size: 11.5px; font-weight: 600; color: var(--accent); background: var(--primary-soft); padding: 4px 10px; border-radius: 999px; }
.pv-gift { width: 100%; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-align: left; margin-top: 6px; }
.pv-photo { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--ground); color: #A8B6C8; }
.pv-photo img { width: 100%; height: 100%; object-fit: cover; }
.pv-badge { display: inline-block; margin: 10px 12px 0; font-size: 10.5px; font-weight: 700; background: var(--red); color: #fff; padding: 2px 8px; border-radius: 999px; }
.pv-prize { font-weight: 700; font-size: 14px; padding: 4px 12px 0; }
.pv-desc { font-size: 11.5px; color: var(--muted); padding: 2px 12px 12px; }
.pv-cta { margin-top: auto; width: 100%; padding: 11px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; }

/* ---------------------------------------------------------------- Éditeur de questions */
.q-list { display: flex; flex-direction: column; gap: 12px; }
.q-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.q-card.is-invalid { border-color: #F2B8C0; }
.q-card__head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.q-card__num { width: 38px; height: 38px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.q-card__toggle { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; text-align: left; background: none; border: 0; padding: 4px 0; }
.q-card__summary { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-card__meta { font-size: 12.5px; color: var(--muted); grid-row: 2; }
.q-card__chevron { grid-row: 1 / 3; grid-column: 2; align-self: center; transform: rotate(180deg); transition: transform .2s; color: var(--muted); }
.q-card.is-collapsed .q-card__chevron { transform: none; }
.q-card__tools { display: flex; gap: 2px; }
.q-card__tools [data-q-move="-1"] .icon { transform: none; }
.q-card__body { padding: 4px 18px 18px 64px; display: flex; flex-direction: column; gap: 12px; }
.q-card.is-collapsed .q-card__body { display: none; }
.answers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.answer { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.answer.is-correct { border-color: var(--primary); background: var(--primary-soft); }
.answer__mark input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; display: block; cursor: pointer; }
.answer__input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 7px 4px; }
.answer__input:focus { outline: none; }
.answer__tag { display: none; font-size: 11.5px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.answer.is-correct .answer__tag { display: inline; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.checklist li { display: flex; align-items: flex-start; gap: 10px; }
.checklist li .icon { margin-top: 2px; padding: 2px; border-radius: 50%; background: var(--green-soft); color: var(--green); width: 20px; height: 20px; }
.checklist li.is-ko .icon { background: var(--red-soft); color: var(--red); }
.checklist--detailed li { padding: 12px 0; border-bottom: 1px solid var(--line-2); align-items: center; }
.checklist--detailed li:last-child { border-bottom: 0; }
.checklist--detailed li > span { flex: 1; display: flex; flex-direction: column; }
.checklist--detailed small { color: var(--muted); }

/* ---------------------------------------------------------------- E-mails */
.var-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.var-chip { border: 1px solid var(--primary-soft-2); background: var(--primary-soft); color: var(--primary-dark); font-family: var(--font-mono); font-size: 12px; padding: 3px 8px; border-radius: 7px; }
.var-chip:hover { background: var(--primary-soft-2); }
.auto-block { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--ground); border: 1px dashed #C3CEDC; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--ground); border-radius: 11px; margin-bottom: 14px; }
.tab { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 8px; font-weight: 600; color: var(--muted); }
.tab[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.mail-preview { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; font-size: 13.5px; background: #fff; }
.mail-preview__subject { padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 700; background: #FBFCFE; }
.mail-preview__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--primary); color: #fff; font-weight: 700; }
.mail-preview__head img { height: 26px; width: auto; background: #fff; border-radius: 5px; padding: 2px; }
.mail-preview__body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.mail-preview__body p { margin: 0 0 8px; }
.mail-preview__badge { align-self: flex-start; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.mail-preview__code { text-align: center; padding: 14px; border-radius: 10px; background: var(--primary-soft); }
.mail-preview__code small { display: block; color: var(--muted); font-weight: 600; }
.mail-preview__code strong { font-family: var(--font-mono); font-size: 24px; letter-spacing: .12em; color: var(--primary-dark); }
.mail-preview__prize { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.mail-preview__prize > span:last-child { display: flex; flex-direction: column; }
.mail-preview__prize small { color: var(--muted); }
.mail-preview__thumb { width: 54px; height: 54px; border-radius: 8px; background: var(--ground); overflow: hidden; flex: none; }
.mail-preview__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mail-preview__foot { padding: 10px 16px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line-2); }

/* ---------------------------------------------------------------- Publication */
.qr-box { display: flex; justify-content: center; padding: 20px; background: var(--ground); border-radius: var(--r); }
.qr-box__code { background: #fff; padding: 14px; border-radius: 12px; box-shadow: var(--shadow-sm); line-height: 0; min-width: 120px; min-height: 120px; }
.qr-box__code svg, .poster__qr svg, .totp-setup__qr svg { display: block; width: 100%; height: auto; }
.poster-thumb { display: block; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; max-width: 320px; margin: 0 auto; transition: box-shadow .15s; }
.poster-thumb:hover { box-shadow: var(--shadow); }
.poster-thumb .poster { padding: 18px 16px; gap: 6px; font-size: 60%; }
.poster-thumb .poster__headline { font-size: 17px; }
.poster-thumb .poster__prize { font-size: 12px; }
.poster-thumb .poster__photo { height: 90px; }
.poster-thumb .poster__qr { width: 110px; padding: 6px; }
.poster-thumb .poster__logo { max-height: 22px; }
.poster-thumb .poster__cta { font-size: 12px; }
.poster-thumb .poster__small { font-size: 8px; }

/* ---------------------------------------------------------------- Tirages */
.next-draw { background: var(--night); color: #fff; border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.next-draw.is-paused { background: var(--ink-2); }
.next-draw.is-done { background: var(--ground); color: var(--ink); }
.next-draw__label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.next-draw__time { font-family: var(--font-title); font-size: 48px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.next-draw__time small { font-size: 18px; opacity: .8; }
.next-draw__time--sm { font-size: 22px; }
.next-draw__text { font-size: 14px; opacity: .88; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline__item { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-2); position: relative; }
.timeline__item:last-child { border-bottom: 0; }
.timeline__time { font-family: var(--font-title); font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 1px; }
.timeline__item.is-next .timeline__time { color: var(--red); }
.timeline__item.is-next { background: linear-gradient(90deg, var(--red-soft), transparent 70%); margin: 0 -22px; padding-left: 22px; padding-right: 22px; }
.timeline__item.is-future .timeline__time { color: var(--muted); }
.timeline__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.timeline__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.timeline__title { font-weight: 700; }
.winner-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.winner-actions > form { margin: 0; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: 44px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 14px; }
.bar__label { font-weight: 700; font-variant-numeric: tabular-nums; }
.bar__track { height: 12px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.bar__fill { display: block; height: 100%; background: #AEBBCD; border-radius: inherit; min-width: 2px; }
.bar.is-eligible .bar__fill { background: var(--primary); }
.bar__value { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.pickup-result { border-radius: var(--r); padding: 16px; border: 1.5px solid; display: flex; flex-direction: column; gap: 14px; }
.pickup-result.is-valid { border-color: #9BD1AE; background: var(--green-soft); }
.pickup-result.is-warning { border-color: #F2B8C0; background: var(--red-soft); }
.pickup-result__head { display: flex; gap: 12px; align-items: flex-start; }
.pickup-result.is-valid .pickup-result__head > .icon { color: var(--green); }
.pickup-result.is-warning .pickup-result__head > .icon { color: var(--red); }
.pickup-result__title { font-weight: 800; font-size: 16px; }
.locked-note { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.podium { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.podium__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line); flex-wrap: wrap; }
.podium__item.is-sub { background: var(--ground); }
.podium__item.is-forfeited { opacity: .6; }
.podium__rank { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 800; font-size: 13px; flex: none; }
.is-sub .podium__rank { background: #fff; color: var(--ink-2); border: 1px solid #C3CEDC; }
.podium__who { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.podium__who small { color: var(--muted); }

/* Paramètres */
.dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); font-weight: 600; }
.dl dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.log { list-style: none; margin: 0; padding: 6px 22px 14px; }
.log li { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.log li:last-child { border-bottom: 0; }
.log__when { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Dialogue de confirmation (admin.js) */
.dialog { border: 0; border-radius: var(--r-lg); padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); color: var(--ink); }
.dialog::backdrop { background: rgba(10, 31, 61, .45); }
.dialog__body { padding: 22px 22px 8px; display: flex; flex-direction: column; gap: 12px; }
.dialog__title { font-size: 18px; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px 20px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; transition: all .2s var(--ease); z-index: 90; pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- Connexion */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth__aside { background: radial-gradient(circle at 80% 10%, #1B4C95 0, transparent 45%), var(--night); color: #C9D6EA; padding: 40px 48px; display: flex; flex-direction: column; gap: 40px; }
.auth__pitch { margin-top: auto; max-width: 440px; }
.auth__kicker { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: #FF8D9C; }
.auth__title { font-size: 44px; color: #fff; margin: 8px 0 14px; }
.auth__points { list-style: none; padding: 0; margin: 0 0 auto; display: flex; flex-direction: column; gap: 12px; font-weight: 600; }
.auth__points li { display: flex; align-items: center; gap: 10px; }
.auth__points .icon { color: #8FB6F0; }
.auth__main { display: grid; place-items: center; padding: 32px 20px; }
.auth__card { width: 100%; max-width: 400px; }
.auth__heading { font-size: 26px; margin-bottom: 6px; }
.auth__sub { margin-bottom: 22px; }
.secure-note { display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.totp-setup { display: flex; gap: 18px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; margin-bottom: 18px; }
.totp-setup__qr { width: 150px; flex: none; line-height: 0; }
.secret-key { font-family: var(--font-mono); font-weight: 700; font-size: 15px; letter-spacing: .05em; margin-top: 6px; word-break: break-all; }

/* Erreurs */
.minimal { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.state-card { max-width: 440px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 36px 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.state-card__code { font-family: var(--font-title); font-size: 56px; font-weight: 800; color: var(--primary); line-height: 1; }
.state-card h1 { font-size: 22px; }

/* ---------------------------------------------------------------- Parcours participant */
.public-body { background: #fff; }
.public { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.public__head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); min-height: 56px; position: sticky; top: 0; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); z-index: 10; }
.public__brand { font-family: var(--font-title); font-weight: 700; color: var(--accent); }
.public__title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.public__right { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.public__back { width: 36px; height: 36px; margin-left: -8px; border-radius: 10px; display: grid; place-items: center; color: var(--ink); flex: none; }
.public__back:hover { background: var(--ground); color: var(--ink); }
.public__steps { padding: 14px 20px 0; }
.public__steplabel { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.segments { display: flex; gap: 6px; }
.segments span { flex: 1; height: 5px; border-radius: 999px; background: var(--line); }
.segments span.is-on { background: var(--accent); }
.public__main { flex: 1; padding: 22px 20px 28px; }
.public__main > .alert { margin-bottom: 18px; }
.public__foot { padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); font-size: 12.5px; color: var(--muted); text-align: center; border-top: 1px solid var(--line-2); }
.public__foot a { color: var(--muted); }
.preview-banner { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 8px 12px; background: var(--amber-soft); color: #7A5200; font-size: 13px; font-weight: 600; }
.h1 { font-size: 26px; margin-bottom: 8px; }
.lead { color: var(--ink-2); font-size: 15.5px; margin-bottom: 22px; }
.fineprint { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r); background: var(--ground); font-size: 14.5px; text-align: left; }
.notice .icon { color: var(--accent); margin-top: 2px; }
.public .btn--primary { --bg: var(--accent); --bd: var(--accent); }
.public .btn--primary:hover:not(:disabled) { filter: brightness(.92); }

.landing { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.landing__logo { height: 52px; display: flex; align-items: center; justify-content: center; }
.landing__logo img { max-height: 52px; max-width: 220px; }
.landing__logo span { width: 52px; height: 52px; border-radius: 14px; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: var(--font-title); font-weight: 800; font-size: 20px; }
.landing__title { font-size: 30px; line-height: 1.12; }
.landing__text { color: var(--ink-2); font-size: 15.5px; }
.gift-card { width: 100%; border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; text-align: left; box-shadow: var(--shadow); margin-top: 6px; }
.gift-card__photo { position: relative; aspect-ratio: 16 / 10; background: var(--ground); display: grid; place-items: center; color: #A8B6C8; }
.gift-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.gift-card__badge { position: absolute; left: 12px; top: 12px; background: var(--red); color: #fff; font-weight: 700; font-size: 12.5px; padding: 5px 11px; border-radius: 999px; box-shadow: 0 2px 8px rgba(215, 38, 61, .35); }
.gift-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.gift-card__name { font-size: 20px; }
.gift-card__desc { color: var(--ink-2); font-size: 14.5px; }
.gift-card__where { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.how { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.how h2 { font-size: 19px; }
.how__steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.how__steps li { display: flex; gap: 12px; align-items: flex-start; }
.how__steps li > span:last-child { display: flex; flex-direction: column; }
.how__steps small { color: var(--muted); font-size: 13.5px; }
.how__num { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--accent); font-weight: 800; display: grid; place-items: center; flex: none; }

.input--otp { font-family: var(--font-mono); font-size: 28px; letter-spacing: .5em; text-align: center; min-height: 60px; padding-left: calc(14px + .5em); border-radius: 12px; }
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp input { width: 100%; min-height: 60px; text-align: center; font-family: var(--font-mono); font-size: 26px; font-weight: 700; border: 1.5px solid #CDD6E2; border-radius: 12px; background: #fff; padding: 0; }
.otp input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.code-help { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--ink-2); text-align: center; }

.quiz-progress { height: 5px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin: -8px 0 22px; }
.quiz-progress span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .3s var(--ease); }
.quiz__fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.quiz__question { font-family: var(--font-title); font-size: 22px; font-weight: 700; line-height: 1.25; margin: 8px 0 20px; padding: 0; display: block; }
.quiz__question .kicker { display: block; margin-bottom: 6px; font-family: var(--font-body); }
.quiz__block + .quiz__block { padding-top: 24px; border-top: 1px solid var(--line-2); }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 60px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; -webkit-tap-highlight-color: transparent; }
.choice:hover { border-color: #B9C6D8; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__letter { width: 32px; height: 32px; border-radius: 9px; background: var(--ground); display: grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--ink-2); flex: none; transition: background .15s, color .15s; }
.choice__label { font-size: 16px; font-weight: 500; }
.choice:has(input:checked), .choice.is-checked { border-color: var(--accent); background: var(--primary-soft); }
.choice:has(input:checked) .choice__letter, .choice.is-checked .choice__letter { background: var(--accent); color: #fff; }
.choice:has(input:focus-visible) { box-shadow: var(--focus); }
.quiz__actions { display: flex; gap: 10px; margin: 24px 0 14px; }
.quiz__actions .btn { min-width: 0; }

.done { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 10px; }
.done__icon { width: 72px; height: 72px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.done__icon .icon { width: 36px; height: 36px; stroke-width: 2.6; }
.done__icon--muted { background: var(--ground); color: var(--muted); }
.done .lead { margin-bottom: 4px; }
.score { font-family: var(--font-title); font-size: 44px; font-weight: 800; color: var(--accent); display: flex; align-items: baseline; gap: 4px; }
.score small { font-family: var(--font-body); font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 8px; }
.info-card { width: 100%; display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; font-size: 14.5px; }
.info-card > .icon { color: var(--accent); margin-top: 2px; }
.info-card__thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
.prose { font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.prose p + p { margin-top: 14px; }

/* ---------------------------------------------------------------- Affiche et procès-verbal */
.print-body { background: #E9EDF3; }
.print-toolbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: var(--night); color: #fff; font-weight: 600; }
.sheet { background: #fff; width: 210mm; min-height: 297mm; margin: 24px auto; box-shadow: var(--shadow-lg); }
.poster { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 18mm 16mm; height: 100%; }
.sheet--poster .poster { min-height: 297mm; justify-content: space-between; }
.poster__top { min-height: 40px; display: flex; align-items: center; }
.poster__logo { max-height: 60px; max-width: 70%; }
.poster__brand { font-family: var(--font-title); font-weight: 800; font-size: 26px; color: var(--primary); }
.poster__headline { font-size: 46px; line-height: 1.05; color: var(--ink); }
.poster__prize { font-size: 24px; font-weight: 700; color: var(--red); }
.poster__photo { width: 100%; height: 70mm; border-radius: 18px; overflow: hidden; background: var(--ground); display: grid; place-items: center; color: #A8B6C8; }
.poster__photo img { width: 100%; height: 100%; object-fit: cover; }
.poster__qr { width: 70mm; background: #fff; border: 3px solid var(--primary); border-radius: 18px; padding: 10px; line-height: 0; }
.poster__cta { font-family: var(--font-title); font-weight: 700; font-size: 26px; color: var(--primary); }
.poster__small { font-size: 12px; color: var(--muted); }

.sheet--report { padding: 16mm 16mm 14mm; font-size: 12.5px; line-height: 1.45; }
.report__head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; border-bottom: 3px solid var(--primary); padding-bottom: 12px; margin-bottom: 16px; }
.report__head h1 { font-size: 24px; }
.report__kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.report__game { font-size: 16px; font-weight: 700; color: var(--primary); margin-top: 4px; }
.report__logo { max-height: 44px; max-width: 180px; }
.report__section { margin-bottom: 16px; break-inside: avoid-page; }
.report__section h2 { font-size: 14px; margin-bottom: 8px; color: var(--ink); }
.report__dl { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 4px 12px; margin: 0; }
.report__dl dt { color: var(--muted); font-weight: 600; }
.report__dl dd { margin: 0; }
.report__table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.report__table th, .report__table td { border: 1px solid #CBD3DF; padding: 5px 7px; text-align: left; vertical-align: top; }
.report__table th { background: #F1F4F8; font-weight: 700; }
.report__table tr { break-inside: avoid; }
.report__table--compact td { font-weight: 700; font-size: 14px; }
.report__total { margin-top: 8px; font-weight: 700; }
.report__foot { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 12px; }
.report__sign { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 14px; }
.report__sign > div { border: 1px solid #CBD3DF; border-radius: 6px; padding: 10px; min-height: 90px; display: flex; flex-direction: column; justify-content: space-between; }
.report__line { color: var(--muted); font-size: 11px; }

@page { size: A4; margin: 0; }
@media print {
  .no-print, .print-toolbar { display: none !important; }
  body, .print-body { background: #fff; }
  .sheet { margin: 0; box-shadow: none; width: auto; min-height: 0; }
  .sheet--poster { height: 297mm; overflow: hidden; }
  .sheet--report { padding: 14mm; }
  a { color: inherit; text-decoration: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1180px) {
  .split { grid-template-columns: minmax(0, 1fr) 320px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step__label { font-size: 13px; }
}
@media (max-width: 980px) {
  .admin { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 50; transform: translateX(-100%); transition: transform .25s var(--ease); }
  .sidebar.is-open { transform: none; box-shadow: var(--shadow-lg); }
  .sidebar-scrim { display: block; position: fixed; inset: 0; background: rgba(10, 31, 61, .4); z-index: 40; }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .page { padding: 20px 16px 48px; }
  .split, .split--even { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .steps ol { display: flex; overflow-x: auto; scrollbar-width: none; }
  .step { flex: none; }
  .auth { grid-template-columns: 1fr; }
  .auth__aside { padding: 24px 20px; gap: 16px; }
  .auth__pitch, .auth__points { display: none; }
}
@media (max-width: 640px) {
  .grid-2, .radio-cards, .prize-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 23px; }
  .kpi__value { font-size: 24px; }
  .search .input { width: 100%; }
  .search { flex: 1; }
  .q-card__body { padding: 4px 14px 16px; }
  .q-card__tools [data-q-move], .q-card__tools [data-q-duplicate] { display: none; }
  .form-footer { flex-direction: column-reverse; align-items: stretch; }
  .form-footer .row { flex-direction: column; align-items: stretch; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 10px; }
  .sheet { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
