/* ══════════════════════════════════════════════════════════════
   OBOOLO — L'Atelier des Saveurs
   Charte : Kaki Profond #4A5733 · Orange Braise #D9602A · Crème Lin #F9F7F2
   Mobile-first · Thème clair/sombre · PWA
   ══════════════════════════════════════════════════════════════ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Satisfy&family=Cormorant+Garamond:ital,wght@0,400;1,400&display=swap');

/* ══ VARIABLES THÈME ══ */

:root, [data-theme="light"] {
    --bg-primary: #F9F7F2;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F5F2EC;
    --bg-nav: #4A5733;
    --bg-nav-item: rgba(255,255,255,0.08);
    --bg-nav-active: rgba(255,255,255,0.2);
    --bg-input: #FFFFFF;
    --bg-modal: rgba(0,0,0,0.5);
    --bg-tag: #E8E4DC;

    --text-primary: #2E2E2E;
    --text-secondary: #5A5A50;
    --text-heading: #4A5733;
    --text-nav: #E8E4DC;
    --text-nav-active: #FFFFFF;
    --text-on-accent: #FFFFFF;
    --text-input: #2E2E2E;

    --accent: #D9602A;
    --accent-hover: #C4501E;
    --accent-light: rgba(217,96,42,0.1);
    --kaki: #4A5733;
    --kaki-medium: #6B7B4A;
    --kaki-doux: #C8CEAE;
    --orange-chaleur: #E8845A;

    --border: #E8E0D8;
    --border-focus: #D9602A;
    --shadow: 0 2px 8px rgba(74,87,51,0.08);
    --shadow-lg: 0 8px 24px rgba(74,87,51,0.12);

    --danger: #D32F2F;
    --danger-bg: #FFF0F0;
    --warning: #F9A825;
    --warning-bg: #FFF8E1;
    --success: #4A5733;
    --success-bg: #F0F4E8;
    --info: #1976D2;
    --info-bg: #E3F2FD;

    /* Alias utilitaires */
    --bg-main: #FFFFFF;
    --bg-hover: #F5F2EC;
    --bg-warning: #FFF8E1;
    --text-muted: #5A5A50;
    --text: #2E2E2E;
    --primary: #4A5733;

    /* Statuts commandes */
    --statut-confirmee: #4A5733;
    --statut-livree: #7CB342;
    --statut-a-recuperer: #F9A825;
    --statut-recuperee: #E8845A;
    --statut-facturee: #D32F2F;
    --statut-brouillon: #9E9E9E;
}

[data-theme="dark"] {
    --bg-primary: #1A1F1A;
    --bg-card: #2A2F2A;
    --bg-card-hover: #333833;
    --bg-nav: #1E231E;
    --bg-nav-item: rgba(255,255,255,0.05);
    --bg-nav-active: rgba(255,255,255,0.15);
    --bg-input: #333833;
    --bg-modal: rgba(0,0,0,0.7);
    --bg-tag: #3A3F3A;

    --text-primary: #E8E0D8;
    --text-secondary: #A8B090;
    --text-heading: #C8CEAE;
    --text-nav: #A8B090;
    --text-nav-active: #FFFFFF;
    --text-on-accent: #FFFFFF;
    --text-input: #E8E0D8;

    --accent: #E8845A;
    --accent-hover: #D9602A;
    --accent-light: rgba(232,132,90,0.15);
    --kaki: #7CB342;
    --kaki-medium: #8BC34A;
    --kaki-doux: #3D4A2D;
    --orange-chaleur: #FFB74D;

    --border: #3D433D;
    --border-focus: #E8845A;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);

    --danger: #EF5350;
    --danger-bg: #3D2020;
    --warning: #FFD54F;
    --warning-bg: #3D3520;
    --success: #7CB342;
    --success-bg: #2A3520;
    --info: #64B5F6;
    --info-bg: #1A2A3D;

    /* Alias utilitaires */
    --bg-main: #2A2F2A;
    --bg-hover: #333833;
    --bg-warning: #3D3520;
    --text-muted: #A8B090;
    --text: #E8E0D8;
    --primary: #7CB342;

    --statut-confirmee: #7CB342;
    --statut-livree: #AED581;
    --statut-a-recuperer: #FFD54F;
    --statut-recuperee: #FFB74D;
    --statut-facturee: #EF5350;
    --statut-brouillon: #757575;
}

/* ══ RESET & BASE ══ */

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

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

/* Desktop : taille de base plus confortable */
@media (min-width: 1024px) {
    html { font-size: 19px; }
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

/* ══ HEADER ══ */

/* ══ HEADER UNIFIÉ — Logo + Nav + Actions ══ */

.header {
    background: var(--bg-nav);
    color: var(--text-nav);
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    height: 44px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    gap: 0.3rem;
}

.header-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.header-title {
    font-family: 'Satisfy', cursive;
    font-size: 1.15rem;
    color: var(--text-nav-active);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Logo-texte OBOOLO dans le bandeau (image PNG paysage avec toque) */
.header-brand {
    height: 38px;
    width: auto;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
}
.header-besoins {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.92);
    white-space: nowrap;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}
/* Blocs Semaine / Semaine S+1 nettement séparés */
.header-besoins .hb-group {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px 3px 6px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
}
.header-besoins .hb-group-s1 {
    background: rgba(217, 96, 42, 0.18);
    border: 1px solid rgba(217, 96, 42, 0.55);
}
.header-besoins .hb-week-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    padding: 1px 5px;
    border-radius: 6px;
    background: rgba(255,255,255,0.12);
}
.header-besoins .hb-week-s1-label {
    color: #ffd3b8;
    background: rgba(217, 96, 42, 0.45);
}
.header-besoins .hb-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(255,255,255,0.15);
    padding: 2px 6px;
    border-radius: 8px;
}
.header-besoins .hb-val {
    font-weight: 700;
    font-size: 0.95rem;
}
.header-besoins .hb-detail {
    font-size: 0.8rem;      /* stock/delta lisible — passé de 0.6 → 0.8 */
    font-weight: 600;
    opacity: 1;
}
.header-besoins .hb-ok {
    color: #b8e6b8;
    font-weight: 800;
}
.header-besoins .hb-red {
    color: #ff7b7b;
    font-weight: 800;
}
.header-besoins .hb-s1 {
    background: rgba(217,96,42,0.35);
}
/* Chips CA semaine / CA S+1 (💰) — encadrent leur groupe */
.header-besoins .hb-ca {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(122, 184, 87, 0.28);   /* vert doux : semaine courante */
    color: #eaf8e2;
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 700;
}
.header-besoins .hb-ca .hb-val {
    font-size: 0.95rem;
    color: #fff;
}
.header-besoins .hb-ca-s1 {
    background: rgba(217, 96, 42, 0.4);     /* orangé : S+1 (même famille que hb-s1) */
    color: #ffe1cf;
}
.header-besoins .hb-ca-s1 .hb-val {
    color: #fff;
}

/* Onglets icône seule (Import / Réglages) — à côté du toggle PC/Mobile */
.nav-item-icon {
    padding: 4px 8px !important;
    gap: 0 !important;
}
.nav-item-icon .nav-icon {
    font-size: 1.1rem;
}

/* Navigation intégrée dans le header — TOUJOURS inline */
.header-nav {
    display: flex;
    align-items: center;
    gap: 1px;
    flex-shrink: 0;
    justify-content: flex-start;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    margin-left: auto; /* pousse les actions vers la droite */
}

/* ── Recherche globale ── */
.header-search-wrap {
    position: relative;
    flex-shrink: 1;
    min-width: 0;
}
.header-search {
    width: 110px;
    padding: 4px 10px !important;
    font-size: 0.75rem !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    background: rgba(255,255,255,0.15) !important;
    color: white !important;
    transition: width 0.3s, background 0.2s;
}
.header-search::placeholder { color: rgba(255,255,255,0.6); }
.header-search:focus {
    width: 200px;
    background: rgba(255,255,255,0.25) !important;
    border-color: rgba(255,255,255,0.5) !important;
    outline: none;
}
@media (min-width: 1024px) {
    .header-search { width: 140px; }
    .header-search:focus { width: 260px; }
}

.global-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    min-width: 300px;
    max-width: 420px;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    z-index: 2000;
}
.global-search-results.open { display: block; }

.gs-section {
    border-bottom: 1px solid var(--border);
    padding: 6px 0;
}
.gs-section:last-child { border-bottom: none; }

.gs-section-title {
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 12px;
    background: var(--bg-page);
}

.gs-item {
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    flex-direction: column;
}
.gs-item:hover { background: var(--kaki-doux); }

.gs-item-name {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
}
.gs-item-meta {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.gs-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
}

