/* Charte « Le Calendrier des Genevois 2027 » — La Jonx */
:root {
  --sky-top: #8ccbe0;
  --sky-mid: #c6e3ec;
  --sky-bottom: #f4ecd9;
  --cream: #fbf6ea;
  --white: #ffffff;
  --navy: #1e2d5a;
  --navy-soft: #4a5680;
  --coral: #e2483d;
  --coral-soft: #fbe3df;
  --yellow: #ffd103;
  --yellow-deep: #e9b32e;
  --line: #e7dcc6;
  --radius: 18px;
  --sans: "Poppins", system-ui, -apple-system, sans-serif;
  --script: "Lobster", "Brush Script MT", cursive;
  --hand: "Caveat", "Comic Sans MS", cursive;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--navy);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  background-color: var(--cream);
  background-image: linear-gradient(180deg, var(--sky-top) 0px, var(--sky-mid) 420px, var(--sky-bottom) 1100px, var(--cream) 1600px);
  background-repeat: no-repeat;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Bandeau supérieur */
.banner {
  background: var(--cream);
  border-top: 3px solid var(--yellow);
  border-bottom: 3px solid var(--yellow);
  color: var(--navy);
  text-align: center;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  padding: 9px 16px;
}

/* Ciel, nuages, logo : les nuages traversent toute la largeur de la page */
.hero {
  position: relative;
  margin: 0 0 8px;
  padding: 26px 16px 6px;
  overflow: hidden;
}
.cloud {
  position: absolute; left: 0; z-index: 0; height: auto; pointer-events: none; opacity: .95;
  animation: fly linear infinite;
  will-change: transform;
}
.cloud-left  { width: 210px; bottom: 18px; animation-duration: 26s; animation-delay: -9s; }
.cloud-right { width: 230px; top: 0; animation-name: fly-back; animation-duration: 38s; animation-delay: -27s; }
@keyframes fly {
  from { transform: translateX(-260px); }
  to   { transform: translateX(calc(100vw + 40px)); }
}
@keyframes fly-back {
  from { transform: translateX(calc(100vw + 40px)); }
  to   { transform: translateX(-260px); }
}
@media (prefers-reduced-motion: reduce) { .cloud { animation: none; } .cloud-left { left: 4%; } .cloud-right { left: auto; right: 4%; } }

.mascot { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.logo-link { display: block; margin-top: 10px; }
.logo { display: block; width: min(330px, 82vw); height: auto; filter: drop-shadow(0 6px 0 rgba(30,45,90,.08)); }
.bubble {
  position: relative;
  background: var(--white);
  color: var(--navy);
  font-family: var(--hand);
  font-size: 22px;
  line-height: 1.1;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: center;
  padding: 10px 18px;
  border-radius: 40px;
  max-width: 260px;
  transform: rotate(-4deg);
  box-shadow: 0 4px 0 rgba(30,45,90,.08);
}
.bubble::after {
  content: ""; position: absolute; bottom: -12px; left: 60%;
  border: 10px solid transparent; border-top-color: var(--white); border-bottom: 0;
}

/* Page */
.page { max-width: 820px; margin: 0 auto; padding: 0 16px 60px; }
.topbar {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 18px;
}
.topbar a { color: var(--navy-soft); text-decoration: none; }
.topbar a:hover { color: var(--coral); }

.month {
  display: inline-block;
  color: var(--coral);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .32em;
  text-transform: uppercase;
}
h1 {
  font-family: var(--script);
  font-weight: 400;
  color: var(--yellow);
  font-size: clamp(2.4rem, 9vw, 4.2rem);
  line-height: 1.02;
  margin: 6px 0 14px;
  text-shadow: 2px 2px 0 var(--coral), 4px 4px 0 var(--coral), 0 0 0 transparent;
  letter-spacing: .01em;
}
/* Titre + vignette du plat (pages recettes) */
.title-row { display: flex; align-items: center; gap: 16px; }
.title-text { flex: 1; min-width: 0; }
.dish {
  flex: none; width: 104px; height: 104px; object-fit: cover;
  background: var(--white); padding: 4px;
  border-radius: 24px; border: 4px solid var(--white);
  box-shadow: 0 6px 0 rgba(30,45,90,.08);
  transform: rotate(4deg);
}
.tagline {
  font-weight: 500;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 13px;
  line-height: 1.7;
  margin: 0 0 22px;
}
p { margin: 0 0 14px; }
p strong { color: var(--coral); font-weight: 700; }

/* Chiffres clés façon calendrier */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 26px 0 10px; }
.fact { display: flex; flex-direction: column-reverse; align-items: center; text-align: center; padding: 8px 4px; }
.fact strong {
  font-family: var(--script); font-weight: 400;
  color: var(--yellow); font-size: 1.9rem; line-height: 1.05;
  text-shadow: 2px 2px 0 var(--coral);
}
.fact span {
  margin-top: 6px; color: var(--coral); font-weight: 700;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
}

