/* ============================================================
   HERBORIS — Design system
   Direction : apothicaire moderne / botanique editorial
   Palette calee sur visuel JPG (verts feuillage + terre cuite + creme)
   ============================================================ */

:root {
  /* ---- Palette ---- */
  --leaf-deep:    #1f3a2a;   /* gradient sidebar haut */
  --leaf-darker:  #15281c;   /* gradient sidebar bas  */
  --leaf:         #2d5240;   /* vert feuille principal */
  --leaf-soft:    #3d6650;   /* vert clair (hover)    */
  --leaf-mist:    rgba(45, 82, 64, 0.10);

  --cream:        #f4ede0;   /* fond carte / parchemin */
  --cream-2:      #ebe0ca;   /* fond global         */
  --cream-3:      #fbf6ec;   /* fond carte tres clair */

  --clay:         #a8583e;   /* terre cuite        */
  --clay-soft:    #c97a5d;   /* clay clair        */
  --bark:         #6e4530;   /* brun ecorce       */

  --gold:         #b8965c;   /* or vieilli         */
  --gold-soft:    #d6b683;   /* or clair          */

  --ink:          #1a1815;
  --ink-soft:     rgba(26, 24, 21, 0.75);
  --ink-muted:    rgba(26, 24, 21, 0.55);
  --ink-faint:    rgba(26, 24, 21, 0.30);
  --line:         rgba(26, 24, 21, 0.15);
  --line-soft:    rgba(26, 24, 21, 0.08);

  /* Sidebar (desktop) */
  --sidebar-w: 256px;
  --sidebar-text:        rgba(244, 237, 224, 0.78);
  --sidebar-text-active: #f4ede0;
  --sidebar-icon:        rgba(244, 237, 224, 0.55);
  --sidebar-active-bg:   rgba(184, 150, 92, 0.18);
  --sidebar-hover-bg:    rgba(244, 237, 224, 0.06);

  /* Fonts */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "DM Sans", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --font-serif:   "EB Garamond", Georgia, serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(70% 55% at 50% -5%, rgba(140, 180, 150, 0.55) 0%, transparent 60%),
    radial-gradient(40% 30% at 100% 100%, rgba(184, 150, 92, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, #5a7d68 0%, #4a6e58 45%, #3e6450 100%);
  background-attachment: fixed;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   GRAIN OVERLAY
   ============================================================ */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ============================================================
   APP SHELL — desktop: sidebar + contenu  /  mobile: pleine largeur
   ============================================================ */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.main-area {
  grid-column: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

body.no-scroll { overflow: hidden; }

/* Masquer la barre de scroll sur desktop (scroll toujours fonctionnel) */
@media (min-width: 901px) {
  html {
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE/Edge legacy */
  }
  html::-webkit-scrollbar {         /* Chromium / Safari */
    width: 0;
    height: 0;
    display: none;
  }
  /* Idem pour la sidebar et tout conteneur scrollable */
  .sidebar-nav,
  .menu-list {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .sidebar-nav::-webkit-scrollbar,
  .menu-list::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
}

/* ============================================================
   SIDEBAR (desktop ≥ 901px)
   ============================================================ */
.sidebar {
  grid-column: 1;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--leaf-deep) 0%, var(--leaf-darker) 100%);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  z-index: 50;
  border-right: 1px solid rgba(0,0,0,0.25);
  box-shadow: 4px 0 24px rgba(21, 40, 28, 0.18);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(600px 300px at 50% -10%, rgba(184,150,92,0.15) 0%, transparent 60%),
    radial-gradient(400px 400px at 0% 100%, rgba(168,88,62,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.sidebar-brand {
  position: relative;
  padding: 26px 24px 22px;
  border-bottom: 1px solid rgba(244, 237, 224, 0.10);
}

.sidebar-brand .brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand .brand-leaf {
  position: relative;
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gold);
}
.sidebar-brand .brand-leaf svg {
  width: 26px; height: 26px;
  position: relative; z-index: 2;
  animation: leaf-breathe 4.5s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(184, 150, 92, 0.25));
  transform-origin: center;
}
.sidebar-brand .brand-leaf::before,
.sidebar-brand .brand-leaf::after {
  content: "";
  position: absolute; inset: 0; margin: auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 150, 92, 0.35) 0%, rgba(184, 150, 92, 0) 70%);
  pointer-events: none;
  z-index: 1;
  animation: leaf-aura 4.5s ease-out infinite;
}
.sidebar-brand .brand-leaf::after { animation-delay: 2.25s; }

@media (prefers-reduced-motion: reduce) {
  .sidebar-brand .brand-leaf svg,
  .sidebar-brand .brand-leaf::before,
  .sidebar-brand .brand-leaf::after { animation: none; }
}

.sidebar-brand .brand-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: var(--cream);
  line-height: 1;
}

.sidebar-nav {
  position: relative;
  flex: 1;
  padding: 14px 14px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sidebar-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.sidebar-section-title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(244, 237, 224, 0.40);
  padding: 18px 12px 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--sidebar-text);
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background-color .15s, color .15s;
  letter-spacing: 0.005em;
}
.sidebar-link svg {
  width: 17px; height: 17px;
  color: var(--sidebar-icon);
  flex-shrink: 0;
}
.sidebar-link:hover {
  background: var(--sidebar-hover-bg);
  color: var(--sidebar-text-active);
}
.sidebar-link:hover svg { color: var(--gold-soft); }

.sidebar-link.is-active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-text-active);
  font-weight: 500;
}
.sidebar-link.is-active svg { color: var(--gold); }

.sidebar-footer {
  position: relative;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(244, 237, 224, 0.10);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 237, 224, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-footer .version { color: var(--gold); }

/* ============================================================
   TOP BAR (mobile uniquement)
   ============================================================ */
.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 40;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: linear-gradient(180deg, var(--leaf-deep) 0%, var(--leaf-darker) 100%);
  color: var(--cream);
  border-bottom: 1px solid rgba(0,0,0,0.20);
  box-shadow: 0 6px 24px rgba(21, 40, 28, 0.18);
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
}
.topbar-brand:hover { background: rgba(244, 237, 224, 0.06); }

.topbar-brand .brand-leaf {
  position: relative;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gold);
}
.topbar-brand .brand-leaf svg {
  width: 22px; height: 22px;
  position: relative; z-index: 2;
  animation: leaf-breathe 4.5s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(184, 150, 92, 0.25));
  transform-origin: center;
}
.topbar-brand .brand-leaf::before,
.topbar-brand .brand-leaf::after {
  content: "";
  position: absolute; inset: 0; margin: auto;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 150, 92, 0.35) 0%, rgba(184, 150, 92, 0) 70%);
  pointer-events: none;
  z-index: 1;
  animation: leaf-aura 4.5s ease-out infinite;
}
.topbar-brand .brand-leaf::after { animation-delay: 2.25s; }

.topbar-brand .brand-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--cream);
  line-height: 1;
}

@keyframes leaf-breathe {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 4px rgba(184, 150, 92, 0.20));
  }
  50% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 12px rgba(184, 150, 92, 0.55));
  }
}
@keyframes leaf-aura {
  0%   { transform: scale(0.6); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: scale(2.6); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .topbar-brand .brand-leaf svg,
  .topbar-brand .brand-leaf::before,
  .topbar-brand .brand-leaf::after { animation: none; }
}

.topbar-spacer {
  flex: 1;
}

.topbar-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 14px;
  border-radius: 10px;
  background: rgba(244, 237, 224, 0.08);
  border: 1px solid rgba(244, 237, 224, 0.15);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color .15s, transform .12s;
}
.topbar-menu-btn:hover { background: rgba(244, 237, 224, 0.14); }
.topbar-menu-btn:active { transform: scale(0.97); }
.topbar-menu-btn svg { width: 18px; height: 18px; color: var(--gold); }

@media (max-width: 540px) {
  .topbar { padding: 10px 12px; gap: 8px; }
  .topbar-brand .brand-title { font-size: 18px; }
  .topbar-menu-btn span { display: none; }
  .topbar-menu-btn { padding: 9px 12px; }
}

/* ============================================================
   MENU OVERLAY (bento)
   ============================================================ */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  justify-content: center;
  /* Fermé : invisible et inerte aux clics, immédiatement */
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear .25s;
}
.menu-overlay[hidden] { display: none; }
.menu-overlay.is-open {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0s linear 0s;
}

.menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 40, 28, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .22s ease;
}
.menu-overlay.is-open .menu-backdrop { opacity: 1; }

.menu-dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 980px;
  margin: auto 16px;
  background: var(--cream-3);
  border: 1px solid rgba(184, 150, 92, 0.22);
  border-radius: 20px;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.45),
    0 10px 30px -10px rgba(31, 58, 42, 0.30);
  padding: 22px 22px 26px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform .25s ease, opacity .22s ease;
}
.menu-overlay.is-open .menu-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 16px;
  border-bottom: 1px dashed rgba(184, 150, 92, 0.30);
  margin-bottom: 18px;
}
.menu-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 24px;
  color: var(--leaf-deep);
}

.menu-close {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid rgba(31, 58, 42, 0.18);
  border-radius: 10px;
  color: var(--leaf-deep);
  cursor: pointer;
  transition: background-color .15s;
}
.menu-close:hover { background: rgba(31, 58, 42, 0.06); }
.menu-close svg { width: 18px; height: 18px; }

.menu-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.menu-list::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.menu-dialog {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.menu-dialog::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.menu-group-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--clay);
  padding: 16px 6px 8px;
}
.menu-group-title:first-child { padding-top: 6px; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  transition: background-color .12s ease;
}
.menu-item:hover { background: rgba(31, 58, 42, 0.06); }
.menu-item:active { background: rgba(31, 58, 42, 0.10); }
.menu-item svg {
  width: 20px; height: 20px;
  color: var(--leaf);
  flex-shrink: 0;
}
.menu-item.is-active {
  background: rgba(184, 150, 92, 0.14);
  color: var(--leaf-deep);
  font-weight: 600;
}
.menu-item.is-active svg { color: var(--gold); }

/* ============================================================
   BANNIÈRE INSTALL PWA
   ============================================================ */
.install-link {
  background: rgba(184, 150, 92, 0.10);
  border: 1px dashed rgba(184, 150, 92, 0.45);
  color: var(--gold);
  font-weight: 600;
  margin-top: 6px;
}
.install-link svg { color: var(--gold); }
.install-link:hover { background: rgba(184, 150, 92, 0.18); }

