/* =========================================================
   Atelier Filament — feuille de style unique
   Principe : l'interface est achromatique, la couleur vient
   uniquement des produits (pastilles de filament + photos).
   ========================================================= */

:root {
  --bg:          #EDEEF0;
  --surface:     #FFFFFF;
  --ink:         #15171B;
  --muted:       #6A7079;
  --line:        #D8DBE0;
  --line-fort:   #B4BAC2;

  --vert:        #2E7D52;   /* statut : disponible */
  --ambre:       #9A6B15;   /* statut : sur commande */

  --pad:         clamp(1.25rem, 4vw, 3.5rem);
  --max:         1320px;

  --t-fast:      .15s ease;
}

/* ---------- Réinitialisation ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Trame ---------- */

.shell {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- Titrage ---------- */
/* Une seule famille, deux rôles : étendu/serré en titrage,
   largeur normale en lecture courante. */

.titre-xl, .titre-l, .titre-m, .titre-s {
  font-variation-settings: "wdth" 118;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1;
  margin: 0;
  text-wrap: balance;
}

.titre-xl { font-size: clamp(2.5rem, 7.5vw, 5rem); line-height: .95; }
.titre-l  { font-size: clamp(1.8rem, 3.6vw, 2.75rem); }
.titre-m  { font-size: clamp(1.3rem, 2.2vw, 1.6rem); letter-spacing: -.02em; }
.titre-s  { font-size: 1.0625rem; letter-spacing: -.012em; font-weight: 650;
            font-variation-settings: "wdth" 108; }

.plomb {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--muted);
  max-width: 46ch;
  margin: 1.25rem 0 0;
}

/* ---------- En-tête ---------- */

.entete {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.entete__in {
  display: flex; align-items: baseline; gap: 1.5rem;
  min-height: 64px; padding-block: .9rem;
}

.marque {
  font-variation-settings: "wdth" 120;
  font-weight: 700; font-size: 1.0625rem;
  letter-spacing: -.02em;
}
.marque:hover { text-decoration: none; }
.marque span { color: var(--muted); font-weight: 400; font-variation-settings: "wdth" 100; }

.nav { margin-left: auto; display: flex; gap: 1.5rem; font-size: .9375rem; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 2px; }

@media (max-width: 560px) {
  .marque span { display: none; }
  .nav { gap: 1.1rem; }
}

/* ---------- Héros ---------- */

.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 4vw, 3rem); }

.hero__grille {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: end;
}
@media (max-width: 860px) { .hero__grille { grid-template-columns: 1fr; align-items: start; } }

/* Fiche technique de l'atelier : une vraie liste de définitions */
.specs { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--ink); }
.specs > div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .7rem 0; border-bottom: 1px solid var(--line);
  font-size: .9375rem;
}
.specs dt { color: var(--muted); margin: 0; }
.specs dd { margin: 0; text-align: right; font-weight: 550; }

/* Bande de nuancier : le seul moment animé de la page */
.nuancier {
  margin-top: clamp(2rem, 5vw, 3rem);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}
