/* Sentinelle demo dashboard styles.
 * Typo : Libre Baskerville (serif editorial) + DM Sans (body).
 * Layout sobre, accent ambre minimal, peu de bordures, beaucoup d'espace blanc.
 */

:root {
    /* Surfaces (cream tres pale, white surfaces, neutres froids) */
    --bg: #F5F4F0;
    --surface: #FFFFFF;
    --surface-alt: #EEEDE8;
    --border: #E4E2DC;
    --border-strong: #C8C5BD;
    --rule: #2A2825;

    /* Texte (dark charcoal, gris chauds) */
    --text: #14130F;
    --text-secondary: #44423D;
    --text-muted: #78766E;
    --text-subtle: #B0AEA6;

    /* Accent ambre (utilise sobrement) */
    --amber: #a0713a;
    --amber-deep: #7a5528;
    --amber-light: #c49a5c;
    --amber-glow: rgba(160, 113, 58, 0.06);
    --green: #4a7a5a;
    --green-bg: rgba(74, 122, 90, 0.10);
    --red: #9c4a3a;
    --blue: #4a6a8a;

    /* Sidebar dark */
    --dark: #14130F;
    --dark-text: rgba(255, 255, 255, 0.78);
    --dark-text-muted: rgba(255, 255, 255, 0.42);
    --dark-text-subtle: rgba(255, 255, 255, 0.20);

    --sidebar-width: 230px;
    --gap-section: 2rem;
    --gap-element: 1.1rem;
    --radius: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 13px;
    line-height: 1.55;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

/* --- Sidebar -------------------------------------------------------------- */

.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: var(--dark-text);
    padding: 2rem 0 1.25rem 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; height: 100vh;
    overflow-y: auto;
}
.brand {
    padding: 0 1.5rem 1.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.brand-name {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #FFFFFF;
}
.brand-tag {
    font-size: 0.62rem;
    color: var(--dark-text-muted);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 600;
}

.nav { padding: 1.5rem 0; flex: 1; }
.nav-section { margin-bottom: 1.75rem; }
.nav-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--dark-text-subtle);
    padding: 0 1.5rem 0.65rem 1.5rem;
    font-weight: 700;
}
.nav-item {
    display: block;
    padding: 0.5rem 1.5rem;
    font-size: 0.83rem;
    color: var(--dark-text);
    border-left: 2px solid transparent;
    transition: all 0.15s ease;
    font-weight: 400;
    line-height: 1.4;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.04); color: #FFFFFF; }
.nav-item.active {
    background: rgba(255, 255, 255, 0.06);
    color: #FFFFFF;
    border-left-color: var(--amber);
    font-weight: 600;
}

.sidebar-footer {
    padding: 1.1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.75rem;
    line-height: 1.5;
}
.sidebar-footer-label {
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--dark-text-subtle);
    margin-bottom: 0.5rem;
    font-weight: 700;
}
.sidebar-footer-status {
    color: var(--dark-text);
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
}
.sidebar-footer-status > span:last-child { flex: 1; }
.dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(74, 122, 90, 0.18);
    margin-top: 0.5rem;
    flex: none;
}

/* --- Main layout ---------------------------------------------------------- */

.main {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 1.75rem 2.25rem 1.5rem 2.25rem;
    max-width: calc(100vw - var(--sidebar-width));
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.breadcrumb {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 600;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { margin: 0 0.55rem; color: var(--text-subtle); }

.filters { display: flex; align-items: center; gap: 0.6rem; }
.granularity-toggle {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--surface);
}
.gtog {
    background: transparent;
    border: 0;
    padding: 0.4rem 0.9rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    color: var(--text-muted);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    transition: all 0.12s ease;
    display: inline-flex; align-items: center; line-height: 1;
}
.gtog:hover { color: var(--text); background: var(--surface-alt); }
.gtog.active { background: var(--text); color: #FFFFFF; }
.gtog + .gtog { border-left: 1px solid var(--border); }

.period-form { margin: 0; }
.period-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2378766E' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 0.7rem center;
    padding: 0.4rem 1.85rem 0.4rem 0.85rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    height: 30px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.period-select:hover { border-color: var(--border-strong); }
.period-select:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber-glow); }

