@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,800&family=Figtree:wght@400;500;600;700&display=swap");

/* Couleurs tirées du logo : vert sapin + jaune miel du « & » */
:root {
  --neige: #f6f8f7;      /* fond */
  --blanc: #ffffff;      /* cartes */
  --givre: #dfe7e2;      /* lignes, contours */
  --sapin: #1e4a39;      /* couleur principale */
  --sapin-clair: #2f6b4f;
  --miel: #f2b631;       /* boutons d'achat */
  --miel-fonce: #d99a14;
  --encre: #18201c;      /* texte */
  --brume: #5d6b64;      /* texte secondaire */
  --houx: #b23a3a;       /* erreurs uniquement */
  --rayon: 14px;

  /* anciens noms, encore utilisés par l'admin */
  --fond: var(--neige);
  --carte: var(--blanc);
  --texte: var(--encre);
  --doux: var(--brume);
  --ligne: var(--givre);
  --accent: var(--sapin-clair);
  --accent-fonce: var(--sapin);
  --vert: var(--sapin);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1rem/1.6 Figtree, system-ui, sans-serif;
  background: var(--neige);
  color: var(--encre);
}
h1, h2, h3 { font-family: "Bricolage Grotesque", Figtree, sans-serif; line-height: 1.1; margin: 0 0 .4em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; }
a { color: var(--sapin-clair); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--miel); outline-offset: 2px; border-radius: 6px; }
.conteneur { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.icone { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Bandeau + en-tête ---------- */
.bandeau { background: var(--sapin); color: #e9f2ed; text-align: center; font-size: .9rem; padding: 9px 16px; }
.bandeau:empty { display: none; }

header.haut {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 248, 247, .94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--givre);
}
header.haut .conteneur { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.logo { font: 800 1.2rem "Bricolage Grotesque", sans-serif; color: var(--encre); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.logo img { border-radius: 9px; }
.logo b { font-weight: inherit; }
.logo span { color: var(--miel-fonce); }
.menu { display: flex; gap: 22px; margin-left: auto; }
.menu a { color: var(--brume); text-decoration: none; font-weight: 500; }
.menu a:hover { color: var(--encre); }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--miel); color: var(--encre); border: 0; border-radius: 10px;
  padding: 13px 22px; font: 700 1rem Figtree, sans-serif; cursor: pointer; text-decoration: none;
  transition: background .15s;
}
.bouton:hover { background: var(--miel-fonce); }
.bouton.secondaire { background: var(--blanc); color: var(--encre); border: 1px solid var(--givre); }
.bouton.secondaire:hover { border-color: var(--brume); background: var(--blanc); }
.bouton.sombre { background: var(--sapin); color: #fff; }
.bouton.sombre:hover { background: #163a2c; }
.bouton:disabled { opacity: .6; cursor: wait; }
.bouton.petit { padding: 8px 14px; font-size: .9rem; }
.bouton-panier { padding: 10px 16px; }
.pastille {
  background: var(--sapin); color: #fff; border-radius: 999px;
  font-size: .75rem; min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Ouverture de page ---------- */
.ouverture { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; padding: 48px 0 40px; }
.ouverture h1 { font-size: clamp(2.3rem, 5.6vw, 4.1rem); font-weight: 800; letter-spacing: -.035em; max-width: 13ch; color: var(--sapin); }
.ouverture p { color: var(--brume); font-size: 1.13rem; max-width: 46ch; margin: 0 0 26px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.rebours {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 24px;
  padding: 10px 14px; border-radius: 10px; background: #fff6df; color: #6b4a00; font-size: .95rem;
}
.rebours[hidden] { display: none; }
.rebours strong { color: var(--encre); }

.mosaique { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; aspect-ratio: 1.1; }
.mosaique a { display: block; padding: 0; border: 0; border-radius: 18px; overflow: hidden; cursor: pointer; background: #e7eeea; position: relative; }
.mosaique a:first-child { grid-row: span 2; }
.mosaique img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.mosaique a:hover img { transform: scale(1.03); }
.mosaique span {
  position: absolute; left: 10px; bottom: 10px; background: rgba(255, 255, 255, .95); color: var(--encre);
  font-size: .82rem; font-weight: 600; padding: 5px 10px; border-radius: 8px; text-align: left;
}
@media (prefers-reduced-motion: no-preference) {
  .mosaique a { animation: arrivee .7s cubic-bezier(.2, .7, .2, 1) both; }
  .mosaique a:nth-child(2) { animation-delay: .12s; }
  .mosaique a:nth-child(3) { animation-delay: .24s; }
}
@keyframes arrivee { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Garanties ---------- */
.garanties {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--blanc); border: 1px solid var(--givre); border-radius: var(--rayon); margin-bottom: 56px;
}
.garanties div { display: flex; gap: 12px; align-items: flex-start; padding: 18px 20px; }
.garanties div + div { border-left: 1px solid var(--givre); }
.garanties .icone { color: var(--sapin-clair); margin-top: 2px; }
.garanties strong { display: block; font-size: .97rem; }
.garanties small { color: var(--brume); font-size: .86rem; line-height: 1.4; display: block; }

/* ---------- Sélection ---------- */
section.collection { padding: 0 0 56px; scroll-margin-top: 80px; }
.tete-collection { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.tete-collection p { color: var(--brume); margin: 0; }
.budgets { display: flex; gap: 8px; flex-wrap: wrap; }
.budgets button {
  font: 500 .92rem Figtree, sans-serif; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--givre); background: var(--blanc); color: var(--encre);
}
.budgets button[aria-pressed="true"] { background: var(--sapin); border-color: var(--sapin); color: #fff; }
.onglets { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 18px; }
.onglets:empty { display: none; }
.onglets a { white-space: nowrap; text-decoration: none; color: var(--encre); border: 1px solid var(--givre); border-radius: 999px; padding: 8px 16px; background: var(--blanc); }

.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 26px 18px; }
.produit { display: flex; flex-direction: column; cursor: pointer; border-radius: var(--rayon); }
.produit[hidden] { display: none; }
.visuel {
  aspect-ratio: 4 / 5; display: grid; place-items: center; font-size: 4.5rem; position: relative;
  background: #e7eeea; border-radius: var(--rayon); overflow: hidden;
}
.visuel img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: opacity .3s; }
.visuel img.second { opacity: 0; }
.produit:hover .visuel img.second { opacity: 1; }
.etiquette {
  position: absolute; top: 10px; left: 10px; z-index: 1; background: var(--blanc); color: var(--sapin);
  font-size: .78rem; font-weight: 700; padding: 5px 9px; border-radius: 8px;
}
.produit .corps { padding: 12px 2px 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.produit h3 { font: 600 1.02rem/1.35 Figtree, sans-serif; letter-spacing: 0; margin: 0; }
.produit .details { color: var(--brume); font-size: .86rem; }
.ligne-prix { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 10px; }
.prix { font-weight: 700; font-size: 1.1rem; }
.prix s { color: var(--brume); font-weight: 400; font-size: .9rem; margin-left: 6px; }
.produit .bouton { padding: 9px 14px; font-size: .92rem; }
.aucun { color: var(--brume); padding: 20px 0; }
.vide { text-align: center; color: var(--brume); padding: 48px 0; }

/* ---------- Comment ça se passe ---------- */
.engagement {
  display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: center;
  background: var(--sapin); color: #e6efea; border-radius: 22px; padding: 44px; margin-bottom: 56px;
}
.engagement h2 { color: #fff; }
.engagement p { margin: 0 0 12px; color: #c9dcd2; }
.etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: etape; }
.etapes li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; counter-increment: etape; }
.etapes li::before {
  content: counter(etape); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--miel); color: var(--encre); font-weight: 700;
}
.etapes strong { color: #fff; display: block; }
.etapes span { color: #c9dcd2; font-size: .95rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; padding: 0 0 56px; }
.faq details { border-bottom: 1px solid var(--givre); padding: 16px 0; }
.faq details:first-of-type { border-top: 1px solid var(--givre); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--sapin-clair); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--brume); margin: 10px 0 0; max-width: 62ch; }
.faq > div > p { color: var(--brume); }

/* ---------- Pied de page ---------- */
footer.bas { background: #e9efeb; border-top: 1px solid var(--givre); padding: 40px 0 32px; color: var(--brume); font-size: .93rem; }
.pied { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.pied h3 { font: 700 .95rem Figtree, sans-serif; color: var(--encre); margin-bottom: 10px; letter-spacing: 0; }
.pied nav { display: grid; gap: 6px; }
.pied a { color: var(--brume); text-decoration: none; }
.pied a:hover { color: var(--encre); text-decoration: underline; }
.pied p { margin: 8px 0 0; max-width: 42ch; }
.copyright { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--givre); font-size: .85rem; }

/* ---------- Fenêtres (fiche produit, panier) ---------- */
.voile { position: fixed; inset: 0; background: rgba(15, 30, 23, .5); z-index: 40; display: none; }
.voile.ouvert { display: block; }
.fenetre { position: fixed; z-index: 50; background: var(--neige); display: none; flex-direction: column; box-shadow: 0 24px 70px rgba(0, 0, 0, .25); }
.fenetre.ouvert { display: flex; }
.fenetre.tiroir { top: 0; right: 0; bottom: 0; width: min(430px, 100%); }
.fenetre.centre {
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(920px, calc(100% - 32px)); max-height: calc(100% - 32px); border-radius: 20px; overflow: auto;
}
.fenetre .tete { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--givre); background: var(--blanc); }
.fermer { background: none; border: 0; font-size: 1.7rem; cursor: pointer; color: var(--brume); line-height: 1; width: 40px; height: 40px; border-radius: 8px; }
.fermer:hover { background: var(--neige); }
.fiche { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; padding: 22px; }
.fiche .visuel { border-radius: 14px; font-size: 7rem; aspect-ratio: 1; }
.fiche h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.fiche .prix { font-size: 1.45rem; }
.fiche p { color: var(--brume); }
.infos-fiche { display: grid; gap: 8px; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--givre); font-size: .92rem; color: var(--brume); }
.infos-fiche div { display: flex; gap: 10px; align-items: center; }
.infos-fiche .icone { width: 18px; height: 18px; color: var(--sapin-clair); }
.quantite { display: inline-flex; align-items: center; border: 1px solid var(--givre); border-radius: 10px; background: var(--blanc); }
.quantite button { background: none; border: 0; width: 38px; height: 40px; font-size: 1.1rem; cursor: pointer; color: var(--encre); }
.quantite span { min-width: 24px; text-align: center; font-weight: 600; }

.galerie { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.galerie button { padding: 0; width: 60px; height: 60px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: #e7eeea; cursor: pointer; }
.galerie button.actif { border-color: var(--sapin); }
.galerie img { width: 100%; height: 100%; object-fit: cover; }
.lien-partage { margin-top: 12px; background: none; border: 0; padding: 0; color: var(--sapin-clair); font: 600 .92rem Figtree, sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.choix { display: grid; gap: 6px; margin-top: 16px; font-size: .92rem; color: var(--brume); font-weight: 500; }
.choix[hidden] { display: none; }
.choix select { font: inherit; color: var(--encre); padding: 11px 12px; border: 1px solid var(--givre); border-radius: 10px; background: var(--blanc); max-width: 340px; }
.choix.manque select { border-color: var(--houx); box-shadow: 0 0 0 3px rgba(178, 58, 58, .14); }
.choix.manque::after { content: "Choisissez une taille ou une couleur pour continuer."; color: var(--houx); }

.lignes { flex: 1; overflow: auto; padding: 6px 20px; }
.ligne { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--givre); }
.ligne .mini { width: 64px; height: 64px; border-radius: 10px; display: grid; place-items: center; font-size: 1.8rem; background: #e7eeea; overflow: hidden; position: relative; }
.ligne .mini img { width: 100%; height: 100%; object-fit: cover; }
.ligne small { color: var(--brume); }
.pied-panier { padding: 16px 20px 20px; border-top: 1px solid var(--givre); display: grid; gap: 10px; background: var(--blanc); }
.total { display: flex; justify-content: space-between; }
.total.grand { font-weight: 700; font-size: 1.15rem; }
.jauge { height: 6px; border-radius: 99px; background: var(--givre); overflow: hidden; }
.jauge i { display: block; height: 100%; background: var(--sapin-clair); }
.aide { color: var(--brume); font-size: .86rem; }
.erreur { color: var(--houx); font-size: .9rem; }
.panier-vide { text-align: center; padding: 48px 10px; color: var(--brume); }
.panier-vide .bouton { margin-top: 14px; }

/* ---------- Pages d'information ---------- */
.page { max-width: 760px; padding: 44px 16px 40px; margin: 0 auto; }
.page h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); font-weight: 800; color: var(--sapin); letter-spacing: -.02em; }
.page h2 { margin-top: 1.6em; font-size: 1.3rem; }
.a-completer { background: #fff1c2; padding: 0 4px; border-radius: 4px; }

/* ---------- Téléphone ---------- */
@media (max-width: 900px) {
  .ouverture { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; }
  .garanties { grid-template-columns: 1fr 1fr; }
  .garanties div:nth-child(3) { border-left: 0; }
  .garanties div:nth-child(n + 3) { border-top: 1px solid var(--givre); }
  .engagement, .faq { grid-template-columns: 1fr; gap: 24px; }
  .engagement { padding: 28px 22px; }
  .pied { grid-template-columns: 1fr 1fr; }
  .pied > div:first-child { grid-column: 1 / -1; }
  .menu { display: none; }
}
@media (max-width: 640px) {
  .fiche { grid-template-columns: 1fr; padding: 16px; }
  .grille { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .produit h3 { font-size: .93rem; }
  .ligne-prix { flex-direction: column; align-items: stretch; gap: 8px; }
  .produit .bouton { width: 100%; }
  .garanties div { padding: 14px; flex-direction: column; gap: 6px; }
  .mosaique { aspect-ratio: 1; }
  .logo b { font-size: 1.05rem; }
}

/* ---------- Liens dans les cartes ---------- */
.produit h3 a { color: inherit; text-decoration: none; }
.produit h3 a:hover { text-decoration: underline; }
a.visuel { display: grid; }

/* ---------- Pages produit et rayon (fabriquées par le serveur) ---------- */
.ariane { font-size: .88rem; color: var(--brume); padding: 18px 0 6px; }
.ariane a { color: var(--brume); }
.page-produit { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; padding: 10px 0 48px; align-items: start; }
.visuel.grand { aspect-ratio: 1; font-size: 7rem; }
.infos-produit h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; color: var(--sapin); }
.infos-produit .prix { font-size: 1.6rem; }
.infos-produit .description { color: var(--brume); max-width: 60ch; }
.actions-produit { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.actions-produit .bouton { flex: 1; min-width: 200px; }
.page-rayon h1 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 800; color: var(--sapin); }
.page-rayon .tete-collection p { max-width: 70ch; }
.tete-collection > a { font-weight: 600; }
.autres-rayons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 0 56px; }
.autres-rayons h2 { width: 100%; font-size: 1.3rem; }
.autres-rayons a { text-decoration: none; color: var(--encre); border: 1px solid var(--givre); border-radius: 999px; padding: 8px 16px; background: var(--blanc); }
@media (max-width: 760px) { .page-produit { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Thèmes par public ---------- */
/* Grands-parents : plus grand, plus contrasté, boutons plus faciles à toucher */
body[data-cible="grands-parents"] { font-size: 1.14rem; --brume: #3e4a44; --givre: #c9d6cf; }
body[data-cible="grands-parents"] .produit h3 { font-size: 1.12rem; }
body[data-cible="grands-parents"] .bouton { padding: 15px 24px; font-size: 1.08rem; }
body[data-cible="grands-parents"] .produit .bouton { padding: 12px 16px; font-size: 1rem; }
body[data-cible="grands-parents"] .prix { font-size: 1.25rem; }
body[data-cible="grands-parents"] .ouverture h1 { letter-spacing: -.02em; }
body[data-cible="grands-parents"] .visuel img.second { display: none; }
/* Enfants : couleurs plus vives et formes plus rondes */
body[data-cible="enfants"] { --sapin: #1d5a8c; --sapin-clair: #2b77b5; --neige: #f4f8fc; --rayon: 22px; }
body[data-cible="enfants"] .bouton { border-radius: 999px; }
body[data-cible="enfants"] .bandeau { background: #1d5a8c; }
/* Lui : tons plus sobres */
body[data-cible="lui"] { --sapin: #1f2f3a; --sapin-clair: #34505f; --neige: #f5f6f7; }
body[data-cible="lui"] .bandeau { background: #1f2f3a; }
/* Elle : touche rosée discrète */
body[data-cible="elle"] { --sapin: #5a2b3d; --sapin-clair: #8a4560; --neige: #fbf7f8; }
body[data-cible="elle"] .bandeau { background: #5a2b3d; }
