:root {
    --color-bg: #eef4ee;
    --color-bg-accent: #e2ece2;
    --color-surface: #ffffff;
    --color-text: #1a2e1a;
    --color-text-muted: #5a7268;
    --color-primary: #2d6a4f;
    --color-primary-dark: #1b4332;
    --color-primary-light: #40916c;
    --color-border: #c5d9c5;
    --color-success-bg: #e4f5e8;
    --color-success-border: #95d5b2;
    --color-error-bg: #fdeeee;
    --color-error-border: #e8a8a8;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(27, 67, 50, 0.08);
    --shadow-md: 0 4px 16px rgba(27, 67, 50, 0.1);
    --shadow-lg: 0 8px 32px rgba(27, 67, 50, 0.15);
    --space-page: 1rem;
    --header-h: 3.25rem;
    --header-quick-h: 2.75rem;
    --chrome-top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + var(--header-quick-h));
    --bottom-nav-h: 4.25rem;
    --bottom-nav-h-compact: 3rem;
    --entity-quick-bar-h: 3.25rem;
    --chrome-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
    --chrome-bottom-entity: calc(var(--entity-quick-bar-h) + var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
    --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --color-bg-glow: #d8ebe0;
    --color-header-glow: rgba(255, 255, 255, 0.08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.app-body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    background:
        radial-gradient(ellipse 90% 55% at 50% -8%, rgba(82, 183, 136, 0.12) 0%, transparent 58%),
        radial-gradient(ellipse 70% 45% at 100% 35%, rgba(45, 106, 79, 0.06) 0%, transparent 52%),
        radial-gradient(ellipse 60% 40% at 0% 75%, rgba(45, 106, 79, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, #f7faf8 0%, #f2f7f4 42%, #edf3ef 100%);
    background-attachment: fixed;
    color: var(--color-text);
    line-height: 1.5;
    padding-bottom: var(--chrome-bottom);
}

body.app-body--branded {
    position: relative;
}

body.app-body--branded .app-header,
body.app-body--branded .app-main,
body.app-body--branded .bottom-nav,
body.app-body--branded .entity-quick-bar {
    position: relative;
    z-index: 1;
}

body.app-body--branded .portal-botanical-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

body.app-body--branded .portal-botanical-bg__pattern {
    position: absolute;
    inset: 0;
    background-image: url('../images/portal-leaf-pattern.svg');
    background-size: 200px 200px;
    opacity: 0.42;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.18) 100%);
}

body.app-body--branded .portal-botanical-bg__cluster {
    position: absolute;
    width: min(42vw, 22rem);
    height: min(42vw, 22rem);
    background: url('../images/portal-leaf-cluster.svg') no-repeat center / contain;
    opacity: 0.1;
}

body.app-body--branded .portal-botanical-bg__cluster--tl {
    top: -4rem;
    left: -5rem;
    transform: rotate(-18deg);
}

body.app-body--branded .portal-botanical-bg__cluster--br {
    right: -6rem;
    bottom: 8%;
    transform: rotate(24deg) scale(1.15);
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    color: var(--color-primary-dark);
}

/* ── Header ── */
.app-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: linear-gradient(135deg, var(--color-primary-dark), #234d38);
    color: #f8fff8;
    box-shadow: 0 2px 14px rgba(15, 40, 28, 0.24);
    border-bottom: 1px solid var(--color-header-glow);
    padding-top: env(safe-area-inset-top, 0px);
}

.app-header__inner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem var(--space-page);
    min-height: 3.25rem;
}

.app-header__brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.app-header__logo-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.app-header__logo-mark {
    flex-shrink: 0;
    display: block;
    width: 40px;
    height: 40px;
}

.app-header__logo-emblem,
.app-header__brand-copy--desktop,
.app-header__logo-ring--desktop {
    display: none;
}