.compare-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 30px;
    padding: 0 0.85rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color 0.1s, border-color 0.1s, background 0.1s;
}
.compare-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.compare-toggle.active {
    background: var(--amber-glow);
    border-color: var(--amber);
    color: var(--amber-deep);
}
.compare-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-subtle);
    border: 1px solid var(--border-strong);
}
.compare-toggle.active .compare-dot { background: var(--amber); border-color: var(--amber-deep); }
.compare-toggle.disabled {
    color: var(--text-subtle);
    background: var(--surface-alt);
    cursor: not-allowed;
    pointer-events: none;
    border-style: dashed;
}
.compare-toggle.disabled .compare-dot { background: transparent; border-color: var(--text-subtle); }

.pill {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.7rem;
    background: var(--surface);
    color: var(--text-muted);
    font-weight: 500;
}
.pill-muted { border-style: dashed; background: transparent; }

/* --- Hero KPI ------------------------------------------------------------ */

.hero { padding: 1.5rem 0 0.5rem 0; }
.hero-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(1.7rem, 2.2vw, 2.1rem);
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.025em;
    color: var(--text);
    line-height: 1.15;
}
.hero-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0.5rem 0 0 0;
    max-width: 720px;
    line-height: 1.55;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-kpi {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 2.5rem;
    padding: 1rem 0 1.75rem 0;
    margin-bottom: 0;
}
.hero-kpi-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.55rem;
    flex: 1;
    min-width: 0;
}
.hero-kpi-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--text-muted);
    font-weight: 700;
}
.hero-kpi-value {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.025em;
    font-variant-numeric: tabular-nums;
}
.hero-kpi-value .unit {
    font-size: 0.55em;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 0.2em;
    letter-spacing: 0;
}
.hero-kpi-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.55;
}
.hero-sparkline {
    width: clamp(180px, 26vw, 300px);
    height: 56px;
    flex: none;
    align-self: center;
    color: var(--amber);
}

/* --- Metrics bar (sobre, filets dark fins) ------------------------------- */

.metrics-bar {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--gap-section);
    background: transparent;
}
.metric {
    padding: 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-left: 1px solid var(--border);
    min-width: 0;
}
.metric:first-child { border-left: none; padding-left: 0; }
.metric:last-child { padding-right: 0; }
.metric-label {
    font-size: 0.56rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.metric-value {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.015em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.metric-spark {
    width: 100%;
    height: 14px;
    color: var(--text-muted);
    display: block;
}
.metric-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
.metric-sub-accent { color: var(--amber); font-weight: 600; }
.metric-sub-positive { color: var(--green); font-weight: 600; }

/* Ligne N-1 sous une tile KPI (+ utilisee par le hero-kpi-info) */
.metric-ny {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-top: 0.3rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.metric-ny-label {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--text-subtle);
}
.metric-ny-value { color: var(--text-secondary); font-weight: 500; }

.delta {
    display: inline-block;
    font-weight: 700;
    font-size: 0.65rem;
    font-variant-numeric: tabular-nums;
    padding: 0 0.35rem;
    border-radius: 3px;
    line-height: 1.5;
}
.delta-up { color: var(--green); background: var(--green-bg); }
.delta-down { color: var(--red); background: rgba(156, 74, 58, 0.08); }
.delta-na { color: var(--text-subtle); background: transparent; font-weight: 500; }

/* --- Chart panels --------------------------------------------------------- */

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.panel-full { grid-column: 1 / -1; }
.panel-title {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex: none;
}
.panel-hint {
    font-size: 0.62rem;
    color: var(--text-subtle);
    text-transform: none;
    letter-spacing: 0.02em;
    font-weight: 400;
    font-style: italic;
}
/* flex:1 + min-height : le canvas s'etire pour matcher la hauteur de la ligne grid
 * (utile quand le ranking d'a cote dicte une hauteur > 300px), avec un plancher
 * pour les panneaux full-width hors grid. */
.panel-canvas { position: relative; flex: 1; min-height: 240px; }

/* --- Panel grid 2/3 + 1/3 (responsive collapse vertical) ----------------- */

.panel-grid {
    display: grid;
    gap: var(--gap-element);
}
.panel-grid-2-1 {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    align-items: stretch;
}

/* --- Ranking (compact, 2 lignes par item : name+value puis bar+%) --------- */

.ranking {
    display: flex;
    flex-direction: column;
}
.rank-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "name value"
        "bar pct";
    gap: 0.2rem 0.7rem;
    align-items: center;
    padding: 0.38rem 0;
    border-bottom: 1px solid var(--border);
}
.rank-row:last-child { border-bottom: none; padding-bottom: 0; }
.rank-row:first-child { padding-top: 0; }
.rank-row:hover .rank-name a { color: var(--amber); }
.rank-name {
    grid-area: name;
    font-size: 0.78rem;
    color: var(--text);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    line-height: 1.2;
}
.rank-name a { color: var(--text); transition: color 0.12s ease; }
.rank-value {
    grid-area: value;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.015em;
    text-align: right;
    white-space: nowrap;
    line-height: 1.1;
}
.rank-bar-track {
    grid-area: bar;
    height: 5px;
    background: var(--surface-alt);
    border-radius: 3px;
    overflow: hidden;
}
.rank-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--amber-deep), var(--amber));
    border-radius: 3px;
    transition: width 0.35s ease;
}
.rank-pct {
    grid-area: pct;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.1;
}

