/* Calendrier de l'Avent : l'identité du Board (crème, or, scintillement) */
:root {
  --creme: #fbf3ea;
  --sable: #f3e3cf;
  --or: #c9973f;
  --or-clair: #e2c48a;
  --bronze: #7e5a22;
  --texte: #5d4220;
  --ombre: 0 10px 30px rgba(126, 90, 34, .18);
  --rayon: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Archivo Narrow', 'Arial Narrow', sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--texte);
  background: var(--sable) url(images/fond.webp) center / cover fixed;
  min-height: 100vh;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background: linear-gradient(180deg, rgba(251, 243, 234, .55), rgba(251, 243, 234, .85));
  pointer-events: none;
  z-index: -1;
}

/* petites étincelles qui montent doucement */
.scintille {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(2px 2px at 12% 30%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 78% 18%, #fff 50%, transparent 51%),
    radial-gradient(2.5px 2.5px at 40% 75%, #fff8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90% 62%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 60% 45%, #fffa 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 25% 88%, #fff 50%, transparent 51%);
  background-size: 100% 100%;
  animation: monte 14s linear infinite;
  opacity: .8;
}
@keyframes monte { from { transform: translateY(0); } to { transform: translateY(-40px); opacity: .4; } }

.entete, main, .pied { position: relative; z-index: 1; }

/* ---------- En-tête ---------- */
.entete {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 24px;
  display: grid;
  grid-template-columns: minmax(180px, 300px) 1fr;
  gap: 48px;
  align-items: center;
}
.couverture {
  width: 100%; height: auto;
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  transform: rotate(-2deg);
}
.surtitre {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--or);
  margin: 0 0 12px;
}
h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--or);
  margin: 0 0 20px;
}
.chapo { font-size: 20px; max-width: 34em; margin: 0 0 20px; }
.statut {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  color: var(--bronze);
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--or-clair);
  border-radius: 999px;
  padding: 10px 20px;
  margin: 0;
}
.statut:empty { display: none; }

/* ---------- Cases ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 8px 24px 40px; }
.titre-section {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: 22px;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-align: center;
  color: var(--or);
  margin: 40px 0 24px;
}
.titre-section::after {
  content: '✦';
  display: block;
  font-size: 14px;
  margin-top: 6px;
}
.grille {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.grille-bonus { grid-template-columns: repeat(3, minmax(0, 180px)); justify-content: center; }
/* la tuile « Les 24 cartes » : la couverture, avec son titre posé dessus */
.case-tout .tout-titre {
  position: absolute; left: 0; right: 0; top: 64%;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bronze);
}
.bonus-texte { text-align: center; margin: -12px 0 24px; }

.case {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 827 / 1417;
  padding: 0;
  border: 0;
  border-radius: var(--rayon);
  background: var(--creme);
  box-shadow: var(--ombre);
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
  font: inherit;
  color: inherit;
}
.case img { width: 100%; height: 100%; object-fit: cover; display: block; }
.case:hover { transform: translateY(-4px); }
.case:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }

.etiquette {
  position: absolute;
  left: 50%; bottom: 8%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--bronze);
  background: rgba(255, 255, 255, .85);
  border-radius: 999px;
  padding: 4px 12px;
}

/* fermée : pas encore son jour */
.case.fermee img { filter: saturate(.6) brightness(.97); opacity: .78; }
.case.fermee:hover { transform: none; }

