/* Evadya — charte « potager » : sève, terre, soleil, tomate.
   Palette claire sur fond vert-blanc ; sombre sur vert profond.  */

:root {
  --bg: #f4f6ef;
  --surface: #ffffff;
  --surface-2: #eaefe2;
  --ink: #1b2a1f;
  --muted: #5c6b5f;
  --line: #d6ddcc;
  --leaf: #2e7d46;
  --leaf-ink: #1f5a33;
  --leaf-soft: #dcebdf;
  --sow-in: #f1d98a;
  --sow: #e0b33a;
  --plant: #8a6444;
  --harvest: #d7492f;
  --plate: #fbf3e4;
  --plate-ink: #6a4b1f;
  --shadow: 0 1px 2px rgba(27, 42, 31, .06), 0 8px 24px -12px rgba(27, 42, 31, .18);
  --radius: 14px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121a14; --surface: #1a241d; --surface-2: #202c23; --ink: #edf1e8; --muted: #a9b5ab; --line: #2c3a30;
    --leaf: #5dba78; --leaf-ink: #9bd9ae; --leaf-soft: #1f3326; --sow-in: #7a6a2c; --sow: #d9b23f; --plant: #a9825f; --harvest: #e4634b;
    --plate: #2a2419; --plate-ink: #e6cfa3; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121a14; --surface: #1a241d; --surface-2: #202c23; --ink: #edf1e8; --muted: #a9b5ab; --line: #2c3a30;
  --leaf: #5dba78; --leaf-ink: #9bd9ae; --leaf-soft: #1f3326; --sow-in: #7a6a2c; --sow: #d9b23f; --plant: #a9825f; --harvest: #e4634b;
  --plate: #2a2419; --plate-ink: #e6cfa3; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  font-feature-settings: "kern"; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--leaf-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--leaf); }
:focus-visible { outline: 3px solid var(--sow); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--leaf); color: #fff; padding: .5rem 1rem; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: min(1120px, calc(100% - 2.5rem)); margin-inline: auto; }

/* Typo */
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; margin: 0 0 .5em; text-wrap: balance; letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.display { font-size: clamp(2.4rem, 1.6rem + 4vw, 4.4rem); font-weight: 500; line-height: 1.02; margin-bottom: .6em; }
.display em, .display-sm em { display: block; font-style: italic; font-weight: 400; color: var(--leaf-ink); font-size: .52em; line-height: 1.2; margin-top: .35em; letter-spacing: 0; }
.display-sm { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); line-height: 1.05; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; color: var(--leaf); margin: 0 0 .6rem; }
.eyebrow a { color: inherit; text-decoration: none; }
.quote { font-family: var(--font-display); font-style: italic; font-size: 1.25rem; line-height: 1.4; color: var(--plate-ink); }
.link-more { font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-more::after { content: " →"; }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 1.8em; font-size: 1.5rem; }
.prose .lead { font-size: 1.2rem; color: var(--ink); }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 68px; }
.brand { display: flex; align-items: baseline; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 26px; height: 26px; color: var(--leaf); align-self: center; }
.brand-name { font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; letter-spacing: -.01em; }
.brand-tag { font-size: .8rem; color: var(--muted); }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; padding: .45rem .8rem; border-radius: 999px; }
.nav a:hover { background: var(--surface-2); }
.nav a.is-active { background: var(--leaf-soft); color: var(--leaf-ink); }
@media (max-width: 700px) { .brand-tag { display: none; } .nav a { padding: .4rem .6rem; font-size: .95rem; } }

