/* ==========================================================
   Calendrier de l'Avent ORPI — thème Noël
   ========================================================== */
:root {
  --orpi: #e2001a;
  --orpi-dark: #b80015;
  --night: #0b1730;
  --night-2: #13254a;
  --night-3: #1c3363;
  --gold: #f4c25b;
  --gold-2: #e7a93a;
  --pine: #1d6b4f;
  --pine-2: #258762;
  --cream: #fff8ec;
  --ink: #1f2430;
  --muted: #a9b5cf;          /* contraste ≥ 4,5:1 sur le fond nuit */
  --orpi-on-dark: #ff4d62;   /* rouge ORPI éclairci, lisible sur fond sombre */
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.12);
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--cream);
  background: radial-gradient(1200px 700px at 50% -10%, var(--night-3), var(--night) 60%) fixed, var(--night);
  min-height: 100vh;
  line-height: 1.55;
  overflow-x: hidden;
}
a { color: var(--gold); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
[hidden] { display: none !important; }

#snow { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.page { position: relative; z-index: 1; }

/* ---------- En-tête ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(11, 23, 48, 0.78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--cream); }
.brand-logo { background: #fff; border-radius: 10px; padding: 4px 8px; display: flex; }
.brand-logo img { height: 30px; width: auto; display: block; }
.brand strong { font-family: var(--serif); font-size: 1.15rem; letter-spacing: .01em; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  color: var(--cream); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: .95rem; white-space: nowrap;
}
.nav a:hover { background: var(--card); }
.nav a[aria-current="page"] { background: rgba(255, 255, 255, .1); }
.nav a.cta { background: var(--orpi); font-weight: 600; }
.nav a.cta:hover { background: var(--orpi-dark); }
.menu-btn { display: none; background: none; border: 1px solid var(--card-border); color: var(--cream); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 10px 16px 16px; background: var(--night); border-bottom: 1px solid var(--card-border); display: none; }
  .nav.open { display: flex; }
  .brand strong { font-size: 1rem; }
}

/* ---------- Héro ---------- */
.hero { text-align: center; padding: clamp(36px, 7vw, 80px) 16px 20px; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; color: var(--gold); text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 700; }
.hero h1 {
  font-family: var(--serif); font-weight: 700; margin: 10px 0 8px;
  font-size: clamp(2.2rem, 6.5vw, 4.4rem); line-height: 1.05;
  text-shadow: 0 4px 30px rgba(244, 194, 91, .25);
}
.hero h1 em { font-style: normal; color: var(--orpi-on-dark); text-shadow: 0 0 24px rgba(226, 0, 26, .45); }
.hero p.lead { max-width: 640px; margin: 0 auto; color: #d7def0; font-size: 1.08rem; }

.countdown { display: inline-flex; gap: 10px; margin: 26px 0 6px; flex-wrap: wrap; justify-content: center; }
.countdown .unit { background: var(--card); border: 1px solid var(--card-border); border-radius: 14px; padding: 10px 14px; min-width: 74px; }
.countdown .num { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; display: block; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown .lbl { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.countdown-caption { color: var(--muted); font-size: .92rem; }

/* ---------- Bandeau gagnant ---------- */
.spotlight {
  max-width: 980px; margin: 26px auto 0; padding: 18px 22px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(226, 0, 26, .9), rgba(184, 0, 21, .92));
  border-radius: var(--radius); box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.spotlight::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent 0 18px, rgba(255, 255, 255, .05) 18px 36px);
  pointer-events: none;
}
.spotlight .medal { font-size: 2.4rem; }
.spotlight .who { flex: 1; min-width: 220px; }
.spotlight .who small { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; }
.spotlight .who strong { display: block; font-family: var(--serif); font-size: 1.45rem; }
.spotlight .partner { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .95); color: var(--ink); padding: 8px 14px; border-radius: 12px; font-size: .9rem; z-index: 1; }
.spotlight .partner img { height: 38px; width: auto; }

/* ---------- Scène : sapin + calendrier ---------- */
.stage {
  max-width: 1240px; margin: 34px auto 0; padding: 0 clamp(16px, 3vw, 32px);
  display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: clamp(20px, 3vw, 44px); align-items: start;
}
@media (max-width: 920px) { .stage { grid-template-columns: 1fr; } }

.tree-wrap { position: sticky; top: 90px; text-align: center; }
@media (max-width: 920px) { .tree-wrap { position: static; max-width: 340px; margin: 0 auto; } }
.tree { width: 100%; height: auto; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .45)); overflow: visible; }
.tree .orn { transform-box: fill-box; transform-origin: 50% 0%; }
.tree .orn.ring { animation: ring .7s ease; }
.tree .orn-gift { transform-origin: 50% 100%; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 45% { transform: rotate(-11deg); } 70% { transform: rotate(6deg); } }
.tree #star { transform-box: fill-box; transform-origin: center; animation: twinkle 3s ease-in-out infinite; }
.tree #star.wish { animation: wish 1.2s ease; }
@keyframes twinkle { 0%, 100% { filter: drop-shadow(0 0 6px rgba(244, 194, 91, .6)); } 50% { filter: drop-shadow(0 0 18px rgba(244, 194, 91, 1)); } }
@keyframes wish { 0% { transform: scale(1) rotate(0); } 50% { transform: scale(1.5) rotate(180deg); } 100% { transform: scale(1) rotate(360deg); } }
.tree .light { animation: blink 2.4s ease-in-out infinite; }
.tree .light:nth-child(3n) { animation-delay: .8s; }
.tree .light:nth-child(3n+1) { animation-delay: 1.6s; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
/* Combinaison du sapin : les décorations cliquées se rangent au-dessus */
.wish-row {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 58px; margin: 0 auto 4px; padding: 6px 12px; width: fit-content; max-width: 100%;
  border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(244, 194, 91, .35);
  opacity: 0; transform: translateY(8px) scale(.96); pointer-events: none; transition: opacity .3s, transform .3s;
}
.wish-row.show { opacity: 1; transform: none; pointer-events: auto; }
.wish-chips { display: flex; gap: 6px; }
.wish-chip {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fffaf0, #eadcc2); box-shadow: 0 0 0 2px rgba(244, 194, 91, .75), 0 6px 14px rgba(0, 0, 0, .35);
  animation: chip-in .45s cubic-bezier(.2, .9, .3, 1.4);
}
.wish-chip svg { width: 30px; height: 30px; overflow: visible; filter: drop-shadow(0 0 1px rgba(0, 0, 0, .55)); }
@keyframes chip-in { from { transform: translateY(70px) scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.wish-reset { border: 0; background: rgba(255, 255, 255, .12); color: var(--cream); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 1rem; line-height: 1; }
.wish-reset:hover { background: rgba(255, 255, 255, .22); }
.wish-row.pending .wish-chip { animation: chip-pulse .8s ease-in-out infinite; }
@keyframes chip-pulse { 50% { box-shadow: 0 0 0 3px var(--gold), 0 0 22px rgba(244, 194, 91, .9); } }
.wish-row.miss { animation: shake .5s; }
.wish-row.miss .wish-chip { transition: opacity .6s .3s, transform .6s .3s; opacity: 0; transform: translateY(30px) scale(.5); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.wish-row.win { border-color: var(--gold); box-shadow: 0 0 40px rgba(244, 194, 91, .8); }
.wish-row.win .wish-chip { background: radial-gradient(circle at 35% 30%, #ffe9a8, var(--gold-2)); animation: chip-win 1s ease infinite; }
@keyframes chip-win { 50% { transform: translateY(-8px) rotate(8deg); } }

.tree-caption { color: var(--muted); font-size: .88rem; font-style: italic; margin-top: 4px; }

/* ---------- Cases ---------- */
.doors { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(8px, 1.2vw, 14px); }
@media (max-width: 1100px) { .doors { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 480px) { .doors { grid-template-columns: repeat(3, 1fr); } }

.door {
  --c1: var(--orpi); --c2: var(--orpi-dark);
  position: relative; aspect-ratio: 1 / 1.08; border: 0; padding: 0; cursor: pointer; color: #fff;
  border-radius: 14px; perspective: 700px; background: transparent;
}
.door:nth-child(4n+2) { --c1: var(--pine-2); --c2: var(--pine); }
.door:nth-child(4n+3) { --c1: #284a8a; --c2: #1b3567; }
.door:nth-child(4n) { --c1: #c99632; --c2: #a5761f; }
.door .face {
  position: absolute; inset: 0; border-radius: 14px; overflow: hidden;
  background:
    linear-gradient(90deg, transparent 44%, rgba(255, 255, 255, .85) 44% 56%, transparent 56%),
    linear-gradient(0deg, transparent 44%, rgba(255, 255, 255, .85) 44% 56%, transparent 56%),
    linear-gradient(150deg, var(--c1), var(--c2));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .15), 0 10px 22px rgba(0, 0, 0, .35);
  display: grid; place-items: center;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1), filter .3s;
  transform-origin: left center;
}
.door .num {
  font-family: var(--serif); font-weight: 700; font-size: clamp(1.4rem, 3.4vw, 2.3rem); line-height: 1;
  background: var(--night); color: var(--cream); border-radius: 50%; width: 58%; aspect-ratio: 1; display: grid; place-items: center;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 6px 14px rgba(0, 0, 0, .35);
}
.door .badge {
  position: absolute; left: 6px; right: 6px; bottom: 6px; font-size: .68rem; line-height: 1.2; text-align: center;
  background: rgba(11, 23, 48, .82); border-radius: 8px; padding: 4px 4px; font-weight: 600; letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.door:hover .face { transform: rotateY(-14deg); }
.door.future { cursor: not-allowed; }
.door.future .face { filter: saturate(.25) brightness(.62); }
.door.future:hover .face { transform: none; }
.door.future .lock { position: absolute; top: 6px; right: 8px; font-size: .9rem; opacity: .85; }
.door.today .face { animation: glow 1.8s ease-in-out infinite; }
.door.today::before {
  content: "Aujourd’hui"; position: absolute; top: -9px; left: 50%; transform: translateX(-50%); z-index: 2;
  background: var(--gold); color: var(--ink); font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 2px var(--gold), 0 0 16px rgba(244, 194, 91, .5); } 50% { box-shadow: 0 0 0 3px var(--gold), 0 0 34px rgba(244, 194, 91, .9); } }
.door.opened .face { filter: brightness(.9); }
.door.opened .tick { position: absolute; top: 6px; right: 8px; background: var(--gold); color: var(--ink); border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; font-size: .8rem; font-weight: 900; }
.door.past .face { filter: saturate(.55) brightness(.8); }
.door.mine .face { box-shadow: 0 0 0 3px var(--gold), 0 0 30px rgba(244, 194, 91, .8); }

.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 18px 0 0; color: var(--muted); font-size: .85rem; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.legend .l-today::before { background: var(--gold); }
.legend .l-open::before { background: var(--orpi); }
.legend .l-done::before { background: #6b7a99; }

/* ---------- Sections génériques ---------- */
.section { max-width: 1100px; margin: 0 auto; padding: 56px clamp(16px, 4vw, 32px); }
.section h2 { font-family: var(--serif); font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin: 0 0 8px; }
.section .sub { color: var(--muted); margin: 0 0 28px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.step { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px; }
.step .ico { font-size: 1.8rem; }
.step h3 { margin: 8px 0 6px; font-size: 1.05rem; }
.step p { margin: 0; color: #c8d1e6; font-size: .95rem; }

.card { background: var(--cream); color: var(--ink); border-radius: var(--radius); padding: clamp(20px, 3vw, 34px); box-shadow: var(--shadow); }
.card h2, .card h3 { color: var(--ink); }
.card a:not(.btn) { color: var(--orpi); }

/* ---------- Boutons & formulaires ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 12px 20px; font-weight: 700; cursor: pointer; text-decoration: none;
  background: var(--orpi); color: #fff; transition: transform .15s, background .15s, opacity .15s;
}
.btn:hover { background: var(--orpi-dark); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.gold { background: var(--gold); color: var(--ink); }
.btn.gold:hover { background: var(--gold-2); }
.btn.ghost { background: transparent; color: inherit; border: 1.5px solid currentColor; }
.btn.ghost:hover { background: rgba(0, 0, 0, .05); }
.btn.small { padding: 8px 12px; font-size: .88rem; border-radius: 10px; }
.btn.danger { background: #7a0d18; }

.form { display: grid; gap: 14px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; }
.field .hint { font-size: .8rem; color: #6b7280; margin-top: 4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1.5px solid #d9d3c7; background: #fff; color: var(--ink);
}
.field input:focus { border-color: var(--orpi); outline: none; box-shadow: 0 0 0 3px rgba(226, 0, 26, .15); }
.field input[aria-invalid="true"] { border-color: var(--orpi); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--orpi); flex-shrink: 0; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pw-meter { height: 6px; background: #eee; border-radius: 6px; overflow: hidden; margin-top: 6px; }
.pw-meter span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }

.alert { border-radius: 12px; padding: 12px 14px; font-size: .93rem; }
.alert.error { background: #fde8ea; color: #8a0d1a; border: 1px solid #f5b8bf; }
.alert.ok { background: #e7f6ee; color: #145c3b; border: 1px solid #b4e2c8; }
.alert.info { background: #fff4d9; color: #6b4b00; border: 1px solid #f2d590; }

.tabs { display: flex; gap: 6px; background: #efe8db; padding: 5px; border-radius: 14px; margin-bottom: 22px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 10px; font-weight: 700; color: #6b6255; cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--orpi); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }

/* ---------- Modale ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(5, 10, 24, .72); backdrop-filter: blur(4px); }
.modal[hidden] { display: none; }
.modal-box {
  position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--cream); color: var(--ink); border-radius: 22px; box-shadow: var(--shadow);
  animation: pop .45s cubic-bezier(.2, .9, .3, 1.3);
}
@keyframes pop { from { transform: scale(.8) translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close { position: absolute; top: 10px; right: 12px; border: 0; background: rgba(0, 0, 0, .06); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; z-index: 2; color: var(--ink); }
.modal-head { background: linear-gradient(135deg, var(--orpi), var(--orpi-dark)); color: #fff; padding: 26px 26px 22px; text-align: center; position: relative; }
.modal-head .big { font-family: var(--serif); font-size: 3.2rem; line-height: 1; font-weight: 700; }
.modal-head .gift { font-size: 3rem; display: inline-block; animation: bounce 1s ease 2; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px) rotate(-8deg); } 70% { transform: translateY(0) rotate(5deg); } }
.modal-body { padding: 22px 26px 26px; }
.modal-body h3 { font-family: var(--serif); font-size: 1.5rem; margin: 0 0 6px; }
.prize-partner { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid #eadfcd; border-radius: 14px; padding: 12px; margin: 14px 0; }
.prize-partner img { width: 64px; height: 64px; object-fit: contain; }
.ticket {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px;
  background: repeating-linear-gradient(90deg, #fff 0 12px, #fff7e6 12px 24px); border: 2px dashed var(--gold-2); border-radius: 14px; padding: 12px 16px;
}
.ticket code { font-size: 1.25rem; font-weight: 800; letter-spacing: .08em; color: var(--orpi); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; word-break: break-all; }

/* ---------- Toast ---------- */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); }
.toast { background: var(--cream); color: var(--ink); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); border-left: 5px solid var(--pine-2); animation: pop .3s ease; }
.toast.error { border-left-color: var(--orpi); }

/* ---------- Gagnants ---------- */
.winners { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.winner-card { background: var(--cream); color: var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.winner-card .top { background: linear-gradient(135deg, var(--orpi), var(--orpi-dark)); color: #fff; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; }
.winner-card .day { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; line-height: 1; }
.winner-card .day small { font-size: .8rem; font-family: var(--sans); display: block; text-transform: uppercase; letter-spacing: .1em; }
.winner-card .body { padding: 16px 18px; flex: 1; }
.winner-card .name { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
.winner-card .prize { color: #4a4f5c; margin: 6px 0 12px; }
.winner-card .partner { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: #6b7280; }
.winner-card .partner img { width: 40px; height: 40px; object-fit: contain; }
.winner-card .foot a { display: inline-block; padding: 8px 4px; }
.winner-card .foot { border-top: 1px solid #eee3d0; padding: 4px 18px; display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: #6b7280; }
.wc-lot + .wc-lot { border-top: 1px dashed #eadfcd; margin-top: 10px; padding-top: 10px; }
.proof-winners { padding-left: 18px; font-size: .9rem; }
.winner-card.pending { background: var(--card); color: var(--cream); border: 1px solid var(--card-border); box-shadow: none; }
.winner-card.pending .top { background: rgba(255, 255, 255, .07); }
.winner-card.pending .prize { color: #c3cce0; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.pill.ok { background: #e7f6ee; color: #145c3b; }
.pill.wait { background: #fff4d9; color: #6b4b00; }

/* ---------- Règlement ---------- */
.legal { max-width: 860px; margin: 0 auto; }
.legal h2 { font-family: var(--serif); margin-top: 1.6em; }
.legal h3 { margin-top: 1.4em; font-size: 1.05rem; }
.legal p, .legal li { color: #2f3442; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.toc a { background: #efe8db; color: var(--ink); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: .88rem; }
.legal table { width: 100%; border-collapse: collapse; font-size: .92rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.legal table th, .legal table td { min-width: 130px; }
.legal td, .legal th { border: 1px solid #e3d9c6; padding: 8px 10px; text-align: left; vertical-align: top; }

/* ---------- Compte ---------- */
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .account-grid { grid-template-columns: 1fr; } }
.tickets-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tickets-list li { list-style: none; background: #fff; border: 1px dashed var(--gold-2); border-radius: 10px; padding: 8px 10px; font-size: .85rem; }
.tickets-list ul { padding: 0; margin: 0; }
.tickets-list code { color: var(--orpi); font-weight: 800; }

/* ---------- Pied de page ---------- */
.footer { border-top: 1px solid var(--card-border); margin-top: 60px; padding: 28px 16px 40px; text-align: center; color: var(--muted); font-size: .88rem; }
.footer nav { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.footer a { color: #c8d1e6; }

/* ---------- Confettis (easter egg / victoire) ---------- */
.confetti { position: fixed; top: -10px; width: 10px; height: 14px; z-index: 70; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

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

/* Liens lisibles sur fond clair */
.modal-box a:not(.btn), .winner-card a:not(.btn), .prize-partner a { color: var(--orpi); }

/* ---------- Grand cadeau final ---------- */
.final-door {
  position: relative; width: 100%; margin-top: 18px; border: 0; cursor: pointer; color: var(--ink); text-align: left;
  border-radius: 20px; padding: 22px 26px 22px 110px; overflow: hidden;
  background: linear-gradient(120deg, #f8d77a, var(--gold) 40%, #d99a2b);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .55) inset, 0 16px 40px rgba(0, 0, 0, .4);
  transition: transform .2s;
}
.final-door:hover { transform: translateY(-2px); }
.final-door::before { content: "🎁"; position: absolute; left: 26px; top: 50%; transform: translateY(-50%); font-size: 3.6rem; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); }
.final-ribbon { position: absolute; inset: 0 auto 0 86px; width: 12px; background: var(--orpi); opacity: .9; }
.final-content { position: relative; display: grid; gap: 2px; }
.final-eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 800; color: #7a4a00; }
.final-title { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; line-height: 1.1; }
.final-sub { font-size: .92rem; color: #4a3200; }
.final-door.future { filter: saturate(.75); }
.final-door.open { animation: glow 1.8s ease-in-out infinite; }
.final-door.mine { box-shadow: 0 0 0 4px var(--orpi) inset, 0 0 40px rgba(244, 194, 91, .9); }
@media (max-width: 480px) { .final-door { padding-left: 84px; } .final-door::before { left: 14px; font-size: 2.8rem; } .final-ribbon { left: 66px; } }

/* ---------- Plusieurs lots / plusieurs partenaires ---------- */
.prize-partner .pp-logos { display: flex; gap: 6px; flex-shrink: 0; }
.prize-partner .pp-logos img { width: 54px; height: 54px; object-fit: contain; background: #fff; border-radius: 10px; }
.prize-partner.multi { margin: 8px 0; }
.lot-rank { display: inline-block; background: var(--orpi); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .7rem; font-weight: 800; margin-right: 6px; text-transform: uppercase; letter-spacing: .05em; }
.lot-desc { font-size: .88rem; color: #4a4f5c; margin-top: 4px; }
.lot-winner { margin-top: 6px; font-weight: 700; color: #145c3b; }
.lots-intro { margin: 10px 0 4px; font-size: .93rem; }
.spotlight .who strong + .sp-lot { display: block; font-size: .85rem; opacity: .9; margin-bottom: 4px; }
.spotlight .partner img { height: 34px; width: auto; }

/* ---------- Murmure du sapin & bons plans ---------- */
.whisper { margin: 14px 0; padding: 12px 14px; border-radius: 12px; background: #f4ecdc; border: 1px dashed #c9a96a; color: #5b4520; font-family: var(--serif); }
.offer { background: #fff1f2; border: 1px solid #f5c2c8; color: #7a0d18; border-radius: 12px; padding: 10px 12px; font-size: .92rem; margin-bottom: 8px; }
.partner-more { margin: 4px 0 0; font-size: .9rem; }

/* ---------- Bandeau partenaires (accueil) ---------- */
.partners-strip { text-align: center; }
.ps-logos { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 10px 0 24px; }
.ps-logo { background: #fff; border-radius: 14px; width: 120px; height: 84px; display: grid; place-items: center; padding: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .9rem; box-shadow: var(--shadow); transition: transform .2s; }
.ps-logo:hover { transform: translateY(-3px) rotate(-1deg); }
.ps-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- Page partenaires ---------- */
.partners-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.p-card { background: var(--cream); color: var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; scroll-margin-top: 90px; }
.p-card:target { outline: 4px solid var(--gold); }
.p-head { display: flex; gap: 14px; align-items: center; padding: 18px; background: #fff; border-bottom: 1px solid #eee3d0; }
.p-head img, .p-head .p-ph { width: 76px; height: 76px; object-fit: contain; border-radius: 12px; flex-shrink: 0; }
.p-head .p-ph { display: grid; place-items: center; background: #f4ecdc; font-size: 2rem; }
.p-head h2 { margin: 0; font-size: 1.25rem; font-family: var(--serif); color: var(--ink); }
.p-cat { font-size: .8rem; color: #6b7280; text-transform: uppercase; letter-spacing: .06em; }
.p-body { padding: 16px 18px; flex: 1; display: grid; gap: 10px; align-content: start; }
.p-body p { margin: 0; color: #3b4150; }
.p-gifts { display: flex; flex-wrap: wrap; gap: 6px; }
.p-gift { background: var(--orpi); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 700; }
.p-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 18px; }
.p-links a { color: var(--ink); }

/* ---------- Bandeau cookies ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80; margin: 0 auto; max-width: 720px;
  background: var(--cream); color: var(--ink); border-radius: 18px; padding: 18px 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; animation: pop .4s ease;
}
.cookie-banner p { margin: 0; font-size: .9rem; }
.cookie-banner a { color: var(--orpi); }
.cookie-actions { display: flex; gap: 10px; }
.cookie-btn { background: var(--night); color: #fff; min-width: 110px; }
.cookie-btn:hover { background: var(--night-3); }
@media (max-width: 640px) { .cookie-banner { grid-template-columns: 1fr; } .cookie-actions .btn { flex: 1; } }

/* ---------- Petits utilitaires ---------- */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mt-18 { margin-top: 18px; }
.small-muted { font-size: .85rem; color: #6b7280; }
fieldset.optional { border: 1.5px dashed #d9d3c7; border-radius: 14px; padding: 12px 14px 4px; display: grid; gap: 12px; }
fieldset.optional legend { font-weight: 700; padding: 0 6px; }
fieldset.optional legend small { font-weight: 400; color: #6b7280; }
.field select { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1.5px solid #d9d3c7; background: #fff; color: var(--ink); }

/* ---------- Parrainage ---------- */
.referral-card { background: linear-gradient(135deg, #fff8ec, #fff1d6); }
.ref-link { display: flex; gap: 8px; flex-wrap: wrap; }
.ref-link input { flex: 1; min-width: 200px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid #e3c98f; background: #fff; font-family: ui-monospace, Menlo, monospace; font-size: .85rem; color: var(--ink); }
.ref-score { margin: 12px 0 6px; }
.ref-friends { margin: 0; padding-left: 18px; }

/* ---------- Sondage ---------- */
.stars { display: flex; gap: 6px; flex-direction: row-reverse; justify-content: flex-end; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { font-size: 2rem; cursor: pointer; color: #d9d3c7; transition: color .15s; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: var(--gold-2); }
.stars input:focus-visible + label { outline: 3px solid var(--gold); border-radius: 6px; }
.hint-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }

/* Utilitaires (remplacent les styles en ligne, interdits par la CSP) */
.u1 { font-family:var(--serif) !important; }
.u2 { font-family:var(--serif) !important; margin-top:2em !important; }
.u3 { max-width:820px !important; }
.u4 { margin:0 !important; }
.u5 { margin:0 !important; font-size:.8rem !important; color:#6b7280 !important; }
.u6 { margin-bottom:18px !important; }
.u7 { margin:0 0 4px !important; }
.u8 { margin:0 !important; color:#6b7280 !important; }
.u9 { margin-top:14px !important; }
.u10 { margin:16px 0 0 !important; display:flex !important; gap:10px !important; flex-wrap:wrap !important; }
.u11 { margin-top:0 !important; }
.u12 { font-size:.82rem !important; color:#6b7280 !important; }
.u13 { margin-top:18px !important; }
.u14 { display:flex !important; gap:10px !important; flex-wrap:wrap !important; }
.u15 { min-height:80vh !important; display:grid !important; place-content:center !important; }
.u16 { font-size:4rem !important; }
.u17 { margin-top:24px !important; }
.u18 { padding-bottom:0 !important; }
.u19 { font-size:1.6rem !important; }
.u20 { border-top:1px solid #eadfcd !important; padding-top:12px !important; margin-top:12px !important; }
.u21 { margin:6px 0 !important; }
.u22 { font-size:.85rem !important; }
.u23 { font-size:.88rem !important; }
.u24 { margin-top:16px !important; }
.u25 { font-size:2.4rem !important; }
.u26 { font-size:.93rem !important; color:#4a4f5c !important; }
.u27 { font-size:.88rem !important; color:#6b7280 !important; margin-bottom:0 !important; }
.u28 { font-size:1.15rem !important; }
.u29 { color:var(--orpi) !important; }
.u30 { color:#6b7280 !important; font-size:.9rem !important; }
@media (max-width: 480px) { .tabs button { font-size: .82rem; padding: 8px 4px; } }

/* ---------- Bon de retrait ---------- */
.voucher { background: #fff; color: var(--ink); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); margin: 0 auto 22px; max-width: 640px; border: 2px dashed var(--gold-2); break-inside: avoid; }
.voucher.claimed { opacity: .65; }
.v-top { display: flex; gap: 14px; align-items: center; background: linear-gradient(135deg, var(--orpi), var(--orpi-dark)); color: #fff; padding: 14px 18px; }
.v-top img { height: 34px; background: #fff; border-radius: 8px; padding: 3px 6px; }
.v-body { display: flex; gap: 20px; padding: 18px; align-items: center; flex-wrap: wrap; }
.v-qr { width: 190px; height: 190px; border: 1px solid #eee3d0; border-radius: 12px; padding: 6px; background: #fff; }
.v-day { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; }
.v-lot { font-size: 1.1rem; font-weight: 700; color: var(--orpi); margin: 4px 0; }
.v-partner, .v-who, .v-code, .v-deadline { margin-top: 6px; font-size: .95rem; }
.v-code code { font-size: 1.1rem; font-weight: 800; letter-spacing: .05em; }
.v-foot { background: #faf7f2; color: #6b7280; font-size: .8rem; padding: 10px 18px; }
.bons-intro { margin-bottom: 18px; }
.voucher-check { text-align: center; }
.voucher-check .vc-icon { font-size: 4rem; }
@media print {
  .topbar, .footer, #snow, .no-print, .cookie-banner { display: none !important; }
  body { background: #fff !important; }
  .voucher { box-shadow: none; }
}

/* ---------- Séries, badges, partage, estimation ---------- */
.progress-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 4px; }
.streak { background: #fff1d6; color: #7a4a00; border-radius: 999px; padding: 4px 12px; font-weight: 700; }
.badge-pill { background: #e7f6ee; color: #145c3b; border-radius: 999px; padding: 4px 10px; font-weight: 700; font-size: .85rem; margin-right: 4px; }
.small-link { font-size: .85rem; color: var(--orpi); margin-left: auto; }
.share-box { margin: 14px 0 0; display: grid; gap: 8px; justify-items: start; }
.share-alt { display: flex; gap: 8px; flex-wrap: wrap; }
.estim { margin-top: 16px; border-top: 1px dashed #eadfcd; padding-top: 14px; }
.estim-teaser { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.estim-teaser > span { font-size: 1.8rem; }
.estim-teaser > div { flex: 1; min-width: 180px; }
.estim-form { gap: 10px; }
.badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.badge-tile { display: grid; gap: 2px; text-align: center; padding: 12px 8px; border-radius: 14px; background: #eee8dc; color: #4b5160; }
.badge-tile:not(.earned) .bt-icon { filter: grayscale(1); opacity: .55; }
.badge-tile .small-muted { color: #5b6170; }
.badge-tile.earned { background: linear-gradient(135deg, #fff8e6, #ffe9b0); filter: none; opacity: 1; box-shadow: 0 0 0 2px var(--gold) inset; }
.bt-icon { font-size: 1.9rem; }
.live-link { margin: 6px 0 0; }
.live-link a { color: var(--cream); font-weight: 700; font-size: .92rem; text-decoration: none; background: rgba(226, 0, 26, .25); border: 1px solid rgba(226, 0, 26, .6); padding: 4px 12px; border-radius: 999px; }

/* ---------- Tirage en direct ---------- */
.live { min-height: calc(100vh - 70px); display: grid; align-content: start; justify-items: center; text-align: center; padding: 30px 16px 50px; background: radial-gradient(1000px 600px at 50% 0, var(--night-3), var(--night)); }
.live:fullscreen { min-height: 100vh; align-content: center; }
.live-head h1 { font-family: var(--serif); font-size: clamp(2rem, 6vw, 4.2rem); margin: 8px 0 4px; }
.live-stage { width: min(1000px, 100%); margin-top: 22px; display: grid; gap: 18px; justify-items: center; }
.live-count { display: flex; gap: 14px; justify-content: center; max-width: 100%; }
.live-count div { background: var(--card); border: 1px solid var(--card-border); border-radius: 18px; padding: 14px 20px; min-width: 110px; }
.live-count b { display: block; font-family: var(--serif); font-size: clamp(2.4rem, 7vw, 4.5rem); line-height: 1; font-variant-numeric: tabular-nums; }
.live-count span { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; }
.live-big { font-size: clamp(1.1rem, 2.6vw, 1.6rem); margin: 0; }
.live-lots { display: grid; gap: 12px; width: 100%; max-width: 720px; }
.live-lot { display: flex; gap: 16px; align-items: center; text-align: left; background: rgba(255, 255, 255, .07); border: 1px solid var(--card-border); border-radius: 16px; padding: 12px 16px; font-size: 1.1rem; }
.live-lot span { color: #c8d1e6; font-size: .95rem; }
.live-logos { display: flex; gap: 6px; font-size: 2rem; }
.live-logos img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 12px; padding: 4px; }
.live-wait { display: grid; gap: 14px; justify-items: center; }
.live-spinner { width: 70px; height: 70px; border-radius: 50%; border: 6px solid rgba(255, 255, 255, .15); border-top-color: var(--gold); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.live-reveal { display: grid; gap: 10px; justify-items: center; }
.live-lot-name { font-family: var(--serif); font-size: clamp(1.6rem, 4.5vw, 2.8rem); color: var(--gold); }
.live-offered { color: #c8d1e6; font-size: 1.1rem; }
.live-reel { margin-top: 10px; background: #fff; color: var(--ink); border-radius: 18px; padding: 16px 30px; font-family: ui-monospace, Menlo, monospace; font-size: clamp(2rem, 7vw, 4.4rem); font-weight: 800; letter-spacing: .08em; box-shadow: 0 0 0 6px rgba(244, 194, 91, .35); }
.live-reel.stop { box-shadow: 0 0 0 6px var(--gold), 0 0 60px rgba(244, 194, 91, .8); color: var(--orpi); }
.live-winner { font-family: var(--serif); font-size: clamp(2rem, 6vw, 4rem); font-weight: 700; opacity: 0; transform: scale(.6); transition: all .6s cubic-bezier(.2, .9, .3, 1.4); }
.live-winner.show { opacity: 1; transform: none; }
.live-done { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.live-done.big .live-chip { font-size: 1.3rem; padding: 12px 18px; }
.live-chip { background: rgba(255, 255, 255, .1); border: 1px solid var(--card-border); border-radius: 999px; padding: 6px 14px; }
.live-go { font-size: 1.2rem; padding: 16px 28px; }
.live-tools { margin-top: 28px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; }
.live-tools select { padding: 8px 10px; border-radius: 10px; background: var(--night-2); color: var(--cream); border: 1px solid var(--card-border); }
.live:fullscreen .live-tools { opacity: .25; }


/* =====================================================================
   Mobile : priorité à l'action (case du jour), lisibilité, zones tactiles
   ===================================================================== */
.hero-cta { margin: 18px 0 0; }
.hero-cta .btn { font-size: 1.05rem; padding: 14px 24px; box-shadow: 0 10px 30px rgba(244, 194, 91, .35); }
.small-muted { color: var(--muted); }
.card .small-muted, .modal-box .small-muted, .voucher .small-muted, .badge-tile .small-muted { color: #5b6170; }
.live > * { max-width: 100%; }
.live-head, .live-stage { width: 100%; }

@media (max-width: 920px) {
  /* Les cases d'abord, le sapin (et son secret) ensuite */
  .stage > div:last-child { order: -1; }
  .tree-wrap { max-width: 280px; }
}

@media (max-width: 640px) {
  .hero { padding: 26px 16px 8px; }
  .hero h1 { font-size: clamp(2rem, 9.5vw, 2.6rem); }
  .hero p.lead { font-size: .98rem; }
  .countdown { display: flex; width: 100%; gap: 8px; margin-top: 18px; }
  .countdown .lbl { letter-spacing: .04em; font-size: .66rem; }
  .door .badge { font-size: .62rem; left: 4px; right: 4px; bottom: 4px; }
  .countdown .unit { min-width: 0; flex: 1; padding: 8px 6px; }
  .countdown .num { font-size: 1.6rem; }
  .countdown-caption { font-size: .88rem; }
  .spotlight { flex-direction: column; text-align: center; gap: 10px; padding: 14px 16px; margin-top: 18px; }
  .spotlight .medal { font-size: 1.8rem; }
  .spotlight .who strong { font-size: 1.2rem; }
  .spotlight .partner { width: 100%; justify-content: center; text-align: center; }
  .stage { margin-top: 20px; }
  .section { padding: 40px 16px; }
  .step { padding: 16px; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
  .brand strong { font-size: .95rem; }
  .brand-logo img { height: 26px; }
  /* Modales plein écran ou presque */
  .modal { padding: 8px; align-items: end; }
  .modal-box { border-radius: 18px 18px 14px 14px; max-height: calc(100vh - 16px); }
  .modal-head { padding: 20px 18px 16px; }
  .modal-head .big { font-size: 2.4rem; }
  .modal-body { padding: 18px 18px 22px; }
  .ticket { flex-wrap: wrap; }
  .ticket code { font-size: 1.1rem; }
  .prize-partner { align-items: flex-start; }
  .prize-partner .pp-logos img { width: 44px; height: 44px; }
  .share-box .btn, .estim-teaser .btn { width: 100%; }
  .final-door { padding: 18px 16px 18px 84px; }
  .final-sub { font-size: .86rem; }
  .card { padding: 18px; }
  .cookie-banner { left: 8px; right: 8px; bottom: 8px; padding: 14px; }
  .live { padding: 18px 12px 40px; }
  .live-count { gap: 6px; }
  .live-count div { min-width: 0; flex: 1; padding: 10px 6px; }
  .live-count b { font-size: 2rem; }
  .live-lot { font-size: 1rem; }
  .live-reel { padding: 12px 14px; font-size: 1.6rem; }
  .voucher .v-body { justify-content: center; text-align: center; }
  .footer nav { gap: 6px 14px; }
  .footer nav a { padding: 6px 0; display: inline-block; }
}