/* son jour est arrivé, pas encore ouverte */
.case.a-ouvrir .etiquette { background: var(--or); color: #fff; }
.case.du-jour { animation: brille 2.4s ease-in-out infinite; }
@keyframes brille {
  0%, 100% { box-shadow: var(--ombre), 0 0 0 0 rgba(201, 151, 63, .0); }
  50% { box-shadow: var(--ombre), 0 0 0 8px rgba(201, 151, 63, .35); }
}

/* déjà ouverte : on voit la fiche */
.case.ouverte .etiquette { display: none; }

.case.secoue { animation: secoue .45s ease; }
@keyframes secoue {
  20%, 60% { transform: translateX(-5px) rotate(-1deg); }
  40%, 80% { transform: translateX(5px) rotate(1deg); }
}

/* ---------- Fenêtre d'ouverture ---------- */
.fenetre {
  /* la largeur suit la hauteur de l'écran, pour que la carte entière tienne */
  width: min(460px, calc(100vw - 24px), calc((100dvh - 170px) * 827 / 1417 + 32px));
  max-height: calc(100dvh - 24px);
  padding: 16px;
  border: 0;
  border-radius: 24px;
  background: var(--creme);
  color: var(--texte);
  box-shadow: 0 30px 80px rgba(60, 40, 10, .35);
  display: none;
  flex-direction: column;
  gap: 12px;
}
.fenetre[open] { display: flex; }
.fenetre::backdrop { background: rgba(70, 48, 18, .55); backdrop-filter: blur(3px); }
.fenetre-haut { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fenetre-titre {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--or);
  margin: 0 0 0 6px;
}
.fermer, .nav {
  width: 40px; height: 40px;
  border: 1px solid var(--or-clair);
  border-radius: 50%;
  background: #fff;
  color: var(--bronze);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex: none;
}
.nav { font-size: 26px; padding-bottom: 3px; }
.nav:disabled { opacity: .3; cursor: default; }

.scene {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  gap: 12px;
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  perspective: 1400px;
  border-radius: var(--rayon);
  scrollbar-width: none;
}
.scene::-webkit-scrollbar { display: none; }
.feuillet {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: center;
  aspect-ratio: 827 / 1417;
}
.feuillet img.fiche {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: var(--rayon);
  display: block;
}
.feuillet .chargement {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--or);
  font-family: 'Poppins', sans-serif;
  letter-spacing: .1em;
}
/* la porte qui s'ouvre par-dessus la fiche */
.battant {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--rayon);
  transform-origin: left center;
  backface-visibility: hidden;
  box-shadow: 8px 0 24px rgba(70, 48, 18, .25);
  z-index: 2;
}
.battant.s-ouvre { animation: ouvre 1.3s cubic-bezier(.6, .05, .3, 1) forwards; }
@keyframes ouvre {
  0% { transform: rotateY(0); }
  15% { transform: rotateY(-8deg); }
  100% { transform: rotateY(-115deg); opacity: 0; }
}

.fenetre-bas { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bouton {
  flex: 1;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  letter-spacing: .06em;
  color: #fff;
  background: var(--or);
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
}
.bouton:hover { background: var(--bronze); }

/* message « pas encore » */
.bulle {
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translate(-50%, 20px);
  margin: 0;
  max-width: calc(100vw - 32px);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #fff;
  background: var(--bronze);
  border-radius: 999px;
  padding: 12px 22px;
  box-shadow: var(--ombre);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 10;
  text-align: center;
}
.bulle.visible { opacity: 1; transform: translate(-50%, 0); }

.pied { text-align: center; font-size: 14px; color: var(--bronze); padding: 8px 24px 40px; }

/* ---------- Téléphone et tablette ---------- */
@media (max-width: 900px) {
  .grille { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .entete { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; text-align: center; }
  .couverture { max-width: 190px; margin: 0 auto; }
  .chapo { margin-left: auto; margin-right: auto; font-size: 18px; }
  main { padding: 0 14px 32px; }
  .grille { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .grille-bonus { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .case-tout .tout-titre { font-size: 9px; letter-spacing: .08em; }
  .etiquette { font-size: 10px; padding: 3px 8px; }
}

/* ---------- Le flacon qui apparaît (motion design) ---------- */
.apparition {
  position: absolute; inset: 0;
  z-index: 1;
  border-radius: var(--rayon);
  overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 45%, #fffaf0 0%, #f7e6ce 55%, #e2c48a 100%);
  cursor: pointer;
  animation: voile-entre .5s ease both;
  animation-delay: calc(var(--delai) - 400ms);
}
.apparition.fin { animation: voile-sort .7s ease forwards; }
@keyframes voile-entre { from { opacity: 0; } to { opacity: 1; } }
@keyframes voile-sort { to { opacity: 0; transform: scale(1.04); } }

/* rayons dorés qui tournent lentement derrière le flacon */
.rayons {
  position: absolute;
  width: 170%; aspect-ratio: 1;
  left: 50%; top: 42%;
  background: repeating-conic-gradient(from 0deg, rgba(201, 151, 63, .22) 0deg 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 0%, transparent 62%);
          mask: radial-gradient(circle, #000 0%, transparent 62%);
  transform: translate(-50%, -50%) scale(0) rotate(0deg);
  animation: rayons 6s linear both;
  animation-delay: var(--delai);
}
@keyframes rayons {
  0% { transform: translate(-50%, -50%) scale(0) rotate(0deg); opacity: 0; }
  12% { transform: translate(-50%, -50%) scale(1) rotate(10deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.1) rotate(90deg); opacity: 1; }
}
.halo {
  position: absolute;
  width: 70%; aspect-ratio: 1;
  left: 50%; top: 42%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(255, 236, 196, .9) 30%, rgba(226, 196, 138, 0) 70%);
  transform: translate(-50%, -50%) scale(0);
  animation: halo 1.1s cubic-bezier(.2, .8, .2, 1) both, pulse 2.4s ease-in-out infinite;
  animation-delay: var(--delai), calc(var(--delai) + 1.1s);
}
@keyframes halo { to { transform: translate(-50%, -50%) scale(1); } }
@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.08); }
}

/* le flacon monte, se pose et flotte */
.flacon {
  position: relative;
  height: 46%;
  max-width: 60%;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(90, 60, 20, .35));
  opacity: 0;
  animation: flacon-monte 1.2s cubic-bezier(.2, 1.3, .4, 1) both, flotte 3s ease-in-out infinite;
  animation-delay: calc(var(--delai) + 150ms), calc(var(--delai) + 1.35s);
}
@keyframes flacon-monte {
  0% { opacity: 0; transform: translateY(45%) scale(.55) rotate(-8deg); filter: drop-shadow(0 0 0 rgba(90, 60, 20, 0)) brightness(1.6); }
  60% { opacity: 1; filter: drop-shadow(0 18px 22px rgba(90, 60, 20, .35)) brightness(1.1); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); filter: drop-shadow(0 18px 22px rgba(90, 60, 20, .35)) brightness(1); }
}
@keyframes flotte {
  0%, 100% { opacity: 1; transform: translateY(0) rotate(0); }
  50% { opacity: 1; transform: translateY(-4%) rotate(1.5deg); }
}
/* un reflet de lumière qui passe sur le flacon */
.apparition::after {
  content: '';
  position: absolute;
  top: 18%; left: -60%;
  width: 40%; height: 50%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent);
  transform: skewX(-18deg);
  animation: reflet 1.1s ease both;
  animation-delay: calc(var(--delai) + 1.3s);
  pointer-events: none;
}
@keyframes reflet { from { left: -60%; } to { left: 130%; } }