.install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 250;
  pointer-events: none;
  display: flex;
  justify-content: center;
}
.install-banner[hidden] { display: none; }
.install-banner-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 560px;
  width: 100%;
  padding: 12px 14px;
  background: linear-gradient(180deg, var(--leaf-deep), var(--leaf-darker));
  color: var(--cream);
  border: 1px solid rgba(184, 150, 92, 0.40);
  border-radius: 14px;
  box-shadow: 0 14px 40px -10px rgba(0,0,0,0.45), 0 4px 14px -4px rgba(31, 58, 42, 0.40);
  animation: install-rise .35s ease-out;
}
@keyframes install-rise {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.install-banner-icon {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(184, 150, 92, 0.20);
  border-radius: 10px;
  color: var(--gold);
  flex-shrink: 0;
}
.install-banner-icon svg { width: 20px; height: 20px; }
.install-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}
.install-banner-text strong {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 16px;
  color: var(--cream);
}
.install-banner-text span {
  font-size: 12.5px;
  color: rgba(244, 237, 224, 0.75);
}
.install-banner-btn {
  padding: 9px 16px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--leaf-deep);
  font-weight: 600;
  font-size: 13.5px;
  border: 0;
  cursor: pointer;
  transition: background-color .15s, transform .12s;
  flex-shrink: 0;
}
.install-banner-btn:hover { background: #d1b07a; }
.install-banner-btn:active { transform: scale(0.97); }
.install-banner-close {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 0;
  color: rgba(244, 237, 224, 0.70);
  cursor: pointer;
  border-radius: 8px;
  flex-shrink: 0;
}
.install-banner-close:hover { background: rgba(244, 237, 224, 0.08); color: var(--cream); }
.install-banner-close svg { width: 16px; height: 16px; }

@media (max-width: 540px) {
  .install-banner { bottom: 76px; }
  .install-banner-text span { display: none; }
  .install-banner-btn { padding: 8px 12px; font-size: 13px; }
}

@media (max-width: 540px) {
  .menu-dialog { margin: 12px; padding: 14px 14px 18px; border-radius: 16px; }
  .menu-head h2 { font-size: 20px; }
  .menu-item { font-size: 15.5px; min-height: 50px; padding: 11px 12px; }
}

html[data-theme="dark"] .menu-dialog {
  background: #1f2922;
  border-color: rgba(184, 150, 92, 0.25);
}
html[data-theme="dark"] .menu-head h2,
html[data-theme="dark"] .menu-close,
html[data-theme="dark"] .menu-item { color: var(--cream); }
html[data-theme="dark"] .menu-item:hover { background: rgba(244, 237, 224, 0.06); }
html[data-theme="dark"] .menu-item.is-active {
  background: rgba(184, 150, 92, 0.18);
  color: var(--cream);
}
html[data-theme="dark"] .menu-group-title { color: rgba(184, 150, 92, 0.7); }

/* ============================================================
   PAGES
   ============================================================ */
.page-container {
  position: relative;
  z-index: 2;
  padding: 28px 28px 80px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.page { display: none; }
.page.is-active { display: block; animation: fade .25s ease; }

/* Toutes les pages SAUF l'accueil = feuille de parchemin sur fond vert
   (assure la lisibilite des titres et textes par defaut)            */
.page:not(#home).is-active {
  background: var(--cream);
  border-radius: 18px;
  padding: 36px 36px 44px;
  box-shadow:
    0 1px 0 rgba(244, 237, 224, 0.12) inset,
    0 30px 60px -30px rgba(0, 0, 0, 0.45),
    0 8px 20px -10px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(184, 150, 92, 0.18);
}

@media (max-width: 720px) {
  .page:not(#home).is-active { padding: 22px 18px 28px; border-radius: 14px; }
}

@keyframes fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-header { margin-bottom: 28px; }

.section-header .eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--clay);
  display: inline-block;
  margin-bottom: 12px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(32px, 4.5vw, 46px);
  line-height: 1;
  margin: 0;
  color: var(--leaf-deep);
  letter-spacing: -0.015em;
}

.section-header .subtitle {
  margin-top: 12px;
  font-size: 15.5px;
  color: var(--ink-muted);
  max-width: 64ch;
}

/* ============================================================
   HERO BOTANIQUE (style JPG : grand titre + feuilles collage)
   ============================================================ */
.hero {
  position: relative;
  margin-bottom: 26px;
  background:
    radial-gradient(80% 100% at 15% 50%, #355c44 0%, #244232 60%, #1f3a2a 100%);
  color: var(--cream);
  border-radius: 20px;
  overflow: hidden;
  padding: 64px 56px 70px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 24px;
  min-height: 420px;
}

.hero-content { position: relative; z-index: 3; }

.hero h1 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 600;
  font-size: clamp(54px, 7vw, 88px);
  line-height: 0.95;
  margin: 0;
  color: var(--cream);
  letter-spacing: -0.025em;
}
.hero h1 em {
  display: block;
  margin-top: 10px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: 0.01em;
  color: rgba(244, 237, 224, 0.82);
  line-height: 1.2;
}

.hero p {
  margin: 22px 0 32px;
  color: rgba(244, 237, 224, 0.78);
  max-width: 42ch;
  font-size: 15.5px;
  line-height: 1.65;
  font-family: var(--font-serif);
  font-style: italic;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-leaves {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 58%;
  z-index: 2;
  pointer-events: none;
}
.hero-leaves svg {
  width: 100%; height: 100%;
  display: block;
  filter: drop-shadow(-10px 14px 28px rgba(0,0,0,0.35));
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 44px 28px 48px;
    min-height: auto;
  }
  /* Masque les feuilles décoratives en-dessous du desktop :
     l'image était conçue comme un panneau latéral, mal rendue en stack mobile. */
  .hero-leaves { display: none; }
  .hero p { max-width: 100%; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
}
.btn svg { width: 15px; height: 15px; }

.btn-gold    { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-soft); }

.btn-peach {
  background: linear-gradient(180deg, #e6b896 0%, #d29c78 100%);
  color: #3a2316;
  padding: 14px 26px;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 16px rgba(210, 156, 120, 0.30);
}
.btn-peach:hover { background: linear-gradient(180deg, #ecc5a8 0%, #dba78a 100%); }

.btn-cream   { background: var(--cream); color: var(--leaf-deep); }
.btn-cream:hover { background: #fff; }

.btn-leaf    { background: var(--leaf-deep); color: var(--cream); }
.btn-leaf:hover { background: var(--leaf); }

.btn-ghost-cream {
  background: transparent;
  color: var(--cream);
  border-color: rgba(244, 237, 224, 0.40);
}
.btn-ghost-cream:hover { background: rgba(244, 237, 224, 0.10); border-color: var(--cream); }

.btn-outline {
  background: transparent;
  color: var(--leaf-deep);
  border-color: var(--leaf-deep);
}
.btn-outline:hover { background: var(--leaf-deep); color: var(--cream); }

/* ============================================================
   BENTO MODULE CARDS (style JPG : 6 cards tonales pleines, icone ronde au centre haut)
   ============================================================ */
.modules-section { margin-top: 8px; }

.modules-grid-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.bento-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 28px 26px 24px;
  border-radius: 16px;
  text-align: left;
  transition:
    transform .35s cubic-bezier(.2,.8,.2,1),
    box-shadow .35s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
  min-height: 200px;
  box-shadow: 0 4px 14px rgba(31, 58, 42, 0.06);
  isolation: isolate;
}

/* Couche décorative organique (fond SVG par tonalité) */
.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-repeat: no-repeat;
  background-position: bottom right;
  background-size: 60% auto;
  opacity: 0.18;
  transition: transform .8s cubic-bezier(.2,.8,.2,1),
              opacity .4s ease;
  pointer-events: none;
}

/* Glow doré qui suit le hover */
.bento-card::after {
  content: "";
  position: absolute;
  top: -40%; left: -20%;
  width: 140%; height: 180%;
  background: radial-gradient(
    closest-side,
    rgba(184, 150, 92, 0.45) 0%,
    rgba(184, 150, 92, 0) 70%
  );
  z-index: 0;
  opacity: 0;
  transform: translate(-30%, -10%) scale(0.7);
  transition: opacity .5s ease, transform .8s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
  mix-blend-mode: overlay;
}

.bento-card > * { position: relative; z-index: 1; }

.bento-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 22px 40px rgba(31, 58, 42, 0.18),
    0 0 0 1px rgba(184, 150, 92, 0.20);
}

.bento-card:hover::before {
  transform: translate(-6px, -6px) rotate(-2deg) scale(1.08);
  opacity: 0.32;
}
.bento-card:hover::after {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Tonal fills (cale sur visuel JPG) */
.bento-card.tone-sage {
  background: linear-gradient(160deg, #b9cda4 0%, #8eac7a 100%);
  color: #1f3a2a;
}
.bento-card.tone-sage::before { display: none; }

.bento-card.tone-bark {
  background: linear-gradient(160deg, #6e4530 0%, #4a2c1c 100%);
  color: var(--cream);
}
.bento-card.tone-bark::before { display: none; }

.bento-card.tone-sand {
  background: linear-gradient(160deg, #d6b683 0%, #b8965c 100%);
  color: #3a2316;
}
.bento-card.tone-sand::before { display: none; }

.bento-card.tone-photo {
  background-image:
    linear-gradient(180deg, rgba(20,40,28,0.10) 0%, rgba(20,40,28,0.55) 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 200'><defs><linearGradient id='sky' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23a6c1a5'/><stop offset='1' stop-color='%232d5240'/></linearGradient></defs><rect width='320' height='200' fill='url(%23sky)'/><g fill='%231f3a2a' opacity='0.85'><path d='M0 140 Q 40 110 80 130 Q 110 145 140 130 Q 180 110 220 130 Q 260 145 320 125 L 320 200 L 0 200 Z'/></g><g fill='%23b8965c' opacity='0.55'><circle cx='200' cy='80' r='40'/></g><g stroke='%23f4ede0' stroke-opacity='0.35' stroke-width='1'><line x1='200' y1='80' x2='80' y2='200'/><line x1='200' y1='80' x2='160' y2='200'/><line x1='200' y1='80' x2='240' y2='200'/><line x1='200' y1='80' x2='320' y2='200'/></g></svg>");
  background-size: cover; background-position: center;
  color: var(--cream);
  transition:
    transform .35s cubic-bezier(.2,.8,.2,1),
    box-shadow .35s cubic-bezier(.2,.8,.2,1),
    background-position 1.2s ease;
}
.bento-card.tone-photo::before { display: none; }
.bento-card.tone-photo:hover { background-position: center 40%; }

.bento-icon {
  position: relative;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.55);
  color: #1f3a2a;
  margin-bottom: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  transition:
    transform .45s cubic-bezier(.2,.8,.2,1),
    background-color .35s ease,
    box-shadow .35s ease;
}
.bento-icon svg {
  width: 20px; height: 20px;
  transition: transform .55s cubic-bezier(.34, 1.56, .64, 1);
}

/* Anneau d'aura qui pulse au survol */
.bento-icon::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 1.5px solid rgba(184, 150, 92, 0.0);
  transition: border-color .4s ease, transform .6s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}

.bento-card:hover .bento-icon {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}
.bento-card:hover .bento-icon::before {
  border-color: rgba(184, 150, 92, 0.55);
  transform: scale(1.18);
}

/* Animations spécifiques par tonalité (organique) */
@keyframes icon-sway {
  0%   { transform: rotate(0deg); }
  35%  { transform: rotate(-10deg); }
  70%  { transform: rotate(6deg); }
  100% { transform: rotate(0deg); }
}
@keyframes icon-rise {
  0%   { transform: translateY(0) rotate(0deg); }
  50%  { transform: translateY(-3px) rotate(8deg); }
  100% { transform: translateY(0) rotate(0deg); }
}
@keyframes icon-flip {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes icon-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

.bento-card.tone-sage:hover .bento-icon svg { animation: icon-sway 1.2s ease; }
.bento-card.tone-bark:hover .bento-icon svg { animation: icon-rise 1.4s ease; }
.bento-card.tone-sand:hover .bento-icon svg { animation: icon-flip 1.2s cubic-bezier(.2,.8,.2,1); }
.bento-card.tone-photo:hover .bento-icon svg { animation: icon-pulse 1.2s ease; }

.bento-icon.gold { background: rgba(255,255,255,0.75); color: var(--bark); }
.bento-icon.glass {
  background: rgba(244,237,224,0.20);
  color: var(--cream);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(244,237,224,0.30);
}
.bento-icon.hex {
  border-radius: 8px;
  background: rgba(110,69,48,0.18);
  color: var(--bark);
}

@media (prefers-reduced-motion: reduce) {
  .bento-card,
  .bento-card::before,
  .bento-card::after,
  .bento-icon,
  .bento-icon svg,
  .bento-icon::before { transition: none; animation: none; }
}

.bento-card.tone-bark .bento-icon {
  background: rgba(244,237,224,0.12);
  color: var(--cream);
  border: 1px solid rgba(244,237,224,0.20);
}

.bento-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.005em;
}
.bento-card.tone-sage h3,
.bento-card.tone-sand h3 { color: #1f3a2a; }
.bento-card.tone-bark h3,
.bento-card.tone-photo h3 { color: var(--cream); }

.bento-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}
.bento-card.tone-sage p { color: rgba(31,58,42,0.78); }
.bento-card.tone-sand p { color: rgba(58,35,22,0.78); }
.bento-card.tone-bark p { color: rgba(244,237,224,0.78); }
.bento-card.tone-photo p { color: rgba(244,237,224,0.88); }

@media (max-width: 980px) {
  .modules-grid-bento { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
  .modules-grid-bento { grid-template-columns: 1fr; }
}

/* ============================================================
   PLACEHOLDER
   ============================================================ */
.placeholder {
  padding: 64px 32px;
  text-align: center;
  border: 1.5px dashed var(--line);
  background: var(--cream);
  border-radius: 14px;
}

.placeholder .badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--leaf-mist);
  color: var(--leaf-deep);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.placeholder h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 28px;
  color: var(--leaf-deep);
  margin: 0 0 10px;
}

.placeholder p {
  margin: 0;
  color: var(--ink-muted);
  font-style: italic;
  max-width: 50ch;
  margin-inline: auto;
  font-size: 14.5px;
}

/* ============================================================
   MODULE PLANTES — toolbar + liste
   ============================================================ */
.plants-module .section-header { margin-bottom: 22px; }

.plants-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
  padding: 14px 16px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.plants-search {
  flex: 1;
  min-width: 240px;
  position: relative;
  display: flex;
  align-items: center;
}
.plants-search svg {
  position: absolute;
  left: 14px;
  width: 16px; height: 16px;
  color: var(--ink-faint);
  pointer-events: none;
}
.plants-search input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1px solid var(--line);
  background: var(--cream-3);
  border-radius: 8px;
  font-size: 14.5px;
  font-family: var(--font-body);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, background .15s;
}
.plants-search input:focus {
  border-color: var(--leaf);
  background: #fff;
}

.plants-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.plants-filters select {
  padding: 9px 28px 9px 12px;
  border: 1px solid var(--line);
  background: var(--cream-3);
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--ink);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none' stroke='%231a1815' stroke-width='1.5'><path d='M2 4 L5 7 L8 4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.filters-clear {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--cream-3);
  color: var(--ink-soft);
}
.filters-clear:hover { background: var(--cream); color: var(--clay); }
.filters-clear svg { width: 14px; height: 14px; }

.plants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.plant-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.plant-card:hover {
  transform: translateY(-2px);
  border-color: var(--leaf);
  box-shadow: 0 12px 24px rgba(31, 58, 42, 0.10);
}

.plant-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.plant-card-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--leaf-deep);
  letter-spacing: -0.005em;
  line-height: 1.15;
}
.plant-card-head .latin {
  margin: 2px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--clay);
}
.plant-card-arrow {
  width: 18px; height: 18px;
  color: var(--ink-faint);
  flex-shrink: 0;
  margin-top: 2px;
  transition: transform .15s, color .15s;
}
.plant-card:hover .plant-card-arrow {
  color: var(--leaf-deep);
  transform: translateX(3px);
}