.app-header__brand-copy--desktop {
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.app-header__brand-tagline {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #b7e4c7;
    white-space: nowrap;
}

.app-header__logo-full {
    display: none;
    flex-shrink: 0;
    width: auto;
    height: 2rem;
}

.app-header__brand-text--mobile {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.app-header__brand-season--desktop {
    display: none;
    font-size: 0.68rem;
    font-weight: 600;
    opacity: 0.82;
    white-space: nowrap;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.app-header__brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.app-header__brand-name {
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.app-header__brand:hover {
    color: #f0fdf4;
}

.app-header__brand-sub {
    font-size: 0.68rem;
    opacity: 0.82;
    font-weight: 500;
}

.app-header__primary {
    display: none;
    align-items: center;
    gap: 0.15rem;
    margin-left: 0.25rem;
}

.app-header__link {
    position: relative;
    color: #d8f3dc;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.42rem 0.75rem;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.app-header__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.app-header__link.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 -2px 0 #95d5b2;
}

.app-header__link--classements::before {
    content: "🏆";
    margin-right: 0.2rem;
    font-size: 0.82em;
}

.app-header__link--classements.is-active {
    background: rgba(255, 214, 102, 0.16);
    box-shadow: inset 0 -2px 0 #ffd666;
}

.app-header__link-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1rem;
    height: 1rem;
    margin-left: 0.3rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--color-warn);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
}

.app-header__tools {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    min-width: 0;
}

.app-header__cta {
    display: none;
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    background: var(--color-primary-light);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
}

.app-header__cta:hover {
    background: #35855e;
    color: #fff;
}

.app-header__menu-btn {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
}

.app-header__menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ── Header accès rapide (mobile) ── */
.app-header-mobile-bar {
    display: block;
}

.app-header-mobile-search {
    display: none;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem max(var(--space-page), env(safe-area-inset-right, 0px)) 0.6rem max(var(--space-page), env(safe-area-inset-left, 0px));
    background: linear-gradient(180deg, #163628 0%, var(--color-primary-dark) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.app-header-mobile-search:not([hidden]) {
    display: flex;
}

.app-header--search-open .app-header-quick {
    display: none;
}

.header-search__close {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.header-search__close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.app-header-mobile-search .header-search {
    flex: 1;
    min-width: 0;
}

.app-header-mobile-search .search-suggest {
    left: 0;
    right: 0;
    z-index: 60;
}

.header-search-wrap__desktop-form {
    display: none;
    flex: 1;
    min-width: 0;
}

.app-header-quick-wrap {
    position: relative;
    background: linear-gradient(180deg, #163628 0%, var(--color-primary-dark) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.app-header-quick-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1.75rem;
    pointer-events: none;
    background: linear-gradient(to left, var(--color-primary-dark) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.2s;
}

.app-header-quick-wrap.is-scrollable::after {
    opacity: 1;
}

.app-header-quick {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding: 0.5rem max(var(--space-page), env(safe-area-inset-right, 0px)) 0.6rem max(var(--space-page), env(safe-area-inset-left, 0px));
    background: transparent;
    border-bottom: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.app-header-quick::-webkit-scrollbar {
    display: none;
}

.app-header-quick__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
    min-height: 40px;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ecfdf5;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    scroll-snap-align: start;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, padding 0.15s;
}

.app-header-quick__link:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.app-header-quick__link.is-active {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 -2px 0 #95d5b2;
}

.app-header-quick__link--classements.is-active {
    background: rgba(255, 214, 102, 0.14);
    box-shadow: inset 0 -2px 0 #ffd666;
}

.app-header-quick__icon {
    display: inline-flex;
    line-height: 1;
}

.app-header-quick__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--color-warn);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
}

.header-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.header-search__toggle {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.15rem;
    cursor: pointer;
    line-height: 1;
}

.header-search__toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.header-search-wrap .header-search {
    display: none;
    flex: 1;
    min-width: 0;
}

.header-search-wrap.is-search-open .header-search {
    display: block;
}

.header-search-wrap.is-search-open .header-search__toggle {
    background: rgba(255, 255, 255, 0.22);
}

.header-tool-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
    line-height: 1;
    transition: background 0.15s;
}

.header-tool-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.header-tool-btn.is-active {
    background: rgba(255, 255, 255, 0.24);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.header-tool-btn__icon {
    display: block;
    filter: brightness(0) invert(1);
}

/* ── Header menu (drawer) ── */
.header-menu {
    position: fixed;
    inset: 0;
    z-index: 1100;
}

.header-menu__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.header-menu__panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(100%, 320px);
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.header-menu__header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: max(1rem, env(safe-area-inset-top, 0px)) 1rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.header-menu__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.header-menu__close {
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 50%;
    background: var(--color-bg-accent);
    color: var(--color-text);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.header-menu__nav {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.5rem;
    gap: 0.25rem;
    -webkit-overflow-scrolling: touch;
}

.header-menu__footer {
    flex-shrink: 0;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.65rem 0.5rem;
    padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--color-border);
    background: var(--color-surface-muted, var(--color-bg-accent));
}

.header-menu__link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-weight: 600;
    text-decoration: none;
}

.header-menu__link:hover,
.header-menu__link.is-active {
    background: var(--color-bg-accent);
    color: var(--color-primary-dark);
}

.header-menu__icon {
    width: 1.5rem;
    text-align: center;
    font-size: 1.1rem;
}

.theme-toggle--menu {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.75rem 0.85rem;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: left;
}

.theme-toggle--menu:hover {
    background: var(--color-bg-accent);
}

.header-menu__footer .theme-toggle--menu {
    margin-top: 0;
}

body.header-menu-open {
    overflow: hidden;
}

/* ── Bottom nav ── */
.bottom-nav-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.bottom-nav-dock__inner {
    width: 100%;
}

.bottom-nav {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    min-height: var(--bottom-nav-h);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 20px rgba(27, 67, 50, 0.08);
}

.bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.45rem 0.25rem;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    min-height: 48px;
    transition: color 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav__item.is-active {
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 8%, transparent);
    box-shadow: inset 0 2px 0 var(--color-primary-light);
}

.bottom-nav__item--cta {
    color: var(--color-primary-light);
}

.bottom-nav__item--cta.is-active {
    color: var(--color-primary-dark);
}

.bottom-nav__icon {
    font-size: 1.35rem;
    line-height: 1;
}

.bottom-nav__item--cta .bottom-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-top: -1.1rem;
    border-radius: 50%;
    background: linear-gradient(145deg, #52a876, var(--color-primary));
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.bottom-nav__item--add-plant .bottom-nav__icon {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.semis-list {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.semis-list__item {
    margin: 0;
}

.semis-list__link {
    display: block;
    color: inherit;
    text-decoration: none;
    padding: 0.85rem 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.semis-list__link:hover,
.semis-list__link:focus-visible {
    border-color: color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
    box-shadow: var(--shadow-sm);
}

.semis-list__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.semis-list__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.semis-list__chevron {
    color: var(--color-text-muted);
    font-size: 1.25rem;
    line-height: 1;
}

.semis-list__title {
    display: block;
    font-size: 1rem;
    margin: 0 0 0.2rem;
}

.semis-list__meta {
    display: block;
    margin-bottom: 0.55rem;
}

.semis-list__link .semis-batch__counts {
    margin-top: 0;
}

.semis-add__fork {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 0.35rem;
    padding: 0.9rem 1rem;
    background: color-mix(in srgb, var(--color-primary) 8%, var(--color-bg));
    border-color: color-mix(in srgb, var(--color-primary) 22%, var(--color-border));
}

.semis-add__fork-title {
    margin: 0 0 0.15rem;
    font-weight: 600;
}

.semis-add__fork-hint {
    margin: 0;
}

.semis-add__lede {
    margin: 0 0 1rem;
}

.semis-add__source-panel {
    margin-top: 0.85rem;
}

.semis-add__source-panel[hidden] {
    display: none;
}

.semis-add__more-body {
    margin-top: 0.75rem;
}

.semis-section__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.semis-section__head .section-heading {
    margin-bottom: 0.25rem;
}

.semis-section__intro {
    margin: 0;
    max-width: 28rem;
}

/* ── Main ── */
.app-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem max(var(--space-page), env(safe-area-inset-right, 0px)) 1.5rem max(var(--space-page), env(safe-area-inset-left, 0px));
}

.page-title {
    margin: 0 0 1rem;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ── Flash ── */
.flash {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.flash--success {
    background: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
}

.flash--error {
    background: var(--color-error-bg);
    border: 1px solid var(--color-error-border);
}

/* ── Cards ── */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.15rem;
    margin-bottom: 0.85rem;
    box-shadow: var(--shadow-sm);
}

.card--flat {
    box-shadow: none;
    background: var(--color-bg-accent);
    border-style: dashed;
}

.card h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.section-heading {
    margin: 0 0 0.85rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
}

/* ── Dashboard ── */
.dashboard-hero {
    text-align: center;
    padding: 1.5rem 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(160deg, var(--color-surface) 0%, var(--color-surface-muted, #f0f7f0) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.dashboard-hero--compact {
    text-align: left;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.65rem;
}

.dashboard-hero__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.dashboard-hero__intro {
    flex: 1;
    min-width: 0;
}

.dashboard-hero__cta {
    flex-shrink: 0;
    white-space: nowrap;
}

.dashboard-hero__logo {
    display: block;
    margin: 0 auto 0.65rem;
    width: 88px;
    height: 88px;
}

.dashboard-hero--compact .dashboard-hero__logo {
    margin: 0;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.dashboard-hero__title {
    margin: 0 0 0.35rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
}

.dashboard-hero--compact .dashboard-hero__title {
    margin: 0;
    font-size: 1rem;
}

.dashboard-hero__text {
    margin: 0 0 1.15rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.dashboard-hero--compact .dashboard-hero__text {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
}

.dashboard-hero__stat {
    margin: 0.15rem 0 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
}

.dashboard-hero__stat a {
    color: inherit;
    text-decoration: none;
}

.dashboard-hero__stat a:hover {
    text-decoration: underline;
}

.dashboard-hero__stat--muted {
    font-weight: 500;
    color: var(--color-text-muted);
}

.dashboard-hero--compact .dashboard-hero__stat {
    margin: 0;
    font-size: 0.85rem;
}

.dashboard-hero__actions {
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.dashboard-hero__ok {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.dashboard-chip {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(45, 90, 61, 0.12);
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}

.dashboard-chip:hover {
    background: rgba(45, 90, 61, 0.2);
}

.dashboard-alert {
    border-color: rgba(200, 120, 40, 0.35);
    background: linear-gradient(135deg, #fff9f0 0%, var(--color-surface) 100%);
}

.dashboard-alert__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dashboard-alert__title {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
}

.dashboard-complete-plants__head {
    margin-bottom: 0.65rem;
}

.dashboard-complete-plants__title {
    margin: 0 0 0.2rem;
    font-size: 0.95rem;
}

.dashboard-complete-plants__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.35rem;
}

.dashboard-complete-plants__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-radius: var(--radius-sm);
    background: var(--color-bg-accent);
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
}

.dashboard-complete-plants__link:hover {
    background: rgba(45, 90, 61, 0.12);
}

.dashboard-complete-plants__link--primary {
    background: rgba(45, 90, 61, 0.1);
    border: 1px solid rgba(45, 90, 61, 0.25);
}

.list-page__search-status {
    margin: 0.2rem 0 0;
    width: 100%;
    font-size: 0.82rem;
}

.dashboard-urgency-more--deferred {
    margin-top: 0.5rem;
}

.dashboard-alert__body--follow {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--color-border);
}

.dashboard-onboarding__steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-onboarding__steps li {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--color-border);
}

.dashboard-onboarding__steps li:last-child {
    border-bottom: none;
}

.dashboard-onboarding__steps a {
    font-weight: 600;
    color: var(--color-primary);
}

.dashboard-section__head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
}

.dashboard-section__head .section-heading {
    margin: 0;
    flex: 1;
}

.dashboard-section__more {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
}

.dashboard-ref__head {
    align-items: flex-start;
}

.dashboard-ref__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    flex-shrink: 0;
}

.dashboard-ref__intro {
    margin: 0 0 0.85rem;
}

.ref-nav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

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

@media (min-width: 900px) {
    .ref-nav-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.ref-nav-card {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.65rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface-muted, #f4f6f4);
    color: var(--color-text);
    text-decoration: none;
    min-height: 3.25rem;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ref-nav-card:hover {
    border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-border));
    background: color-mix(in srgb, var(--color-primary) 6%, var(--color-surface-muted, #f4f6f4));
}

.ref-nav-card:active {
    transform: scale(0.98);
}

.ref-nav-card__icon {
    font-size: 1.35rem;
    line-height: 1;
    flex-shrink: 0;
}

.ref-nav-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.ref-nav-card__count {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-primary);
}

.ref-nav-card__label {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--color-text-muted);
}

.ref-nav-card__arrow {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    flex-shrink: 0;
}

[data-theme="dark"] .ref-nav-card {
    background: color-mix(in srgb, var(--color-surface) 88%, #fff 4%);
}

[data-theme="dark"] .ref-nav-card:hover {
    background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface));
}

.stat-grid--compact .stat-card {
    padding: 0.75rem;
}

.stat-grid--compact .stat-card__value {
    font-size: 1.35rem;
}

.quick-links--compact {
    grid-template-columns: 1fr;
}

.pipeline-list--dashboard .pipeline-list__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--color-border);
}

.pipeline-list--dashboard .pipeline-list__item:last-child .pipeline-list__row {
    border-bottom: none;
}

.pipeline-list__main {
    flex: 1;
    min-width: 0;
    color: var(--color-text);
    text-decoration: none;
}

.pipeline-list__main:hover {
    color: var(--color-primary);
}

.pipeline-list__actions {
    flex-shrink: 0;
}

.pipeline-list__action-form {
    margin: 0;
}

.dash-list--rich .dash-list__link {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0;
    color: var(--color-text);
    text-decoration: none;
}

.dash-list--rich .dash-list__link:hover {
    color: var(--color-primary);
}

.dash-list__thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--color-surface-muted, #f0f0f0);
}

.dash-list__thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.dash-list__body {
    flex: 1;
    min-width: 0;
}

.dash-list__top {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.15rem;
}

.dash-list__kind {
    font-size: 0.68rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dash-list__name {
    display: block;
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.3;
}

.dash-list__code {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.1rem;
}

.dash-list__excerpt {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-list--rich .dash-list__meta {
    flex-shrink: 0;
    margin-left: 0;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: right;
}

[data-theme="dark"] .dashboard-hero {
    background: linear-gradient(160deg, #1a2e22 0%, #1e2a24 100%);
}

[data-theme="dark"] .dashboard-chip {
    background: rgba(159, 212, 176, 0.12);
    color: #9fd4b0;
}

[data-theme="dark"] .dashboard-alert {
    background: linear-gradient(135deg, #2a2218 0%, #1e2a24 100%);
    border-color: rgba(255, 200, 100, 0.2);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-card__value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.1;
}

.stat-card__label {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.quick-links {
    display: grid;
    gap: 0.5rem;
}

.quick-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s, transform 0.1s;
}

.quick-link:active {
    transform: scale(0.98);
}

.quick-link::after {
    content: "›";
    color: var(--color-text-muted);
    font-size: 1.2rem;
}

details.sys-info {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

details.sys-info summary {
    cursor: pointer;
    padding: 0.5rem 0;
}

/* ── Buttons ── */
.actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.15rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-primary-dark);
    text-decoration: none;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.btn:active {
    transform: scale(0.98);
}

.btn:hover {
    background: var(--color-bg-accent);
}

.btn--primary {
    background: var(--color-primary-light);
    border-color: var(--color-primary-light);
    color: #fff;
}

.btn--primary:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.btn--large {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1.05rem;
    min-height: 52px;
    border-radius: var(--radius-md);
}

.actions--stack {
    flex-direction: column;
}

.actions--stack .btn {
    width: 100%;
}

/* ── Tables → cards on mobile ── */
.table-wrap {
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e8f0e8;
}

.data-table th {
    background: var(--color-bg-accent);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table code {
    font-size: 0.85em;
}

.data-table__action {
    white-space: nowrap;
}

.data-table__action a {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    background: var(--color-bg);
    font-weight: 600;
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .data-table thead {
        display: none;
    }

    .data-table tbody tr {
        display: block;
        padding: 0.85rem 1rem;
        border-bottom: 1px solid #e8f0e8;
    }

    .data-table tbody tr:last-child {
        border-bottom: none;
    }

    .data-table td {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.35rem 0;
        border: none;
    }

    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.8rem;
        color: var(--color-text-muted);
        flex-shrink: 0;
    }

    .data-table td[data-label=""]::before {
        content: none;
    }

    .data-table__action {
        justify-content: flex-end;
        margin-top: 0.35rem;
        padding-top: 0.5rem;
        border-top: 1px dashed var(--color-border);
    }
}

/* ── Forms ── */
.form-grid {
    display: grid;
    gap: 1rem;
}

label,
legend {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
}

input[type="text"],
textarea,
select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 16px;
    background: #fff;
    color: var(--color-text);
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%235a7268' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.25rem;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.2);
}

textarea {
    min-height: 5.5rem;
    resize: vertical;
}

.hint {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-top: 0.35rem;
    line-height: 1.4;
}

.empty {
    color: var(--color-text-muted);
    font-style: italic;
    text-align: center;
    padding: 2rem 1rem;
}

code {
    background: var(--color-bg-accent);
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
    font-size: 0.88em;
    word-break: break-all;
}

/* ── Plant add form ── */
.page-add .page-title {
    display: none;
}

.mobile-form__section {
    margin-bottom: 0.85rem;
}

.mobile-form__photo-label {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 160px;
    padding: 1.5rem 1rem;
    border: 2px dashed var(--color-primary-light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    color: var(--color-primary);
    background: linear-gradient(180deg, #f8fcf8 0%, #fff 100%);
    transition: border-color 0.15s, background 0.15s;
}

.mobile-form__photo-label:active {
    background: var(--color-bg-accent);
}

.mobile-form__photo-label input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.mobile-form__photo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: #fff;
    font-size: 1.5rem;
}

.mobile-form__preview {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-top: 0.85rem;
}

.mobile-form__preview[hidden] {
    display: none;
}

.identify-block {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--color-border);
}

.identify-block__status {
    margin: 0.55rem 0 0;
    font-size: 0.86rem;
    color: var(--color-primary-dark);
}

.identify-block__status--error {
    color: #b42318;
}

.identify-suggestions {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.identify-suggestions__item {
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-accent);
}

.identify-suggestions__item--active {
    border-color: var(--color-primary);
    background: #eef6f0;
}

.identify-suggestions__item--unknown {
    border-style: dashed;
    background: #faf8f5;
}

.identify-suggestions__title {
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.identify-suggestions__meta {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-bottom: 0.35rem;
}

.identify-suggestions__rationale {
    margin: 0 0 0.45rem;
}

.identify-suggestions__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.35rem;
}

.hint--warn {
    color: #9a3412;
}

.settings-form__actions {
    grid-column: 1 / -1;
}

.mobile-form__fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.mobile-form__label {
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.segmented--vertical {
    grid-template-columns: 1fr;
}

.segmented__item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #fff;
    cursor: pointer;
    min-height: 48px;
    font-size: 0.92rem;
    line-height: 1.35;
    transition: border-color 0.15s, background 0.15s;
}

.segmented__item input {
    margin-top: 0.2rem;
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--color-primary-light);
}

.segmented__item:has(input:checked) {
    border-color: var(--color-primary-light);
    background: #f0f9f3;
}

.mobile-form__submit {
    position: sticky;
    bottom: var(--chrome-bottom);
    padding: 0.85rem 0 0.5rem;
    margin-top: 0.5rem;
    background: linear-gradient(transparent, var(--color-bg) 35%);
    z-index: 10;
}

/* ── Plant view ── */
.plant-card {
    overflow: hidden;
    padding: 0;
}

.plant-card__hero {
    position: relative;
    width: 100%;
    line-height: 0;
    background: var(--color-bg-accent);
}

.plant-card__hero-view {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    position: relative;
    line-height: 0;
}

.plant-card__photo {
    width: 100%;
    height: auto;
    min-height: 200px;
    max-height: 360px;
    object-fit: cover;
    display: block;
    vertical-align: middle;
}

.plant-card__hero-hint {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 1rem;
    line-height: 2rem;
    text-align: center;
    pointer-events: none;
}

.plant-card__hero-count {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    pointer-events: none;
}

.plant-card__hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.45rem 0.85rem 0.55rem;
    background: var(--color-bg-accent);
}

.plant-card__hero-label {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.35;
}

.plant-card__hero-expand {
    flex-shrink: 0;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    cursor: pointer;
}

.plant-card__hero-expand:active {
    transform: scale(0.98);
}

.plant-card__thumbs-wrap {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding-top: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
    pointer-events: none;
}

.plant-card__thumbs {
    display: flex;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem 0.55rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    pointer-events: auto;
}

.plant-card__thumbs::-webkit-scrollbar {
    display: none;
}

.plant-card__thumb {
    position: relative;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: var(--color-bg-accent);
    opacity: 0.85;
    transition: opacity 0.15s, border-color 0.15s, transform 0.1s;
}

.plant-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.plant-card__thumb.is-active {
    opacity: 1;
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--color-primary-light);
    transform: scale(1.05);
}

.plant-card__hero.is-expanded .plant-card__thumbs {
    flex-wrap: wrap;
    overflow-x: visible;
    max-height: none;
}

.plant-card__thumb-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 0.58rem;
    font-weight: 700;
    padding: 0.1rem 0.3rem;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 3px;
}

.plant-card__body {
    padding: 1.15rem;
}

.plant-card__code {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    word-break: break-all;
}

.plant-card__code--sub {
    margin: 0.15rem 0 0.5rem;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.plant-card__name {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.plant-card__title-main {
    font-size: 1.35rem;
}

.plant-card__title-sub {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.plant-card__updated {
    margin: 0 0 0.65rem;
}

.plant-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--color-bg-accent);
    color: var(--color-primary-dark);
}

.badge--genre {
    background: #dceee3;
}

.plant-card__detail {
    margin: 0.35rem 0;
    font-size: 0.95rem;
}

.plant-card__notes {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.plant-card__notes h3 {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

/* ── Desktop ── */
@media (min-width: 768px) {
    body.app-body:not(.app-body--nav-dock) {
        padding-bottom: 0;
    }

    body.app-body--nav-dock {
        padding-bottom: var(--chrome-bottom);
    }

    body.app-body--nav-dock .bottom-nav-dock {
        background: color-mix(in srgb, var(--color-surface) 94%, var(--color-bg-accent));
        backdrop-filter: blur(8px);
        border-top: 1px solid var(--color-border);
        box-shadow: 0 -4px 16px rgba(27, 67, 50, 0.08);
    }

    body.app-body--nav-dock .bottom-nav-dock__inner {
        max-width: min(960px, 100%);
        margin: 0 auto;
        padding: 0 1.5rem;
    }

    body.app-body--nav-dock .bottom-nav {
        max-width: 520px;
        margin: 0 auto;
        background: transparent;
        border-top: none;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    body.app-body:not(.app-body--nav-dock) .bottom-nav-dock {
        display: none;
    }

    .app-header__primary {
        display: flex;
    }

    .app-header-quick {
        display: none;
    }

    .app-header-mobile-bar {
        display: none;
    }

    .header-search-wrap__desktop-form {
        display: block;
    }

    .header-search-wrap.is-search-open .header-search-wrap__desktop-form {
        display: block;
    }

    .app-header__logo-ring--mobile,
    .app-header__brand-text--mobile {
        display: none;
    }

    .app-header {
        overflow: visible;
    }

    .app-header__inner {
        align-items: flex-end;
        min-height: 4rem;
        padding-top: 0.85rem;
        padding-bottom: 0.4rem;
    }

    .app-header__logo-emblem {
        display: flex;
        flex-shrink: 0;
        margin-bottom: -1.15rem;
        position: relative;
        z-index: 2;
    }

    .app-header__logo-ring--desktop {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 4.75rem;
        height: 4.75rem;
        background: rgba(255, 255, 255, 0.14);
        box-shadow:
            0 6px 22px rgba(0, 0, 0, 0.2),
            inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    }

    .app-header__logo-mark--desktop {
        width: 3.35rem;
        height: 3.35rem;
    }

    .app-header__brand-copy--desktop {
        display: flex;
        margin-left: 0.45rem;
        padding-bottom: 0.2rem;
    }

    .app-header__brand-copy--desktop .app-header__brand-name {
        font-size: 1.28rem;
    }

    .app-header__brand-tagline {
        font-size: 0.64rem;
        opacity: 0.9;
    }

    .app-header__brand-season--desktop {
        align-self: flex-end;
        margin-left: 0.55rem;
        margin-bottom: 0.35rem;
    }

    .app-header__logo-full {
        display: none;
    }

    .app-header__brand-season--desktop {
        display: inline-flex;
    }

    .app-header__cta--desktop {
        display: inline-flex;
        align-items: center;
    }

    .theme-toggle--desktop {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .theme-toggle--menu {
        display: none;
    }

    .header-menu__footer {
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    }

    .header-search__toggle {
        display: none;
    }

    .header-search-wrap .header-search {
        display: block;
        width: min(240px, 28vw);
    }

    .app-main {
        max-width: 880px;
        padding: 2rem 1.5rem 2.5rem;
    }

    .page-title {
        font-size: 1.65rem;
    }

    .stat-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .quick-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-links--compact {
        grid-template-columns: 1fr;
    }

    .mobile-form__submit {
        position: static;
        background: none;
        padding-bottom: 0;
    }

    .form-grid--2col {
        grid-template-columns: 1fr 1fr;
    }

    .page-add .page-title {
        display: block;
    }
}

@media (min-width: 1024px) {
    .app-main {
        max-width: 960px;
    }
}

/* ── Search ── */
.header-search {
    position: relative;
    flex: 1;
    min-width: 0;
}

.header-search__input {
    width: 100%;
    padding: 0.45rem 0.75rem;
    border: none;
    border-radius: 999px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.header-search__input::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

.header-search__input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.search-bar {
    position: relative;
    margin-bottom: 0;
}

.search-bar__icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1;
    pointer-events: none;
}

.search-bar__input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 2.35rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 16px;
    background: var(--color-bg);
    box-shadow: none;
}

.search-bar__input:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 2px rgba(45, 90, 61, 0.15);
}

.search-bar__clear {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.35rem;
    line-height: 1;
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 0.25rem;
}

/* ── List pages (plants + graines) ── */
.list-page {
    display: grid;
    gap: 0.85rem;
}

.list-page__intro {
    margin: 0;
}

.list-page__todo {
    margin-bottom: 1.25rem;
}

.list-page__todo-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.list-page__todo-head .dashboard-zone__head {
    flex: 1;
    min-width: 0;
}

.list-page__todo-badge {
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.list-page__todo-body {
    display: grid;
    gap: 0.75rem;
}

.list-reminders--embedded {
    margin: 0;
}

.list-page__todo-section {
    margin-bottom: 1.25rem;
}

.list-page__todo-section-head {
    margin-bottom: 0.75rem;
}

.list-page__todo-section-head .section-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.25rem;
}

.list-page__todo-section-hint {
    margin: 0;
}

.list-page__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    justify-content: space-between;
}

.list-page__cta {
    margin-left: auto;
}

.list-page__count {
    margin: 0;
    font-size: 0.88rem;
    color: var(--color-text-muted);
}

.list-page__count strong {
    color: var(--color-text);
    font-size: 1rem;
}

.list-page__count-hint {
    margin-left: 0.15rem;
}

.list-toolbar {
    padding: 0.85rem;
    display: grid;
    gap: 0.75rem;
}

.list-toolbar__filters {
    margin: 0;
}

.list-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.list-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--color-bg-accent);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary-dark);
}

.list-filter-chip__clear {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 1rem;
    line-height: 1;
}

.list-page__pipeline {
    margin-bottom: 0;
}

.list-page__pipeline-hint {
    margin-top: -0.35rem;
}

.pipeline-overview {
    margin-bottom: 0.75rem;
}

.pipeline-overview__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
}

