/* ============================================================
   Cosme.Tiic — Éditorial pastel
   ============================================================ */

:root {
  /* Palette */
  --bg: #f3f8fb;
  --bg-2: #ebf2f8;
  --paper: #ffffff;
  --text: #1f3144;
  --text-soft: #5b6c7e;
  --text-mute: #8a98a8;
  --accent: #2a4660;

  /* Pastels (saturated / soft pairs) */
  --coral: #f6b3a4;       --coral-soft: #fbdcd3;
  --cream: #fde9b0;       --cream-soft: #fdf3d8;
  --sky:   #bde6f3;       --sky-soft:   #e3f1f8;
  --mint:  #bfe5cc;       --mint-soft:  #dff0e2;

  /* Lines + shadows */
  --line:        rgba(31,49,68,0.06);
  --line-mid:    rgba(31,49,68,0.10);
  --line-strong: rgba(31,49,68,0.18);
  --shadow-soft: 0 14px 30px -10px rgba(31,49,68,0.20);
  --shadow-sm:   0 4px 14px -6px rgba(31,49,68,0.16);
  --shadow-xs:   0 2px 6px -2px rgba(31,49,68,0.10);
  --shadow-lift: 0 24px 50px -18px rgba(31,49,68,0.28);

  /* Radii */
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --r-pill: 999px;

  /* Type */
  --font-serif:        'Fraunces', 'Georgia', serif;
  --font-serif-ital:   'DM Serif Display', 'Georgia', serif;
  --font-sans:         'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:         ui-monospace, 'SF Mono', 'Menlo', 'Consolas', monospace;

  /* Layout */
  --stage: clamp(1100px, 88vw, 1600px);
  --gutter: clamp(20px, 4vw, 56px);
}

[data-theme="dark"] {
  --bg: #131a22;
  --bg-2: #1a232d;
  --paper: #1d2731;
  --text: #e8eff5;
  --text-soft: #a7b6c5;
  --text-mute: #6f8090;
  --accent: #bde6f3;

  --coral: #d68a7c;       --coral-soft: #3a2a26;
  --cream: #c9b078;       --cream-soft: #36301f;
  --sky:   #7fb5c8;       --sky-soft:   #1f303a;
  --mint:  #88b69a;       --mint-soft:  #1f2f25;

  --line:        rgba(232,239,245,0.08);
  --line-mid:    rgba(232,239,245,0.14);
  --line-strong: rgba(232,239,245,0.22);
  --shadow-soft: 0 14px 30px -10px rgba(0,0,0,0.5);
  --shadow-sm:   0 4px 14px -6px rgba(0,0,0,0.4);
  --shadow-xs:   0 2px 6px -2px rgba(0,0,0,0.3);
  --shadow-lift: 0 24px 50px -18px rgba(0,0,0,0.65);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-wrap: pretty;
  transition: background-color .4s ease, color .4s ease;
}

::selection { background: var(--coral); color: var(--text); }

a { color: inherit; text-decoration: none; }

/* ----- Background blobs ----- */
.bg-blobs {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: drift 22s ease-in-out infinite alternate;
}
[data-theme="dark"] .bg-blob { opacity: 0.28; }
.bg-blob.b1 { top: -10vh; left: -8vw;  width: 46vw; height: 46vw; background: var(--coral-soft); }
.bg-blob.b2 { top: 10vh;  right: -10vw; width: 38vw; height: 38vw; background: var(--cream-soft); animation-delay: -6s; }
.bg-blob.b3 { top: 55vh;  left: 20vw;  width: 32vw; height: 32vw; background: var(--sky-soft); animation-delay: -12s; }
.bg-blob.b4 { top: 85vh;  right: 5vw;  width: 30vw; height: 30vw; background: var(--mint-soft); animation-delay: -18s; }
@keyframes drift {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(4vw, -3vh) scale(1.08); }
}

/* ----- Layout helpers ----- */
.stage {
  width: var(--stage);
  max-width: 100%;
  margin: 0 auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}