.plant-card-meta {
  display: flex; flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}
.meta-dot {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.meta-dot.muted { color: var(--ink-faint); }
.meta-dot + .meta-dot::before {
  content: "·";
  margin-right: 8px;
  color: var(--ink-faint);
}

.plant-card-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid transparent;
}
.badge.tone-leaf { background: rgba(45,82,64,0.10);   color: var(--leaf-deep); border-color: rgba(45,82,64,0.20); }
.badge.tone-clay { background: rgba(168,88,62,0.12);  color: var(--clay);       border-color: rgba(168,88,62,0.25); }
.badge.tone-bark { background: rgba(110,69,48,0.12);  color: var(--bark);       border-color: rgba(110,69,48,0.25); }

.chip {
  display: inline-block;
  padding: 3px 9px;
  font-size: 11.5px;
  border-radius: 999px;
  background: var(--cream-3);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.chip.muted { opacity: 0.55; }

.plants-empty {
  text-align: center;
  font-style: italic;
  color: var(--ink-muted);
  padding: 40px 0;
}

/* ─── Pagination ─────────────────────────────────────────── */
.plants-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 28px 0 12px;
  padding: 0 8px;
}
.plants-pagination.hidden { display: none; }

.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(31, 58, 42, 0.14);
  border-radius: 10px;
  background: var(--cream-3, #fbf6ec);
  color: var(--leaf-deep, #1f3a2a);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.pg-btn:hover:not(:disabled) {
  background: var(--cream, #f4ede0);
  border-color: rgba(31, 58, 42, 0.28);
  transform: translateY(-1px);
}
.pg-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pg-btn.is-active {
  background: var(--leaf-deep, #1f3a2a);
  color: var(--cream-3, #fbf6ec);
  border-color: var(--leaf-deep, #1f3a2a);
}
.pg-btn i[data-lucide],
.pg-btn svg {
  width: 16px;
  height: 16px;
}
.pg-ellipsis {
  padding: 0 4px;
  color: var(--ink-muted);
  font-size: 14px;
  user-select: none;
}
.pg-info {
  flex-basis: 100%;
  text-align: center;
  margin-top: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
@media (max-width: 540px) {
  .pg-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    font-size: 13px;
  }
}

/* ============================================================
   PLANT DRAWER (detail 5 onglets)
   ============================================================ */
.plant-drawer {
  position: fixed; inset: 0;
  z-index: 200;
  display: none;
}
.plant-drawer.is-open { display: block; }

.plant-drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(21, 40, 28, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fade .2s ease;
  cursor: pointer;
}

.plant-drawer-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(640px, 100%);
  background: var(--cream-3);
  box-shadow: -20px 0 60px rgba(21, 40, 28, 0.30);
  overflow-y: auto;
  animation: slideIn .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.drawer-close {
  position: fixed;
  top: 14px; right: 14px;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(244, 237, 224, 0.20);
  background: var(--leaf-deep);
  color: var(--cream);
  box-shadow: 0 8px 24px rgba(21, 40, 28, 0.45);
  cursor: pointer;
  z-index: 9999;
  transition: background-color .15s, transform .12s;
}
.drawer-close:hover { background: var(--clay); color: var(--cream); }
.drawer-close:active { transform: scale(0.95); }
.drawer-close svg { width: 20px; height: 20px; }

@media (max-width: 640px) {
  .drawer-close {
    width: 48px; height: 48px;
    top: 12px; right: 12px;
  }
  .drawer-close svg { width: 22px; height: 22px; }
}

/* Quand le drawer plante est ouvert, masque le topbar pour ne pas cacher le bouton X */
body.plant-drawer-open .topbar { display: none !important; }

/* Plein écran sur mobile pour ne pas bloquer la navigation */
@media (max-width: 640px) {
  .plant-drawer-panel { width: 100%; max-width: 100%; }
}

.drawer-head {
  padding: 36px 32px 22px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-3) 100%);
  border-bottom: 1px solid var(--line);
}
.drawer-family {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--clay);
  display: inline-block;
  margin-bottom: 10px;
}
.drawer-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 36px;
  line-height: 1;
  color: var(--leaf-deep);
  letter-spacing: -0.015em;
}
.drawer-latin {
  margin: 8px 0 16px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-muted);
}
.drawer-tags {
  display: flex; flex-wrap: wrap;
  gap: 6px;
}

.drawer-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: var(--cream-3);
  position: sticky;
  top: 0;
  z-index: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.drawer-tabs::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.tab-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.tab-btn svg { width: 14px; height: 14px; }
.tab-btn:hover { color: var(--leaf-deep); }
.tab-btn.is-active {
  color: var(--leaf-deep);
  border-bottom-color: var(--gold);
}

.tab-content { padding: 26px 32px 48px; }
.tab-pane { display: flex; flex-direction: column; gap: 14px; }
.tab-h {
  margin: 12px 0 4px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 18px;
  color: var(--leaf-deep);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dl-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.dl-row dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-top: 2px;
}
.dl-row dd {
  margin: 0;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.5;
}
.dl-row dd em { color: var(--clay); }

.bullet-list {
  margin: 0; padding: 0;
  list-style: none;
}
.bullet-list li {
  position: relative;
  padding: 3px 0 3px 16px;
}
.bullet-list li::before {
  content: "·";
  position: absolute; left: 4px;
  color: var(--gold);
  font-weight: 700;
}
.bullet-list.warn li::before { color: var(--clay); }