.header-btn {
    background: none;
    border: none;
    color: var(--text-nav);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.2s;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn:hover, .header-btn:active {
    background: var(--bg-nav-active);
    color: var(--text-nav-active);
}

/* Toggle PC / Mobile */
.layout-toggle {
    display: flex;
    gap: 2px;
    background: rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 2px;
}
.layout-btn {
    background: none;
    border: none;
    color: var(--text-nav);
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 6px;
    transition: all 0.2s;
    opacity: 0.5;
    display: flex;
    align-items: center;
}
.layout-btn:hover { opacity: 0.8; }
.layout-btn-active {
    background: rgba(255,255,255,0.2);
    opacity: 1;
    color: var(--text-nav-active);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ══ NAV ITEMS (dans le header) ══ */

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.22rem;
    padding: 4px 8px;
    color: var(--text-nav);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 8px;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.nav-item .nav-icon {
    font-size: 0.92rem;
}

.nav-item .nav-label {
    /* visible par défaut sur PC */
}

.nav-item.active {
    color: var(--text-nav-active);
    background: var(--bg-nav-active);
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
}

.nav-item:active {
    background: var(--bg-nav-active);
}

/* Compression progressive pour les écrans intermédiaires. Import/Réglages
   ayant rejoint la zone actions en icône seule, la nav centrale ne comporte
   plus que 3 items. Typo déjà compacte par défaut (0.82rem). */
@media (max-width: 1300px) {
    .header-besoins { font-size: 0.72rem; gap: 5px; }
    .header-besoins .hb-item { padding: 2px 5px; }
    .header-besoins .hb-val { font-size: 0.86rem; }
    .header-besoins .hb-detail { font-size: 0.74rem; }
    .header-search { width: 100px !important; }
    .header-search:focus { width: 180px !important; }
}
@media (max-width: 1080px) {
    /* Les 3 items de la nav centrale deviennent icône seule, les blocs
       stats se resserrent un peu plus. */
    .header-nav .nav-item .nav-label { display: none; }
    .header-besoins { font-size: 0.68rem; gap: 4px; }
    .header-besoins .hb-val { font-size: 0.82rem; }
    .header-besoins .hb-detail { font-size: 0.7rem; }
}

/* ══ MAIN CONTENT ══ */

main {
    padding: 0;
    padding-bottom: 1rem;
    max-width: 100%;
    margin: 0 auto;
}

/* ══ PAGES SPA — une seule visible à la fois ══ */

.page {
    display: none !important;
}

.page.active {
    display: block !important;
    animation: fadeIn 0.2s ease;
}

/* Accueil en grille 2×2 quand actif (PC) */
#page-accueil.active {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0.5rem;
    padding: 0.5rem;
}

/* Pages non-accueil gardent du padding */
.page:not(#page-accueil) {
    padding: 1rem;
    max-width: 960px;
    margin: 0 auto;
}

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

/* ══ ACCUEIL MOBILE — 1 colonne empilée ══ */

@media (max-width: 768px) {
    #page-accueil.active {
        grid-template-columns: 1fr !important;
    }
}

body.mobile-layout #page-accueil.active {
    grid-template-columns: 1fr !important;
}

.mod {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: visible;
    box-shadow: var(--shadow);
    min-width: 0;
}

.mod-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0.35rem 0.5rem;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    border-radius: 8px 8px 0 0;
}

.mod-icon {
    font-size: 1rem;
}

.mod-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-nav-active);
    white-space: nowrap;
    margin-right: auto;
}

.mod-actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.mod-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: var(--text-nav);
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    transition: background 0.15s;
    white-space: nowrap;
    line-height: 1.3;
}

.mod-btn:hover { background: rgba(255,255,255,0.3); }

.mod-btn-accent {
    background: var(--accent);
    color: white;
    font-weight: 700;
}
.mod-btn-accent:hover { background: var(--accent-hover); }

.mod-date {
    font-size: 0.95rem;
    padding: 0.15rem 0.3rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    color: var(--text-nav-active);
    max-width: 130px;
}

.mod-total {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-nav-active);
    padding: 0.15rem 0.5rem;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
}

/* ── En-tête compact (commandes) — tout sur 1 ligne ── */
/* flex-wrap: wrap permet aux chips (.cmd-stats) de basculer sur une 2e ligne
   si trop d'éléments (plateaux + buffet + cocktail + petit-déj + CA + 🥖). */
.mod-head-compact {
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0.35rem 0.5rem;
}

.mod-head-compact .mod-name {
    margin-right: 4px;
    font-size: 0.95rem;
}

.mod-date-sm {
    font-size: 0.82rem;
    padding: 3px 6px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    background: rgba(255,255,255,0.1);
    color: var(--text-nav-active);
    max-width: 120px;
}

/* ── Jour de la semaine sous le sélecteur de date (module Commandes) ──
   Affiché sous le champ date en très petit pour ne pas alourdir le bandeau.
   Hauteur ajoutée : ~10px (font 0.62rem + line-height 1). */
.mod-date-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    line-height: 1;
}
.mod-dow {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.78);
    letter-spacing: 0.3px;
    line-height: 1;
    font-style: italic;
    margin-top: 1px;
    white-space: nowrap;
    min-height: 0.62rem;
}

.mod-icn {
    background: rgba(255,255,255,0.12);
    border: none;
    color: var(--text-nav);
    font-size: 0.88rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 5px;
    transition: background 0.15s;
    line-height: 1;
    flex-shrink: 0;
}
.mod-icn:hover { background: rgba(255,255,255,0.3); }

.mod-icn-accent {
    background: var(--accent);
    color: white;
    font-weight: 700;
}
.mod-icn-accent:hover { background: var(--accent-hover); }

.mod-toggle {
    display: flex;
    gap: 2px;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    padding: 2px;
}

.mod-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-nav);
    font-size: 0.9rem;
    padding: 0.15rem 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.mod-toggle-btn.active {
    background: rgba(255,255,255,0.25);
    color: var(--text-nav-active);
    font-weight: 600;
}

/* Bandeau stock : 2 toggles côte à côte (type prestation + frais/congelé) */
.mod-actions-stock {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
#stock-presta-toggle .mod-toggle-btn {
    font-size: 0.82rem;
    padding: 0.15rem 0.42rem;
}
@media (max-width: 720px) {
    #stock-presta-toggle .mod-toggle-btn { font-size: 0.76rem; padding: 0.15rem 0.32rem; }
}

/* ── Module body ── */

.mod-body {
    padding: 0.3rem 0.5rem;
    font-size: 0.95rem;
}

.mod-empty {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 0.5rem 0;
    margin: 0;
}

/* ── Stock : 2 lignes (EPD + mignardises) ── */

.mod-body-stock {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.3rem;
}

.stock-row {
    display: flex;
    gap: 0.3rem;
}

.stock-row-epd .stock-col { flex: 1; }
.stock-row-mig .stock-col { flex: 1; }

.stock-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg);
}

.stock-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0.4rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.stock-add-btn {
    background: var(--accent);
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}
.stock-add-btn:hover { background: var(--accent-hover); }

.stock-col-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.2rem;
    font-size: 0.92rem;
}

