/* Cadeaubi – feuille de style unique, pensée d'abord pour le téléphone. */

:root {
  --vert: #0E5A47;        /* papier cadeau, couleur de marque */
  --vert-fonce: #093D31;
  --or: #C9973B;          /* le ruban */
  --marron: #6B3E26;      /* couleur du logo */
  --or-clair: #F1DFB8;
  --brume: #EEF4F1;       /* fonds de section */
  --encre: #17302A;
  --gris: #5E716B;
  --trait: #D5E0DB;
  --blanc: #FFFFFF;
  --whatsapp: #1A9E50;
  --erreur: #B3261E;
  --rayon: 14px;
  --titre: "Bricolage Grotesque", system-ui, sans-serif;
  --texte: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; font: 16px/1.55 var(--texte); color: var(--encre); background: var(--blanc); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--vert); }
h1, h2, h3 { font-family: var(--titre); font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 6vw, 3rem); }
h2 { font-size: clamp(1.35rem, 4vw, 1.8rem); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }

.saut { position: absolute; left: -999px; top: 0; background: var(--vert); color: var(--blanc); padding: 8px 12px; z-index: 50; }
.saut:focus { left: 8px; }

/* ---------- En-tête et pied ---------- */
.entete { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--trait); background: var(--blanc); position: sticky; top: 0; z-index: 20; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--titre); font-weight: 800; font-size: 1.35rem; color: var(--vert); text-decoration: none; margin: 0; }
.logo .noeud { width: 30px; height: 21px; color: var(--or); }
.entete .logo { color: var(--marron); } /* marron porte-bonheur, en-tête seulement : sur le vert du pied, il ne se lirait pas */
.nav { display: flex; gap: 18px; }
.nav a { color: var(--encre); text-decoration: none; font-weight: 600; font-size: .95rem; }

.pied { background: var(--vert-fonce); color: #DCE8E3; padding: 40px 16px 110px; margin-top: 48px; }
.pied a { color: var(--blanc); }
.pied-grille { display: grid; gap: 24px; max-width: 1080px; margin: 0 auto; }
.logo-pied { color: var(--blanc); margin-bottom: 8px; }
.pied-titre { font-weight: 700; color: var(--or-clair); margin-bottom: 4px; }
.pied-bas { max-width: 1080px; margin: 24px auto 0; font-size: .85rem; opacity: .7; }
@media (min-width: 760px) { .pied-grille { grid-template-columns: 2fr 1fr 1fr; } .pied { padding-bottom: 40px; } }

/* ---------- Boutons ---------- */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border: 0; border-radius: 999px; font: 700 1.05rem/1 var(--texte); text-decoration: none; cursor: pointer; }
.bouton svg { width: 22px; height: 22px; }
.bouton-principal { background: var(--vert); color: var(--blanc); }
.bouton-principal:hover { background: var(--vert-fonce); }
.bouton-principal:disabled { opacity: .7; cursor: wait; }
.bouton-clair { background: var(--or); color: var(--vert-fonce); }
.bouton-whatsapp { background: var(--whatsapp); color: var(--blanc); }

.flottant-whatsapp { position: fixed; right: 16px; bottom: 16px; width: 56px; height: 56px; border-radius: 50%; background: var(--whatsapp); color: var(--blanc); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(14, 90, 71, .35); z-index: 30; }
.flottant-whatsapp svg { width: 30px; height: 30px; }
.flottant-whatsapp.avec-barre { bottom: 84px; }

