/* ==========================================================================
   Huilerie — feuille de style principale
   Palette et typographie reprises de la feuille de route du site.
   ========================================================================== */

:root {
  --bg: #EDEEE2;
  --bg-elevated: #F8F8F0;
  --bg-sunken: #E2E4D3;
  --ink: #23271B;
  --ink-soft: #5B6150;
  --line: rgba(35, 39, 27, 0.16);
  --accent: #A1740F;        /* or de l'huile */
  --accent-ink: #6B4E14;
  --branch: #5A6B39;        /* vert olivier */
  --branch-soft: rgba(90, 107, 57, 0.13);
  --chip-b2c-bg: #DCE3CB;
  --chip-b2c-ink: #45532B;
  --chip-b2b-bg: #E9DCC0;
  --chip-b2b-ink: #6B4E14;
  --shadow: 0 1px 2px rgba(35,39,27,0.07), 0 10px 28px rgba(35,39,27,0.07);
  --radius: 14px;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14170E;
    --bg-elevated: #1B1F14;
    --bg-sunken: #0F1209;
    --ink: #E9E7D9;
    --ink-soft: #A2A78F;
    --line: rgba(233, 231, 217, 0.16);
    --accent: #D9AE4A;
    --accent-ink: #E4C480;
    --branch: #8CA05C;
    --branch-soft: rgba(140, 160, 92, 0.18);
    --chip-b2c-bg: #313B21;
    --chip-b2c-ink: #C6D3A5;
    --chip-b2b-bg: #3A2E17;
    --chip-b2b-ink: #E4C480;
    --shadow: 0 1px 2px rgba(0,0,0,0.35), 0 10px 28px rgba(0,0,0,0.4);
  }
}

:root[data-theme="dark"] {
  --bg: #14170E;
  --bg-elevated: #1B1F14;
  --bg-sunken: #0F1209;
  --ink: #E9E7D9;
  --ink-soft: #A2A78F;
  --line: rgba(233, 231, 217, 0.16);
  --accent: #D9AE4A;
  --accent-ink: #E4C480;
  --branch: #8CA05C;
  --branch-soft: rgba(140, 160, 92, 0.18);
  --chip-b2c-bg: #313B21;
  --chip-b2c-ink: #C6D3A5;
  --chip-b2b-bg: #3A2E17;
  --chip-b2b-ink: #E4C480;
  --shadow: 0 1px 2px rgba(0,0,0,0.35), 0 10px 28px rgba(0,0,0,0.4);
}

:root[data-theme="light"] {
  --bg: #EDEEE2;
  --bg-elevated: #F8F8F0;
  --bg-sunken: #E2E4D3;
  --ink: #23271B;
  --ink-soft: #5B6150;
  --line: rgba(35, 39, 27, 0.16);
  --accent: #A1740F;
  --accent-ink: #6B4E14;
  --branch: #5A6B39;
  --branch-soft: rgba(90, 107, 57, 0.13);
  --chip-b2c-bg: #DCE3CB;
  --chip-b2c-ink: #45532B;
  --chip-b2b-bg: #E9DCC0;
  --chip-b2b-ink: #6B4E14;
  --shadow: 0 1px 2px rgba(35,39,27,0.07), 0 10px 28px rgba(35,39,27,0.07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 14px;
}

h1 { font-size: clamp(32px, 4.6vw, 52px); }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 19px; }

p { color: var(--ink-soft); margin: 0 0 16px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--branch);
  font-weight: 600;
  margin: 0 0 12px;
}

.rule {
  width: 72px;
  height: 3px;
  margin: 0 0 20px;
  background: linear-gradient(90deg, var(--branch), var(--accent));
  border-radius: 2px;
}

/* --- Boutons --- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--branch);
  color: var(--bg-elevated);
}
.btn-primary:hover { box-shadow: 0 6px 18px var(--branch-soft); }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--branch); color: var(--branch); }

.btn-gold {
  background: var(--accent);
  color: var(--bg-elevated);
}
.btn-gold:hover { opacity: 0.9; }

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

header.site-header {
  /* Pas de backdrop-filter ici : combiné à position:sticky, Safari a un bug
     de compositing connu qui peut faire disparaître la page au clic. */
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  border-bottom: 1px solid var(--line);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand img.brand-logo {
  width: auto;
  height: 38px;
}