.section { padding-block: clamp(48px, 7vw, 110px); position: relative; scroll-margin-top: 72px; }

/* ----- Eyebrow (monospace meta) ----- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--coral);
}
.eyebrow .ref {
  font-family: var(--font-mono);
  color: var(--text-mute);
  font-size: 11px;
}

/* ----- Display titles ----- */
.h-display {
  font-family: var(--font-serif);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 0.95;
  font-size: clamp(48px, 8vw, 116px);
  margin: 0;
  text-wrap: balance;
}
.h-display em {
  font-family: var(--font-serif-ital);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.h-section {
  font-family: var(--font-serif);
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1;
  font-size: clamp(36px, 4.8vw, 64px);
  margin: 0;
  text-wrap: balance;
}
.h-section em {
  font-family: var(--font-serif-ital);
  font-style: italic;
  font-weight: 400;
}
.h-card {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.1;
  font-size: 22px;
  margin: 0;
}
.lede {
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 62ch;
  text-wrap: pretty;
}

/* Highlight (rotated marker) */
.hl {
  background: linear-gradient(180deg, transparent 55%, var(--cream) 55%, var(--cream) 92%, transparent 92%);
  padding-inline: 0.15em;
  display: inline-block;
  transform: rotate(-1.2deg);
}
.hl.coral { background: linear-gradient(180deg, transparent 55%, var(--coral) 55%, var(--coral) 92%, transparent 92%); }
.hl.mint  { background: linear-gradient(180deg, transparent 55%, var(--mint)  55%, var(--mint)  92%, transparent 92%); }
.hl.sky   { background: linear-gradient(180deg, transparent 55%, var(--sky)   55%, var(--sky)   92%, transparent 92%); }

/* ----- Top bar ----- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.topbar-row {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 14px;
  gap: 16px;
}
.brand-mark {
  display: inline-flex; align-items: baseline; gap: 2px;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-mark .balloon {
  display: inline-block;
  background: var(--coral);
  color: var(--text);
  border-radius: 8px;
  padding: 1px 6px;
  transform: rotate(-3deg);
  box-shadow: var(--shadow-xs);
  margin-right: 1px;
}
.brand-mark .dot { color: var(--coral); font-family: var(--font-serif); font-weight: 900; }

.top-nav { display: flex; gap: 4px; align-items: center; }
.top-nav a {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  transition: background .2s ease;
}
.top-nav a:hover { background: var(--line); }
.top-nav .divider { width: 1px; height: 18px; background: var(--line-strong); margin: 0 6px; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-mid);
  border-radius: var(--r-pill);
  padding: 3px;
  background: var(--paper);
}
.lang-switch button {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 0; background: transparent;
  color: var(--text-soft);
  border-radius: var(--r-pill);
  cursor: pointer;
  font-weight: 600;
}
.lang-switch button.active { background: var(--text); color: var(--bg); }
.lang-switch button:disabled { color: var(--text-mute); cursor: not-allowed; opacity: 0.6; }
.lang-switch button:disabled::after {
  content: '∙'; margin-left: 3px; color: var(--coral); font-size: 14px; line-height: 0;
}

.btn {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--text);
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .15s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn.ghost { background: transparent; color: var(--text); }
.btn.coral { background: var(--coral); border-color: var(--coral); color: var(--text); }

/* Mobile menu */
.menu-btn {
  display: none;
  border: 1px solid var(--line-mid);
  background: var(--paper);
  border-radius: var(--r-pill);
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  cursor: pointer;
  padding: 0;
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  content: ''; display: block; width: 16px; height: 1.5px; background: var(--text); border-radius: 2px;
  position: relative;
  transition: transform .2s ease, top .2s ease, background .15s ease;
}
.menu-btn span::before { position: absolute; top: -5px; }
.menu-btn span::after  { position: absolute; top: 5px; }
/* Hamburger → croix quand le panneau est ouvert */
.menu-btn.is-open span { background: transparent; }
.menu-btn.is-open span::before { top: 0; transform: rotate(45deg); }
.menu-btn.is-open span::after  { top: 0; transform: rotate(-45deg); }

/* Conteneur des actions à droite (langue · contribuer · hamburger) */
.topbar-actions { display: flex; gap: 10px; align-items: center; }

/* Panneau déroulant mobile (nav + langue + contribuer). Masqué par défaut ;
   n'apparaît que sous 720px (cf. media query plus bas). */
.mobile-menu { display: none; }

/* ----- Flèche flottante : saut de section en section sur la landing ----- */
.scroll-fab {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 60;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--text);
  background: var(--coral);
  color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
  animation: fab-bob 2.4s ease-in-out infinite;
}
.scroll-fab:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.scroll-fab svg { transition: transform .3s ease; }
.scroll-fab.up { animation: none; }
.scroll-fab.up svg { transform: rotate(180deg); }
@keyframes fab-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .scroll-fab { animation: none; } }