.stock-item {
    padding: 0.2rem 0.3rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.stock-item:last-child { border-bottom: none; }
.stock-item:hover { background: var(--bg-card); }

.stock-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.stock-item-qty {
    font-weight: 600;
    color: var(--accent);
    margin-left: 0.3rem;
    white-space: nowrap;
}

/* ── Lignes de lots enrichies ── */
.stock-lot-line {
    display: flex;
    align-items: center;
    padding: 3px 4px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
}
.stock-lot-line:last-child { border-bottom: none; }
.stock-lot-line:hover { background: var(--bg-card); }

.stock-lot-info {
    flex: 1;
    min-width: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.stock-lot-name {
    font-size: 0.92rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}

.stock-dlc {
    font-size: 0.62rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.stock-lot-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.stock-ctrl-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    transition: all 0.15s;
}
.stock-ctrl-plus { color: var(--success); }
.stock-ctrl-plus:hover { background: rgba(76,175,80,0.12); border-color: var(--success); }
.stock-ctrl-minus { color: var(--danger); }
.stock-ctrl-minus:hover { background: rgba(211,47,47,0.12); border-color: var(--danger); }

.stock-lot-qty {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--accent);
    min-width: 24px;
    text-align: center;
}

.stock-archive-link {
    text-align: center;
    padding: 4px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.stock-archive-link:hover {
    opacity: 1;
    color: var(--accent);
}

/* ══ RÉCUPÉRATION ══ */

.recup-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--border);
}
.recup-line:last-child { border-bottom: none; }
.recup-line input[type="checkbox"] { flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--primary); }
.recup-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.recup-client { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.recup-addr { font-size: 0.92rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recup-meta { font-size: 0.95rem; opacity: 0.6; }

/* Tournée — couleurs type_point */
.tournee-point-livraison { border-left: 4px solid var(--primary); }
.tournee-point-recuperation { border-left: 4px solid #E67E22; background: #FDF2E9; }
.tournee-point-les_deux { border-left: 4px solid #8E44AD; background: #F5EEF8; }

/* ══ RAYONS FILTER ══ */

.rayon-filter-bar {
    display: flex; flex-wrap: wrap; gap: 4px; padding: 0.3rem 0;
}
.rayon-filter-btn {
    padding: 3px 8px; font-size: 0.95rem; border: 1px solid var(--border);
    border-radius: 12px; background: var(--bg-card); cursor: pointer; transition: all 0.15s;
    white-space: nowrap;
}
.rayon-filter-btn:hover { border-color: var(--primary); }
.rayon-filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.rayon-edit-row {
    display: flex; align-items: center; gap: 6px; padding: 3px 0;
}
.rayon-edit-ordre {
    width: 24px; text-align: center; font-size: 0.92rem; color: var(--text-muted); font-weight: 600;
}

/* ══ FACTURATION ══ */

.fact-group { margin-bottom: 0.5rem; }
.fact-client-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.4rem 0.6rem; background: var(--bg); border-radius: 6px;
    font-weight: 700; font-size: 0.95rem;
}
.fact-client-name { color: var(--text); }
.fact-client-total { color: var(--primary); font-size: 0.95rem; }
.fact-cmd-line {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.3rem 0.6rem 0.3rem 1rem;
    border-bottom: 1px solid var(--border);
}
.fact-cmd-line:last-child { border-bottom: none; }
.fact-cmd-info { flex: 1; display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; font-size: 0.83rem; }
.fact-cmd-date { color: var(--text); font-weight: 500; }
.fact-cmd-type { color: var(--primary); font-weight: 600; }
.fact-cmd-couv { opacity: 0.7; }
.fact-cmd-montant { font-weight: 600; }
.fact-cmd-contact { color: var(--text-muted); font-size: 0.95rem; }
.fact-btn-ok {
    flex-shrink: 0; padding: 2px 8px; background: var(--success); color: white;
    border: none; border-radius: 4px; font-size: 0.65rem; font-weight: 600; cursor: pointer;
}
.fact-btn-ok:hover { opacity: 0.85; }
.fact-archive-link {
    display: block; text-align: center; padding: 0.6rem;
    font-size: 0.95rem; color: var(--text-muted); cursor: pointer;
    text-decoration: underline; opacity: 0.7;
}
.fact-archive-link:hover { opacity: 1; color: var(--accent); }

/* ══ CARTES ══ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
    transition: background 0.2s;
}

.card:hover {
    background: var(--bg-card-hover);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.card-title {
    font-weight: 700;
    color: var(--text-heading);
    font-size: 1rem;
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.card-body {
    font-size: 0.95rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

/* ══ BOUTONS ══ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
    min-width: 44px;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-on-accent);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
    background: var(--kaki);
    color: var(--text-on-accent);
}
.btn-secondary:hover { background: var(--kaki-medium); }

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}
.btn-outline:hover { background: var(--accent-light); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg-tag); color: var(--text-primary); }

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover { opacity: 0.9; }

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.95rem;
    min-height: 36px;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s;
}
.btn-icon:hover { background: var(--bg-tag); color: var(--text-primary); }

.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

/* Barre d'outils Recettes : 2 boutons icônes + recherche inline */
.recettes-toolbar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: nowrap;
}
.recettes-toolbar .btn.btn-icon {
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 1.3rem;
    line-height: 1;
    border-radius: 10px;
}
.recettes-toolbar .btn.btn-icon.btn-primary {
    color: #fff;
}
.recettes-toolbar .search-input {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    height: 44px;
}

@media (max-width: 640px) {
    .recettes-toolbar { gap: 0.4rem; }
    .recettes-toolbar .btn.btn-icon {
        min-width: 40px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    .recettes-toolbar .search-input {
        height: 40px;
        font-size: 0.95rem;
    }
}

/* ══ FORMULAIRES ══ */

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-heading);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-input);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 44px;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-input[type="number"] {
    -moz-appearance: textfield;
}
.form-input[type="number"]::-webkit-inner-spin-button,
.form-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* Sélection complète au clic sur champ numérique */
.form-input[type="number"]:focus {
    user-select: all;
    -webkit-user-select: all;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 44px;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* ══ SEARCH (recherche dynamique) ══ */

.search-wrapper {
    position: relative;
}

.search-input {
    padding-left: 2.5rem;
}

.search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    box-shadow: var(--shadow-lg);
    max-height: 250px;
    overflow-y: auto;
    z-index: 50;
    display: none;
}

.search-results.open { display: block; }

.search-result-item {
    padding: 0.65rem 0.9rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    transition: background 0.15s;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.search-result-item:hover, .search-result-item:active {
    background: var(--accent-light);
}

.search-result-item:last-child { border-bottom: none; }

/* ══ TAGS & BADGES ══ */

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    border-radius: 100px;
    font-size: 0.92rem;
    font-weight: 700;
    gap: 0.25rem;
}

.tag-statut-brouillon { background: rgba(158,158,158,0.15); color: var(--statut-brouillon); }
.tag-statut-confirmee { background: rgba(74,87,51,0.12); color: var(--statut-confirmee); }
.tag-statut-livree { background: rgba(124,179,66,0.12); color: var(--statut-livree); }
.tag-statut-a_recuperer { background: rgba(249,168,37,0.15); color: var(--statut-a-recuperer); }
.tag-statut-recuperee { background: rgba(232,132,90,0.15); color: var(--statut-recuperee); }
.tag-statut-facturee { background: rgba(211,47,47,0.12); color: var(--statut-facturee); }

/* ── Barre d'étapes statut commande ── */
.step-bar {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    margin: 12px 0 8px;
    padding: 8px 4px;
    background: var(--bg-card);
    border-radius: 12px;
    overflow-x: auto;
}
.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
    min-width: 52px;
    transition: transform 0.15s;
}
.step-item:hover { transform: scale(1.08); }
.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2.5px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    transition: all 0.2s;
}
.step-label {
    font-size: 0.62rem;
    margin-top: 3px;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
}
.step-line {
    width: 16px;
    height: 2.5px;
    background: var(--border);
    margin-top: 14px;
    flex-shrink: 0;
    border-radius: 2px;
}

/* Étape passée (validée) */
.step-done .step-circle {
    background: var(--kaki);
    border-color: var(--kaki);
    color: #fff;
}
.step-done .step-label { color: var(--kaki); font-weight: 600; }
.step-line-done { background: var(--kaki) !important; }

/* Étape active (courante) */
.step-active .step-circle {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(217,96,42,0.2);
}
.step-active .step-label { color: var(--accent); font-weight: 700; }

/* Étape future */
.step-future .step-circle {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text-secondary);
    opacity: 0.6;
}
.step-future .step-label { opacity: 0.5; }

/* Responsive : plus compact sur mobile */
@media (max-width: 480px) {
    .step-item { min-width: 42px; }
    .step-circle { width: 26px; height: 26px; font-size: 0.65rem; }
    .step-label { font-size: 0.55rem; }
    .step-line { width: 10px; margin-top: 12px; }
}

.tag-temporary {
    background: var(--warning-bg);
    color: var(--warning);
}

.tag-regime {
    background: var(--info-bg);
    color: var(--info);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 700;
    background: var(--accent);
    color: white;
}

/* ══ LIGNES COMMANDES ENRICHIES ══ */

.cmd-line {
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}
.cmd-line:last-child { border-bottom: none; }
.cmd-line:hover { background: var(--bg-card); }

.cmd-line-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cmd-line-client {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* Contrôle +/- couverts inline */
.cmd-line-inline-controls {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1px 3px;
}

.cmd-couverts-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: var(--bg-card);
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: background 0.15s;
}

.cmd-couverts-btn:hover {
    background: var(--accent);
    color: white;
}

.cmd-couverts-val {
    font-weight: 700;
    font-size: 0.92rem;
    min-width: 24px;
    text-align: center;
    color: var(--text-primary);
}

.cmd-line-type {
    font-size: 0.95rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.cmd-line-montant {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--accent);
    white-space: nowrap;
    margin-left: auto;
}

.cmd-line-cout {
    font-size: 0.92rem;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 0.7;
}

.cmd-line-actions {
    display: flex;
    gap: 2px;
}

.cmd-btn-sm {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    padding: 2px 5px;
    font-size: 0.92rem;
    transition: background 0.15s;
}
.cmd-btn-sm:hover {
    background: var(--bg-card);
}

.cmd-line-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    flex-wrap: wrap;
}

