/* Vitrine « catalogue » : grille dense et silencieuse, l'image du produit fait tout.
   Encre bissap sur blanc, tuiles couleur beurre de karité, framboise du logo pour les signaux. */
@font-face {
  font-family: "Archivo";
  src: url("/commun/polices/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("/commun/polices/archivo-italique.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

:root {
  --fond: #ffffff;
  --encre: #2b0f26;
  --tuile: #fff2c9;
  --tuile-survol: #ffe7a1;
  --framboise: #d61f69;
  --doux: #7a6774;
  --ligne: #eee3ea;
  --marge: clamp(12px, 2.2vw, 28px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 400 13px/1.45 "Archivo", system-ui, sans-serif;
  font-stretch: 88%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; padding: 0 var(--marge) 64px; outline: none; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--framboise); outline-offset: 2px; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

.evitement { position: absolute; left: -999px; top: 8px; background: var(--encre); color: #fff; padding: 6px 10px; z-index: 10; }
.evitement:focus { left: 8px; }

/* ---------- En-tête : le tampon du logo à gauche, le panier à droite, rien d'autre ---------- */
.entete {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--marge) 10px;
}
.tampon img { width: 72px; height: auto; transition: transform .25s ease; }
.tampon:hover img { transform: rotate(-8deg); }
.lien-panier { font-size: 13px; color: var(--doux); display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.lien-panier[aria-current="page"] { color: var(--encre); font-weight: 700; }
.compteur {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--encre); color: #fff; border-radius: 9px; font-size: 11px; font-weight: 700;
}
.compteur.vide { background: var(--ligne); color: var(--doux); }
.vis-cache { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Accueil : le pot seul, au centre, qui tourne ---------- */
.accueil {
  min-height: calc(100svh - 230px);
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 24px;
  padding: 8px 0 24px;
}
.pot-accueil {
  display: grid; place-items: center;
  width: min(86vw, 62svh, 640px);
  aspect-ratio: 1;
  cursor: pointer;
  position: relative;
}
.accueil.plusieurs .pot-accueil { width: min(86vw, 46svh, 420px); }
/* Ombre portée sous le pot : il est posé, pas suspendu. */
.pot-accueil::after {
  content: ""; position: absolute; left: 26%; right: 26%; bottom: 7%; height: 5%;
  background: radial-gradient(closest-side, rgb(43 15 38 / .16), transparent);
  z-index: -1;
}
.pot-accueil .tour360, .pot-accueil > img { width: 100%; height: 100%; object-fit: contain; }
.pot-accueil:hover { text-decoration: none; }
.pot-accueil:focus-visible { outline-offset: 6px; }
.nom-seul { font-size: 28px; font-weight: 800; font-stretch: 75%; }

/* Rotation en vidéo : fond blanc fondu dans la page (multiply), aucune bordure visible */
video.rotation { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; display: block; pointer-events: none; }
.accueil { position: relative; }
.tuile-video { width: 86%; height: 86%; display: grid; place-items: center; }
.scene { position: relative; }
.pause-rotation {
  position: absolute; right: 8px; bottom: 8px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--ligne); background: #fff; color: var(--encre); cursor: pointer; display: grid; place-items: center;
}
.pause-rotation::before { content: ""; width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; box-sizing: border-box; }
.pause-rotation.lecture::before { width: 0; height: 0; border: 0; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }
.accueil .pause-rotation { right: max(8px, calc(50% - min(43vw, 31svh, 320px))); bottom: 18px; opacity: .55; }
.accueil .pause-rotation:hover, .accueil .pause-rotation:focus-visible { opacity: 1; }

/* Fondu enchaîné : la vue suivante se pose sur la vue courante. */
.tour360.fondu img { transition: none; }
.tour360.fondu img.dessus { z-index: 1; }
.tour360.decoratif { cursor: inherit; touch-action: auto; }

/* ---------- Grille : tuiles serrées, nom et prix au survol (toujours visibles au doigt) ---------- */
.titre-rayon { font-size: 13px; font-weight: 700; margin: 6px 0 14px; }
.grille {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 22px 12px;
}
.tuile a { display: block; text-decoration: none; }
.tuile figure { margin: 0; }
.tuile .cadre {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--tuile);
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: background-color .2s ease;
}
.tuile .cadre img { width: 82%; height: 82%; object-fit: contain; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.tuile a:hover .cadre, .tuile a:focus-visible .cadre { background: var(--tuile-survol); }
.tuile a:hover .cadre img { transform: scale(1.05) rotate(-2deg); }
.tuile figcaption { padding-top: 6px; min-height: 36px; font-size: 12px; line-height: 1.35; }
.tuile .nom { font-weight: 700; }
.tuile .meta { color: var(--doux); }
@media (hover: hover) {
  .tuile figcaption { opacity: 0; transition: opacity .15s ease; }
  .tuile a:hover figcaption, .tuile a:focus-visible figcaption { opacity: 1; }
}
.pastille {
  position: absolute; left: 8px; top: 8px;
  font-style: italic; font-weight: 700; font-size: 12px; color: var(--framboise);
}
.tuile .vide-image {
  width: 62%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  color: #fff; font-weight: 800; font-stretch: 75%; font-size: 15px; line-height: 1.1; padding: 12px;
  background: var(--couleur, var(--framboise));
}
.tuile.bientot .cadre { background: #fbf5fa; }

/* ---------- Fiche produit ---------- */
.fiche {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 1fr);
  gap: 36px;
  max-width: 1080px;
  margin: 8px auto 0;
}
.scene {
  position: relative;
  background: var(--tuile);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.scene > img { width: 86%; height: 86%; object-fit: contain; }
.scene .tour360 { width: 86%; height: 86%; }
.miniatures { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.miniatures button {
  width: 64px; height: 64px; padding: 4px; border: 1px solid transparent; background: var(--tuile); cursor: pointer;
}
.miniatures button[aria-pressed="true"] { border-color: var(--encre); }
.miniatures img { width: 100%; height: 100%; object-fit: contain; }
.miniatures .bouton-360 { width: auto; padding: 0 12px; font-weight: 700; font-size: 12px; }
.indice { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--doux); pointer-events: none; }

.infos-produit h1 { font-size: 18px; font-weight: 800; font-stretch: 80%; margin: 0 0 2px; line-height: 1.15; }
.infos-produit .sous-titre { color: var(--doux); margin: 0 0 14px; }
.infos-produit .prix { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.infos-produit .prix s { color: var(--doux); font-weight: 400; margin-left: 6px; }
.infos-produit .contenance { margin: 0 0 18px; color: var(--doux); }
.infos-produit .description { max-width: 46ch; margin: 0 0 20px; }
.achat { display: flex; gap: 8px; align-items: stretch; margin-bottom: 22px; flex-wrap: wrap; }
.achat select { border: 1px solid var(--encre); background: #fff; padding: 0 10px; height: 40px; }
.bouton {
  appearance: none; border: 0; cursor: pointer;
  background: var(--framboise); color: #fff; font-weight: 700; font-size: 13px;
  height: 40px; padding: 0 22px;
}
.bouton:hover { background: #b8155a; }
.bouton:disabled { background: var(--ligne); color: var(--doux); cursor: not-allowed; }
.bouton.secondaire { background: var(--encre); }
.etat-stock { flex-basis: 100%; margin: 0; font-style: italic; color: var(--framboise); font-weight: 700; }

details { border-top: 1px solid var(--ligne); }
details:last-of-type { border-bottom: 1px solid var(--ligne); }
summary { cursor: pointer; padding: 10px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--doux); }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 12px; max-width: 52ch; color: var(--encre); white-space: pre-line; }
.retour { display: inline-block; margin: 0 0 12px; color: var(--doux); }

/* ---------- Panier et formulaires ---------- */
.colonne { max-width: 760px; margin: 0 auto; }
.colonne h1 { font-size: 13px; font-weight: 700; margin: 6px 0 16px; }
.lignes-panier { list-style: none; padding: 0; margin: 0 0 18px; border-top: 1px solid var(--ligne); }
.ligne {
  display: grid; grid-template-columns: 72px 1fr auto auto; gap: 14px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--ligne);
}
.ligne .vignette { width: 72px; height: 72px; background: var(--tuile); display: grid; place-items: center; }
.ligne .vignette img { width: 86%; height: 86%; object-fit: contain; }
.ligne input { width: 56px; height: 32px; border: 1px solid var(--ligne); padding: 0 6px; }
.lien-discret { background: none; border: 0; padding: 0; color: var(--doux); text-decoration: underline; cursor: pointer; font-size: 12px; }
.total { display: flex; justify-content: space-between; font-weight: 800; font-size: 15px; margin: 0 0 26px; }
.formulaire { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.formulaire .large { grid-column: 1 / -1; }
.champ label { display: block; font-weight: 700; margin-bottom: 4px; }
.facultatif { font-weight: 400; color: var(--doux); }
.champ input, .champ textarea { width: 100%; border: 1px solid #d9ccd5; padding: 9px 10px; background: #fff; border-radius: 0; }
.champ input:focus, .champ textarea:focus { border-color: var(--encre); outline: none; box-shadow: 0 0 0 2px var(--tuile-survol); }
.champ [aria-invalid="true"] { border-color: var(--framboise); }
.champ-erreur { color: var(--framboise); font-size: 12px; margin: 4px 0 0; min-height: 0; }
.champ-erreur:empty { display: none; }
.champ-aide { color: var(--doux); font-size: 12px; margin: 0 0 4px; }
.piege { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.message-form { grid-column: 1 / -1; margin: 0; font-weight: 700; color: var(--framboise); }
.message-form:empty { display: none; }
.vide-panier { color: var(--doux); }
.confirmation { background: var(--tuile); padding: 22px; }
.confirmation h2 { font-size: 18px; font-stretch: 80%; margin: 0 0 6px; }
.confirmation .ref { font-size: 22px; font-weight: 800; letter-spacing: .04em; margin: 6px 0 12px; }

.texte-infos { max-width: 60ch; white-space: pre-line; }
.chargement { color: var(--doux); }

.pied { padding: 26px var(--marge) 30px; color: var(--doux); font-size: 12px; border-top: 1px solid var(--ligne); }
.rubriques { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-bottom: 16px; }
.rubriques a { color: var(--encre); font-weight: 700; font-size: 12px; letter-spacing: .04em; padding: 6px 0; }
.rubriques a[aria-current="page"] { color: var(--framboise); }
.pied-bas { display: flex; gap: 6px 20px; flex-wrap: wrap; }
.pied p { margin: 0; }
.page-accueil .pied { border-top: 0; }

/* Pages du pied de page */
.colonne .titre-page, .page-texte h1 { font-size: 15px; font-weight: 800; letter-spacing: .04em; margin: 6px 0 20px; }
.colonne h2 { font-size: 13px; font-weight: 700; margin: 22px 0 8px; }
.illustrations { min-height: 120px; }

.annonce {
  position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 140%);
  background: var(--encre); color: #fff; padding: 10px 16px; font-weight: 700;
  visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s;
}
.annonce.visible { transform: translate(-50%, 0); visibility: visible; transition: transform .25s ease; }

/* Rotation 360° */
.tour360 { position: relative; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.tour360.saisi { cursor: grabbing; }
.tour360 img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; visibility: hidden; pointer-events: none; }
.tour360 img.visible { visibility: visible; }

@media (max-width: 760px) {
  .tampon img { width: 56px; }
  .accueil { min-height: calc(100svh - 300px); }
  .rubriques { flex-direction: column; gap: 0; }
  .grille { grid-template-columns: repeat(2, 1fr); gap: 18px 10px; }
  .fiche { grid-template-columns: 1fr; gap: 20px; }
  .formulaire { grid-template-columns: 1fr; }
  .ligne { grid-template-columns: 56px 1fr auto; }
  .ligne .vignette { width: 56px; height: 56px; }
  .ligne .prix-ligne { grid-column: 2 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
