/* =========================================================================
   CAFÉS J.J. LOOZE — FEUILLE DE STYLE DE BASE (Phase 1 — Fondations)
   -------------------------------------------------------------------------
   Un seul fichier CSS pour l'instant (perf : une seule requête réseau).
   Organisation :
     1. Reset léger
     2. Tokens (couleurs, typo, espacements)
     3. Éléments de base (body, liens, images)
     4. Utilitaires de mise en page (container, section)
     5. Accessibilité (skip-link, focus, reduced-motion)
     6. En-tête / navigation
     7. Hero (page d'accueil)
     8. Chapitre vidéo
     9. Section "Une maison, trois vies"
    10. Section "Notre savoir-faire"
    11. Section "Nos cafés" (→ boutique)
    12. Section "Professionnels"
    13. Bandeau de confiance
    14. Contact
    15. Pied de page
    16. Boutons / CTA
    17. Animations d'apparition au scroll
    18. Media queries de confort (tablette / desktop)
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. RESET LÉGER
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
/* IMPORTANT : height:auto est indispensable ici. Sans cette ligne, un <img>
   avec des attributs width/height (utilisés pour éviter le CLS) se fait
   comprimer verticalement dès que sa largeur réelle est réduite par
   max-width:100% — c'est la cause du "déformé" observé sur les photos. */
img, picture, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; }

/* -------------------------------------------------------------------------
   2. TOKENS — palette alignée sur le nouveau logo et la boutique
   ------------------------------------------------------------------------- */
:root {
  /* Couleurs de marque (issues du logo officiel et de la charte historique) */
  --ink: #241407;            /* texte principal, chaud et lisible */
  --brun-900: #170c00;       /* brun profond historique (accents forts) */
  --brun-700: #3b2414;       /* boutons, titres */
  --brun-500: #6b4a30;       /* texte secondaire, légendes */
  --taupe: #c6b995;          /* accent, cercle du logo */
  --taupe-100: #ece4d1;      /* fond de section alterné */
  --cream: #faf6ee;          /* fond principal */
  --cream-100: #fffdf8;      /* cartes / surfaces claires */
  --kraft: #b98650;          /* accent chaud (packaging) */
  --white: #ffffff;

  /* Typographie */
  --font-serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Échelle fluide */
  --fs-h1: clamp(2rem, 1.4rem + 3vw, 3.6rem);
  --fs-h2: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  --fs-h3: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  --fs-lead: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
  --fs-body: 1rem;

  /* Rythme */
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 1.75rem;
  --space-l: 3rem;
  --space-xl: 5.5rem;

  --container: 1200px;
  --radius: 6px;
  --shadow-soft: 0 12px 30px -12px rgba(23, 12, 0, 0.35);

  --transition: 320ms cubic-bezier(.22,.61,.36,1);
}

/* -------------------------------------------------------------------------
   3. ÉLÉMENTS DE BASE
   ------------------------------------------------------------------------- */
body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden; /* garde-fou anti débordement horizontal */
}

h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--brun-900);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: 0.01em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { max-width: 38em; }
p.lead { font-size: var(--fs-lead); color: var(--brun-700); }

a { text-decoration: none; }
a.text-link {
  text-decoration: underline;
  text-decoration-color: var(--taupe);
  text-underline-offset: 3px;
}
a.text-link:hover { text-decoration-color: var(--brun-700); }