.cmd-line-menu {
    font-size: 0.92rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.cmd-line-regimes {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}
.cmd-line-regimes .tag-regime {
    font-size: 0.6rem;
    padding: 0 4px;
}

/* ══ CARTE COMMANDE COMPACTE — accueil ══ */

.cmd2 {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    border-left: 4px solid #ccc;
    cursor: pointer;
    transition: background 0.15s;
    padding: 3px 0;
}
.cmd2:last-child { border-bottom: none; }
.cmd2:hover { background: var(--bg-hover); }

.cmd2-info {
    flex: 0 0 28%;
    max-width: 28%;
    padding: 2px 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.cmd2-row1 {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cmd2-client {
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.cmd2-badge {
    font-size: 0.62rem;
    font-weight: 700;
    color: white;
    padding: 1px 5px;
    border-radius: 8px;
    flex-shrink: 0;
    line-height: 1.3;
}

.cmd2-row2 {
    font-size: 0.68rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.cmd2-menu {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1px 6px;
    border-left: 1px solid var(--border);
}

.cmd2-menu-line {
    font-size: 0.72rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cmd2-menu-line em {
    color: var(--text-secondary);
    font-size: 0.68rem;
}

.cmd2-menu-nom {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

/* Pastilles E / P / D */
.cmd2-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 0.55rem;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}
.cmd2-pill-ok {
    background: var(--kaki);
    color: #fff;
    border: 1.5px solid var(--kaki);
}
.cmd2-pill-empty {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px dashed var(--border);
}

/* Bouton ＋ pour ajouter une recette */
.cmd2-pick-add {
    background: none;
    border: 1px dashed var(--accent);
    border-radius: 4px;
    color: var(--accent);
    font-size: 0.62rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1.4;
    transition: background 0.15s;
}
.cmd2-pick-add:hover {
    background: var(--accent-light);
}

/* Bouton modifier discret */
.cmd2-pick-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.55rem;
    cursor: pointer;
    padding: 0 2px;
    margin-left: auto;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}
.cmd2-menu-line:hover .cmd2-pick-btn {
    opacity: 0.7;
}
.cmd2-pick-btn:hover {
    opacity: 1 !important;
}

/* Régimes spéciaux — ligne discrète */
.cmd2-regime-line {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6rem;
    margin-top: 1px;
    padding-top: 1px;
    border-top: 1px dotted var(--border);
}
.cmd2-regime-tag {
    background: rgba(25,118,210,0.1);
    color: #1976D2;
    padding: 0 4px;
    border-radius: 4px;
    font-weight: 600;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.58rem;
}
.cmd2-regime-menu {
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cmd2-pick-regime {
    border-color: #90CAF9;
    color: #1976D2;
    font-size: 0.56rem;
}

/* ── Quick pick modale résultats ── */

.qp-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}
.qp-item:hover { background: var(--bg-hover); }
.qp-item:last-child { border-bottom: none; }

.qp-item-nom {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.qp-item-cout {
    font-size: 0.92rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.qp-stock-qty {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--success);
    white-space: nowrap;
    padding: 1px 6px;
    background: rgba(74,87,51,0.08);
    border-radius: 4px;
}

.qp-tab-active {
    background: var(--primary) !important;
    color: white !important;
    font-weight: 600;
}

/* ── Quick pick : refonte P2.1 (nom en grand, toggle STOCK / ONE SHOT) ── */

/* Sous-titre (nom client dans modal) */
.qp-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    font-style: italic;
}

/* Toggle STOCK / ONE SHOT — segmented control */
.qp-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 14px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
}
.qp-toggle-btn {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.qp-toggle-btn:hover { background: var(--bg-hover); }
.qp-toggle-btn.qp-toggle-active {
    background: var(--primary);
    color: white;
}

/* Champ recherche agrandi */
.qp-search-big {
    font-size: 1.05rem !important;
    padding: 10px 14px !important;
}

/* Conteneur résultats — hauteur max doublée pour voir plus d'items */
.qp-results-big {
    margin-top: 12px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Item de la liste — plus d'espace, nom bien lisible */
.qp-item-big {
    padding: 14px 14px;
    flex-wrap: wrap;
}

/* Nom recette EN GRAND */
.qp-item-nom-xl {
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    line-height: 1.25;
    color: var(--text-primary);
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
}

/* Métadonnées (quantité, DLC, famille) groupées à droite */
.qp-item-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.qp-dlc {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* Bouton picker stock inline (cocktail/buffet/pdej) */
.btn-stock-pick {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: background 0.15s;
    flex-shrink: 0;
}
.btn-stock-pick:hover { background: var(--primary); }

/* ── Garde-fou stock insuffisant (P2.1) ── */
.qp-item-disabled {
    opacity: 0.45;
    cursor: not-allowed !important;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 6px,
        rgba(0,0,0,0.04) 6px,
        rgba(0,0,0,0.04) 12px
    );
}
.qp-item-disabled:hover { background: repeating-linear-gradient(
        45deg, transparent, transparent 6px,
        rgba(255,0,0,0.06) 6px, rgba(255,0,0,0.06) 12px); }
.qp-item-disabled .qp-item-nom-xl {
    text-decoration: line-through;
    color: var(--text-muted) !important;
}
.qp-stock-insuffisant {
    display: inline-block;
    padding: 2px 8px;
    background: #c62828;
    color: white;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

/* ── Wizard saisie menus (P2.1) ── */
.qp-wiz-progress {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-right: 8px;
    vertical-align: middle;
}
.qp-current {
    margin: 8px 0 10px 0;
    padding: 8px 10px;
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent, #d4a574);
    border-radius: 4px;
    font-size: 0.88rem;
    color: var(--text-primary);
}
.qp-wiz-actions {
    display: flex;
    gap: 8px;
    margin: 0 0 12px 0;
}
.qp-wiz-actions .btn {
    flex: 1;
    padding: 9px 12px;
    font-size: 0.88rem;
    font-weight: 600;
}
.qp-wiz-skip { background: var(--bg-secondary); color: var(--text-primary); }
.qp-wiz-skip:hover { background: var(--bg-hover); }
.qp-wiz-quit { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.qp-wiz-quit:hover { background: var(--bg-hover); color: var(--danger); }

/* ══ MODALES ══ */

#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-modal);
    z-index: 9990;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeInOverlay 0.2s ease;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-card);
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
    width: 100%;
    max-width: 720px;
    overflow-y: auto;
    animation: slideUp 0.25s ease;
    -webkit-overflow-scrolling: touch;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
}

.modal-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-heading);
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    background: none;
    border: none;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}
.modal-close:hover { background: var(--bg-tag); }

.modal-body {
    padding: 1rem 1.25rem;
}

/* ── Type de prestation : 4 icônes ── */

.type-picker {
    display: flex;
    gap: 0.5rem;
}

.type-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.3rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    background: var(--bg);
    transition: all 0.15s;
    text-align: center;
}

.type-option:hover {
    border-color: var(--kaki-medium);
    background: var(--bg-card-hover);
}

.type-option.selected {
    border-color: var(--accent);
    background: var(--accent-light);
}

.type-option .type-emoji {
    font-size: 1.5rem;
}

.type-option .type-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ── Formule : 3 pills EPD/EP/PD ── */

.formule-picker {
    display: flex;
    gap: 0.4rem;
}

.formule-pill {
    flex: 1;
    min-width: 0;
    padding: 0.4rem 0.35rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    background: var(--bg);
    text-align: center;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.15s;
}

.formule-pill:hover {
    border-color: var(--kaki-medium);
}

.formule-pill.selected {
    border-color: var(--kaki);
    background: var(--kaki);
    color: white;
}

.formule-picker {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Champ montant en mode calcul auto : visuellement indiqué (fond grisé) */
.form-input.input-auto {
    background: #f4f0e8;
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* ── Récurrence ── */

.recurrence-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.day-picker {
    display: flex;
    gap: 0.25rem;
}

.day-btn {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border);
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    background: var(--bg);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.day-btn:hover { border-color: var(--kaki-medium); }

.day-btn.selected {
    background: var(--kaki);
    color: white;
    border-color: var(--kaki);
}

/* ── Menus spéciaux ── */

.special-menus-list {
    margin-top: 0.4rem;
}

.special-menu-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}

.special-menu-item:last-child { border-bottom: none; }

.special-menu-item .sm-qty {
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.special-menu-item .sm-tags {
    display: flex;
    gap: 0.2rem;
    flex-wrap: wrap;
    flex: 1;
}

.sm-tag {
    padding: 0.1rem 0.4rem;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 4px;
    font-size: 0.92rem;
    font-weight: 600;
}

.sm-recette {
    padding: 0.1rem 0.4rem;
    background: var(--success-light, #e8f5e9);
    color: var(--success, #4a5733);
    border-radius: 4px;
    font-size: 0.92rem;
    font-weight: 500;
    font-style: italic;
}

.regime-menu-slots {
    border-top: 1px solid var(--border-light, #e0e0e0);
    padding-top: 4px;
    margin-top: 2px;
}
.regime-slot {
    padding: 2px 0;
}

/* Detail modal — menu lines */
.detail-menu-lines {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.detail-line {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: 6px;
    background: var(--cream-bg, #f9f7f2);
    font-size: 0.92rem;
}
.detail-line-empty {
    background: transparent;
    border: 1px dashed var(--border-light, #ddd);
}
.detail-line-cat {
    min-width: 70px;
    font-size: 0.95rem;
    font-weight: 600;
}
.detail-line-nom {
    flex: 1;
    font-weight: 500;
}
.detail-line-qty {
    font-size: 0.92rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.detail-line-btn {
    padding: 1px 4px !important;
    font-size: 0.95rem !important;
    min-width: auto;
}
.detail-regime-card {
    padding: 8px !important;
    margin-bottom: 6px;
}

/* Breakdown couverts classiques / spéciaux */
.couverts-breakdown {
    margin: -0.3rem 0 0.5rem;
}

.breakdown-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
    padding: 0.3rem 0.5rem;
    background: var(--bg-card);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.breakdown-classic {
    color: var(--text-primary);
    font-weight: 600;
}

.breakdown-special {
    color: var(--accent);
    font-weight: 600;
}

.breakdown-total {
    color: var(--text-secondary);
    font-weight: 500;
}

.breakdown-sep {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-add-special {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-add-special:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Grille restrictions allergènes/spécificités */
.restrictions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
    margin-top: 4px;
}
.restriction-item {
    font-size: 0.92rem;
    margin-bottom: 2px !important;
}

/* ══ FORMULAIRES SPÉCIFIQUES TYPE ══ */

.type-specific-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    margin: 8px 0;
}

.cocktail-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cocktail-col {
    padding: 8px;
    background: var(--bg-main);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.cocktail-lignes {
    margin-top: 6px;
}

.cocktail-ligne-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    position: relative;
}

.cocktail-ligne-num {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 18px;
}

.cocktail-ligne-item .form-input {
    font-size: 0.9rem;
    padding: 4px 8px;
}

.cocktail-ligne-item .search-results {
    top: 100%;
    left: 24px;
    right: 0;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
}
.options-grid .form-checkbox {
    font-size: 0.92rem;
    margin-bottom: 2px;
}

/* ── Buffet spécifique ── */
.buffet-menu-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.buffet-ligne {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.buffet-ligne .form-input {
    flex: 1;
    font-size: 0.9rem;
    padding: 4px 8px;
}

.buffet-ligne-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 120px;
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
}

/* ══ TOASTS ══ */

.toast-container {
    position: fixed;
    top: 64px;
    right: 1rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    max-width: 340px;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    to { opacity: 0; transform: translateX(100px); }
}

.toast-success { background: var(--success-bg); color: var(--success); border-left: 4px solid var(--success); }
.toast-error { background: var(--danger-bg); color: var(--danger); border-left: 4px solid var(--danger); }
.toast-warning { background: var(--warning-bg); color: var(--warning); border-left: 4px solid var(--warning); }
.toast-info { background: var(--info-bg); color: var(--info); border-left: 4px solid var(--info); }

/* ══ TABLEAUX ══ */

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th {
    background: var(--kaki-doux);
    color: var(--text-heading);
    font-weight: 600;
    text-align: left;
    padding: 0.65rem 0.75rem;
    white-space: nowrap;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-card-hover); }

/* ══ TOGGLE (frais/congelé etc.) ══ */

.toggle-group {
    display: flex;
    background: var(--bg-tag);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 1rem;
}

.toggle-btn {
    flex: 1;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
}

.toggle-btn.active {
    background: var(--bg-card);
    color: var(--text-heading);
    box-shadow: var(--shadow);
}

/* ══ ONGLETS (stock, recettes) ══ */

.tabs {
    display: flex;
    overflow-x: auto;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}

.tab {
    padding: 0.65rem 1rem;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    min-height: 44px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab:hover { color: var(--text-primary); }

/* ══ BARRES DE PROGRESSION (Pilotage) ══ */

.progress-bar {
    height: 12px;
    background: var(--bg-tag);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 0.5s ease;
}

.progress-realise { background: var(--success); }
.progress-previsionnel { background: var(--info); opacity: 0.5; }

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ══ SÉLECTEUR DE DATE ══ */

.date-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.date-nav .date-label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-heading);
    min-width: 160px;
    text-align: center;
}

.date-nav .btn-icon { font-size: 1.3rem; }

/* ══ SECTION TITLES ══ */

.section-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-heading);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-subtitle {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

/* ══ STAT CARDS ══ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
}

.stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-heading);
}

.stat-label {
    font-size: 0.92rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.15rem;
}

/* ══ EMPTY STATE ══ */

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.empty-state .empty-text {
    font-size: 0.9rem;
    max-width: 280px;
    margin: 0 auto;
}

/* ══ LOADING ══ */

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* ══ LOGIN ══ */

.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-primary);
}

.login-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.login-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.login-title {
    font-family: 'Satisfy', cursive;
    font-size: 1.8rem;
    color: var(--text-heading);
    margin-bottom: 0.25rem;
}

/* Logo-texte OBOOLO sur page login (image PNG paysage) */
.login-brand {
    display: block;
    width: 100%;
    max-width: 280px;
    height: auto;
    margin: 0 auto 0.75rem;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.login-card .form-group { text-align: left; }

.login-card .btn-primary {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.8rem;
    font-size: 1rem;
}

/* ══ PILOTAGE — Navigation & Grilles ══ */

/* ── Bandeau pilotage kaki ── */
.pilot-bandeau {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-nav);
    border-radius: 12px;
    padding: 8px 14px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.pilot-bandeau-title {
    color: var(--text-nav-active);
    font-weight: 700;
    font-size: 1rem;
    margin-right: 6px;
    white-space: nowrap;
}
.pilot-bandeau-toggle {
    display: flex;
    gap: 2px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 2px;
}
.pilot-vue-btn {
    padding: 4px 10px; border-radius: 6px; border: none; cursor: pointer;
    font-size: 0.75rem; font-weight: 400;
    background: transparent; color: rgba(255,255,255,0.55);
    transition: all 0.2s;
}
.pilot-vue-btn.active {
    background: rgba(255,255,255,0.22);
    color: #fff; font-weight: 700;
}
.pilot-vue-btn:hover:not(.active) { color: rgba(255,255,255,0.8); }

.pilot-bandeau-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.pb-btn {
    background: rgba(255,255,255,0.1);
    border: none; color: #fff; cursor: pointer;
    border-radius: 5px; padding: 3px 8px;
    font-size: 0.75rem; transition: background 0.15s;
}
.pb-btn:hover { background: rgba(255,255,255,0.25); }
.pb-label {
    color: #fff; font-weight: 700; font-size: 0.88rem;
    min-width: 40px; text-align: center;
}
.pb-date {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff; border-radius: 6px;
    padding: 2px 8px; font-size: 0.75rem;
    max-width: 130px;
}
.pb-select {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff; border-radius: 6px;
    padding: 2px 6px; font-size: 0.75rem;
}
.pb-select option { color: #333; }

.pilot-semaine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
    gap: 3px;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.pilot-w {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    font-size: 0.92rem;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.pilot-w:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.pilot-w.current {
    border-color: var(--info);
    color: var(--info);
    font-weight: 600;
}

.pilot-w.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    font-weight: 700;
}

/* Ventilation par catégorie */
.pilot-ventil {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pilot-ventil-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}

.pilot-ventil-item:last-child { border-bottom: none; }

.pilot-ventil-cat {
    color: var(--text-primary);
}

.pilot-ventil-val {
    font-weight: 700;
    color: var(--accent);
}

/* Grille données financières */
/* ── Module Analyse Financière ── */
.fin-tabs { display: flex; gap: 3px; margin-bottom: 10px; flex-wrap: wrap; }
.fin-tab {
    padding: 3px 10px; border-radius: 16px; border: none; cursor: pointer;
    font-size: 0.72rem; font-weight: 500; transition: all 0.2s;
    background: rgba(74,87,51,0.08); color: var(--kaki);
}
.fin-tab-active {
    background: var(--kaki); color: #fff; font-weight: 700;
}
.fin-empty { text-align: center; padding: 20px 0; }

.fin-kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.fin-kpi { text-align: center; padding: 8px; border-radius: 8px; }
.fin-kpi-val { font-weight: 700; font-size: 1.05rem; }
.fin-kpi-label { font-size: 0.68rem; color: var(--text-secondary); }
.fin-kpi-sub { font-size: 0.6rem; margin-top: 1px; }
.fin-kpi-n1 { font-size: 0.6rem; color: var(--kaki-medium); margin-top: 2px; }
.fin-kpi-alert { font-size: 0.58rem; color: var(--warning); margin-top: 1px; }

.fin-postes-list { background: var(--bg-page); border-radius: 8px; padding: 8px; }
.fin-poste-row {
    display: flex; align-items: center; gap: 5px;
    padding: 2.5px 0; border-bottom: 1px solid var(--border);
    font-size: 0.72rem;
}
.fin-poste-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.fin-poste-label { flex: 1; }
.fin-poste-val { font-weight: 700; min-width: 55px; text-align: right; }
.fin-poste-pct { font-size: 0.62rem; color: var(--text-secondary); min-width: 30px; text-align: right; }
.fin-poste-n1 { font-size: 0.6rem; min-width: 45px; text-align: right; }
.fin-poste-total {
    display: flex; align-items: center; gap: 5px;
    padding: 4px 0 0; border-top: 2px solid var(--kaki);
    margin-top: 3px; font-size: 0.78rem;
}

/* Ventilation barres */
.fin-bar-item { margin-bottom: 5px; }
.fin-bar-header { display: flex; justify-content: space-between; font-size: 0.7rem; margin-bottom: 1px; }
.fin-bar-track { position: relative; height: 12px; background: var(--bg-page); border-radius: 4px; overflow: hidden; }
.fin-bar-fill { height: 100%; border-radius: 4px; transition: width 0.4s; }
.fin-bar-n1 { position: absolute; top: 0; width: 2px; height: 100%; background: rgba(0,0,0,0.3); }

.fin-100e { margin-top: 12px; padding: 10px; background: var(--bg-page); border-radius: 8px; text-align: center; }
.fin-100e-pills { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.fin-pill {
    padding: 3px 7px; border-radius: 6px; font-size: 0.65rem;
    font-weight: 700; border: 1.5px solid;
}

/* Évolution chart */
.fin-evo-chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding: 0 2px; }
.fin-evo-col { flex: 1; display: flex; flex-direction: column; align-items: center; }
.fin-evo-bars { display: flex; gap: 2px; align-items: flex-end; height: 95px; }
.fin-evo-bar { width: 14px; border-radius: 3px 3px 0 0; transition: height 0.3s; }
.fin-evo-label { font-size: 0.55rem; color: var(--text-secondary); margin-top: 2px; }

/* Alertes */
.fin-alert { margin-bottom: 6px; padding: 8px; border-radius: 8px; border-left: 4px solid; }
.fin-alert-ok { background: var(--success-bg); border-color: var(--success); }
.fin-alert-warn { background: var(--warning-bg); border-color: var(--warning); }

.fin-pointmort { margin-top: 8px; padding: 10px; background: var(--bg-page); border-radius: 8px; }

@media (max-width: 600px) {
    .fin-kpi-row { grid-template-columns: 1fr; }
    .fin-kpi-val { font-size: 0.9rem; }
}

/* ══ MENU DE LA SEMAINE ══ */

.ms-selection {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ms-cat-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem;
}

.ms-cat-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.ms-cat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.ms-slot {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 0.6rem;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.15s ease;
}

.ms-slot-empty {
    cursor: pointer;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ms-slot-empty:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}

.ms-slot-filled {
    border-style: solid;
    border-color: var(--accent);
    background: var(--bg-main);
}

.ms-slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ms-slot-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    font-weight: 600;
}

.ms-slot-recipe {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-heading);
}

.ms-slot-info {
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.ms-slot-placeholder {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Suivi de production */
.ms-suivi-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
}

.ms-suivi-row:last-child { border-bottom: none; }

.ms-suivi-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.ms-suivi-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.ms-status-done {
    font-size: 0.92rem;
    color: var(--success);
    font-weight: 600;
}

.ms-status-todo {
    font-size: 0.92rem;
    color: var(--warning);
    font-weight: 600;
}

.tag-success {
    background: var(--success);
    color: white;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
}

.tag-warning {
    background: var(--warning);
    color: white;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
}

/* Résultats de recherche recettes */
.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.1s;
}

.search-result-item:hover {
    background: var(--bg-hover);
}

.search-result-item:last-child { border-bottom: none; }

@media (max-width: 480px) {
    .ms-cat-row {
        grid-template-columns: 1fr;
    }
}

/* ══ TOURNÉES — Points réordonnables ══ */

.tournee-point {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px;
    margin-bottom: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: background 0.15s;
}

.tournee-point:hover {
    background: var(--bg-hover);
}

.tournee-handle {
    color: var(--text-secondary);
    cursor: grab;
    font-size: 1rem;
    user-select: none;
}

.tournee-ordre {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 0.92rem;
    font-weight: 700;
    flex-shrink: 0;
}

.tournee-point-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.tournee-point-actions {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tournee-point-actions .btn-icon {
    font-size: 0.9rem;
    padding: 2px 6px;
    cursor: pointer;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-main);
    color: var(--text-secondary);
}

.tournee-point-actions .btn-icon:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.tournee-handle { cursor: grab; }
.tournee-point-dragging {
    opacity: 0.4;
    border-style: dashed;
}
.tournee-point-dropover {
    background: #E8F5E9 !important;
    border-color: var(--success, #2E7D32) !important;
    border-style: dashed;
}

.tournee-maps-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}
.tournee-maps-open {
    flex: 1 1 auto;
    text-align: center;
    min-width: 170px;
}
.tournee-maps-hint {
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: #FFF8E1;
    border-left: 3px solid #F9A825;
    padding: 6px 10px;
    border-radius: 4px;
    margin-top: 8px;
    line-height: 1.35;
}

/* ══ PRINT ══ */

@media print {
    .header, .header-nav, .btn-group, .toast-container { display: none !important; }
    main { padding: 0; max-width: 100%; }
    .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
    body { background: white; color: black; }
}

/* ══ MODE MOBILE (classe .mobile-layout sur body) ══ */
/* Nav reste TOUJOURS dans le header — juste les labels disparaissent */

body.mobile-layout .nav-item .nav-label {
    display: none;
}

body.mobile-layout .nav-item {
    padding: 4px 8px;
}

body.mobile-layout .nav-item .nav-icon {
    font-size: 1.15rem;
}

body.mobile-layout .header-title {
    flex: 1;
}

/* ══ DESKTOP — modal centré ══ */

@media (min-width: 768px) {
    .modal {
        border-radius: 16px;
        margin: auto;
    }

    #modal-overlay {
        align-items: center;
    }
}

/* ══ PETIT ÉCRAN — nav compacte (icônes seules) ══ */

@media (max-width: 768px) {
    .nav-item .nav-label {
        display: none;
    }

    .nav-item {
        padding: 4px 8px;
    }

    .nav-item .nav-icon {
        font-size: 1.15rem;
    }

    .header-title {
        flex: 1;
    }
}

/* ══ MODULE RECETTES ══ */

.recette-section {
    margin-bottom: 1rem;
}

.recette-section-head {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-heading);
    padding: 6px 10px;
    background: var(--accent-light);
    border-radius: 8px;
    margin-bottom: 8px;
}
/* ── Sous-catégories tabs (icônes) ── */
.sc-tabs-bar {
    display: flex;
    overflow-x: auto;
    gap: 4px;
    padding: 6px 0;
    margin-bottom: 0.75rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.sc-tabs-bar::-webkit-scrollbar { display: none; }

.sc-tab {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 5px 10px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: var(--bg-card);
    font-family: inherit;
    font-size: 0.82rem;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
}
.sc-tab:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--kaki-doux);
}
.sc-tab.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    font-weight: 600;
}
.sc-tab-label { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.sc-tab-count {
    font-size: 0.68rem;
    background: rgba(0,0,0,0.1);
    padding: 0 4px;
    border-radius: 8px;
    min-width: 14px;
    text-align: center;
}
.sc-tab.active .sc-tab-count { background: rgba(255,255,255,0.3); }
.sc-tab-aclasser { border-style: dashed; }
.sc-tab-add {
    border-style: dashed;
    border-color: var(--accent);
    color: var(--accent);
    font-size: 0.9rem;
    padding: 5px 8px;
}
.sc-tab-add:hover { background: var(--kaki-doux); }
.sc-tab-dragover {
    background: var(--kaki-doux) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px var(--accent);
    transform: scale(1.05);
    transition: all 0.15s ease;
}
.tab-dragover {
    background: var(--kaki-doux) !important;
    border-bottom: 3px solid var(--accent) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transform: scale(1.05);
    transition: all 0.15s ease;
}

/* Wizard multi-recettes */
.multi-dot {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%;
    font-size: 0.72rem; font-weight: 600;
    background: var(--border); color: var(--text-secondary);
    cursor: pointer; transition: all 0.2s;
}
.multi-dot:hover { background: var(--kaki-doux); }
.multi-dot-active {
    background: var(--accent); color: white;
    transform: scale(1.15); box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.multi-dot-done { background: var(--success); color: white; }

/* Dropdown recettes stock */
.stock-recette-dropdown {
    max-height: 260px !important;
    overflow-y: auto;
}
.stock-dd-item {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.stock-dd-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-dd-cost { font-size: 0.72rem; opacity: 0.5; white-space: nowrap; }
.stock-dd-oneshot { font-style: italic; opacity: 0.7; }

/* Menu contextuel sous-catégorie */
.sc-ctx-menu {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg, 0 4px 16px rgba(0,0,0,0.15));
    z-index: 1000;
    overflow: hidden;
    min-width: 140px;
}
.sc-ctx-menu button {
    display: block;
    width: 100%;
    padding: 8px 14px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.88rem;
    text-align: left;
    cursor: pointer;
    color: var(--text-primary);
}
.sc-ctx-menu button:hover { background: var(--kaki-doux); }

/* Menu contextuel clic droit sur carte commande — changement de statut */
.cmd-ctx-menu {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.22);
    z-index: 2000;
    overflow: hidden;
    min-width: 220px;
    padding: 6px 0;
    animation: cmdCtxFadeIn 0.12s ease-out;
}
@keyframes cmdCtxFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}
.cmd-ctx-menu .cmd-ctx-title {
    padding: 6px 14px 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary, #888);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.cmd-ctx-menu .cmd-ctx-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.92rem;
    text-align: left;
    cursor: pointer;
    color: var(--text-primary);
    transition: background 0.12s;
}
.cmd-ctx-menu .cmd-ctx-item:hover { background: var(--kaki-doux); }
.cmd-ctx-menu .cmd-ctx-item.is-current {
    background: var(--kaki-doux);
    font-weight: 600;
}

.recette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    min-height: 50px;
    padding: 6px;
    border: 2px dashed transparent;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.recette-grid.dragover,
.recette-grid:has(.recette-drop-zone) {
    border-color: var(--border);
}

.recette-drop-zone {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 12px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    opacity: 0.6;
}

.recette-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: var(--shadow);
}

.recette-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.recette-card:active {
    transform: scale(0.97);
}

.recette-card[draggable="true"] {
    cursor: grab;
}

.recette-card[draggable="true"]:active {
    cursor: grabbing;
}

.recette-card-img {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--kaki-doux) 0%, var(--bg-primary) 100%);
    overflow: hidden;
    position: relative;
}

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

.recette-card-body {
    padding: 8px 10px;
}

.recette-card-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recette-card-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.recette-card-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--kaki);
    color: white;
    font-size: 0.58rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Badge production discret (catalogue) */
