/* ============================================================================
   Seedelli Theme — Shared across all pages
   Source of truth for light/dark tokens, toggle component, accessibility.
   Loaded via <link rel="stylesheet" href="/assets/theme.css"> BEFORE page <style>.
   ============================================================================ */

/* --- Global mobile overflow guard --- */
/* Position:fixed slide-out menu (.u-menu) with translateX(100%) was extending
   document scrollWidth on Safari iOS, causing horizontal scroll on every page.
   This guard prevents that without breaking sticky/fixed elements. */
html, body {
  max-width: 100%;
  overflow-x: hidden;     /* fallback, preserves cross-browser */
  overflow-x: clip;       /* modern Safari/Chrome — keeps sticky context */
}

/* Sticky nav (.u-nav, nav.quiz-nav) sits at top:0 with ~60-80px height.
   Anchor scrolls would land titles UNDER it. Reserve scroll space for any
   heading that may be a scroll target. */
h1, h2, h3, h4, [id] {
  scroll-margin-top: 88px;
}

/* --- Light tokens (defaults) --- */
:root {
  --cream: #FAF6F0;
  --cream-dark: #F0EBE3;
  --green-deep: #2D5016;
  --green-mid: #3D6B22;
  --green-light: #5A8F35;
  --green-pale: #E8F0E0;
  --earth: #8B6914;
  --earth-light: #C49B2A;
  --brown-dark: #1E1708;
  --text-primary: #1A1A1A;
  --text-secondary: #5A5A5A;
  --text-muted: #6B6B5A;
  --red-accent: #A63D2F;
  --red-muted: #8B3425;
  --white: #FFFFFF;
  --nav-bg-scrolled: rgba(250, 246, 240, 0.92);
  --shadow-card: 0 2px 20px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 12px 30px rgba(0,0,0,0.1);
  --border-subtle: rgba(0,0,0,0.08);
  /* Aliases for compat across all page variants */
  --vert1: #2D5016;
  --vert2: #4a7c2e;
  --terre1: #8B6914;
  --bg: #FDF8F0;
  --fg: #333;
  --text: #333;
  --text-light: #666;
  --text-dark: #1A1A1A;
  --border: #e8dcc8;
  --light: #FAF6F0;
  --dark: #1A1A1A;
  --light-gray: #f5f5f5;
  --muted: #8A8A7A;
  --radius: 0.75rem;
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --sm: 0.5rem;
  --bg-white: #FFFFFF;
  --accent: #E07A2F;
  /* Calendar */
  --blue-indoor: #4A7FB5;
  --blue-indoor-bg: #E8F0FA;
  --green-outdoor: #3D6B22;
  --green-outdoor-bg: #E8F0E0;
  --orange-harvest: #C47B20;
  --orange-harvest-bg: #FFF3E0;
  /* Climate zones */
  --zone-ocean: #4A7FB5;
  --zone-continental: #C49B2A;
  --zone-med: #C47B20;
  --zone-mountain: #5A8F35;
  /* Producers */
  --kok: #2D5016;
  --ger: #8B6914;
  --sem: #6B4D0A;
}