/* -------------------------------------------------------------------------
   4. UTILITAIRES DE MISE EN PAGE
   ------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-s);
}

.section {
  padding-block: var(--space-xl);
}
.section--alt { background: var(--taupe-100); }
.section__head {
  max-width: 44em;
  margin-bottom: var(--space-l);
}
.section__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kraft);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.grid-2 {
  display: grid;
  gap: var(--space-l);
  grid-template-columns: 1fr;
  align-items: center;
}

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

/* -------------------------------------------------------------------------
   5. ACCESSIBILITÉ
   ------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: -120px;
  transform: translateX(-50%);
  background: var(--brun-900);
  color: var(--white);
  padding: 0.6em 1.2em;
  border-radius: var(--radius);
  z-index: 200;
  transition: top var(--transition);
}
.skip-link:focus { top: 12px; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------------------------------------------------------------------------
   6. EN-TÊTE / NAVIGATION
   ------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(23, 12, 0, 0.08);
}
/* Fond flouté sur un pseudo-élément : un backdrop-filter directement sur le header
   en ferait le bloc conteneur du tiroir mobile (position: fixed) et le tronquerait. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  padding-block: 0.6rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand img { height: 52px; width: auto; }
.brand__name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--brun-900);
  line-height: 1.1;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--brun-700);
  border-radius: var(--radius);
  color: var(--brun-900);
}
.nav-toggle__bars { display: flex; flex-direction: column; gap: 3px; }
.nav-toggle__bars span { width: 18px; height: 2px; background: currentColor; display: block; }

.primary-nav {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(86vw, 360px);
  background: var(--cream-100);
  padding: var(--space-l) var(--space-m);
  transform: translateX(100%);
  transition: transform var(--transition);
  overflow-y: auto;
  box-shadow: var(--shadow-soft);
}
.primary-nav[data-open="true"] { transform: translateX(0); }
.primary-nav__close {
  position: absolute;
  top: var(--space-s);
  right: var(--space-s);
  font-size: 1.6rem;
  color: var(--brun-900);
}
.primary-nav__list { display: flex; flex-direction: column; gap: 1.1rem; margin-top: var(--space-l); }
.primary-nav__list a {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--brun-900);
}
.primary-nav__lang { display: flex; gap: 0.8rem; margin-top: var(--space-l); }
.primary-nav__lang a, .primary-nav__lang span {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--brun-500);
}
.primary-nav__lang [aria-current="true"] { color: var(--brun-900); font-weight: 700; }

.nav-scrim {
  position: fixed; inset: 0;
  background: rgba(23,12,0,0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition);
  z-index: 90;
}
.nav-scrim[data-open="true"] { opacity: 1; visibility: visible; }

.header-cta { display: flex; align-items: center; gap: 0.6rem; }

/* -------------------------------------------------------------------------
   7. HERO
   ------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  opacity: 0;
  transition: opacity 900ms ease;
}
.hero__video.is-playing { opacity: 1; }
.hero__pause {
  position: absolute;
  right: var(--space-m);
  bottom: var(--space-m);
  z-index: 2;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.55);
  background: rgba(23,12,0,0.45);
  color: var(--white);
  font-size: 0.8rem;
  letter-spacing: -0.1em;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.hero__pause:hover { background: rgba(23,12,0,0.7); }
.hero__pause[hidden] { display: none; }
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23,12,0,0.05) 0%, rgba(23,12,0,0.35) 55%, rgba(23,12,0,0.78) 100%);
}
.hero__content {
  position: relative;
  z-index: 1;
  color: var(--white);
  padding-block: var(--space-l) var(--space-l);
  max-width: 46em;
}
.hero__content h1 { color: var(--white); }
.hero__content p.lead { color: rgba(255,255,255,0.92); }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: var(--space-m);
}

/* -------------------------------------------------------------------------
   8. CHAPITRE VIDÉO
   ------------------------------------------------------------------------- */
.film {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.film__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--brun-900);
}
.film__frame video, .film__frame img, .film__frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.film__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(23,12,0,0.18);
}
.film__play-btn {
  width: 78px; height: 78px;
  border-radius: 50%;
  background: rgba(250,246,238,0.92);
  color: var(--brun-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transition: transform var(--transition), background var(--transition);
}
.film__play-btn:hover { transform: scale(1.06); background: var(--white); }
.film__frame iframe { border: 0; }
.film__note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.film__note {
  margin-top: var(--space-s);
  font-size: 0.9rem;
  color: var(--brun-500);
}

/* -------------------------------------------------------------------------
   9. MAISON — TROIS TEMPS
   ------------------------------------------------------------------------- */
.timeline {
  display: grid;
  gap: var(--space-l);
}
.timeline__item {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: 1fr;
  align-items: center;
}
.timeline__figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.timeline__year {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--kraft);
  text-transform: uppercase;
}

/* -------------------------------------------------------------------------
   10. SAVOIR-FAIRE
   ------------------------------------------------------------------------- */
.savoir-faire__list {
  display: grid;
  gap: var(--space-m);
  margin-top: var(--space-m);
}
.savoir-faire__list li {
  padding-left: 1.4rem;
  position: relative;
  color: var(--brun-700);
}
.savoir-faire__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--kraft);
}

/* -------------------------------------------------------------------------
   11. NOS CAFÉS → BOUTIQUE
   ------------------------------------------------------------------------- */
.produits__grid {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(2, 1fr);
}
.product-card {
  background: var(--cream-100);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}