.recette-prod-badge {
    position: absolute;
    bottom: 2px;
    left: 2px;
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.85);
    padding: 0 3px;
    border-radius: 3px;
    opacity: 0.7;
    cursor: default;
}

.recette-prod-badge.recette-prod-new {
    opacity: 0.9;
    font-size: 0.65rem;
}

/* Badge production discret (stock) */
.stock-prod-hint {
    font-size: 0.6rem;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-left: 3px;
    font-weight: 600;
}

.stock-prod-hint.stock-prod-new {
    opacity: 0.85;
    font-size: 0.65rem;
}

/* Ligne ingrédient dans le détail */
.recette-ing-line {
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}

.recette-ing-line:last-child {
    border-bottom: none;
}
.recette-ing-sr {
    font-weight: 600;
    color: var(--kaki-fonce);
    background: var(--cream-bg);
    padding: 4px 6px;
    border-radius: 4px;
    margin-top: 2px;
}
.recette-ing-sub {
    padding-left: 20px !important;
    font-size: 0.85rem !important;
    font-weight: 400;
    color: var(--text-secondary);
    border-bottom: 1px dashed var(--border) !important;
}

.recette-ing-qty {
    font-weight: 600;
    white-space: nowrap;
    color: var(--kaki);
}

/* Section subtitle */
.section-subtitle {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 4px;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--border);
}

