/* =====================================================
   Grossiste Épicerie Vrac — Design System
   Tokens, base, components shared across all pages.
   ===================================================== */

:root {
  /* Brand tokens — les variables --color-* sont injectées dynamiquement par header.php */
  --primary: var(--color-primary, #4F6A3D);
  --primary-700: color-mix(in srgb, var(--primary) 80%, black);
  --primary-100: color-mix(in srgb, var(--primary) 12%, var(--sitebg));
  --secondary: var(--color-secondary, #C9B187);
  --secondary-200: color-mix(in srgb, var(--secondary) 40%, var(--sitebg));
  --sitebg: var(--color-sitebg, #EDE5D2);
  --sitebg-alt: color-mix(in srgb, var(--sitebg) 92%, white);
  --sitetext: var(--color-sitetext, #2A2A2A);
  --muted: color-mix(in srgb, var(--sitetext) 65%, transparent);
  --line: color-mix(in srgb, var(--sitetext) 10%, transparent);
  --line-strong: color-mix(in srgb, var(--sitetext) 18%, transparent);
  --shadow-sm: 0 2px 8px -2px rgba(74, 55, 30, 0.10);
  --shadow-md: 0 8px 24px -10px rgba(74, 55, 30, 0.18);
  --shadow-lg: 0 22px 48px -22px rgba(74, 55, 30, 0.30);

  /* Type — injecté dynamiquement */
  --font-heading: var(--font-heading-dyn), "Playfair Display", Georgia, serif;
  --font-body: var(--font-body-dyn), "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Radii / spacing */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;
  --space: 8px;

  /* Layout */
  --container: 1200px;
  --container-narrow: 760px;
  --header-h: 76px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--sitebg);
  color: var(--sitetext);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  /* very subtle paper grain */
  background-image:
    radial-gradient(circle at 20% 30%, rgba(201, 177, 135, 0.08) 0px, transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(79, 106, 61, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* -----------------------------------------------------
   Typography
   ----------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--sitetext);
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
  line-height: 1.12;
  text-wrap: balance;
}

h1 { font-size: clamp(40px, 5vw, 64px); font-weight: 500; }
h2 { font-size: clamp(30px, 3.4vw, 44px); }
h3 { font-size: clamp(22px, 2vw, 26px); }
h4 { font-size: 18px; font-weight: 600; font-family: var(--font-body); letter-spacing: 0; }

p { margin: 0 0 1em; text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--primary);
  display: inline-block;
}

.lede {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 60ch;
}

.serif-italic { font-family: var(--font-heading); font-style: italic; font-weight: 400; }

/* -----------------------------------------------------
   Layout helpers
   ----------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow { max-width: var(--container-narrow); }

section { padding: 96px 0; }
section.tight { padding: 64px 0; }

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

@media (max-width: 900px) {
  section { padding: 64px 0; }
  .container { padding: 0 20px; }
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
}

/* -----------------------------------------------------
   Buttons
   ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--r-md);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-700); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--sitetext);
  padding: 10px 14px;
}
.btn-ghost:hover { color: var(--primary); }

.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn-lg { padding: 18px 28px; font-size: 16px; }

/* -----------------------------------------------------
   Header
   ----------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(237, 229, 210, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--sitetext);
}
.logo .dot { color: var(--primary); }
.logo .tld { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.08em; }

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  justify-self: center;
}
.nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--sitetext);
  padding: 6px 0;
  position: relative;
}
.nav a:hover { color: var(--primary); }
.nav a.active::after,
.nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--primary);
}
.nav .with-caret { display: inline-flex; align-items: center; gap: 4px; }

.header-cta { justify-self: end; display: flex; align-items: center; gap: 10px; }

/* mobile header */
.hamburger {
  width: 40px; height: 40px;
  display: none;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
}
.hamburger span {
  width: 18px; height: 1.5px; background: var(--sitetext);
  position: relative;
}
.hamburger span::before, .hamburger span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 1.5px; background: var(--sitetext);
}
.hamburger span::before { top: -5px; }
.hamburger span::after { top: 5px; }

@media (max-width: 900px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .header-cta { display: none; }
  .hamburger { display: inline-flex; }
}

/* -----------------------------------------------------
   Placeholders (kraft striped image stand-ins)
   ----------------------------------------------------- */
.ph {
  position: relative;
  background-color: var(--secondary-200);
  background-image:
    repeating-linear-gradient(135deg,
      rgba(79, 106, 61, 0.08) 0 10px,
      transparent 10px 20px);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(42, 42, 42, 0.55);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 16px;
  border: 1px solid rgba(79, 106, 61, 0.15);
}
.ph::before, .ph::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border: 1px solid rgba(42, 42, 42, 0.35);
}
.ph::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.ph::after { bottom: 8px; right: 8px; border-left: none; border-top: none; }
.ph span {
  background: rgba(245, 238, 221, 0.85);
  padding: 6px 10px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
  max-width: 80%;
}
.ph.dark { background-color: #3a4a30; color: rgba(245, 238, 221, 0.8); }
.ph.dark span { background: rgba(42, 42, 42, 0.55); border-color: rgba(245, 238, 221, 0.2); color: rgba(245, 238, 221, 0.9); }
.ph.dark { background-image: repeating-linear-gradient(135deg, rgba(245,238,221,0.06) 0 10px, transparent 10px 20px); }

.ph-hero { aspect-ratio: 16 / 7; min-height: 480px; }
.ph-sq { aspect-ratio: 1 / 1; }
.ph-portrait { aspect-ratio: 3 / 4; }
.ph-landscape { aspect-ratio: 4 / 3; }
.ph-wide { aspect-ratio: 16 / 9; }

/* -----------------------------------------------------
   Cards
   ----------------------------------------------------- */
.card {
  background: var(--sitebg-alt);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--secondary); }

.card-media { aspect-ratio: 4 / 3; position: relative; }
.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { margin: 0; }
.card-link {
  margin-top: auto;
  padding-top: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-link .arr { transition: transform .2s ease; }
.card:hover .card-link .arr { transform: translateX(4px); }

/* Thematic card with brand badge */
.theme-card .brand-mark {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(245, 238, 221, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.02em;
  backdrop-filter: blur(6px);
}
.theme-card .cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* -----------------------------------------------------
   Badges
   ----------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: var(--secondary-200);
  color: var(--primary-700);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid rgba(79, 106, 61, 0.15);
}
.badge.olive { background: var(--primary-100); color: var(--primary-700); }
.badge.dark { background: var(--primary); color: #fff; border-color: transparent; }

/* -----------------------------------------------------
   Form
   ----------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.field input,
.field textarea,
.field select {
  font-family: inherit;
  font-size: 15px;
  color: var(--sitetext);
  padding: 14px 16px;
  background: var(--sitebg-alt);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 106, 61, 0.12); }

/* -----------------------------------------------------
   FAQ accordion
   ----------------------------------------------------- */
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.faq-q {
  width: 100%;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 500;
  color: var(--sitetext);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  cursor: pointer;
  letter-spacing: -0.005em;
}
.faq-q .ico {
  flex: 0 0 32px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  transition: transform .25s ease, background .2s, color .2s;
}
.faq-item.open .faq-q .ico { transform: rotate(45deg); background: var(--primary); color: #fff; }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .25s ease;
  color: var(--muted);
  padding-right: 56px;
}
.faq-item.open .faq-a { max-height: 400px; padding-top: 12px; }

/* -----------------------------------------------------
   Footer
   ----------------------------------------------------- */
.site-footer {
  background: var(--primary);
  color: rgba(245, 238, 221, 0.86);
  padding: 80px 0 28px;
  margin-top: 80px;
}
.site-footer h4 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 238, 221, 0.55);
  margin-bottom: 18px;
}
.site-footer a { display: block; padding: 4px 0; font-size: 14.5px; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; }
.footer-logo {
  font-family: var(--font-heading);
  font-size: 24px;
  color: #fff;
  margin-bottom: 12px;
  display: block;
}
.footer-tag { font-size: 14px; color: rgba(245, 238, 221, 0.6); max-width: 28ch; line-height: 1.6; }
.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(245, 238, 221, 0.12);
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: rgba(245, 238, 221, 0.55);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* -----------------------------------------------------
   CTA banner
   ----------------------------------------------------- */
.cta-banner {
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 12px, transparent 12px 24px);
  pointer-events: none;
}
.cta-banner h2 { color: #fff; margin: 0 0 12px; }
.cta-banner p { color: rgba(255, 255, 255, 0.78); margin: 0; }
.cta-banner .actions { display: flex; gap: 12px; justify-content: flex-end; position: relative; z-index: 1; flex-wrap: wrap; }
.cta-banner .btn-primary { background: #fff; color: var(--primary); }
.cta-banner .btn-primary:hover { background: var(--sitebg); }
.cta-banner .btn-outline { color: #fff; border-color: rgba(255,255,255,0.4); }
.cta-banner .btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; }
@media (max-width: 900px) {
  .cta-banner { grid-template-columns: 1fr; padding: 36px; }
  .cta-banner .actions { justify-content: flex-start; }
}

/* -----------------------------------------------------
   Section heading pattern
   ----------------------------------------------------- */
.section-head { margin-bottom: 56px; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.section-head .left { max-width: 60ch; }
.section-head h2 { margin: 12px 0 8px; }
.section-head .lede { margin: 0; }

/* -----------------------------------------------------
   Breadcrumb
   ----------------------------------------------------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: center;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { opacity: 0.5; }

/* -----------------------------------------------------
   Trust marks / clients row
   ----------------------------------------------------- */
.client-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; align-items: center; }
.client {
  height: 64px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--muted);
  font-size: 17px;
  background: var(--sitebg-alt);
}
@media (max-width: 900px) {
  .client-row { grid-template-columns: repeat(2, 1fr); }
}

/* -----------------------------------------------------
   Engagement icon block
   ----------------------------------------------------- */
.engagement {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--sitebg-alt);
}
.engagement .ico-wrap {
  width: 48px; height: 48px;
  border-radius: var(--r-sm);
  background: var(--primary-100);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--primary);
}
.engagement h3 { font-family: var(--font-body); font-size: 17px; font-weight: 600; margin: 0; }
.engagement p { font-size: 14.5px; color: var(--muted); margin: 0; line-height: 1.6; }

