:root {
  --fond: #fbf7f0;
  --surface: #ffffff;
  --encre: #1f2a2e;
  --encre-douce: #5b6a70;
  --ligne: #e8e0d3;
  --lagon: #0e7c7b;
  --lagon-fonce: #095b5a;
  --corail: #f26b3a;
  --corail-fonce: #d9531f;
  --soleil: #ffc145;
  --vert: #2e9e5b;
  --orange: #d97a00;
  --ombre: 0 1px 2px rgba(31, 42, 46, .06), 0 4px 16px rgba(31, 42, 46, .06);
  --ombre-forte: 0 12px 40px rgba(31, 42, 46, .18);
  --rayon: 16px;
  --titre: "Fredoka", "Nunito", system-ui, sans-serif;
  --texte: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 16px;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--titre); font-weight: 600; line-height: 1.2; margin: 0; }

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 247, 240, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ligne);
}
.entete__contenu {
  max-width: 1240px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.logo__img { width: 52px; height: 52px; border-radius: 50%; display: block; flex-shrink: 0; }
.accroche__decor {
  height: 250px; margin-top: -40px;
  background: url("../medias/bandeau-plage.svg?v=202611081646") center bottom / cover no-repeat;
}
.accroche__contenu { position: relative; z-index: 1; }
.accroche h1 > span { display: block; }
.accroche__slogan {
  margin-top: 8px; font-size: .62em; letter-spacing: .04em; color: #ffb38a;
}
.accroche__devise {
  margin-top: 4px; font-size: .72em; color: var(--soleil); font-style: italic;
}
.accroche__logo {
  width: 280px; height: 280px; border-radius: 50%; display: block; margin: 0 auto 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}
.logo__nom { display: block; font-family: var(--titre); font-weight: 700; font-size: 1.35rem; color: var(--lagon-fonce); line-height: 1.1; }
.logo__lieu { display: block; font-size: .8rem; color: var(--encre-douce); }

.click-collect {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px; border-radius: 999px;
  background: #fff3e8; border: 2px solid var(--corail); color: var(--corail-fonce);
}
.click-collect__icone { width: 44px; height: 44px; flex-shrink: 0; display: block; margin: -6px 0; }
.click-collect strong { display: block; font-family: var(--titre); font-weight: 700; font-size: 1rem; line-height: 1.1; }
.click-collect small { display: block; font-size: .72rem; color: var(--encre-douce); line-height: 1.2; }

.bouton-panier {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  background: var(--lagon); color: #fff; border: 0; border-radius: 999px;
  padding: 10px 18px; font-weight: 700;
  transition: background .15s;
}
.bouton-panier:hover { background: var(--lagon-fonce); }
.bouton-panier svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pastille {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--soleil); color: var(--encre); font-size: .8rem;
  display: inline-grid; place-items: center;
}
.pastille.rebond { animation: rebond .4s; }
@keyframes rebond { 50% { transform: scale(1.35); } }

/* ---------- Accroche ---------- */
.accroche {
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 193, 69, .35), transparent 40%),
    radial-gradient(circle at 5% 90%, rgba(242, 107, 58, .18), transparent 45%),
    linear-gradient(135deg, #0e7c7b 0%, #0b5f6e 100%);
  color: #fff;
}
.accroche__contenu { max-width: 860px; margin: 0 auto; padding: 48px 16px 40px; text-align: center; }
.accroche h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 12px; }
.accroche p { margin: 0 auto 24px; max-width: 640px; opacity: .95; }
.recherche { position: relative; max-width: 620px; margin: 0 auto; }
.recherche svg {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; fill: none; stroke: var(--encre-douce); stroke-width: 2; stroke-linecap: round;
}
.recherche input {
  width: 100%; padding: 16px 20px 16px 50px; border-radius: 999px; border: 0;
  background: #fff; color: var(--encre); font-size: 1.05rem; box-shadow: var(--ombre-forte);
}
.recherche input:focus { outline: 3px solid var(--soleil); outline-offset: 2px; }

/* ---------- Catégories & outils ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 24px 16px 48px; }
/* Catégories en pièces de puzzle : chaque pièce a un tenon (rond) à droite qui s'emboîte
   dans la mortaise (encoche) à gauche de la pièce suivante. */