/* Cream background helper */
.cream-bg { background: var(--bg-primary); }

/* ══ MODULE LISTE DE COURSES ══ */

/* Bandeau besoins hebdo */
.besoins-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 1rem;
}

.besoins-bloc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: var(--shadow);
}

.besoins-titre {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.besoins-ligne {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    font-size: 0.95rem;
}

.besoins-cat {
    font-weight: 600;
    min-width: 60px;
    color: var(--text-primary);
}

.besoins-nb {
    color: var(--text-secondary);
    min-width: 50px;
}

.besoins-ok {
    color: var(--text-primary);
    font-size: 0.92rem;
}

.besoins-manque {
    color: var(--danger);
    font-weight: 600;
    font-size: 0.92rem;
}

/* Liste consolidée par rayons */
.ldc-total-bar {
    background: var(--kaki);
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.92rem;
    margin-bottom: 10px;
    text-align: center;
}

.ldc-rayon {
    margin-bottom: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.ldc-rayon-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--accent-light);
    padding: 8px 12px;
}

.ldc-rayon-nom {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-heading);
}

.ldc-rayon-total {
    font-size: 0.76rem;
    color: var(--accent);
    font-weight: 600;
}

.ldc-produit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    background: var(--bg-card);
}

.ldc-produit:last-child {
    border-bottom: none;
}