/* --- Dark tokens --- */
:root[data-theme="dark"] {
  --cream: #0F1410;
  --cream-dark: #141A15;
  --white: #1A211C;
  --green-deep: #8BC46A;
  --green-mid: #6BA84D;
  --green-light: #9BD87A;
  --green-pale: #1F2A1A;
  --text-primary: #E8EAE0;
  --text-secondary: #A8B0A2;
  --text-muted: #7A8278;
  --earth-light: #D4B24A;
  --red-accent: #E85D4A;
  --nav-bg-scrolled: rgba(15, 20, 16, 0.92);
  --shadow-card: 0 2px 20px rgba(0,0,0,0.5);
  --shadow-card-hover: 0 12px 30px rgba(0,0,0,0.6);
  --border-subtle: rgba(232, 234, 224, 0.1);
  /* Aliases */
  --vert1: #8BC46A;
  --vert2: #6BA84D;
  --terre1: #D4B24A;
  --bg: #0F1410;
  --fg: #E8EAE0;
  --text: #E8EAE0;
  --text-light: #A8B0A2;
  --text-dark: #E8EAE0;
  --border: rgba(232, 234, 224, 0.15);
  --light: #1A211C;
  --dark: #E8EAE0;
  --light-gray: #1A211C;
  --muted: #7A8278;
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --bg-white: #1A211C;
  --accent: #E07A2F;
  /* Calendar (keep same hues, slightly muted) */
  --blue-indoor: #6A9FD5;
  --blue-indoor-bg: rgba(74, 127, 181, 0.15);
  --green-outdoor: #6BA84D;
  --green-outdoor-bg: rgba(61, 107, 34, 0.15);
  --orange-harvest: #D4952A;
  --orange-harvest-bg: rgba(196, 123, 32, 0.15);
  /* Climate zones */
  --zone-ocean: #6A9FD5;
  --zone-continental: #D4B24A;
  --zone-med: #D4952A;
  --zone-mountain: #8BC46A;
  /* Producers */
  --kok: #8BC46A;
  --ger: #D4B24A;
  --sem: #C49B2A;
}

html { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* --- CTAs that use green-deep as BACKGROUND must stay deep green in dark --- */
:root[data-theme="dark"] .nav-cta,
:root[data-theme="dark"] .sticky-cta a,
:root[data-theme="dark"] .btn-primary,
:root[data-theme="dark"] .seasonal-banner .sb-cta {
  background: #2D5016;
  color: #FAF6F0;
}
:root[data-theme="dark"] .nav-cta:hover,
:root[data-theme="dark"] .sticky-cta a:hover,
:root[data-theme="dark"] .btn-primary:hover,
:root[data-theme="dark"] .seasonal-banner .sb-cta:hover {
  background: #3D6B22;
  color: #FAF6F0;
}

/* --- Common dark overrides --- */
:root[data-theme="dark"] .hamburger span { background: #8BC46A; }
:root[data-theme="dark"] .mobile-menu {
  background: #1A211C;
  box-shadow: -4px 0 30px rgba(0,0,0,0.6);
}
:root[data-theme="dark"] .mobile-menu a {
  border-bottom-color: rgba(232, 234, 224, 0.08);
}

/* --- Theme toggle component --- */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  padding: 0;
  font-family: inherit;
}
.theme-toggle:hover {
  color: var(--green-deep);
  border-color: var(--green-deep);
  transform: rotate(15deg);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.theme-toggle-label { display: none; }
.theme-toggle-mobile {
  width: auto;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  gap: 0.6rem;
  justify-content: flex-start;
  margin-top: 1.5rem;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}
.theme-toggle-mobile .theme-toggle-label {
  display: inline;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
}
.theme-toggle-mobile:hover { transform: none; }

/* --- Standard nav layout --- */
nav {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 110;
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--nav-bg-scrolled);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
.nav-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green-deep);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-logo img { width: 48px; height: 48px; object-fit: contain; }
.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}
.nav-links a, .nav-links li a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.3s;
  padding: 0.75rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-links a:hover { color: var(--green-deep); text-decoration: none; }
.nav-links .nav-cta, .nav-cta {
  background: var(--green-deep);
  color: var(--cream) !important;
  padding: 0.65rem 1.6rem;
  border-radius: 60px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.3s;
  text-decoration: none !important;
}
.nav-cta:hover { background: var(--green-mid); }