.product-card img { aspect-ratio: 2 / 3; object-fit: cover; }
.product-card__body { padding: var(--space-s) var(--space-m) var(--space-m); }
.product-card__body h3 { margin-bottom: 0.35rem; }
.product-card__body p { font-size: 0.92rem; color: var(--brun-500); }
.cafes__points {
  display: grid;
  gap: 0.9rem;
  margin-top: var(--space-m);
}
.cafes__points h3 { font-size: 1.05rem; margin-bottom: 0.15rem; }
.cafes__points p { font-size: 0.92rem; color: var(--brun-500); }
.cafes__figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* -------------------------------------------------------------------------
   12. PROFESSIONNELS
   ------------------------------------------------------------------------- */
.pro__split {
  display: grid;
  gap: var(--space-m);
  margin-top: var(--space-l);
}
.pro__card {
  background: var(--cream-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.pro__card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.pro__card img.is-shop { object-position: top center; }
.pro__card-body {
  padding: var(--space-m);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}
.pro__card-kicker {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kraft);
}
.pro__card h3 { font-size: var(--fs-h3); }
.pro__card p { color: var(--brun-700); }
.pro__card .btn { margin-top: auto; align-self: flex-start; }

/* -------------------------------------------------------------------------
   13. BANDEAU DE CONFIANCE
   ------------------------------------------------------------------------- */
.trust-mark {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-m) var(--space-l);
  margin-bottom: var(--space-l);
}
.trust-mark img { height: 140px; width: auto; }

.trust {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: repeat(2, 1fr);
  text-align: center;
}
.trust__item {
  padding: var(--space-m) var(--space-s);
  border: 1px solid rgba(23,12,0,0.12);
  border-radius: var(--radius);
  background: var(--cream-100);
}
.trust__item strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--brun-900);
  margin-bottom: 0.3rem;
}
.trust__item span { font-size: 0.88rem; color: var(--brun-500); }

/* -------------------------------------------------------------------------
   14. CONTACT
   ------------------------------------------------------------------------- */
.contact__grid {
  display: grid;
  gap: var(--space-l);
  grid-template-columns: 1fr;
  align-items: center;
}
.contact__figure img { border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.contact__list { display: grid; gap: 0.6rem; margin-top: var(--space-m); }
.contact__list a { font-weight: 600; }

/* -------------------------------------------------------------------------
   15. PIED DE PAGE
   ------------------------------------------------------------------------- */
.site-footer {
  background: var(--brun-900);
  color: var(--taupe-100);
  padding-block: var(--space-l);
  margin-top: var(--space-xl);
}
.site-footer a { color: var(--taupe-100); }
.site-footer a:hover { color: var(--white); }
.footer__grid {
  display: grid;
  gap: var(--space-m);
  grid-template-columns: 1fr;
}
.footer__brand img { height: 46px; width: auto; margin-bottom: var(--space-s); }
.footer__brand p + p { margin-top: 0.3rem; }
.footer__title { font-family: var(--font-serif); font-size: 1.05rem; color: var(--white); margin-bottom: 0.6rem; }
.footer__title a { color: var(--white); }
.footer__col li { padding: 0.2rem 0; font-size: 0.92rem; }
.footer__col a:hover, .footer__title a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 640px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1040px) {
  .footer__grid { grid-template-columns: 1.3fr repeat(4, 1fr); gap: var(--space-l) var(--space-m); }
}
.footer__meta {
  margin-top: var(--space-l);
  font-size: 0.82rem;
  opacity: 0.75;
}

/* -------------------------------------------------------------------------
   16. BOUTONS / CTA
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85em 1.5em;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--kraft);
  color: var(--brun-900);
  box-shadow: 0 10px 24px -10px rgba(185, 134, 80, 0.65);
}
.btn--primary:hover { background: #c9975f; }

.btn--secondary {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.75);
}
.btn--secondary:hover { background: rgba(255,255,255,0.12); }

.btn--ghost {
  background: transparent;
  color: var(--brun-900);
  border: 1.5px solid var(--brun-700);
}
.btn--ghost:hover { background: var(--brun-900); color: var(--white); }

.btn--small { padding: 0.55em 1em; font-size: 0.85rem; }

/* -------------------------------------------------------------------------
   17. ANIMATIONS D'APPARITION AU SCROLL
   ------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}
[data-reveal="in"] {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------------------
   18. MEDIA QUERIES — TABLETTE / DESKTOP
   ------------------------------------------------------------------------- */
@media (min-width: 640px) {
  .produits__grid { grid-template-columns: repeat(3, 1fr); }
  .trust { grid-template-columns: repeat(4, 1fr); }
  .pro__split { grid-template-columns: 1fr 1fr; align-items: stretch; }
}