.nom-huile {
  position: relative;
  margin: 6% 0 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: clamp(22px, 7vw, 32px);
  letter-spacing: .3em;
  text-transform: uppercase;
  text-align: center;
  color: var(--or);
  padding: 0 12px 0 calc(12px + .3em);
  opacity: 0;
  animation: nom 1s ease both;
  animation-delay: calc(var(--delai) + 1.1s);
}
@keyframes nom {
  from { opacity: 0; letter-spacing: .8em; filter: blur(6px); }
  to { opacity: 1; letter-spacing: .3em; filter: blur(0); }
}
.passer {
  position: absolute; bottom: 4%;
  margin: 0;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--bronze);
  opacity: 0;
  animation: voile-entre .6s ease both;
  animation-delay: calc(var(--delai) + 1.8s);
}
/* paillettes qui montent */
.etincelles i {
  position: absolute;
  left: var(--x); top: var(--y);
  width: 8px; height: 8px;
  background: radial-gradient(circle, #fff 0%, #ffe6a8 40%, transparent 70%);
  border-radius: 50%;
  transform: scale(var(--s));
  opacity: 0;
  animation: paillette 2.2s ease-out infinite;
  animation-delay: calc(var(--delai) + var(--t));
}
.etincelles i:nth-child(3n)::before {
  content: '✦';
  position: absolute; left: -3px; top: -9px;
  font-size: 14px; color: var(--or-clair);
}
@keyframes paillette {
  0% { opacity: 0; transform: translateY(20px) scale(var(--s)); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-70px) scale(calc(var(--s) * .4)); }
}

/* ---------- Kits : en savoir plus ---------- */
.en-savoir-plus {
  position: absolute;
  /* posé dans la bordure dorée du bas, sous le cadre blanc : il ne cache aucun texte */
  left: 50%; bottom: 1.6%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  color: #fff;
  background: var(--or);
  border: 0;
  border-radius: 999px;
  padding: 7px 16px;
  box-shadow: 0 6px 18px rgba(126, 90, 34, .3);
  cursor: pointer;
}
.en-savoir-plus:hover { background: var(--bronze); }