.pipeline-overview__total {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-primary);
}

.pipeline-overview__hint {
    margin-top: -0.25rem;
    margin-bottom: 0.65rem;
}

.pipeline-overview__track {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pipeline-overview__step {
    flex: 1;
    min-width: 0;
}

.pipeline-overview__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    width: 100%;
    padding: 0.55rem 0.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-bg-accent);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}

a.pipeline-overview__link:hover {
    border-color: var(--color-primary-light);
    background: #f4faf4;
}

.pipeline-overview__step--active .pipeline-overview__link {
    border-color: var(--color-primary);
    background: #e8f5e9;
    box-shadow: inset 0 0 0 1px rgba(45, 90, 61, 0.08);
}

.pipeline-overview__step--empty .pipeline-overview__count {
    color: var(--color-text-muted);
}

.pipeline-overview__bubble {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--color-border);
    font-size: 0.95rem;
}

.pipeline-overview__step--active .pipeline-overview__bubble {
    border-color: var(--color-primary);
}

.pipeline-overview__count {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
    color: var(--color-primary-dark);
}

.pipeline-overview__label {
    font-size: 0.62rem;
    line-height: 1.2;
    text-align: center;
    color: var(--color-text-muted);
    max-width: 100%;
}

.pipeline-overview__step--active .pipeline-overview__label {
    color: var(--color-primary);
    font-weight: 700;
}

.pipeline-overview__archive {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px dashed var(--color-border);
}

.pipeline-overview__archive-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.pipeline-overview__archive-total {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #eef0f2;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--color-text-muted);
}

.pipeline-overview__archive-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    flex: 1;
}

.pipeline-archive-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: #f8f9fa;
    font-size: 0.76rem;
    line-height: 1.2;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}

a.pipeline-archive-chip:hover {
    border-color: #c5ccd3;
    background: #f1f3f5;
}

.pipeline-archive-chip--active {
    border-color: var(--color-primary);
    background: #eef6f0;
    color: var(--color-primary-dark);
}

.pipeline-archive-chip__count {
    font-weight: 800;
}

.pipeline-archive-chip__label {
    color: var(--color-text-muted);
}

.pipeline-archive-chip--active .pipeline-archive-chip__label {
    color: var(--color-primary-dark);
    font-weight: 600;
}

@media (max-width: 520px) {
    .pipeline-overview__track {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pipeline-overview__track .pipeline-overview__step:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

.pipeline-list--compact .pipeline-list__item {
    border-bottom: 1px solid var(--color-border);
}

.pipeline-list--compact .pipeline-list__item:last-child {
    border-bottom: none;
}

.pipeline-list--compact .pipeline-list__main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0;
    text-decoration: none;
}

.list-meta {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ── Entity list (plants + graines) ── */
.entity-list,
.plant-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.entity-list__item[hidden],
.plant-list__item[hidden] {
    display: none;
}

.entity-list__link,
.plant-list__link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s, transform 0.1s;
}

.entity-list__link:hover,
.plant-list__link:hover {
    border-color: var(--color-primary-light);
}

.entity-list__link:active,
.plant-list__link:active {
    transform: scale(0.99);
    border-color: var(--color-primary-light);
}

.entity-list__thumb,
.plant-list__thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.entity-list__thumb--empty,
.plant-list__thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-accent);
    font-size: 1.5rem;
}

.entity-list__body,
.plant-list__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.entity-list__title,
.entity-list__name,
.plant-list__name {
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.3;
}

.entity-list__context {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.3;
}

.entity-list__sep {
    color: var(--color-text-muted);
    font-weight: 500;
    margin: 0 0.1rem;
}

.entity-list__code,
.plant-list__code {
    font-size: 0.78rem;
}

.entity-list__code code,
.plant-list__code code {
    font-size: inherit;
}

.entity-list__excerpt {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.35;
}

.entity-list__tags,
.plant-list__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.entity-list__arrow,
.plant-list__arrow {
    color: var(--color-text-muted);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.entity-list-group,
.plant-group {
    margin-bottom: 0.25rem;
}

.entity-list-group__title,
.plant-group__title {
    margin: 0 0 0.5rem;
    font-size: 0.88rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.entity-list-group__count,
.plant-group__count {
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--color-bg-accent);
    color: var(--color-text-muted);
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    text-transform: none;
    letter-spacing: normal;
}

.badge--sm {
    font-size: 0.68rem;
    padding: 0.15rem 0.45rem;
}

.badge--statut {
    background: #e8f4ec;
}

.stat-card--link {
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.1s;
}

.stat-card--link:active {
    transform: scale(0.98);
    border-color: var(--color-primary-light);
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
}

.empty-state .btn {
    margin-top: 1rem;
}

/* ── Variété form ── */
.variete-code-builder {
    display: grid;
    gap: 0.75rem;
}

.variete-code-builder__preview {
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-md);
    background: var(--color-bg-accent);
    border: 1px solid var(--color-border);
}

.variete-code-builder__label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.variete-code-builder__code {
    font-size: 1.25rem;
    font-weight: 700;
}

.variete-code-builder__id3 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    max-width: 5.5rem;
}

.variete-code-builder__note {
    margin: 0;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-md);
    background: #f3e8ff;
    border: 1px solid #e9d5ff;
}

.variete-code-display code {
    font-size: 1.15rem;
}

@media (min-width: 640px) {
    .variete-code-builder {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
        align-items: end;
    }
}

/* ── Timeline / journal ── */
.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.timeline__item {
    padding-left: 1rem;
    border-left: 3px solid var(--color-primary-light);
}

.timeline__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.timeline__header time {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.timeline__text {
    margin: 0.35rem 0 0;
    line-height: 1.45;
}

.timeline__photos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.timeline__photos img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

input[type="file"] {
    width: 100%;
    font-size: 0.9rem;
}

input[type="search"] {
    -webkit-appearance: none;
    appearance: none;
}

@media (max-width: 767px) {
    .theme-toggle--desktop {
        display: none !important;
    }

    .dashboard-hero__cta-group {
        display: none !important;
    }

    .header-menu__footer .theme-toggle--menu {
        display: flex;
    }
}

@media (min-width: 768px) {
    .app-header__inner {
        padding: 0.75rem 1.5rem;
    }
}

/* ── Graines / lots ── */
.badge--graine {
    background: #f3e8ff;
    color: #5b21b6;
}

.badge--semis {
    background: color-mix(in srgb, var(--color-primary) 12%, var(--color-bg));
    color: var(--color-primary-dark);
}

.badge--muted {
    background: var(--color-bg-accent);
    color: var(--color-text-muted);
}

.entity-list__thumb--graine,
.plant-list__thumb--graine {
    background: #f3e8ff;
}

.entity-list__thumb--variete {
    background: #e8f4ec;
}

.entity-list__thumb--genre {
    background: #dceee3;
    font-size: 1.35rem;
}

.entity-list__thumb--emplacement {
    background: #e8eef5;
}

.entity-list__item--warn .entity-list__link {
    border-color: color-mix(in srgb, var(--color-warn) 35%, var(--color-border));
}

.entity-list__thumb--warn {
    background: color-mix(in srgb, var(--color-warn) 18%, var(--color-surface));
}

.filter-bar__row--varietes,
.filter-bar__row--genres {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
    .filter-bar__row--varietes {
        grid-template-columns: repeat(3, 1fr);
    }
}

.lot-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.lot-card__cross {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0.35rem 0 0.75rem;
}

.lot-card__times {
    color: var(--color-text-muted);
    font-weight: 400;
    margin: 0 0.25rem;
}

.lot-card__meta {
    display: grid;
    gap: 0.65rem;
    margin: 0;
}

.lot-card__meta div {
    display: grid;
    gap: 0.15rem;
}

.lot-card__meta dt {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.lot-card__meta dd {
    margin: 0;
}

.lot-card__meta--inline {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--color-border);
}

.semis-batch-list {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
}

.card--nested {
    background: var(--color-bg-accent);
    border: 1px solid var(--color-border);
    box-shadow: none;
}

.semis-batch__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    align-items: flex-start;
}

.semis-batch__title {
    margin: 0;
    font-size: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.semis-batch__meta {
    margin: 0.25rem 0 0;
}

.semis-batch__meta-counts {
    display: inline-block;
    margin-top: 0.2rem;
    font-weight: 600;
    color: var(--color-text);
}

.semis-batch__counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    margin: 0;
}

.semis-batch__counts div {
    display: grid;
    gap: 0.1rem;
    min-width: 3.5rem;
}

.semis-batch__counts dt {
    margin: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text-muted);
    font-weight: 600;
}

.semis-batch__counts dd {
    margin: 0;
    font-weight: 600;
}

.semis-batch__notes {
    margin: 0.75rem 0 0;
}

.semis-batch__plants {
    margin-top: 0.75rem;
}

.semis-batch__panel {
    margin-top: 0.75rem;
}

.semis-batch__close {
    margin-top: 0.65rem;
}

.semis-batch-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin: 0.75rem 0 0;
    padding: 0.75rem 0.85rem;
    background: var(--color-bg-accent);
    border-radius: var(--radius-sm);
}

.semis-batch-summary div {
    display: grid;
    gap: 0.1rem;
}

.semis-batch-summary dt {
    margin: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text-muted);
    font-weight: 600;
}

.semis-batch-summary dd {
    margin: 0;
    font-weight: 600;
}

.form-grid--counts {
    grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
}

.semis-batch-create {
    margin-top: 1rem;
}

.semis-batch-card .plant-card__body {
    padding-top: 0.25rem;
}

.semis-batch__title-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.semis-batch__title-link:hover,
.semis-batch__title-link:focus-visible {
    color: var(--color-primary);
    text-decoration: underline;
}

.semis-batch__open {
    margin: 0.75rem 0 0;
}

.semis-batch--compact .semis-batch__head {
    align-items: flex-end;
}

.semis-batch--compact .semis-batch__open {
    margin-top: 0.65rem;
}

.semis-batch__plants--compact {
    margin-top: 0.5rem;
}

.semis-batch__counts dd {
    font-variant-numeric: tabular-nums;
}

.entity-info-grid dd {
    font-variant-numeric: tabular-nums;
}

.link-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.link-list a {
    display: block;
    padding: 0.65rem 0.75rem;
    background: var(--color-bg-accent);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
}

.section-heading--sm {
    font-size: 0.95rem;
    margin-top: 1.25rem;
}

.timeline__link {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
}

.timeline__link a {
    color: var(--color-primary);
}

/* ── Ref cards (genre / variété) ── */
.ref-card__code {
    margin: 0;
}

.ref-card__name {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0.35rem 0;
}

.ref-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.75rem 0;
}

.ref-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0 0 0.75rem;
}

.plant-card__subtitle {
    margin: 0.15rem 0 0.35rem;
    font-size: 0.92rem;
    color: var(--color-text-muted);
    line-height: 1.35;
}

.plant-surnom {
    font-style: italic;
    font-weight: 600;
    color: var(--color-text-muted);
}

.data-table a {
    color: var(--color-primary);
    text-decoration: none;
}

.data-table a:hover {
    text-decoration: underline;
}

.badge--genre {
    text-decoration: none;
}

.plant-card__meta a.badge {
    text-decoration: none;
}

/* ── Photo gallery ── */
.photo-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.photo-gallery__item {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 5.5rem;
    height: 5.5rem;
    min-width: 0;
    border: 1px solid var(--color-border);
    padding: 0;
    background: var(--color-bg-accent);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.photo-gallery__item img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.15s;
}

.photo-gallery__item:hover img,
.photo-gallery__item:focus-visible img {
    transform: scale(1.03);
}

.photo-gallery__item:active img {
    transform: scale(0.97);
}

.photo-gallery__badge {
    position: absolute;
    bottom: 0.25rem;
    left: 0.25rem;
    font-size: 0.62rem;
    padding: 0.1rem 0.35rem;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border-radius: 4px;
}

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.lightbox.is-open {
    display: flex;
}

.lightbox[hidden] {
    display: none !important;
}

body.lightbox-open,
body.is-loading {
    overflow: hidden;
}

.lightbox__figure {
    max-width: min(100%, 720px);
    margin: 0;
    text-align: center;
}