/* Menu horizontal : seulement quand il y a la place (évite les retours à la ligne) */
@media (min-width: 1180px) {
  .nav-toggle { display: none; }
  .primary-nav {
    position: static;
    inset: auto;
    width: auto;
    transform: none;
    background: transparent;
    padding: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: var(--space-m);
  }
  .primary-nav__close { display: none; }
  .primary-nav__list {
    flex-direction: row;
    gap: 1.6rem;
    margin-top: 0;
  }
  .primary-nav__list a {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
  }
  .primary-nav__lang { margin-top: 0; }
  .nav-scrim { display: none; }
}

@media (min-width: 860px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .timeline__item { grid-template-columns: 1fr 1fr; }
  .timeline__item:nth-child(even) .timeline__figure { order: 2; }
  .contact__grid { grid-template-columns: 1.1fr 0.9fr; }
}

@media (min-width: 1100px) {
  .hero { min-height: 92vh; }
}


/* -------------------------------------------------------------------------
   19. PAGES DE RUBRIQUE (Nos produits, Savoir-faire)
   ------------------------------------------------------------------------- */
.page-head { padding-block: var(--space-l); }
.page-head h1 { max-width: 20em; margin-bottom: var(--space-s); }
.page-head .lead { max-width: 40em; }

.breadcrumb { margin-bottom: var(--space-m); font-size: 0.85rem; color: var(--brun-500); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.3rem 0.5rem; }
.breadcrumb li + li::before { content: "\203A"; margin-right: 0.5rem; color: var(--kraft); }
.breadcrumb a {
  text-decoration: underline;
  text-decoration-color: var(--taupe);
  text-underline-offset: 3px;
}
.breadcrumb a:hover { text-decoration-color: var(--brun-700); }

.hub-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-m);
}
.hub-card {
  position: relative;
  flex: 1 1 100%;
  background: var(--cream-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition);
}
.hub-card:hover, .hub-card:focus-within { transform: translateY(-4px); }
.hub-card:focus-within { outline: 3px solid var(--kraft); outline-offset: 2px; }
.hub-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hub-card img.pos-low { object-position: 50% 82%; }
.hub-card__body {
  padding: var(--space-m);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}
.hub-card__body h2 { font-size: var(--fs-h3); }
.hub-card__link { text-decoration: none; }
.hub-card__link:focus-visible { outline: none; }
.hub-card__link::after { content: ""; position: absolute; inset: 0; } /* toute la carte est cliquable */
.hub-card__body p { color: var(--brun-700); font-size: 0.97rem; }
.hub-card__more { margin-top: auto; padding-top: 0.4rem; font-weight: 700; font-size: 0.9rem; color: var(--brun-700); }
.hub-card:hover .hub-card__more { text-decoration: underline; text-underline-offset: 4px; }

.cta-band { max-width: 46em; margin-inline: auto; text-align: center; }
.cta-band p { margin-inline: auto; }
.cta-band h2 { margin-bottom: var(--space-s); }
.cta-band .btn-row { justify-content: center; margin-top: var(--space-m); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-s); }
.section-more { margin-top: var(--space-l); }

.primary-nav__list a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--kraft);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

@media (min-width: 640px) {
  .hub-card { flex: 0 1 calc((100% - var(--space-m)) / 2); }
}
@media (min-width: 1040px) {
  .hub-grid--3 .hub-card { flex: 0 1 calc((100% - 2 * var(--space-m)) / 3); }
}

/* -------------------------------------------------------------------------
   20. PAGE PRODUIT : CAFES (formats, melanges Maison, Grands Crus)
   ------------------------------------------------------------------------- */
.page-anchors { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: var(--space-m); }
.page-anchors a {
  display: inline-block;
  padding: 0.45rem 1rem;
  border: 1px solid var(--taupe);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--white);
}
.page-anchors a:hover { border-color: var(--brun-700); }

.prose { max-width: 46em; }
.prose p + p { margin-top: var(--space-s); }

.format-row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-m); margin-top: var(--space-m); }
.format { flex: 1 1 200px; max-width: 260px; text-align: center; }
.format img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  background: #17120e;
}
.format h3 { margin-top: var(--space-s); }
.format p { color: var(--brun-700); font-size: 0.95rem; }

.blend-grid { display: grid; gap: var(--space-s); grid-template-columns: 1fr; margin-top: var(--space-m); }
.blend {
  background: var(--cream-100);
  border-radius: var(--radius);
  padding: var(--space-m);
  box-shadow: var(--shadow-soft);
}
.blend h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.blend p { color: var(--brun-700); font-size: 0.95rem; }