/* --- Tables --------------------------------------------------------------- */

.table-panel { padding: 1rem 0 0 0; }
.table-panel .panel-title { padding: 0 1.5rem; margin-bottom: 0.75rem; }

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th, table.data-table td {
    padding: 0.7rem 1.5rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 0.82rem;
}
table.data-table th {
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
}
table.data-table th:first-child, table.data-table td:first-child { text-align: left; }
table.data-table td {
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: var(--surface-alt); color: var(--text); }
table.data-table td.primary { color: var(--text); font-weight: 600; }
table.data-table td a { color: var(--text); border-bottom: 1px solid var(--text-subtle); }
table.data-table td a:hover { color: var(--amber); border-bottom-color: var(--amber); }

/* Tableau croise N / N-1 : sous-colonnes alignees a droite, groupes separes
 * par un filet vertical. Premier col (Societe / Mois / Rayon) aligne a gauche. */
table.data-table-compare { font-size: 0.75rem; }
table.data-table-compare th, table.data-table-compare td {
    padding: 0.45rem 0.7rem;
    text-align: right;
    white-space: nowrap;
}
table.data-table-compare th:first-child,
table.data-table-compare td:first-child { text-align: left; }
table.data-table-compare th.group-label {
    border-bottom: 1px solid var(--border);
    text-align: right;
    color: var(--text-secondary);
    letter-spacing: 0.14em;
    padding-top: 0.9rem;
    padding-right: 1.1rem;
}
table.data-table-compare tr.subgroup-row th {
    font-size: 0.55rem;
    letter-spacing: 0.08em;
    color: var(--text-subtle);
    padding-top: 0.35rem;
    padding-bottom: 0.55rem;
    font-weight: 600;
}
table.data-table-compare tr.subgroup-row th .th-period {
    letter-spacing: 0.02em;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: none;
    font-size: 0.85em;
}
table.data-table-compare .col-sep { border-right: 1px solid var(--border); }
table.data-table-compare td.ny { color: var(--text-muted); font-weight: 500; }

/* Toggle repliable sur le tableau rayons (checkbox hack, pas de JS). */
.rayons-panel .rayon-extra { display: none; }
.rayons-expand-checkbox:checked ~ .table-scroll .rayon-extra { display: table-row; }
.rayons-toggle {
    display: inline-flex;
    align-items: center; gap: 0.45rem;
    margin-top: 0.9rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
}
.rayons-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.rayons-toggle-less { display: none; }
.rayons-expand-checkbox:checked ~ .rayons-toggle .rayons-toggle-more { display: none; }
.rayons-expand-checkbox:checked ~ .rayons-toggle .rayons-toggle-less { display: inline; }

/* --- Meta bar ------------------------------------------------------------- */

.meta-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: var(--gap-element);
}
.meta-label {
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    font-weight: 700;
}
.meta-value {
    font-size: 0.88rem;
    color: var(--text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
    letter-spacing: -0.005em;
}
.meta-value-ok {
    display: inline-flex; align-items: flex-start; gap: 0.45rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 400;
}
.meta-value-ok::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px var(--green-bg);
    margin-top: 0.5rem;
    flex: none;
}