.prep-list {
  margin: 0; padding: 0;
  list-style: none;
  display: flex; flex-direction: column;
  gap: 6px;
}
.prep-list li {
  display: flex; flex-wrap: wrap;
  gap: 8px;
  font-size: 13.5px;
}
.prep-list .muted {
  color: var(--ink-muted);
  font-style: italic;
}

.status-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--cream);
  border: 1px solid var(--line);
}
.status-banner svg { width: 22px; height: 22px; flex-shrink: 0; }
.status-banner strong {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 16px;
}
.status-banner span {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 2px;
}
.status-leaf { border-left: 4px solid var(--leaf); }
.status-leaf svg { color: var(--leaf); }
.status-clay { border-left: 4px solid var(--clay); }
.status-clay svg { color: var(--clay); }
.status-bark { border-left: 4px solid var(--bark); }
.status-bark svg { color: var(--bark); }

.callout {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.callout svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--gold); }
.callout p { margin: 0; }
.callout.warn { border-left-color: var(--clay); }
.callout.warn svg { color: var(--clay); }
.callout.info { border-left-color: var(--leaf); }
.callout.info svg { color: var(--leaf); }

.muted { color: var(--ink-muted); }

@media (max-width: 640px) {
  .drawer-head { padding: 28px 22px 18px; padding-right: 64px; }
  .drawer-head h2 { font-size: 28px; }
  .tab-content { padding: 22px 22px 40px; }
  .dl-row { grid-template-columns: 1fr; gap: 4px; padding: 8px 0; }
  .dl-row dt { padding-top: 0; }
  /* Plein écran mobile, fermeture via bouton X dédié */
  .plant-drawer-panel { width: 100%; }
}

/* ============================================================
   MODULE CARNET (Sprint 3)
   ============================================================ */
.logbook-module .section-header { margin-bottom: 22px; }

/* --- Toolbar --- */
.log-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: 14px 16px;
  background: var(--cream-3);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.log-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.log-filters select {
  font-family: var(--font-body);
  font-size: 13.5px;
  padding: 8px 30px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231a1815' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}
.log-filters select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--leaf-deep); color: #f4ede0;
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  padding: 10px 18px; border: none; border-radius: 999px; cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.btn-primary:hover { background: var(--leaf); transform: translateY(-1px); }
.btn-primary i { width: 16px; height: 16px; }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-body); font-size: 13px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-ghost:hover { background: var(--leaf-mist); color: var(--leaf-deep); }
.btn-ghost i { width: 14px; height: 14px; }

/* --- Stats --- */
.log-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.log-stats:empty { display: none; }
.log-stat {
  background: var(--cream-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.log-stat-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 26px;
  color: var(--leaf-deep);
  line-height: 1.1;
}
.log-stat-num em { font-size: 13px; color: var(--ink-muted); font-style: normal; margin-left: 2px; }
.log-stat-lab {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* --- Liste sessions --- */
.log-list { display: flex; flex-direction: column; gap: 14px; }

.log-card {
  background: var(--cream-3);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.log-card:hover, .log-card:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 6px 20px -10px rgba(0,0,0,.2);
  transform: translateY(-1px);
  outline: none;
}

.log-card-head {
  display: flex; gap: 16px; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap;
}
.log-card-date {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 4px;
}
.log-card-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--leaf-deep);
  margin: 0;
  line-height: 1.1;
}
.log-card-part {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 2px;
  font-family: var(--font-serif);
  font-style: italic;
}
.log-card-yield {
  text-align: right;
  display: flex; flex-direction: column; gap: 2px;
  font-family: var(--font-body); font-size: 12.5px; color: var(--ink-soft);
}
.log-card-yield strong {
  font-family: var(--font-display); font-style: italic;
  font-size: 18px; color: var(--leaf-deep); margin-right: 3px;
}
.log-card-yield em { font-style: normal; color: var(--ink-muted); font-size: 10.5px; }
.log-card-ratio {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
}

.log-card-meta {
  display: flex; flex-wrap: wrap; gap: 12px 18px;
  margin-top: 12px;
  font-size: 12.5px; color: var(--ink-soft);
}
.log-card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.log-card-meta i { width: 13px; height: 13px; color: var(--leaf); }

.log-card-olf {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--gold);
  background: rgba(184, 150, 92, 0.07);
  border-radius: 0 6px 6px 0;
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink-soft);
}
.log-card-notes {
  margin: 10px 0 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  white-space: pre-wrap;
}

/* --- Empty state --- */
.log-empty {
  background: var(--cream-3);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 40px 24px;
  text-align: center;
  color: var(--ink-muted);
}
.log-empty i {
  width: 32px; height: 32px;
  color: var(--clay);
  margin-bottom: 8px;
}
.log-empty p { margin: 4px 0; }
.log-empty strong { color: var(--ink); font-weight: 600; }

/* --- Drawer formulaire --- */
.log-drawer {
  position: fixed; inset: 0; z-index: 200;
  visibility: hidden; opacity: 0;
  transition: opacity .2s ease, visibility .2s ease;
}
.log-drawer.is-open { visibility: visible; opacity: 1; }
.log-drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(21, 40, 28, 0.55);
  backdrop-filter: blur(3px);
}
.log-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(680px, 100%);
  background: var(--cream);
  box-shadow: -20px 0 60px -20px rgba(0,0,0,.4);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.log-drawer.is-open .log-drawer-panel { transform: translateX(0); }

.log-drawer-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.log-drawer-head h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--leaf-deep);
  margin: 0;
}

/* --- Form --- */
.log-form {
  padding: 22px 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.log-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.field > span em { color: var(--clay); font-style: normal; }
.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream-3);
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.field textarea { resize: vertical; min-height: 60px; line-height: 1.45; }
.field select {
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231a1815' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 150, 92, 0.18);
}

.log-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.log-form-actions .spacer { flex: 1; }
.log-form-actions .btn-ghost { color: var(--clay); border-color: rgba(168, 88, 62, 0.25); }
.log-form-actions .btn-ghost:hover { background: rgba(168, 88, 62, 0.08); }

@media (max-width: 640px) {
  .log-grid { grid-template-columns: 1fr; }
  .log-drawer-panel { width: 100%; }
  .log-toolbar { flex-direction: column; align-items: stretch; }
  .log-filters { justify-content: stretch; }
  .log-filters select { flex: 1; }
}

/* ============================================================
   MODE DISTILLERIE (Sprint 3)
   Theme clair parchemin - aligne sur les autres pages
   ============================================================ */

.workshop-module .ws-stage {
  display: flex; flex-direction: column;
  gap: 24px;
  padding: 8px 0;
}

/* --- Head (4 champs) --- */
.ws-head {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px;
  background: var(--cream-3);
  border: 1px solid rgba(31, 58, 42, 0.12);
  border-radius: 12px;
}
.ws-head-field { display: flex; flex-direction: column; gap: 6px; }
.ws-head-field label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(31, 58, 42, 0.6);
}
.ws-head-field input,
.ws-head-field select {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--leaf-deep);
  background: #fff;
  border: 1px solid rgba(31, 58, 42, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
}
.ws-head-field select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231f3a2a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.ws-head-field select option { color: var(--leaf-deep); background: #fff; }
.ws-head-field input:disabled,
.ws-head-field select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.ws-head-field input:focus,
.ws-head-field select:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(45, 82, 64, 0.18);
}

/* --- Timer central --- */
.ws-timer-wrap {
  text-align: center;
  padding: 28px 16px 22px;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(184, 150, 92, 0.16) 0%, transparent 60%),
    var(--cream-3);
  border: 1px solid rgba(184, 150, 92, 0.30);
  border-radius: 16px;
}
.ws-phase {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 12px;
}
.ws-timer {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: clamp(56px, 12vw, 110px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--leaf-deep);
}
.ws-stage.is-running .ws-timer { color: var(--leaf); }
.ws-stage.is-paused .ws-timer { color: rgba(31, 58, 42, 0.4); }
.ws-stage.is-done .ws-timer { color: var(--gold); }
.ws-sub {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14.5px;
  color: rgba(31, 58, 42, 0.65);
}

/* --- Marqueurs jalons --- */
.ws-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ws-marks:empty { display: none; }
.ws-mark {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(184, 150, 92, 0.12);
  border: 1px solid rgba(184, 150, 92, 0.35);
  border-radius: 10px;
  padding: 10px 14px;
}
.ws-mark i { width: 16px; height: 16px; color: var(--clay); }
.ws-mark > div { display: flex; flex-direction: column; gap: 2px; }
.ws-mark-lab {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(31, 58, 42, 0.55);
}
.ws-mark-val {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--leaf-deep);
}

/* --- Boutons tactiles larges --- */
.ws-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.ws-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  min-height: 60px;
  padding: 16px 26px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
  flex: 1 1 200px;
}
.ws-btn:active { transform: scale(0.98); }
.ws-btn i { width: 20px; height: 20px; }

.ws-btn-primary {
  background: linear-gradient(180deg, var(--leaf-soft) 0%, var(--leaf) 100%);
  color: #fff;
  box-shadow: 0 6px 20px -6px rgba(45, 82, 64, 0.45);
}
.ws-btn-primary:hover { filter: brightness(1.08); }

.ws-btn-accent {
  background: linear-gradient(180deg, #c97a5d 0%, var(--clay) 100%);
  color: #fff;
  box-shadow: 0 6px 20px -6px rgba(168, 88, 62, 0.45);
}
.ws-btn-accent:hover { filter: brightness(1.08); }

.ws-btn-ghost {
  background: #fff;
  color: var(--leaf-deep);
  border: 1px solid rgba(31, 58, 42, 0.22);
}
.ws-btn-ghost:hover { background: var(--cream-3); }

.ws-btn-stop {
  background: rgba(168, 88, 62, 0.10);
  color: var(--clay);
  border: 1px solid rgba(168, 88, 62, 0.45);
}
.ws-btn-stop:hover { background: var(--clay); color: #fff; }

/* --- Live notes + T° + Wake lock --- */
.ws-live {
  background: var(--cream-3);
  border: 1px solid rgba(31, 58, 42, 0.12);
  border-radius: 12px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
}
.ws-live-row {
  display: flex; gap: 14px;
  align-items: stretch;
  flex-wrap: wrap;
}
.ws-live-row .ws-field { flex: 1 1 160px; }

.ws-field { display: flex; flex-direction: column; gap: 6px; }
.ws-field > span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(31, 58, 42, 0.6);
}
.ws-field input,
.ws-field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--leaf-deep);
  background: #fff;
  border: 1px solid rgba(31, 58, 42, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
  resize: vertical;
}
.ws-field input:focus,
.ws-field textarea:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(45, 82, 64, 0.18);
}