/* ----- Hero ----- */
.hero {
  padding-top: clamp(40px, 7vw, 80px);
  padding-bottom: clamp(40px, 5vw, 80px);
  text-align: center;
  position: relative;
  /* `.stage` porte z-index:1, donc CHAQUE section est un contexte d'empilement :
     le z-index:30 de `.sug-drop` ne vaut qu'à l'intérieur de celui du hero. Face à
     `.recent-section` (une `.stage`, donc z-index:1 elle aussi), c'est l'ordre du
     DOM qui tranchait et les puces « consultés récemment » passaient PAR-DESSUS
     l'autocomplétion. On élève le hero au-dessus des sections suivantes. */
  z-index: 2;
}
.hero-eyebrow { margin-bottom: 24px; }
.balloon-wordmark {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(4px, 0.8vw, 10px);
  margin-bottom: clamp(20px, 3vw, 36px);
}
.balloon-wordmark .glyph {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(54px, 9vw, 120px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  display: inline-block;
  padding: 0.05em 0.18em;
  border-radius: clamp(14px, 1.6vw, 22px);
  box-shadow: var(--shadow-xs);
}
.balloon-wordmark .glyph.coral { background: var(--coral); }
.balloon-wordmark .glyph.cream { background: var(--cream); }
.balloon-wordmark .glyph.sky   { background: var(--sky); }
.balloon-wordmark .glyph.mint  { background: var(--mint); }
.balloon-wordmark .glyph.plain { background: transparent; box-shadow: none; padding-inline: 0; }
.balloon-wordmark .glyph em {
  font-family: var(--font-serif-ital);
  font-style: italic;
  font-weight: 400;
}

.hero-sub {
  font-family: var(--font-serif-ital);
  font-style: italic;
  font-size: clamp(20px, 1.9vw, 26px);
  color: var(--text-soft);
  margin: 0 auto;
  max-width: 36ch;
  line-height: 1.35;
  text-wrap: balance;
}
.hero-sub strong {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--text);
  font-style: normal;
}

/* Search box */
.search-wrap {
  margin-top: clamp(36px, 5vw, 56px);
  position: relative;
  max-width: 760px;
  margin-inline: auto;
}
.search-box {
  display: flex;
  align-items: center;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 8px 8px 8px 22px;
  box-shadow: var(--shadow-soft);
  gap: 12px;
  transition: box-shadow .25s ease, transform .25s ease;
}
.search-box:focus-within {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
  border-color: var(--text);
}
.search-box svg { flex: 0 0 auto; color: var(--text-soft); }
.search-box input {
  flex: 1;
  border: 0; outline: 0;
  background: transparent;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--text);
  padding-block: 14px;
  min-width: 0;
}
.search-box input::placeholder { color: var(--text-mute); font-weight: 500; }
.search-box .scan {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--sky-soft);
  color: var(--text);
  border: 0;
  padding: 10px 14px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
}
.search-box .scan:hover { background: var(--sky); }
.search-box .go {
  background: var(--text);
  color: var(--bg);
  border: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.search-tips {
  margin-top: 18px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  align-items: center;
}
.search-tips .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-right: 4px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--paper);
  border: 1px solid var(--line-mid);
  border-radius: var(--r-pill);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.chip:hover { background: var(--cream-soft); transform: translateY(-1px); }