.cru-grid { display: grid; gap: var(--space-m); grid-template-columns: 1fr; margin-top: var(--space-m); }
.cru {
  background: var(--cream-100);
  border-left: 3px solid var(--kraft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-m);
  box-shadow: var(--shadow-soft);
}
.cru h3, .cru h4 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.cru__meta { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brun-500); margin-bottom: 0.5rem; }
.cru p { color: var(--brun-700); font-size: 0.95rem; }
.cru p + p { margin-top: 0.6rem; }
.cru__tags { margin-top: 0.7rem; }
.badge {
  display: inline-block;
  margin: 0 0.3rem 0.3rem 0;
  padding: 0.1rem 0.6rem;
  border: 1px solid var(--taupe);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brun-700);
  background: var(--white);
}

.origin-group { margin-top: var(--space-l); }
.origin-group > h3 { margin-bottom: 0.2rem; }
.section__head + .origin-group { margin-top: 0; }
.origin-group .prose { margin-top: 0.6rem; }

@media (min-width: 640px) {
  .blend-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 860px) {
  .cru-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1040px) {
  .blend-grid { grid-template-columns: repeat(3, 1fr); }
  .cru-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .blend-grid .blend:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
}

/* -------------------------------------------------------------------------
   21. CARTES PRODUIT (jus, nectars, sucres)
   ------------------------------------------------------------------------- */
.item-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-m); margin-top: var(--space-m); }
.item-card {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  background: var(--cream-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.item-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.item-card__body { padding: var(--space-m); display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.item-card__kicker { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brun-500); }
.item-card h3 { font-size: var(--fs-h3); }
.item-card__body > p { color: var(--brun-700); font-size: 0.97rem; }
.item-card__facts {
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid var(--taupe-100);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 0.9rem;
  font-size: 0.88rem;
  color: var(--brun-700);
}
.item-card__facts dt { font-weight: 700; }

.item-card .chip-list { margin-top: 0.4rem; }
.item-card .chip-list li { font-size: 0.82rem; padding: 0.28rem 0.7rem; }

@media (min-width: 640px) {
  .item-card { flex: 0 1 calc((100% - var(--space-m)) / 2); }
}
@media (min-width: 1040px) {
  .item-card { flex: 0 1 calc((100% - 2 * var(--space-m)) / 3); }
}

/* -------------------------------------------------------------------------
   22. PAGE PRODUIT : CONFITURES ET CONDIMENTS
   ------------------------------------------------------------------------- */
.media img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow-soft); }

.stat-grid { display: grid; gap: var(--space-s); grid-template-columns: 1fr; margin-top: var(--space-m); }
.stat {
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--space-s) var(--space-m);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.2rem 1rem;
  align-items: center;
}
.stat__num { font-family: var(--font-serif); font-size: 2rem; line-height: 1; color: var(--brun-900); font-variant-numeric: lining-nums; }
.stat__label { font-size: 0.95rem; color: var(--brun-700); }
.stat__label strong { display: block; color: var(--brun-900); }

.chip-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: var(--space-m); }
.chip-list li {
  background: var(--white);
  border: 1px solid var(--taupe);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-size: 0.92rem;
  color: var(--brun-700);
}

/* -------------------------------------------------------------------------
   23. PAGE PRODUIT : CACAO, THÉS ET ACCOMPAGNEMENTS
   ------------------------------------------------------------------------- */