.nuancier__bande { display: flex; height: 56px; }
.nuancier__bande i {
  flex: 1 1 0; display: block;
  transform: scaleY(0); transform-origin: bottom;
  animation: pousse .5s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes pousse { to { transform: scaleY(1); } }

.nuancier__pied {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .6rem .85rem; border-top: 1px solid var(--line);
  font-size: .8125rem; color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .nuancier__bande i { animation: none; transform: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Filtres ---------- */

.filtres {
  position: sticky; top: 64px; z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-block: .75rem;
}

.rangee {
  display: flex; gap: .5rem; overflow-x: auto;
  scrollbar-width: none; padding-bottom: 2px;
}
.rangee::-webkit-scrollbar { display: none; }

.puce {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .45rem .9rem;
  border: 1px solid var(--line-fort); border-radius: 999px;
  background: transparent; cursor: pointer;
  font-size: .9375rem; white-space: nowrap;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.puce:hover { border-color: var(--ink); text-decoration: none; }
.puce[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.puce b { font-weight: 500; opacity: .55; font-variant-numeric: tabular-nums; }

.rangee--themes { margin-top: .5rem; }
.rangee--themes .puce { font-size: .875rem; padding: .3rem .75rem; border-style: dashed; }
.rangee--themes .puce[aria-pressed="true"] { border-style: solid; }

/* ---------- Galerie ---------- */

.galerie-tete {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding-block: clamp(1.75rem, 4vw, 2.75rem) 1.25rem;
}
.compte { color: var(--muted); font-size: .9375rem; font-variant-numeric: tabular-nums; }

.grille {
  display: grid; gap: clamp(1.75rem, 3vw, 2.5rem) clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  padding-bottom: clamp(3rem, 7vw, 5rem);
  list-style: none; margin: 0; padding-inline: 0;
}

/* Pas de carte : le visuel pose sur le fond, le texte vit dessous. */
.item a { display: block; }
.item a:hover { text-decoration: none; }

.item__vue {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.item__vue img { width: 100%; height: 100%; object-fit: cover; }
.item a:hover .item__vue { border-color: var(--line-fort); }
.item a:hover .item__nom { text-decoration: underline; text-underline-offset: .2em; }

.etiquette {
  position: absolute; left: .5rem; top: .5rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 3px; padding: .15rem .45rem;
  font-size: .75rem; color: var(--muted);
}

.item__corps { padding-top: .7rem; display: grid; gap: .3rem; }
.item__ligne { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.prix { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.item__meta { color: var(--muted); font-size: .875rem; }

/* Pastilles de couleur */
.pastilles { display: flex; align-items: center; gap: .3rem; margin-top: .15rem; }
.pastille {
  width: 13px; height: 13px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.22);
}
.pastilles small { color: var(--muted); font-size: .8125rem; margin-left: .15rem; }

/* ---------- État vide ---------- */

.vide {
  border: 1px dashed var(--line-fort); border-radius: 6px;
  padding: clamp(2rem, 5vw, 3.5rem); text-align: center;
  margin-bottom: 4rem;
}
.vide p { color: var(--muted); margin: .5rem auto 1.5rem; max-width: 44ch; }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.4rem; border-radius: 6px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--surface);
  font-size: .9375rem; font-weight: 550; cursor: pointer;
  transition: opacity var(--t-fast);
}
.btn:hover { opacity: .86; text-decoration: none; }
.btn--vide { background: transparent; color: var(--ink); }
.btn--vide:hover { background: var(--surface); opacity: 1; }

/* ---------- Fiche produit ---------- */

.fil { padding-block: 1.25rem .5rem; font-size: .875rem; color: var(--muted); }
.fil a:hover { color: var(--ink); }

.fiche {
  display: grid; gap: clamp(1.75rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  padding-block: 1rem clamp(3rem, 7vw, 5rem);
  align-items: start;
}
@media (max-width: 900px) { .fiche { grid-template-columns: 1fr; } }

.visuel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 4px; overflow: hidden; aspect-ratio: 4 / 3;
}
.visuel img { width: 100%; height: 100%; object-fit: cover; }

.vignettes { display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
.vignettes button {
  width: 68px; aspect-ratio: 1; padding: 0; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 3px; overflow: hidden;
}
.vignettes button[aria-current="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.vignettes img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 901px) { .fiche__infos { position: sticky; top: 96px; } }

.statut { display: inline-flex; align-items: center; gap: .45rem; font-size: .875rem; }
.statut::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.statut--dispo { color: var(--vert); }
.statut--commande { color: var(--ambre); }

.prix-gros {
  font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums;
  font-variation-settings: "wdth" 112; letter-spacing: -.02em;
}

.bloc { margin-top: 1.75rem; }
.bloc > h2 { font-size: .9375rem; font-weight: 600; margin: 0 0 .6rem; }
.bloc p { margin: 0; color: var(--muted); max-width: 60ch; }

/* Choix de couleur */
.choix { display: flex; flex-wrap: wrap; gap: .5rem; }
.choix button {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .35rem .7rem .35rem .4rem;
  border: 1px solid var(--line-fort); border-radius: 999px;
  background: transparent; cursor: pointer; font-size: .875rem;
  transition: border-color var(--t-fast);
}
.choix button:hover { border-color: var(--ink); }
.choix button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choix i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.22); }

.liste-nue { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.liste-nue li { margin-bottom: .3rem; }

.actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.note { margin-top: .9rem; font-size: .8125rem; color: var(--muted); max-width: 44ch; }

/* ---------- À propos ---------- */

.prose { max-width: 68ch; padding-block: clamp(2rem, 5vw, 3.5rem); }
.prose h2 { font-size: 1.25rem; margin: 2.5rem 0 .6rem; font-variation-settings: "wdth" 110; letter-spacing: -.015em; }
.prose p { color: #3C4249; margin: 0 0 1rem; }
.prose ul { color: #3C4249; padding-left: 1.1rem; }
.prose li { margin-bottom: .4rem; }

/* ---------- Suite du catalogue ---------- */

.suite { border-top: 1px solid var(--line); padding-block: clamp(2rem, 5vw, 3.5rem) 4rem; }
.suite h2 { margin: 0 0 1.25rem; }

/* ---------- Pied ---------- */

.pied {
  border-top: 1px solid var(--line);
  padding-block: 2.25rem 3rem;
  font-size: .875rem; color: var(--muted);
}
.pied__in { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.pied a:hover { color: var(--ink); }