.ws-wake {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-end;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(31, 58, 42, 0.18);
  color: rgba(31, 58, 42, 0.55);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.ws-wake i { width: 14px; height: 14px; }
.ws-wake.is-active {
  background: rgba(184, 150, 92, 0.18);
  border-color: var(--gold);
  color: var(--bark);
}

/* --- Recap final --- */
.ws-recap {
  background: var(--cream-3);
  border: 1px solid rgba(184, 150, 92, 0.35);
  border-radius: 14px;
  padding: 22px;
}
.ws-recap h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--leaf-deep);
  margin: 0 0 16px;
}
.ws-recap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 18px;
  margin-bottom: 18px;
}
.ws-recap-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(31, 58, 42, 0.18);
}
.ws-recap-k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(31, 58, 42, 0.55);
}
.ws-recap-v {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--leaf-deep);
  text-align: right;
}
.ws-recap-yield {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.ws-recap-actions {
  display: flex; gap: 12px; justify-content: flex-end;
}

@media (max-width: 720px) {
  .ws-head { grid-template-columns: repeat(2, 1fr); }
  .ws-recap-yield { grid-template-columns: 1fr; }
  .ws-btn { font-size: 14px; min-height: 56px; }
  .ws-recap-actions { flex-direction: column-reverse; }
  .ws-recap-actions .ws-btn { width: 100%; }
}

/* ============================================================
   MODULE RECETTES (Sprint 4) + IMPRESSION PDF
   ============================================================ */
.recipes-module .section-header { margin-bottom: 22px; }

/* --- Toolbar --- */
.rec-toolbar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--cream-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 14px;
}
.rec-search {
  flex: 1 1 280px;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}
.rec-search i { width: 16px; height: 16px; color: var(--ink-muted); }
.rec-search input {
  flex: 1; border: none; background: transparent; outline: none;
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
}
#rec-type {
  font-family: var(--font-body); font-size: 13.5px;
  padding: 9px 30px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231a1815' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.rec-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

/* --- Grid cartes --- */
.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.rec-empty {
  padding: 32px;
  text-align: center;
  background: var(--cream-3);
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--ink-muted);
  grid-column: 1 / -1;
}

.rec-card {
  position: relative;
  background: var(--cream-3);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 50px;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
  min-height: 160px;
}
.rec-card:hover, .rec-card:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 8px 22px -12px rgba(0,0,0,.22);
  transform: translateY(-1px);
  outline: none;
}
.rec-card-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 8px;
}
.rec-card-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.15;
  color: var(--leaf-deep);
  margin: 0 0 8px;
}
.rec-card-use {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 8px;
  line-height: 1.4;
}
.rec-card-ings {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-top: 6px;
}
.rec-card-badge {
  position: absolute;
  bottom: 14px; left: 18px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: rgba(184, 150, 92, 0.10);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(184, 150, 92, 0.18);
}
.rec-card-badge.is-user {
  color: var(--leaf-deep);
  background: rgba(45, 82, 64, 0.10);
  border-color: rgba(45, 82, 64, 0.22);
}