/* Mobile nav */
.nav-right-mobile { display: none; align-items: center; gap: 0.75rem; }
.hamburger { display: none; background: none; border: none; cursor: pointer; min-width: 44px; min-height: 44px; padding: 10px; z-index: 110; align-items: center; justify-content: center; flex-direction: column; gap: 5px; -webkit-tap-highlight-color: transparent; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--green-deep); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-basket { position: relative; display: flex; align-items: center; color: var(--green-deep); text-decoration: none; }
.basket-count-mobile { position: absolute; top: -6px; right: -8px; background: #E07A2F; color: #fff; font-size: 0.6rem; font-weight: 700; border-radius: 50%; width: 16px; height: 16px; display: none; align-items: center; justify-content: center; }
.mobile-menu-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 95; background: rgba(0,0,0,0.3); }
.mobile-menu-overlay.open { display: block; }
.mobile-menu { display: none; position: fixed; top: 0; right: 0; width: 280px; max-width: 80vw; height: 100vh; background: var(--cream); z-index: 105; padding: 5rem 2rem 2rem; box-shadow: -4px 0 30px rgba(0,0,0,0.1); transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.23,1,0.32,1); flex-direction: column; gap: 0; }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a { display: block; text-decoration: none; color: var(--text-primary); font-size: 1.05rem; font-weight: 500; padding: 1rem 0; border-bottom: 1px solid var(--cream-dark); transition: color 0.2s; }
.mobile-menu a:hover { color: var(--green-deep); }
.mobile-menu a.nav-cta { display: inline-block; margin-top: 1rem; border-bottom: none; text-align: center; }

@media (max-width: 768px) {
  .nav-links { display: none !important; }
  .nav-right-mobile { display: flex; }
  .hamburger { display: flex; }
  .mobile-menu { display: flex; }
}