.lightbox__img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox__caption {
    color: #fff;
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.lightbox__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.75rem;
    cursor: pointer;
}

.lightbox__nav--prev {
    left: 0.5rem;
}

.lightbox__nav--next {
    right: 0.5rem;
}

/* ── Loading overlay ── */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(27, 43, 32, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.loading-overlay[hidden] {
    display: none !important;
}

.loading-overlay__box {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 1.75rem 2rem;
    text-align: center;
    max-width: 320px;
    box-shadow: var(--shadow-lg);
}

.loading-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto 1rem;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: horti-spin 0.8s linear infinite;
}

@keyframes horti-spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay__text {
    font-weight: 600;
    margin: 0 0 0.35rem;
}

.loading-overlay__hint {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0;
}

/* ── Navigation splash (transitions menu) ── */
html.nav-splash-boot::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 399;
    background: linear-gradient(155deg, #1b4332 0%, #234d38 45%, #2d6a4f 100%);
}

html.nav-splash-boot body {
    overflow: hidden;
}

html.nav-splash-boot #hortiNavSplash {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

html.nav-splash-boot #hortiNavSplash[hidden] {
    display: flex !important;
}

html.nav-splash-boot .nav-splash__inner {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.nav-splash {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(155deg, #1b4332 0%, #234d38 45%, #2d6a4f 100%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.nav-splash[hidden] {
    display: none !important;
}

.nav-splash--visible {
    opacity: 1;
    visibility: visible;
}

.nav-splash--hide {
    opacity: 0;
    visibility: hidden;
}

.nav-splash__inner {
    text-align: center;
    transform: translateY(8px) scale(0.96);
    opacity: 0;
    transition: transform 0.32s ease, opacity 0.32s ease;
}

.nav-splash--visible .nav-splash__inner {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.nav-splash__logo,
.horti-brand-icon.nav-splash__logo {
    display: block;
    width: 6rem;
    height: 6rem;
    margin: 0 auto 0.85rem;
    border-radius: 22%;
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.12),
        0 16px 40px rgba(0, 0, 0, 0.35);
}

@media (max-width: 767px) {
    .nav-splash__logo,
    .horti-brand-icon.nav-splash__logo {
        width: 7rem;
        height: 7rem;
    }

    .nav-splash__name {
        font-size: 1.85rem;
    }
}

.nav-splash__name {
    margin: 0 0 0.35rem;
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f0fdf4;
}

.nav-splash__tagline {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b7e4c7;
}

.nav-splash__dots {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 0.65rem;
    margin: 1rem 0 0;
    min-height: 1.35rem;
}

.nav-splash__dot {
    width: 0.62rem;
    height: 0.62rem;
    border-radius: 50%;
    background-color: #40916c;
    opacity: 0.55;
    transform: translateY(0) scale(0.8);
    animation: nav-splash-dot 1.05s ease-in-out infinite;
    will-change: transform, opacity, background-color, box-shadow;
}

.nav-splash__dot:nth-child(2) {
    animation-delay: 0.18s;
}

.nav-splash__dot:nth-child(3) {
    animation-delay: 0.36s;
}

@keyframes nav-splash-dot {
    0%, 100% {
        background-color: #2d6a4f;
        opacity: 0.4;
        transform: translateY(0) scale(0.75);
        box-shadow: 0 0 0 rgba(216, 243, 220, 0);
    }

    50% {
        background-color: #ecfdf5;
        opacity: 1;
        transform: translateY(-7px) scale(1.35);
        box-shadow: 0 0 12px rgba(236, 253, 245, 0.75);
    }
}

body.is-nav-transition {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .nav-splash,
    .nav-splash__inner {
        transition: none;
    }

    .nav-splash__dot {
        animation: none;
        background-color: #95d5b2;
        opacity: 0.85;
        transform: none;
    }
}

.btn.is-busy {
    opacity: 0.7;
}

/* ── Dark mode ── */
[data-theme="dark"] {
    --color-bg: #0f1a14;
    --color-bg-accent: #1a2e24;
    --color-bg-glow: #1a3328;
    --color-surface: #1e3328;
    --color-text: #e8f5e9;
    --color-text-muted: #9cb8a8;
    --color-primary: #52b788;
    --color-primary-dark: #2d6a4f;
    --color-primary-light: #40916c;
    --color-border: #2d4a3a;
    --color-success-bg: #1a3d2e;
    --color-success-border: #40916c;
    --color-error-bg: #3d1a1a;
    --color-error-border: #c44;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .app-header {
    background: linear-gradient(135deg, #0d2818, #1a3d2a);
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] body.app-body {
    background:
        radial-gradient(ellipse 100% 60% at 50% -10%, var(--color-bg-glow) 0%, transparent 55%),
        linear-gradient(180deg, var(--color-bg) 0%, #0c1510 100%);
}

[data-theme="dark"] .app-header-quick {
    background: linear-gradient(180deg, #0a1f14 0%, #0d2818 100%);
}

.theme-toggle {
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
}

.theme-toggle--header {
    width: 2.25rem;
    height: 2.25rem;
    overflow: hidden;
    white-space: nowrap;
}

.theme-toggle--header:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Menu latéral : annuler les styles header (blanc sur vert) */
.theme-toggle.theme-toggle--menu {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    height: auto;
    padding: 0.75rem 0.85rem;
    border: none;
    border-radius: var(--radius-md);
    background: var(--color-bg-accent);
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.35;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
}

.theme-toggle.theme-toggle--menu:hover {
    background: var(--color-border);
    color: var(--color-primary-dark);
}

.theme-toggle.theme-toggle--menu[aria-pressed="true"] {
    background: var(--color-primary-dark);
    color: #f0fdf4;
}

.theme-toggle.theme-toggle--outdoor.theme-toggle--menu[aria-pressed="true"] {
    background: rgba(255, 214, 102, 0.35);
    color: #1a2e1a;
    box-shadow: inset 0 0 0 1px rgba(200, 150, 40, 0.35);
}

[data-theme="dark"] .theme-toggle.theme-toggle--menu {
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text);
}

[data-theme="dark"] .theme-toggle.theme-toggle--menu:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #f0fdf4;
}

[data-theme="dark"] .theme-toggle.theme-toggle--menu[aria-pressed="true"] {
    background: var(--color-primary-light);
    color: #0f1a14;
}

.flash--hide {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.35s, transform 0.35s;
}

/* ── Header search suggest ── */
.header-search {
    position: relative;
}

.search-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 70vh;
    overflow: auto;
}

.search-suggest__heading {
    margin: 0;
    padding: 0.5rem 0.75rem 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

.search-suggest__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-suggest__list a {
    display: block;
    padding: 0.55rem 0.75rem;
    color: var(--color-text);
    text-decoration: none;
}

.search-suggest__list a:hover {
    background: var(--color-bg-accent);
}

.search-suggest__list strong {
    display: block;
    font-size: 0.92rem;
}

.search-suggest__list span {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

/* ── Filter bar ── */
.filter-bar {
    margin-bottom: 0;
}

.filter-bar__row--graines {
    grid-template-columns: 1fr 1fr;
}

.filter-bar__row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.filter-bar__field select {
    width: 100%;
    font-size: 0.85rem;
}

.filter-bar__label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 0.2rem;
}

/* ── Plant groups (legacy alias) ── */

/* ── Chips ── */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    border: none;
    margin: 0;
    padding: 0;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    cursor: pointer;
    user-select: none;
}

.chip input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.chip.is-selected,
.chip:has(input:checked) {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

/* ── Copy code ── */
.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-accent);
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-copy.is-copied {
    border-color: var(--color-primary-light);
    background: var(--color-success-bg);
}

.btn-copy__icon {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ── Pedigree ── */
.pedigree {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0.75rem 0 0;
    padding: 0.65rem;
    background: var(--color-bg-accent);
    border-radius: var(--radius-sm);
}

.pedigree__step {
    display: inline-flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    text-decoration: none;
    color: inherit;
    font-size: 0.78rem;
    border: 1px solid var(--color-border);
}

.pedigree__step--current {
    border-color: var(--color-primary);
    background: var(--color-success-bg);
}

.pedigree__step--muted {
    opacity: 0.75;
}

.pedigree__label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.pedigree__arrow {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* ── Lineage visual tree ── */
.plant-lineage__intro {
    margin: 0 0 0.85rem;
}

.lineage-viz {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 1rem 0.5rem 0.25rem;
    overflow-x: auto;
}

.lineage-viz__empty {
    margin: 0;
    text-align: center;
    padding: 1rem 0.5rem;
}

.lineage-viz__ancestors,
.lineage-viz__focus-wrap,
.lineage-viz__siblings,
.lineage-viz__descendants {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 36rem;
}

.lineage-viz__row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.lineage-viz__row--couple {
    gap: 0.65rem;
}

.lineage-viz__row--siblings,
.lineage-viz__row--descendants {
    justify-content: center;
}

.lineage-viz__cross {
    align-self: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    opacity: 0.75;
    line-height: 1;
}

.lineage-viz__connector {
    width: 2px;
    height: 1.25rem;
    background: linear-gradient(to bottom, var(--color-primary-light), var(--color-primary));
    opacity: 0.55;
    margin: 0.15rem 0;
}

.lineage-viz__connector--fork {
    height: 1rem;
}

.lineage-viz__connector--down {
    height: 1.35rem;
}

.lineage-viz__focus-wrap {
    padding: 0.35rem 0 0.5rem;
}

.lineage-viz__siblings,
.lineage-viz__descendants {
    margin-top: 0.5rem;
    padding-top: 0.25rem;
}

.lineage-viz__group {
    width: 100%;
    margin-bottom: 0.85rem;
}

.lineage-viz__group-label {
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    text-align: center;
}

.lineage-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 6.5rem;
    max-width: 10rem;
    padding: 0.65rem 0.55rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    text-decoration: none;
    color: inherit;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

a.lineage-node:hover {
    border-color: var(--color-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.lineage-node--focus {
    min-width: 8rem;
    max-width: 12rem;
    padding: 0.85rem 0.75rem;
    border-width: 2px;
    border-color: var(--color-primary);
    background: linear-gradient(160deg, #f4faf4 0%, var(--color-surface) 100%);
    box-shadow: 0 4px 16px rgba(45, 90, 61, 0.12);
}

.lineage-node--lot {
    border-color: rgba(147, 51, 234, 0.35);
    background: linear-gradient(160deg, #faf5ff 0%, var(--color-surface) 100%);
}

.lineage-node--variete,
.lineage-node--hybride {
    border-color: rgba(59, 130, 246, 0.3);
}

.lineage-node--ghost {
    visibility: hidden;
    min-width: 6.5rem;
    border: none;
    box-shadow: none;
}

.lineage-node__icon {
    font-size: 1.15rem;
    line-height: 1;
}

.lineage-node--focus .lineage-node__icon {
    font-size: 1.35rem;
}

.lineage-node__badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-primary);
    background: rgba(45, 90, 61, 0.1);
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
}

.lineage-node__title {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.25;
    word-break: break-word;
}

.lineage-node--focus .lineage-node__title {
    font-size: 0.95rem;
}

.lineage-node__subtitle {
    font-size: 0.72rem;
    font-style: italic;
    color: var(--color-text-muted);
    line-height: 1.2;
}

.lineage-node__code {
    font-size: 0.62rem;
    color: var(--color-text-muted);
    word-break: break-all;
}

.lineage-node__code code {
    font-size: inherit;
}

[data-theme="dark"] .lineage-node--focus {
    background: linear-gradient(160deg, rgba(45, 90, 61, 0.25) 0%, var(--color-surface) 100%);
}

[data-theme="dark"] .lineage-node--lot {
    background: linear-gradient(160deg, rgba(147, 51, 234, 0.12) 0%, var(--color-surface) 100%);
}

.lineage-panel__toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

.lineage-node__thumb {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-border);
}

.lineage-node--focus .lineage-node__thumb {
    width: 3.25rem;
    height: 3.25rem;
    border-color: var(--color-primary);
}

.lineage-fullscreen {
    width: min(960px, 96vw);
    max-width: 96vw;
    max-height: 92vh;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
}

.lineage-fullscreen::backdrop {
    background: rgba(0, 0, 0, 0.45);
}

.lineage-fullscreen__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.lineage-fullscreen__title {
    margin: 0;
    font-size: 1rem;
}

.lineage-fullscreen__body {
    padding: 1rem;
    overflow: auto;
    max-height: calc(92vh - 3.5rem);
}

.lineage-fullscreen__body .lineage-viz {
    max-width: none;
}

/* ── Lignées (pedigree hub) ── */
.lineage-catalog {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.lineage-catalog__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: inherit;
}

.lineage-catalog__link:hover {
    border-color: var(--color-primary);
}

.lineage-catalog__icon {
    font-size: 1.35rem;
    line-height: 1;
    flex-shrink: 0;
}

.lineage-catalog__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.lineage-catalog__title {
    font-weight: 700;
}

.lineage-catalog__arrow {
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.lineage-pedigree__hero-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.lineage-pedigree__title {
    margin: 0.15rem 0 0.35rem;
    font-family: var(--font-display, inherit);
    font-size: 1.25rem;
}

.lineage-pedigree__eyebrow {
    margin: 0;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lineage-pedigree__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0;
}

.lineage-pedigree__stats div {
    text-align: center;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--color-bg-accent);
}

.lineage-pedigree__stats dt {
    margin: 0;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text-muted);
}

.lineage-pedigree__stats dd {
    margin: 0.15rem 0 0;
    font-weight: 700;
    font-size: 1.1rem;
}

.lineage-pedigree__section {
    margin-top: 0.85rem;
}

.lineage-timeline {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0 0 0 0.35rem;
    border-left: 2px solid var(--color-border);
}

.lineage-timeline__item {
    position: relative;
    display: flex;
    gap: 0.65rem;
    padding: 0 0 1rem 0.85rem;
}

.lineage-timeline__item:last-child {
    padding-bottom: 0;
}

.lineage-timeline__icon {
    position: absolute;
    left: -0.72rem;
    top: 0.1rem;
    width: 1.35rem;
    height: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    font-size: 0.72rem;
    line-height: 1;
}

.lineage-timeline__date {
    display: block;
    font-size: 0.72rem;
    margin-bottom: 0.1rem;
}

.lineage-timeline__title {
    display: block;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
}

.lineage-timeline__title:hover {
    text-decoration: underline;
}

.lineage-timeline__detail {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
}

.lineage-descendants-table {
    margin-top: 0.5rem;
}

.breadcrumbs--compact {
    margin-bottom: 0.75rem;
}

@media (max-width: 520px) {
    .lineage-pedigree__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ── Rappels ── */
.reminder-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.reminder-list__item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--color-bg-accent);
    border: 1px solid var(--color-border);
}

.reminder-list__body {
    flex: 1;
    min-width: 0;
}

.reminder-list__title {
    margin: 0;
    font-weight: 600;
    font-size: 0.92rem;
}

.reminder-list__notes,
.reminder-list__due,
.reminder-list__meta {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.reminder-list__meta a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.reminder-list__action {
    flex-shrink: 0;
}

.reminder-list__empty {
    margin: 0 0 1rem;
}

.reminder-form {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
}

.reminder-list--dashboard .reminder-list__item {
    background: var(--color-surface);
}

/* ── Collapsible sections ── */
.collapsible {
    margin-bottom: 0.75rem;
}

.collapsible__summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.25rem 0;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.collapsible__summary::-webkit-details-marker {
    display: none;
}

.collapsible__summary::after {
    content: "▾";
    opacity: 0.5;
    font-size: 0.85rem;
}

.collapsible:not([open]) .collapsible__summary::after {
    content: "▸";
}

.collapsible__body {
    padding-top: 0.75rem;
}

/* ── Fiche plant / graines ── */
.page-entity-view,
.page-plant-view,
.page-hybridation-view,
.page-harvest-view {
    padding-bottom: var(--chrome-bottom-entity);
}

@media (max-width: 767px) {
    .page-entity-view {
        --chrome-top: calc(env(safe-area-inset-top, 0px) + var(--header-h));
    }

    .page-entity-view .app-header-mobile-bar {
        display: none;
        border-bottom: none;
        background: transparent;
    }

    .page-entity-view .app-header.app-header--search-open .app-header-mobile-bar {
        display: block;
        background: linear-gradient(180deg, #163628 0%, var(--color-primary-dark) 100%);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
}

.entity-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.entity-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.entity-action:hover {
    background: var(--color-bg-accent);
}

.entity-action--primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.entity-action--primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.entity-action--attention {
    border-color: rgba(200, 120, 40, 0.55);
    background: rgba(200, 120, 40, 0.1);
    box-shadow: 0 0 0 1px rgba(200, 120, 40, 0.15);
}

.entity-action--attention:hover {
    background: rgba(200, 120, 40, 0.18);
}

.entity-actions .entity-action-form {
    margin: 0;
    display: contents;
}

.entity-actions .entity-action-form .entity-action {
    font-family: inherit;
}

.entity-action__icon {
    font-size: 1rem;
    line-height: 1;
}

.entity-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
}

.entity-nav--sticky {
    position: sticky;
    top: var(--chrome-top);
    z-index: 30;
    padding: 0.5rem 0 0.65rem;
    margin-bottom: 0.65rem;
    background: color-mix(in srgb, var(--color-bg) 92%, transparent);
    backdrop-filter: blur(6px);
}

.entity-nav--sticky .entity-nav__link.is-active {
    background: var(--color-primary);
    color: #f8fff8;
    border-color: var(--color-primary);
}

.page-entity-view .section-heading {
    font-size: 1.05rem;
    text-transform: none;
    letter-spacing: normal;
    color: var(--color-primary-dark);
    margin: 0 0 0.5rem;
}

.page-entity-view .hint {
    font-size: 0.88rem;
    line-height: 1.45;
}

.page-entity-view .entity-section__lede {
    margin: 0 0 0.75rem;
    max-width: 42em;
}

.page-entity-view .mouvement-stock {
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

.page-entity-view .mouvement-form {
    margin-bottom: 1rem;
}

.page-entity-view .mouvement-transfert {
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-sm, 6px);
    background: var(--color-surface-alt, #f4f7f4);
}

.page-entity-view .mouvement-history__heading {
    margin: 1.25rem 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.page-entity-view .mouvement-history__empty {
    margin-top: 0.75rem;
}

.page-entity-view .harvest-mouvements__attrs {
    margin-top: 1rem;
}

.page-entity-view .entity-section__header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.15rem;
}

.page-entity-view .entity-section__count {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-surface-alt, #f4f7f4);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    line-height: 1.3;
}

.page-entity-view .entity-attributes {
    margin-bottom: 0.85rem;
}

.page-entity-view .entity-attributes__heading {
    margin-bottom: 0.35rem;
}

.page-entity-view .entity-section + .entity-section,
.page-entity-view .entity-attributes + .card,
.page-entity-view .card + .entity-attributes {
    margin-top: 0;
}

.entity-zone--reference {
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    overflow: hidden;
}

.entity-zone--reference > .entity-zone__summary {
    padding: 0.85rem 1rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    color: var(--color-text-muted);
}

.entity-zone--reference > .entity-zone__summary::-webkit-details-marker {
    display: none;
}

.entity-zone--reference > .entity-zone__hint {
    margin: 0 1rem 0.5rem;
}

.entity-zone--reference[open] > .entity-zone__summary {
    color: var(--color-primary-dark);
    border-bottom: 1px solid var(--color-border);
}

.entity-zone__body {
    padding: 0.75rem 1rem 1rem;
    display: grid;
    gap: 0.85rem;
}

.entity-zone__body > .card,
.entity-zone__body > .entity-zone__section {
    margin: 0;
    box-shadow: none;
}

.plant-new-banner__steps {
    margin: 0.5rem 0 0.75rem;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.35rem;
}

.plant-new-banner__steps a {
    font-weight: 600;
}

.entity-lifecycle__lede {
    margin: 0 0 0.65rem;
    padding: 0.55rem 0.65rem;
    border-radius: var(--radius-sm);
    background: var(--color-bg-accent);
    font-size: 0.85rem;
}

.entity-lifecycle__deactivate {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--color-error-bg) 55%, var(--color-surface));
    border: 1px solid color-mix(in srgb, var(--color-error-border) 50%, var(--color-border));
}

.entity-lifecycle__deactivate-title {
    margin: 0 0 0.5rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

.entity-lifecycle__deactivate-form {
    margin: 0;
}

.badge--more {
    background: var(--color-bg-accent);
    color: var(--color-text-muted);
    font-weight: 700;
}

.badge--qualificatif {
    background: color-mix(in srgb, var(--color-primary-light) 18%, var(--color-surface));
    color: var(--color-primary-dark);
    border: 1px solid color-mix(in srgb, var(--color-primary) 25%, var(--color-border));
}

.badge--non-surveille {
    background: color-mix(in srgb, #64748b 14%, var(--color-surface));
    color: #475569;
    border: 1px solid color-mix(in srgb, #64748b 28%, var(--color-border));
}

.dashboard-todo-compact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
}

.dashboard-todo-compact__text {
    margin: 0;
    flex: 1 1 12rem;
}

[data-theme="dark"] .entity-nav--sticky {
    background: color-mix(in srgb, var(--color-bg) 88%, transparent);
}

[data-theme="dark"] .badge--qualificatif {
    background: color-mix(in srgb, var(--color-primary-light) 12%, var(--color-surface));
    color: var(--color-text);
}

[data-theme="dark"] .entity-lifecycle__deactivate {
    background: color-mix(in srgb, var(--color-error-bg) 25%, var(--color-surface));
}

.entity-nav__link {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-decoration: none;
    background: var(--color-bg-accent);
    border: 1px solid transparent;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.entity-nav__link:hover {
    color: var(--color-primary);
}

.entity-nav__link--more {
    border-style: dashed;
}

.entity-nav__count {
    display: inline-block;
    margin-left: 0.2rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    font-size: 0.72rem;
    background: rgba(45, 90, 61, 0.12);
    color: var(--color-primary);
}

.entity-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 0.75rem 0 0;
}

.entity-info-grid__cell {
    padding: 0.55rem 0.65rem;
    border-radius: var(--radius-sm);
    background: var(--color-bg-accent);
}

.entity-info-grid__cell dt {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

.entity-info-grid__icon {
    font-size: 0.85rem;
}

.entity-info-grid__cell dd {
    margin: 0.2rem 0 0;
    font-size: 0.92rem;
    font-weight: 600;
}

.entity-info-grid__cell dd a {
    color: var(--color-primary);
    text-decoration: none;
}

.plant-info-panel {
    margin-top: 0.75rem;
}

.plant-info-panel .entity-info-grid {
    margin-top: 0;
}

.plant-info-panel__shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.plant-info-panel__shortcut {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.75rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.plant-info-panel__shortcut:active {
    background: var(--color-bg-accent);
}

.plant-info-panel__shortcut-icon {
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1;
}

.plant-info-panel__shortcut-label {
    flex: 1;
}

.plant-info-panel__shortcut-count,
.plant-info-panel__shortcut-meta {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

.plant-info-panel__relations {
    margin-top: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--color-bg-accent);
}

.plant-info-panel__relations-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.plant-info-panel__label {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

.plant-info-panel__relation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.plant-info-panel__clone-list {
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.35rem;
}

.plant-info-panel__clone-list a {
    display: block;
    padding: 0.35rem 0;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

.plant-info-panel__clone-list a .hint {
    font-weight: 500;
}

.plant-info-panel__empty {
    margin: 0.45rem 0 0;
}

.graine-pipeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}

.graine-pipeline__step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
    position: relative;
    min-width: 0;
}

.graine-pipeline__step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 1rem;
    left: calc(50% + 1.1rem);
    width: calc(100% - 2.2rem);
    height: 2px;
    background: var(--color-border);
    z-index: 0;
}

.graine-pipeline__step--done:not(:last-child)::after {
    background: var(--color-primary-light);
}

.graine-pipeline__bubble {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--color-bg-accent);
    border: 2px solid var(--color-border);
    font-size: 0.95rem;
    z-index: 1;
}

.graine-pipeline__step--current .graine-pipeline__bubble {
    border-color: var(--color-primary);
    background: #e8f5e9;
}

.graine-pipeline__step--done .graine-pipeline__bubble {
    border-color: var(--color-primary-light);
    background: var(--color-primary-light);
    color: #fff;
}

.graine-pipeline__label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.graine-pipeline__step--current .graine-pipeline__label {
    color: var(--color-primary-dark);
}

.graine-pipeline__count {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--color-primary);
}

.graine-pipeline--ended {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0 0;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.88rem;
}

.entity-pipeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}

.entity-pipeline__step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
    position: relative;
    min-width: 0;
}

.entity-pipeline__step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 1rem;
    left: calc(50% + 1.1rem);
    width: calc(100% - 2.2rem);
    height: 2px;
    background: var(--color-border);
    z-index: 0;
}

.entity-pipeline__step--done:not(:last-child)::after {
    background: var(--color-primary-light);
}

.entity-pipeline__bubble {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--color-bg-accent);
    border: 2px solid var(--color-border);
    font-size: 0.95rem;
    z-index: 1;
}

.entity-pipeline__step--current .entity-pipeline__bubble {
    border-color: var(--color-primary);
    background: #e8f5e9;
}

.entity-pipeline__step--done .entity-pipeline__bubble {
    border-color: var(--color-primary-light);
    background: #f0faf2;
}

.entity-pipeline__label {
    font-size: 0.62rem;
    line-height: 1.2;
    color: var(--color-text-muted);
    max-width: 100%;
}

.entity-pipeline__step--current .entity-pipeline__label {
    color: var(--color-primary);
    font-weight: 600;
}

.entity-pipeline__count {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--color-primary);
}