.brand img.brand-logo-footer { height: 32px; }

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav.main-nav a {
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

nav.main-nav a:hover { color: var(--ink); background: var(--branch-soft); }
nav.main-nav a[aria-current="page"] { color: var(--ink); background: var(--bg-elevated); box-shadow: var(--shadow); }

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

.theme-toggle, .menu-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-toggle { display: none; }

.cart-link {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.cart-link:hover { border-color: var(--branch); color: var(--branch); }

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-badge[hidden] { display: none; }

/* --- Hero --- */

.hero {
  padding: 56px 0 72px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero.hero-compact {
  padding: 44px 0 52px;
  grid-template-columns: 1fr;
  text-align: left;
}

.hero-copy p.lead { font-size: 17px; max-width: 48ch; }

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0 24px; }

.hero-art {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
}

/* --- Cadre d'illustration réutilisable --- */

.illustration-frame {
  background: radial-gradient(circle at 30% 20%, var(--branch-soft), transparent 60%), var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* --- Sections --- */

section { padding: 56px 0; }
section.alt { background: var(--bg-sunken); }
section + section { border-top: 1px solid var(--line); }

.section-head { max-width: 62ch; margin-bottom: 34px; }

.grid {
  display: grid;
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* --- Cartes --- */

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

/* Hauteur fixe plutôt qu'aspect-ratio : Safari a un bug connu où
   aspect-ratio sur un enfant de grid (ici .card, en display:flex, imbriqué
   dans .grid) peut se calculer de travers et faire grossir la case pour
   certaines cartes seulement. Une hauteur fixe est sans ambiguïté. */
.card .illustration-frame { height: 240px; margin-bottom: 16px; }

.product-card .illustration-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.chip-b2c { background: var(--chip-b2c-bg); color: var(--chip-b2c-ink); }
.chip-b2b { background: var(--chip-b2b-bg); color: var(--chip-b2b-ink); }
.chip-placeholder { background: var(--branch-soft); color: var(--branch); }

/* --- Produits (boutique) --- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink-soft);
  cursor: pointer;
}
.filter-btn[aria-pressed="true"] {
  background: var(--branch);
  border-color: var(--branch);
  color: var(--bg-elevated);
}

.product-card { display: flex; flex-direction: column; }
.product-card .price { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 17px; color: var(--ink); font-weight: 600; margin-top: auto; text-align: center; align-self: center; }
.product-card .intensity { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 4px; }
.product-card h3 { margin-bottom: 4px; }
.product-card .btn { margin: 14px auto 0; align-self: center; }
.product-card .add-status { font-size: 12.5px; color: var(--branch); min-height: 16px; margin: 6px 0 0; text-align: center; }

.cta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-row .btn { flex-shrink: 0; }

/* --- Fiche technique / valeurs nutritionnelles (pop-up) --- */

.specs-trigger {
  margin-top: 14px;
  width: 100%;
  justify-content: center;
  font-size: 13px;
  padding: 10px 16px;
}

.specs-dialog {
  /* Centrage géré nativement par le navigateur (comportement par défaut
     de <dialog> avec showModal()) — pas de position/inset explicites. */
  margin: auto;
  border: none;
  padding: 0;
  background: var(--bg-elevated);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: calc(100vw - 48px);
  max-width: 460px;
  max-height: calc(100vh - 64px);
  overflow: auto;
}

.specs-dialog::backdrop {
  background: rgba(15, 18, 9, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.specs-dialog-inner { position: relative; padding: 28px; }

.specs-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.specs-close:hover { color: var(--ink); border-color: var(--branch); }

body.dialog-open { overflow: hidden; }

dl.specs-list {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  row-gap: 8px;
  margin: 0 0 16px;
  font-size: 13.5px;
}
dl.specs-list dt { color: var(--ink-soft); }
dl.specs-list dd { margin: 0; color: var(--ink); }

table.nutrition { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 10px; }
table.nutrition caption {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
table.nutrition td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.nutrition td:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
table.nutrition tr.sub td:first-child { padding-left: 16px; color: var(--ink-soft); }

.specs-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

/* --- Panier & commande --- */

table.cart-table { width: 100%; border-collapse: collapse; }
table.cart-table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  font-weight: 600;
  padding: 0 8px 10px;
  border-bottom: 1px solid var(--line);
}
table.cart-table td {
  padding: 16px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.cart-table tfoot td { border-bottom: none; }

.cart-item-info { display: flex; align-items: center; gap: 14px; }
.cart-item-info img { width: 48px; height: auto; }
.cart-item-info .name { color: var(--ink); font-weight: 600; font-size: 14.5px; }
.cart-item-info .meta { font-size: 12.5px; color: var(--ink-soft); }

.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty-stepper button {
  width: 28px; height: 28px;
  border: none; background: transparent; color: var(--ink);
  font-size: 15px; cursor: pointer; border-radius: 999px;
}
.qty-stepper button:hover { background: var(--branch-soft); }
.qty-stepper span { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; font-size: 13.5px; }

.line-total { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }

.remove-line {
  background: none; border: none; color: var(--ink-soft);
  font-size: 12.5px; cursor: pointer; text-decoration: underline;
  padding: 10px 4px;
  margin: -10px -4px;
}
.remove-line:hover { color: var(--accent); }

.cart-empty { text-align: center; padding: 60px 20px; }
.cart-empty img { width: 120px; margin: 0 auto 20px; opacity: 0.85; }

/* --- Confirmation de commande --- */

.confirmation-success { padding: 40px 0 60px; }

.confirmation-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--branch);
  color: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.order-summary {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  position: sticky;
  top: 90px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 8px 0;
  color: var(--ink-soft);
}
.summary-row.total {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 14px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.summary-row span:last-child { font-variant-numeric: tabular-nums; color: var(--ink); }

.checkout-layout { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 40px; align-items: start; }

.delivery-options { display: grid; gap: 10px; margin-bottom: 4px; }
.delivery-option {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 14px;
}
.delivery-option:has(input:checked) { border-color: var(--branch); background: var(--branch-soft); }
.delivery-option input { width: auto; }

.payment-methods { display: grid; gap: 12px; max-width: 340px; }
.payment-method-row { min-height: 46px; }
.payment-method-paypal { position: relative; }
code {
  font-family: var(--font-mono);
  background: var(--branch-soft);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.92em;
}

/* --- Témoignages --- */

.quote-card { font-style: normal; }
.quote-card p.quote { color: var(--ink); font-size: 15.5px; margin-bottom: 10px; }
.quote-card footer { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); }

.placeholder-note {
  font-size: 12.5px;
  color: var(--ink-soft);
  background: var(--branch-soft);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 10px;
}

/* --- Formulaires --- */

form.stack { display: grid; gap: 16px; max-width: 560px; }
.field-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

input, select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
}

input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

textarea { resize: vertical; min-height: 110px; }

.form-note { font-size: 12.5px; }

.form-status {
  display: none;
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--branch-soft);
  color: var(--branch);
}
.form-status.visible { display: block; }

/* --- Plan d'accès (carte & coordonnées) --- */

.map-embed {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 320px;
  margin-bottom: 18px;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

.contact-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: grid;
  gap: 14px;
  width: 100%;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.35;
}
.contact-row a { color: var(--ink); text-decoration: none; }
.contact-row a:hover { color: var(--branch); }

.contact-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--branch-soft);
  color: var(--branch);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-card .btn { margin-top: 4px; justify-self: start; }

/* --- Table horaires --- */

table.hours { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.hours td, table.hours th { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
table.hours th { color: var(--ink-soft); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; }

/* --- Newsletter --- */

.newsletter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  max-width: 460px;
}
.newsletter input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 14px;
  min-width: 160px;
}
.newsletter input:focus { outline: none; }
.newsletter .btn { border-radius: 999px; }

/* --- Pied de page --- */

footer.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-sunken);
  padding: 48px 0 28px;
  margin-top: 56px;
}

.footer-newsletter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 32px;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.footer-newsletter > div { flex: 1 1 240px; }
.footer-newsletter p { margin: 0; max-width: 40ch; }
.footer-newsletter form.newsletter { flex: 0 1 380px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-grid h4,
.footer-newsletter h4 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

.footer-newsletter h4 { margin-bottom: 6px; }

.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { text-decoration: none; font-size: 14px; color: var(--ink-soft); }
.footer-grid a:hover { color: var(--branch); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* --- Utilitaires --- */

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

.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.divider-branch { display: block; margin: 40px auto; opacity: 0.8; }

/* --- Responsive --- */

/* Tablettes (≤ 900px) : la nav passe en menu déroulant ici plutôt qu'à
   720px — entre les deux, les 5 liens + logo + icônes ne tiennent pas
   sur une seule ligne. */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 420px; margin: 0 auto; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }

  nav.main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    display: none;
    box-shadow: var(--shadow);
    max-height: calc(100vh - 66px);
    overflow-y: auto;
  }
  nav.main-nav.open { display: flex; }
  nav.main-nav a { padding: 14px 16px; }
  .menu-toggle { display: flex; }
}

