/* Tombola de Noël · Les écoles de Célony (pensé d'abord pour le téléphone) */
:root {
  --font-title: 'Baloo 2', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --green-deep: #1f6b30;
  --cream: #fff8ee;
  --ink: #23203a;
  --ink-soft: #625b78;
  --white: #ffffff;
  --red: #c92a2a;
  --red-deep: #c92a2a;
  --green: #2b8a3e;
  --gold: #fcc419;
  --gold-deep: #f08c00;
  --radius: 26px;
  --shadow: 0 14px 34px -16px rgba(35, 20, 60, 0.35);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-main);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: 88px; /* place pour la barre du bas */
}
a { color: inherit; }
strong { font-weight: 800; }

/* ============ En-tête (mêmes couleurs que la note papier) ============ */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  text-align: center;
  padding: 2.2rem 1.25rem 5.5rem;
  background:
    radial-gradient(70% 45% at 0% 0%, rgba(201, 42, 42, 0.16) 0%, transparent 70%),
    radial-gradient(70% 45% at 100% 30%, rgba(43, 138, 62, 0.16) 0%, transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #fff4ec 100%);
}
.hero::after { /* colline enneigée */
  content: '';
  position: absolute;
  left: -10%; right: -10%; bottom: -1px;
  height: 70px;
  background: var(--cream);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  box-shadow: 0 -8px 24px -12px rgba(201, 42, 42, 0.25);
}
.snow { position: absolute; inset: 0; pointer-events: none; }
.flake {
  position: absolute;
  top: -12px;
  border-radius: 50%;
  animation: fall linear infinite;
}
@keyframes fall {
  to { transform: translate3d(var(--drift, 20px), 110vh, 0); }
}

.hero-inner { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; }
.logo {
  width: 108px; height: 108px; object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(80, 30, 30, 0.22));
  animation: bob 5s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }

.school {
  font-weight: 700; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0.6rem 0 0.35rem;
}
.hero h1 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(2.6rem, 12.5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--red-deep);
}
.hero h1 .green { display: block; color: var(--green); }

.price-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin: 1.2rem 0 1.4rem;
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
}
.price-chip b {
  background: var(--red-deep); color: var(--white);
  border-radius: 999px; padding: 0.1rem 0.6rem; font-weight: 800;
}

/* Compte à rebours */
.countdown-label { font-weight: 700; font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 0.55rem; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; max-width: 360px; margin: 0 auto; }
.cd {
  background: var(--white);
  border-radius: 16px;
  padding: 0.55rem 0 0.45rem;
  box-shadow: 0 8px 20px -12px rgba(80, 30, 30, 0.35);
}
.cd b {
  display: block;
  font-family: var(--font-title);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--red-deep);
  font-variant-numeric: tabular-nums;
}
.cd span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.countdown-done { font-family: var(--font-title); font-size: 1.5rem; color: var(--green); }
.draw-where { margin-top: 0.85rem; font-size: 0.95rem; font-weight: 700; color: var(--green); }

/* ============ Contenu ============ */
.main { max-width: 560px; margin: -2.2rem auto 0; padding: 0 1.1rem; position: relative; z-index: 2; }
section { margin-bottom: 2.4rem; }

.kicker {
  font-weight: 800; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.3rem;
}
h2 { font-family: var(--font-title); font-weight: 800; font-size: 2rem; line-height: 1.05; margin-bottom: 1rem; }

/* Mission */
.mission {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.2rem;
  box-shadow: var(--shadow);
  display: flex; gap: 0.9rem; align-items: center;
}
.mission-emoji { font-size: 2.4rem; line-height: 1; }
.mission p { font-size: 0.98rem; color: var(--ink-soft); }
.mission strong { color: var(--ink); }