/* Tons par type */
.rec-card.tone-leaf  { background: linear-gradient(180deg, #f1ebd9 0%, #ecdfc4 100%); }
.rec-card.tone-gold  { background: linear-gradient(180deg, #f6eed5 0%, #ecd9a6 100%); }
.rec-card.tone-sage  { background: linear-gradient(180deg, #e9efe1 0%, #d8e3cc 100%); }
.rec-card.tone-bark  { background: linear-gradient(180deg, #ebd8c1 0%, #d9bb95 100%); }
.rec-card.tone-clay  { background: linear-gradient(180deg, #f1d8c6 0%, #e5b497 100%); }

/* --- Drawer (detail + form) --- */
.rec-drawer {
  position: fixed; inset: 0; z-index: 200;
  visibility: hidden; opacity: 0;
  transition: opacity .2s ease, visibility .2s ease;
}
.rec-drawer.is-open { visibility: visible; opacity: 1; }
.rec-drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(21, 40, 28, 0.55);
  backdrop-filter: blur(3px);
}
.rec-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(720px, 100%);
  background: var(--cream);
  box-shadow: -20px 0 60px -20px rgba(0,0,0,.4);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.rec-drawer.is-open .rec-drawer-panel { transform: translateX(0); }
.rec-drawer-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.rec-drawer-head h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 26px;
  color: var(--leaf-deep);
  margin: 4px 0 4px;
  line-height: 1.1;
}
.rec-drawer-head .eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--clay);
}
.rec-detail-use {
  font-family: var(--font-serif);
  font-size: 14.5px;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0;
}

.rec-detail-body { padding: 18px 24px 24px; }
.rec-section { margin-bottom: 20px; }
.rec-section h4 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 10px;
}

.rec-ing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.rec-ing-table thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 6px 10px 8px;
  border-bottom: 1px solid var(--line);
}
.rec-ing-table tbody td {
  padding: 9px 10px;
  border-bottom: 1px dashed var(--line-soft);
}
.rec-tab-name { font-weight: 500; color: var(--leaf-deep); }
.rec-plant-link { color: var(--leaf); text-decoration: underline dotted; }

.rec-steps {
  margin: 0; padding-left: 0;
  list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.rec-steps li {
  display: flex; gap: 12px;
  font-size: 14px; line-height: 1.45;
  color: var(--ink);
}
.rec-step-n {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  color: var(--gold);
  min-width: 24px;
  font-size: 18px;
  line-height: 1.2;
}

.rec-meta { display: flex; flex-direction: column; gap: 4px; }
.rec-meta-row {
  display: flex; justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 13.5px;
}
.rec-meta-row span:first-child {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.rec-caution {
  display: flex; gap: 12px;
  padding: 14px 16px;
  background: rgba(168, 88, 62, 0.08);
  border-left: 3px solid var(--clay);
  border-radius: 0 8px 8px 0;
}
.rec-caution i { width: 18px; height: 18px; color: var(--clay); flex-shrink: 0; margin-top: 2px; }
.rec-caution strong { color: var(--clay); display: block; margin-bottom: 4px; font-size: 13px; }
.rec-caution p { margin: 0; font-size: 13.5px; color: var(--ink-soft); }

.rec-detail-foot {
  position: sticky; bottom: 0;
  background: var(--cream);
  border-top: 1px solid var(--line);
  padding: 14px 24px;
  display: flex; gap: 10px; align-items: center;
}
.rec-detail-foot .spacer { flex: 1; }

/* --- Form drawer --- */
.rec-form {
  padding: 20px 24px 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.rec-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.rec-ing-block {
  background: var(--cream-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.rec-ing-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.rec-ing-head > span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.rec-ing-list { display: flex; flex-direction: column; gap: 8px; }
.rec-ing-row {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 0.8fr 0.7fr 1fr auto;
  gap: 6px;
  align-items: center;
}
.rec-ing-row select,
.rec-ing-row input {
  font-family: var(--font-body);
  font-size: 12.5px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--cream);
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.rec-ing-row select {
  appearance: none; padding-right: 24px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%231a1815' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.rec-ing-row .ing-del { padding: 6px; }
.rec-ing-row .ing-del i { color: var(--clay); }

.rec-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

@media (max-width: 640px) {
  .rec-form-grid { grid-template-columns: 1fr; }
  .rec-ing-row { grid-template-columns: 1fr 1fr; }
  .rec-drawer-panel { width: 100%; }
}

/* --- Zone d'impression (cachee a l'ecran) --- */
.rec-print-sheet {
  position: absolute;
  left: -10000px; top: 0;
  width: 210mm;
  pointer-events: none;
}

/* ============================================================
   IMPRESSION (Export PDF natif)
   ============================================================ */
@media print {
  /* Cache toute l'interface */
  body * { visibility: hidden !important; }

  .rec-print-sheet,
  .rec-print-sheet * { visibility: visible !important; }

  .rec-print-sheet {
    position: absolute !important;
    left: 0 !important; top: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
    color: #1a1815 !important;
  }

  @page {
    size: A4;
    margin: 16mm 14mm 18mm 14mm;
  }
}

/* Styles de la feuille (visible en preview impression) */
.print-sheet {
  font-family: "EB Garamond", Georgia, serif;
  color: #1a1815;
  background: #ffffff;
  padding: 6mm;
  font-size: 11.5pt;
  line-height: 1.45;
}
.print-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1.5pt solid #1f3a2a;
  padding-bottom: 6mm;
  margin-bottom: 6mm;
}
.print-brand {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 18pt;
  letter-spacing: 0.15em;
  color: #1f3a2a;
}
.print-date {
  font-family: "JetBrains Mono", monospace;
  font-size: 9pt;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #6b6660;
}
.print-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 9pt;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #a8583e;
  margin-bottom: 3mm;
}
.print-title {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 28pt;
  color: #1f3a2a;
  margin: 0 0 4mm;
  line-height: 1.05;
}
.print-use {
  font-style: italic;
  color: #4a4540;
  margin: 0 0 8mm;
  font-size: 12pt;
}
.print-h2 {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: 14pt;
  color: #1f3a2a;
  margin: 6mm 0 3mm;
  border-bottom: 0.5pt solid #b8965c;
  padding-bottom: 1.5mm;
}
.print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5pt;
  margin-bottom: 4mm;
}
.print-table thead th {
  text-align: left;
  font-family: "JetBrains Mono", monospace;
  font-size: 8.5pt;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #6b6660;
  padding: 2mm 3mm;
  border-bottom: 0.5pt solid #1a1815;
}
.print-table tbody td {
  padding: 2mm 3mm;
  border-bottom: 0.3pt solid #d0c8b8;
}
.print-steps {
  list-style: none;
  padding-left: 0;
  margin: 0 0 6mm;
}
.print-steps li {
  padding: 1.5mm 0 1.5mm 0;
  border-bottom: 0.3pt dashed #d0c8b8;
}
.print-steps li strong {
  color: #b8965c;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  margin-right: 2mm;
}
.print-meta {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 4mm;
}
.print-meta th {
  text-align: left;
  font-family: "JetBrains Mono", monospace;
  font-size: 8.5pt;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #6b6660;
  font-weight: normal;
  padding: 2mm 3mm 2mm 0;
  width: 32mm;
  vertical-align: top;
}
.print-meta td {
  padding: 2mm 0;
  font-size: 11pt;
}
.print-caution {
  margin-top: 4mm;
  padding: 3mm 4mm;
  background: #faf2ec;
  border-left: 1.5pt solid #a8583e;
  font-size: 10.5pt;
}
.print-caution strong { color: #a8583e; }
.print-foot {
  margin-top: 12mm;
  padding-top: 3mm;
  border-top: 0.3pt solid #d0c8b8;
  font-family: "JetBrains Mono", monospace;
  font-size: 7.5pt;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b6660;
  text-align: center;
}

/* ============================================================
   SPRINT 5 — CALENDRIER
   ============================================================ */
.cal-module { display: flex; flex-direction: column; gap: 24px; }

.cal-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  padding: 14px 18px;
  background: rgba(244, 237, 224, 0.55);
  border: 1px solid rgba(184, 150, 92, 0.18);
  border-radius: 12px;
  font-size: 13px;
  color: var(--leaf-deep);
}
.cal-leg {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "DM Sans", sans-serif;
}
.cal-leg-dot {
  width: 14px; height: 14px; border-radius: 4px;
  background: var(--leaf-soft);
  border: 1px solid rgba(31, 58, 42, 0.18);
}
.cal-leg-dot.s-winter { background: #c9d4cc; }
.cal-leg-dot.s-spring { background: #b8d4a8; }
.cal-leg-dot.s-summer { background: #f4d99b; }
.cal-leg-dot.s-autumn { background: #d49a6f; }
.cal-leg-dot.is-current {
  background: var(--gold);
  border-color: var(--clay);
  box-shadow: 0 0 0 2px rgba(184, 150, 92, 0.25);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.cal-month {
  background: var(--cream-3);
  border: 1px solid rgba(184, 150, 92, 0.22);
  border-radius: 14px;
  padding: 14px 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 160px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cal-month:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(31, 58, 42, 0.10); }
.cal-month.s-winter { background: linear-gradient(180deg, #eef2ec 0%, #e2eae2 100%); }
.cal-month.s-spring { background: linear-gradient(180deg, #eaf3e0 0%, #dceac9 100%); }
.cal-month.s-summer { background: linear-gradient(180deg, #fbf2d6 0%, #f3e4b3 100%); }
.cal-month.s-autumn { background: linear-gradient(180deg, #f5e3d0 0%, #e6c79f 100%); }
.cal-month.is-current {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(184, 150, 92, 0.20), 0 8px 20px rgba(31, 58, 42, 0.08);
}

.cal-month-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px dashed rgba(31, 58, 42, 0.20);
  padding-bottom: 6px;
}
.cal-month-head h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 18px;
  color: var(--leaf-deep);
  text-transform: capitalize;
}
.cal-month-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--bark);
}

.cal-month-body { display: flex; flex-direction: column; gap: 4px; }

.cal-plant {
  text-align: left;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(31, 58, 42, 0.12);
  border-radius: 8px;
  padding: 6px 10px;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  color: var(--leaf-deep);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.cal-plant:hover {
  background: var(--cream);
  border-color: var(--gold);
}

.cal-empty {
  margin: 0;
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-size: 13px;
  color: rgba(31, 58, 42, 0.50);
}

/* ============================================================
   SPRINT 5 — CALCULATEUR
   ============================================================ */
.calc-module { display: flex; flex-direction: column; gap: 24px; }

.calc-shell {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 22px;
  align-items: start;
}

.calc-card {
  background: var(--cream-3);
  border: 1px solid rgba(184, 150, 92, 0.22);
  border-radius: 14px;
  padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
}

.calc-h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 20px;
  color: var(--leaf-deep);
}

.calc-mode {
  display: flex; gap: 6px;
  padding: 4px;
  background: rgba(184, 150, 92, 0.12);
  border-radius: 10px;
}
.calc-mode-btn {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 9px 12px;
  border-radius: 8px;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  color: var(--bark);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.calc-mode-btn.is-active {
  background: var(--cream);
  color: var(--leaf-deep);
  box-shadow: 0 1px 2px rgba(31, 58, 42, 0.10);
  font-weight: 600;
}

.calc-input-row {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 8px;
}
.calc-input-row input,
.calc-input-row select {
  font-family: "DM Sans", sans-serif;
}

.calc-results { background: linear-gradient(180deg, var(--cream) 0%, var(--cream-3) 100%); }

.calc-result-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(31, 58, 42, 0.15);
  font-size: 14px;
}
.calc-result-row:last-child { border-bottom: 0; }
.calc-result-k {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bark);
}
.calc-result-v {
  font-family: "DM Sans", sans-serif;
  color: var(--leaf-deep);
  text-align: right;
}
.calc-latin {
  display: block;
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-size: 12px;
  color: rgba(31, 58, 42, 0.60);
}

.calc-big-result {
  margin-top: 8px;
  padding: 18px;
  background: linear-gradient(135deg, var(--leaf-deep) 0%, var(--leaf) 100%);
  color: var(--cream);
  border-radius: 12px;
  text-align: center;
}
.calc-big-result.calc-big-soft {
  background: linear-gradient(135deg, var(--gold) 0%, var(--clay) 100%);
}
.calc-big-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.85;
  margin-bottom: 6px;
}
.calc-big-value {
  font-family: "Fraunces", serif;
  font-size: 36px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex; align-items: baseline; gap: 4px; flex-wrap: wrap;
  justify-content: center;
}
.calc-big-value span { font-size: 22px; opacity: 0.7; margin: 0 4px; }
.calc-big-value em {
  font-style: normal;
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  opacity: 0.85;
  margin-left: 4px;
}
.calc-big-sub {
  margin-top: 8px;
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-size: 13px;
  opacity: 0.85;
}

.calc-note {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px;
  background: rgba(184, 150, 92, 0.10);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-size: 13px;
  color: var(--bark);
}
.calc-note i { flex-shrink: 0; margin-top: 2px; width: 14px; height: 14px; }

.calc-empty {
  margin: 0;
  font-family: "EB Garamond", serif;
  font-style: italic;
  color: rgba(31, 58, 42, 0.55);
}

.calc-disclaimer {
  margin: 0;
  padding: 14px 18px;
  background: rgba(244, 237, 224, 0.55);
  border: 1px solid rgba(184, 150, 92, 0.18);
  border-radius: 10px;
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-size: 13px;
  color: var(--bark);
  line-height: 1.55;
}

/* ============================================================
   SPRINT 5 — BIBLIOTHEQUE
   ============================================================ */
.lib-module { display: flex; flex-direction: column; gap: 30px; }

.lib-cat { display: flex; flex-direction: column; gap: 14px; }

.lib-cat-head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(184, 150, 92, 0.30);
}
.lib-cat-head i {
  width: 22px; height: 22px;
  color: var(--clay);
  flex-shrink: 0;
}
.lib-cat-head h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 22px;
  color: var(--leaf-deep);
}

.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.lib-item {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 16px;
  background: var(--cream-3);
  border: 1px solid rgba(184, 150, 92, 0.22);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
a.lib-item:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 8px 18px rgba(31, 58, 42, 0.10);
}
.lib-item.is-static {
  background: rgba(244, 237, 224, 0.40);
  cursor: default;
}

.lib-item-name {
  margin: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--leaf-deep);
}
.lib-item-name i {
  width: 14px; height: 14px;
  color: var(--clay);
  flex-shrink: 0;
}

.lib-item-desc {
  margin: 0;
  font-family: "EB Garamond", serif;
  font-size: 14px;
  font-style: italic;
  color: var(--bark);
  line-height: 1.45;
}

.lib-disclaimer {
  margin: 0;
  padding: 16px 20px;
  background: rgba(168, 88, 62, 0.08);
  border: 1px solid rgba(168, 88, 62, 0.25);
  border-radius: 10px;
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-size: 13px;
  color: var(--bark);
  line-height: 1.55;
}

/* ============================================================
   SPRINT 6 — HORTENSE (chat IA, design moderne)
   ============================================================ */
.hort-module {
  display: flex; flex-direction: column; gap: 18px;
}

/* --- Shell principal : grand cadre conversationnel --- */
.hort-shell {
  display: flex; flex-direction: column;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(184, 150, 92, 0.06) 0%, transparent 55%),
    radial-gradient(120% 80% at 100% 100%, rgba(45, 82, 64, 0.05) 0%, transparent 55%),
    #fbf7ef;
  border: 1px solid rgba(31, 58, 42, 0.10);
  border-radius: 22px;
  overflow: hidden;
  min-height: 540px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 20px 50px -30px rgba(31, 58, 42, 0.25);
}

/* --- Thread des messages --- */
.hort-thread {
  flex: 1;
  padding: 28px 26px;
  display: flex; flex-direction: column; gap: 20px;
  max-height: 60vh;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.hort-thread::-webkit-scrollbar { width: 8px; }
.hort-thread::-webkit-scrollbar-thumb {
  background: rgba(31, 58, 42, 0.18);
  border-radius: 4px;
}
.hort-thread::-webkit-scrollbar-thumb:hover { background: rgba(31, 58, 42, 0.32); }

/* --- Empty state moderne --- */
.hort-empty {
  text-align: center;
  padding: 36px 20px 18px;
  color: var(--bark);
  animation: hort-fade 0.4s ease;
}
.hort-empty-icon {
  width: 58px; height: 58px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gold) 0%, var(--clay) 100%);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(184, 150, 92, 0.55);
  animation: hort-pulse 3.4s ease-in-out infinite;
}
.hort-empty-icon i { width: 26px; height: 26px; }
.hort-empty h3 {
  margin: 0 0 6px;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 26px;
  color: var(--leaf-deep);
  letter-spacing: -0.01em;
}
.hort-empty p {
  margin: 0 auto;
  max-width: 46ch;
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  color: rgba(31, 58, 42, 0.66);
  line-height: 1.55;
}

@keyframes hort-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 24px -8px rgba(184, 150, 92, 0.55); }
  50% { transform: scale(1.06); box-shadow: 0 12px 32px -8px rgba(184, 150, 92, 0.75); }
}
@keyframes hort-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hort-slide-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Messages --- */
.hort-msg {
  display: flex; gap: 12px;
  align-items: flex-start;
  animation: hort-slide-up 0.28s ease;
}
.hort-msg.is-user { flex-direction: row-reverse; }

.hort-msg-avatar {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
}
.hort-msg.is-user .hort-msg-avatar {
  background: linear-gradient(135deg, #5d7866 0%, var(--leaf-deep) 100%);
}
.hort-msg.is-bot .hort-msg-avatar {
  background: linear-gradient(135deg, var(--gold) 0%, var(--clay) 100%);
  box-shadow: 0 4px 14px -4px rgba(184, 150, 92, 0.55);
}
.hort-msg-avatar i { width: 17px; height: 17px; }

.hort-msg-body {
  max-width: 78%;
  padding: 14px 18px;
  border-radius: 18px;
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  word-wrap: break-word;
}
.hort-msg.is-user .hort-msg-body {
  background: linear-gradient(135deg, var(--leaf) 0%, var(--leaf-deep) 100%);
  color: #f4ede0;
  border-bottom-right-radius: 6px;
  box-shadow: 0 6px 18px -10px rgba(31, 58, 42, 0.45);
}
.hort-msg.is-bot .hort-msg-body {
  background: #ffffff;
  color: var(--leaf-deep);
  border: 1px solid rgba(31, 58, 42, 0.08);
  border-bottom-left-radius: 6px;
  box-shadow: 0 4px 14px -10px rgba(31, 58, 42, 0.25);
}

.hort-user-text {
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* --- Markdown rendu : titres, listes, code --- */
.hort-md p { margin: 0 0 10px; }
.hort-md p:last-child { margin-bottom: 0; }
.hort-md h3 {
  margin: 14px 0 6px;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 18px;
  color: var(--leaf-deep);
  letter-spacing: -0.01em;
}
.hort-md h3:first-child { margin-top: 0; }
.hort-md h4 {
  margin: 12px 0 4px;
  font-family: "DM Sans", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--clay);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.hort-md ul, .hort-md ol {
  margin: 6px 0 10px;
  padding-left: 22px;
}
.hort-md li {
  margin-bottom: 4px;
  padding-left: 2px;
}
.hort-md li::marker { color: var(--clay); }
.hort-md code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85em;
  padding: 2px 6px;
  background: rgba(184, 150, 92, 0.16);
  border-radius: 6px;
  color: var(--bark);
}

/* --- Typing indicator moderne --- */
.hort-typing {
  display: inline-flex; gap: 5px;
  padding: 4px 2px;
  align-items: center;
}
.hort-typing span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: hort-bounce 1.2s infinite ease-in-out;
}
.hort-typing span:nth-child(2) { animation-delay: 0.15s; }
.hort-typing span:nth-child(3) { animation-delay: 0.30s; }
@keyframes hort-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-5px); opacity: 1; }
}

/* --- Suggestions categorisees (en haut, accordeons) --- */
.hort-suggest {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px 22px;
  background: rgba(244, 237, 224, 0.55);
  border-bottom: 1px solid rgba(31, 58, 42, 0.08);
}
.hort-suggest-head {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "DM Sans", sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(31, 58, 42, 0.55);
}
.hort-suggest-head i { width: 14px; height: 14px; color: var(--gold); }

.hort-suggest-groups {
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: flex-start;   /* les cartes fermées restent compactes */
}

.hort-sg-group {
  flex: 1 1 220px;
  min-width: 200px;
  background: #ffffff;
  border: 1px solid rgba(31, 58, 42, 0.10);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.hort-sg-group[open] {
  box-shadow: 0 6px 18px -10px rgba(31, 58, 42, 0.25);
  border-color: rgba(184, 150, 92, 0.40);
}
.hort-sg-head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--leaf-deep);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.15s ease;
}
.hort-sg-head::-webkit-details-marker { display: none; }
.hort-sg-head::marker { display: none; }
.hort-sg-head:hover { background: rgba(184, 150, 92, 0.08); }
.hort-sg-head > i:first-child {
  width: 16px; height: 16px;
  color: var(--clay);
  flex-shrink: 0;
}
.hort-sg-head > span { flex: 1; }
.hort-sg-chevron {
  width: 16px; height: 16px;
  color: rgba(31, 58, 42, 0.45);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.hort-sg-group[open] .hort-sg-chevron {
  transform: rotate(180deg);
  color: var(--clay);
}

.hort-sg-chips {
  display: flex; flex-direction: column; gap: 4px;
  padding: 4px 8px 10px;
  border-top: 1px solid rgba(31, 58, 42, 0.06);
  margin-top: 2px;
  background: #ffffff;
}
.hort-sg-chips .hort-chip {
  width: 100%;
  justify-content: flex-start;
  border-radius: 8px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 9px 12px;
  font-size: 13.5px;
  text-align: left;
}
.hort-sg-chips .hort-chip:hover {
  background: var(--cream-3);
  border-color: rgba(184, 150, 92, 0.30);
  transform: none;
  box-shadow: 0 2px 6px -3px rgba(184, 150, 92, 0.30);
}
/* Bloque tout <i data-lucide> non encore remplacé par Lucide (évite le carré vert) */
.hort-sg-chips .hort-chip i[data-lucide],
.hort-sg-head i[data-lucide] {
  display: inline-block;
  width: 15px; height: 15px;
  font-size: 0;
  line-height: 0;
}
.hort-sg-chips .hort-chip svg,
.hort-sg-head svg {
  width: 15px; height: 15px;
  flex-shrink: 0;
}

.hort-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  background: #ffffff;
  border: 1px solid rgba(31, 58, 42, 0.10);
  border-radius: 999px;
  font-family: "DM Sans", sans-serif;
  font-size: 13.5px;
  color: var(--leaf-deep);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(31, 58, 42, 0.04);
}
.hort-chip:hover {
  background: var(--cream-3);
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -4px rgba(184, 150, 92, 0.35);
}
.hort-chip i {
  width: 15px; height: 15px;
  color: var(--clay);
}

/* --- Composer moderne (input + bouton circulaire) --- */
.hort-composer {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 18px 16px;
  background: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(31, 58, 42, 0.08);
  backdrop-filter: blur(8px);
}
.hort-composer-row {
  display: flex; align-items: flex-end; gap: 10px;
  background: #ffffff;
  border: 1px solid rgba(31, 58, 42, 0.12);
  border-radius: 22px;
  padding: 6px 6px 6px 18px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hort-composer-row:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(184, 150, 92, 0.14);
}
.hort-composer textarea {
  flex: 1;
  resize: none;
  background: transparent;
  border: 0;
  padding: 10px 0;
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  color: var(--leaf-deep);
  line-height: 1.5;
  min-height: 26px;
  max-height: 200px;
  outline: none;
}
.hort-composer textarea::placeholder { color: rgba(31, 58, 42, 0.4); }

.hort-send {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--leaf) 0%, var(--leaf-deep) 100%);
  color: #fff;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 12px -4px rgba(31, 58, 42, 0.45);
}
.hort-send:hover { filter: brightness(1.1); transform: translateY(-1px); }
.hort-send:active { transform: scale(0.95); }
.hort-send i { width: 18px; height: 18px; }

.hort-composer-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 4px;
}
.hort-clear {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  border: 0;
  padding: 4px 8px;
  border-radius: 8px;
  color: rgba(31, 58, 42, 0.55);
  font-family: "DM Sans", sans-serif;
  font-size: 12.5px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.hort-clear:hover {
  color: var(--clay);
  background: rgba(168, 88, 62, 0.08);
}
.hort-clear i { width: 13px; height: 13px; }
.hort-clear.is-danger { color: rgba(185, 74, 58, 0.7); }
.hort-clear.is-danger:hover {
  color: #b94a3a;
  background: rgba(185, 74, 58, 0.10);
}

.hort-composer-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.hort-hint {
  font-family: "DM Sans", sans-serif;
  font-size: 11.5px;
  color: rgba(31, 58, 42, 0.4);
}

/* --- Panneau historique (modal) --------------------------- */
.hort-history-panel {
  position: fixed; inset: 0;
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.hort-history-panel[hidden] { display: none; }
.hort-history-backdrop {
  position: absolute; inset: 0;
  background: rgba(31, 58, 42, 0.45);
  backdrop-filter: blur(2px);
}
.hort-history-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: 80vh;
  background: var(--cream-3);
  border: 1px solid rgba(184, 150, 92, 0.30);
  border-radius: 14px;
  box-shadow: 0 24px 48px -16px rgba(31, 58, 42, 0.35);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.hort-history-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(31, 58, 42, 0.10);
  background: linear-gradient(180deg, var(--cream), var(--cream-3));
}
.hort-history-head h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 18px;
  color: var(--leaf-deep);
  display: inline-flex; align-items: center; gap: 8px;
}
.hort-history-head h3 i { width: 18px; height: 18px; }
.hort-history-head-actions {
  display: inline-flex; align-items: center; gap: 8px;
}
.hort-history-close {
  background: transparent;
  border: 0;
  width: 30px; height: 30px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: rgba(31, 58, 42, 0.6);
  transition: background 0.15s ease, color 0.15s ease;
}
.hort-history-close:hover { background: rgba(31, 58, 42, 0.08); color: var(--leaf-deep); }
.hort-history-close i { width: 16px; height: 16px; }