@media (max-width: 760px) {
  .field-row { grid-template-columns: 1fr; }
}

/* Panier / commande : la table se transforme en petites cartes
   empilées — 5 colonnes ne tiennent pas sur un écran de téléphone. */
@media (max-width: 640px) {
  table.cart-table thead { display: none; }
  table.cart-table, table.cart-table tbody { display: block; width: 100%; }

  /* Chaque ligne devient une carte ; produit en haut sur toute la largeur,
     puis prix unitaire à gauche et quantité + total groupés à droite. */
  table.cart-table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    column-gap: 22px;
    row-gap: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 14px;
  }
  table.cart-table td {
    display: block;
    padding: 0;
    border-bottom: none;
  }
  table.cart-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
    margin-bottom: 3px;
  }

  table.cart-table td:nth-child(1) {
    flex: 1 1 100%;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }
  table.cart-table td:nth-child(2) { margin-right: auto; } /* prix unitaire : reste à gauche */
  table.cart-table td:nth-child(3),
  table.cart-table td:nth-child(4) { text-align: right; } /* quantité + total : groupés à droite */
  table.cart-table td:nth-child(3)::before,
  table.cart-table td:nth-child(4)::before { text-align: right; }
  table.cart-table td:nth-child(5) {
    flex: 1 1 100%;
    text-align: right;
    padding-top: 4px;
    border-top: 1px solid var(--line);
  }

  .filter-btn { padding: 10px 16px; }
  .qty-stepper button { width: 24px; height: 24px; font-size: 13px; }
  .qty-stepper span { min-width: 18px; font-size: 12.5px; }
}