/* Sections */
h2 {
  color: var(--coral);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  margin: 40px 0 14px;
  display: flex; align-items: center; gap: 12px;
}
h2::before, h2::after { content: ""; flex: 1; height: 2px; background: var(--yellow); }
h3 {
  color: var(--navy); font-weight: 700; font-size: 12px;
  letter-spacing: .22em; text-transform: uppercase; margin: 18px 0 6px;
}
.ingredients {
  background: var(--white); border-radius: var(--radius);
  padding: 18px 22px; box-shadow: 0 6px 0 rgba(30,45,90,.06);
}
.ingredients h3:first-child { margin-top: 0; }
.ingredients ul { margin: 4px 0 0; padding-left: 0; list-style: none; }
.ingredients li { padding: 5px 0 5px 22px; position: relative; border-bottom: 1px dashed var(--line); font-size: 15px; }
.ingredients li:last-child { border-bottom: 0; }
.ingredients li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: 1px 1px 0 var(--coral); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 62px; margin-bottom: 24px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -6px;
  font-family: var(--script); font-size: 2.3rem; line-height: 1;
  color: var(--yellow); text-shadow: 2px 2px 0 var(--coral);
}
.steps li strong { display: block; color: var(--navy); font-weight: 700; margin-bottom: 4px; font-size: 1rem; letter-spacing: .02em; }

.tip {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 18px 0;
  border-left: 6px solid var(--yellow);
  box-shadow: 0 6px 0 rgba(30,45,90,.06);
  font-size: 15px;
}
.tip strong { display: block; color: var(--coral); font-weight: 700; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 6px; }