.entity-pipeline--ended {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0 0;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.88rem;
}

.entity-pipeline-action {
    margin: 0.5rem 0 0;
}

.journal-compose {
    padding: 0.85rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #f4faf4 0%, #eef6f0 100%);
    border: 1px solid rgba(45, 90, 61, 0.12);
}

.journal-compose__lead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    width: 100%;
    margin: 0 0 0.75rem;
    padding: 0;
    border: none;
    background: transparent;
    text-align: left;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    cursor: pointer;
}

.journal-compose__lead:active {
    opacity: 0.85;
}

.journal-compose__date {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.journal-compose__photo-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
}

.entity-more > .collapsible {
    margin-bottom: 0.5rem;
}

@media (max-width: 400px) {
    .entity-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Rich timeline ── */
.timeline--rich .timeline__item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.timeline__thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: block;
}

.timeline__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline__content {
    flex: 1;
    min-width: 0;
}

.card--timeline {
    margin-top: 0.75rem;
}

/* ── Photo filter ── */
.photo-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.5rem 0.65rem;
    background: rgba(0, 0, 0, 0.45);
}

.photo-filter__btn {
    padding: 0.25rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.photo-filter__btn.is-active {
    background: #fff;
    color: var(--color-primary-dark);
    border-color: #fff;
}

/* ── FAB & journal sheet ── */
.fab {
    position: fixed;
    right: 1rem;
    bottom: calc(var(--bottom-nav-h) + 0.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 25;
    width: 3.25rem;
    height: 3.25rem;
    border: none;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: #fff;
    font-size: 1.35rem;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab:hover {
    background: var(--color-primary);
}

.journal-sheet {
    position: fixed;
    inset: 0;
    z-index: 1350;
    display: flex;
    align-items: flex-end;
}

.journal-sheet[hidden] {
    display: none !important;
}

.journal-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.journal-sheet__panel {
    position: relative;
    width: 100%;
    max-height: min(85dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 0.75rem));
    background: var(--color-surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 1rem var(--space-page);
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    box-shadow: var(--shadow-lg);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.journal-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.journal-sheet__header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.journal-sheet__close {
    border: none;
    background: var(--color-bg-accent);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
}

body.journal-sheet-open {
    overflow: hidden;
}

body.journal-sheet-open .entity-quick-bar-dock,
body.journal-sheet-open .plant-quick-bar-dock,
body.journal-sheet-open .bottom-nav-dock,
body.entity-actions-sheet-open .entity-quick-bar-dock,
body.entity-actions-sheet-open .plant-quick-bar-dock,
body.entity-actions-sheet-open .bottom-nav-dock {
    display: none !important;
}

.page-entity-view .journal-sheet__panel,
.page-entity-view .entity-actions-sheet__panel,
.page-entity-view .entity-nav-sheet__panel {
    margin-bottom: var(--chrome-bottom-entity);
    max-height: min(
        85dvh,
        calc(100dvh - env(safe-area-inset-top, 0px) - var(--chrome-bottom-entity) - 0.75rem)
    );
}

body.journal-sheet-open.page-entity-view .journal-sheet__panel,
body.entity-actions-sheet-open.page-entity-view .entity-actions-sheet__panel,
body.entity-actions-sheet-open.page-entity-view .entity-nav-sheet__panel {
    margin-bottom: 0;
    max-height: min(
        92dvh,
        calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 0.75rem)
    );
}

.entity-actions-sheet,
.entity-nav-sheet {
    position: fixed;
    inset: 0;
    z-index: 1350;
    display: flex;
    align-items: flex-end;
}

.entity-lifecycle__status {
    margin: 0 0 0.35rem;
}

.entity-lifecycle__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.entity-lifecycle__form {
    margin: 0;
}

.entity-lifecycle__advanced {
    margin: 0.75rem 0 0;
}

.entity-lifecycle--inactive {
    border-left: 3px solid var(--color-warn, #c77800);
}

.entity-lifecycle__note {
    margin: 0.35rem 0 0.75rem;
}

.entity-lifecycle__form--block {
    margin-top: 0.75rem;
}

.entity-lifecycle__qualificatif {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.entity-actions-sheet[hidden],
.entity-nav-sheet[hidden] {
    display: none !important;
}

.entity-actions-sheet__backdrop,
.entity-nav-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.entity-actions-sheet__panel,
.entity-nav-sheet__panel {
    position: relative;
    width: 100%;
    max-height: min(70dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 0.75rem));
    background: var(--color-surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 1rem var(--space-page);
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    box-shadow: var(--shadow-lg);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.entity-actions-sheet__header,
.entity-nav-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.entity-actions-sheet__header h3,
.entity-nav-sheet__header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.entity-actions-sheet__close,
.entity-nav-sheet__close {
    border: none;
    background: var(--color-bg-accent);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
}

.entity-actions-sheet__list,
.entity-nav-sheet__links {
    display: grid;
    gap: 0.35rem;
}

.entity-actions-sheet__item,
.entity-nav-sheet__link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    text-align: left;
}

.entity-actions-sheet__item:hover,
.entity-nav-sheet__link:hover {
    background: var(--color-bg-accent);
}

.entity-actions-sheet__item--attention {
    border-color: rgba(200, 120, 40, 0.45);
    background: rgba(200, 120, 40, 0.08);
}

.entity-actions-sheet__item--primary {
    font-weight: 700;
    color: var(--color-primary);
}

.entity-actions-sheet__group {
    margin: 0.65rem 0 0.25rem;
    padding: 0 0.15rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.entity-actions-sheet__group:first-child {
    margin-top: 0;
}

body.entity-actions-sheet-open {
    overflow: hidden;
}

@media (min-width: 768px) {
    .journal-sheet {
        align-items: center;
        justify-content: center;
        padding: 1.25rem;
    }

    .journal-sheet__panel {
        width: min(480px, 100%);
        max-height: min(85dvh, 560px);
        border-radius: var(--radius-lg);
        padding-bottom: 1rem;
        box-shadow: var(--shadow-lg);
    }

    .journal-sheet__form.form-grid {
        gap: 0.75rem;
    }

    .entity-actions-sheet,
    .entity-nav-sheet {
        align-items: center;
        justify-content: center;
        padding: 1.25rem;
    }

    .entity-actions-sheet__panel,
    .entity-nav-sheet__panel {
        width: min(720px, 100%);
        max-height: min(85dvh, 640px);
        border-radius: var(--radius-lg);
        padding-bottom: 1rem;
    }

    .entity-actions-sheet__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .entity-actions-sheet__group {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    .entity-actions-sheet__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .entity-actions-sheet__panel {
        width: min(880px, 100%);
    }

    .entity-actions-sheet__list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.btn--block {
    width: 100%;
}

/* ── Dashboard ── */
.dashboard-section {
    margin-bottom: 0.75rem;
}

.dash-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dash-list li {
    border-bottom: 1px solid var(--color-border);
}

.dash-list li:last-child {
    border-bottom: none;
}

.dash-list a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0;
    color: var(--color-text);
    text-decoration: none;
}

.dash-list a:hover {
    color: var(--color-primary);
}

.dash-list__meta {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.pipeline-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pipeline-list__item a {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0;
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
}

.pipeline-list__item:last-child a {
    border-bottom: none;
}

.pipeline-list__cross {
    font-weight: 600;
}

.pipeline-list__meta {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.badge--warn {
    background: #fff3cd;
    color: #856404;
}

[data-theme="dark"] .badge--warn {
    background: #4a3a10;
    color: #ffd866;
}

.stat-card--link {
    text-decoration: none;
    color: inherit;
}

@media (min-width: 768px) {
    .filter-bar__row {
        grid-template-columns: repeat(3, 1fr);
    }

    .fab {
        bottom: 1.5rem;
    }

    body.app-body--nav-dock .fab {
        bottom: calc(var(--bottom-nav-h) + 0.75rem + env(safe-area-inset-bottom, 0px));
    }

    .page-plant-view {
        padding-bottom: 1.5rem;
    }
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0 0.75rem;
    font-size: 0.88rem;
}

.breadcrumbs__link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.breadcrumbs__current {
    color: var(--color-text-muted);
    font-weight: 600;
}

.breadcrumbs__sep {
    color: var(--color-text-muted);
    opacity: 0.6;
}

.plant-card__updated {
    margin: 0.15rem 0 0.5rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.journal-today {
    margin: 0 0 0.65rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-primary);
}

.badge--photos {
    background: var(--color-bg-accent);
    color: var(--color-text-muted);
}

.list-meta--hint a {
    color: var(--color-text-muted);
    font-weight: 600;
}

.suggestions-intro__lead {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.55;
}

.suggestions-form textarea {
    min-height: 8rem;
}

.about-intro {
    text-align: center;
    padding: 1.25rem 1rem;
}

.about-intro__logo {
    display: block;
    margin: 0 auto 0.75rem;
}

.about-intro__title {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
}

.about-intro__tagline {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.about-intro__lead {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.55;
}

.about-block p {
    margin: 0;
    line-height: 1.55;
}

.about-block p + p,
.about-block .hint {
    margin-top: 0.75rem;
}

.about-list {
    margin: 0;
    padding-left: 1.15rem;
    line-height: 1.55;
}

.about-list li + li {
    margin-top: 0.45rem;
}

.about-pipelines {
    margin: 0;
}

.about-pipelines div + div {
    margin-top: 0.65rem;
}

.about-pipelines dt {
    font-weight: 600;
    font-size: 0.88rem;
}

.about-pipelines dd {
    margin: 0.15rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.88rem;
}

.about-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nomenclature-code {
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    margin: 0.35rem 0 0.5rem;
}

.nomenclature-dl {
    margin-top: 0.75rem;
}

.nomenclature-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.nomenclature-table th,
.nomenclature-table td {
    padding: 0.45rem 0.55rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.nomenclature-table th {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.nomenclature-table code {
    white-space: nowrap;
}

.nomenclature-doc-ref {
    margin-top: 0.85rem;
}

.inventaire-summary {
    margin-bottom: 1rem;
}

.inventaire-summary__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .inventaire-summary__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.inventaire-summary__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.15rem;
}

.inventaire-summary__count {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.1;
}

.inventaire-summary__label {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    line-height: 1.25;
}

.inventaire-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.inventaire-genre {
    padding: 0;
    overflow: hidden;
}

.inventaire-genre__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    cursor: pointer;
    list-style: none;
}

.inventaire-genre__summary::-webkit-details-marker {
    display: none;
}

.inventaire-genre__main {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.inventaire-genre__title {
    font-weight: 600;
    font-size: 0.95rem;
}

.inventaire-genre__code {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.inventaire-genre__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}

.inventaire-genre__body {
    padding: 0 1rem 0.85rem;
    border-top: 1px solid var(--color-border);
}

.inventaire-genre__common {
    margin: 0.65rem 0 0;
}

.inventaire-genre__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.65rem 0 0.75rem;
}

.inventaire-varietes {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.inventaire-variete__link {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.35rem 0.5rem;
    padding: 0.55rem 0.65rem;
    border-radius: var(--radius-sm);
    background: var(--color-bg-accent);
    text-decoration: none;
    color: inherit;
}

@media (min-width: 520px) {
    .inventaire-variete__link {
        grid-template-columns: minmax(0, 1fr) auto auto auto;
    }
}

.inventaire-variete__link:hover {
    background: rgba(45, 90, 61, 0.1);
}

.inventaire-variete__name {
    font-weight: 500;
    min-width: 0;
}

.inventaire-variete__code {
    font-size: 0.75rem;
}

.inventaire-variete__count {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
}

.inventaire-variete__count--zero {
    color: var(--color-text-muted);
    font-weight: 500;
}

.filter-bar__field--checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.suggestions-export {
    margin-top: 0.5rem;
}

/* ── Météo archives ── */
.weather-page__location {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-primary-dark);
}

.weather-page__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1rem;
    margin-bottom: 0;
}

.weather-page__slug select {
    min-width: 10rem;
}

.weather-page__meta {
    margin-top: 1rem;
}

.weather-cal__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.weather-cal__title {
    font-weight: 700;
    font-size: 1rem;
}

.weather-cal__weekdays,
.weather-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.weather-cal__weekdays {
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-align: center;
}

.weather-cal__cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.25rem;
    border-radius: var(--radius-sm, 6px);
    text-decoration: none;
    color: var(--color-text);
    position: relative;
}

.weather-cal__cell--empty {
    visibility: hidden;
}

.weather-cal__cell--muted {
    color: var(--color-text-muted);
    opacity: 0.45;
}

.weather-cal__cell--has-data {
    background: var(--color-bg-accent);
    font-weight: 600;
}

.weather-cal__cell.is-selected {
    background: var(--color-primary);
    color: #fff;
}

.weather-cal__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    margin-top: 2px;
    opacity: 0.85;
}

.weather-day {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.weather-day__summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
    gap: 0.5rem 1rem;
    margin: 0 0 0.75rem;
}

.weather-day__summary div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.weather-day__summary dt {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.weather-day__summary dd {
    margin: 0;
    font-weight: 600;
}

.weather-day__sun {
    margin: 0 0 0.75rem;
    font-size: 0.88rem;
    color: var(--color-text-muted);
}

.weather-entry__metrics {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
    gap: 0.35rem 0.75rem;
    margin: 0.35rem 0 0;
}

.weather-entry__metrics div {
    display: flex;
    gap: 0.35rem;
    align-items: baseline;
}

.weather-entry__metrics dt {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.weather-entry__metrics dd {
    margin: 0;
    font-weight: 600;
}

.weather-entry__code,
.weather-entry__moon {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.weather-timeline .timeline__item {
    padding-left: 0;
}

/* ── Dashboard météo ── */
.weather-dashboard {
    background: linear-gradient(135deg, #e8f4ec 0%, #f0f7f4 55%, #faf6ee 100%);
    border: 1px solid rgba(45, 90, 61, 0.12);
}

.weather-dashboard--linkable {
    position: relative;
}

.weather-dashboard__stretch {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.weather-dashboard--linkable .weather-dashboard__hero,
.weather-dashboard--linkable .weather-dashboard__kpis,
.weather-dashboard--linkable .weather-dashboard__condition,
.weather-dashboard--linkable .weather-dashboard__empty {
    position: relative;
    z-index: 2;
}

.weather-dashboard--linkable .weather-dashboard__link {
    position: relative;
    z-index: 3;
}

.weather-dashboard__hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.weather-dashboard__hero-main {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.weather-dashboard__icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.weather-dashboard__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary-dark);
}

.weather-dashboard__date {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.weather-dashboard__link {
    flex-shrink: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
}

.weather-dashboard__link:hover {
    background: #fff;
}

.weather-dashboard__kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.weather-dashboard__kpi {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.55rem 0.35rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.75);
    text-align: center;
}

.weather-dashboard__kpi-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.weather-dashboard__kpi-value {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.weather-dashboard__kpi-label {
    font-size: 0.68rem;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.weather-dashboard__empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.weather-dashboard__condition {
    margin: 0.65rem 0 0;
    font-size: 0.88rem;
    color: var(--color-text-muted);
    text-align: center;
}

/* ── Page météo (refonte) ── */
.weather-page {
    padding: 0;
    overflow: hidden;
}

.weather-page__hero {
    padding: 1.15rem 1.15rem 1rem;
    background: linear-gradient(135deg, #e8f4ec 0%, #f0f7f4 55%, #faf6ee 100%);
    border-bottom: 1px solid rgba(45, 90, 61, 0.1);
}

.weather-page__body {
    padding: 1.15rem;
}

.weather-day-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
    gap: 0.5rem;
    margin: 0 0 0.85rem;
}

.weather-day-kpi {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.65rem 0.4rem;
    border-radius: var(--radius-sm);
    background: var(--color-bg-accent);
    text-align: center;
}

.weather-day-kpi__icon {
    font-size: 1.25rem;
    line-height: 1;
}

.weather-day-kpi__value {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
}

.weather-day-kpi__label {
    font-size: 0.68rem;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.weather-day__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.weather-day__title-row .section-heading {
    margin: 0;
}

.weather-obs-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
}

.weather-obs-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    background: var(--color-bg-accent);
}

.weather-obs-card__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.weather-obs-card__icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.weather-obs-card__head-text {
    flex: 1;
    min-width: 0;
}

.weather-obs-card__time {
    font-size: 0.88rem;
    font-weight: 600;
}

.weather-obs-card__condition {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.weather-obs-card__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
}

.weather-obs-card__metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.05rem;
    padding: 0.35rem 0.2rem;
    border-radius: 6px;
    background: var(--color-surface);
    text-align: center;
}

.weather-obs-card__metric-value {
    font-size: 0.85rem;
    font-weight: 700;
}

.weather-obs-card__metric-label {
    font-size: 0.62rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.weather-obs-card__foot {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.weather-cal__cell.is-selected .weather-cal__dot {
    background: #fff;
}

[data-theme="dark"] .weather-dashboard {
    background: linear-gradient(135deg, #1a2e22 0%, #1e2a24 55%, #252018 100%);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .weather-dashboard__title {
    color: #c8e6d0;
}

[data-theme="dark"] .weather-dashboard__link {
    background: rgba(0, 0, 0, 0.25);
    color: #9fd4b0;
}

[data-theme="dark"] .weather-dashboard__kpi {
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .weather-page__hero {
    background: linear-gradient(135deg, #1a2e22 0%, #1e2a24 55%, #252018 100%);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .weather-obs-card {
    background: rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .weather-obs-card__metric {
    background: rgba(0, 0, 0, 0.2);
}

@media (max-width: 480px) {
    .weather-obs-card__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Météo fiche plant ── */
.weather-plant-stats {
    overflow: hidden;
    padding: 0;
}

.weather-plant-stats__hero {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1rem 0.85rem;
    background: linear-gradient(135deg, #e8f5e9 0%, #d8f3dc 55%, #f4faf4 100%);
    border-bottom: 1px solid var(--color-border);
}

.weather-plant-stats__hero-icon {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(27, 67, 50, 0.15));
}

.weather-plant-stats__hero-text {
    flex: 1;
    min-width: 0;
}

.weather-plant-stats__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-primary-dark);
    letter-spacing: -0.02em;
}

.weather-plant-stats__subtitle {
    margin: 0.1rem 0 0;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.weather-plant-stats__archive-link {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--color-border);
    color: var(--color-primary-dark);
    text-decoration: none;
}

.weather-plant-stats__archive-link:hover {
    background: #fff;
}

.weather-plant-stats__chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.85rem 1rem 0;
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    background: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
    font-size: 0.88rem;
}

.weather-plant-stats__chip-icon {
    font-size: 1.1rem;
}

.weather-plant-stats__cta {
    margin: 0.85rem 1rem 0;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: var(--color-bg-accent);
    border: 1px dashed var(--color-border);
    text-align: center;
}

.weather-plant-stats__cta-text {
    margin: 0 0 0.5rem;
    font-size: 0.88rem;
    color: var(--color-text-muted);
}

.weather-plant-stats__periods {
    display: grid;
    gap: 0.65rem;
    padding: 0.85rem 1rem 0;
}

.weather-plant-stats__note {
    margin: 0.65rem 1rem 1rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.weather-plant-stats__empty {
    padding: 1rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.weather-period-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    overflow: hidden;
}

.weather-period-card--year {
    background: linear-gradient(180deg, #fff 0%, #f7fcf7 100%);
}

.weather-period-card--exterior {
    background: linear-gradient(180deg, #fff 0%, #f0f8f2 100%);
    border-color: var(--color-success-border);
}

.weather-period-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    background: rgba(45, 106, 79, 0.06);
    border-bottom: 1px solid var(--color-border);
}

.weather-period-card__title {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-primary-dark);
}

.weather-period-card__meta {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

.weather-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    padding: 0.65rem 0.5rem;
}

.weather-kpi {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.5rem 0.25rem;
    border-radius: var(--radius-sm);
    background: var(--color-bg);
}

.weather-kpi--rain {
    background: #e8f4fc;
}

.weather-kpi--sun {
    background: #fff8e1;
}

.weather-kpi--temp {
    background: #fce8ef;
}

.weather-kpi__icon {
    font-size: 1.35rem;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.weather-kpi__value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-primary-dark);
    line-height: 1.1;
}

.weather-kpi__value--sm {
    font-size: 0.95rem;
    font-weight: 700;
}

.weather-kpi__unit {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-top: 0.15rem;
}

.weather-kpi__sub {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--color-text-muted);
    opacity: 0.9;
    margin-top: 0.2rem;
    line-height: 1.2;
}

.weather-period-card__foot {
    padding: 0.45rem 0.75rem;
    border-top: 1px solid var(--color-border);
    background: rgba(0, 0, 0, 0.02);
}

.weather-period-card__range {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

.weather-period-card__avg-hint {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.68rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

[data-theme="dark"] .weather-plant-stats__hero {
    background: linear-gradient(135deg, #1a3328 0%, #1b4332 100%);
}

[data-theme="dark"] .weather-plant-stats__title {
    color: #d8f3dc;
}

[data-theme="dark"] .weather-kpi--rain {
    background: #1a2a35;
}

[data-theme="dark"] .weather-kpi--sun {
    background: #2a2418;
}

[data-theme="dark"] .weather-kpi--temp {
    background: #2a1a22;
}

[data-theme="dark"] .weather-period-card--year,
[data-theme="dark"] .weather-period-card--exterior {
    background: var(--color-surface);
}

.weather-period {
    margin-bottom: 0.75rem;
}

.weather-period__title {
    margin: 0 0 0.35rem;
    font-size: 0.92rem;
    font-weight: 700;
}

.weather-period__range {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
}

.weather-plant-stats__exterior {
    margin: 0 0 0.75rem;
    font-size: 0.92rem;
}

.weather-plant-stats__grid {
    display: grid;
    gap: 1rem;
}

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

/* ── AccuWeather link (dashboard) ── */
.weather-dashboard__external {
    margin: 0.75rem 0 0;
    padding-top: 0.65rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.weather-dashboard__forecast-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
}

.weather-dashboard__forecast-link:hover {
    text-decoration: underline;
}

/* ── Entity action links ── */
a.entity-action {
    text-decoration: none;
}

/* ── Étiquettes QR ── */
.page-label-print .app-main {
    max-width: none;
}

.label-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.label-print-area {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
}

.plant-label {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.2in;
    border: 1px dashed #999;
    background: #fff;
    color: #111;
    text-align: center;
    overflow: hidden;
}

.plant-label--2in {
    width: 2in;
    height: 2in;
}

.plant-label--4in {
    width: 4in;
    height: 4in;
    gap: 0.1rem;
    padding: 0.15in;
}

.plant-label__qr {
    flex-shrink: 0;
}

.plant-label__qr canvas,
.plant-label__qr img,
.plant-label__qr svg {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.plant-label--2in .plant-label__qr canvas,
.plant-label--2in .plant-label__qr img {
    width: 0.95in;
    height: 0.95in;
}

.plant-label--4in .plant-label__qr canvas,
.plant-label--4in .plant-label__qr img {
    width: 2.75in;
    height: 2.75in;
}

.plant-label__type {
    margin: 0;
    font-size: 0.55rem;
    letter-spacing: 0.04em;
    color: #666;
}

.plant-label--4in .plant-label__type {
    font-size: 0.7rem;
    font-weight: 600;
    color: #333;
}

.plant-label__name {
    margin: 0;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.15;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.plant-label--4in .plant-label__name {
    font-size: 0.85rem;
}

.plant-label__meta {
    margin: 0.08rem 0 0;
    font-size: 0.48rem;
    line-height: 1.2;
    color: #444;
}

.plant-label--4in .plant-label__meta {
    font-size: 0.62rem;
}

.plant-label__code {
    margin: 0;
    font-size: 0.5rem;
}

.plant-label--4in .plant-label__code {
    font-size: 0.65rem;
}

.plant-label__code code {
    font-family: var(--font-mono, monospace);
    word-break: break-all;
}

.plant-label__brand {
    margin: 0;
    font-size: 0.45rem;
    color: #888;
}

.plant-label--4in .plant-label__brand {
    font-size: 0.55rem;
}

/* ── Scan ── */
.scan-page__reader {
    margin: 1rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #111;
    min-height: 240px;
}

.scan-page__reader video {
    border-radius: var(--radius-md);
}

.scan-page__status {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    text-align: center;
}

.scan-page__manual-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.scan-page__manual-row input {
    flex: 1;
    min-width: 0;
}

/* ── Stats utilisation ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

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

.stats-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 0.75rem;
    text-align: center;
}

.stats-card__icon {
    font-size: 1.5rem;
    line-height: 1;
}

.stats-card__value {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.1;
}

.stats-card__label {
    margin: 0;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    line-height: 1.25;
}

.stats-type-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.stats-type-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--color-border);
}

.stats-type-list li:last-child {
    border-bottom: none;
}

/* ── Mon jardin ── */
.garden-profile__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.garden-profile__title {
    margin: 0;
    font-size: 1.35rem;
}

.garden-profile__photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.garden-profile__photo-item {
    margin: 0;
}

.garden-profile__photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius-md);
    display: block;
}

.garden-profile__photo-caption {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--color-text-muted);
}

.garden-profile__description {
    margin: 0 0 0.85rem;
    line-height: 1.5;
}

.garden-profile__notes {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--color-border);
}

.garden-weather-custom {
    margin-top: 0.85rem;
}

.garden-weather-custom--hidden {
    display: none;
}

.garden-weather-custom__resolved {
    margin-top: 0.65rem;
}

.garden-profile__photo-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.garden-profile__photo-remove {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
}

.garden-profile__photo-remove img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.garden-photo-edit-list {
    display: grid;
    gap: 0.85rem;
}

.garden-photo-edit-list__item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 0.65rem;
    align-items: start;
    padding: 0.65rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.garden-photo-edit-list__item > img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.garden-photo-edit-list__caption {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.88rem;
}

.garden-photo-edit-list__caption textarea {
    min-height: 3rem;
}

.garden-photo-edit-list__remove {
    grid-column: 1 / -1;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.garden-groups__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.garden-groups__list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.garden-groups__item + .garden-groups__item {
    margin-top: 0.5rem;
}

.garden-groups__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
}

.garden-groups__link:hover {
    border-color: var(--color-primary);
}

.garden-groups__thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.garden-groups__thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-muted, #f1f5f9);
    font-size: 1.25rem;
}

.garden-groups__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.garden-groups__label {
    font-weight: 600;
}

.garden-groups__desc {
    font-size: 0.88rem;
    color: var(--color-text-muted);
}

.garden-groups__meta {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.garden-group__emplacements {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--color-border);
}

.garden-group__emplacement-list {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.garden-group__emplacement-list a {
    display: inline-block;
    padding: 0.25rem 0.55rem;
    border-radius: var(--radius-sm);
    background: var(--color-surface-muted, #f1f5f9);
    font-size: 0.88rem;
    text-decoration: none;
}

.garden-group__picker {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin: 0;
}

.garden-group__checkboxes {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
}

.garden-group__checkboxes label {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    font-size: 0.92rem;
}

.garden-group__delete {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--color-border);
}

/* ── Sécheresse (dashboard) ── */
.dashboard-water-stress__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-water-stress__actions {
    flex-shrink: 0;
}

.plant-water-stress-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--color-warn, #e9a319);
}

.plant-water-stress-banner__title {
    margin: 0 0 0.25rem;
    font-weight: 600;
}

.promo-banners-grid {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .promo-banners-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

.promo-banners-grid__item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.promo-banners-grid__title {
    margin: 0;
    font-size: 1rem;
}

.promo-banners-grid__preview {
    display: block;
    padding: 0.5rem;
    background: var(--surface-muted, #f4f4f4);
    border-radius: 6px;
    overflow: hidden;
}

.promo-banners-grid__preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.admin-tools {
    display: grid;
    gap: 0.75rem;
}

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

.admin-tools__card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    background: var(--surface-muted, #f8f9f8);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.admin-tools__card:hover {
    border-color: var(--color-primary, #2d6a4f);
    background: #fff;
}

.admin-tools__icon {
    font-size: 1.5rem;
    line-height: 1;
}

.admin-tools__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.admin-tools__title {
    font-weight: 600;
}

.admin-tools__hint {
    font-size: 0.85rem;
    color: var(--color-muted, #666);
}

.admin-tools__arrow {
    font-size: 1.25rem;
    opacity: 0.5;
}

.dashboard-water-stress__title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.dashboard-water-stress__updated {
    margin: 0.35rem 0 0;
}

.dashboard-water-stress__list {
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
    border-top: 1px solid var(--color-border);
}

.dashboard-water-stress__list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
}

.dashboard-water-stress__list li:last-child {
    border-bottom: none;
}

.dashboard-water-stress__list a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

.dashboard-water-stress__list a:hover {
    text-decoration: underline;
}

.dashboard-water-stress__meta {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.dashboard-pipelines {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 0;
}

.dashboard-zone--pipelines .dashboard-pipelines {
    margin-bottom: 0;
}

.dashboard-pipelines .pipeline-overview {
    margin-bottom: 0;
}

.dashboard-chip--water {
    background: #e8f4fc;
    color: #0c5460;
}

.dashboard-chip--scan {
    background: #eef2ff;
    color: #3730a3;
}

.dashboard-chip--reminder {
    background: #fef3c7;
    color: #92400e;
}

.dashboard-chip--pipeline {
    background: #fce7f3;
    color: #9d174d;
}

.dashboard-chip--alert {
    background: #fff7ed;
    color: #9a3412;
}

.dashboard-hero__cta-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.dashboard-hero__ok-inline {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    padding: 0.3rem 0.65rem;
}

.dashboard-zone {
    margin-bottom: 1.25rem;
}

.dashboard-zone__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.dashboard-zone__head-main {
    flex: 1;
    min-width: 0;
}

.dashboard-zone__action {
    flex-shrink: 0;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.dashboard-zone__action:hover {
    text-decoration: underline;
}

.dashboard-zone__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary-dark);
}

.dashboard-zone__hint {
    margin: 0.2rem 0 0;
}

.dashboard-section--action {
    border-left: 3px solid var(--color-primary-light);
    background: linear-gradient(90deg, rgba(45, 106, 79, 0.05) 0%, var(--color-surface) 18%);
}

.dashboard-catalog-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.dashboard-catalog-link__text {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.dashboard-catalog-link__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.app-header__cta--scan {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.header-menu__group-label {
    margin: 0.85rem 0 0.35rem;
    padding: 0 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.header-menu__nav .header-menu__group-label:first-child {
    margin-top: 0;
}

.header-menu__group-label--footer {
    margin: 0 0 0.15rem;
    padding: 0 0.75rem;
}

.plant-new-banner {
    border-color: var(--color-success-border);
    background: linear-gradient(135deg, var(--color-success-bg) 0%, var(--color-surface) 100%);
    margin-bottom: 0.85rem;
}

.plant-new-banner__title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.plant-new-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.65rem;
}

.plant-surnom-panel {
    margin-bottom: 0.5rem;
    border: 1px dashed rgba(200, 120, 40, 0.45);
    border-radius: var(--radius-md);
    background: rgba(200, 120, 40, 0.05);
}

.plant-surnom-panel--landing {
    margin-bottom: 1rem;
    padding: 0.15rem 0.85rem 0.85rem;
    border: 1px solid rgba(200, 120, 40, 0.45);
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, rgba(255, 247, 237, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
    box-shadow: var(--shadow-sm);
}

.page-plant-view--nommer .plant-nommer-mission {
    margin-bottom: 0.65rem;
}

.page-plant-view--nommer .plant-surnom-panel--landing {
    margin-bottom: 0.85rem;
}

.page-plant-view--nommer .plant-card--after-nommer {
    margin-top: 0.15rem;
}

.plant-nommer-mission {
    border: 2px solid rgba(200, 120, 40, 0.45);
    background: linear-gradient(135deg, rgba(255, 247, 237, 0.95), var(--color-surface));
}

.plant-nommer-mission__eyebrow {
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.plant-nommer-mission__inner {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.55rem 0.75rem;
    align-items: center;
}

.plant-nommer-mission__icon {
    font-size: 1.65rem;
    line-height: 1;
}

.plant-nommer-mission__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
}

.plant-nommer-mission__text {
    margin: 0.2rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.92rem;
}

[data-theme="dark"] .plant-nommer-mission {
    background: linear-gradient(135deg, rgba(60, 40, 20, 0.35), var(--color-surface));
    border-color: rgba(255, 214, 102, 0.35);
}

.plant-surnom-panel--landing .collapsible__summary {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
}

[data-theme="dark"] .plant-surnom-panel--landing {
    background: linear-gradient(160deg, rgba(60, 40, 20, 0.35) 0%, var(--color-surface) 100%);
    border-color: rgba(255, 214, 102, 0.35);
}

.plant-surnom-panel__intro {
    margin: 0 0 0.75rem;
}

.plant-surnom-panel__form {
    display: grid;
    gap: 0.65rem;
}

.plant-surnom-panel__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem;
}

.plant-surnom-panel__field {
    flex: 1 1 12rem;
    min-width: 0;
}

.plant-surnom-panel__field input {
    width: 100%;
}

.plant-cycle-panel {
    margin-top: 0.85rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: var(--color-bg-accent);
    border: 1px solid var(--color-border);
}

.plant-cycle-panel__head {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.plant-cycle-panel__kicker {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.plant-cycle-panel__current {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
}

.page-plant-view .plant-cycle-panel .entity-pipeline {
    margin-top: 0.35rem;
}

.page-plant-view .plant-cycle-panel .entity-pipeline__bubble {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1rem;
}

.page-plant-view .plant-cycle-panel .entity-pipeline__label {
    font-size: 0.68rem;
}

.plant-cycle-panel__action {
    margin-top: 0.65rem;
}

.entity-quick-bar-dock,
.plant-quick-bar-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
    z-index: 1010;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 16px rgba(27, 67, 50, 0.08);
}

.entity-quick-bar-dock__inner,
.plant-quick-bar-dock__inner {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.entity-quick-bar,
.plant-quick-bar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.entity-quick-bar[data-slot-count="4"],
.plant-quick-bar[data-slot-count="4"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.entity-quick-bar--compact,
.entity-quick-bar[data-slot-count="3"],
.plant-quick-bar[data-slot-count="3"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.entity-quick-bar__form,
.plant-quick-bar__form {
    display: contents;
}

.entity-quick-bar__btn,
.plant-quick-bar__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    min-height: 3.25rem;
    padding: 0.35rem 0.25rem;
    border: none;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.entity-quick-bar__btn span:first-child,
.plant-quick-bar__btn span:first-child {
    font-size: 1.15rem;
    line-height: 1;
}

.entity-quick-bar__btn--water,
.plant-quick-bar__btn--water {
    color: #0c5460;
}

.entity-quick-bar__btn--link,
.plant-quick-bar__btn--link {
    text-decoration: none;
    color: inherit;
}

.entity-quick-bar__btn--more,
.plant-quick-bar__btn--more {
    color: var(--color-text-muted);
    font-size: 1.35rem;
    line-height: 1;
}

.entity-quick-bar__btn:active,
.plant-quick-bar__btn:active {
    background: var(--color-bg-accent);
}

.page-plant-view .app-main,
.page-hybridation-view .app-main,
.page-harvest-view .app-main,
.page-semis-view .app-main,
.page-entity-view .app-main {
    padding-bottom: var(--chrome-bottom-entity);
}

@media (min-width: 768px) {
    .entity-quick-bar-dock,
    .plant-quick-bar-dock {
        bottom: 0;
        background: color-mix(in srgb, var(--color-surface) 94%, var(--color-bg-accent));
        backdrop-filter: blur(8px);
    }

    .entity-quick-bar-dock__inner,
    .plant-quick-bar-dock__inner {
        max-width: min(960px, 100%);
        padding: 0 1.5rem;
    }

    .entity-quick-bar,
    .plant-quick-bar {
        max-width: 520px;
        margin: 0 auto;
    }

    .entity-quick-bar[data-slot-count="3"],
    .entity-quick-bar--compact {
        max-width: 360px;
    }

    .page-plant-view .app-main,
    .page-hybridation-view .app-main,
    .page-harvest-view .app-main,
    .page-semis-view .app-main,
    .page-entity-view .app-main {
        padding-bottom: var(--chrome-bottom-entity);
    }
}

@media (min-width: 768px) {
    .page-entity-view {
        --chrome-bottom-entity: calc(var(--entity-quick-bar-h) + var(--bottom-nav-h-compact) + env(safe-area-inset-bottom, 0px));
        padding-bottom: var(--chrome-bottom-entity);
    }

    .page-entity-view .entity-quick-bar-dock,
    .page-entity-view .plant-quick-bar-dock {
        bottom: calc(var(--bottom-nav-h-compact) + env(safe-area-inset-bottom, 0px));
    }

    .page-entity-view .bottom-nav-dock {
        --bottom-nav-h: var(--bottom-nav-h-compact);
    }

    .page-entity-view .bottom-nav {
        min-height: var(--bottom-nav-h-compact);
    }

    .page-entity-view .bottom-nav__label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .page-entity-view .bottom-nav__item {
        min-height: var(--bottom-nav-h-compact);
        padding-top: 0.55rem;
        padding-bottom: 0.35rem;
    }

    .page-entity-view .bottom-nav__item--cta .bottom-nav__icon,
    .page-entity-view .bottom-nav__item--add-plant .bottom-nav__icon {
        margin-top: -0.35rem;
        width: 2.35rem;
        height: 2.35rem;
    }

    .page-entity-view .entity-quick-bar__btn,
    .page-entity-view .plant-quick-bar__btn {
        min-height: 3rem;
        font-size: 0.68rem;
    }

    .page-entity-view .entity-nav--sticky {
        top: var(--chrome-top);
    }
}

.list-page__search-hint {
    margin: 0.15rem 0 0;
    width: 100%;
}

.ia-advice {
    display: grid;
    gap: 0.75rem;
}

.ia-advice__status {
    margin: 0;
}

.ia-advice__result {
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}

.ia-advice__summary {
    margin: 0 0 0.5rem;
    font-weight: 600;
}

.ia-advice__list {
    margin: 0 0 0.5rem;
    padding-left: 1.1rem;
}

.ia-advice__list--actions {
    font-weight: 600;
}

.ia-advice__links {
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
}

.ia-advice__links a {
    color: var(--color-primary);
}

.mobile-form__cycle-pick {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--color-border);
}

.mobile-form__cycle-label {
    margin: 0 0 0.35rem;
    font-size: 0.88rem;
    font-weight: 600;
}

.inventaire-variete__lots {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

/* ── Pagination listes ── */
.list-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.5rem 0;
}

.list-pagination__status {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* ── Footer desktop ── */
.app-footer {
    display: none;
}

@media (min-width: 768px) {
    .app-footer {
        display: block;
        margin-top: 2rem;
        padding: 1.25rem 1.5rem 2rem;
        border-top: 1px solid var(--color-border);
        background: var(--color-surface);
    }

    .app-footer__inner {
        max-width: 960px;
        margin: 0 auto;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem 1.25rem;
    }

    .app-footer__brand {
        margin: 0;
        font-weight: 700;
        color: var(--color-primary);
    }

    .app-footer__version {
        font-weight: 500;
        color: var(--color-text-muted);
        font-size: 0.85em;
    }

    .app-footer__links {
        display: flex;
        gap: 1rem;
        flex: 1;
    }

    .app-footer__links a {
        font-size: 0.9rem;
        color: var(--color-text-muted);
        text-decoration: none;
    }

    .app-footer__links a:hover {
        color: var(--color-primary);
    }

    .app-footer__meta {
        margin: 0;
        width: 100%;
    }
}

/* ── À propos versions ── */
.about-intro__version {
    margin: 0.35rem 0 0;
}

.about-versions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.about-versions__item {
    padding-left: 0.75rem;
    border-left: 3px solid var(--color-primary-soft, var(--color-border));
}

.about-versions__tag {
    font-weight: 700;
    color: var(--color-primary);
    margin-right: 0.5rem;
}

.about-versions__date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.about-versions__summary {
    margin: 0.25rem 0 0;
    font-size: 0.92rem;
}

.about-list--steps {
    list-style: decimal;
    padding-left: 1.25rem;
}

.about-list--steps li + li {
    margin-top: 0.35rem;
}

.gps-fields {
    display: grid;
    gap: 0.65rem;
}

.gps-fields__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.gps-fields__coords {
    margin: 0;
}

.add-terrain-banner {
    margin-bottom: 0.85rem;
    border-left: 3px solid var(--color-primary, #2d6a4f);
}

.add-terrain-banner__lead {
    margin: 0 0 0.5rem;
    line-height: 1.45;
}

.map-page__intro-actions {
    margin-top: 0.75rem;
}

.map-page__map-wrap {
    padding: 0;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    z-index: 0;
}

.map-page__map {
    width: 100%;
    min-height: 420px;
    height: min(62vh, 560px);
    background: #e8f0ea;
}

.map-page__count {
    margin: 0.65rem 0 0;
}

.map-page__empty {
    margin: 0.75rem var(--space-page) 1rem;
}

.map-marker-icon {
    background: transparent;
    border: none;
}

.map-marker-icon span {
    display: block;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.map-popup__kind {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    text-transform: capitalize;
}

.map-popup__warn {
    color: var(--color-warn, #bc6c25);
    font-weight: 600;
}

.page-map .app-main {
    max-width: 960px;
    padding-bottom: calc(1.5rem + var(--chrome-bottom));
}

/* ── Mon jardin stats / emplacements ── */
.garden-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.garden-stats__card {
    padding: 0.85rem 0.65rem;
    text-align: center;
}

.garden-stats__card--warn {
    border-color: var(--color-warn, #c9a227);
}

.garden-stats__value {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
}

.garden-stats__label {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.garden-emplacements__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.garden-emplacements__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.garden-emplacements__list li + li {
    border-top: 1px solid var(--color-border);
}

.garden-emplacements__list a {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.65rem 0;
    text-decoration: none;
    color: inherit;
}

.garden-emplacements__name {
    font-weight: 600;
}

.garden-emplacements__meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ── Utilisation (stockage) ── */
.stats-hero-value {
    margin: 0 0 0.75rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
}

.stats-storage-bar {
    display: flex;
    height: 0.5rem;
    border-radius: 999px;
    overflow: hidden;
    background: var(--color-border);
    margin-bottom: 0.85rem;
}

.stats-storage-bar__photos {
    background: var(--color-primary);
}

.stats-storage-bar__json {
    background: var(--color-primary-soft, #74a57f);
}

.stats-storage-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.stats-storage-list li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.15rem 1rem;
    align-items: baseline;
}

.stats-storage-list .hint {
    grid-column: 1 / -1;
    margin: 0;
}

.stats-grid--compact {
    grid-template-columns: repeat(2, 1fr);
}

.stats-subheading {
    margin: 1rem 0 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.journal-photo-field {
    display: grid;
    gap: 0.5rem;
}

.journal-photo-field__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 0.75rem;
}

.journal-photo-field__capture {
    flex: 1 1 12rem;
    min-width: 0;
}

.journal-photo-field__label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.journal-photo-field__preview {
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm, 6px);
    background: var(--color-surface-muted, rgba(0, 0, 0, 0.03));
}

.journal-photo-field__preview:not([hidden]) {
    display: flex;
}

.journal-photo-field__preview[hidden] {
    display: none !important;
}

.journal-photo-field__preview img {
    width: 3rem;
    height: 3rem;
    object-fit: cover;
    border-radius: 4px;
}

.journal-photo-field__preview-label {
    flex: 1;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.journal-photo-field__clear {
    border: 0;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    color: var(--color-text-muted);
}

.photo-picker {
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm, 6px);
    background: var(--color-surface-muted, rgba(0, 0, 0, 0.02));
}

.photo-picker__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
    gap: 0.35rem;
    max-height: 14rem;
    overflow: auto;
}

.photo-picker__item {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: transparent;
}

.photo-picker__item.is-selected {
    border-color: var(--color-accent, #2d6a4f);
}

.photo-picker__item img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.timeline__question {
    margin: 0 0 0.35rem;
    font-size: 0.92rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.timeline__question-label {
    font-style: normal;
    font-weight: 600;
}

.nickname-suggest {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px dashed var(--color-border);
    display: grid;
    gap: 0.45rem;
}

.nickname-suggest__rationale {
    margin: 0;
    font-style: italic;
}

.nickname-suggest__reject {
    justify-self: start;
    color: var(--color-text-muted);
}

/* ── Mobile terrain (M1–M5) ── */

.theme-toggle--outdoor-header {
    display: inline-flex;
}

.theme-toggle--outdoor-header.is-active,
.theme-toggle--outdoor-header[aria-pressed="true"] {
    background: rgba(255, 214, 102, 0.28);
    box-shadow: inset 0 0 0 1px rgba(255, 214, 102, 0.45);
}

@media (max-width: 767px) {
    .bottom-nav__item--scan {
        display: none;
    }

    .dashboard-hero__row {
        flex-direction: column;
        align-items: stretch;
    }

    .page-entity-view {
        --chrome-bottom-entity: calc(var(--entity-quick-bar-h) + var(--bottom-nav-h-compact) + env(safe-area-inset-bottom, 0px));
    }

    .page-entity-view .entity-quick-bar-dock,
    .page-entity-view .plant-quick-bar-dock {
        bottom: calc(var(--bottom-nav-h-compact) + env(safe-area-inset-bottom, 0px));
    }

    .page-entity-view .bottom-nav-dock {
        --bottom-nav-h: var(--bottom-nav-h-compact);
    }

    .page-entity-view .bottom-nav {
        min-height: var(--bottom-nav-h-compact);
    }

    .page-entity-view .bottom-nav__label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .page-entity-view .bottom-nav__item {
        min-height: var(--bottom-nav-h-compact);
        padding-top: 0.55rem;
        padding-bottom: 0.35rem;
    }

    .page-entity-view .bottom-nav__item--cta .bottom-nav__icon,
    .page-entity-view .bottom-nav__item--add-plant .bottom-nav__icon {
        margin-top: -0.35rem;
        width: 2.35rem;
        height: 2.35rem;
    }

    .page-entity-view .entity-quick-bar__btn,
    .page-entity-view .plant-quick-bar__btn {
        min-height: 3rem;
        font-size: 0.68rem;
    }

    .map-page__filters-details {
        padding: 0;
    }

    .map-page__filters-summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0.85rem 1rem;
        font-weight: 700;
        cursor: pointer;
        list-style: none;
    }

    .map-page__filters-summary::-webkit-details-marker {
        display: none;
    }

    .map-page__filters-summary::after {
        content: "▾";
        color: var(--color-text-muted);
        transition: transform 0.15s;
    }

    .map-page__filters-details[open] .map-page__filters-summary::after {
        transform: rotate(180deg);
    }

    .map-page__filters-body {
        padding: 0 1rem 1rem;
    }

    .map-page__map {
        min-height: 360px;
        height: min(72vh, 620px);
    }

    .map-page__filters-details:not([open]) + .map-page__map-wrap .map-page__map {
        height: min(78vh, 660px);
    }

    .app-header__brand-sub {
        display: none;
    }
}

@media (min-width: 768px) {
    :root {
        --chrome-top: calc(env(safe-area-inset-top, 0px) + var(--header-h));
    }

    .map-page__filters-details {
        padding: 1.15rem;
    }

    .map-page__filters-summary {
        display: none;
    }

    .map-page__filters-body {
        padding: 0;
    }
}

[data-outdoor="true"] .bottom-nav__label {
    font-size: 0.78rem;
}
