/* =====================================================================
   Santastic — feuille de style
   Palette : sapin profond, canneberge, feuille d'or, papier kraft, neige froide.
   Typo : Bricolage Grotesque (titres) + Nunito (texte).
   ===================================================================== */
:root {
  --snow: #f2f5f3;
  --paper: #ffffff;
  --fir: #163a2c;
  --fir-2: #245640;
  --fir-soft: #e4ede7;
  --cran: #c62f3e;
  --cran-d: #a12432;
  --cran-soft: #fbe9eb;
  --foil: #e8b64a;
  --foil-soft: #fbf1d8;
  --kraft: #c89a68;
  --ink: #1d2a24;
  --mute: #5f6f67;
  --line: #dbe4de;
  --ok: #1f7a4f;
  --r-card: 20px;
  --r-ctl: 10px;
  --shadow: 0 1px 0 rgba(22, 58, 44, .06), 0 10px 30px -18px rgba(22, 58, 44, .35);
  --display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --text: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--snow); color: var(--ink); font: 16px/1.55 var(--text); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--fir-2); text-underline-offset: 3px; }
a:hover { color: var(--cran); }
:focus-visible { outline: 3px solid var(--foil); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--mute); }
.small { font-size: .875rem; }
.center { text-align: center; }
.center-block { display: block; margin: 14px auto 0; }
.mt { margin-top: 24px; } .mt-s { margin-top: 10px; }
[hidden] { display: none !important; }

/* ---------- Titres ---------- */
.h1, .h2, .h3, h1, h2, h3 { font-family: var(--display); color: var(--fir); line-height: 1.12; margin: 0 0 .5em; }
.h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; }
.h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); font-weight: 800; letter-spacing: -.015em; }
.h3 { font-size: 1.2rem; font-weight: 700; }