.chip.barcode { font-family: var(--font-mono); letter-spacing: 0.05em; background: var(--mint-soft); }
.chip.barcode:hover { background: var(--mint); }

/* ----- Stats strip ----- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2vw, 28px);
  margin-top: clamp(56px, 7vw, 96px);
  padding: clamp(20px, 3vw, 32px) clamp(20px, 4vw, 44px);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.stat-item .num {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1;
  letter-spacing: -0.025em;
}
.stat-item .num .small {
  font-size: 0.45em;
  vertical-align: super;
  font-weight: 700;
  color: var(--text-soft);
  margin-left: 4px;
}
.stat-item .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-top: 8px;
}
.stat-item .note {
  font-family: var(--font-serif-ital);
  font-style: italic;
  color: var(--text-mute);
  font-size: 13px;
  margin-top: 4px;
}

/* ----- Section heading block ----- */
.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.section-head .meta-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  justify-content: space-between;
}
.section-head .meta-row .right {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.section-head .lede { margin-top: 8px; }

/* ----- Manifeste columns ----- */
.manifeste-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.manifeste-card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 2.5vw, 32px);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}
.manifeste-card .sigil {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--coral-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 28px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
  transform: rotate(-2deg);
}
.manifeste-card.c2 .sigil { background: var(--cream-soft); }
.manifeste-card.c3 .sigil { background: var(--sky-soft); }
.manifeste-card.c4 .sigil { background: var(--mint-soft); }
.manifeste-card h3 { margin: 0 0 8px; }
.manifeste-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.55;
}
.manifeste-card .footnote {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1.5px dashed var(--line-mid);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* ----- Categories grid ----- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: clamp(14px, 1.6vw, 22px);
}
.cat-tile {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(18px, 2vw, 24px);
  position: relative;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  overflow: hidden;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 200px;
  color: var(--text);
  text-decoration: none;
}
.cat-tile, .cat-tile * { text-decoration: none; }
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); border-color: var(--line-strong); }
.cat-tile .icon-wrap {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 24px;
  box-shadow: var(--shadow-xs);
  transform: rotate(-2deg);
}
.cat-tile.coral .icon-wrap { background: var(--coral); }
.cat-tile.cream .icon-wrap { background: var(--cream); }
.cat-tile.sky   .icon-wrap { background: var(--sky); }
.cat-tile.mint  .icon-wrap { background: var(--mint); }
.cat-tile .num-tag {
  position: absolute; top: 16px; right: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.cat-tile h3 {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.018em;
  margin: 0;
  line-height: 1.1;
}
.cat-tile .sub-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.cat-tile .sub-list li {
  font-size: 13px;
  color: var(--text-soft);
  display: flex; align-items: center; gap: 6px;
  font-weight: 500;
}
.cat-tile .sub-list li::before {
  content: '○'; color: var(--text-mute); font-size: 10px;
}
.cat-tile .count {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1.5px dashed var(--line-mid);
  display: flex; justify-content: space-between; align-items: center;
}
.cat-tile .count .n {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--text-soft);
  font-weight: 700;
}
.cat-tile .count .arrow {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-2);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s ease, transform .2s ease;
}
.cat-tile:hover .count .arrow { background: var(--text); color: var(--bg); transform: translateX(3px); }