/* Sections */
.section { padding: clamp(2rem, 4vw, 3.5rem) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section-head h2 { margin-bottom: 0; }
.section-tint { background: var(--surface-2); }
.section-plate { background: var(--plate); color: var(--ink); }
.section-plate .eyebrow { color: var(--plate-ink); }
.section-about { border-top: 1px solid var(--line); }
.page-head { padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(1rem, 2vw, 2rem); }
.page-head .lead { margin-bottom: 0; }

/* Hero */
.hero { padding: clamp(2rem, 5vw, 4.5rem) 0 clamp(1.5rem, 3vw, 3rem); background:
  radial-gradient(60% 80% at 100% 0%, var(--leaf-soft) 0%, transparent 60%), var(--bg); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.hero-now { display: grid; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.now-col { min-width: 0; }
.now-title { display: flex; align-items: center; gap: .5rem; font-family: var(--font-body); font-weight: 700; font-size: .95rem; margin-bottom: .5rem; letter-spacing: .02em; }
.now-grid { gap: 1.5rem; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .7rem 1.15rem; border-radius: 999px; font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--leaf); color: #fff; }
.btn-primary:hover { background: var(--leaf-ink); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--leaf); color: var(--leaf-ink); }

/* Pastilles de plantes */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { display: inline-block; padding: .3rem .75rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .95rem; font-weight: 500; }
a.chip:hover { border-color: var(--leaf); color: var(--leaf-ink); background: var(--leaf-soft); }
.chip-fruit { border-color: color-mix(in srgb, var(--harvest) 40%, var(--line)); }
.chip-avoid { border-style: dashed; color: var(--muted); }
.chip-plain { color: var(--muted); }
.chips-empty { color: var(--muted); font-style: italic; margin: 0; }

/* Frise annuelle */
.strip { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin-top: .75rem; }
.cell { display: block; height: 18px; border-radius: 4px; background: var(--surface-2); position: relative; }
.cell i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: .6rem; font-weight: 600; color: var(--muted); opacity: .9; }
.cell.is-sow_indoor { background: var(--sow-in); }
.cell.is-sow_outdoor { background: var(--sow); }
.cell.is-plant { background: var(--plant); }
.cell.is-harvest { background: var(--harvest); }
.cell.is-sow_outdoor i, .cell.is-plant i, .cell.is-harvest i { color: #fff; }
.cell.is-now { outline: 2px solid var(--ink); outline-offset: 1px; }
.legend { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .85rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: .45rem; }
.legend .cell { width: 18px; height: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot.is-sow_indoor { background: var(--sow-in); } .dot.is-sow_outdoor { background: var(--sow); } .dot.is-plant { background: var(--plant); } .dot.is-harvest { background: var(--harvest); }

/* Cartes */
.grid { display: grid; gap: 1rem; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-seasons { grid-template-columns: repeat(4, 1fr); }
.grid-months { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-months-mini { grid-template-columns: 1fr; gap: .6rem; }
@media (max-width: 860px) { .grid-3, .grid-seasons { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-seasons { grid-template-columns: 1fr; } }

.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.15rem; text-decoration: none; color: var(--ink); transition: transform .15s ease, border-color .15s ease; }
.card:hover { transform: translateY(-2px); border-color: var(--leaf); color: var(--ink); }
.card h3, .card h2 { margin-bottom: .25rem; }
.card p { color: var(--muted); margin: 0; font-size: .95rem; }
.plant-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.plant-card-head .eyebrow { margin: 0; font-size: .7rem; }
.plant-card-title { font-size: 1.35rem; margin: .35rem 0 0; }
.plant-card-latin { font-style: italic; color: var(--muted); font-size: .85rem; margin: 0; }
.diff { font-size: .72rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; white-space: nowrap; }
.diff-1 { background: var(--leaf-soft); color: var(--leaf-ink); }
.diff-2 { background: color-mix(in srgb, var(--sow) 25%, var(--surface)); color: var(--plate-ink); }
.diff-3 { background: color-mix(in srgb, var(--harvest) 18%, var(--surface)); color: var(--harvest); }

.season-card { border-top: 6px solid var(--leaf); }
.season-card .eyebrow { font-size: .68rem; }
.season-printemps { --season: #6cbf6a; } .season-ete { --season: #e0b33a; } .season-automne { --season: #d0713a; } .season-hiver { --season: #6f95b5; }
.season-card, .month-card { border-top-color: var(--season, var(--leaf)); border-top-width: 6px; border-top-style: solid; }
.page-head.season-printemps, .page-head.season-ete, .page-head.season-automne, .page-head.season-hiver { box-shadow: inset 0 6px 0 var(--season); }
.month-card.is-now { outline: 2px solid var(--ink); }
.month-counts { list-style: none; margin: .75rem 0 0; padding: 0; display: flex; gap: .9rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.month-counts li { display: flex; align-items: center; gap: .35rem; }

/* Fiche plante */
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .88rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a::after { content: "/"; margin-left: .4rem; opacity: .6; }
.plant-head-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .plant-head-grid { grid-template-columns: 1fr; } }
.facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.facts dd { margin: .15rem 0 0; font-weight: 500; font-size: .95rem; }
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.cal-table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .85rem; }
.cal-table th, .cal-table td { padding: .55rem .35rem; text-align: center; border-bottom: 1px solid var(--line); }
.cal-table thead th { font-weight: 600; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.cal-table th abbr { text-decoration: none; }
.cal-table tbody th { text-align: left; padding-left: 1rem; font-weight: 600; white-space: nowrap; }
.cal-table tr:last-child td, .cal-table tr:last-child th { border-bottom: 0; }
.cal-table .is-now { background: color-mix(in srgb, var(--leaf-soft) 55%, transparent); }
.cal-table td .cell { height: 22px; border-radius: 6px; }
.callout { margin-top: 1.25rem; background: var(--leaf-soft); border-left: 5px solid var(--leaf); border-radius: 10px; padding: 1rem 1.25rem; }
.callout p:last-child { margin: 0; }
.callout-watch { background: color-mix(in srgb, var(--sow) 18%, var(--surface)); border-left-color: var(--sow); margin-top: 0; align-self: start; }
.callout-watch .eyebrow { color: var(--plate-ink); }
.plant-body { display: grid; grid-template-columns: 1.4fr .8fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 860px) { .plant-body { grid-template-columns: 1fr; } }
.steps { max-width: 62ch; }
.step { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.step:first-of-type { border-top: 0; padding-top: .25rem; }
.step-title { display: flex; align-items: center; gap: .75rem; font-size: 1.5rem; margin-bottom: .4rem; }
.step-n { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--leaf); color: #fff; font-family: var(--font-body); font-weight: 700; font-size: .95rem; display: grid; place-items: center; }
.step p:last-child { margin: 0; }
.plant-side { display: grid; gap: 1rem; position: sticky; top: 84px; }
.side-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; }
.side-block h3 { font-size: 1.05rem; margin-bottom: .6rem; }
.plain { margin: 0; padding-left: 1.1rem; }
.plain li { margin: .2rem 0; }
.problems { margin: 0; }
.problems dt { font-weight: 700; margin-top: .6rem; }
.problems dt:first-child { margin-top: 0; }
.problems dd { margin: .15rem 0 0; color: var(--muted); font-size: .93rem; }
.plate-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .plate-grid { grid-template-columns: 1fr; } }
.plate-grid h2 { margin-bottom: .5rem; }
.plate-aside { border-left: 3px solid var(--plate-ink); padding-left: 1.25rem; }
.plate-cards { margin-top: .5rem; }
.plate-card { background: color-mix(in srgb, var(--surface) 70%, transparent); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.plate-card h3 { font-size: 1.05rem; color: var(--plate-ink); }
.plate-card p:last-child { margin: 0; }
.plate-card-quote { background: transparent; border: 1px dashed var(--plate-ink); }

/* Listes / filtres / pager */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar .legend { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.filters a { text-decoration: none; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); font-size: .9rem; font-weight: 500; background: var(--surface); }
.filters a.is-active, .filters a:hover { background: var(--leaf-soft); border-color: var(--leaf); color: var(--leaf-ink); }
.month-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .month-grid { grid-template-columns: 1fr; } }
.tasks { margin: 0; padding-left: 1.4rem; max-width: 62ch; }
.tasks li { margin: .45rem 0; padding-left: .25rem; }
.tasks li::marker { color: var(--leaf); font-weight: 700; }
.season-nav { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.season-nav a { text-decoration: none; padding: .35rem .85rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); background: var(--surface); font-weight: 500; }
.season-nav a.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pager { display: flex; justify-content: space-between; gap: 1rem; padding: 2rem 0 3rem; }
.pager a { text-decoration: none; font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); }
.pager a .eyebrow { display: block; }
.pager-next { text-align: right; }
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 2rem; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; padding: 2.5rem 0 1.5rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; margin-bottom: .3rem; }
.footer-text { color: var(--muted); max-width: 40ch; }
.footer-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--muted); margin-bottom: .5rem; }
.footer-grid a { display: block; text-decoration: none; color: var(--ink); padding: .15rem 0; }
.footer-grid a:hover { color: var(--leaf); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem 0 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }

/* ---------- Espace privé : formulaires ---------- */
.panel-wrap { max-width: 640px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.panel-foot { margin: 1rem 0 0; color: var(--muted); font-size: .95rem; }
.panel-details { margin-top: 1.25rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.panel-details summary { cursor: pointer; font-weight: 600; color: var(--leaf-ink); }
.panel-details .form { margin-top: 1rem; }
.form { display: grid; gap: 1rem; }
.form label, .field { display: grid; gap: .35rem; font-weight: 600; font-size: .95rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .65rem .8rem; width: 100%; }
input:focus, textarea:focus { border-color: var(--leaf); outline: none; box-shadow: 0 0 0 3px var(--leaf-soft); }
textarea { resize: vertical; }
.input-code { font-size: 1.6rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; max-width: 260px; }
.check { display: flex !important; gap: .6rem; align-items: flex-start; font-weight: 400 !important; color: var(--muted); }
.check input { margin-top: .3rem; }
.field-help { display: block; font-weight: 400; font-size: .85rem; color: var(--muted); }
.field-err { display: block; font-weight: 500; font-size: .88rem; color: var(--harvest); }
.form-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .25rem; }
.form-inline { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn-sm { padding: .45rem .85rem; font-size: .9rem; }
.btn-danger { background: transparent; border-color: var(--line); color: var(--harvest); }
.btn-danger:hover { border-color: var(--harvest); }
.flash { border-radius: 10px; padding: .75rem 1rem; margin: 0 0 1rem; font-weight: 500; }
.flash-ok { background: var(--leaf-soft); color: var(--leaf-ink); }
.flash-err { background: color-mix(in srgb, var(--harvest) 14%, var(--surface)); color: var(--harvest); }
.steps-mini { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; gap: .5rem; font-size: .85rem; }
.steps-mini li { padding: .3rem .8rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.steps-mini li.is-current { background: var(--leaf); color: #fff; }
.steps-mini li.is-done { background: var(--leaf-soft); color: var(--leaf-ink); }
.steps-mini li.is-done::before { content: "✓ "; }
.nav-user { display: flex; align-items: center; gap: .25rem; }
.nav-user form { display: inline; }
.nav-user button { font: inherit; background: none; border: 0; color: var(--muted); cursor: pointer; padding: .45rem .6rem; border-radius: 999px; }
.nav-user button:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- Dessin de l'espace ---------- */
.designer { display: grid; grid-template-columns: 340px 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .designer { grid-template-columns: 1fr; } }
.designer-side { display: grid; gap: 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.shapes { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.shapes legend { grid-column: 1 / -1; margin-bottom: .25rem; }
.shape-opt { position: relative; display: grid; justify-items: center; gap: .35rem; padding: .6rem .3rem .5rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: .8rem; font-weight: 500; text-align: center; }
.shape-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.shape-opt:has(input:checked) { border-color: var(--leaf); background: var(--leaf-soft); }
.shape-opt:has(input:focus-visible) { outline: 3px solid var(--sow); }
.shape-ico { width: 34px; height: 28px; background: var(--leaf); display: block; }
.shape-ico-l { clip-path: polygon(0 0, 55% 0, 55% 50%, 100% 50%, 100% 100%, 0 100%); }
.shape-ico-u { clip-path: polygon(0 0, 33% 0, 33% 55%, 67% 55%, 67% 0, 100% 0, 100% 100%, 0 100%); }
.shape-ico-o { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 0, 28% 30%, 28% 70%, 72% 70%, 72% 30%, 28% 30%); }
.shape-ico-t { clip-path: polygon(0 0, 100% 0, 100% 40%, 66% 40%, 66% 100%, 34% 100%, 34% 40%, 0 40%); }
.shape-ico-free { clip-path: polygon(10% 20%, 60% 0, 100% 35%, 85% 100%, 30% 90%, 0 60%); }
.dims { display: grid; gap: .75rem; }
.dim { display: grid; gap: .6rem; }
.dim label { display: grid; gap: .3rem; font-size: .9rem; font-weight: 600; }
.dim[hidden] { display: none; }
.free-tools { display: flex; gap: .5rem; flex-wrap: wrap; }
.range-row { display: flex; align-items: center; gap: .75rem; font-weight: 400; }
.range-row input { flex: 1; }
.range-row output { min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.designer-stage { display: grid; gap: .6rem; }
.stage-head { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: baseline; font-size: .95rem; color: var(--muted); }
.stat strong { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); font-weight: 500; }
.stat-hint { color: var(--plate-ink); font-style: italic; }
.stage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; aspect-ratio: 4 / 3; }
#plan { width: 100%; height: 100%; display: block; }
#plan .g1 { stroke: var(--line); stroke-width: .03; }
#plan .g05 { stroke: var(--line); stroke-width: .012; opacity: .7; }
#plan .shape { fill: var(--leaf-soft); stroke: var(--leaf); stroke-width: .06; stroke-linejoin: round; }
#plan .shape.is-bad { fill: color-mix(in srgb, var(--harvest) 15%, var(--surface)); stroke: var(--harvest); stroke-dasharray: .2 .15; }
#plan .dimline line { stroke: var(--muted); stroke-width: .025; }
#plan .dimline text, #plan .north text { font-family: var(--font-body); font-size: .42px; fill: var(--muted); font-weight: 600; }
#plan .pt { fill: var(--surface); stroke: var(--leaf); stroke-width: .06; }
#plan .pt-first { fill: var(--sow); }
#plan .hit { fill: transparent; cursor: crosshair; }
#plan .north path { fill: var(--harvest); }
.garden-card { display: grid; gap: .5rem; }
.garden-thumb { aspect-ratio: 4 / 3; background: var(--bg); border-radius: 10px; padding: .5rem; display: grid; place-items: center; }
.garden-svg { width: 100%; height: 100%; }
.garden-card-new { border-style: dashed; place-content: center; text-align: center; color: var(--muted); min-height: 220px; }
.garden-new-plus { font-family: var(--font-display); font-size: 3rem; line-height: 1; color: var(--leaf); }

/* ---------- Photos des fiches ---------- */
.plant-card.has-photo { padding: 0; overflow: hidden; }
.plant-card-photo { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--surface-2); }
.plant-card.has-photo .plant-card-body { padding: .9rem 1.15rem 1.1rem; }
.plant-figure { margin: 1.25rem 0 0; }
.plant-figure img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.plant-figure figcaption { font-size: .78rem; color: var(--muted); margin-top: .4rem; }
.plant-figure figcaption a { color: var(--muted); }

/* ---------- Zones cultivables ---------- */
.step-next { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.beds-layout { grid-template-columns: 1fr 340px; }
@media (max-width: 900px) { .beds-layout { grid-template-columns: 1fr; } }
.stage-beds { aspect-ratio: auto; min-height: 320px; max-height: 70vh; }
#plan .garden { fill: var(--surface-2); stroke: var(--muted); stroke-width: .05; }
#plan g.bed path { fill: var(--leaf); fill-opacity: .45; stroke: var(--leaf-ink); stroke-width: .04; cursor: grab; }
#plan g.bed.is-selected path { fill-opacity: .7; stroke-width: .08; stroke: var(--ink); }
#plan g.bed.is-out path { stroke: var(--harvest); stroke-dasharray: .15 .1; fill: color-mix(in srgb, var(--harvest) 40%, var(--leaf)); }
#plan g.bed.is-preview path { fill: var(--sow); fill-opacity: .35; stroke: var(--sow); stroke-dasharray: .12 .1; cursor: default; pointer-events: none; }
#plan g.bed text { font-family: var(--font-body); font-size: .3px; font-weight: 600; fill: var(--ink); pointer-events: none; }
#plan g.bed text.area { font-size: .24px; font-weight: 400; fill: var(--muted); }
#plan .freeline { fill: var(--sow); fill-opacity: .25; stroke: var(--sow); stroke-width: .05; }
.tbl-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.beds-table { border-collapse: collapse; width: 100%; font-size: .92rem; min-width: 560px; }
.beds-table th, .beds-table td { padding: .55rem .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.beds-table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.beds-table tr:last-child td { border-bottom: 0; }
.beds-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.beds-table tr.is-selected td { background: var(--leaf-soft); }
.beds-table form { display: inline; }
.link-danger { font: inherit; font-size: .85rem; background: none; border: 0; color: var(--harvest); cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