/* --- Responsive ---------------------------------------------------------- */

/* Tablette : 3 metrics par ligne, panel-grid-2-1 reste cote a cote */
@media (max-width: 1100px) {
    :root { --sidebar-width: 200px; }
    .metrics-bar { grid-template-columns: repeat(3, 1fr); }
    .metric { border-top: 1px solid var(--border); padding: 1rem 0.85rem; }
    .metric:nth-child(-n+3) { border-top: none; }
    .metric:first-child { padding-left: 0.85rem; border-left: 1px solid var(--border); }
    .metric:nth-child(3n+1) { border-left: none; padding-left: 0; }
    .panel-grid-2-1 { grid-template-columns: 1fr; }
}

/* Hamburger + backdrop : masques par defaut, seule la media mobile les affiche */
.nav-hamburger { display: none; }
.nav-backdrop { display: none; }
.hamburger-close { display: none; }

/* Phone : sidebar garde sa structure verticale mais devient un drawer off-canvas,
 * declenche par un hamburger dans la topbar. Pas de JS : checkbox hack universel. */
@media (max-width: 760px) {
    body {
        font-size: 13px;
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .nav-hamburger {
        display: inline-flex;
        align-items: center; justify-content: center;
        width: 34px; height: 34px;
        margin-right: 0.2rem;
        border-radius: 6px;
        color: var(--text);
        cursor: pointer;
        flex: none;
    }
    .nav-hamburger:hover { background: var(--surface-alt); }
    .nav-toggle-checkbox:checked ~ main .nav-hamburger .hamburger-bars { display: none; }
    .nav-toggle-checkbox:checked ~ main .nav-hamburger .hamburger-close { display: block; }

    .nav-backdrop {
        display: block;
        position: fixed; inset: 0;
        background: rgba(20, 19, 15, 0.45);
        opacity: 0; pointer-events: none;
        transition: opacity 0.18s ease;
        z-index: 40;
    }
    .nav-toggle-checkbox:checked ~ .nav-backdrop { opacity: 1; pointer-events: auto; }

    .sidebar {
        position: fixed; top: 0; left: 0;
        width: min(78vw, 280px); height: 100vh;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: 2px 0 24px rgba(0,0,0,0.25);
    }
    .nav-toggle-checkbox:checked ~ .sidebar { transform: translateX(0); }

    .main { margin-left: 0; max-width: 100vw; padding: 1rem; }
    .topbar { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
    .breadcrumb { display: flex; align-items: center; gap: 0.4rem; }
    .filters { width: 100%; justify-content: space-between; }
    .hero-kpi { flex-direction: column; gap: 1rem; padding-bottom: 1rem; }
    .hero-sparkline { width: 100%; height: 48px; }
    .hero-kpi-value { font-size: clamp(1.6rem, 9vw, 2.2rem); }
    .metrics-bar { grid-template-columns: repeat(2, 1fr); }
    .metric { padding: 0.85rem 0.6rem; }
    .metric:nth-child(odd) { border-left: none; padding-left: 0; }
    .metric:nth-child(even) { padding-right: 0; }
    .metric:nth-child(-n+2) { border-top: none; }
    .metric:nth-child(n+3) { border-top: 1px solid var(--border); }
    .panel { padding: 1rem; }
    .panel-canvas { height: 240px; }
    .meta-bar { grid-template-columns: repeat(2, 1fr); padding: 1rem; }
    table.data-table { min-width: 560px; }
    table.data-table th, table.data-table td { padding: 0.55rem 0.7rem; font-size: 0.75rem; white-space: nowrap; }
    table.data-table th:first-child, table.data-table td:first-child { padding-left: 1rem; }
    table.data-table th:last-child, table.data-table td:last-child { padding-right: 1rem; }
    .table-panel .panel-title { padding: 0 1rem; }
}

/* Petits ecrans : metrics en 1 colonne, encore plus de respiration */
@media (max-width: 420px) {
    .metrics-bar { grid-template-columns: 1fr; }
    .metric { border-left: none !important; border-top: 1px solid var(--border) !important; padding: 0.75rem 0; }
    .metric:first-child { border-top: none !important; }
    .meta-bar { grid-template-columns: 1fr; }
    .hero-kpi-value { font-size: 1.7rem; }
}