.range-grid { display: grid; gap: var(--space-m); grid-template-columns: 1fr; margin-top: var(--space-m); }
.range {
  background: var(--cream-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: var(--space-m);
}
.range h3 { font-size: var(--fs-h3); margin-bottom: 0.35rem; }
.range__note { color: var(--brun-700); font-size: 0.95rem; margin-bottom: 0.6rem; }
.range__list li {
  padding: 0.5rem 0;
  border-top: 1px solid var(--taupe-100);
  font-size: 0.95rem;
  color: var(--brun-700);
}
.range__list li strong { color: var(--brun-900); }
.range__list small { display: block; font-size: 0.85rem; color: var(--brun-500); }
.range__link { margin-top: 0.8rem; font-size: 0.95rem; }
.range__link a { font-weight: 700; }

@media (min-width: 640px) {
  .range-grid { grid-template-columns: repeat(2, 1fr); }
}

/* -------------------------------------------------------------------------
   24. CAFÉS : profils, intensité, liens boutique
   ------------------------------------------------------------------------- */
.blend, .cru { display: flex; flex-direction: column; }
.blend .blend__profile { margin-top: 0.6rem; font-size: 0.88rem; color: var(--brun-500); }
.blend .blend__foot, .cru .cru__foot {
  margin-top: auto;
  padding-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  font-size: 0.88rem;
}
.cru .cru__foot { border-top: 1px solid var(--taupe-100); margin-top: auto; }
.blend .blend__profile + .blend__foot, .blend .cru__tags + .blend__foot { border-top: 1px solid var(--taupe-100); }
.blend .blend__foot { border-top: 1px solid var(--taupe-100); }
.blend__foot a, .cru__foot a { font-weight: 700; }
.cru .cru__profile { font-size: 0.88rem; color: var(--brun-500); }

/* Texte complet d'un café : bloc repliable « En savoir plus » */
.more { margin-top: 0.7rem; }
.more > summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brun-900);
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  border: 1px solid var(--taupe);
  border-radius: 50%;
  font-size: 0.95rem;
  line-height: 1;
}
.more[open] > summary::before { content: "\2212"; }
.more > summary:focus-visible { outline: 2px solid var(--brun-500); outline-offset: 3px; border-radius: 4px; }
.more__body { margin-top: 0.6rem; }
.blend .more__body p, .cru .more__body p { font-size: 0.92rem; }

.intensity-line { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--brun-700); }
.intensity { display: inline-flex; gap: 0.2rem; }
.intensity i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--taupe); }
.intensity i.on { background: var(--brun-500); }

/* -------------------------------------------------------------------------
   25. PAGES SAVOIR-FAIRE, NOTRE HISTOIRE, PROFESSIONNELS, CONTACT
   ------------------------------------------------------------------------- */
.stat-grid--wide .stat { grid-template-columns: 7rem 1fr; }
.stat-grid--wide .stat__num { font-size: 1.7rem; }
@media (min-width: 640px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1040px) {
  .range-grid--3 { grid-template-columns: repeat(3, 1fr); }
}
.prose h2 { margin-bottom: var(--space-s); }
.prose a, .link-list a, .press-list a { font-weight: 600; }
.prose p a, .press-list a { text-decoration: underline; text-decoration-color: var(--kraft); text-underline-offset: 3px; }
.prose ul.range__list { margin-top: var(--space-s); }

/* Frise chronologique (petite histoire du café) */
.chrono { max-width: 46em; display: grid; gap: 0; }
.chrono li {
  display: grid;
  gap: 0.3rem 1.5rem;
  grid-template-columns: 1fr;
  padding: 0.8rem 0 0.8rem 1.2rem;
  border-left: 2px solid var(--taupe);
}
.chrono__year { font-family: var(--font-serif); font-size: 1.05rem; color: var(--kraft); letter-spacing: 0.04em; font-weight: 700; }
.chrono p { color: var(--brun-700); }
.chrono p + p { margin-top: 0.5rem; }
@media (min-width: 640px) {
  .chrono li { grid-template-columns: 11rem 1fr; }
}

/* Revue de presse */
.press-list { max-width: 52em; }
.press-list li {
  display: grid;
  gap: 0.2rem 1.5rem;
  grid-template-columns: 1fr;
  padding: var(--space-s) 0;
  border-top: 1px solid var(--taupe-100);
}
.press-list li:last-child { border-bottom: 1px solid var(--taupe-100); }
.press-list__date { font-weight: 700; color: var(--brun-500); font-size: 0.9rem; letter-spacing: 0.03em; }
.press-list__media { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brun-500); }
.press-list p { color: var(--brun-700); }
.press-list strong { color: var(--brun-900); }
.press-year { margin: var(--space-l) 0 var(--space-s); font-size: var(--fs-h3); }
@media (min-width: 640px) {
  .press-list li { grid-template-columns: 11rem 1fr; }
}

/* Liens et crédits */
.link-list { max-width: 46em; display: grid; gap: var(--space-s); }
.link-list li { padding: var(--space-s) 0; border-top: 1px solid var(--taupe-100); color: var(--brun-700); }
.link-list li:last-child { border-bottom: 1px solid var(--taupe-100); }
.link-list small { display: block; margin-top: 0.2rem; color: var(--brun-500); font-size: 0.9rem; }