.footer-nav {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 48px; padding-top: 18px; border-top: 2px solid var(--yellow);
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.footer-nav a { color: var(--coral); text-decoration: none; }

/* Pied de page marque */
.brand { text-align: center; margin-top: 44px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.brand-small { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; font-weight: 500; color: var(--navy); }
.brand-link { display: block; line-height: 0; }
.brand-link img { width: 170px; height: auto; transition: transform .2s ease; }
.brand-link:hover img { transform: scale(1.04); }
.brand-url { font-size: 13px; letter-spacing: .06em; color: var(--navy); text-decoration: none; }
.brand-url:hover { color: var(--coral); }

/* Page distributeurs */
.cover { position: relative; margin: 6px 0 30px; padding: 0 0 22px; }
.cover img { display: block; width: 100%; height: auto; position: relative; z-index: 1; }
.cover::after {
  content: ""; position: absolute; left: 4%; right: 4%; bottom: 0; height: 22px; z-index: 0;
  background: radial-gradient(ellipse at 50% 0, rgba(30,45,90,.38) 0%, rgba(30,45,90,.14) 45%, rgba(30,45,90,0) 72%);
}
.offer {
  background: var(--coral); color: var(--white); border-radius: var(--radius);
  padding: 18px 22px; margin: 18px 0; box-shadow: 0 6px 0 rgba(30,45,90,.08);
}
.offer strong { display: block; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 6px; }
.offer .price { font-family: var(--script); font-size: 2.6rem; line-height: 1; margin: 4px 0 8px; text-shadow: 2px 2px 0 var(--navy); }
.offer p { margin: 0; font-size: 15px; }
.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kv { list-style: none; padding: 0; margin: 0; }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.kv li:last-child { border-bottom: 0; }
.kv span { color: var(--coral); font-weight: 700; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; padding-top: 3px; white-space: nowrap; }
.kv strong { text-align: right; color: var(--navy); }
.cta { display: inline-block; background: var(--navy); color: var(--white); text-decoration: none; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; padding: 12px 22px; border-radius: 40px; box-shadow: 0 4px 0 rgba(30,45,90,.2); }
.cta:hover { background: var(--coral); }

/* Calendrier feuilleté au défilement (landing) */
.flip-track { position: relative; height: calc(var(--flips, 4) * 60vh + 100vh); margin: 0 0 10px; }
.flip-stage { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; justify-content: center; gap: 40px; }
.flip-left { display: flex; flex-direction: column; align-items: center; }
/* Arguments qui apparaissent en fondu au fil du feuilletage (classe .on posée par le script) */
.side { position: relative; width: min(360px, 36vw); height: 320px; }
.side .intro, .side .usps { position: absolute; inset: 0; }
.side .intro { transition: opacity .6s ease, transform .6s ease; }
.side .intro.off { opacity: 0; transform: translateY(-16px); pointer-events: none; }
.side .intro h1 { font-size: clamp(2rem, 3.6vw, 2.9rem); margin: 6px 0 12px; }
.side .intro .tagline { font-size: 12px; margin-bottom: 16px; }
.side .intro .hero-cta { text-align: left; margin: 0; }
.usps { list-style: none; margin: 0; padding: 0; }
.usps li { position: absolute; inset: 0; opacity: 0; transform: translateX(28px); transition: opacity .7s ease, transform .7s ease; pointer-events: none; }
.usps li.on { opacity: 1; transform: none; pointer-events: auto; }
.usps strong { display: block; font-family: var(--script); font-weight: 400; color: var(--yellow); font-size: 2.8rem; line-height: 1; text-shadow: 2px 2px 0 var(--coral), 4px 4px 0 var(--coral); }
.usps b { display: block; margin-top: 8px; color: var(--coral); font-weight: 700; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.usps small { display: block; margin-top: 6px; color: var(--navy); font-size: 14px; line-height: 1.5; }
@media (max-width: 800px) {
  .flip-stage { flex-direction: column; gap: 8px; }
  .flip-book { --w: min(460px, 86vw, 33vh); }
  .side { width: calc(100% - 32px); max-width: 440px; height: 150px; text-align: center; }
  .side .intro h1 { font-size: 1.7rem; margin: 2px 0 6px; }
  .side .intro .tagline { display: none; }
  .side .intro .hero-cta { text-align: center; }
  .flip-hint { display: none; }
  .usps li { transform: translateY(10px); }
  .usps strong { font-size: 2rem; text-shadow: 2px 2px 0 var(--coral); }
  .usps b { margin-top: 4px; font-size: 10px; }
  .usps small { font-size: 12px; margin-top: 3px; }
}
.flip-book {
  --w: min(460px, 86vw, 41vh);
  position: relative; width: var(--w); height: calc(var(--w) * 2 + 24px);
  perspective: 1000px; perspective-origin: 50% 50%;
}
.flip-backing {
  position: absolute; left: 0; right: 0; top: calc(50% + 12px); height: var(--w);
  background: var(--cream); border-radius: 0 0 12px 12px; box-shadow: 0 12px 28px rgba(30,45,90,.18);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; z-index: 0;
}
/* page blanche de teasing (dessous) et page « À suivre » (dessus, dos de la dernière feuille) */
.flip-teaser { background: var(--white); padding: 8% 10%; text-align: center; }
.teaser-title { margin: 0; font-family: var(--script); color: var(--yellow); font-size: clamp(1.6rem, 6vw, 2.4rem); line-height: 1.05; text-shadow: 2px 2px 0 var(--coral), 4px 4px 0 var(--coral); }
.teaser-text { margin: 10px 0 18px; color: var(--navy); font-size: 14px; line-height: 1.5; }
.face-blank { display: flex; align-items: center; justify-content: center; }
.face-blank span { font-family: var(--script); color: var(--navy-soft); font-size: clamp(1.6rem, 6vw, 2.4rem); opacity: .6; }
/* Une feuille : page plate à deux faces, qui pivote autour de la spirale (bord supérieur) */
.leaf {
  position: absolute; left: 0; top: calc(50% + 12px); width: var(--w); height: var(--w);
  transform-origin: 50% 0; transform-style: preserve-3d; will-change: transform;
}
.face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background-color: var(--white); background-image: var(--img); background-size: 100% 100%; background-repeat: no-repeat;
}
.face.back { transform: rotateX(180deg); }
/* --sh (0 ou 1, posé par le script) : seule la feuille visible de chaque côté et celle en mouvement portent une ombre */
.face.front { border-radius: 0 0 12px 12px; box-shadow: 0 10px 18px rgba(30,45,90, calc(.22 * var(--sh, 0))); }
.face.back { border-radius: 12px 12px 0 0; box-shadow: 0 -6px 16px rgba(30,45,90, calc(.14 * var(--sh, 0))); }
/* ombrage de la feuille en mouvement (--shade) et ombre reçue de la feuille voisine (--cast, --cast-top) */
.face::before, .face::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; }
.face::after { background: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,.05)); opacity: var(--shade, 0); }
.face.front::before { background: linear-gradient(180deg, rgba(20,30,60,.75), rgba(20,30,60,0) 85%); opacity: var(--cast, 0); }
.face.back::before { background: linear-gradient(0deg, rgba(20,30,60,.7), rgba(20,30,60,0) 80%); opacity: var(--cast-top, 0); }
.flip-hint { margin: 14px 0 0; color: var(--navy); font-weight: 700; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; transition: opacity .4s ease; }
@media (prefers-reduced-motion: reduce) { .flip-track { height: auto; } .flip-stage { position: static; height: auto; padding: 10px 0 30px; } .flip-hint { display: none; } .side { height: auto; } .side .intro, .side .usps { position: static; } .usps li { position: static; opacity: 1; transform: none; margin-bottom: 14px; } }

