/* ferrandier — structure : planches de catalogue, filets 1 px, aucune ombre, aucun rayon. */
*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; background: var(--brume); }
body { margin: 0; background: var(--brume); color: var(--encre); font-family: var(--police); font-weight: 400; font-size: var(--t-corps); line-height: 1.6; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
h1, h2, h3 { font-family: var(--police-titre); font-weight: 500; line-height: 1.1; letter-spacing: 0; margin: 0; text-wrap: balance; }
h1 { font-size: var(--t-1); }
h2 { font-size: var(--t-2); margin-bottom: var(--e-4); }
h3 { font-size: 1.5rem; font-weight: 500; line-height: 1.2; }
p { margin: 0 0 var(--e-2); max-width: 62ch; }
b, strong { font-weight: 600; }
.ref, .qte { font-family: var(--police-mono); font-size: .84em; font-variant-numeric: tabular-nums; letter-spacing: 0; }
::selection { background: var(--encre); color: var(--brume); }
:focus-visible { outline: 2px solid var(--encre); outline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
input { caret-color: var(--encre); }
.contenu { width: min(100%, var(--largeur-max)); margin-inline: auto; padding-inline: var(--gouttiere); }
.lien-saut { position: absolute; left: -999px; top: 8px; background: var(--encre); color: var(--brume); padding: 8px 12px; }
.lien-saut:focus { left: 8px; z-index: 60; }
::-webkit-scrollbar { width: 12px; height: 12px; } ::-webkit-scrollbar-track { background: var(--brume); } ::-webkit-scrollbar-thumb { background: var(--filet); border: 3px solid var(--brume); }

/* en-tête */
.entete { position: sticky; top: 0; z-index: 30; background: var(--brume); border-bottom: 1px solid var(--encre); }
.entete .contenu { display: flex; align-items: center; justify-content: space-between; gap: var(--e-3); min-height: 64px; }
.marque { text-decoration: none; font-family: var(--police-titre); font-size: 1.6rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; line-height: 1.3; display: inline-flex; align-items: baseline; gap: 12px; }
.marque small { font-family: var(--police); font-weight: 400; font-size: .78rem; letter-spacing: .02em; text-transform: none; color: var(--gris); display: none; }
.menu { display: none; gap: var(--e-3); align-items: center; margin: 0; padding: 0; list-style: none; }
.menu a { text-decoration: none; font-size: var(--t-petit); padding: 6px 0; border-bottom: 1px solid transparent; transition: border-color var(--duree-clic) linear; }
.menu a:hover, .menu a[aria-current] { border-color: var(--encre); }
.droite { display: flex; align-items: center; gap: var(--e-2); }
.bascule { display: inline-flex; border: 1px solid var(--encre); }
.bascule button { background: none; border: 0; padding: 7px 12px; min-height: 36px; font-size: .875rem; transition: background-color var(--duree-clic) linear, color var(--duree-clic) linear; }
.bascule button[aria-pressed="true"] { background: var(--encre); color: var(--brume); }
.panier-lien { display: inline-flex; gap: 8px; align-items: center; text-decoration: none; border: 1px solid var(--encre); padding: 7px 14px; min-height: 40px; font-size: var(--t-petit); transition: background-color var(--duree-clic) linear, color var(--duree-clic) linear; }
.panier-lien:hover { background: var(--encre); color: var(--brume); }
.panier-lien .nb { font-family: var(--police-mono); font-size: .85rem; }
.panier-lien.tape .nb { animation: tape 300ms var(--ease-sortie); }
.panier-lien.tape { animation: tape-fond 700ms var(--ease-sortie); }
@keyframes tape-fond { from { background: var(--encre); color: var(--brume); } }
@keyframes tape { 40% { transform: translateY(-6px) scale(1.3); } }
.menu-bouton { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--encre); padding: 8px 12px; min-height: 40px; font-size: var(--t-petit); }
.menu-bouton svg { width: 18px; height: 18px; }
.menu-mobile { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 200ms var(--ease-sortie); background: var(--brume); }
.menu-mobile[data-ouvert] { grid-template-rows: 1fr; border-bottom: 1px solid var(--encre); }
.menu-mobile > div { overflow: hidden; }
.menu-mobile ul { margin: 0; padding: var(--e-2) var(--gouttiere) var(--e-3); list-style: none; }
.menu-mobile a { display: block; padding: 14px 0; text-decoration: none; font-size: 1.2rem; border-bottom: 1px solid var(--acier); }

/* boutons */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 24px; border: 1px solid var(--encre); background: var(--encre); color: var(--brume); font-weight: 400; font-size: 1rem; text-decoration: none; transition: background-color var(--duree-clic) linear, color var(--duree-clic) linear, transform var(--duree-clic) linear; }
.bouton:hover { background: var(--brume); color: var(--encre); }
.bouton:active { transform: translateY(1px); }
.bouton-second { background: transparent; color: var(--encre); }
.bouton-second:hover { background: var(--encre); color: var(--brume); }
.bouton[disabled] { opacity: .45; cursor: not-allowed; }
.bouton svg { width: 18px; height: 18px; }