/* ----- Featured product cards ----- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(16px, 2vw, 24px);
}
.product-card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  color: var(--text);
  text-decoration: none;
  display: block;
}
.product-card, .product-card * { text-decoration: none; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.product-card .photo {
  height: 220px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 30%, var(--coral-soft), transparent 60%),
    radial-gradient(circle at 70% 80%, var(--cream-soft), transparent 60%),
    var(--bg-2);
  display: flex; align-items: center; justify-content: center;
}
.product-card .photo.cream {
  background:
    radial-gradient(circle at 30% 30%, var(--cream-soft), transparent 60%),
    radial-gradient(circle at 70% 80%, var(--mint-soft), transparent 60%),
    var(--bg-2);
}
.product-card .photo.sky {
  background:
    radial-gradient(circle at 30% 30%, var(--sky-soft), transparent 60%),
    radial-gradient(circle at 70% 80%, var(--coral-soft), transparent 60%),
    var(--bg-2);
}
.product-card .bottle {
  width: 80px; height: 130px;
  border-radius: 18px 18px 14px 14px;
  background: linear-gradient(180deg, var(--paper) 0%, color-mix(in oklab, var(--paper) 88%, var(--text) 12%) 100%);
  border: 1.5px solid var(--line-strong);
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 10px 8px;
  box-shadow: var(--shadow-sm);
}
.product-card .bottle::before {
  content: '';
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  width: 30px; height: 14px;
  background: var(--text);
  border-radius: 6px 6px 2px 2px;
}
.product-card .bottle .ph-stripe {
  height: 6px;
  border-radius: 4px;
  background: var(--coral);
  margin-bottom: 4px;
}
.product-card .bottle .ph-stripe.s2 { height: 3px; background: var(--text-soft); width: 60%; }
.product-card .photo .tags-overlay {
  position: absolute;
  top: 14px; left: 14px;
  display: flex; gap: 6px;
}
.product-card .photo .tag-overlay {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--r-pill);
  background: var(--paper);
  border: 1px solid var(--line-mid);
}
.product-card .photo .ref-overlay {
  position: absolute;
  bottom: 14px; right: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-mute);
  text-transform: uppercase;
}
.product-card .body { padding: 18px 20px 20px; }
.product-card .brand {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.product-card h3 {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.018em;
  margin: 0 0 10px;
  line-height: 1.15;
}
.product-card .meta {
  display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-soft);
  font-weight: 600;
}
.product-card .meta span::after { content: '·'; margin-left: 8px; color: var(--text-mute); }
.product-card .meta span:last-child::after { content: ''; margin: 0; }

/* ----- Big product detail teaser ----- */
.detail-card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  box-shadow: var(--shadow-sm);
}
.detail-card .left {
  background:
    radial-gradient(circle at 25% 25%, var(--cream-soft), transparent 55%),
    radial-gradient(circle at 75% 75%, var(--coral-soft), transparent 55%),
    var(--bg-2);
  padding: clamp(28px, 3vw, 48px);
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 480px;
}
.detail-card .left .topnotes {
  display: flex; justify-content: space-between; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-mute);
}
.detail-card .bigbottle {
  align-self: center;
  width: 160px; height: 240px;
  border-radius: 28px 28px 22px 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f0e8df 100%);
  border: 1.5px solid var(--line-strong);
  position: relative;
  box-shadow: var(--shadow-lift);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 14px 14px 22px;
}
.detail-card .bigbottle::before {
  content: '';
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  width: 56px; height: 28px;
  background: var(--text);
  border-radius: 10px 10px 4px 4px;
}
.detail-card .bigbottle .label-block {
  background: var(--paper);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  border: 1px solid var(--line-mid);
}
.detail-card .bigbottle .label-block .lbrand {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-soft);
}
.detail-card .bigbottle .label-block .lname {
  font-family: var(--font-serif); font-weight: 800; font-size: 13px; letter-spacing: -0.01em; margin-top: 2px;
}
.detail-card .bigbottle .label-block .lvol {
  font-family: var(--font-mono); font-size: 9px; color: var(--text-mute); margin-top: 4px; letter-spacing: 0.1em;
}

.detail-card .left .caption {
  font-family: var(--font-serif-ital); font-style: italic;
  color: var(--text-soft); font-size: 15px; text-align: center; max-width: 28ch; margin: 18px auto 0;
}

.detail-card .right { padding: clamp(28px, 3vw, 44px); display: flex; flex-direction: column; gap: 18px; }
.detail-card .right .brand-line {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-soft);
  display: flex; align-items: center; gap: 10px;
}
.detail-card .right h3 {
  font-family: var(--font-serif); font-weight: 800; font-size: clamp(26px, 2.5vw, 34px); letter-spacing: -0.022em; line-height: 1.05; margin: 0;
}
.detail-card .right h3 em { font-family: var(--font-serif-ital); font-style: italic; font-weight: 400; }
.detail-card .right .desc {
  color: var(--text-soft); font-size: 15px;
}