/* ---------- Mise en page ---------- */
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.page { padding: 32px 0 64px; }
.narrow { width: min(820px, 100% - 32px); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
section + section { margin-top: 36px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); }
.pad { padding: 24px; } .pad-s { padding: 14px 18px; }
.card.pad + .card.pad, .manage-grid + .card, .card + .manage-grid { margin-top: 20px; }
.empty { padding: 28px; text-align: center; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.manage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.stack > * + * { margin-top: 14px; }
.stack-s > * + * { margin-top: 10px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-row form { margin: 0; }
@media (max-width: 860px) { .two-col, .manage-grid { grid-template-columns: 1fr; } }

/* ---------- Barre du haut ---------- */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 20px; padding: 12px max(16px, calc((100% - 1120px) / 2)); background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fir); }
.brand-seal { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--cran); color: #fff; font: 800 18px/1 var(--display); box-shadow: inset 0 0 0 3px rgba(255,255,255,.25), 0 2px 0 var(--cran-d); }
.brand-word { font: 800 1.45rem/1 var(--display); letter-spacing: -.03em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: .95rem; }
.nav > a:not(.btn) { color: var(--mute); text-decoration: none; font-weight: 600; }
.nav > a:not(.btn):hover { color: var(--fir); }
.nav-admin { color: var(--cran) !important; }
.nav-user { font-weight: 700; color: var(--fir); }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch a { padding: 4px 10px; font: 700 .78rem/1.4 var(--text); color: var(--mute); text-decoration: none; }
.lang-switch a.on { background: var(--fir); color: #fff; }
.burger { display: none; margin-left: auto; background: none; border: 0; width: 42px; height: 42px; padding: 10px; cursor: pointer; }
.burger span:not(.sr) { display: block; height: 2px; background: var(--fir); margin: 5px 0; border-radius: 2px; }
@media (max-width: 900px) {
  .burger { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav > * { padding: 10px 0; }
  .nav .lang-switch { align-self: flex-start; padding: 0; margin: 8px 0; }
  .nav-open .nav { display: flex; }
}

/* ---------- Boutons & champs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 11px 20px; font: 700 .97rem/1.2 var(--text); text-decoration: none; cursor: pointer; transition: transform .12s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--cran); color: #fff; box-shadow: 0 3px 0 var(--cran-d); }
.btn-primary:hover { background: var(--cran-d); color: #fff; }
.btn-gold { background: var(--foil); color: #3d2a05; box-shadow: 0 3px 0 #b98a24; }
.btn-gold:hover { background: #f0c35f; color: #3d2a05; }
.btn-ghost { background: var(--paper); color: var(--fir); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--fir-2); color: var(--fir); }
.btn-ok { background: var(--fir-soft); color: var(--ok); border: 1.5px solid #b8d6c4; }
.btn-danger { background: var(--paper); color: var(--cran); border: 1.5px solid #f0c0c5; }
.btn-danger:hover { background: var(--cran-soft); color: var(--cran-d); }
.btn-google { background: #fff; color: #1f1f1f; border: 1.5px solid #dadce0; width: 100%; }
.btn-google:hover { background: #f8f9fa; color: #1f1f1f; }
.btn-dashed { background: var(--cran-soft); color: var(--cran); border: 1.5px dashed #eaa7ae; border-radius: var(--r-ctl); flex: 1; }
.btn-sm { padding: 8px 14px; font-size: .88rem; }
.btn-lg { padding: 15px 30px; font-size: 1.08rem; }
.btn-block { width: 100%; }
.icon-btn { background: none; border: 0; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 1.05rem; color: var(--mute); }
.icon-btn:hover { background: var(--snow); color: var(--cran); }

input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-ctl); padding: 10px 12px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--fir-2); box-shadow: 0 0 0 3px rgba(36, 86, 64, .15); }
input[readonly] { background: var(--snow); color: var(--mute); }
textarea { resize: vertical; }
label { display: block; font-weight: 700; font-size: .92rem; color: var(--fir); }
label > input, label > select, label > textarea { margin-top: 6px; font-weight: 400; }
.label { font-weight: 700; font-size: .92rem; color: var(--fir); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--cran); flex: none; }
.input-sm, .select-sm { width: auto; padding: 7px 10px; font-size: .9rem; }
.tag { display: inline-block; font: 700 .72rem/1.4 var(--text); background: var(--fir-soft); color: var(--fir-2); border-radius: 6px; padding: 1px 7px; font-style: normal; }

/* ---------- Alertes / flash / toast ---------- */
.alert { border-radius: 14px; padding: 12px 16px; margin: 12px 0; font-weight: 600; }
.alert-err { background: var(--cran-soft); color: var(--cran-d); }
.alert-ok { background: var(--fir-soft); color: var(--ok); }
.alert-info { background: #eaf1f7; color: #1f3a5f; }
.alert-warn { background: var(--foil-soft); color: #7a5208; }
.flashes { width: min(1120px, 100% - 32px); margin: 14px auto 0; }
.flash { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 14px; margin-bottom: 8px; font-weight: 700; }
.flash-ok { background: var(--fir-soft); color: var(--ok); }
.flash-err { background: var(--cran-soft); color: var(--cran-d); }
.flash-warn { background: var(--foil-soft); color: #7a5208; }
.flash-x { background: none; border: 0; font-size: 1.3rem; cursor: pointer; color: inherit; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--fir); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700; z-index: 200; transition: transform .25s, opacity .25s; max-width: calc(100% - 32px); opacity: 0; visibility: hidden; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.toast-err { background: var(--cran-d); }

/* ---------- Pastilles / badges ---------- */
.pill { display: inline-block; font: 700 .78rem/1 var(--text); border-radius: 999px; padding: 6px 11px; margin: 0 0 10px; }
.pill-ok { background: var(--fir-soft); color: var(--ok); }
.pill-wait { background: var(--foil-soft); color: #7a5208; }
.pill-hot { background: var(--cran); color: #fff; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--cran); color: #fff; font-size: .75rem; }
.avatar-sm { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--snow); font-size: 1rem; }
.avatar-lg { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--foil-soft); font-size: 1.9rem; flex: none; }
.avatar-xl { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: var(--foil-soft); font-size: 3rem; flex: none; box-shadow: 0 0 0 6px #fff, 0 0 0 8px var(--foil); }

/* =====================================================================
   ACCUEIL — le ticket à gratter est l'élément signature
   ===================================================================== */
.hero { background: var(--fir); color: #f3f7f4; display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; padding: 72px max(16px, calc((100% - 1120px) / 2)) 88px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 28px; background: radial-gradient(circle at 14px -6px, transparent 18px, var(--snow) 19px) 0 0 / 28px 28px repeat-x; }
.hero-title { color: #fff; font-size: clamp(2.3rem, 5.6vw, 4.2rem); font-weight: 800; letter-spacing: -.035em; line-height: .98; margin-bottom: 20px; }
.hero .lead { font-size: 1.15rem; max-width: 34em; color: #cfe0d6; margin: 0 0 26px; }
.hero-form { display: flex; gap: 8px; background: #fff; border-radius: 999px; padding: 6px; max-width: 540px; }
.hero-form input { border: 0; border-radius: 999px; padding: 12px 18px; box-shadow: none; }
.hero-form input:focus { box-shadow: none; }
.hero-note { color: #a9c4b5; font-size: .9rem; margin: 12px 0 0 6px; }
.hero-links { display: flex; gap: 20px; margin: 22px 0 0 6px; }
.hero-links a { color: #fff; font-weight: 700; }
.hero-ticket { display: flex; justify-content: center; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding-top: 44px; gap: 36px; } .hero-form { flex-direction: column; border-radius: 22px; } .hero-form .btn { width: 100%; } }

.ticket { --notch: 16px; position: relative; width: min(400px, 100%); background: #fffdf8; color: var(--ink); border-radius: 18px; padding: 22px 22px 18px; transform: rotate(-3deg); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55);
  -webkit-mask: radial-gradient(circle var(--notch) at 0 62%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% 62%, #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle var(--notch) at 0 62%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% 62%, #0000 98%, #000) right / 51% 100% no-repeat; }
.ticket-real { transform: rotate(-1.5deg); margin: 0 auto; width: min(460px, 100%); }
.ticket-head { display: flex; justify-content: space-between; gap: 10px; font: 700 .9rem/1.2 var(--display); color: var(--fir); padding-bottom: 14px; border-bottom: 2px dashed var(--line); margin-bottom: 16px; }
.ticket-no { color: var(--cran); font-variant-numeric: tabular-nums; }
.ticket-foot { text-align: center; font-size: .85rem; color: var(--mute); margin: 14px 0 0; }
.scratch { position: relative; height: 190px; border-radius: 14px; overflow: hidden; background: var(--cran-soft); touch-action: none; user-select: none; }
.scratch-under { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px; }
.scratch-avatar { font-size: 2.6rem; line-height: 1; }
.scratch-name { font: 800 clamp(1.6rem, 5vw, 2.3rem)/1.1 var(--display); color: var(--cran); letter-spacing: -.02em; margin-top: 6px; overflow-wrap: anywhere; }
.scratch-sub { font-size: .85rem; color: var(--mute); margin-top: 4px; }
.scratch-canvas { position: absolute; inset: 0; cursor: grab; transition: opacity .6s; }
.scratch-canvas:active { cursor: grabbing; }
.scratch-gone { opacity: 0; }

.band { background: var(--paper); border-block: 1px solid var(--line); padding: 60px 0; margin-top: 0 !important; }
.how { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: none; }
.how li { position: relative; padding-top: 4px; }
.how-n { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--cran); color: #fff; font: 800 1.05rem/1 var(--display); margin-bottom: 12px; }
.how h3 { font-size: 1.1rem; margin-bottom: 6px; }
.how p { margin: 0; color: var(--mute); }
@media (max-width: 860px) { .how { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .how { grid-template-columns: 1fr; } }

.features { padding: 64px 0 0; }
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; margin-top: 24px; }
.feat { background: var(--paper); padding: 22px; }
.feat-emo { font-size: 1.7rem; }
.feat h3 { font-size: 1.05rem; margin: 10px 0 6px; }
.feat p { margin: 0; color: var(--mute); font-size: .93rem; }
@media (max-width: 900px) { .feat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .feat-grid { grid-template-columns: 1fr; } }

.faq { padding: 64px 0 0; max-width: 820px; }
.faq-item { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq-item summary { cursor: pointer; font: 700 1.05rem/1.3 var(--display); color: var(--fir); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--cran); font-size: 1.4rem; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 10px 0 0; color: var(--mute); }

.cta-band { margin-top: 72px !important; background: var(--cran); color: #fff; padding: 52px 0; text-align: center; }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); }

/* ---------- Pied de page ---------- */
.footer { background: var(--fir); color: #cfe0d6; padding: 40px 0; margin-top: 0; }
.footer-inner { width: min(1120px, 100% - 32px); margin: auto; display: grid; grid-template-columns: 1fr auto; gap: 16px 40px; }
.footer-brand { font: 800 1.4rem/1 var(--display); color: #fff; margin: 0 0 6px; }
.footer .muted { color: #a9c4b5; margin: 0; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer-links a { color: #fff; text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--foil); }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }

/* =====================================================================
   BANDEAUX DE THÈMES (purs dégradés CSS, aucune image externe)
   ===================================================================== */
.banner { position: relative; min-height: 150px; border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 28px 20px; color: #fff; text-align: center; }
.banner-title { font: 800 clamp(1.4rem, 3.4vw, 2.1rem)/1.1 var(--display); letter-spacing: -.02em; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); max-width: 90%; overflow-wrap: anywhere; }
.banner-date { position: absolute; top: 10px; right: 14px; font-size: .85rem; font-style: italic; opacity: .92; }
.banner-badge { position: absolute; bottom: 10px; right: 12px; background: var(--cran); color: #fff; font: 700 .8rem/1 var(--text); padding: 6px 10px; border-radius: 8px; }
.banner-classic { background: repeating-linear-gradient(90deg, transparent 0 46%, rgba(255,255,255,.22) 46% 47.5%, transparent 47.5% 100%), repeating-linear-gradient(0deg, transparent 0 40%, rgba(255,255,255,.18) 40% 41.5%, transparent 41.5% 100%), linear-gradient(135deg, #a7774a, #c89a68 45%, #8a5a32); }
.banner-snow { background: radial-gradient(circle at 20% 30%, #fff 1.5px, transparent 2px) 0 0 / 46px 46px, radial-gradient(circle at 70% 70%, rgba(255,255,255,.7) 1px, transparent 1.6px) 0 0 / 30px 30px, linear-gradient(180deg, #14284a, #2e5b8f); }
.banner-cozy { background: radial-gradient(circle, #fff6ea 2.5px, transparent 3px) 0 0 / 26px 26px, radial-gradient(circle, rgba(255,246,234,.6) 2px, transparent 2.5px) 13px 13px / 26px 26px, linear-gradient(135deg, #9b4a1f, #c46d33); }
.banner-forest { background: linear-gradient(135deg, transparent 0 50%, rgba(255,255,255,.06) 50%) 0 0 / 34px 34px, conic-gradient(from 150deg at 50% 100%, #2f7a55 0 60deg, transparent 0) 0 100% / 46px 56px repeat-x, linear-gradient(180deg, #0f2e22, #1d4b36); }
.banner-gold { background: radial-gradient(circle, #f5d478 1.4px, transparent 2px) 0 0 / 22px 22px, radial-gradient(circle, rgba(245,212,120,.45) 1px, transparent 1.5px) 11px 11px / 22px 22px, linear-gradient(135deg, #12102b, #2a2160 60%, #1d1840); }
.banner-gold .banner-title { color: #f5d478; }

/* =====================================================================
   FORMULAIRE DE CRÉATION
   ===================================================================== */
.step-title { display: flex; align-items: center; gap: 12px; font-size: 1.3rem; margin: 32px 0 12px; }
.step-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--cran); color: #fff; font-size: 1rem; }
.form-card { padding: 20px 24px; }
.frow { display: grid; grid-template-columns: 210px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.frow:last-child { border-bottom: 0; }
.flabel label, .flabel span { display: block; font-weight: 800; color: var(--fir); }
.flabel small { color: var(--mute); font-size: .82rem; }
@media (max-width: 680px) { .frow { grid-template-columns: 1fr; gap: 8px; } }
.form-card .banner { margin-bottom: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { background: var(--paper); border: 1.5px solid #f0c0c5; color: var(--cran); border-radius: 999px; padding: 5px 11px; font: 700 .8rem/1.2 var(--text); cursor: pointer; }
.chip:hover { background: var(--cran-soft); }
.chip:disabled { opacity: .45; cursor: default; }
.chip-add::before { content: "+ "; }
.date-hint { margin: 8px 0 0; display: inline-block; background: var(--foil-soft); color: #7a5208; font-weight: 700; font-size: .82rem; border-radius: 999px; padding: 3px 10px; }
.date-hint:empty { display: none; }
.theme-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.theme-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 600; font-size: .8rem; cursor: pointer; text-align: center; width: 96px; }
.theme-opt input { position: absolute; opacity: 0; }
.theme-swatch { width: 84px; height: 56px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; border: 3px solid transparent; min-height: 0; padding: 0; }
.theme-opt input:checked + .theme-swatch { border-color: var(--cran); box-shadow: 0 0 0 3px var(--cran-soft); }
.theme-opt input:focus-visible + .theme-swatch { outline: 3px solid var(--foil); }
.seg { display: inline-flex; flex-wrap: wrap; border: 1.5px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; }
.seg label { margin: 0; font-weight: 600; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 8px 14px; cursor: pointer; border-right: 1px solid var(--line); font-size: .9rem; }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--fir); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--foil); outline-offset: -3px; }
.advanced { margin-top: 6px; }
.advanced summary { cursor: pointer; color: var(--cran); font-weight: 700; font-size: .9rem; padding: 12px 0 4px; }
.me-row { flex-wrap: wrap; background: var(--fir-soft); border-radius: 12px; padding: 10px 12px; margin: 10px 0 16px; }
.me-row .input-sm { margin: 0 0 0 auto; flex: 0 1 220px; min-width: 150px; width: auto; }
.prow { display: grid; grid-template-columns: 28px 1fr 1.3fr 1fr 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.prow-head { font-size: .78rem; font-weight: 700; color: var(--mute); margin-bottom: 4px; }
.prow-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--cran-soft); color: var(--cran); font-weight: 800; font-size: .8rem; }
@media (max-width: 680px) {
  .prow { grid-template-columns: 26px 1fr 34px; }
  .prow-head { display: none; }
  .prow input:nth-of-type(2), .prow input:nth-of-type(3) { grid-column: 2; }
  .prow .icon-btn { grid-column: 3; grid-row: 1; }
}
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.file-btn { cursor: pointer; }
.paste-box { margin-top: 10px; }
.paste-box .btn { margin-top: 8px; }
.submit-zone { text-align: center; margin-top: 28px; }

/* =====================================================================
   TABLEAU DE BORD
   ===================================================================== */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.event-card { overflow: hidden; }
.event-card .banner { border-radius: 0; min-height: 130px; }
.event-card-body { padding: 16px 20px 20px; }
.who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; margin: 0 0 6px; }
.who .pill { margin: 0; }
.steps { list-style: none; padding: 0; margin: 6px 0 16px; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.steps::before { content: ""; position: absolute; top: 9px; left: 12.5%; right: 12.5%; height: 2px; background: var(--line); }
.steps li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; font-size: .74rem; font-weight: 700; color: var(--mute); gap: 4px; }
.steps .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line); z-index: 1; }
.steps li.done { color: var(--fir); }
.steps li.done .dot { background: var(--ok); border-color: var(--ok); box-shadow: inset 0 0 0 4px #fff; }
.steps small { background: var(--fir-soft); color: var(--ok); border-radius: 6px; padding: 0 6px; }

/* =====================================================================
   GESTION D'UN TIRAGE
   ===================================================================== */
.crumbs { font-size: .9rem; color: var(--mute); margin: 0 0 14px; }
.manage-top { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; margin: 18px 0 6px; }
.manage-top .steps { min-width: 320px; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stats > div { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; text-align: center; min-width: 92px; }
.stats b { display: block; font: 800 1.35rem/1.1 var(--display); color: var(--fir); }
.stats span { font-size: .75rem; color: var(--mute); font-weight: 700; }
.stats-wide { margin: 10px 0 20px; }
.copy-field { display: flex; gap: 8px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .78rem; color: var(--mute); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .actions { white-space: nowrap; display: flex; gap: 2px; }
.table .actions form, form.inline { display: inline; margin: 0; }
.p-edit { display: grid; grid-template-columns: 30px 1fr 1.3fr 1fr 34px; gap: 6px; align-items: center; min-width: 560px; }
.p-edit input { padding: 7px 9px; font-size: .9rem; }
.add-part { display: grid; grid-template-columns: 1fr 1.3fr 1fr auto; gap: 8px; margin-top: 14px; }
@media (max-width: 680px) { .add-part { grid-template-columns: 1fr; } }
.excl-list { list-style: none; padding: 0; margin: 0 0 12px; }
.excl-list li { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.excl-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.excl-form select { width: auto; flex: 1; min-width: 120px; }
.grid-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-form .span-2 { grid-column: 1 / -1; }
@media (max-width: 760px) { .grid-form { grid-template-columns: 1fr; } }
.danger-zone { margin-top: 20px; }
.danger-zone summary { cursor: pointer; color: var(--cran); font-weight: 800; }
.search-row { display: flex; gap: 8px; margin: 10px 0 20px; max-width: 560px; }

/* =====================================================================
   ESPACE PARTICIPANT
   ===================================================================== */
.space-hero { display: grid; gap: 16px; }
.space-me { display: flex; align-items: center; gap: 14px; }
.space-me .h3 { margin: 0; }
.space-me p { margin: 2px 0 0; }
.desc { margin: 0; white-space: normal; }
.tabs { display: flex; gap: 4px; margin: 26px 0 18px; overflow-x: auto; border-bottom: 2px solid var(--line); scrollbar-width: none; }
.tabs a { padding: 10px 16px; text-decoration: none; color: var(--mute); font-weight: 800; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a[aria-selected="true"] { color: var(--cran); border-bottom-color: var(--cran); }
.waiting { padding: 40px 24px; }
.big-emo { font-size: 3rem; margin: 0; }
.reveal-zone { padding: 10px 0 20px; text-align: center; }
.reveal-zone .ticket { text-align: left; }
.btn.center-block { display: inline-flex; margin-top: 18px; }
.receiver-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.receiver-head .h1 { margin: 0; color: var(--cran); }
.receiver-head p { margin: 0; }
.interests { margin-top: 6px !important; background: var(--foil-soft); border-radius: 10px; padding: 6px 12px; display: inline-block; }
.receiver-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .receiver-grid { grid-template-columns: 1fr; } }

.wish-list { list-style: none; padding: 0; margin: 12px 0; }
.wish { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.wish-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wish-body small { color: var(--mute); }
.wish-body a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wish.is-reserved .wish-body strong { text-decoration: line-through; text-decoration-color: var(--ok); }
.prio { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.prio-1 { background: var(--cran); } .prio-2 { background: var(--foil); } .prio-3 { background: var(--line); }
.wish-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; padding-top: 14px; border-top: 2px dashed var(--line); }
.wish-form input[name="title"] { grid-column: 1 / -1; }
.empty-hint { padding: 10px 0; }
.avatar-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.avatar-pick label { margin: 0; }
.avatar-pick input { position: absolute; opacity: 0; }
.avatar-pick span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--snow); font-size: 1.3rem; cursor: pointer; border: 2px solid transparent; }
.avatar-pick input:checked + span { border-color: var(--cran); background: var(--cran-soft); }
.avatar-pick input:focus-visible + span { outline: 3px solid var(--foil); }
.ai-box { margin-top: 20px; background: var(--foil-soft); border-radius: 14px; padding: 14px 16px; }
.ai-box p { margin: 0 0 6px; }

.ideas:empty { display: none; }
.ideas { margin-top: 20px; }
.idea-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.idea { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.idea-emo { font-size: 1.6rem; }
.idea p { margin: 0; color: var(--mute); font-size: .9rem; flex: 1; }

.letter-paper { background: #fffdf6 repeating-linear-gradient(180deg, transparent 0 29px, #ece3cf 29px 30px); border: 1px solid #eadfc6; border-radius: 6px; padding: 16px 20px; line-height: 30px; font-size: 1.02rem; margin: 0; box-shadow: 0 8px 20px -16px rgba(60, 40, 0, .5); }
.letter-input { font-family: var(--text); line-height: 30px; }
.letter-card { max-width: 820px; }
.vis { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.wall { columns: 3 280px; column-gap: 20px; margin-top: 20px; }
.wall-letter { break-inside: avoid; margin-bottom: 20px; transform: rotate(var(--tilt, 0deg)); }
.wall-from { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--fir); margin: 0 0 6px; }

/* ---------- Chats ---------- */
.chat { display: flex; flex-direction: column; }
.chat-log { background: var(--snow); border-radius: 14px; padding: 14px; height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; margin: 8px 0 12px; }
.elf .chat-log { height: 420px; }
.msg { display: flex; flex-direction: column; max-width: 82%; }
.msg time { font-size: .7rem; color: var(--mute); margin-top: 2px; padding: 0 6px; }
.msg-me { align-self: flex-end; align-items: flex-end; }
.msg-them { align-self: flex-start; }
.bubble { padding: 10px 14px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); overflow-wrap: anywhere; }
.msg-me .bubble { background: var(--fir); color: #fff; border-color: var(--fir); border-bottom-right-radius: 6px; }
.msg-them .bubble { border-bottom-left-radius: 6px; }
.bubble ul { margin: 6px 0; padding-left: 20px; }
.chat-form { display: flex; gap: 8px; }
.chat-empty { text-align: center; margin: auto; }
.elf-head { display: flex; gap: 14px; align-items: center; }
.elf-head .btn { margin-left: auto; }
.elf-head .h3, .elf-head p { margin: 0; }
.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mute); margin: 0 2px; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }

/* ---------- Connexion ---------- */
.auth-card { width: min(440px, 100% - 32px); margin: 48px auto 72px; padding: 32px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--mute); font-size: .85rem; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 18px 0 0; font-size: .9rem; }

/* ---------- Confettis (un seul moment animé : la révélation) ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 300; overflow: hidden; }
.confetti span { position: absolute; top: -40px; width: 10px; height: 14px; background: var(--c); border-radius: 2px; font-size: 1.4rem; animation: fall linear forwards; }
.confetti span:not(:empty) { background: none; width: auto; height: auto; }
@keyframes fall { to { transform: translate(var(--x), 110vh) rotate(540deg); } }

/* ---------- Thèmes de page (léger rappel de couleur) ---------- */
body.theme-snow { --snow: #eef2f8; }
body.theme-cozy { --snow: #f7f1ec; }
body.theme-gold { --snow: #f2f0f7; }
body.theme-forest { --snow: #eef4f0; }
.manage-grid > .card { margin-top: 0 !important; }