/* Plan du site */
.sitemap-grid { display: grid; gap: var(--space-m); grid-template-columns: 1fr; }
.sitemap-grid h2 { font-size: var(--fs-h3); margin-bottom: var(--space-xs); }
.sitemap-grid li { padding: 0.35rem 0; }
.sitemap-grid a { font-weight: 600; }
@media (min-width: 640px) { .sitemap-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .sitemap-grid { grid-template-columns: repeat(3, 1fr); } }

/* Contact */
.contact-block { font-style: normal; }
.contact-block__name { font-family: var(--font-serif); font-size: 1.3rem; color: var(--brun-900); }
.opening { margin-top: var(--space-m); }
.opening h2, .opening h3 { font-size: var(--fs-h3); margin-bottom: 0.3rem; }

/* -------------------------------------------------------------------------
   26. MENU : sous-menus, Contact, boutons Professionnels / Boutique
   27. DECOR : illustrations en filigrane (grands écrans uniquement)
   28. CARTE DES ORIGINES : grande carte des pays de nos cafés
   Mobile : tiroir avec rubriques en accordéon. Bureau (>= 1180px) : barre
   horizontale, sous-menus déroulants au survol ou au clic sur la flèche.
   ------------------------------------------------------------------------- */
.primary-nav__list { gap: 0; }
.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--taupe-100);
}
.nav-item a { flex: 1; padding: 0.85rem 0; }
.sub-toggle {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  color: var(--brun-500);
}
.sub-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translate(-50%, -70%) rotate(45deg);
  transition: transform var(--transition);
}
.has-sub[data-open="true"] .sub-toggle::after { transform: translate(-50%, -25%) rotate(-135deg); }
.subnav { display: none; padding: 0.2rem 0 0.8rem 0.9rem; }
.has-sub[data-open="true"] .subnav { display: block; }
.primary-nav__list .subnav a {
  display: block;
  padding: 0.45rem 0;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--brun-500);
}
.primary-nav__list .subnav a:hover { color: var(--brun-900); }

.primary-nav__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.8rem;
  margin-top: var(--space-m);
}
.primary-nav__contact {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--brun-900);
  padding: 0.4rem 0;
}
.primary-nav__actions .btn { justify-content: center; padding-block: 0.8em; font-size: 0.95rem; }
.primary-nav__contact[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--kraft);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.primary-nav__actions .btn--ghost[aria-current="page"] { background: var(--brun-900); color: var(--white); }

@media (min-width: 1180px) {
  .primary-nav { gap: var(--space-m); overflow: visible; }
  .primary-nav__list { gap: 1.5rem; align-items: center; }
  .nav-item { border-bottom: 0; justify-content: flex-start; gap: 0.1rem; }
  .nav-item a { flex: none; padding: 1.1rem 0; }
  .primary-nav__list a:hover { text-decoration: underline; text-decoration-color: var(--kraft); text-decoration-thickness: 2px; text-underline-offset: 6px; }
  .sub-toggle { width: 22px; height: 28px; }
  .has-sub { position: relative; }
  .subnav {
    display: block;
    position: absolute;
    left: -1rem;
    top: calc(100% + 6px);
    min-width: 16rem;
    padding: 0.5rem;
    background: var(--cream-100);
    border: 1px solid rgba(23, 12, 0, 0.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    z-index: 110;
  }
  .subnav::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
  .has-sub:hover .subnav,
  .has-sub[data-open="true"] .subnav { opacity: 1; visibility: visible; transform: none; }
  .has-sub:hover .sub-toggle::after { transform: translate(-50%, -25%) rotate(-135deg); }
  .primary-nav__list .subnav a {
    padding: 0.55rem 0.8rem;
    border-radius: 4px;
    color: var(--brun-900);
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
  }
  .primary-nav__list .subnav a:hover { background: var(--taupe-100); text-decoration: none; }
  .primary-nav__actions {
    flex-direction: row;
    align-items: center;
    gap: 0.9rem;
    margin-top: 0;
    padding-left: 1.5rem;
    border-left: 1px solid rgba(23, 12, 0, 0.15);
  }
  .primary-nav__contact { font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600; padding: 0; margin-right: 0.3rem; white-space: nowrap; }
  .primary-nav__contact:hover { text-decoration: underline; text-decoration-color: var(--kraft); text-decoration-thickness: 2px; text-underline-offset: 6px; }
  .primary-nav__actions .btn { padding-block: 0.55em; font-size: 0.85rem; }
}

/* -------------------------------------------------------------------------
   27. DECOR : illustrations en filigrane (grands écrans uniquement)
   28. CARTE DES ORIGINES : grande carte des pays de nos cafés
   Traits fins, placés dans les marges des sections (branche du logo, comme
   sur les paquets, horizontale et sans vert ni rouge ; tasse, paquet et
   grains). Purement décoratif : pseudo-éléments, aucun contenu, rien sur
   mobile/tablette.
   Les motifs tournent selon le rang de la section : droite/gauche en
   alternance, jamais deux fois le même d'affilée.
   ------------------------------------------------------------------------- */
@media (min-width: 1100px) {
  main > .page-head { position: relative; overflow-x: clip; }
  main > .page-head > .container { position: relative; z-index: 1; }
  main > .page-head h1 { max-width: min(20em, 820px); }

  /* En-tête de page : branche du logo, collée au bord droit */
  main > .page-head::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: 6%;
    bottom: 6%;
    right: 0;
    width: clamp(280px, 32vw, 560px);
    background: url("/assets/deco/plante.webp") no-repeat right center / contain;
    opacity: 0.9;
    pointer-events: none;
  }
}