/* Gros lot en paquet cadeau */
.jackpot {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 2.4rem 1.4rem 1.6rem;
  text-align: center;
  color: var(--white);
  background: linear-gradient(150deg, #e03131 0%, #c92a2a 60%, #a51d1d 100%);
  box-shadow: 0 22px 44px -18px rgba(201, 42, 42, 0.6);
  margin-bottom: 1rem;
}
.jackpot::before, .jackpot::after { /* ruban */
  content: ''; position: absolute; background: linear-gradient(90deg, #ffd43b, #fab005);
  opacity: 0.95;
}
.jackpot::before { top: 0; bottom: 0; left: 50%; width: 22px; transform: translateX(-50%); }
.jackpot::after { left: 0; right: 0; top: 64px; height: 22px; }
.jackpot > * { position: relative; z-index: 1; }
.bow { font-size: 3.2rem; line-height: 1; margin-top: -0.4rem; filter: drop-shadow(0 6px 10px rgba(0,0,0,.25)); }
.jackpot-badge {
  display: inline-block;
  margin-top: 1.4rem;
  background: var(--white); color: var(--red-deep);
  font-weight: 800; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.3rem 0.8rem; border-radius: 999px;
}
.jackpot-name {
  font-family: var(--font-title); font-weight: 800;
  font-size: clamp(2rem, 10vw, 2.8rem); line-height: 1;
  margin: 0.6rem 0 0.2rem;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}
.jackpot-photo {
  width: min(78%, 280px);
  aspect-ratio: 1;
  margin: 0.9rem auto 0;
  background: var(--white);
  border-radius: 24px;
  padding: 0.8rem;
  box-shadow: 0 18px 36px -14px rgba(0, 0, 0, 0.45);
  transform: rotate(-3deg);
  animation: wiggle 3.2s ease-in-out infinite;
}
.jackpot-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(-3deg); } 85% { transform: rotate(-7deg); } 90% { transform: rotate(2deg); } 95% { transform: rotate(-5deg); } }

.gift-wide { grid-column: 1 / -1; padding-top: 1rem; }
.gift-photos {
  display: flex; align-items: flex-end; justify-content: center; gap: 0.6rem;
  height: 170px;
  margin-bottom: 0.7rem;
}
.gift-photos img { height: 100%; width: auto; max-width: 58%; object-fit: contain; }
.gift-photos img + img { height: 82%; }
.gift-lunii .gift-photos img { max-width: 100%; }