.kv-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px;
  border-top: 1.5px dashed var(--line-mid);
  border-bottom: 1.5px dashed var(--line-mid);
  padding: 16px 0;
}
.kv-list .k {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-mute);
}
.kv-list .v {
  font-weight: 700; font-size: 14px;
}

.inci-block .inci-head {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px;
}
.inci-block h4 {
  font-family: var(--font-serif); font-weight: 800; font-size: 16px; margin: 0; letter-spacing: -0.01em;
}
.inci-block .inci-meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute); }
.inci-list {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.inci-list .ing {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 5px 11px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.inci-list .ing.coral { background: var(--coral-soft); border-color: color-mix(in oklab, var(--coral) 60%, transparent); }
.inci-list .ing.cream { background: var(--cream-soft); }
.inci-list .ing.sky   { background: var(--sky-soft); }
.inci-list .ing.mint  { background: var(--mint-soft); }

/* ----- API playground ----- */
.playground {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 280px 1fr;
}
.playground .endpoints {
  background: var(--bg-2);
  border-right: 1.5px solid var(--line);
  padding: 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.playground .endpoints .endpoints-head {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-mute);
  margin-bottom: 8px;
}
.endpoint-btn {
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--r-md);
  cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
}
.endpoint-btn:hover { background: var(--paper); }
.endpoint-btn.active {
  background: var(--paper);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}
.endpoint-btn .verb {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--mint);
  display: inline-block;
  background: var(--mint-soft);
  padding: 2px 7px; border-radius: 6px;
  width: max-content;
  color: var(--text);
}
.endpoint-btn .path {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text);
  word-break: break-all;
}
.endpoint-btn .desc {
  font-size: 12px; color: var(--text-soft); margin-top: 2px;
}
.endpoint-tier {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 14px 12px 4px;
  padding-top: 8px;
  border-top: 1.5px dashed var(--line-mid);
  font-weight: 700;
}
.endpoints > .endpoint-tier:first-of-type {
  margin-top: 6px;
  padding-top: 0;
  border-top: 0;
}

.playground .pg-main { padding: clamp(20px, 2vw, 28px); display: flex; flex-direction: column; gap: 16px; }
.url-bar {
  display: flex; align-items: center; gap: 4px;
  flex-wrap: wrap;
  background: var(--bg-2);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 6px 6px 6px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.url-bar .scheme { color: var(--text-mute); }
.url-bar .host { color: var(--text-soft); }
.url-bar .path { color: var(--text); font-weight: 700; }
.url-bar .param-input {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  outline: none;
  min-width: 90px;
  width: auto;
  margin-inline: 1px;
}
.url-bar .param-input:focus { border-color: var(--text); }
.url-bar .punct { color: var(--text-mute); font-family: var(--font-mono); }
.url-bar .run {
  margin-left: auto;
  background: var(--text);
  color: var(--bg);
  border: 0;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.url-bar .run:hover { background: var(--accent); }
.url-bar .run .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }

.pg-tabs {
  display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); padding-bottom: 6px;
}
.pg-tabs button {
  background: transparent; border: 0;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 700;
  color: var(--text-mute);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.pg-tabs button.active { color: var(--text); background: var(--bg-2); }
.pg-tabs .status {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-mute);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 6px;
}
.pg-tabs .status .pill {
  background: var(--mint-soft); color: var(--text); border-radius: var(--r-pill); padding: 2px 8px; font-weight: 700;
  letter-spacing: 0.12em;
}
.pg-tabs .status .pill.loading { background: var(--cream-soft); }