/* ---------- Accueil ---------- */
.hero { position: relative; overflow: hidden; background: var(--vert); color: var(--blanc); padding: 56px 16px 64px; }
.hero-texte { position: relative; max-width: 560px; }
.hero h1 { font-size: clamp(2.4rem, 11vw, 4.6rem); margin-bottom: .35em; }
.hero p { font-size: 1.08rem; color: #E3EEE9; max-width: 34em; margin-bottom: 1.6em; }
/* Le ruban croisé : la signature visuelle de Cadeaubi */
.hero-ruban { position: absolute; inset: 0; pointer-events: none; }
.hero-ruban-v { position: absolute; top: 0; bottom: 0; right: 18%; width: 34px; background: var(--or); }
.hero-ruban-h { position: absolute; left: 0; right: 0; bottom: 22%; height: 34px; background: var(--or); }
.hero-ruban .noeud { position: absolute; right: calc(18% - 43px); bottom: calc(22% - 30px); width: 120px; height: 94px; color: var(--or-clair); }
.hero-texte { z-index: 1; }
@media (max-width: 640px) {
  .hero { padding-bottom: 130px; }
  .hero-texte { padding-right: 40px; }
  .hero-ruban-v { right: 16px; width: 22px; }
  .hero-ruban-h { bottom: 46px; height: 22px; }
  .hero-ruban .noeud { right: -10px; bottom: 22px; width: 84px; height: 66px; }
}
@media (min-width: 641px) {
  .hero { padding: 80px 32px 170px; }
  .hero-texte { max-width: min(640px, 70%); }
  .hero-ruban-h { bottom: 64px; }
  .hero-ruban .noeud { bottom: 34px; }
}
@media (min-width: 1140px) { .hero-texte { margin-left: calc((100vw - 1080px) / 2 - 16px); } }

/* Couverture vidéo : plein écran vertical sur téléphone, texte posé en bas */
/* Sur téléphone, le coffret occupe le bas de la vidéo : le texte se pose en haut, sur le satin vert. */
.hero-media { min-height: calc(100svh - 58px); display: flex; align-items: flex-start; padding: 32px 16px 0; background: var(--vert-fonce); }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(9, 61, 49, .9) 0%, rgba(9, 61, 49, .6) 34%, rgba(9, 61, 49, 0) 55%); }
.hero-media p { text-shadow: 0 1px 8px rgba(9, 61, 49, .6); }
.hero-media .hero-texte { position: relative; z-index: 1; padding-right: 0; }
.hero-media h1 { font-size: clamp(2.3rem, 10vw, 4.2rem); }
@media (min-width: 900px) {
  .hero-media { min-height: 640px; align-items: center; padding: 0 32px; }
  .hero-video { left: auto; width: 48%; object-position: center; }
  .hero-media::after { background: linear-gradient(to right, var(--vert-fonce) 52%, rgba(9, 61, 49, 0) 68%); }
  .hero-media .hero-texte { max-width: 520px; margin-left: max(0px, calc((100vw - 1080px) / 2 - 16px)); }
}
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } .hero-media { background: var(--vert-fonce) url(/videos/couverture.jpg) center / cover; } }

.section { max-width: 1080px; margin: 0 auto; padding: 40px 16px 0; }
.texte { max-width: 720px; }