@media (min-width: 1320px) {
  main > .section {
    position: relative;
    overflow-x: clip;
    /* largeur du motif proportionnelle à la marge libre de chaque côté */
    --deco-base: clamp(170px, calc((100vw - var(--container)) * 0.8), 420px);
    --deco-w: var(--deco-base);
  }
  main > .section > .container { position: relative; z-index: 1; }

  /* Base commune des illustrations de section.
     La zone couvre toute la hauteur de la section ; le motif est calé dans
     une tuile à la largeur du motif (proportions de la photo respectées) ; dans
     les sections très longues elle se répète vers le bas, régulièrement espacée
     ("space"). Les motifs sont des WebP à fond transparent (tools/gen-decor-photo.js). */
  main > .section::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 0;
    bottom: 0;
    width: var(--deco-w);
    padding-block: 28px;
    background-repeat: no-repeat;
    background-origin: content-box;
    background-size: contain;
    background-position: center center;
    opacity: var(--deco-o, 0.9);
    pointer-events: none;
  }
  /* rang pair : à droite — rang impair : à gauche (branche miroir, tige vers le bord) */
  main > .section:nth-of-type(even)::before { right: calc(var(--deco-w) * -0.2); }
  main > .section:nth-of-type(odd)::before  { left:  calc(var(--deco-w) * -0.2); transform: scaleX(-1); }

  main > .section:nth-of-type(5n+1)::before { background-image: url("/assets/deco/plante.webp"); --deco-w: calc(var(--deco-base) * 1.15); }
  main > .section:nth-of-type(5n+2)::before { background-image: url("/assets/deco/tasse.webp"); --deco-w: calc(var(--deco-base) * 0.7); }
  main > .section:nth-of-type(5n+3)::before { background-image: url("/assets/deco/paquet.webp"); --deco-w: calc(var(--deco-base) * 0.6); }
  main > .section:nth-of-type(5n+4)::before { background-image: url("/assets/deco/grains.svg"); --deco-w: 300px; }
  main > .section:nth-of-type(5n+5)::before { background-image: url("/assets/deco/plante.webp"); --deco-w: calc(var(--deco-base) * 1.15); }
}

/* -------------------------------------------------------------------------
   28. CARTE DES ORIGINES : grande carte des pays de nos cafés
   Image SVG pleine largeur ; sur petit écran elle défile horizontalement
   (le texte de la carte resterait illisible une fois réduit). La liste des
   pays en dessous répète l'information en texte (accessibilité, SEO).
   ------------------------------------------------------------------------- */
.origins-map { margin: var(--space-l) 0 0; }
.origins-map__scroll {
  /* bords de la carte estompés en douceur */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 5%, #000 92%, transparent), linear-gradient(to right, transparent, #000 2.5%, #000);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent, #000 5%, #000 92%, transparent), linear-gradient(to right, transparent, #000 2.5%, #000);
  mask-composite: intersect;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
}
.origins-map img {
  width: 100%;
  min-width: 760px;
  height: auto;
}
.origins-list {
  display: grid;
  gap: var(--space-m);
  margin-top: var(--space-l);
}
.origins-list h3 { font-size: 1rem; letter-spacing: 0.02em; margin-bottom: 0.6rem; }
@media (min-width: 900px) {
  .origins-list { grid-template-columns: 1.7fr 1fr 1fr; }
}
/* pas de filigrane derrière la carte, et un filet avant la section suivante */
main > .section--origines::before { display: none; }
.section--origines + .section:not(.section--alt) { border-top: 1px solid rgba(185, 134, 80, 0.28); }