/* accueil : premier écran — titre, commande rapide préremplie et règle graduée des paliers (le repère de la page) */
.hero { padding-top: var(--e-6); }
.hero-grille { display: grid; gap: var(--e-2); grid-template-areas: "titre" "regle" "chapo" "rapide"; }
.hero h1 { grid-area: titre; max-width: 22ch; font-size: clamp(2.4rem, 1rem + 3.9vw, 4.7rem); }
.hero .chapo { grid-area: chapo; font-size: 1.05rem; max-width: 52ch; margin: 0; }
.rapide { grid-area: rapide; border: 1px solid var(--encre); background: #fff; padding: var(--e-3); }
.rapide h2 { font-size: 1.5rem; margin-bottom: var(--e-2); }
.rapide form { display: grid; grid-template-columns: 1fr 88px; gap: var(--e-1); }
.rapide label { display: grid; gap: 4px; font-size: .8125rem; color: var(--gris); }
.rapide input { padding: 11px 12px; border: 1px solid var(--filet); background: var(--brume); min-height: 48px; width: 100%; font-family: var(--police-mono); font-size: .95rem; font-weight: 400; }
.rapide input:focus { outline: none; border-color: var(--encre); }
.rapide button { grid-column: 1 / -1; }
.rapide .retour { margin: var(--e-2) 0 0; min-height: 3.2em; font-size: var(--t-petit); }

/* règle graduée : l'axe des boîtes, de 0 à 25, avec les trois paliers de prix et le curseur de la quantité saisie */
.regle { grid-area: regle; padding-top: 34px; user-select: none; }
.regle-corps { position: relative; }
.regle-zones { display: grid; grid-template-columns: 4% 16% 60% 20%; border-top: 1px solid var(--encre); }
.regle-zones > div:first-child { border-left: 0; padding: 0; }
.regle-zones > div { padding: 10px 0 12px 6px; border-left: 1px solid var(--encre); transition: background-color var(--duree-clic) linear; min-width: 0; }
.regle-zones > div.actif { background: var(--acier); }
.regle-zones .pz { display: block; font-family: var(--police-titre); font-weight: 500; font-size: clamp(1.2rem, .9rem + 1.5vw, 2.4rem); line-height: 1.2; font-variant-numeric: tabular-nums; }
.regle-zones .pz::after { content: "\00a0€"; font-size: .55em; display: none; }
@media (min-width: 700px) { .regle-zones .pz::after { display: inline; } }
.regle-zones .bornes { display: block; font-family: var(--police-mono); font-size: .75rem; color: var(--gris); }
.regle-echelle { position: relative; height: 34px; border-bottom: 1px solid var(--encre); border-right: 1px solid var(--encre); cursor: pointer;
  background: linear-gradient(to right, var(--encre) 1px, transparent 1px) 0 0 / 4% 11px repeat-x; }
.regle-echelle::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to right, var(--encre) 1px, transparent 1px) 0 0 / 20% 24px repeat-x; }
.regle-nombres { position: relative; height: 22px; font-family: var(--police-mono); font-size: .75rem; color: var(--gris); }
.regle-nombres span { position: absolute; top: 4px; transform: translateX(-50%); }
.regle-nombres span:first-child { transform: none; }
.regle-nombres span:last-child { transform: translateX(-100%); }
.regle-legende { margin: 2px 0 0; font-size: .8125rem; color: var(--gris); }
.curseur { position: absolute; left: var(--pos, 20%); top: -26px; bottom: 0; width: 0; border-left: 2px solid var(--encre); transition: left 220ms var(--ease-sortie); pointer-events: none; }
.curseur b { position: absolute; top: 0; left: 0; transform: translateX(-50%); background: var(--encre); color: var(--brume); font-family: var(--police-mono); font-weight: 400; font-size: .8125rem; padding: 2px 8px; white-space: nowrap; }