/* -----------------------------------------------------
   Split block
   ----------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split.narrow-text > .text { max-width: 48ch; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
}

/* -----------------------------------------------------
   Utility
   ----------------------------------------------------- */
.divider { height: 1px; background: var(--line); margin: 0; border: 0; }
.text-muted { color: var(--muted); }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; } .mt-5 { margin-top: 48px; }
.flex { display: flex; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.row-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.bg-alt { background: var(--sitebg-alt); }
.bg-kraft { background: var(--secondary-200); }
.kraft-stripe {
  background-color: var(--secondary-200);
  background-image: repeating-linear-gradient(135deg, rgba(79,106,61,0.08) 0 10px, transparent 10px 20px);
}

/* -----------------------------------------------------
   Mobile-specific (within mobile artboards)
   ----------------------------------------------------- */
.mobile-only { display: none; }
.desktop-only { display: block; }
body.is-mobile section { padding: 56px 0; }
body.is-mobile .container { padding: 0 20px; }
body.is-mobile h1 { font-size: 38px; line-height: 1.1; }
body.is-mobile h2 { font-size: 28px; }
body.is-mobile .g-2,
body.is-mobile .g-3,
body.is-mobile .g-4 { grid-template-columns: 1fr; }
body.is-mobile .split { grid-template-columns: 1fr; gap: 28px; }
body.is-mobile .footer-grid { grid-template-columns: 1fr; gap: 28px; }
body.is-mobile .nav { display: none; }
body.is-mobile .header-cta { display: none; }
body.is-mobile .hamburger { display: inline-flex; }
body.is-mobile .header-inner { grid-template-columns: 1fr auto; }
body.is-mobile .cta-banner { grid-template-columns: 1fr; padding: 32px; }
body.is-mobile .cta-banner .actions { justify-content: flex-start; }
body.is-mobile .client-row { grid-template-columns: repeat(2, 1fr); }
body.is-mobile .section-head { margin-bottom: 32px; }
body.is-mobile .ph-hero { min-height: 360px; }

:root {
    --color-primary:   #4f6a3d;
    --color-secondary: #c9b187;
    --color-text:      #2a2a2a;
    --color-bg:        #ede5d2;
    --color-muted:     #e5decd;
    --color-border:    #d9d3c4;
    --color-premium:   #b8860b;
    --radius: 0;
    --card-shadow: none;
    --card-border: 1px solid var(--color-border);
    --card-bg: var(--color-bg);
    --btn-radius: 3px;
    --img-radius: 0;
}

/* ── Base responsive (généré automatiquement) ── */
*, *::before, *::after { box-sizing: border-box; }

/* Empêche le défilement horizontal */
html, body { overflow-x: hidden; max-width: 100%; }

/* Images et vidéos toujours dans leur conteneur */
img, video { max-width: 100%; height: auto; }
/* iframe : largeur 100% mais hauteur respectée (ex. Google Maps) */
iframe, embed, object { max-width: 100%; }

/* Tableaux : scroll horizontal si besoin, jamais de débordement */
table { max-width: 100%; }
.zone-content table,
.page-content table,
.article-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Texte long (URL, code) : retour à la ligne forcé */
.zone-content,
.page-content,
.article-content {
    overflow-wrap: break-word;
    word-break: break-word;
}