/* Landing acheter */
.buy {
  background: var(--white); border-radius: var(--radius); padding: 24px 22px; margin: 26px 0;
  box-shadow: 0 8px 0 rgba(30,45,90,.08); text-align: center;
}
.buy .price { font-family: var(--script); color: var(--yellow); font-size: 3.4rem; line-height: 1; text-shadow: 2px 2px 0 var(--coral), 4px 4px 0 var(--coral); margin: 4px 0 6px; }
.buy .sub { color: var(--navy-soft); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 16px; }
.buy p { margin: 12px 0 0; font-size: 14px; color: var(--navy-soft); }
.hero-cta { text-align: center; margin: 0 0 26px; }

/* Landing acheter */
.numbers { list-style: none; padding: 0; margin: 20px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.numbers li { background: var(--white); border-radius: var(--radius); padding: 18px 16px 16px; box-shadow: 0 6px 0 rgba(30,45,90,.06); text-align: center; }
.numbers strong { display: block; font-family: var(--script); font-weight: 400; color: var(--yellow); font-size: 3rem; line-height: 1; text-shadow: 2px 2px 0 var(--coral), 4px 4px 0 var(--coral); }
.numbers b { display: block; margin-top: 10px; color: var(--coral); font-weight: 700; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; line-height: 1.5; }
.numbers small { display: block; margin-top: 6px; color: var(--navy-soft); font-size: 13px; line-height: 1.5; }
.buy {
  background: var(--white); border-radius: var(--radius); padding: 24px 22px; margin: 26px 0;
  box-shadow: 0 8px 0 rgba(30,45,90,.08); text-align: center;
}
.buy .price { font-family: var(--script); color: var(--yellow); font-size: 3.4rem; line-height: 1; text-shadow: 2px 2px 0 var(--coral), 4px 4px 0 var(--coral); margin: 4px 0 6px; }
.buy .sub { color: var(--navy-soft); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 16px; }
.buy p { margin: 12px 0 0; font-size: 14px; color: var(--navy-soft); }
.hero-cta { text-align: center; margin: 0 0 26px; }

/* Les douze illustrations + aperçu */
.illus { list-style: none; padding: 0; margin: 18px 0 26px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.illu { display: block; position: relative; border-radius: 14px; overflow: hidden; background: var(--white); box-shadow: 0 5px 0 rgba(30,45,90,.08); text-decoration: none; transition: transform .15s ease; }
.illu:hover, .illu:focus-visible { transform: translateY(-2px) rotate(-1deg); outline: none; }
.illu img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.illu span { position: absolute; left: 8px; bottom: 8px; background: var(--white); color: var(--coral); font-weight: 700; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; padding: 4px 9px; border-radius: 20px; }
.viewer { border: 0; padding: 0; background: transparent; max-width: min(92vw, 820px); width: 100%; }
.viewer::backdrop { background: rgba(30,45,90,.85); }
.viewer img { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; border-radius: var(--radius); background: var(--white); }
.viewer figcaption { text-align: center; color: var(--white); font-family: var(--script); font-size: 1.6rem; margin-top: 10px; }
.viewer button { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--white); color: var(--navy); font-size: 28px; line-height: 1; cursor: pointer; box-shadow: 0 3px 0 rgba(30,45,90,.2); }
.viewer-prev { left: -8px; }
.viewer-next { right: -8px; }
.viewer-close { top: 0; right: -8px; transform: none; font-size: 24px; }

/* Index : chaque carte est un seul lien */
.calendar { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 14px; }
.calendar li { margin: 0; }
.card {
  display: grid; grid-template-columns: 84px 110px 1fr; gap: 14px; align-items: center;
  background: var(--white); border-radius: var(--radius); padding: 16px 20px;
  box-shadow: 0 6px 0 rgba(30,45,90,.06);
  color: inherit; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover, .card:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 0 rgba(30,45,90,.1); outline: none; }
.card:active { transform: translateY(1px); box-shadow: 0 4px 0 rgba(30,45,90,.08); }
.card .thumb { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; display: block; }
.card > strong { color: var(--coral); font-weight: 700; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; }
.card-text { display: block; }
.card-title { display: block; font-family: var(--script); color: var(--navy); font-size: 1.5rem; line-height: 1.1; }
.card:hover .card-title { color: var(--coral); }
.card small { display: block; color: var(--navy-soft); font-size: 13px; margin-top: 4px; }

@media (max-width: 600px) {
  .hero { padding-top: 18px; }
  .cloud-left { width: 150px; bottom: 10px; animation-duration: 18s; animation-delay: -6s; }
  .cloud-right { width: 160px; top: -4px; animation-duration: 26s; animation-delay: -19s; }
  .bubble { font-size: 19px; max-width: 230px; }
  .dish { width: 88px; height: 88px; border-radius: 20px; }
  .steps li { padding-left: 52px; }
  .steps li::before { font-size: 2rem; }
  .cover { padding-bottom: 16px; }
  .cover::after { height: 16px; }
  .prices { grid-template-columns: 1fr; }
  .card { grid-template-columns: 72px 1fr; gap: 4px 14px; }
  .card .thumb { width: 72px; height: 72px; grid-row: 1 / span 2; }
}