/* rayons : une ligne par rayon, prix du dernier palier */
.rayons-grille { display: grid; gap: var(--e-6); align-items: start; }
.rayons-liste { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--encre); }
.rayons-liste a { display: grid; grid-template-columns: 1fr auto; gap: 4px var(--e-2); padding: 20px 8px 20px 0; border-bottom: 1px solid var(--filet); text-decoration: none; transition: background-color var(--duree-clic) linear, padding-left var(--duree-clic) linear; }
.rayons-liste a:hover { background: var(--acier); padding-left: 12px; }
.rayons-liste .r-nom { font-family: var(--police-titre); font-weight: 500; font-size: 1.7rem; line-height: 1.2; }
.rayons-liste .r-refs { grid-column: 1; color: var(--gris); font-size: var(--t-petit); }
.rayons-liste .r-prix { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; font-size: var(--t-petit); white-space: nowrap; }
.rayons-liste .r-prix b { display: block; font-family: var(--police-titre); font-weight: 500; font-size: 1.5rem; line-height: 1.2; }
.rayons-fig { margin: 0 calc(var(--gouttiere) * -1); position: relative; background: var(--acier); }
.rayons-fig img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: var(--cadrage, 50% 30%); }
.rayons-fig figcaption { position: absolute; left: var(--gouttiere); bottom: 12px; background: var(--brume); border: 1px solid var(--encre); padding: 5px 10px; font-size: .8125rem; }
.titre-section { display: flex; justify-content: space-between; align-items: end; gap: var(--e-3); margin-bottom: var(--e-4); flex-wrap: wrap; }
.titre-section h2 { margin: 0; }
.section { padding-block: var(--e-section); }

