/* ╔══════════════════════════════════════════════════════════════╗
   ║   TRAITEUR — css/site.css                                    ║
   ║   Feuille unique du site public. Aucune bibliothèque,        ║
   ║   aucune police distante : la CSP du site est 'self'.        ║
   ╚══════════════════════════════════════════════════════════════╝
   Écrite en « mobile d'abord » : tout ce qui suit vaut à 375 px, et les
   media queries n'ajoutent que ce qu'un grand écran permet en plus.
   Les couleurs de la charte sont posées par le PHP dans un <style> en
   ligne (--principale, --secondaire, --fond) : ici, des valeurs de repli. */

:root {
  --principale: #7a4a2f;
  --secondaire: #c98a3f;
  --fond: #fbf6ef;

  --encre: #241a13;
  --encre-douce: #6d5c4b;
  --blanc: #ffffff;
  --trait: #e9ded0;
  --trait-fort: #d8c8b4;
  --succes: #2f6d4f;
  --alerte: #a33a28;
  --promo: #b3341f;

  --rayon: 14px;
  --rayon-s: 9px;
  --ombre: 0 1px 2px rgba(58, 38, 20, .06), 0 8px 24px rgba(58, 38, 20, .07);
  --ombre-forte: 0 2px 6px rgba(58, 38, 20, .1), 0 18px 40px rgba(58, 38, 20, .13);
  --gouttiere: 16px;
  --large: 1180px;
}

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

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

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 16px/1.62 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "kern" 1;
  overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.012em; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
a { color: var(--principale); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--secondaire); }
img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--trait); margin: 28px 0; }
small, .petit { font-size: .85rem; }
.doux { color: var(--encre-douce); }
.gras { font-weight: 700; }
.centre { text-align: center; }

.masque {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

.contenu { width: 100%; max-width: var(--large); margin: 0 auto; padding: 0 var(--gouttiere); }
.section { padding: 34px 0; }
.section--claire { background: var(--blanc); }
.section__titre { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.section__titre h2 { margin: 0; }
.section__titre p { margin: 0; color: var(--encre-douce); font-size: .92rem; }

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

.entete {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--trait);
}
.entete__interieur {
  display: flex; align-items: center; gap: 10px;
  min-height: 60px;
}
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; margin-right: auto; min-width: 0; }
.marque__pastille {
  width: 38px; height: 38px; flex: none; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--principale), var(--secondaire));
  color: #fff; font-weight: 700; font-size: 1.05rem;
}
.marque__nom { font-weight: 700; font-size: 1.02rem; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marque__sous { display: block; font-weight: 400; font-size: .74rem; color: var(--encre-douce);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav { display: none; gap: 4px; align-items: center; }
.nav a {
  padding: 8px 11px; border-radius: 999px; text-decoration: none;
  color: var(--encre-douce); font-size: .93rem; font-weight: 600; white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--fond); color: var(--principale); }

.entete__actions { display: flex; align-items: center; gap: 8px; }

/* Bouton panier avec sa pastille de comptage */
.lien-panier {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 999px; border: 1px solid var(--trait-fort);
  background: var(--blanc); color: var(--encre); text-decoration: none;
  font-weight: 600; font-size: .9rem;
}
.lien-panier:hover { border-color: var(--secondaire); color: var(--principale); }
.lien-panier__n {
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--principale); color: #fff; font-size: .74rem; font-weight: 700;
  display: none; place-items: center; line-height: 20px; text-align: center;
}
.lien-panier__n.visible { display: inline-block; }

.menu-bascule {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 1px solid var(--trait-fort); border-radius: 11px; background: var(--blanc);
  cursor: pointer; font-size: 1.1rem; color: var(--encre);
}
.nav-mobile { display: none; border-top: 1px solid var(--trait); background: var(--blanc); }
.nav-mobile.ouvert { display: block; }
.nav-mobile a {
  display: block; padding: 13px var(--gouttiere); text-decoration: none;
  color: var(--encre); font-weight: 600; border-bottom: 1px solid var(--trait);
}
.nav-mobile a:last-child { border-bottom: 0; }

@media (min-width: 880px) {
  .nav { display: flex; }
  .menu-bascule { display: none; }
  .nav-mobile { display: none !important; }
  .entete__interieur { min-height: 70px; gap: 16px; }
}