.categories { display: flex; flex-wrap: wrap; column-gap: 2px; row-gap: 14px; margin-bottom: 22px; padding-left: 10px; }
.categorie {
  --c: var(--lagon);
  position: relative; border: 0; border-radius: 7px;
  background: var(--c); color: #fff;
  padding: 10px 22px 10px 24px; font-family: var(--titre); font-weight: 600; font-size: .95rem;
  display: inline-flex; align-items: center; gap: 7px;
  transition: transform .15s, filter .15s;
}
/* mortaise : encoche couleur de fond, centrée sur le bord droit de la pièce précédente */
.categorie::before {
  content: ""; position: absolute; z-index: 1;
  width: 20px; height: 20px; border-radius: 50%; background: var(--fond);
  left: -12px; top: calc(50% - 10px);
}
/* tenon : rond de la couleur de la pièce, qui vient remplir l'encoche de la suivante */
.categorie::after {
  content: ""; position: absolute; z-index: 2;
  width: 17px; height: 17px; border-radius: 50%; background: var(--c);
  right: -8.5px; top: calc(50% - 8.5px);
}
.categorie > * , .categorie { text-shadow: 0 1px 1px rgba(0, 0, 0, .25); }
.categorie:hover { filter: brightness(1.12); }
.categorie[aria-pressed="true"] {
  transform: translateY(-4px) rotate(-1.5deg);
  filter: brightness(1.08) drop-shadow(0 4px 4px rgba(0, 0, 0, .3));
  z-index: 3;
}
.categorie[aria-pressed="true"]::before { display: none; }
/* Onglet Précommandes qui clignote quand il contient des produits */
.categorie--clignote { animation: clignote 1.4s ease-in-out infinite; }
.categorie--clignote[aria-pressed="true"] { animation: none; }
@keyframes clignote {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 0 rgba(11, 111, 164, 0)); transform: scale(1); }
  50% { filter: brightness(1.35) drop-shadow(0 0 8px rgba(11, 111, 164, .9)); transform: scale(1.06); }
}
/* Petit éclair jaune sur l'onglet Précommandes */
.eclair {
  width: 1.15em; height: 1.15em; flex: none;
  fill: #ffd21f; stroke: #8a5a00; stroke-width: 1.2; stroke-linejoin: round;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35));
  animation: eclair 2.4s ease-in-out infinite;
}
@keyframes eclair {
  0%, 70%, 100% { transform: rotate(0) scale(1); }
  76% { transform: rotate(-14deg) scale(1.2); }
  82% { transform: rotate(10deg) scale(1.1); }
  88% { transform: rotate(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .categorie--clignote { animation: none; outline: 3px solid var(--soleil); outline-offset: 2px; }
  .eclair { animation: none; }
}
.categorie small {
  font-family: var(--texte); font-weight: 800; font-size: .75rem;
  background: rgba(255, 255, 255, .25); border-radius: 999px; padding: 1px 7px;
}

.barre-outils { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.barre-outils__droite { display: flex; gap: 12px; flex-wrap: wrap; }
.compteur { margin: 0; color: var(--encre-douce); font-weight: 600; }
.tri, .filtre-prix { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--encre-douce); font-weight: 600; }
select {
  border: 1px solid var(--ligne); border-radius: 10px; background: var(--surface);
  padding: 8px 10px; font-weight: 600; color: var(--encre);
}

/* ---------- Grille produits ---------- */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.carte {
  background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.carte:hover { transform: translateY(-3px); box-shadow: var(--ombre-forte); }
.carte__image {
  all: unset; cursor: pointer; display: block; aspect-ratio: 1 / 1; background: #f3eee5; position: relative;
}
.carte__image:focus-visible { outline: 3px solid var(--lagon); outline-offset: -3px; }
.carte__image img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.carte__corps { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.carte__cat { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--lagon); }
.carte__nom { font-size: 1.08rem; }
.carte__nom button { all: unset; cursor: pointer; }
.carte__nom button:hover { color: var(--lagon-fonce); text-decoration: underline; }
.carte__desc {
  margin: 0; color: var(--encre-douce); font-size: .9rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.carte__bas { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.prix { font-family: var(--titre); font-weight: 700; font-size: 1.3rem; color: var(--encre); white-space: nowrap; }

/* Promotions */
.badge-promo {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: #e0242d; color: #fff; font-weight: 800; font-size: .8rem;
  padding: 4px 9px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.badge-precommande { background: #0b6fa4; }
.stock--precommande { color: #0b6fa4; }
.stock--epuise { color: #b3261e; font-weight: 700; }
.badge-epuise { background: #6b6b6b; }
.limite { display: inline-block; align-self: flex-start; margin-top: .25rem; padding: .15rem .55rem; border-radius: 999px; background: #fdecea; color: #b3261e; font-size: .78rem; font-weight: 700; }
.prix-bloc { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.prix--promo { color: #e0242d; }
.prix-barre { color: var(--encre-douce); font-size: .9rem; }
.fiche__promo { color: #e0242d; font-weight: 700; font-size: .9rem; }
.categorie--promo { --c: #e0242d; }

.stock { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock--ok { color: var(--vert); }
.stock--faible { color: var(--orange); }

.bouton {
  border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 700;
  background: var(--corail); color: #fff; transition: background .15s, transform .1s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
}
.bouton:hover { background: var(--corail-fonce); }
.bouton:active { transform: scale(.97); }
.bouton:disabled { background: #cfc7ba; cursor: not-allowed; }
.bouton--petit { padding: 8px 12px; font-size: .88rem; }
.bouton--secondaire { background: transparent; color: var(--lagon-fonce); border: 2px solid var(--lagon); }
.bouton--secondaire:hover { background: var(--lagon); color: #fff; }
.bouton--vert { background: #25a55f; }
.bouton--vert:hover { background: #1c874d; }
.bouton--plein { width: 100%; }
.bouton--carte { background: #1f2a44; color: #fff; }
.bouton--carte:hover { background: #2c3b5e; }
.bouton--carte svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.avertissement-test { background: #fff4d6; border: 1px dashed #d99a00; border-radius: 8px; padding: 6px 10px; color: #7a5600 !important; }

.plus { text-align: center; margin-top: 28px; }
.vide { text-align: center; color: var(--encre-douce); padding: 48px 0; font-size: 1.1rem; }

/* Visuel de remplacement quand aucune photo n'est disponible */
.visuel {
  position: absolute; inset: 12px; border-radius: 12px;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 14px; color: #fff; overflow: hidden;
  background: var(--c1, var(--lagon));
}
.visuel::after {
  content: ""; position: absolute; right: -30px; bottom: -30px; width: 120px; height: 120px;
  border-radius: 28px; background: rgba(255,255,255,.14); transform: rotate(20deg);
}
.visuel__cat { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.visuel__nom { font-family: var(--titre); font-weight: 700; font-size: 1.25rem; line-height: 1.15; position: relative; z-index: 1; word-break: break-word; }
.visuel__code { font-size: .7rem; opacity: .75; letter-spacing: .08em; position: relative; z-index: 1; }

/* ---------- Boîtes de dialogue ---------- */
dialog { border: 0; padding: 0; color: var(--encre); background: var(--surface); }
dialog::backdrop { background: rgba(20, 30, 34, .55); backdrop-filter: blur(2px); }
.fermer {
  position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.06); font-size: 1.6rem; line-height: 1; z-index: 2;
}
.fermer:hover { background: rgba(0,0,0,.12); }

.fiche { width: min(880px, calc(100% - 32px)); border-radius: 20px; box-shadow: var(--ombre-forte); }
.fiche__contenu { display: grid; grid-template-columns: 1fr 1fr; }
.fiche__image { background: #f3eee5; position: relative; min-height: 320px; }
.fiche__image img { width: 100%; height: 100%; object-fit: contain; padding: 24px; }
.fiche__infos { padding: 32px 28px 28px; display: flex; flex-direction: column; gap: 12px; }
.fiche__infos h2 { font-size: 1.7rem; padding-right: 36px; }
.fiche__infos p { margin: 0; }
.fiche__desc { color: #34444a; }
.fiche__meta { font-size: .85rem; color: var(--encre-douce); }
.fiche__achat { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--ligne); }
.fiche__achat .prix { font-size: 1.8rem; }

.panier {
  position: fixed; inset: 0 0 0 auto; margin: 0;
  width: min(440px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh;
  display: none; flex-direction: column;
}
.panier[open] { display: flex; animation: glisse .25s ease-out; }
@keyframes glisse { from { transform: translateX(40px); opacity: 0; } }
.panier__entete { position: relative; padding: 20px 20px 14px; border-bottom: 1px solid var(--ligne); }
.panier__entete .fermer { top: 12px; }
.panier[open] { overflow-y: auto; }
.panier__corps { flex: 1 0 auto; padding: 8px 20px; }
.panier__pied { padding: 16px 20px 20px; border-top: 1px solid var(--ligne); display: flex; flex-direction: column; gap: 10px; }
.ligne-panier { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--ligne); }
.ligne-panier__img { width: 56px; height: 56px; border-radius: 10px; background: #f3eee5; overflow: hidden; position: relative; }
.ligne-panier__img img { width: 100%; height: 100%; object-fit: contain; }
.ligne-panier__img .visuel { inset: 0; padding: 0; border-radius: 10px; }
.ligne-panier__img .visuel > * { display: none; }
.ligne-panier__nom { font-weight: 700; font-size: .95rem; line-height: 1.25; }
.ligne-panier__prix { font-size: .85rem; color: var(--encre-douce); }
.quantite { display: inline-flex; align-items: center; border: 1px solid var(--ligne); border-radius: 999px; margin-top: 4px; }
.quantite button { border: 0; background: none; width: 30px; height: 28px; font-weight: 700; }
.quantite button:disabled { opacity: .3; cursor: default; }
.quantite span { min-width: 22px; text-align: center; font-weight: 700; font-size: .9rem; }
.retirer { border: 0; background: none; color: var(--encre-douce); text-decoration: underline; font-size: .82rem; }
.total { display: flex; justify-content: space-between; font-family: var(--titre); font-size: 1.3rem; font-weight: 700; }
.panier__vide { text-align: center; color: var(--encre-douce); padding: 40px 0; }
.formulaire { display: flex; flex-direction: column; gap: 8px; }
.formulaire input, .formulaire textarea {
  border: 1px solid var(--ligne); border-radius: 10px; padding: 10px 12px; background: #fff; width: 100%;
}
.formulaire textarea { resize: vertical; min-height: 60px; }
.petit { font-size: .82rem; color: var(--encre-douce); margin: 0; }

.notification {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px);
  background: var(--encre); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-weight: 600; box-shadow: var(--ombre-forte); transition: transform .25s; z-index: 50;
  max-width: calc(100% - 32px);
}
.notification.visible { transform: translate(-50%, 0); }

/* ---------- Pied de page ---------- */
.pied { background: var(--encre); color: #dfe7e9; }
.pied__contenu { max-width: 1240px; margin: 0 auto; padding: 40px 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.pied h2 { color: #fff; font-size: 1.15rem; margin-bottom: 10px; }
.pied p, .pied ol { margin: 0 0 6px; }
.pied ol { padding-left: 20px; }
.pied a { color: var(--soleil); }
.pied .petit { color: #9fb0b5; }
.pied__fdj { margin-top: 12px !important; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .07); }
.pied__fdj strong { color: var(--soleil); }
.pied__compteur {
  max-width: 1240px; margin: 0 auto; padding: 0 16px 16px;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px;
  font-size: .9rem; color: #dfe7e9;
}
.pied__compteur strong { color: var(--soleil); font-family: var(--titre); font-size: 1.05rem; }
.pied__enligne { display: inline-flex; align-items: center; gap: 6px; }
.pied__enligne::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: #3ddc84;
  box-shadow: 0 0 0 3px rgba(61, 220, 132, .25);
}
.pied__mention {
  max-width: 1240px; margin: 0 auto; padding: 14px 16px 22px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .8rem; color: #9fb0b5; text-align: center;
}

/* ---------- Pages de texte (CGV) ---------- */
.document { max-width: 820px; margin: 0 auto; padding: 32px 16px 56px; line-height: 1.65; }
.document h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); color: var(--lagon-fonce); }
.document h2 { font-size: 1.3rem; margin: 32px 0 10px; color: var(--lagon-fonce); scroll-margin-top: 90px; }
.document p, .document li { color: #34444a; }
.document a { color: var(--lagon-fonce); }
.document__version { color: var(--encre-douce); margin-top: 6px; }
.document__sommaire { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 14px 20px; margin: 20px 0; }
.document__sommaire ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 24px; }
.document__fiche { list-style: none; padding: 16px 20px; background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); }
.document__encadre { background: #eef6f5; border-left: 4px solid var(--lagon); border-radius: 0 12px 12px 0; padding: 4px 18px; margin: 14px 0; font-size: .95rem; }
.pied__liens { margin-top: 10px !important; }
.pied__liens a { font-weight: 700; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .fiche__contenu { grid-template-columns: 1fr; }
  .fiche__image { min-height: 240px; aspect-ratio: 4 / 3; }
  .fiche__infos { padding: 22px 18px 20px; }
  .bouton-panier span:not(.pastille) { display: none; }
  .accroche__logo { width: 200px; height: 200px; }
  .accroche__decor { height: 170px; margin-top: -24px; }
  .logo__lieu { display: none; }
  .click-collect { padding: 4px 10px 4px 4px; gap: 6px; }
  .click-collect small { display: none; }
  .click-collect strong { font-size: .85rem; }
  .click-collect__icone { width: 34px; height: 34px; margin: -4px 0; }
  .document__sommaire ol { columns: 1; }
  .entete__contenu > .bouton--secondaire { padding: 8px 12px; font-size: .85rem; }
  .accroche__contenu { padding-top: 28px; }
  .grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .carte__corps { padding: 10px 12px 12px; }
  .carte__desc { display: none; }
  .carte__bas { flex-direction: column; align-items: stretch; }
  .prix { font-size: 1.15rem; }
  .visuel__nom { font-size: 1rem; }
  .barre-outils__droite { width: 100%; }
}