.json-view {
  background: var(--bg-2);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  overflow: auto;
  max-height: 460px;
  white-space: pre-wrap;
  word-break: break-word;
}
.json-view .key { color: var(--accent); font-weight: 700; }
.json-view .str { color: color-mix(in oklab, var(--coral) 40%, var(--text) 60%); }
.json-view .num { color: color-mix(in oklab, var(--mint) 20%, var(--text) 80%); font-weight: 700; }
.json-view .bool { color: color-mix(in oklab, var(--sky) 30%, var(--text) 70%); font-weight: 700; }
.json-view .null { color: var(--text-mute); font-style: italic; }
.json-view .punct { color: var(--text-mute); }
[data-theme="dark"] .json-view .str { color: var(--coral); }

/* ----- Contribute CTA ----- */
.cta-marble {
  border-radius: var(--r-xl);
  padding: clamp(36px, 5vw, 64px);
  background:
    radial-gradient(circle at 15% 20%, var(--coral-soft), transparent 50%),
    radial-gradient(circle at 90% 30%, var(--cream-soft), transparent 55%),
    radial-gradient(circle at 70% 90%, var(--mint-soft), transparent 55%),
    radial-gradient(circle at 25% 80%, var(--sky-soft), transparent 50%),
    var(--paper);
  border: 1.5px solid var(--line);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-marble h2 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  line-height: 1;
}
.cta-marble h2 em { font-family: var(--font-serif-ital); font-weight: 400; }
.cta-marble p {
  font-family: var(--font-serif-ital); font-style: italic;
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--text-soft);
  max-width: 50ch; margin: 0 auto 28px;
}
.cta-marble .ctas { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ----- Footer ----- */
.footer {
  margin-top: clamp(56px, 7vw, 96px);
  padding-block: clamp(40px, 5vw, 72px);
  background: var(--paper);
  border-top: 1.5px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(24px, 3vw, 56px);
}
.footer .f-brand h3 {
  font-family: var(--font-serif); font-weight: 900; font-size: 28px; letter-spacing: -0.022em; margin: 0 0 8px;
}
.footer .f-brand p { color: var(--text-soft); font-size: 14px; margin: 0 0 16px; max-width: 36ch; }
.footer-col h4 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-mute); margin: 0 0 14px; font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; }
.footer-col a:hover { text-decoration: underline; text-underline-offset: 4px; }
.references {
  margin-top: clamp(40px, 4vw, 56px);
  padding-top: 24px;
  border-top: 1.5px dashed var(--line-mid);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 16px;
  font-size: 12px;
  color: var(--text-soft);
}
.references .ref-id {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-mute); margin-right: 8px; font-weight: 700;
}
.footer-foot {
  margin-top: 32px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .detail-card { grid-template-columns: 1fr; }
  .detail-card .left { min-height: 360px; }
  .playground { grid-template-columns: 1fr; }
  .playground .endpoints { border-right: 0; border-bottom: 1.5px solid var(--line); }
  .endpoint-btn { flex-direction: row; align-items: center; gap: 10px; }
  .endpoint-btn .desc { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .top-nav { display: none; }
  .menu-btn { display: inline-flex; }
  /* Langue déplacée dans le hamburger → libère la barre pour le logo */
  .topbar-row .lang-switch { display: none; }
  .brand-mark { font-size: 18px; }
  .mobile-menu {
    display: flex; flex-direction: column;
    gap: 4px;
    padding: 8px var(--gutter) 18px;
    border-top: 1px solid var(--line);
    background: color-mix(in oklab, var(--bg) 92%, transparent);
  }
  .mobile-nav { display: flex; flex-direction: column; }
  .mobile-nav a {
    font-family: var(--font-sans); font-weight: 600; font-size: 16px;
    color: var(--text); text-decoration: none;
    padding: 13px 6px; border-bottom: 1px solid var(--line);
  }
  .mobile-menu-lang {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 14px 6px 8px;
  }
  .mobile-menu-lang .label {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--text-mute);
  }
  .mobile-menu .btn { justify-content: center; margin-top: 6px; }
  .search-box { flex-wrap: wrap; padding: 8px 8px 8px 14px; }
  .search-box .scan { display: none; }
  .stats { grid-template-columns: 1fr; padding: 18px 20px; gap: 18px; }
  .stat-item { padding-bottom: 14px; border-bottom: 1.5px dashed var(--line-mid); }
  .stat-item:last-child { border-bottom: 0; padding-bottom: 0; }
  .stat-item .num { font-size: 32px; }
  .footer-grid { grid-template-columns: 1fr; }
  /* Wordmark hero sur une seule ligne en mobile : pas de retour, taille en vw */
  .balloon-wordmark { flex-wrap: nowrap; gap: clamp(2px, 0.5vw, 5px); }
  .balloon-wordmark .glyph {
    font-size: clamp(22px, 7vw, 50px);
    padding: 0.03em 0.1em;
    border-radius: clamp(8px, 1.4vw, 16px);
  }
  .url-bar { flex-wrap: wrap; }
  .url-bar .run { width: 100%; justify-content: center; margin: 0; }
  .topbar-row .contribute-btn { display: none; }
}
@media (max-width: 480px) {
  .cta-marble { padding: 28px 20px; }
}