/* Gagnants */
.winners {
  background: var(--white);
  border-radius: 30px;
  padding: 1.6rem 1.2rem 1.3rem;
  box-shadow: 0 0 0 4px var(--gold), var(--shadow);
  text-align: center;
  scroll-margin-top: 1rem;
}
.winners h3 { font-family: var(--font-title); font-size: 1.3rem; margin: 1.4rem 0 0.7rem; }
.winners-demo {
  background: #fff3bf; color: #7a5300;
  font-weight: 700; font-size: 0.85rem;
  border-radius: 12px; padding: 0.5rem 0.7rem;
  margin: -0.4rem 0 1rem;
}
.winners-list { list-style: none; display: grid; gap: 0.55rem; text-align: left; }
.winners-list li {
  display: grid; grid-template-columns: 1fr auto; gap: 0.1rem 0.6rem; align-items: center;
  background: #fffaf2; border-radius: 16px; padding: 0.75rem 0.9rem;
}
.winners-list li:first-child { background: linear-gradient(90deg, #fff3bf, #ffec99); }
.winners-challenge li:first-child { background: #fffaf2; }
.w-lot { grid-column: 1 / -1; font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); }
.w-who { font-family: var(--font-title); font-weight: 800; font-size: 1.25rem; line-height: 1.1; }
.w-num { font-size: 0.8rem; font-weight: 700; color: var(--red-deep); background: #fff0f6; border-radius: 999px; padding: 0.15rem 0.55rem; white-space: nowrap; }
.winners-foot { margin-top: 1.1rem; color: var(--ink-soft); font-size: 0.92rem; }
.winners-cta { margin-top: 0.4rem; }
.winners-cta + .draw-where { margin-top: 1rem; }

.gifts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.gift {
  background: var(--white);
  border-radius: 22px;
  padding: 1.1rem 0.9rem;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 6px solid var(--c, var(--green));
}
.gift-emoji { font-size: 2.2rem; line-height: 1; display: block; margin-bottom: 0.45rem; }
.gift p { font-weight: 700; font-size: 0.95rem; line-height: 1.25; }
.gift:nth-child(1) { --c: #f76707; }
.gift:nth-child(2) { --c: #7048e8; }
.gift:nth-child(3) { --c: #1c7ed6; }
.gift:nth-child(4) { --c: var(--green); }

/* Frise des étapes */
.timeline { list-style: none; position: relative; padding-left: 3.3rem; }
.timeline::before {
  content: ''; position: absolute; left: 1.15rem; top: 0.6rem; bottom: 0.6rem; width: 3px;
  background: repeating-linear-gradient(180deg, var(--red) 0 10px, transparent 10px 18px);
  border-radius: 3px;
}
.timeline li { position: relative; background: var(--white); border-radius: 20px; padding: 1rem 1.1rem; box-shadow: var(--shadow); margin-bottom: 0.8rem; }
.timeline li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: -3.3rem; top: 0.85rem;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-title); font-weight: 800; font-size: 1.2rem;
  color: var(--white); background: var(--bg-step, var(--red));
  box-shadow: 0 0 0 5px var(--cream);
}
.timeline { counter-reset: step; }
.timeline li:nth-child(2) { --bg-step: var(--green); }
.timeline li:nth-child(3) { --bg-step: var(--gold-deep); }
.timeline h3 { font-family: var(--font-title); font-size: 1.2rem; line-height: 1.15; margin-bottom: 0.2rem; }
.timeline p { font-size: 0.95rem; color: var(--ink-soft); }
.deadline {
  display: inline-block; margin-top: 0.15rem;
  background: #fff0f6; color: var(--red-deep);
  font-weight: 800; font-size: 0.85rem;
  padding: 0.15rem 0.6rem; border-radius: 999px;
}
.envelope { list-style: none; margin-top: 0.6rem; display: grid; gap: 0.35rem; }
.envelope li { all: unset; display: flex; gap: 0.5rem; font-size: 0.92rem; color: var(--ink-soft); }
.envelope li::before { all: unset; content: '✓'; color: var(--green); font-weight: 800; }

/* Challenge + podium */
.challenge {
  background: linear-gradient(180deg, #fff9db 0%, #fff3bf 100%);
  border-radius: 30px;
  padding: 1.6rem 1.2rem 1.3rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.challenge .kicker { color: var(--gold-deep); }
.challenge-lead { color: var(--ink-soft); font-size: 0.98rem; margin: -0.4rem 0 1.4rem; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 0.45rem; }
.step-p { display: flex; flex-direction: column; align-items: center; }
.step-p .who { font-size: 2rem; line-height: 1; margin-bottom: 0.3rem; }
.step-p .tickets { font-weight: 800; font-size: 0.82rem; margin-bottom: 0.35rem; color: var(--ink); }
.block {
  width: 100%;
  border-radius: 14px 14px 6px 6px;
  color: var(--white);
  font-family: var(--font-title); font-weight: 800; font-size: 1.6rem;
  display: grid; place-items: center;
}
.p1 .block { height: 108px; background: linear-gradient(180deg, #fcc419, #f08c00); font-size: 2.1rem; }
.p2 .block { height: 78px; background: linear-gradient(180deg, #ced4da, #868e96); }
.p3 .block { height: 62px; background: linear-gradient(180deg, #ffa94d, #d9480f); }
.podium-more { margin-top: 0.8rem; font-weight: 700; font-size: 0.9rem; color: var(--ink-soft); }
.challenge-tip { margin-top: 0.9rem; font-size: 0.92rem; }

/* Fin */
.finale {
  text-align: center;
  border-radius: 30px;
  padding: 1.8rem 1.3rem;
  color: var(--white);
  background: linear-gradient(160deg, var(--green) 0%, var(--green-deep) 100%);
  box-shadow: var(--shadow);
}
.finale h2 { margin-bottom: 0.4rem; }
.finale p { color: rgba(255, 255, 255, 0.82); font-size: 0.96rem; margin-bottom: 1.2rem; }
.finale .btn { width: 100%; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border: none; border-radius: 16px;
  padding: 0.95rem 1.1rem;
  font-family: inherit; font-weight: 800; font-size: 1rem;
  cursor: pointer; text-decoration: none;
  background: var(--white); color: var(--ink);
  transition: transform 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-red { background: var(--red-deep); color: var(--white); }

.site-footer { text-align: center; color: var(--ink-soft); font-size: 0.88rem; padding: 0 1rem 1.5rem; }
.site-footer a { font-weight: 700; }

/* Barre fixe en bas (téléphone) */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem;
  padding: 0.7rem 0.9rem calc(0.7rem + env(safe-area-inset-bottom));
  background: rgba(255, 248, 238, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(35, 32, 58, 0.08);
  transform: translateY(110%);
  transition: transform 0.4s var(--ease);
}
.dock.show { transform: none; }
.dock .btn { padding: 0.8rem 0.6rem; font-size: 0.95rem; }

/* Apparitions au défilement */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Grand écran : la page reste centrée comme une carte */
@media (min-width: 760px) {
  .hero { padding-top: 3rem; padding-bottom: 6.5rem; }
  .logo { width: 132px; height: 132px; }
  .dock { left: 50%; right: auto; width: 520px; transform: translate(-50%, 110%); border-radius: 22px 22px 0 0; border: 1px solid rgba(35, 32, 58, 0.08); }
  .dock.show { transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .snow { display: none; }
  .reveal { opacity: 1; transform: none; }
}
