:root {
  --rose: #ff3d9a;
  --rose-fonce: #d81b7a;
  --rose-pale: #ffe3f1;
  --anis: #7ed321;
  --anis-fonce: #4f9a0c;
  --lilas: #b45cf0;
  --lilas-fonce: #8330c4;
  --orange: #ff8a1f;
  --orange-fonce: #d9620a;
  --turquoise: #2fd3d6;
  --turquoise-fonce: #139a9d;
  --texte: #3b1846;
  --texte-doux: #6e4a78;
  --blanc: #ffffff;
  --fond: #fff4fa;
  --ombre: 0 10px 24px rgba(146, 30, 110, .18);
  --rayon: 28px;
  --titre: "Fredoka", "Baloo 2", system-ui, sans-serif;
  --corps: "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--corps);
  font-size: 17px;
  line-height: 1.55;
  color: var(--texte);
  background: var(--fond);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.enveloppe { width: min(1160px, 100% - 32px); margin-inline: auto; }
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* En-tête */
.entete {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 14px rgba(146, 30, 110, .10);
}
.entete .enveloppe { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { width: 52px; height: 52px; }
.logo span {
  font-family: var(--titre); font-weight: 700; font-size: 26px; line-height: .95;
  color: var(--rose);
  text-shadow: 0 2px 0 var(--rose-fonce), 0 4px 8px rgba(216, 27, 122, .25);
}
.nav { display: flex; gap: 10px; }
.nav a, .panier-lien, a.pastille { text-decoration: none; }
/* Boutons : gélules en plastique rendues dans Blender (outils/boutons.py), images/boutons/*.webp.
   L'image fait 187 x 152 px pour un corps de 112 px de haut : bouts de 93 px, une colonne étirée au milieu, ombre dans les marges
   (8 px en haut, 22 px sur les côtés, 32 px en bas). Tout se règle sur --h, la hauteur du bouton. */
.pastille {
  --h: 48px;
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); min-height: 44px; padding: 0 22px calc(var(--h) * .095);
  white-space: nowrap;
  border: 0 solid transparent; border-radius: 999px; background: none;
  border-image: var(--img) 0 93 fill / 0 calc(var(--h) * .8304) / calc(var(--h) * .0714) calc(var(--h) * .1964) calc(var(--h) * .2857);
  font-family: var(--titre); font-weight: 600; font-size: 17px; color: var(--blanc);
  text-shadow: 0 1px 0 var(--halo), 0 -1px 0 var(--halo), 1px 0 0 var(--halo), -1px 0 0 var(--halo), 0 2px 3px var(--halo);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.pastille:active { --img: var(--img-e); padding-bottom: calc(var(--h) * .0125); }
/* Animation de tous les boutons : léger gonflement au survol, écrasement au clic, retour avec rebond */
.pastille { transition: transform .32s cubic-bezier(.34, 1.56, .64, 1); will-change: transform; backface-visibility: hidden; }
@media (hover: hover) { .pastille:hover { transform: scale(1.06); } }
.pastille:active { transform: scale(.94); transition-duration: .08s; }
.pastille:focus-visible { outline: 3px solid var(--texte); outline-offset: 4px; }
.c-rose { --c: var(--rose); --cf: var(--rose-fonce); --halo: #a80f5d; --img: url(../images/boutons/rose.webp); --img-e: url(../images/boutons/rose-enfonce.webp); }
.c-anis { --c: var(--anis); --cf: var(--anis-fonce); --img: url(../images/boutons/anis.webp); --img-e: url(../images/boutons/anis-enfonce.webp); }
.c-lilas { --c: var(--lilas); --cf: var(--lilas-fonce); --halo: #6a22ab; --img: url(../images/boutons/lilas.webp); --img-e: url(../images/boutons/lilas-enfonce.webp); }
.c-orange { --c: var(--orange); --cf: var(--orange-fonce); --img: url(../images/boutons/orange.webp); --img-e: url(../images/boutons/orange-enfonce.webp); }
.c-turquoise { --c: var(--turquoise); --cf: var(--turquoise-fonce); --img: url(../images/boutons/turquoise.webp); --img-e: url(../images/boutons/turquoise-enfonce.webp); }
.c-anis, .c-turquoise, .c-orange { color: var(--texte); text-shadow: 0 1px 0 rgba(255, 255, 255, .4); }
/* Images « enfoncées » chargées d'avance : le clic ne laisse aucun blanc */
body::after {
  content: ""; position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none;
  background-image: url(../images/boutons/rose-enfonce.webp), url(../images/boutons/anis-enfonce.webp), url(../images/boutons/lilas-enfonce.webp), url(../images/boutons/orange-enfonce.webp), url(../images/boutons/turquoise-enfonce.webp);
}
.nav .actif { outline: 3px solid var(--texte); outline-offset: 2px; }
.compteur {
  display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0 0 1px;
  border: 0 solid transparent; border-image: url(../images/boutons/rond-blanc.webp) 0 fill / 0 / 1.7px 4.6px 6.9px;
  color: #a80f5d; font-size: 14px; line-height: 1; text-shadow: none;
}

/* Titres gonflés */
.gonfle { font-family: var(--titre); font-weight: 700; line-height: 1.08; margin: 0; word-spacing: .12em; text-wrap: balance; }
.gonfle span { display: inline-block; color: var(--c); text-shadow:
  0 2px 0 var(--cf), 0 4px 0 var(--cf), 0 6px 0 var(--cf),
  0 10px 18px rgba(80, 10, 70, .28); -webkit-text-stroke: 3px #fff; paint-order: stroke fill; }

/* Bandeau d'accueil */
.bandeau { position: relative; overflow: hidden; background: #ffd6ec; }
.bandeau img.fond { width: 100%; height: clamp(420px, 56vw, 640px); object-fit: cover; object-position: center 70%; }
.bandeau .texte { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding-top: clamp(20px, 4vw, 48px); text-align: center; }
.bandeau h1 { font-size: clamp(40px, 7vw, 86px); }
.accroche {
  margin: 0 auto 36px; max-width: 640px; text-align: center;
  font-weight: 700; font-size: 20px; color: var(--texte);
}

/* Lots */
.sol {
  background: radial-gradient(120% 70% at 50% 0%, #ffd0e8 0%, #ffe6f3 45%, var(--fond) 100%);
  padding: 56px 0 72px;
}
.section-titre { font-size: clamp(32px, 4.5vw, 48px); text-align: center; margin-bottom: 8px; }
.section-sous { text-align: center; color: var(--texte-doux); margin: 0 auto 40px; max-width: 620px; }
.grille-lots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.lot {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 8px 16px 24px; border-radius: var(--rayon);
  background: rgba(255, 255, 255, .7);
  box-shadow: var(--ombre);
}
.lot img { width: 100%; max-width: 300px; aspect-ratio: 1; object-fit: contain; }
.lot h3 { font-family: var(--titre); font-weight: 700; font-size: 28px; margin: 0 0 14px; }
.boutons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Thèmes (accueil) */
.grille-themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grille-themes.autres { grid-template-columns: repeat(3, 1fr); }
.theme-carte {
  position: relative; display: block; text-decoration: none; border-radius: var(--rayon); overflow: hidden;
  box-shadow: var(--ombre); background: var(--blanc);
  transition: transform .15s ease;
}
.theme-carte:hover { transform: translateY(-4px); }
.theme-carte .fleche { transition: transform .32s cubic-bezier(.34, 1.56, .64, 1); }
.theme-carte:hover .fleche { transform: translateX(4px) scale(1.12); }
.theme-carte:active .fleche { transform: scale(.9); transition-duration: .08s; }
.theme-carte img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 75%; }
.theme-carte .nom {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 18px; font-family: var(--titre); font-weight: 700; font-size: 22px;
}
.theme-carte .fleche {
  flex: none; width: 36px; height: 36px; padding-bottom: 5px; display: grid; place-items: center;
  border: 0 solid transparent; border-image: url(../images/boutons/rond-rose.webp) 0 fill / 0 / 2.6px 6.9px 10.3px;
  color: var(--blanc); font-size: 22px; line-height: 1;
  text-shadow: 0 1px 0 #a80f5d, 0 -1px 0 #a80f5d, 1px 0 0 #a80f5d, -1px 0 0 #a80f5d;
}

/* Comment ça marche */
.formules { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.formule {
  display: grid; grid-template-columns: 140px 1fr; gap: 20px; align-items: center;
  padding: 24px; border-radius: var(--rayon); background: var(--blanc); box-shadow: var(--ombre);
}
.formule img { width: 140px; height: 140px; object-fit: contain; }
.formule h3 { font-family: var(--titre); font-size: 26px; margin: 0 0 6px; }
.formule p { margin: 0; color: var(--texte-doux); }
.formule .etiquette { margin-bottom: 10px; pointer-events: none; }

/* Fiche lot */
.fiche { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 48px 0 72px; }
.fiche .visuel {
  border-radius: 40px; padding: 16px;
  background: radial-gradient(circle at 50% 40%, #fff 0%, #ffe3f1 60%, #ffd0e8 100%);
  box-shadow: var(--ombre);
}
.fiche .visuel img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.fil { font-size: 15px; color: var(--texte-doux); margin: 0 0 8px; }
.fil a { color: var(--rose-fonce); font-weight: 700; }
.fiche h1 { font-size: clamp(40px, 5vw, 60px); margin-bottom: 20px; }
.choix { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.choix button { width: 100%; filter: saturate(.45) brightness(1.02); }
.choix button[aria-pressed="true"] { filter: none; outline: 3px solid var(--texte); outline-offset: 3px; }
.explication {
  padding: 18px 22px; border-radius: 22px; background: var(--blanc); box-shadow: var(--ombre); margin-bottom: 20px;
}
.explication h2 { font-family: var(--titre); font-size: 22px; margin: 0 0 8px; }
.explication ul { margin: 0; padding-left: 22px; }
.explication p { margin: 0; }
.prix { font-family: var(--titre); font-weight: 700; font-size: 26px; margin: 0 0 16px; }
.prix small { display: block; font-family: var(--corps); font-weight: 600; font-size: 15px; color: var(--texte-doux); }
.ajouter { --h: 58px; width: 100%; font-size: 20px; }
.message-ajout { min-height: 24px; margin: 12px 0 0; font-weight: 700; color: var(--anis-fonce); }

/* Panier */
.panier { padding: 48px 0 72px; }
.panier h1 { font-size: clamp(40px, 5vw, 60px); text-align: center; margin-bottom: 32px; }
.ligne {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; align-items: center;
  padding: 12px 16px; border-radius: 22px; background: var(--blanc); box-shadow: var(--ombre); margin-bottom: 14px;
}
.ligne img { width: 96px; height: 96px; object-fit: contain; }
.ligne h2 { font-family: var(--titre); font-size: 22px; margin: 0; }
.ligne p { margin: 2px 0 0; color: var(--texte-doux); }
.retirer.pastille { --h: 44px; font-size: 15px; }
.vide, .paiement { text-align: center; color: var(--texte-doux); }
.paiement { margin-top: 24px; padding: 18px; border-radius: 22px; background: var(--rose-pale); font-weight: 700; color: var(--texte); }

/* Pied de page */
.pied { background: var(--texte); color: #fbe9f6; padding: 40px 0; }
.pied .enveloppe { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.pied h2 { font-family: var(--titre); font-size: 22px; margin: 0 0 8px; color: var(--blanc); }
.pied p { margin: 0; }
.pied a { color: #ffd0e8; }
.pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

@media (max-width: 980px) {
  .grille-themes, .grille-themes.autres { grid-template-columns: 1fr 1fr; }
  .grille-lots { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .formules, .fiche { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .entete .enveloppe { flex-wrap: wrap; justify-content: center; padding: 8px 0 12px; gap: 8px; }
  .logo img { width: 40px; height: 40px; }
  .logo span { font-size: 22px; }
  .nav { width: 100%; justify-content: center; gap: 6px; flex-wrap: wrap; }
  .nav .pastille { --h: 44px; padding-inline: 14px; font-size: 15px; }
  .bandeau img.fond { height: 440px; object-position: center 80%; }
  .bandeau h1 { font-size: 46px; padding: 0 12px; }
  .accroche { font-size: 17px; }
  .grille-themes, .grille-themes.autres { grid-template-columns: 1fr; }
  .formule { grid-template-columns: 96px 1fr; padding: 18px; gap: 14px; }
  .formule img { width: 96px; height: 96px; }
  .formule h3 { font-size: 22px; }
  .choix { grid-template-columns: 1fr; }
  .ligne { grid-template-columns: 72px 1fr; }
  .ligne img { width: 72px; height: 72px; }
  .ligne .retirer { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