/* bandeau sombre : engagements */
.sombre { background: var(--carbone); color: var(--brume); }
.sombre .gris { color: var(--gris-clair); }
.engage { display: grid; gap: var(--e-6); }
.engage dl { margin: 0; border-top: 1px solid #4a4950; }
.engage dl > div { display: grid; grid-template-columns: 120px 1fr; gap: var(--e-2); padding: 18px 0; border-bottom: 1px solid #4a4950; align-items: baseline; }
.engage dt { font-family: var(--police-mono); font-size: .9rem; }
.engage dd { margin: 0; }
.engage dd b { display: block; font-size: 1.15rem; font-weight: 500; }
.engage dd span { color: var(--gris-clair); font-size: var(--t-petit); }
.engage .gerant { margin: 0; }
.engage .gerant img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: var(--cadrage, 50% 30%); background: #25242a; max-width: 460px; }
.engage .gerant figcaption { padding-top: 10px; font-size: var(--t-petit); color: var(--gris-clair); }

/* tableaux (catégorie, panier, paliers) */
.table-wrap { overflow-x: auto; }
table.cat { width: 100%; border-collapse: collapse; font-size: var(--t-petit); border-top: 1px solid var(--encre); }
table.cat th, table.cat td { padding: 14px 12px 14px 0; text-align: left; border-bottom: 1px solid var(--filet); vertical-align: middle; }
table.cat thead th { font-weight: 400; color: var(--gris); font-size: .875rem; border-bottom-color: var(--encre); }
table.cat tbody tr { transition: background-color var(--duree-clic) linear; }
table.cat tbody tr:hover, table.cat tbody tr.ajoute { background: var(--acier); }
table.cat td.prix, table.cat th.prix { text-align: right; white-space: nowrap; }
table.cat .nom a { text-decoration: none; }
table.cat .nom a:hover { text-decoration: underline; }
table.cat .nom b { font-weight: 400; font-size: 1.02rem; }
table.cat .cond { color: var(--gris); display: block; font-size: .875rem; }
.stock { display: inline-flex; align-items: center; gap: 7px; font-size: .875rem; white-space: nowrap; }
.stock::before { content: ""; width: 9px; height: 9px; background: var(--encre); flex: none; }
.stock.rupture::before { background: transparent; border: 1px solid var(--encre); }
.qte-champ { display: inline-flex; border: 1px solid var(--encre); background: #fff; }
.qte-champ button { width: 38px; min-height: 40px; background: none; border: 0; font-size: 1.2rem; line-height: 1; transition: background-color var(--duree-clic) linear; }
.qte-champ button:hover { background: var(--acier); }
.qte-champ input { width: 52px; text-align: center; border: 0; border-inline: 1px solid var(--encre); background: transparent; font-family: var(--police-mono); font-size: .95rem; min-height: 40px; -moz-appearance: textfield; }
.qte-champ input::-webkit-outer-spin-button, .qte-champ input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mini { min-height: 40px; padding: 8px 14px; font-size: .9rem; }
.m-cache { display: none; }
.note { color: var(--gris); font-size: var(--t-petit); }

/* fiche produit */
.fil { font-size: .875rem; color: var(--gris); padding-block: var(--e-3) 0; }
.fil a { text-decoration-color: var(--filet); }
.fiche { display: grid; gap: var(--e-6); padding-block: var(--e-4) var(--e-section); }
.fiche-photo { margin: 0 calc(var(--gouttiere) * -1); background: var(--brume); border-block: 1px solid var(--encre); }
.fiche-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--acier); }
.fiche h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); margin-bottom: var(--e-2); }
.fiche .detail { color: var(--gris); }
.variantes { display: flex; flex-wrap: wrap; gap: var(--e-1); margin: var(--e-1) 0 var(--e-3); padding: 0; border: 0; }
.variantes legend { padding: 0; margin-bottom: 8px; font-size: .875rem; color: var(--gris); }
.variantes label { position: relative; }
.variantes input { position: absolute; opacity: 0; inset: 0; }
.variantes span { display: block; border: 1px solid var(--encre); padding: 10px 14px; min-height: 44px; font-family: var(--police-mono); font-size: .88rem; background: #fff; transition: background-color var(--duree-clic) linear, color var(--duree-clic) linear; cursor: pointer; }
.variantes input:checked + span { background: var(--encre); color: var(--brume); }
.variantes input:focus-visible + span { outline: 2px solid var(--encre); outline-offset: 3px; }
.variantes input:disabled + span { color: var(--gris); text-decoration: line-through; cursor: not-allowed; background: var(--acier); }
.paliers { width: 100%; border-collapse: collapse; margin: var(--e-2) 0 var(--e-3); font-size: var(--t-petit); }
.paliers th, .paliers td { padding: 10px 12px 10px 0; text-align: left; border-bottom: 1px solid var(--filet); }
.paliers thead th { font-weight: 400; color: var(--gris); font-size: .875rem; border-bottom-color: var(--encre); }
.paliers tr { transition: background-color var(--duree-clic) linear; }
.paliers tr.actif { background: var(--acier); }
.paliers td:last-child, .paliers th:last-child { text-align: right; padding-right: 8px; }
.paliers td:first-child { padding-left: 8px; } .paliers th:first-child { padding-left: 8px; }
.achat { display: flex; flex-wrap: wrap; gap: var(--e-2); align-items: center; margin-bottom: var(--e-2); }
.total-ligne { font-size: 1.1rem; margin: var(--e-2) 0; }
.livraison-fiche { border: 1px solid var(--encre); padding: var(--e-2) var(--e-3); margin-top: var(--e-3); font-size: var(--t-petit); background: #fff; }
.livraison-fiche p { margin: 0 0 6px; }
.specs { border-top: 1px solid var(--encre); margin: var(--e-6) 0 0; }
.specs div { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--e-2); padding: 12px 0; border-bottom: 1px solid var(--filet); font-size: var(--t-petit); }
.specs dt { color: var(--gris); } .specs dd { margin: 0; }

/* panier */
.panier-vide { padding: var(--e-6) 0; }
.recap { border: 1px solid var(--encre); background: #fff; padding: var(--e-3); }
.recap dl { margin: 0 0 var(--e-3); }
.recap dl div { display: flex; justify-content: space-between; gap: var(--e-2); padding: 8px 0; border-bottom: 1px solid var(--acier); font-size: var(--t-petit); }
.recap dl div.total { border-bottom: 0; border-top: 1px solid var(--encre); margin-top: 6px; padding-top: 14px; font-size: 1.25rem; }
.franco { margin-bottom: var(--e-3); font-size: var(--t-petit); }
.franco .barre { height: 6px; border: 1px solid var(--encre); margin-top: 8px; background: #fff; }
.franco .barre i { display: block; height: 100%; background: var(--encre); width: 0; transition: width 300ms var(--ease-sortie); }
.panier-grille { display: grid; gap: var(--e-6); padding-block: var(--e-4) var(--e-section); }
.ligne-supp { background: none; border: 0; padding: 6px 0; text-decoration: underline; text-underline-offset: .2em; font-size: .875rem; color: var(--gris); min-height: 40px; }
.ligne-supp:hover { color: var(--encre); }
.confirmation { border: 1px solid var(--encre); background: #fff; padding: var(--e-4); max-width: 640px; margin-block: var(--e-4); }
.confirmation .ref { font-size: 1rem; }
.legal { font-size: .8125rem; color: var(--gris); max-width: 52ch; margin-top: var(--e-2); }

/* catégorie : barre d'outils */
.entete-page { padding-block: var(--e-6) var(--e-4); }
.entete-page h1 { font-size: clamp(2.2rem, 1.2rem + 4vw, 4.2rem); }
.rayons { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--e-3) 0 0; padding: 0; list-style: none; }
.rayons li { border: 1px solid var(--filet); padding: 8px 14px; font-size: .9rem; color: var(--gris); }
.rayons li[aria-current] { border-color: var(--encre); color: var(--encre); }

.pied { background: var(--carbone); color: var(--brume); padding-block: var(--e-6); font-size: var(--t-petit); }
.pied .contenu { display: grid; gap: var(--e-3); }
.pied p { margin: 0 0 6px; color: var(--gris-clair); } .pied p b { color: var(--brume); }
.pied a { text-decoration-color: #77767c; }

@media (min-width: 700px) {
  .marque small { display: inline; }
  .menu { display: flex; }
  .menu-bouton, .menu-mobile { display: none; }
  .m-cache { display: table-cell; }
  .engage dl > div { grid-template-columns: 160px 1fr; }
}
@media (min-width: 960px) {
  .hero-grille { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--e-8); row-gap: var(--e-4); grid-template-areas: "titre rapide" "chapo rapide" "regle regle"; align-items: start; }
  .hero { padding-top: var(--e-4); }
  .rayons-grille { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--e-8); }
  .rayons-fig { margin: 0; position: sticky; top: 96px; }
  .rayons-fig figcaption { left: 12px; }
  .engage { grid-template-columns: 1.3fr .7fr; gap: var(--e-8); align-items: start; }
  .fiche { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--e-8); align-items: start; padding-top: var(--e-6); }
  .fiche-photo { margin: 0; border: 1px solid var(--encre); position: sticky; top: 96px; }
  .panier-grille { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: var(--e-8); align-items: start; }
  .recap { position: sticky; top: 96px; }
}
.ico-panier { width: 18px; height: 18px; }
@media (max-width: 479px) {
  .marque { font-size: 1.05rem; letter-spacing: .06em; }
  .entete .contenu { gap: 8px; }
  .panier-lien, .menu-bouton { padding-inline: 10px; }
  .droite { gap: 8px; }
  .menu-bouton .libelle, .panier-lien .txt { display: none; }
  .bascule button { padding: 7px 9px; }
}

/* panier sur mobile : chaque ligne devient une fiche */
@media (max-width: 699px) {
  #lignes tr { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 16px 0; border-bottom: 1px solid var(--filet); align-items: center; }
  #lignes td { padding: 0; border: 0; display: block; }
  #lignes td:first-child { grid-column: 1 / -1; }
  #lignes td.prix { text-align: right; }
  #lignes td:nth-child(4) { grid-column: 1 / -1; }
  #plein thead { display: none; }
  #plein table.cat { border-top: 1px solid var(--encre); }
}