@media (max-width: 560px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-newsletter form.newsletter { flex-basis: 100%; max-width: none; }

  section { padding: 40px 0; }
  .hero { padding: 40px 0 48px; gap: 32px; }
  .hero.hero-compact { padding: 32px 0 40px; }
  .hero-art { padding: 16px; }
  .section-head { margin-bottom: 24px; }

  /* Cartes produit pleine largeur : le CTA principal et le bouton
     "Fiche technique" doivent avoir la même largeur, pas un bouton
     centré au-dessus d'un bouton pleine largeur. */
  .product-card .btn { width: 100%; justify-content: center; }
  .cta-row { flex-direction: column; align-items: stretch; text-align: center; }
  .cta-row .btn { width: 100%; justify-content: center; }

  /* Panier : moins d'air perdu autour du récapitulatif et de l'état vide. */
  .cart-empty { padding: 40px 16px; }
  .cart-empty img { width: 96px; }
  .order-summary { padding: 18px; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .brand-tagline { display: none; }
  .nav-row { padding: 22px 0; gap: 10px; }
  .nav-actions { gap: 6px; }
  .specs-dialog-inner { padding: 20px; }
  .specs-dialog { width: calc(100vw - 32px); }
  .cart-item-info { flex-wrap: wrap; }
  .footer-newsletter { flex-direction: column; align-items: stretch; }
  .newsletter { max-width: none; }
}

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