.hort-history-body {
  overflow-y: auto;
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}

.hort-history-empty {
  padding: 32px 16px;
  text-align: center;
  color: rgba(31, 58, 42, 0.55);
}
.hort-history-empty i { width: 32px; height: 32px; opacity: 0.4; }
.hort-history-empty p { margin: 8px 0 0; font-family: "DM Sans", sans-serif; font-size: 14px; }
.hort-history-empty .muted { font-size: 12.5px; opacity: 0.75; }

.hort-session {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid rgba(31, 58, 42, 0.10);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hort-session:hover {
  border-color: rgba(184, 150, 92, 0.50);
  box-shadow: 0 4px 12px -6px rgba(31, 58, 42, 0.20);
}
.hort-session-info { flex: 1 1 auto; min-width: 0; }
.hort-session-title {
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--leaf-deep);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hort-session-meta {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: rgba(31, 58, 42, 0.50);
  margin-top: 2px;
}
.hort-session-actions { display: inline-flex; gap: 4px; flex-shrink: 0; }
.btn-ghost-sm.is-danger {
  border-color: rgba(185, 74, 58, 0.30);
  color: rgba(185, 74, 58, 0.7);
}
.btn-ghost-sm.is-danger:hover:not([disabled]) {
  background: rgba(185, 74, 58, 0.10);
  border-color: #b94a3a;
  color: #b94a3a;
}

/* --- Disclaimer --- */
.hort-disclaimer {
  margin: 0;
  padding: 12px 18px;
  background: rgba(168, 88, 62, 0.06);
  border-left: 3px solid var(--clay);
  border-radius: 8px;
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-size: 13.5px;
  color: var(--bark);
  line-height: 1.55;
}

@media (max-width: 720px) {
  .hort-thread { padding: 22px 16px; }
  .hort-msg-body { max-width: 86%; padding: 12px 14px; font-size: 14.5px; }
  .hort-suggest { padding: 4px 14px 14px; }
  .hort-empty h3 { font-size: 22px; }
  .hort-hint { display: none; }
}

/* ============================================================
   SPRINT 7 — REGLAGES
   ============================================================ */
.set-module { display: flex; flex-direction: column; gap: 22px; }

.set-card {
  background: var(--cream-3);
  border: 1px solid rgba(184, 150, 92, 0.22);
  border-radius: 14px;
  padding: 22px 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.set-card-soft {
  background: rgba(244, 237, 224, 0.50);
  border-style: dashed;
}

.set-h3 {
  margin: 0;
  display: flex; align-items: center; gap: 10px;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 22px;
  color: var(--leaf-deep);
}
.set-h3 i { width: 20px; height: 20px; color: var(--clay); }

.set-desc {
  margin: 0;
  font-family: "EB Garamond", serif;
  font-size: 14px;
  font-style: italic;
  color: var(--bark);
  line-height: 1.55;
  max-width: 72ch;
}

.set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.set-actions {
  display: flex; align-items: center; gap: 12px;
}
.set-actions-wrap { flex-wrap: wrap; }

.set-saved {
  font-family: "EB Garamond", serif;
  font-style: italic;
  color: var(--leaf);
  font-size: 14px;
}

/* Theme picker */
.set-theme {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.set-theme-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--cream);
  border: 2px solid rgba(184, 150, 92, 0.22);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: "DM Sans", sans-serif;
  color: var(--leaf-deep);
}
.set-theme-btn:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}
.set-theme-btn.is-active {
  border-color: var(--leaf);
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-3) 100%);
  box-shadow: 0 0 0 3px rgba(45, 82, 64, 0.10);
}
.set-theme-btn i {
  width: 22px; height: 22px;
  color: var(--clay);
  flex-shrink: 0;
}
.set-theme-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
}
.set-theme-desc {
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-size: 13px;
  color: var(--bark);
  line-height: 1.4;
}