/* ─────────────────────────── Boutons ─────────────────────────── */

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  background: var(--principale); color: #fff; font: inherit; font-weight: 700; font-size: .95rem;
  text-decoration: none; cursor: pointer; text-align: center;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.bouton:hover { color: #fff; background: #633b25; box-shadow: var(--ombre); }
.bouton:active { transform: translateY(1px); }
.bouton--clair { background: var(--blanc); color: var(--principale); border-color: var(--trait-fort); }
.bouton--clair:hover { background: var(--fond); color: var(--principale); border-color: var(--secondaire); }
.bouton--or { background: var(--secondaire); }
.bouton--or:hover { background: #b4762f; }
.bouton--petit { padding: 8px 14px; font-size: .87rem; }
.bouton--large { width: 100%; }
.bouton--danger { background: var(--blanc); color: var(--alerte); border-color: #e7c4bc; }
.bouton--danger:hover { background: #fdf1ee; color: var(--alerte); }
.bouton[disabled], .bouton[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.boutons { display: flex; flex-wrap: wrap; gap: 10px; }

.lien-nu { background: none; border: 0; padding: 0; font: inherit; color: var(--principale); cursor: pointer; text-decoration: underline; }

/* ─────────────────────────── Bannière ─────────────────────────── */

.banniere { position: relative; color: #fff; overflow: hidden; background: linear-gradient(145deg, var(--principale), var(--secondaire)); }
.banniere::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 85% 0%, rgba(255, 255, 255, .22), transparent 60%);
  pointer-events: none;
}
.banniere__photo { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .38; }
/* .banniere__interieur se pose SUR .contenu : n'écrire ici que le padding
   vertical, sinon la gouttière latérale de .contenu saute et le titre colle
   au bord de l'écran sur téléphone. */
.banniere__interieur { position: relative; z-index: 1; padding-top: 46px; padding-bottom: 40px; max-width: 752px; }
.banniere h1 { color: #fff; font-size: 2rem; text-shadow: 0 1px 24px rgba(0, 0, 0, .22); }
.banniere__slogan { font-size: 1.08rem; opacity: .95; margin-bottom: 20px; }
.banniere__meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.banniere__meta li {
  background: rgba(255, 255, 255, .17); border: 1px solid rgba(255, 255, 255, .28);
  padding: 5px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600;
}
.banniere .bouton--clair { background: #fff; }

@media (min-width: 760px) {
  .banniere__interieur { padding-top: 70px; padding-bottom: 62px; }
  .banniere h1 { font-size: 2.7rem; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.7rem; }
}

/* ─────────────────────── Vignettes de repli ────────────────────
   Aucune photo n'est livrée avec la plateforme : chaque article reçoit un
   dégradé de la charte et l'emoji de sa catégorie. Le jour où une vraie
   photo est déposée, le PHP affiche une <img> et cette vignette disparaît. */

.vignette, .carte__media img {
  aspect-ratio: 3 / 2; width: 100%; border-radius: var(--rayon-s);
  background-size: cover; background-position: center;
}
.vignette { display: grid; place-items: center; position: relative; overflow: hidden; }
.vignette::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(90% 70% at 25% 15%, rgba(255, 255, 255, .3), transparent 62%);
}
.vignette span { font-size: 2.6rem; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25)); position: relative; z-index: 1; }
.vignette--grande { aspect-ratio: 16 / 10; }
.vignette--grande span { font-size: 4.6rem; }
.vignette--mini { aspect-ratio: 1 / 1; width: 62px; border-radius: 10px; }
/* Sur 62 px, le reflet du haut mange toute la vignette : on l'éteint. */
.vignette--mini::after { display: none; }
.vignette--mini span { font-size: 1.5rem; }

/* ─────────────────────────── Cartes ─────────────────────────── */

.grille { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grille { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grille { grid-template-columns: repeat(3, 1fr); } }

.carte {
  background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon);
  box-shadow: var(--ombre); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.carte:hover { transform: translateY(-2px); box-shadow: var(--ombre-forte); border-color: var(--trait-fort); }
.carte__media { position: relative; padding: 10px 10px 0; }
.carte__etiquettes { position: absolute; top: 18px; left: 18px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; z-index: 2; }
.carte__corps { padding: 13px 15px 15px; display: flex; flex-direction: column; flex: 1; }
.carte__cat { font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--secondaire); margin-bottom: 4px; }
.carte__titre { font-size: 1.02rem; margin: 0 0 6px; }
.carte__titre a { color: inherit; text-decoration: none; }
.carte__titre a:hover { color: var(--principale); text-decoration: underline; }
.carte__texte { font-size: .89rem; color: var(--encre-douce); margin: 0 0 12px; flex: 1; }
.carte__pied { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.prix { font-size: 1.16rem; font-weight: 700; white-space: nowrap; }
.prix__unite { font-size: .78rem; font-weight: 500; color: var(--encre-douce); display: block; }
.prix--barre { font-size: .9rem; font-weight: 500; color: var(--encre-douce); text-decoration: line-through; margin-right: 6px; }
.prix--promo { color: var(--promo); }

.etiquette {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: .73rem; font-weight: 700; letter-spacing: .02em;
  background: var(--fond); color: var(--encre-douce); border: 1px solid var(--trait);
}
.etiquette--promo { background: var(--promo); color: #fff; border-color: transparent; }
.etiquette--avant { background: var(--secondaire); color: #fff; border-color: transparent; }
.etiquette--rupture { background: #efe7db; color: var(--encre-douce); }

/* ───────────────────── Catégories (vitrine) ───────────────────── */

.categories { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .categories { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .categories { grid-template-columns: repeat(6, 1fr); } }
.categorie {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 10px; text-align: center; text-decoration: none; color: inherit;
  background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.categorie:hover { transform: translateY(-2px); border-color: var(--secondaire); box-shadow: var(--ombre); color: var(--principale); }
.categorie__rond {
  width: 52px; height: 52px; border-radius: 999px; display: grid; place-items: center;
  font-size: 1.5rem; background: linear-gradient(140deg, var(--principale), var(--secondaire));
}
.categorie__nom { font-weight: 700; font-size: .93rem; }
.categorie__n { font-size: .78rem; color: var(--encre-douce); }

/* Fil de filtres rapides (puces) */
.puces { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; margin: 0 0 4px; scrollbar-width: thin; }
.puce {
  flex: none; padding: 7px 14px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--trait-fort); background: var(--blanc); color: var(--encre-douce);
  font-size: .87rem; font-weight: 600; white-space: nowrap;
}
.puce:hover { border-color: var(--secondaire); color: var(--principale); }
.puce[aria-current="true"] { background: var(--principale); border-color: var(--principale); color: #fff; }

/* ─────────────────────────── Formulaires ─────────────────────── */

.champ { margin-bottom: 14px; }
.champ > label, .legende { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 5px; }
.champ__aide { font-size: .81rem; color: var(--encre-douce); margin: 4px 0 0; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="number"], input[type="search"], input[type="date"], input[type="time"],
select, textarea {
  width: 100%; padding: 11px 13px; font: inherit; color: var(--encre);
  background: var(--blanc); border: 1px solid var(--trait-fort); border-radius: var(--rayon-s);
  -webkit-appearance: none; appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236d5c4b' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--secondaire); outline: 2px solid rgba(201, 138, 63, .3); outline-offset: 0; }
::placeholder { color: #a99884; }

.case { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin-bottom: 10px; cursor: pointer; }
.case input { width: 18px; height: 18px; flex: none; margin: 2px 0 0; accent-color: var(--principale); }

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

.ligne-2 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .ligne-2 { grid-template-columns: 1fr 1fr; } }

.bloc {
  background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon);
  padding: 18px; box-shadow: var(--ombre); margin-bottom: 16px;
}
.bloc > h2, .bloc > h3 { margin-top: 0; }

.message { padding: 12px 15px; border-radius: var(--rayon-s); font-size: .92rem; margin-bottom: 14px; border: 1px solid; }
.message--info { background: #f4f0e7; border-color: var(--trait-fort); color: var(--encre-douce); }
.message--ok { background: #e9f4ee; border-color: #c3e0d0; color: var(--succes); }
.message--erreur { background: #fcefec; border-color: #eec8bf; color: var(--alerte); }
.message p:last-child { margin-bottom: 0; }

/* ───────────────────── Boutique : filtres + liste ───────────────────── */

.boutique { display: grid; gap: 22px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1000px) { .boutique { grid-template-columns: 268px 1fr; } }

.filtres { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px; box-shadow: var(--ombre); }
@media (min-width: 1000px) { .filtres { position: sticky; top: 86px; } }
.filtres h2 { font-size: 1rem; margin-bottom: 12px; }
.filtres__groupe { border-top: 1px solid var(--trait); padding-top: 13px; margin-top: 13px; }
.filtres__groupe:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }

.barre-resultats { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.barre-resultats p { margin: 0; color: var(--encre-douce); font-size: .92rem; }
.barre-resultats form { display: flex; align-items: center; gap: 8px; }
.barre-resultats select { width: auto; min-width: 190px; padding: 8px 32px 8px 12px; font-size: .9rem; }

.pagination { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.pagination a, .pagination span {
  min-width: 40px; padding: 9px 12px; text-align: center; border-radius: var(--rayon-s);
  border: 1px solid var(--trait-fort); background: var(--blanc); text-decoration: none;
  color: var(--encre-douce); font-weight: 600; font-size: .9rem;
}
.pagination a:hover { border-color: var(--secondaire); color: var(--principale); }
.pagination [aria-current="page"] { background: var(--principale); border-color: var(--principale); color: #fff; }

.vide { text-align: center; padding: 48px 20px; color: var(--encre-douce); background: var(--blanc); border: 1px dashed var(--trait-fort); border-radius: var(--rayon); }
.vide__emoji { font-size: 2.6rem; display: block; margin-bottom: 10px; }

/* ───────────────────────── Fiche produit ───────────────────────── */

.fiche { display: grid; gap: 26px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .fiche { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; } }
.fiche__galerie { display: grid; gap: 10px; }
.fiche__miniatures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fiche__miniatures .vignette, .fiche__miniatures img { aspect-ratio: 1 / 1; }
.fiche__prix { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.fiche__prix .prix { font-size: 1.85rem; }
.fiche__etiquettes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.options { display: grid; gap: 16px; margin: 4px 0 18px; }
.option { border: 1px solid var(--trait); border-radius: var(--rayon); padding: 14px; background: var(--blanc); }
.option__titre { font-weight: 700; font-size: .95rem; margin: 0 0 3px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.option__obligatoire { font-size: .72rem; font-weight: 700; color: var(--promo); text-transform: uppercase; letter-spacing: .05em; }
.option__liste { display: grid; gap: 8px; margin-top: 10px; }

.choix {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px;
  border: 1px solid var(--trait-fort); border-radius: var(--rayon-s);
  background: var(--fond); cursor: pointer; font-size: .93rem;
  transition: border-color .12s ease, background .12s ease;
}
.choix:hover { border-color: var(--secondaire); }
.choix input { width: 18px; height: 18px; flex: none; accent-color: var(--principale); margin: 0; }
.choix__libelle { flex: 1; }
.choix__prix { font-weight: 700; font-size: .88rem; color: var(--principale); white-space: nowrap; }
.choix:has(input:checked) { border-color: var(--principale); background: var(--blanc); box-shadow: inset 0 0 0 1px var(--principale); }

.quantite { display: flex; align-items: center; gap: 0; border: 1px solid var(--trait-fort); border-radius: 999px; overflow: hidden; background: var(--blanc); width: max-content; }
.quantite button {
  width: 42px; height: 42px; border: 0; background: none; font-size: 1.25rem; line-height: 1;
  cursor: pointer; color: var(--principale); font-weight: 700;
}
.quantite button:hover { background: var(--fond); }
.quantite input { width: 62px; border: 0; text-align: center; font-weight: 700; padding: 11px 0; border-radius: 0; }
.quantite input:focus { outline-offset: -3px; }

.achat { position: sticky; bottom: 0; background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px; box-shadow: var(--ombre-forte); }
.achat__total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.achat__total .prix { font-size: 1.6rem; }

.infos-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--trait); border: 1px solid var(--trait); border-radius: var(--rayon-s); overflow: hidden; }
.infos-liste li { display: flex; gap: 12px; justify-content: space-between; padding: 10px 14px; background: var(--blanc); font-size: .9rem; }
.infos-liste dt, .infos-liste b { color: var(--encre-douce); font-weight: 600; }

.replie { border: 1px solid var(--trait); border-radius: var(--rayon-s); background: var(--blanc); margin-bottom: 10px; }
.replie summary { padding: 12px 15px; font-weight: 700; cursor: pointer; font-size: .93rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.replie summary::after { content: "+"; font-size: 1.2rem; color: var(--secondaire); }
.replie[open] summary::after { content: "–"; }
.replie summary::-webkit-details-marker { display: none; }
.replie__corps { padding: 0 15px 14px; font-size: .92rem; color: var(--encre-douce); }
.replie__corps p:last-child { margin-bottom: 0; }

/* ─────────────────────────── Panier ─────────────────────────── */

.colonnes-panier { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 940px) { .colonnes-panier { grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; } }

.ligne-panier {
  display: grid; grid-template-columns: 62px 1fr; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--trait); align-items: start;
}
.ligne-panier:last-child { border-bottom: 0; }
.ligne-panier__nom { font-weight: 700; font-size: .98rem; margin: 0 0 3px; }
.ligne-panier__nom a { color: inherit; text-decoration: none; }
.ligne-panier__options { margin: 0 0 8px; font-size: .84rem; color: var(--encre-douce); }
.ligne-panier__bas { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ligne-panier__prix { font-weight: 700; white-space: nowrap; }
.ligne-panier .quantite button { width: 36px; height: 36px; font-size: 1.1rem; }
.ligne-panier .quantite input { width: 48px; padding: 8px 0; }
.supprimer { background: none; border: 0; color: var(--encre-douce); cursor: pointer; font-size: .85rem; text-decoration: underline; padding: 4px; }
.supprimer:hover { color: var(--alerte); }

.recap { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 18px; box-shadow: var(--ombre); }
@media (min-width: 940px) { .recap--collant { position: sticky; top: 86px; } }
.recap__ligne { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: .93rem; }
.recap__ligne span:last-child { font-weight: 600; white-space: nowrap; }
.recap__total { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; border-top: 2px solid var(--trait); margin-top: 10px; padding-top: 12px; font-size: 1.16rem; font-weight: 700; }
.recap__tva { margin-top: 12px; font-size: .8rem; color: var(--encre-douce); }
.recap__tva table { width: 100%; border-collapse: collapse; }
.recap__tva th, .recap__tva td { text-align: right; padding: 3px 0; font-weight: 500; }
.recap__tva th:first-child, .recap__tva td:first-child { text-align: left; }

/* ───────────────────── Tunnel de commande ───────────────────── */

.etapes { display: flex; gap: 6px; list-style: none; margin: 0 0 22px; padding: 0; flex-wrap: wrap; }
.etapes li { display: flex; align-items: center; gap: 7px; font-size: .84rem; color: var(--encre-douce); font-weight: 600; }
.etapes li + li::before { content: "›"; color: var(--trait-fort); margin-right: 3px; }
.etapes li[aria-current="step"] { color: var(--principale); }

.modes { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .modes { grid-template-columns: 1fr 1fr; } }
.mode {
  display: flex; gap: 12px; align-items: flex-start; padding: 15px;
  border: 1px solid var(--trait-fort); border-radius: var(--rayon); background: var(--fond); cursor: pointer;
}
.mode:has(input:checked) { border-color: var(--principale); background: var(--blanc); box-shadow: inset 0 0 0 1px var(--principale); }
.mode input { margin: 3px 0 0; width: 18px; height: 18px; flex: none; accent-color: var(--principale); }
.mode__nom { font-weight: 700; display: block; }
.mode__detail { font-size: .85rem; color: var(--encre-douce); }

/* ───────────────────────── Espace client ───────────────────────── */

.onglets { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--trait); margin-bottom: 20px; padding-bottom: 0; }
.onglet {
  flex: none; padding: 11px 15px; border: 0; background: none; font: inherit; font-weight: 700;
  font-size: .92rem; color: var(--encre-douce); cursor: pointer; border-bottom: 3px solid transparent;
  margin-bottom: -1px; white-space: nowrap;
}
.onglet:hover { color: var(--principale); }
.onglet[aria-selected="true"] { color: var(--principale); border-bottom-color: var(--principale); }

.commande-carte { border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--blanc); padding: 16px; margin-bottom: 14px; box-shadow: var(--ombre); }
.commande-carte__entete { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; margin-bottom: 8px; }
.commande-carte__numero { font-weight: 700; font-size: 1rem; }
.commande-carte__lignes { margin: 10px 0; padding: 0; list-style: none;
  font-size: .89rem; color: var(--encre-douce); }
.commande-carte__lignes li { margin-bottom: 3px; }

.suivi { display: flex; gap: 0; margin: 14px 0; list-style: none; padding: 0; }
.suivi li { flex: 1; text-align: center; font-size: .72rem; color: var(--encre-douce); position: relative; padding-top: 22px; }
.suivi li::before {
  content: ""; position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  width: 12px; height: 12px; border-radius: 999px; background: var(--trait-fort); z-index: 1;
}
.suivi li::after { content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 2px; background: var(--trait-fort); }
.suivi li:first-child::after { display: none; }
.suivi li.fait { color: var(--principale); font-weight: 700; }
.suivi li.fait::before { background: var(--principale); }
.suivi li.fait::after { background: var(--principale); }

.adresse-carte { border: 1px solid var(--trait); border-radius: var(--rayon-s); padding: 13px; margin-bottom: 10px; background: var(--blanc); }
.adresse-carte__libelle { font-weight: 700; font-size: .9rem; margin-bottom: 3px; }
.adresse-carte p { margin: 0 0 8px; font-size: .89rem; color: var(--encre-douce); }

.zone-danger { border: 1px solid #eec8bf; background: #fdf6f4; border-radius: var(--rayon); padding: 16px; }
.zone-danger h3 { color: var(--alerte); }

/* ───────────────────────── Avis clients ─────────────────────────
   Classes imposées par le module commun api/avis-commun.php : ne pas les
   renommer, le HTML est produit par avisC_rendu(). */

.avis-bloc { display: grid; gap: 18px; }
.avis-exemple { font-size: .82rem; color: var(--encre-douce); font-style: italic; margin: 0; }
.avis-synthese { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px; }
.avis-moyenne { margin: 0 0 10px; font-size: 1rem; }
.avis-etoiles { color: var(--secondaire); letter-spacing: 2px; }
.avis-repartition { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.avis-repartition li { display: grid; grid-template-columns: 34px 1fr 26px; align-items: center; gap: 9px; font-size: .8rem; color: var(--encre-douce); }
.avis-barre { height: 7px; background: var(--trait); border-radius: 999px; overflow: hidden; }
.avis-barre span { display: block; height: 100%; background: var(--secondaire); }
.avis-liste { display: grid; gap: 12px; }
@media (min-width: 760px) { .avis-liste { grid-template-columns: 1fr 1fr; } }
.avis-carte { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 15px; margin: 0; }
.avis-carte__note { margin: 0 0 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.avis-badge { font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--fond); color: var(--encre-douce); border: 1px solid var(--trait); }
.avis-badge--verifie { background: #e7f2eb; color: var(--succes); border-color: #cae2d3; }
.avis-carte__titre { font-size: .98rem; margin: 0 0 5px; }
.avis-carte__texte { font-size: .9rem; margin: 0 0 8px; }
.avis-carte__auteur { font-size: .82rem; color: var(--encre-douce); margin: 0; }
.avis-reponse { margin-top: 10px; padding: 10px 12px; background: var(--fond); border-radius: var(--rayon-s); font-size: .86rem; }
.avis-reponse p { margin: 0 0 4px; }
.avis-mention { font-size: .78rem; color: var(--encre-douce); background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 14px; }
.avis-mention p { margin: 0 0 7px; }
.avis-mention p:last-child { margin-bottom: 0; }
.avis-vide { color: var(--encre-douce); }

/* ─────────────────────────── Infos, pied ─────────────────────── */

.infos { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .infos { grid-template-columns: repeat(3, 1fr); } }
.horaires { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.horaires li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--trait); }
.horaires li:last-child { border-bottom: 0; }
.horaires li.aujourdhui { font-weight: 700; color: var(--principale); }
.horaires__ferme { color: var(--encre-douce); }

.reseaux { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.reseaux a { padding: 7px 13px; border: 1px solid var(--trait-fort); border-radius: 999px; font-size: .86rem; font-weight: 600; text-decoration: none; background: var(--blanc); }

.pied { background: #2b2019; color: #e7dccd; margin-top: 40px; padding: 34px 0 22px; font-size: .9rem; }
.pied a { color: #f0c98d; }
.pied__grille { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .pied__grille { grid-template-columns: 2fr 1fr 1fr; } }
.pied h3 { color: #fff; font-size: .95rem; margin-bottom: 10px; }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { margin-bottom: 6px; }
.pied__bas { border-top: 1px solid rgba(255, 255, 255, .13); margin-top: 24px; padding-top: 16px; font-size: .82rem; color: #b6a692; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

.noscript { background: #fcefec; border: 1px solid #eec8bf; color: var(--alerte); padding: 12px 15px; border-radius: var(--rayon-s); margin-bottom: 16px; font-size: .9rem; }

/* Chargement : un bandeau sobre plutôt qu'un écran blanc */
.chargement { color: var(--encre-douce); font-size: .92rem; padding: 26px 0; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .entete, .pied, .bouton, .nav-mobile { display: none !important; }
  body { background: #fff; }
}