.infos {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 4px 4px;
}
.retour {
  font: inherit; font-size: 15px;
  color: var(--bronze);
  background: none; border: 0; padding: 4px 0 12px;
  cursor: pointer;
}
.kit-tete { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.kit-photo {
  width: 100%; height: 170px;
  object-fit: contain;
  background: #fff;
  border-radius: 16px;
  padding: 8px;
  flex: none;
  box-shadow: var(--ombre);
}
.kit-nom {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.25;
  color: var(--or);
  margin: 0 0 4px;
}
.kit-sous-titre { margin: 0; font-size: 15px; color: var(--bronze); }
.kit-texte { margin: 14px 0 0; }
.kit-intertitre {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--or);
  margin: 20px 0 8px;
}
.kit-contenu { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.kit-contenu li {
  font-size: 15px;
  background: #fff;
  border: 1px solid var(--or-clair);
  border-radius: 999px;
  padding: 3px 12px;
}
.kit-offerts {
  list-style: none;
  margin: 0; padding: 14px 16px;
  background: linear-gradient(135deg, #fff8ea, #fbecd2);
  border: 1px solid var(--or-clair);
  border-radius: 14px;
  display: grid; gap: 6px;
}
.kit-offerts li { font-size: 16px; padding-left: 26px; position: relative; color: var(--bronze); }
.kit-offerts li::before { content: '✦'; position: absolute; left: 4px; color: var(--or); }
.onglets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.onglet {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  color: var(--bronze);
  background: #fff;
  border: 1px solid var(--or-clair);
  border-radius: 999px;
  padding: 8px 4px;
  cursor: pointer;
}
.onglet[aria-checked="true"] { background: var(--or); border-color: var(--or); color: #fff; }
.prix-ligne {
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
label.prix-ligne { cursor: pointer; }
.prix-ligne input { accent-color: var(--or); width: 18px; height: 18px; flex: none; }
.prix-texte { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.prix-libelle { flex-basis: 100%; font-size: 15px; }
.prix-montant { font-family: 'Poppins', sans-serif; font-weight: 500; font-size: 22px; color: var(--bronze); }
.prix-pv { font-size: 15px; color: var(--or); }
.prix-note, .prix-inconnu, .kit-aide { font-size: 15px; margin: 6px 0 0; }
.message {
  width: 100%;
  font: inherit; font-size: 16px;
  color: var(--texte);
  background: #fff;
  border: 1px solid var(--or-clair);
  border-radius: 14px;
  padding: 12px;
  margin-top: 8px;
  resize: vertical;
}
.kit-actions { display: grid; gap: 8px; margin-top: 10px; }
.bouton-whatsapp { display: block; text-align: center; text-decoration: none; background: #25a35a; }
.bouton-whatsapp:hover { background: #1c8247; }
.bouton-clair { background: #fff; color: var(--bronze); border: 1px solid var(--or-clair); }
.bouton-clair:hover { background: var(--sable); color: var(--bronze); }

/* ---------- Tout télécharger ---------- */
.tout { text-align: center; }
.tout p { margin: -8px 0 18px; }
.bouton-large { flex: none; font-size: 16px; padding: 16px 32px; }
.bouton:disabled { opacity: .7; cursor: wait; }

/* ---------- Lien des conseillères ---------- */
.conseilleres {
  max-width: 520px;
  margin: 0 auto 24px;
  text-align: left;
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--or-clair);
  border-radius: var(--rayon);
  padding: 14px 18px;
}
.conseilleres summary { cursor: pointer; font-family: 'Poppins', sans-serif; font-size: 14px; color: var(--bronze); }
.lien-form { display: grid; gap: 10px; }
.lien-form label { display: grid; gap: 4px; font-size: 15px; }
.lien-form input, .lien-url {
  font: inherit; font-size: 16px;
  color: var(--texte);
  background: #fff;
  border: 1px solid var(--or-clair);
  border-radius: 12px;
  padding: 10px 12px;
  width: 100%;
}
.lien-sortie { display: grid; gap: 10px; margin-top: 14px; }
.lien-sortie p { margin: 0; }
.erreur { color: #a13d2d; }

@media (prefers-reduced-motion: reduce) {
  .scintille, .case.du-jour, .rayons, .halo, .flacon, .etincelles i { animation-duration: .01s; animation-iteration-count: 1; }
  .battant.s-ouvre { animation-duration: .01s; }
}