/* Donnees par module */
.set-data-grid {
  display: flex; flex-direction: column;
  border-top: 1px solid rgba(184, 150, 92, 0.18);
}
.set-data-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(184, 150, 92, 0.22);
}
.set-data-row:last-child { border-bottom: 0; }
.set-data-label {
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--leaf-deep);
}
.set-data-meta {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bark);
  margin-top: 2px;
}

.btn-ghost-sm {
  background: transparent;
  border: 1px solid rgba(184, 150, 92, 0.30);
  color: var(--bark);
  padding: 6px 10px;
  border-radius: 6px;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  display: inline-flex; align-items: center; gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-ghost-sm i { width: 12px; height: 12px; }
.btn-ghost-sm:hover:not([disabled]) {
  background: rgba(168, 88, 62, 0.10);
  border-color: var(--clay);
  color: var(--clay);
}
.btn-ghost-sm[disabled] { opacity: 0.4; cursor: not-allowed; }

.btn-danger {
  background: #b94a3a;
  color: var(--cream);
  border: 0;
  padding: 9px 14px;
  border-radius: 8px;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-danger i { width: 14px; height: 14px; }
.btn-danger:hover { background: #a13d2e; }

/* Infos */
.set-info {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 18px;
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
}
.set-info dt {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bark);
  align-self: center;
}
.set-info dd {
  margin: 0;
  color: var(--leaf-deep);
}

.set-disclaimer {
  margin: 0;
  padding: 12px 16px;
  background: rgba(168, 88, 62, 0.08);
  border-left: 3px solid var(--clay);
  border-radius: 6px;
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-size: 13px;
  color: var(--bark);
  line-height: 1.55;
}

/* ============================================================
   THEME ATELIER (dark)
   ============================================================ */
html[data-theme="dark"] body {
  background:
    radial-gradient(70% 50% at 50% -10%, rgba(80, 130, 100, 0.25) 0%, transparent 60%),
    linear-gradient(180deg, #0e1e16 0%, #0a160f 100%);
}

html[data-theme="dark"] .page:not(#home).is-active {
  background: linear-gradient(180deg, #16261c 0%, #122119 100%);
  border-color: rgba(184, 150, 92, 0.15);
  color: #e8dfcc;
  box-shadow:
    0 30px 60px -30px rgba(0, 0, 0, 0.7),
    0 8px 20px -10px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .section-header h2,
html[data-theme="dark"] .set-h3,
html[data-theme="dark"] .calc-h3,
html[data-theme="dark"] .lib-cat-head h3,
html[data-theme="dark"] .cal-month-head h3,
html[data-theme="dark"] .hort-empty h3,
html[data-theme="dark"] .set-theme-name,
html[data-theme="dark"] .set-data-label,
html[data-theme="dark"] .calc-result-v,
html[data-theme="dark"] .set-info dd,
html[data-theme="dark"] .hort-md strong,
html[data-theme="dark"] .hort-md h3,
html[data-theme="dark"] .lib-item-name {
  color: #f0e6cf;
}

html[data-theme="dark"] .section-header .subtitle,
html[data-theme="dark"] .set-desc,
html[data-theme="dark"] .lib-item-desc,
html[data-theme="dark"] .calc-result-row,
html[data-theme="dark"] .calc-disclaimer,
html[data-theme="dark"] .lib-disclaimer,
html[data-theme="dark"] .hort-disclaimer,
html[data-theme="dark"] .set-disclaimer,
html[data-theme="dark"] .set-theme-desc,
html[data-theme="dark"] .hort-empty p,
html[data-theme="dark"] .set-data-meta {
  color: #c4b89a;
}

html[data-theme="dark"] .set-card,
html[data-theme="dark"] .calc-card,
html[data-theme="dark"] .hort-shell,
html[data-theme="dark"] .cal-month,
html[data-theme="dark"] .lib-item {
  background: rgba(20, 36, 27, 0.85);
  border-color: rgba(184, 150, 92, 0.25);
}

html[data-theme="dark"] .set-card-soft {
  background: rgba(14, 28, 20, 0.5);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #0e1e16;
  color: #f0e6cf;
  border-color: rgba(184, 150, 92, 0.30);
}

html[data-theme="dark"] .set-theme-btn,
html[data-theme="dark"] .hort-chip,
html[data-theme="dark"] .cal-plant {
  background: rgba(20, 36, 27, 0.85);
  color: #e8dfcc;
}
html[data-theme="dark"] .set-theme-btn.is-active {
  background: linear-gradient(135deg, #1d3326 0%, #16261c 100%);
}

html[data-theme="dark"] .hort-msg.is-bot .hort-msg-body {
  background: #1a2e21;
  border-color: rgba(184, 150, 92, 0.20);
  color: #e8dfcc;
}

html[data-theme="dark"] .cal-month.s-winter,
html[data-theme="dark"] .cal-month.s-spring,
html[data-theme="dark"] .cal-month.s-summer,
html[data-theme="dark"] .cal-month.s-autumn {
  background: linear-gradient(180deg, #1a2e21 0%, #142318 100%);
}

html[data-theme="dark"] .calc-results {
  background: linear-gradient(180deg, #1a2e21 0%, #142318 100%);
}

html[data-theme="dark"] .lib-cat-head { border-bottom-color: rgba(184, 150, 92, 0.30); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  /* On bascule en mode mobile : sidebar masquée, topbar affichée */
  .app-shell {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
  }
  .sidebar { display: none; }
  .topbar { display: flex; }
  .main-area { grid-column: auto; flex: 1; }

  .page-container { padding: 20px 20px 80px; }
  .hero { padding: 32px 24px; min-height: auto; border-radius: 14px; }

  /* Sprint 5 — Calculateur en pile */
  .calc-shell { grid-template-columns: 1fr; }
  .calc-big-value { font-size: 30px; }
}

@media (max-width: 540px) {
  .page-container { padding: 16px 16px 90px; }
  .page:not(#home).is-active { padding: 22px 18px 28px; border-radius: 14px; }
  .section-header { margin-bottom: 20px; }
  .section-header h2 { font-size: clamp(26px, 7vw, 34px); }
  .section-header .subtitle { font-size: 14px; }

  /* Cibles tactiles minimum 44px */
  .btn { min-height: 44px; }
}

@media (max-width: 640px) {
  .cal-grid { grid-template-columns: 1fr 1fr; }
  .lib-grid { grid-template-columns: 1fr; }
  .hort-msg-body { max-width: 90%; }
  .hort-thread { padding: 16px; }
  .set-theme { grid-template-columns: 1fr; }
  .set-actions-wrap .btn,
  .set-actions-wrap label.btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 460px) {
  .cal-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   A11Y — focus visible global + skip link
   ============================================================ */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}
.sidebar-link:focus-visible,
.menu-item:focus-visible,
.bento-card:focus-visible,
.btn:focus-visible {
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--leaf-deep);
  color: var(--cream);
  border-radius: 6px;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* ============================================================
   FOOTER
   ============================================================ */
.app-footer {
  margin-top: 60px;
  padding: 28px 0 12px;
  border-top: 1px dashed rgba(184, 150, 92, 0.30);
  text-align: center;
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-size: 13px;
  color: rgba(244, 237, 224, 0.65);
}
.app-footer strong { color: var(--gold); font-weight: 400; }
.app-footer a { color: inherit; text-decoration: underline; text-decoration-color: var(--gold); }
html[data-theme="dark"] .app-footer { color: rgba(196, 184, 154, 0.60); }

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

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   GUIDE de distillation (atelier)
   ============================================================ */
.ws-guide-card {
  background: var(--cream-3);
  border: 1px solid rgba(31, 58, 42, 0.12);
  border-radius: 12px;
  padding: 18px 18px 14px;
}
.ws-guide-empty p {
  margin: 8px 0 0;
  color: rgba(31,58,42,0.7);
  font-size: 14px;
}
.ws-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(31, 58, 42, 0.10);
  flex-wrap: wrap;
}
.ws-guide-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display, var(--font-body));
  font-style: italic;
  font-weight: 600;
  font-size: 18px;
  color: var(--leaf-deep);
}
.ws-guide-title i { width: 18px; height: 18px; }
.ws-guide-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(184, 150, 92, 0.18);
  color: var(--bark);
  border: 1px solid rgba(184, 150, 92, 0.35);
}
.ws-guide-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ws-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 18px;
}
.ws-guide-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  align-items: start;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(31, 58, 42, 0.08);
}
.ws-guide-row-wide {
  grid-column: 1 / -1;
  grid-template-columns: 160px 1fr;
}
.ws-guide-k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(31, 58, 42, 0.6);
  padding-top: 4px;
}
.ws-guide-v {
  color: var(--leaf-deep);
  font-size: 14px;
  line-height: 1.45;
}
.ws-guide-list {
  margin: 0;
  padding-left: 18px;
  color: var(--leaf-deep);
  font-size: 14px;
  line-height: 1.5;
}
.ws-guide-list li { margin-bottom: 3px; }
.ws-guide-input {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--leaf-deep);
  background: #fff;
  border: 1px solid rgba(31, 58, 42, 0.20);
  border-radius: 8px;
  padding: 8px 10px;
  outline: none;
  width: 100%;
  resize: vertical;
}
.ws-guide-input:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(45, 82, 64, 0.12);
}

@media (max-width: 780px) {
  .ws-guide-grid { grid-template-columns: 1fr; }
  .ws-guide-row,
  .ws-guide-row-wide { grid-template-columns: 1fr; }
  .ws-guide-k { padding-top: 0; }
}