/* ── Clés API : ligne d'auth du playground + page développeur (/developpeurs) ── */
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn.danger { background: transparent; border-color: var(--coral); color: var(--coral); }
.btn.danger:hover { background: var(--coral); color: var(--text); }

/* Puce monospace affichant une clé masquée (playground + carte démo). */
.dev-key-chip {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  background: var(--bg-2); border: 1.5px solid var(--line);
  border-radius: var(--r-sm); padding: 3px 9px; color: var(--text-soft);
}

/* Rangée « Authorization: Bearer <clé démo> » sous la barre d'URL du playground. */
.pg-auth {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-family: var(--font-mono); font-size: 12px;
}
.pg-auth-label { color: var(--text-mute); }
.pg-auth-note { color: var(--text-mute); font-style: italic; }
.pg-auth-cta {
  margin-left: auto; font-family: var(--font-sans); font-weight: 700; font-size: 13px;
  color: var(--accent); text-decoration: none; white-space: nowrap;
}
.pg-auth-cta:hover { text-decoration: underline; }

/* Page développeur : blocs, cURL, et révélation unique du token. */
.dev-block { margin-top: 18px; text-align: left; }
.dev-block-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dev-block-head h3 { margin: 0; font-family: var(--font-serif); }
.dev-curl {
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7;
  background: var(--bg-2); border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 14px 16px; overflow-x: auto; white-space: pre; margin: 12px 0;
}
.dev-token-reveal {
  margin-top: 18px; padding: 18px 20px;
  background: var(--mint-soft); border: 1.5px solid var(--mint); border-radius: var(--r-md);
  text-align: left;
}
.dev-token-reveal h3 { margin: 0 0 10px; font-family: var(--font-serif); }
.dev-token {
  display: block; font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 12px 14px; word-break: break-all; color: var(--text);
}
.dev-token-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.dev-token-warn { margin: 12px 0 0; color: var(--coral); font-weight: 700; font-size: 13px; }
.dev-key-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.dev-key-table th {
  text-align: left; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-mute); font-weight: 700;
  padding: 6px 10px; border-bottom: 1.5px solid var(--line);
}
.dev-key-table td { padding: 10px; border-bottom: 1px solid var(--line); }
.dev-key-table tr.revoked { opacity: 0.5; }
.dev-revoked { color: var(--text-mute); font-style: italic; }

/* Cibles tactiles : au doigt, plusieurs pastilles et liens tombaient entre 20
   et 30px de haut, sous le minimum recommandé de 44px. On agrandit la zone
   cliquable sans toucher au rendu pointeur fin. */
@media (pointer: coarse) {
  .menu-btn,
  .chip,
  .top-nav a,
  .lang-switch button,
  .endpoint-btn,
  .url-bar .run,
  .brand-mark,
  .pg-auth-cta {
    min-height: 44px;
  }
  .menu-btn { min-width: 44px; }
  .chip,
  .top-nav a,
  .lang-switch button,
  .brand-mark,
  .pg-auth-cta { display: inline-flex; align-items: center; }
  .url-bar .param-input { min-height: 36px; }
}