/* --- Focus-visible accessibility --- */
.theme-toggle:focus-visible,
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--green-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Zone tips (semer-en-* pages) — dark variants --- */
:root[data-theme="dark"] .zone-tip.oceanique { background: rgba(74, 127, 181, 0.12); color: #8BB8E0; }
:root[data-theme="dark"] .zone-tip.continental { background: rgba(196, 155, 42, 0.12); color: #D4C070; }
:root[data-theme="dark"] .zone-tip.mediterraneen { background: rgba(196, 123, 32, 0.12); color: #D4A060; }
:root[data-theme="dark"] .zone-tip.montagnard { background: rgba(90, 143, 53, 0.12); color: #90C870; }

/* --- Sow cards, data cards, detail boxes — elevation in dark --- */
:root[data-theme="dark"] .sow-card,
:root[data-theme="dark"] .data-card,
:root[data-theme="dark"] .detail-box,
:root[data-theme="dark"] .step .detail-box {
  background: var(--white);
  border-color: var(--border-subtle);
}

/* --- Variety page sections that use hardcoded white/cream --- */
:root[data-theme="dark"] .variety-hero { background: var(--white); }
:root[data-theme="dark"] .section { background: var(--white); border-color: var(--border-subtle); }
:root[data-theme="dark"] .block-cultiver { background: var(--white); }
:root[data-theme="dark"] .block-botanique { background: rgba(15, 20, 16, 0.5); }
:root[data-theme="dark"] .badge { background: var(--cream-dark); }
:root[data-theme="dark"] .tag { background: var(--green-pale); }
:root[data-theme="dark"] .fun-fact { background: rgba(212, 178, 74, 0.08); border-left-color: var(--terre1); }
:root[data-theme="dark"] .botanical-id { background: var(--white); border-color: var(--border-subtle); }
:root[data-theme="dark"] .guide-item { background: var(--white); border-color: var(--border-subtle); }
:root[data-theme="dark"] .variety-card { background: var(--white); border-color: var(--border-subtle); }

/* --- Footer dark (hardcoded rgba cream → use variables) --- */
:root[data-theme="dark"] footer { background: #0A0D08; }

/* --- Badge harvest/sow colors in dark --- */
:root[data-theme="dark"] .badge-sow { background: var(--green-pale); color: var(--green-deep); }
:root[data-theme="dark"] .badge-harvest { background: rgba(196, 123, 32, 0.15); color: var(--orange-harvest); }

/* --- Fix: hide orphaned .site-title in header (logo displayed at 512px) --- */
/* The standardized nav already contains the logo; .site-title is a leftover */
.site-title { display: none !important; }

/* --- Widget geo-aware FULL WIDTH sous le hero (docs/assets/js/geo-widget.js) --- */
.geo-widget-host { display: block; margin: 1.5rem 0 0; }

/* --- PROMPT card : CTA d'activation --- */
.geo-prompt-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.25rem; flex-wrap: wrap;
  padding: 1.1rem 1.35rem;
  background: var(--green-pale); border: 1px solid var(--green-light);
  border-radius: 12px;
}
.geo-prompt-left {
  display: flex; align-items: center; gap: 0.85rem;
  flex: 1 1 auto; min-width: 0;
}
.geo-prompt-icon {
  width: 40px; height: 40px; object-fit: contain; flex-shrink: 0;
}
.geo-prompt-icon-pulse { animation: qfPulse 1.4s ease-in-out infinite; }
@keyframes qfPulse { 0%,100% { opacity: .45; } 50% { opacity: 1; } }
.geo-prompt-text { display: flex; flex-direction: column; gap: 0.15rem; }
.geo-prompt-text strong {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.08rem; color: var(--green-deep); font-weight: 700;
}
.geo-prompt-text span { color: var(--text-secondary); font-size: 0.9rem; }
.geo-prompt-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.geo-prompt-btn-primary {
  padding: 0.6rem 1.2rem; background: var(--green-deep); color: #fff;
  border: none; border-radius: 60px; font-size: 0.92rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 10px rgba(45, 80, 22, 0.18);
}
.geo-prompt-btn-primary:hover { background: var(--green-mid); box-shadow: 0 4px 14px rgba(45, 80, 22, 0.28); }
.geo-prompt-btn-alt, .geo-prompt-btn-link {
  padding: 0.6rem 1rem; background: transparent;
  border: 1px solid var(--cream-dark); border-radius: 60px;
  color: var(--green-deep); font-size: 0.9rem; font-weight: 500;
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.geo-prompt-btn-alt:hover, .geo-prompt-btn-link:hover { background: #fff; border-color: var(--green-mid); }
.geo-prompt-btn-link { border: none; }

/* --- MANUAL form (fallback code postal) --- */
.geo-manual-form {
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
  padding: 1rem 1.35rem;
  background: var(--green-pale); border: 1px solid var(--green-light);
  border-radius: 12px;
}
.geo-manual-label {
  font-size: 0.9rem; color: var(--text-secondary); font-weight: 500;
}
.geo-manual-input {
  padding: 0.55rem 0.85rem; font-size: 1rem; font-weight: 600;
  border: 1.5px solid var(--cream-dark); border-radius: 8px;
  background: var(--white); color: var(--text-primary);
  font-family: inherit; width: 120px;
  text-align: center;
}
.geo-manual-input:focus {
  outline: none; border-color: var(--green-mid);
  box-shadow: 0 0 0 2px rgba(90, 143, 53, 0.2);
}
.geo-shake { animation: geoShake 0.32s ease; }
@keyframes geoShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* Loading state */
.geo-loading {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.35rem;
  background: var(--green-pale); border: 1px solid var(--green-light);
  border-radius: 12px;
  color: var(--text-secondary); font-size: 0.95rem;
}

/* --- Panneau géo détaillé full-width sous hero en mode aware --- */
.geo-panel {
  padding: 1.35rem 1.6rem;
  background: var(--green-pale);
  border: 1px solid var(--green-light);
  border-radius: 14px;
}
.geo-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 1.15rem;
  flex-wrap: wrap;
  padding-bottom: 1rem; border-bottom: 1px solid rgba(45,80,22,0.12);
}
.geo-panel-lead {
  display: flex; align-items: center; gap: 0.65rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.18rem; color: var(--green-deep); font-weight: 700;
  line-height: 1.3;
  flex: 1 1 auto; min-width: 0;
}
.geo-panel-lead-icon { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.geo-panel-lead strong { color: var(--green-deep); font-weight: 700; }
/* (.geo-panel-toggle déprécié — édition inline désormais, chaque ligne est cliquable) */

/* Barre compacte : état par défaut sur fiche variété, 1 ligne */
.geo-bar {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.6rem 0.85rem;
  background: var(--green-pale, #F0F5E8);
  border: 1px solid var(--green-light, #D6E4C2);
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.3;
}
.geo-bar-icon { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; }
.geo-bar-label {
  display: flex; flex-direction: column; min-width: 0; flex: 1;
}
.geo-bar-label strong {
  color: var(--green-deep); font-weight: 700; font-size: 0.92rem;
}
.geo-bar-place {
  color: var(--text-secondary); font-size: 0.82rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.geo-bar-adjust {
  background: transparent; border: 1px solid var(--cream-dark);
  color: var(--green-deep); font-size: 0.85rem; font-weight: 500;
  padding: 0.35rem 0.85rem; border-radius: 60px;
  cursor: pointer; font-family: inherit; flex-shrink: 0;
  transition: all 0.15s;
}
.geo-bar-adjust:hover { background: #fff; border-color: var(--green-mid); }
.geo-bar-reset {
  background: transparent; border: none;
  color: var(--text-muted); font-size: 1.2rem; line-height: 1;
  width: 28px; height: 28px; border-radius: 50%;
  cursor: pointer; font-family: inherit; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.geo-bar-reset:hover { background: rgba(0,0,0,0.05); color: var(--text-primary); }
@media (max-width: 480px) {
  .geo-bar { flex-wrap: wrap; }
  .geo-bar-label { flex: 1 1 100%; order: 2; }
  .geo-bar-icon { order: 1; }
  .geo-bar-adjust { order: 3; }
  .geo-bar-reset { order: 4; }
}
:root[data-theme="dark"] .geo-bar {
  background: rgba(45, 80, 22, 0.18);
  border-color: var(--green-mid);
}
:root[data-theme="dark"] .geo-bar-label strong { color: #C6E0A8; }

/* Grid responsive : 3 cols desktop, 2 tablet, 1 mobile */
.geo-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem 1.5rem;
  align-items: start;
}
@media (max-width: 900px) { .geo-panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.geo-panel-item {
  display: flex; align-items: center; gap: 0.7rem;
  min-width: 0;
}
.geo-panel-picto {
  width: 32px; height: 32px; object-fit: contain; flex-shrink: 0;
}
.geo-panel-picto-svg {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: rgba(45, 80, 22, 0.08);
  border-radius: 50%;
  color: var(--green-deep);
  flex-shrink: 0;
}
.geo-panel-picto-svg .geo-panel-svg { width: 18px; height: 18px; }
.geo-panel-item-body { min-width: 0; flex: 1; line-height: 1.3; }
.geo-panel-item-label {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); font-weight: 600;
  margin-bottom: 0.18rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.geo-panel-item-value {
  font-size: 0.92rem; color: var(--text-primary); font-weight: 600;
  line-height: 1.35;
  overflow-wrap: break-word; word-break: break-word;
}
.geo-panel-item-value-sub {
  display: block; font-size: 0.82rem; color: var(--text-secondary); font-weight: 500;
  margin-top: 0.1rem;
}

/* Inputs/selects directement dans les lignes de la grille en mode edit */
.geo-row-input, .geo-row-select {
  padding: 0.38rem 0.55rem; font-size: 0.9rem; font-weight: 600;
  border: 1.5px solid var(--green-mid); border-radius: 6px;
  background: var(--white); color: var(--text-primary);
  font-family: inherit; width: 100%; max-width: 100%;
  box-sizing: border-box;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.geo-row-select { padding-right: 1.7rem; }
.geo-row-input:focus, .geo-row-select:focus {
  outline: none; border-color: var(--green-deep);
  box-shadow: 0 0 0 3px rgba(90, 143, 53, 0.18);
}
.geo-row-input-wrap {
  display: flex; align-items: center; gap: 0.4rem;
  width: 100%;
}
.geo-row-input-wrap .geo-row-input { flex: 1; width: auto; min-width: 0; }
.geo-row-unit {
  font-size: 0.85rem; color: var(--text-secondary); font-weight: 500;
  flex-shrink: 0;
}

/* Bouton Ajuster dans le footer */
.geo-panel-toggle {
  background: rgba(255,255,255,0.75); border: 1px solid var(--cream-dark);
  padding: 0.55rem 1.1rem; border-radius: 60px;
  color: var(--green-deep); font-size: 0.9rem; font-weight: 500;
  cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.geo-panel-toggle:hover { background: #fff; border-color: var(--green-mid); }

@media (max-width: 560px) {
  .geo-adjust-grid { grid-template-columns: 1fr; }
}

:root[data-theme="dark"] .geo-adjust-input,
:root[data-theme="dark"] .geo-adjust-select { background: var(--cream); border-color: var(--border-subtle); }
:root[data-theme="dark"] .geo-panel-toggle { background: rgba(255,255,255,0.08); color: #C6E0A8; border-color: rgba(198,224,168,0.3); }

/* Adjust sub-panel (collapse) */
.geo-panel-adjust {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, margin-top 0.3s ease;
  margin-top: 0;
  display: flex; flex-wrap: wrap; gap: 0.6rem 1rem;
  align-items: flex-end;
}
.geo-panel-adjust-open {
  max-height: 400px; margin-top: 1rem;
  padding-top: 1rem; border-top: 1px dashed var(--cream-dark);
}
.geo-adjust-row { display: flex; flex-direction: column; gap: 0.25rem; min-width: 120px; }
.geo-adjust-label {
  font-size: 0.72rem; color: var(--text-muted); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.geo-panel-input, .geo-panel-select {
  padding: 0.45rem 0.65rem; font-size: 0.9rem;
  border: 1px solid var(--cream-dark); border-radius: 6px;
  background: var(--white); color: var(--text-primary);
  font-family: inherit; font-weight: 500;
}
.geo-panel-input:focus, .geo-panel-select:focus {
  outline: none; border-color: var(--green-mid);
  box-shadow: 0 0 0 2px rgba(90, 143, 53, 0.2);
}
.geo-panel-apply {
  padding: 0.55rem 1.1rem; background: var(--green-deep); color: #fff;
  border: none; border-radius: 6px; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: background 0.15s;
  align-self: flex-end;
}
.geo-panel-apply:hover { background: var(--green-mid); }

/* Footer : CTA panier + reset */
.geo-panel-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-top: 1.1rem; flex-wrap: wrap;
  padding-top: 0.9rem; border-top: 1px solid rgba(45,80,22,0.08);
}
.geo-basket-cta {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.8rem 1.6rem;
  background: var(--green-deep); color: #fff !important;
  font-weight: 600; text-decoration: none;
  border: none; outline: none;
  border-radius: 60px; font-size: 0.98rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 3px 14px rgba(45, 80, 22, 0.25);
  -webkit-appearance: none; appearance: none;
}
.geo-basket-cta:focus-visible { box-shadow: 0 3px 14px rgba(45, 80, 22, 0.35), 0 0 0 3px rgba(90, 143, 53, 0.35); }
.geo-basket-cta:hover {
  background: var(--green-mid);
  box-shadow: 0 5px 20px rgba(45, 80, 22, 0.35);
}
.geo-basket-cta:active { transform: scale(0.98); }
.geo-basket-arrow { transition: transform 0.2s; }
.geo-basket-cta:hover .geo-basket-arrow { transform: translateX(3px); }
.geo-panel-reset {
  background: transparent; border: none; padding: 0.3rem 0.6rem;
  color: var(--text-muted); font-size: 0.8rem; cursor: pointer;
  font-family: inherit; text-decoration: underline; text-underline-offset: 2px;
}
.geo-panel-reset:hover { color: var(--green-deep); }

/* Dark mode */
:root[data-theme="dark"] .geo-panel {
  background: rgba(45, 80, 22, 0.18);
  border-color: var(--green-mid);
}
:root[data-theme="dark"] .geo-panel-lead,
:root[data-theme="dark"] .geo-panel-lead strong { color: #C6E0A8; }
:root[data-theme="dark"] .geo-panel-toggle { background: rgba(255,255,255,0.08); color: #C6E0A8; border-color: rgba(198,224,168,0.3); }
:root[data-theme="dark"] .geo-panel-input,
:root[data-theme="dark"] .geo-panel-select { background: var(--cream); border-color: var(--border-subtle); }
:root[data-theme="dark"] .qf-geo-zone { color: #C6E0A8; }
:root[data-theme="dark"] .qf-geo-input { background: var(--cream); border-color: var(--border-subtle); }

@media (max-width: 560px) {
  .geo-panel-grid { grid-template-columns: 1fr; }
  .geo-panel-header { flex-direction: column; align-items: flex-start; gap: 0.7rem; }
  .geo-panel-footer { flex-direction: column; align-items: stretch; }
  .geo-basket-cta { justify-content: center; }
  .geo-prompt-card { flex-direction: column; align-items: stretch; }
  .geo-prompt-actions { width: 100%; }
  .geo-prompt-actions button { flex: 1; }
}

/* (geo-aware-line et geo-aware-cta dépréciés, remplacés par qf-item-geo + geo-basket-cta) */

/* Quick-facts valeur adjusted (visuel subtil : souligné vert pointillé) */
.qf-value.qf-geo-adjusted {
  color: var(--green-deep);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--green-mid);
  text-underline-offset: 3px;
}

@media (max-width: 640px) {
  .qf-item-geo { min-height: 80px; }
  .qf-geo-picto { width: 32px; height: 32px; }
  .qf-geo-btn { font-size: 0.78rem; padding: 0.3rem 0.75rem; }
  .geo-basket-cta { font-size: 0.9rem; padding: 0.65rem 1.15rem; }
}

/* Quand widget est aware, le sowing-calendar générique devient redondant */
body.geo-aware .sowing-calendar-section,
body.geo-aware .sowing-calendar { display: none; }

/* ============================================================================
   Companion planting cards
   Used by generate-variety-pages.py. Tokens are theme-aware (light/dark).
   ============================================================================ */
.companion-planting { margin: 2rem 0; }
.companion-planting-title { color: var(--vert1); margin-bottom: 1rem; }
.companion-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.companion-grid--single { grid-template-columns: 1fr; }
@media (max-width: 640px) {
  .companion-grid { grid-template-columns: 1fr; }
}
.companion-col-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.companion-col-label--friends { color: var(--vert2); }
.companion-col-label--avoid { color: #B5541A; }
:root[data-theme="dark"] .companion-col-label--avoid { color: #E89673; }
.companion-list { display: flex; flex-direction: column; gap: 0.5rem; }
.companion-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--white);
  border-radius: 0.75rem;
  min-height: 52px;
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.companion-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
  text-decoration: none;
}
.companion-card__img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
}
.companion-card__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.companion-card__name { flex: 1; font-weight: 500; }
.companion-card--friend .companion-card__name,
.companion-card--friend .companion-card__icon { color: var(--vert2); }
.companion-card--avoid .companion-card__name,
.companion-card--avoid .companion-card__icon { color: #B5541A; }
:root[data-theme="dark"] .companion-card--avoid .companion-card__name,
:root[data-theme="dark"] .companion-card--avoid .companion-card__icon { color: #E89673; }
.companion-card__add {
  flex-shrink: 0;
  appearance: none;
  background: var(--vert2);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s ease, transform 0.15s ease;
}
.companion-card__add:hover { background: var(--vert1); transform: scale(1.05); }