.ldc-produit-info {
    flex: 1;
    min-width: 0;
}

.ldc-produit-nom {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ldc-produit-besoin {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.ldc-produit-achat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    white-space: nowrap;
}

.ldc-produit-achat-txt {
    font-weight: 600;
    color: var(--kaki);
    font-size: 0.92rem;
}

.ldc-produit-cout {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.ldc-produit-del {
    opacity: 0.3;
    font-size: 0.9rem;
    padding: 2px 4px;
}

.ldc-produit:hover .ldc-produit-del {
    opacity: 0.8;
}

@media (max-width: 480px) {
    .besoins-row {
        grid-template-columns: 1fr;
    }
    .ldc-produit {
        flex-wrap: wrap;
        padding: 8px 10px;
    }
    .ldc-produit-achat {
        align-items: flex-start;
    }
}

/* Search results dropdown for import */
.search-results {
    position: relative;
    z-index: 10;
}

.search-result-item {
    padding: 4px 8px;
    font-size: 0.95rem;
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
}

.search-result-item:first-child {
    border-top: 1px solid var(--border);
}

.search-result-item:hover {
    background: var(--accent-light);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.empty-text {
    font-size: 0.95rem;
}

/* Tag chip */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.92rem;
    font-weight: 500;
    background: var(--bg-tag);
    color: var(--text-secondary);
}

/* Button icon (small inline) */
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 1rem;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.btn-icon:hover {
    opacity: 1;
}

/* Responsive recette grid */
@media (max-width: 480px) {
    .recette-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
    .recette-card-img {
        height: 55px;
    }
    .recette-card-body {
        padding: 6px 8px;
    }
    .recette-card-name {
        font-size: 0.76rem;
    }
}

/* ══ UTILITY CLASSES ══ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.fw-bold { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-1 { gap: 0.5rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.hidden { display: none !important; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ══ RESPONSIVE MOBILE — FORMAT PORTRAIT ══ */

@media (max-width: 768px) {

    /* ── Tous les éléments respectent la largeur écran ── */
    *, *::before, *::after {
        max-width: 100%;
        box-sizing: border-box;
    }

    body {
        overflow-x: hidden;
    }

    /* ── Accueil : 1 colonne, modules pleine largeur ── */
    #page-accueil.active {
        grid-template-columns: 1fr !important;
        padding: 0.3rem !important;
        gap: 0.4rem !important;
    }

    /* ── Modules : pas de débordement ── */
    .mod {
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    /* ── En-tête module : compact, boutons empilés ── */
    .mod-head {
        flex-wrap: wrap;
        padding: 0.3rem 0.4rem;
        gap: 0.25rem;
    }

    .mod-name {
        font-size: 0.9rem;
        width: 100%;
    }

    .mod-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 4px;
    }

    .mod-btn {
        min-height: 36px;
        padding: 6px 8px;
        font-size: 0.9rem;
    }

    /* ── Stock : lignes empilées en grille 2×2 ── */
    .stock-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 0.3rem;
    }
    .stock-row-epd { grid-template-columns: 1fr 1fr 1fr; }

    .stock-col {
        min-width: 0;
    }

    /* ── Commandes : date picker plus petit ── */
    .mod-date {
        max-width: 130px;
        font-size: 0.95rem;
    }

    /* ── Modals pleine largeur ── */
    .modal {
        max-width: 100vw !important;
        width: 100vw !important;
        min-width: 0;
        border-radius: 12px 12px 0 0;
    }

    /* ── Pilotage ── */
    .pilot-semaine-grid {
        grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pilot-finance-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    /* ── Tabs compacts ── */
    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .tabs .tab {
        padding: 8px 10px;
        font-size: 0.92rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* ── Cards réduites ── */
    .card {
        margin-bottom: 8px;
        padding: 10px;
    }

    /* ── Tableaux : scroll horizontal ── */
    .table-wrap, table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* ── Toolbar / btn-group wrap ── */
    .toolbar, .btn-group {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* ── Tournées compact ── */
    .tournee-point {
        padding: 6px;
        gap: 0.3rem;
    }

    /* ── Menu semaine ── */
    .ms-cat-row {
        grid-template-columns: 1fr;
    }

    /* ── Formulaires empilés ── */
    .form-row {
        flex-direction: column;
        gap: 6px;
    }

    .form-row input,
    .form-row select,
    .form-row textarea {
        width: 100%;
    }

    /* ── Header mobile : scroll horizontal pour ne rien perdre ── */
    .header {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;      /* Firefox : masque la scrollbar */
    }
    .header::-webkit-scrollbar {
        display: none;              /* WebKit : masque la scrollbar */
    }
    /* Aucun enfant ne se comprime : force le scroll si dépassement */
    .header > * {
        flex-shrink: 0;
    }
    .header .header-nav {
        flex: 0 0 auto;
    }

    /* ── Pages non-accueil ── */
    .page:not(#page-accueil) {
        padding: 0.5rem;
    }
}

/* ══ PILOTAGE — FULL WIDTH DESKTOP ══ */

@media (min-width: 1024px) {
    #page-pilotage,
    #page-production {
        max-width: 100% !important;
        padding: 1rem 2rem !important;
    }
}

/* Pilotage grid layout */
.pilotage-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .pilotage-grid {
        grid-template-columns: 1fr 1fr;
    }
    .pilotage-grid .pg-full {
        grid-column: 1 / -1;
    }
    /* Module finance : colonne droite, toute la hauteur */
    .pilotage-grid .pg-finance {
        grid-column: 2;
        grid-row: 1 / span 6;
    }
}

/* Records card */
.records-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
}

.record-item {
    background: var(--bg-page);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
}

.record-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
}

.record-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.record-detail {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Proportional client bars */
.client-bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 5px 0;
    border-bottom: 1px solid var(--border);
}
.client-bar-clickable {
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s ease;
}
.client-bar-clickable:hover {
    background: var(--bg-page);
}

/* ══════════════════════════════════════════════════════════════
   VUE PLEIN ECRAN — Recette (ecran cuisine, lecture a distance)
   Bandeau une ligne compact + auto-fit via variable --fs-scale
   ══════════════════════════════════════════════════════════════ */

.modal.modal-fullscreen {
    max-width: 100vw;
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    margin: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.2s ease;
}

.fs-recette-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    /* --fs-scale est ajustee dynamiquement par JS (fitRecetteFullscreen) */
    --fs-scale: 1;
}

/* Bandeau kaki sur UNE SEULE ligne : titre + separateur + portions, bouton fermer a droite */
.fs-recette-head {
    position: relative;
    background: var(--kaki);
    color: #fff;
    padding: 0.45rem 3.6rem 0.45rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    line-height: 1.2;
}

.fs-recette-head-inner {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 1.1rem;
    flex-wrap: wrap;
}

.fs-recette-close-top {
    position: absolute;
    top: 50%;
    right: 0.8rem;
    transform: translateY(-50%);
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transition: background 0.15s ease, transform 0.1s ease;
}

.fs-recette-close-top:hover {
    background: var(--accent-hover, #E8845A);
    transform: translateY(-50%) scale(1.05);
}

.fs-recette-close-top:active {
    transform: translateY(-50%) scale(0.96);
}

.fs-recette-title {
    font-size: 1.55rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
    letter-spacing: 0.01em;
}

.fs-recette-portions {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.92);
    font-weight: 500;
    padding-left: 1.1rem;
    border-left: 2px solid rgba(255,255,255,0.4);
    white-space: nowrap;
}

/* Corps : pas de scroll — la typo est scaled pour tout faire tenir */
.fs-recette-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 0.6rem 0.8rem;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
}

.fs-ing-list {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: calc(0.4rem * var(--fs-scale, 1));
}

.fs-ing-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: calc(0.6rem * var(--fs-scale, 1)) calc(1rem * var(--fs-scale, 1));
    background: var(--bg-card);
    border-radius: 10px;
    font-size: calc(1.75rem * var(--fs-scale, 1));
    line-height: 1.2;
    border-left: 5px solid var(--kaki-doux);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.fs-ing-row.fs-ing-sr {
    background: var(--accent-light);
    border-left-color: var(--accent);
    font-weight: 600;
    margin-top: calc(0.4rem * var(--fs-scale, 1));
}

.fs-ing-row.fs-ing-sub {
    background: transparent;
    box-shadow: none;
    border-left: none;
    padding: calc(0.25rem * var(--fs-scale, 1)) calc(1rem * var(--fs-scale, 1)) calc(0.25rem * var(--fs-scale, 1)) calc(2.6rem * var(--fs-scale, 1));
    font-size: calc(1.4rem * var(--fs-scale, 1));
    color: var(--text-secondary);
}

.fs-ing-nom {
    flex: 1;
    padding-right: 1rem;
    word-break: break-word;
}