.garanties { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.garanties li { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: var(--gris); }
.garanties strong { display: block; color: var(--encre); }
.garanties svg { width: 26px; height: 26px; flex: none; color: var(--vert); margin-top: 2px; }
.garanties-accueil { max-width: 1080px; margin: 0 auto; padding: 24px 16px; background: var(--brume); }
@media (min-width: 760px) { .garanties-accueil { grid-template-columns: repeat(3, 1fr); padding: 28px 24px; } }

.grille-produits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 900px) { .grille-produits { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.carte-produit { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.carte-image { border-radius: var(--rayon); overflow: hidden; background: var(--brume); aspect-ratio: 1; }
.carte-image img { width: 100%; height: 100%; object-fit: cover; }
.carte-corps { padding: 10px 2px 0; display: grid; gap: 2px; }
.carte-categorie { font-size: .82rem; color: var(--or); font-weight: 700; margin: 0; }
.carte-nom { font-family: var(--titre); font-weight: 600; font-size: 1.08rem; line-height: 1.2; }
.carte-prix { font-weight: 700; color: var(--vert); }
.carte-prix s { color: var(--gris); font-weight: 400; font-size: .85em; }

.etapes { list-style: none; counter-reset: etape; margin: 0; padding: 0; display: grid; gap: 16px; }
.etapes li { counter-increment: etape; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; color: var(--gris); }
.etapes li::before { content: counter(etape); width: 44px; height: 44px; border-radius: 50%; background: var(--or-clair); color: var(--vert-fonce); font: 800 1.15rem/44px var(--titre); text-align: center; }
.etapes strong { display: block; color: var(--encre); font-family: var(--titre); font-weight: 600; font-size: 1.08rem; line-height: 1.25; margin: 2px 0 4px; }
@media (min-width: 760px) {
  .etapes { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .etapes li { grid-template-columns: 1fr; gap: 12px; background: var(--brume); border-radius: var(--rayon); padding: 22px 22px 20px; }
}

.delais { display: grid; gap: 12px; }
@media (min-width: 760px) { .delais { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; } }
.delai { border: 1.5px solid var(--trait); border-radius: var(--rayon); padding: 14px 16px; }
.delai-duree { font: 800 1.35rem/1.1 var(--titre); color: var(--vert); margin: 0 0 8px; }
.delai-villes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.delai-villes li { background: var(--brume); border-radius: 999px; padding: 4px 11px; font-size: .92rem; }

.histoire { display: grid; gap: 16px; }
.histoire > div:last-child { background: var(--brume); border-left: 6px solid var(--or); border-radius: 0 var(--rayon) var(--rayon) 0; padding: 22px 20px 8px; max-width: 760px; }
.histoire-noeud { display: none; }
.signature { font-family: var(--titre); font-weight: 600; color: var(--vert); }
@media (min-width: 760px) { .histoire { grid-template-columns: 120px 1fr; align-items: center; } .histoire-noeud { display: block; color: var(--or); } .histoire-noeud .noeud { width: 120px; height: 84px; } }

.avis { display: grid; gap: 14px; }
@media (min-width: 760px) { .avis { grid-template-columns: repeat(3, 1fr); } }
.avis-carte { margin: 0; padding: 16px; border: 1px solid var(--trait); border-radius: var(--rayon); }
.avis-carte img { border-radius: 10px; margin-bottom: 12px; }
.avis-carte blockquote { margin: 0 0 8px; }
.avis-carte figcaption { font-weight: 700; color: var(--gris); font-size: .92rem; }

.contact-bloc { text-align: center; }

/* ---------- Page produit ---------- */
.produit-haut { max-width: 1080px; margin: 0 auto; }
@media (min-width: 900px) { .produit-haut { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 32px 16px 0; align-items: start; } .galerie { position: sticky; top: 80px; } }
.galerie { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; background: var(--brume); scrollbar-width: none; }
.galerie::-webkit-scrollbar { display: none; }
.galerie figure { margin: 0; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1; }
.galerie img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .galerie { border-radius: var(--rayon); } .galerie-bloc { position: sticky; top: 80px; } .galerie { position: static; } }
.miniatures { display: flex; gap: 8px; padding: 10px 16px 0; overflow-x: auto; scrollbar-width: none; }
.miniatures::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .miniatures { padding: 12px 0 0; } }
.miniatures button { flex: none; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--brume); cursor: pointer; }
.miniatures button[aria-current="true"] { border-color: var(--vert); }
.miniatures img { width: 100%; height: 100%; object-fit: cover; }
.produit-infos { padding: 20px 16px 0; }
@media (min-width: 900px) { .produit-infos { padding: 0; } }
.accroche { font-size: 1.08rem; color: var(--gris); }
.prix { display: flex; align-items: baseline; gap: 12px; margin: 0 0 8px; }
.prix-courant { font: 800 2rem/1 var(--titre); color: var(--vert); }
.prix-barre { color: var(--gris); font-size: 1.05rem; }
.pastille-cod { display: inline-block; background: var(--or-clair); color: var(--vert-fonce); font-weight: 700; font-size: .92rem; padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }

/* Formulaire : la boîte cadeau, barrée de son ruban */
.commande { position: relative; margin: 24px 0 0; padding: 30px 16px 20px; border: 2px solid var(--vert); border-radius: var(--rayon); background: var(--blanc); scroll-margin-top: 72px; }
.ruban { position: absolute; top: -2px; left: -2px; right: -2px; height: 12px; background: var(--or); border-radius: var(--rayon) var(--rayon) 0 0; }
.ruban::after { content: ""; position: absolute; top: 0; right: 28px; width: 12px; height: 46px; background: var(--or); border-radius: 0 0 3px 3px; }
.commande h2 { margin-bottom: .25em; padding-right: 48px; }
.commande-intro { color: var(--gris); font-size: .95rem; }

.offres { border: 0; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.offres legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.offre { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px; border: 2px solid var(--trait); border-radius: 12px; cursor: pointer; background: var(--blanc); }
.offre:has(input:checked) { border-color: var(--vert); background: var(--brume); }
.offre input { width: 20px; height: 20px; accent-color: var(--vert); margin: 0; }
.offre-corps { display: grid; }
.offre-libelle { font-weight: 700; }
.offre-badge { font-size: .82rem; color: var(--vert); font-weight: 600; }
.offre-prix { font-weight: 800; white-space: nowrap; }

.champ { margin-bottom: 14px; }
.champ label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.facultatif { font-weight: 400; color: var(--gris); }
.champ input, .champ select, .champ textarea { width: 100%; min-height: 50px; padding: 12px 14px; font: 16px/1.3 var(--texte); color: var(--encre); background: var(--blanc); border: 1.5px solid #B9C9C2; border-radius: 10px; }
.champ textarea { min-height: 70px; resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus { border-color: var(--vert); outline: 2px solid var(--vert); outline-offset: 0; }
.aide-erreur { display: none; color: var(--erreur); font-size: .88rem; margin: 6px 0 0; }
.champ.erreur input, .champ.erreur select { border-color: var(--erreur); }
.champ.erreur .aide-erreur { display: block; }

.options-cadeau { margin: 4px 0 16px; padding: 12px 14px; background: var(--brume); border-radius: 10px; }
.options-cadeau summary { font-weight: 700; color: var(--vert); cursor: pointer; }
.options-cadeau[open] summary { margin-bottom: 12px; }

.piege { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.recap { margin: 18px 0; padding: 14px 0 0; border-top: 1px dashed var(--trait); display: grid; gap: 6px; }
.recap div { display: flex; justify-content: space-between; gap: 12px; }
.recap dt { color: var(--gris); }
.recap dd { margin: 0; font-weight: 600; text-align: right; }
.recap-total dt { color: var(--encre); font-weight: 700; }
.recap-total dd { font: 800 1.3rem/1.2 var(--titre); color: var(--vert); }
.commande .bouton-principal { width: 100%; }
.rassurance { font-size: .88rem; color: var(--gris); text-align: center; margin: 10px 0 0; }
.message-form { margin: 14px 0 0; padding: 14px; border-radius: 10px; }
.message-form.info { background: var(--brume); }
.message-form.echec { background: #FCEDEB; }
.message-form.echec .bouton { width: 100%; margin-top: 4px; }

.produit-details { max-width: 1080px; margin: 0 auto; padding: 40px 16px 0; display: grid; gap: 32px; }
@media (min-width: 900px) { .produit-details { grid-template-columns: 1fr 1fr; gap: 40px; } }
.liste-contenu { padding-left: 1.2em; margin: 0 0 1em; }
.liste-contenu li { margin-bottom: 4px; }
.faq { border-bottom: 1px solid var(--trait); padding: 12px 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin: 8px 0 0; color: var(--gris); }
.autres { max-width: 1080px; margin: 0 auto; padding: 40px 16px 0; }

.barre-commande { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--blanc); border-top: 1px solid var(--trait); box-shadow: 0 -4px 16px rgba(23, 48, 42, .08); transition: transform .2s ease; }
.barre-commande.cachee { transform: translateY(110%); }
.barre-prix { font: 800 1.25rem/1 var(--titre); color: var(--vert); }
.barre-commande .bouton { flex: 1; max-width: 240px; }
@media (min-width: 900px) { .barre-commande { display: none; } .flottant-whatsapp.avec-barre { bottom: 16px; } }

/* ---------- Merci ---------- */
.merci { text-align: center; }
.merci .recap { text-align: left; max-width: 420px; margin: 18px auto; }
.merci-noeud .noeud { width: 90px; height: 64px; color: var(--or); margin: 0 auto 12px; }
.merci-numero { font-size: 1.1rem; }