.fs-ing-qty {
    font-weight: 700;
    font-size: calc(1.85rem * var(--fs-scale, 1));
    color: var(--accent);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.fs-ing-row.fs-ing-sub .fs-ing-qty {
    font-size: calc(1.5rem * var(--fs-scale, 1));
    color: var(--text-primary);
    font-weight: 600;
}

.fs-ing-empty {
    text-align: center;
    font-size: 1.3rem;
    color: var(--text-secondary);
    padding: 3rem 1rem;
}

/* Ecrans etroits (tablette portrait, mobile) : bandeau encore plus compact */
@media (max-width: 640px) {
    .fs-recette-head { padding: 0.3rem 3rem 0.3rem 0.6rem; }
    .fs-recette-head-inner { gap: 0.6rem; }
    .fs-recette-title { font-size: 1.1rem; }
    .fs-recette-portions { font-size: 0.85rem; padding-left: 0.6rem; }
    .fs-recette-body { padding: 0.4rem 0.4rem; }
    .fs-ing-row { border-radius: 7px; border-left-width: 4px; }
    .fs-recette-close-top { width: 34px; height: 34px; font-size: 1.05rem; right: 0.5rem; }
}

/* ══════════════════════════════════════════════════════════════
   MODAL FICHE RECETTE — header kaki / titre orange
   Footer : bandeau kaki avec icones carrees
   ══════════════════════════════════════════════════════════════ */

.modal-header.recette-modal-header {
    background: var(--kaki);
    border-bottom: 2px solid var(--accent);
    padding: 0.7rem 1.1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.recette-modal-title {
    color: var(--accent);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.modal-close.recette-modal-close {
    color: #fff;
    background: rgba(255,255,255,0.08);
}
.modal-close.recette-modal-close:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

.modal-footer.recette-modal-footer {
    background: var(--kaki);
    border-top: 2px solid var(--accent);
    padding: 0.55rem 0.9rem;
    justify-content: center;
    gap: 0;
}

.recette-actions-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.rec-action-btn {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.22);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0;
    font-size: 1.35rem;
    line-height: 1;
    transition: background 0.15s ease, transform 0.08s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.rec-action-btn:hover {
    background: rgba(255,255,255,0.22);
    transform: translateY(-1px);
    box-shadow: 0 3px 7px rgba(0,0,0,0.22);
}
.rec-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.rec-action-icon {
    display: inline-block;
    line-height: 1;
}
.rec-action-caret {
    font-size: 0.7rem;
    opacity: 0.85;
    margin-left: 1px;
}

.rec-action-save {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 2px 6px rgba(217,96,42,0.35);
}
.rec-action-save:hover {
    background: var(--accent-hover, #E8845A);
    border-color: var(--accent-hover, #E8845A);
}

.rec-action-danger {
    background: rgba(192,57,43,0.55);
    border-color: rgba(255,180,170,0.5);
}
.rec-action-danger:hover {
    background: var(--danger, #c0392b);
    border-color: var(--danger, #c0392b);
}

/* ── Popover Imprimer (courte / complete) ── */
.rec-action-print-wrap {
    position: relative;
}
.rec-action-print-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.22);
    min-width: 240px;
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.12s ease, transform 0.12s ease;
}
.rec-action-print-menu.open {
    display: flex;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.rec-action-print-menu::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: var(--bg-card);
}
.rec-print-option {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.7rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    color: var(--text-primary);
    transition: background 0.12s ease;
}
.rec-print-option:hover {
    background: var(--bg-tag);
}
.rec-print-option-icon {
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light, rgba(217,96,42,0.12));
    border-radius: 8px;
}
.rec-print-option-label {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.2;
}
.rec-print-option-label small {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

@media (max-width: 640px) {
    .rec-action-btn { width: 44px; height: 44px; font-size: 1.2rem; border-radius: 9px; }
    .recette-actions-bar { gap: 0.5rem; }
    .modal-footer.recette-modal-footer { padding: 0.45rem 0.6rem; }
    .recette-modal-title { font-size: 1.12rem; }
}

/* ══════════════════════════════════════════════════════════════
   EDITION INLINE DES ALLERGENES / SPECIFICITES SUR LA FICHE RECETTE
   Tag clicable pour retirer + bouton "+ Ajouter" avec popover
   ══════════════════════════════════════════════════════════════ */

.recette-tags-edit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.35rem;
}

.sm-tag-removable {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.08s ease;
    border: 1px solid transparent;
}
.sm-tag-removable:hover {
    background: rgba(192,57,43,0.12);
    color: var(--danger, #c0392b);
    border-color: rgba(192,57,43,0.35);
}
.sm-tag-removable:active {
    transform: scale(0.96);
}
.sm-tag-x {
    font-size: 0.78em;
    opacity: 0.55;
    line-height: 1;
    padding-left: 1px;
}
.sm-tag-removable:hover .sm-tag-x {
    opacity: 1;
}

.sm-tag-add {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.1rem 0.55rem;
    border-radius: 4px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.sm-tag-add:hover {
    background: var(--accent-light, rgba(217,96,42,0.1));
    border-color: var(--accent);
    border-style: solid;
    color: var(--accent);
}

.rec-tag-add-wrap {
    position: relative;
    display: inline-block;
}
.rec-tag-add-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 20;
    min-width: 210px;
    max-height: 320px;
    overflow-y: auto;
}
.rec-tag-add-menu.open {
    display: flex;
    animation: fadeIn 0.12s ease;
}
.rec-tag-add-option {
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 0.38rem 0.6rem;
    text-align: left;
    cursor: pointer;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--text-primary);
    transition: background 0.1s ease;
}
.rec-tag-add-option:hover {
    background: var(--bg-tag);
    color: var(--accent);
}

.client-bar-rank {
    font-weight: 700;
    font-size: 0.85rem;
    width: 1.5rem;
    text-align: right;
    color: var(--text-secondary);
}

.client-bar-name {
    font-size: 0.88rem;
    font-weight: 600;
    min-width: 120px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-bar-track {
    flex: 1;
    height: 18px;
    background: var(--bg-tag);
    border-radius: 9px;
    overflow: hidden;
    position: relative;
}

.client-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: 9px;
    transition: width 0.5s ease;
    min-width: 2px;
}

.client-bar-val {
    font-size: 0.82rem;
    font-weight: 700;
    min-width: 80px;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Mini chart - bar chart with CSS */
.mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 80px;
    padding: 4px 0;
}

.mini-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    height: 100%;
    justify-content: flex-end;
}

.mini-bar {
    width: 100%;
    max-width: 28px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
    transition: height 0.4s ease;
    min-height: 1px;
}

.mini-bar.n1 {
    background: var(--text-secondary);
    opacity: 0.35;
}

.mini-bar-label {
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
}

.mini-bar-val {
    font-size: 0.55rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Day distribution mini bars */
.day-dist {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 60px;
}

.day-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 2px;
}

.day-bar {
    width: 100%;
    max-width: 32px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
    min-height: 1px;
    transition: height 0.3s ease;
}

.day-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* ══ COLOR-CHANGING PROGRESS BARS ══ */

.progress-bar-dynamic {
    height: 16px;
    background: var(--bg-tag);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.progress-fill-dynamic {
    height: 100%;
    border-radius: 100px;
    transition: width 0.6s ease, background 0.4s ease;
}

/* Celebration at 100%+ */
@keyframes celebration-pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.5); }
    50% { box-shadow: 0 0 12px 4px rgba(76, 175, 80, 0.3); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.5); }
}

@keyframes celebration-shine {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.progress-fill-celebrate {
    background: linear-gradient(
        90deg,
        #4CAF50 0%, #8BC34A 20%, #FFEB3B 40%, #FF9800 50%,
        #FFEB3B 60%, #8BC34A 80%, #4CAF50 100%
    ) !important;
    background-size: 200% 100%;
    animation: celebration-shine 2s linear infinite, celebration-pulse 1.5s ease-in-out infinite;
}

.celebration-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 800;
    color: var(--success);
}

@keyframes confetti-fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(20px) rotate(360deg); opacity: 0; }
}

.confetti-icon {
    display: inline-block;
    animation: confetti-fall 1.5s ease-in-out infinite alternate;
}

/* ─── Stats du jour intégrées dans le bandeau Commandes ─── */
/* Affichées INLINE après le bouton ✅ tout-livrer, sur la même ligne.
   flex-wrap permet aux chips de passer à la ligne si trop nombreux. */
.cmd-stats {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
    padding-left: 6px;
    margin-left: 4px;
    border-left: 1px solid rgba(255,255,255,0.22);
}
/* Chip typo tight : garde les nombres à 2 chiffres (ex. 🥖 12) sur une ligne. */
.cmd-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-nav-active);
    font-size: 0.74rem;
    line-height: 1.35;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.cmd-chip b {
    font-weight: 700;
    font-size: 0.82rem;
}
.cmd-chip-ca {
    background: rgba(217, 96, 42, 0.35);
    color: #fff;
}
.cmd-chip-pain {
    background: rgba(217, 181, 120, 0.3);
    color: #ffe7c8;
}

/* ─── Ligne baguettes manuelles dans la fiche commande ─── */
.cmd-baguettes-manu {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px 10px;
    background: rgba(217, 181, 120, 0.12);
    border: 1px solid rgba(217, 181, 120, 0.3);
    border-radius: 6px;
    margin: 8px 0;
    font-size: 0.92rem;
}

/* ─── Modale de suppression récurrence ─── */
.rec-del-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rec-del-opt {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid var(--border, #e2e2e2);
    border-radius: 10px;
    cursor: pointer;
    background: var(--bg-subtle, #fafafa);
    transition: border-color 0.15s, background 0.15s;
}
.rec-del-opt:hover {
    border-color: var(--primary, #7A8F3E);
    background: #fff;
}
.rec-del-opt input[type="radio"] {
    margin-top: 4px;
    accent-color: var(--primary, #7A8F3E);
    flex-shrink: 0;
}
.rec-del-opt:has(input:checked) {
    border-color: var(--primary, #7A8F3E);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(122, 143, 62, 0.12);
}
.rec-del-title {
    font-weight: 600;
    color: var(--text, #2a2a2a);
    margin-bottom: 2px;
}
.rec-del-sub {
.rec-del-sub {
    font-size: 0.88rem;
    color: var(--text-muted, #7a7a7a);
    line-height: 1.4;
}
