/* ==========================================================================
   Cockpit DSI — AS Saint-Étienne
   Design system : vert institutionnel #007A37 sur fond sombre, contenu clair.
   ========================================================================== */

:root {
    --green: #007a37;
    --green-dark: #005c29;
    --green-deep: #00431e;
    --green-light: #00a64b;
    --green-soft: #e8f5ee;
    --green-ring: rgba(0, 122, 55, 0.22);

    --ink: #0b1016;
    --ink-2: #131a22;
    --ink-3: #1d2732;

    --bg: #f4f6f8;
    --surface: #ffffff;
    --border: #e4e9ee;
    --border-strong: #d3dbe3;

    --text: #16202b;
    --text-2: #5b6b7c;
    --text-3: #8a99a8;

    --red: #d7263d;
    --red-soft: #fdecee;
    --amber: #d98300;
    --amber-soft: #fff5e4;
    --blue: #1f6feb;
    --blue-soft: #e8f1fe;

    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(16, 32, 48, 0.05), 0 4px 16px rgba(16, 32, 48, 0.05);
    --shadow-lg: 0 12px 36px rgba(16, 32, 48, 0.13);
    --sidebar-w: 256px;

    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.015em; color: var(--text); }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.05rem; }
h3 { font-size: 0.9rem; }
p { margin: 0; }

a { color: inherit; text-decoration: none; }

table { border-collapse: collapse; width: 100%; }

:focus-visible {
    outline: 2px solid var(--green-light);
    outline-offset: 2px;
    border-radius: 4px;
}

.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Structure ---------------------------------------------------- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: #0b1b2d;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    border-right: 1px solid #000;
}

/* Ambiance stade cantonnée au bas du menu : la navigation et le logo restent
   sur un bleu nuit presque opaque pour que le texte reste toujours lisible.
   Un pseudo-élément porte l'image pour ne jamais perturber le flux du menu. */
.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(
            to bottom,
            rgba(10, 28, 47, 1) 0%,
            rgba(10, 28, 47, 0.98) 25%,
            rgba(10, 28, 47, 0.85) 45%,
            rgba(10, 28, 47, 0.55) 65%,
            rgba(5, 18, 32, 0.35) 100%
        ),
        url('/images/sidebar-stadium.jpg');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
}

.sidebar > * { position: relative; z-index: 1; }

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 18px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.crest {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
}

.crest img { width: 100%; height: 100%; object-fit: contain; }

.sidebar__title { font-size: 0.83rem; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.sidebar__subtitle { font-size: 0.68rem; color: #7d8b9a; margin-top: 1px; }

.sidebar__nav { padding: 12px 10px; flex: 1; overflow-y: auto; }

.nav-section {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: #55636f;
    padding: 14px 10px 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    color: #9dabb9;
    font-size: 0.82rem;
    font-weight: 500;
    transition: background 0.14s, color 0.14s;
}

.nav-link:hover { background: rgba(255, 255, 255, 0.055); color: #fff; }

.nav-link.is-active {
    background: #079447;
    color: #fff;
    border-radius: 6px;
    box-shadow: none;
}

.nav-link svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: 0.9; }

.nav-link__count {
    margin-left: auto;
    background: var(--red);
    color: #fff;
    font-size: 0.64rem;
    font-weight: 700;
    min-width: 19px;
    height: 19px;
    padding: 0 6px;
    border-radius: 10px;
    display: grid;
    place-items: center;
}

.avatar {
    width: 33px;
    height: 33px;
    flex: 0 0 33px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--green-light), var(--green-dark));
    display: grid;
    place-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
}

/* Signature institutionnelle en bas de menu — remplacer sidebar-stadium.jpg
   (fond de .sidebar) par une photo du club dès qu'elle est disponible. */
.sidebar__tagline { flex: 0 0 auto; padding: 14px 18px 20px; }

.sidebar__tagline-title { font-size: 0.78rem; font-weight: 600; color: #cdd6de; line-height: 1.35; }

.sidebar__tagline-bar { width: 28px; height: 3px; background: var(--green-light); border-radius: 2px; margin-top: 10px; }

.icon-btn {
    background: transparent;
    border: 0;
    color: #7d8b9a;
    cursor: pointer;
    padding: 6px;
    border-radius: 7px;
    display: grid;
    place-items: center;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.icon-btn svg { width: 16px; height: 16px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 15px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar__eyebrow { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); font-weight: 650; }

/* ---------- Recherche globale, cloche, menu utilisateur (bandeau) --------- */

.topbar__search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    max-width: 560px;
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border);
}
.topbar__search svg { width: 16px; height: 16px; color: var(--text-3); flex: 0 0 16px; }
.topbar__search input { flex: 1; border: 0; background: transparent; font-size: 0.83rem; color: var(--text); outline: none; }
.topbar__search input::placeholder { color: var(--text-3); }

.topbar__bell { position: relative; color: var(--text-2); }
.topbar__bell-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 2px var(--surface);
}

.user-menu { position: relative; }

.user-menu__trigger {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 0;
    background: transparent;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.14s;
}
.user-menu__trigger:hover { background: var(--bg); }
.user-menu__trigger svg:last-child { width: 15px; height: 15px; color: var(--text-3); }

.user-menu__id { text-align: left; }
.user-menu__id strong { display: block; font-size: 0.78rem; font-weight: 650; color: var(--text); }
.user-menu__id span { display: block; font-size: 0.68rem; color: var(--text-3); }

.user-menu__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 30;
}

.user-menu__logout {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 550;
    color: var(--text-2);
    cursor: pointer;
    text-align: left;
}
.user-menu__logout:hover { background: var(--red-soft); color: #b01a2f; }
.user-menu__logout svg { width: 15px; height: 15px; }

/* ---------- En-tête de page (titre + sous-titre + action principale) ------ */

.page-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-header__actions { display: flex; align-items: center; gap: 9px; }
.page-header__subtitle { font-size: 0.83rem; color: var(--text-2); margin-top: 4px; max-width: 62ch; }

.content { padding: 24px 28px 48px; flex: 1; }

/* ---------- Grille ------------------------------------------------------- */

.grid { display: grid; gap: 16px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--2-1 { grid-template-columns: 2fr 1fr; }
.grid--1-2 { grid-template-columns: 1fr 2fr; }
.grid--contracts { grid-template-columns: 250px 1fr 330px; align-items: stretch; }
.grid--contracts > .stack { height: 100%; }
.grid--contracts.is-collapsed { grid-template-columns: 250px 1fr; }
@media (max-width: 1200px) { .grid--contracts, .grid--contracts.is-collapsed { grid-template-columns: 1fr; } }

.grid--kpi5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1280px) { .grid--kpi5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 880px) { .grid--kpi5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid--kpi5 { grid-template-columns: minmax(0, 1fr); } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--wrap { flex-wrap: wrap; }
.spacer { margin-left: auto; }

@media (max-width: 1280px) {
    .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid--2-1, .grid--1-2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 880px) {
    .sidebar { display: none; }
    .grid--4, .grid--2 { grid-template-columns: minmax(0, 1fr); }
    .content, .topbar { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Bandeau de synthèse ------------------------------------------ */

.hero {
    background:
        radial-gradient(1100px 380px at 88% -30%, rgba(0, 166, 75, 0.5), transparent 62%),
        linear-gradient(118deg, var(--ink) 0%, #0d2419 52%, var(--green-deep) 100%);
    border-radius: 18px;
    padding: 22px 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 100% 34px;
    pointer-events: none;
}

.hero__head { display: flex; align-items: flex-start; gap: 16px; position: relative; z-index: 1; }
.hero__title { font-size: 1.32rem; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.hero__sub { font-size: 0.79rem; color: rgba(255, 255, 255, 0.62); margin-top: 3px; }

.hero__kpis {
    position: relative;
    z-index: 1;
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 1100px) { .hero__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .hero__kpis { grid-template-columns: minmax(0, 1fr); } }

.kpi {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: var(--radius);
    padding: 14px 15px;
    backdrop-filter: blur(6px);
    transition: transform 0.18s, background 0.18s;
}

.kpi:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.1); }

.kpi__label {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 650;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kpi__value {
    font-size: 1.72rem;
    font-weight: 750;
    color: #fff;
    letter-spacing: -0.03em;
    margin-top: 7px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.kpi__value small { font-size: 0.9rem; font-weight: 600; color: rgba(255, 255, 255, 0.55); margin-left: 3px; }
.kpi__foot { font-size: 0.71rem; color: rgba(255, 255, 255, 0.58); margin-top: 6px; display: flex; align-items: center; gap: 6px; }

.kpi__bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.16); margin-top: 10px; overflow: hidden; }
.kpi__bar span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--green-light), #4ade80); }
.kpi__bar span.is-amber { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.kpi__bar span.is-red { background: linear-gradient(90deg, #dc2626, #f87171); }

/* ---------- Cartes ------------------------------------------------------- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card__head {
    padding: 15px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card__title { font-size: 0.92rem; font-weight: 650; }
.card__hint { font-size: 0.72rem; color: var(--text-3); margin-top: 2px; }
.card__body { padding: 18px; }
.card__body--flush { padding: 0; }
.card__foot { padding: 12px 18px; border-top: 1px solid var(--border); background: #fafbfc; border-radius: 0 0 var(--radius) var(--radius); }

/* Carte qui occupe toute la hauteur de sa rangée : le graphique absorbe le vide. */
.card--stretch { display: flex; flex-direction: column; }
.card--stretch .card__body { flex: 1; display: flex; flex-direction: column; }
.card--stretch .chart-box { flex: 1; height: auto; min-height: 250px; }

.chart-box { position: relative; height: 270px; }
.chart-box--sm { height: 210px; }

/* ---------- Badges et pastilles ------------------------------------------ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 650;
    white-space: nowrap;
    line-height: 1.45;
}

.badge--green { background: var(--green-soft); color: #056a33; }
.badge--amber { background: var(--amber-soft); color: #97600a; }
.badge--red { background: var(--red-soft); color: #b01a2f; }
.badge--blue { background: var(--blue-soft); color: #1652b8; }
.badge--slate { background: #eef1f4; color: #5b6b7c; }
.badge--muted { background: #eef1f4; color: #5b6b7c; }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.dot--green { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16); }
.dot--amber { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16); }
.dot--red { background: var(--red); box-shadow: 0 0 0 3px rgba(215, 38, 61, 0.16); }
.dot--slate { background: #94a3b8; box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.16); }
.dot--muted { background: #94a3b8; box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.16); }

.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(215, 38, 61, 0.16); }
    50% { box-shadow: 0 0 0 6px rgba(215, 38, 61, 0.05); }
}

@media (prefers-reduced-motion: reduce) {
    .pulse { animation: none; }
    * { transition: none !important; }
}

/* ---------- Barres de progression ---------------------------------------- */

.progress { height: 7px; border-radius: 4px; background: #edf1f4; overflow: hidden; position: relative; }
.progress span { display: block; height: 100%; border-radius: 4px; background: var(--green); transition: width 0.5s ease; }
.progress span.is-amber { background: #f59e0b; }
.progress span.is-red { background: var(--red); }
.progress__marker { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink-3); opacity: 0.55; }

.meter { display: flex; align-items: center; gap: 9px; }
.meter .progress { flex: 1; min-width: 70px; }
.meter__value { font-size: 0.76rem; font-weight: 650; color: var(--text-2); min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Tableaux ----------------------------------------------------- */

.table-wrap { overflow-x: auto; }

.table th {
    text-align: left;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    font-weight: 700;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
    white-space: nowrap;
}

.th-sort { display: inline-flex; align-items: center; gap: 3px; color: inherit; text-decoration: none; cursor: pointer; }
.th-sort:hover { color: var(--text); }
.th-sort.is-active { color: var(--green); }
.th-sort__arrow { font-size: 0.62rem; }

.table td { padding: 12px 14px; border-bottom: 1px solid #f0f3f6; vertical-align: middle; font-size: 0.82rem; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.12s; }
.table tbody tr:hover { background: #f8fafb; }
.table tbody tr.is-over-budget { background: #fdeceb; }
.table tbody tr.is-over-budget:hover { background: #fbdcda; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table__primary { font-weight: 600; color: var(--text); display: block; }
.table__meta { font-size: 0.72rem; color: var(--text-3); display: block; margin-top: 1px; }

.row-link { cursor: pointer; }

/* ---------- Liste d'alertes ---------------------------------------------- */

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid #f0f3f6;
    border-left: 3px solid transparent;
    transition: background 0.12s;
}

.alert-item:last-child { border-bottom: 0; }
.alert-item:hover { background: #f8fafb; }
.alert-item--critical { border-left-color: var(--red); }
.alert-item--warning { border-left-color: var(--amber); }

.alert-item__body { min-width: 0; flex: 1; }
.alert-item__title { font-size: 0.82rem; font-weight: 620; color: var(--text); }
.alert-item__detail { font-size: 0.74rem; color: var(--text-2); margin-top: 2px; }
.alert-item__side { text-align: right; white-space: nowrap; font-size: 0.78rem; font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------- Boutons ------------------------------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    font-size: 0.81rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.14s, border-color 0.14s, box-shadow 0.14s, transform 0.08s;
    white-space: nowrap;
}

.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; }

.btn--primary { background: var(--green); color: #fff; box-shadow: 0 1px 2px rgba(0, 67, 30, 0.25); }
.btn--primary:hover { background: var(--green-dark); box-shadow: 0 4px 14px var(--green-ring); }

.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: #f7f9fa; border-color: #bcc7d1; }

.btn--danger { background: #fff; color: var(--red); border-color: #f4c9cf; }
.btn--danger:hover { background: var(--red-soft); }

.btn--blue { background: var(--blue); color: #fff; box-shadow: 0 1px 2px rgba(20, 62, 140, 0.25); }
.btn--blue:hover { background: #1a5bc4; }

.btn--sm { padding: 5px 11px; font-size: 0.75rem; }
.btn--block { width: 100%; }
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-grid .btn { width: 100%; }

/* ---------- Filtres ------------------------------------------------------ */

.chips { display: flex; flex-wrap: wrap; gap: 7px; }

.chip {
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text-2);
    transition: all 0.14s;
}

.chip:hover { border-color: #b3c0cc; color: var(--text); }
.chip.is-active { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 2px 8px var(--green-ring); }
.chip__count { opacity: 0.65; margin-left: 4px; font-weight: 500; }

.search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 0 11px;
    min-width: 230px;
}

.search:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-ring); }
.search svg { width: 15px; height: 15px; color: var(--text-3); flex: 0 0 15px; }
.search input { border: 0; outline: 0; padding: 8px 0; font-size: 0.82rem; font-family: inherit; background: transparent; width: 100%; color: var(--text); }

/* ---------- Formulaires -------------------------------------------------- */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field--full { grid-column: 1 / -1; }

@media (max-width: 820px) { .form-grid, .form-grid--3 { grid-template-columns: minmax(0, 1fr); } }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 0.75rem; font-weight: 650; color: var(--text-2); }

.field .check-row { display: flex; align-items: center; gap: 8px; font-size: 0.81rem; font-weight: 500; color: var(--text-2); cursor: pointer; }
.check-row input { width: 15px; height: 15px; accent-color: var(--green); cursor: pointer; }
.check-row__count { color: var(--text-3); }
.field__hint { font-size: 0.71rem; color: var(--text-3); }

.input, .select, .textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 0.83rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    transition: border-color 0.14s, box-shadow 0.14s;
}

.input:focus, .select:focus, .textarea:focus {
    outline: 0;
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-ring);
}

.textarea { resize: vertical; min-height: 84px; line-height: 1.55; }

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a99a8' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    background-size: 15px;
    padding-right: 30px;
}

.input--error { border-color: var(--red); }
.field__error { font-size: 0.72rem; color: var(--red); font-weight: 550; }

.input-suffix { position: relative; display: flex; align-items: center; }
.input-suffix .input { padding-right: 52px; }
.input-suffix span { position: absolute; right: 11px; font-size: 0.77rem; color: var(--text-3); font-weight: 600; pointer-events: none; }

/* ---------- Messages ----------------------------------------------------- */

.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 15px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 550;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.flash--success { background: var(--green-soft); color: #056a33; border-color: #bfe3cf; }
.flash--error { background: var(--red-soft); color: #b01a2f; border-color: #f4c9cf; }
.flash svg { width: 17px; height: 17px; flex: 0 0 17px; }

.empty { padding: 44px 20px; text-align: center; color: var(--text-3); }
.empty svg { width: 34px; height: 34px; margin-bottom: 10px; opacity: 0.5; }
.empty p { font-size: 0.85rem; }

/* ---------- Divers ------------------------------------------------------- */

.stat-line { display: flex; align-items: baseline; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.stat-line:last-child { border-bottom: 0; }
.stat-line__label { font-size: 0.79rem; color: var(--text-2); }
.stat-line__value { font-size: 0.88rem; font-weight: 680; font-variant-numeric: tabular-nums; }

/* Variante sans ligne pointillée : liste de caractéristiques dense, sans grille visible. */
.stat-line--clean { border-bottom: 0; padding: 7px 0; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.74rem; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.muted { color: var(--text-3); }
.small { font-size: 0.74rem; }
.strong { font-weight: 650; }
.text-red { color: var(--red); }
.text-amber { color: var(--amber); }
.text-green { color: #0a7a3d; }

.divider { height: 1px; background: var(--border); margin: 16px 0; }

.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.77rem; color: var(--text-2); font-weight: 550; }
.back-link:hover { color: var(--green); }
.back-link svg { width: 14px; height: 14px; }

/* ---------- Page de connexion -------------------------------------------- */

.login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(900px 480px at 78% 8%, rgba(0, 166, 75, 0.36), transparent 60%),
        linear-gradient(150deg, var(--ink) 0%, #0c1f16 55%, var(--green-deep) 100%);
}

.login__card {
    width: 100%;
    max-width: 396px;
    background: var(--surface);
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.login__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login__brand .crest { width: 46px; height: 46px; flex: 0 0 46px; }
.login__hint { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 0.73rem; color: var(--text-3); line-height: 1.7; }
.login__hint code { background: #f1f4f7; padding: 1px 5px; border-radius: 4px; font-size: 0.72rem; color: var(--text-2); }

/* ---------- Impression --------------------------------------------------- */

@media print {
    .sidebar, .topbar, .page-header__actions, .btn, .chips, .search { display: none !important; }
    body { background: #fff; }
    .content { padding: 0; }
    .card, .hero { box-shadow: none; break-inside: avoid; }
    .hero { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* ---------- Frise contractuelle ------------------------------------------ */

.timeline { position: relative; height: 10px; background: #eef1f4; border-radius: 5px; margin: 0 0 14px; }
.timeline__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: linear-gradient(90deg, var(--green-dark), var(--green-light)); }
.timeline__tick { position: absolute; top: -5px; bottom: -5px; width: 3px; border-radius: 2px; }
.timeline__tick--notice { background: var(--amber); }
.timeline__tick--today { background: var(--ink); }

/* La légende reste en flux normal : aucune étiquette ne peut en chevaucher une autre. */
.timeline__legend { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 0.74rem; }
.timeline__legend > div { display: flex; align-items: center; gap: 7px; }
.timeline__legend i { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.timeline__legend strong { font-weight: 650; }
.timeline__legend span { color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---------- Bandeau d'alerte contrat ------------------------------------- */

.notice {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 13px;
    padding: 15px 17px;
    border-radius: var(--radius);
    border: 1px solid transparent;
}

.notice--critical { background: var(--red-soft); border-color: #f4c9cf; }
.notice--warning { background: var(--amber-soft); border-color: #f5ddb2; }
.notice--ok { background: var(--green-soft); border-color: #bfe3cf; }
.notice__icon { flex: 0 0 20px; margin-top: 1px; }
.notice--critical .notice__icon { color: var(--red); }
.notice--warning .notice__icon { color: var(--amber); }
.notice--ok .notice__icon { color: #0a7a3d; }
.notice__icon svg { width: 20px; height: 20px; }
.notice__title { font-size: 0.88rem; font-weight: 680; }
.notice__text { font-size: 0.79rem; color: var(--text-2); margin-top: 3px; line-height: 1.55; }

/* ---------- Fiche détaillée ---------------------------------------------- */

.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.detail-grid > div { background: var(--surface); padding: 13px 15px; }
.detail-grid dt { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); font-weight: 680; margin-bottom: 4px; }
.detail-grid dd { margin: 0; font-size: 0.85rem; font-weight: 600; color: var(--text); }

@media (max-width: 820px) { .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.page-head__title { font-size: 1.28rem; font-weight: 700; letter-spacing: -0.02em; }
.page-head__meta { font-size: 0.79rem; color: var(--text-3); margin-top: 3px; }

/* ---------- Blocs dépliants (formulaires en ligne) ----------------------- */

.disclosure { border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.disclosure[open] { border-style: solid; box-shadow: var(--shadow); }
.disclosure > summary {
    cursor: pointer;
    list-style: none;
    padding: 12px 16px;
    font-size: 0.82rem;
    font-weight: 620;
    color: var(--text-2);
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: var(--radius);
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary:hover { color: var(--green); }
.disclosure > summary svg { width: 15px; height: 15px; transition: transform 0.18s; }
.disclosure[open] > summary { border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; color: var(--text); }
.disclosure[open] > summary svg { transform: rotate(45deg); }
.disclosure__body { padding: 16px; }

/* ---------- Enveloppes budgétaires --------------------------------------- */

.envelope { display: flex; flex-direction: column; gap: 11px; }
.envelope__head { display: flex; align-items: flex-start; gap: 10px; }
.envelope__label { font-size: 0.87rem; font-weight: 650; line-height: 1.35; }
.envelope__amount { font-size: 1.22rem; font-weight: 750; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.envelope__foot { display: flex; justify-content: space-between; font-size: 0.73rem; color: var(--text-2); }
.envelope__actions { display: flex; gap: 6px; margin-top: 2px; }

/* ---------- Réglage de seuil --------------------------------------------- */

.threshold {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 17px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(120deg, var(--green-soft), #fff 62%);
}
.threshold__value { font-size: 2.1rem; font-weight: 780; letter-spacing: -0.04em; color: var(--green-dark); line-height: 1; font-variant-numeric: tabular-nums; }
.threshold__unit { font-size: 0.8rem; font-weight: 600; color: var(--text-2); }

input[type="range"] { accent-color: var(--green); width: 100%; height: 22px; cursor: pointer; }


/* ==========================================================================
   Journal de suivi des projets — actions et attentes
   ========================================================================== */

.journal { border-top: 1px solid var(--border); }

.jitem {
    display: flex;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid #f0f3f6;
    border-left: 3px solid transparent;
    transition: background 0.12s;
}

.jitem:last-child { border-bottom: 0; }
.jitem:hover { background: #f8fafb; }
.jitem--amber { border-left-color: var(--amber); }
.jitem--red { border-left-color: var(--red); background: #fffbfb; }
.jitem--done { opacity: 0.6; }

.jitem__mark { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; margin-top: 5px; background: #cbd5e1; }
.jitem--amber .jitem__mark { background: #f59e0b; }
.jitem--red .jitem__mark { background: var(--red); }
.jitem--done .jitem__mark { background: #16a34a; }

.jitem__body { flex: 1; min-width: 0; }
.jitem__label { font-size: 0.845rem; font-weight: 620; line-height: 1.4; }
.jitem--done .jitem__label { text-decoration: line-through; text-decoration-thickness: 1px; }
.jitem__meta { font-size: 0.73rem; color: var(--text-2); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 5px 9px; align-items: center; }
.jitem__detail { font-size: 0.775rem; color: var(--text-2); margin-top: 7px; line-height: 1.6; }
.jitem__side { display: flex; gap: 5px; align-items: flex-start; flex-shrink: 0; }
.jitem__age { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Bandeau de blocage en tête de fiche projet */
.blocked-banner {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 14px 17px;
    border-radius: var(--radius);
    background: var(--amber-soft);
    border: 1px solid #f5ddb2;
    margin-top: 14px;
}

.blocked-banner--stale { background: var(--red-soft); border-color: #f4c9cf; }
.blocked-banner__icon { flex: 0 0 20px; color: var(--amber); margin-top: 1px; }
.blocked-banner--stale .blocked-banner__icon { color: var(--red); }
.blocked-banner__icon svg { width: 20px; height: 20px; }
.blocked-banner__title { font-size: 0.875rem; font-weight: 680; }
.blocked-banner__text { font-size: 0.78rem; color: var(--text-2); margin-top: 3px; line-height: 1.55; }

/* Formulaire de saisie rapide */
.jform { display: grid; grid-template-columns: 2.4fr 1fr 1fr 0.9fr auto; gap: 10px; align-items: end; }
@media (max-width: 1100px) { .jform { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .jform { grid-template-columns: minmax(0, 1fr); } }

.jform__check { display: flex; align-items: center; gap: 7px; font-size: 0.76rem; font-weight: 550; color: var(--text-2); cursor: pointer; padding-bottom: 9px; white-space: nowrap; }
.jform__check input { accent-color: var(--green); width: 15px; height: 15px; cursor: pointer; }

/* Compteurs en tête de journal */
.jcount { display: inline-flex; align-items: center; gap: 5px; font-size: 0.73rem; font-weight: 600; color: var(--text-2); }
.jcount b { font-variant-numeric: tabular-nums; }


/* ---------- Bandeau d'exercice budgétaire ---------------------------------- */

.yearbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 11px 15px;
    box-shadow: var(--shadow);
}

.yearbar__select { min-width: 196px; font-weight: 650; }
.yearbar__period { font-size: 0.76rem; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* Ouverture d'un exercice vierge */
.newyear {
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 26px 22px;
    text-align: center;
}

.newyear h3 { font-size: 0.95rem; margin-bottom: 5px; }
.newyear p { font-size: 0.82rem; color: var(--text-2); max-width: 62ch; margin: 0 auto 16px; line-height: 1.6; }
.newyear form { display: inline-flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; justify-content: center; }


/* ---------- Phases de projet (avancement automatique) ---------------------- */

.mstone {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    border-bottom: 1px solid #f0f3f6;
    transition: background 0.12s;
}

.mstone:last-child { border-bottom: 0; }
.mstone:hover { background: #f8fafb; }

.mstone__toggle {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 50%;
    border: 2px solid var(--border-strong);
    background: var(--surface);
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
    transition: background 0.14s, border-color 0.14s;
}

.mstone__toggle:hover { border-color: var(--green); }
.mstone__toggle svg { width: 13px; height: 13px; opacity: 0; color: #fff; }
.mstone--done .mstone__toggle { background: var(--green); border-color: var(--green); }
.mstone--done .mstone__toggle svg { opacity: 1; }

.mstone__body { flex: 1; min-width: 0; }
.mstone__label { font-size: 0.845rem; font-weight: 620; line-height: 1.4; }
.mstone--done .mstone__label { color: var(--text-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.mstone__meta { font-size: 0.72rem; color: var(--text-3); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.mstone__weight { font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); min-width: 44px; text-align: right; }
.mstone__side { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }

/* Synthèse en tête de carte */
.mhead { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.mhead__value { font-size: 2.3rem; font-weight: 780; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.mhead__bar { flex: 1; min-width: 200px; }
.mhead__legend { font-size: 0.74rem; color: var(--text-2); margin-top: 7px; }


/* Avancement propre a chaque phase */
.mstone__pct { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.mstone__pct input { width: 64px; text-align: right; padding: 5px 7px; font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.mstone__pct > span { font-size: 0.76rem; color: var(--text-3); font-weight: 600; }
.mstone__earned { font-size: 0.73rem; color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 78px; text-align: right; }
.mstone--doing .mstone__toggle { border-color: var(--amber); }
.mstone--red .mstone__toggle { border-color: var(--red); }
.mstone--doing .mstone__label, .mstone--red .mstone__label { color: var(--text); }

/* ==========================================================================
   Fiche projet & portefeuille — refonte alignée sur la maquette
   ========================================================================== */

/* ---------- Fil d'Ariane -------------------------------------------------- */

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 0.77rem; color: var(--text-3); margin-bottom: 10px; }
.breadcrumb a { color: var(--text-2); font-weight: 550; }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb__sep { opacity: 0.6; }
.breadcrumb__current { color: var(--text); font-weight: 600; }

/* ---------- Pastille icône colorée (KPI, cartes de mise en avant, projet) --- */

.icon-badge {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #fff;
}

.icon-badge svg { width: 18px; height: 18px; }
.icon-badge--lg { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 14px; }
.icon-badge--lg svg { width: 26px; height: 26px; }

.icon-badge--green { background: linear-gradient(145deg, var(--green-light), var(--green-dark)); }
.icon-badge--red { background: linear-gradient(145deg, #f87171, var(--red)); }
.icon-badge--amber { background: linear-gradient(145deg, #fbbf24, var(--amber)); }
.icon-badge--blue { background: linear-gradient(145deg, #60a5fa, var(--blue)); }
.icon-badge--slate { background: linear-gradient(145deg, #94a3b8, #64748b); }

/* ---------- Anneau de progression ----------------------------------------- */

.progress-ring { position: relative; display: inline-grid; place-items: center; }
.progress-ring__value {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

/* ---------- Mini-carte personne (responsable, sponsor métier) ------------- */

.person-card { display: flex; align-items: center; gap: 9px; }
.person-card__label { font-size: 0.68rem; color: var(--text-3); font-weight: 600; }
.person-card__name { font-size: 0.83rem; font-weight: 640; color: var(--text); }

/* ---------- Cartes de mise en avant (prochaine étape, risque, décision) --- */

.highlight-card {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
}

.highlight-card--red { background: var(--red-soft); border-color: rgba(215, 38, 61, 0.18); }
.highlight-card--blue { background: var(--blue-soft); border-color: rgba(31, 111, 235, 0.18); }

.highlight-card__icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: rgba(11, 16, 22, 0.06);
    color: var(--text-2);
}

.highlight-card--red .highlight-card__icon { background: rgba(215, 38, 61, 0.14); color: var(--red); }
.highlight-card--blue .highlight-card__icon { background: rgba(31, 111, 235, 0.14); color: var(--blue); }
.highlight-card__icon svg { width: 17px; height: 17px; }

.highlight-card__label { font-size: 0.71rem; color: var(--text-3); font-weight: 600; }
.highlight-card__title { font-size: 0.86rem; font-weight: 650; color: var(--text); margin-top: 1px; }
.highlight-card__meta { font-size: 0.74rem; color: var(--text-2); margin-top: 3px; }

/* ---------- Bascule vue liste / grille ------------------------------------- */

.view-toggle { display: inline-flex; background: #eef1f4; border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.view-toggle button {
    border: 0;
    background: transparent;
    padding: 6px 9px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    color: var(--text-3);
    cursor: pointer;
    transition: background 0.14s, color 0.14s;
}
.view-toggle button svg { width: 15px; height: 15px; }
.view-toggle button.is-active { background: var(--surface); color: var(--green); box-shadow: var(--shadow); }

/* ---------- Grille de projets (vue « grille ») ----------------------------- */

.project-card { display: block; }
.project-card__head { display: flex; align-items: flex-start; gap: 10px; }
.project-card__name { font-size: 0.87rem; font-weight: 650; color: var(--text); }
.project-card__meta { font-size: 0.72rem; color: var(--text-3); margin-top: 1px; }

/* ---------- Fournisseurs et liens rapides ---------------------------------- */

.supplier-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.supplier-row:last-child { border-bottom: 0; }
.supplier-row__name { font-size: 0.82rem; font-weight: 620; color: var(--text); }
.supplier-row__role { font-size: 0.72rem; color: var(--text-3); }

.quick-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 0.81rem;
    font-weight: 600;
    color: var(--text);
    transition: border-color 0.14s, background 0.14s;
}
.quick-link:hover { border-color: var(--border-strong); background: #fafbfc; }
.quick-link svg { width: 16px; height: 16px; color: var(--text-3); flex: 0 0 16px; }

/* ---------- Bandeau « À traiter » ------------------------------------------ */

.action-chip {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 15px;
    border-radius: var(--radius);
    border: 1px solid transparent;
}

.action-chip__icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.6);
}
.action-chip__icon svg { width: 15px; height: 15px; }

.action-chip__title { font-size: 0.82rem; font-weight: 650; color: var(--text); }
.action-chip__link { font-size: 0.74rem; color: var(--blue); font-weight: 600; }

.action-chip--red { background: var(--red-soft); }
.action-chip--red .action-chip__icon { color: var(--red); }
.action-chip--amber { background: var(--amber-soft); }
.action-chip--amber .action-chip__icon { color: #97600a; }
.action-chip--yellow { background: #fdf6e3; }
.action-chip--yellow .action-chip__icon { color: #a16207; }
.action-chip--blue { background: var(--blue-soft); }
.action-chip--blue .action-chip__icon { color: var(--blue); }

/* ---------- Donut avec valeur centrale et légende personnalisée ----------- */

.chart-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.chart-center strong { font-size: 1.4rem; font-weight: 750; color: var(--text); letter-spacing: -0.02em; }
.chart-center span { font-size: 0.7rem; color: var(--text-3); }

.chart-legend { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }
.chart-legend__item { display: flex; align-items: center; gap: 8px; font-size: 0.79rem; color: var(--text-2); }
.chart-legend__item i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; display: block; }

/* ---------- Liste à barres horizontales (catégories) ----------------------- */

.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-row__label { font-size: 0.79rem; color: var(--text-2); width: 90px; flex: 0 0 90px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row__track { flex: 1; height: 8px; border-radius: 4px; background: #edf1f4; overflow: hidden; }
.bar-row__track span { display: block; height: 100%; border-radius: 4px; background: var(--green); }
.bar-row__value { font-size: 0.79rem; font-weight: 650; color: var(--text); min-width: 20px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Menu d'actions par ligne (« … ») -------------------------------- */

.row-menu { position: relative; display: inline-block; }
.row-menu__panel {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 140px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 5px;
    z-index: 25;
}
.row-menu__panel a {
    display: block;
    padding: 7px 9px;
    border-radius: 6px;
    font-size: 0.79rem;
    font-weight: 550;
    color: var(--text-2);
}
.row-menu__panel a:hover { background: var(--bg); color: var(--text); }

.btn.is-disabled { opacity: 0.4; pointer-events: none; }

/* ---------- Barre de filtres en ligne --------------------------------------
   .select/.input valent 100% de large par défaut (pensés pour un .field en
   colonne) : dans une rangée flex, ça force chaque élément sur sa propre
   ligne. Cette classe leur rend une largeur basée sur leur contenu. */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.filter-bar .select { width: auto; min-width: 150px; flex: 0 1 auto; }
.filter-bar .search { flex: 1 1 200px; min-width: 200px; width: auto; }

/* ==========================================================================
   Gantt projets — une ligne par projet (namespace « pgantt » : distinct du
   Gantt planning équipe existant, une ligne par ressource, pour ne pas
   interférer avec lui).
   ========================================================================== */

.pgantt { display: flex; align-items: stretch; }

/* 560 px : les colonnes fixes (292) + gouttieres (32) + marges (32) laissent
   204 px au nom du projet, contre 116 auparavant. Les titres tenaient sur
   81 px une fois l'icone deduite — tout etait tronque. */
.pgantt__table { flex: 0 0 560px; border-right: 1px solid var(--border); overflow: hidden; }
.pgantt__table-head, .pgantt__cols {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 92px 100px 50px 50px;
    gap: 8px;
    align-items: center;
    padding: 0 16px;
}
.pgantt__table-head {
    height: 77px;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-3);
    font-weight: 700;
}
.pgantt__cols { height: 58px; border-bottom: 1px solid #f0f3f6; }
.pgantt__cols:last-child { border-bottom: 0; }

.pgantt__proj { display: flex; align-items: center; gap: 9px; min-width: 0; }
.pgantt__proj-icon {
    width: 26px; height: 26px; flex: 0 0 26px; border-radius: 7px;
    display: grid; place-items: center; color: #fff;
}
.pgantt__proj-icon svg { width: 13px; height: 13px; }
/* Deux lignes autorisees : la ligne fait 58 px de haut, il y a la place, et
   un nom comme « Page Supporter SSO - Integration Azure / Salesforce » ne
   tient sur aucune largeur raisonnable en une seule ligne. */
.pgantt__proj-name {
    font-size: 0.82rem;
    font-weight: 620;
    color: var(--text);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.pgantt__date { font-size: 0.76rem; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- Timeline ------------------------------------------------------ */

.pgantt__timeline { flex: 1; overflow-x: auto; position: relative; }
.pgantt__timeline-inner { position: relative; }

.pgantt__axis-months { display: flex; height: 39px; border-bottom: 1px solid var(--border); background: #fafbfc; }
.pgantt__axis-month {
    display: flex; align-items: center; padding: 0 8px 0 10px;
    font-size: 0.75rem; font-weight: 650; color: var(--text-2);
    border-right: 1px solid var(--border); box-sizing: border-box;
    /* Le premier et le dernier mois de la fenetre sont souvent partiels : sans
       flex-shrink:0 la cellule se comprime, et sans overflow le libelle
       deborde sur le mois suivant. */
    flex: 0 0 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.pgantt__axis-month > span { overflow: hidden; text-overflow: ellipsis; }
.pgantt__axis-weeks { display: flex; height: 38px; border-bottom: 1px solid var(--border); }
.pgantt__axis-week {
    display: flex; align-items: center; justify-content: center;
    font-size: 0.67rem; color: var(--text-3); border-right: 1px solid #f0f3f6;
    box-sizing: border-box;
}

.pgantt__rows { position: relative; }
.pgantt__row { height: 58px; border-bottom: 1px solid #f0f3f6; position: relative; }
.pgantt__row:last-child { border-bottom: 0; }

.pgantt__bar {
    position: absolute;
    top: 16px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 0.73rem;
    font-weight: 650;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 32, 48, 0.12);
}
.pgantt__bar-hatch {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.4) 0 5px, rgba(255, 255, 255, 0.12) 5px 10px);
    border-radius: 0 6px 6px 0;
}
.pgantt__bar--paused {
    outline: 1px dashed rgba(255, 255, 255, .7);
    outline-offset: -3px;
}

.pgantt__milestone {
    position: absolute;
    top: 5px;
    width: 15px;
    height: 15px;
    background: #8b5cf6;
    transform: translateX(-50%) rotate(45deg);
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(16, 32, 48, 0.25);
    z-index: 3;
    cursor: default;
}
.pgantt__milestone-tag {
    position: absolute;
    top: -2px;
    margin-left: 13px;
    max-width: 118px;
    font-size: 0.68rem;
    line-height: 1.3;
    color: var(--text-2);
    pointer-events: none;
    z-index: 4;
}
/* Pres du bord droit, l'etiquette se replie vers la gauche du losange. */
.pgantt__milestone-tag.is-left {
    margin-left: 0;
    transform: translateX(-100%);
    padding-right: 13px;
    text-align: right;
}
.pgantt__milestone-tag strong,
.pgantt__milestone-tag span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.pgantt__milestone-tag strong { color: var(--text); font-weight: 650; }
.pgantt__milestone-tag span { color: var(--text-3); }

.pgantt__today { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--red); z-index: 5; pointer-events: none; }
.pgantt__today-badge {
    position: absolute;
    top: -30px;
    left: -28px;
    background: var(--red);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 5px;
    white-space: nowrap;
}

.hide-milestones .pgantt__milestone, .hide-milestones .pgantt__milestone-tag { display: none; }

/* ---------- Bascule (interrupteur) ---------------------------------------- */

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 0.79rem; color: var(--text-2); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track { width: 34px; height: 19px; border-radius: 10px; background: #cbd5e1; position: relative; transition: background 0.16s; flex: 0 0 34px; }
.switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform 0.16s; }
.switch input:checked + .switch__track { background: var(--green); }
.switch input:checked + .switch__track::after { transform: translateX(15px); }

/* ---------- Heatmap de charge d'équipe ------------------------------------- */

.heatmap-row { display: flex; align-items: center; gap: 16px; padding: 7px 0; }
.heatmap-row__info { display: flex; align-items: center; gap: 10px; flex: 0 0 300px; min-width: 0; }
.heatmap-row__cells { display: flex; gap: 10px; flex: 1; min-width: 0; }

.heatmap-person__name { font-size: 0.81rem; font-weight: 620; color: var(--text); }
.heatmap-person__role { font-size: 0.7rem; color: var(--text-3); }
.heatmap-person__bar { flex: 1; height: 6px; border-radius: 3px; background: #edf1f4; overflow: hidden; min-width: 60px; }
.heatmap-person__bar span { display: block; height: 100%; border-radius: 3px; }
.heatmap-person__pct { font-size: 0.78rem; font-weight: 650; min-width: 32px; text-align: right; font-variant-numeric: tabular-nums; }

.heatmap-grid { display: flex; gap: 10px; }
.heatmap-grid__month { flex: 1; min-width: 0; }
.heatmap-grid__month-label { font-size: 0.68rem; color: var(--text-3); text-align: center; margin-bottom: 4px; }
.heatmap-grid__cells { display: flex; flex-wrap: wrap; gap: 2px; }
.heatmap-grid__cell { width: 8px; height: 8px; border-radius: 2px; }
.heatmap-grid__cell--green { background: #86efac; }
.heatmap-grid__cell--amber { background: #fcd34d; }
.heatmap-grid__cell--red { background: #fca5a5; }

/* ---------- Légende --------------------------------------------------------- */

.legend-grid { display: flex; flex-wrap: wrap; gap: 14px 20px; }
.legend-grid__item { display: flex; align-items: center; gap: 7px; font-size: 0.79rem; color: var(--text-2); }
.legend-swatch { width: 22px; height: 9px; border-radius: 3px; flex: 0 0 22px; }
.legend-swatch--hatch { background-image: repeating-linear-gradient(45deg, #cbd5e1 0 3px, #fff 3px 6px); border: 1px solid var(--border); }
.legend-swatch--paused { background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .55) 0 6px, transparent 6px 12px); background-color: #f59e0b; }
.legend-diamond { width: 10px; height: 10px; background: #8b5cf6; transform: rotate(45deg); flex: 0 0 10px; margin: 0 6px; }
.legend-dashed { width: 22px; height: 0; border-top: 2px dashed var(--red); flex: 0 0 22px; }
.legend-dep { width: 22px; height: 0; border-top: 2px solid var(--text-3); flex: 0 0 22px; }

/* ==========================================================================
   TABLEAU DE BORD V3 — reproduction fidèle de la maquette Cockpit DSI
   IMPORTANT : tout est scoppé sur .dashboard-v3 (ou sur body:has(.dashboard-v3))
   afin de ne modifier ni la sidebar, ni son logo, ni les autres modules.
   ========================================================================== */

/* Ajustements uniquement quand la page d'accueil est affichée. */
body:has(.dashboard-v3) .content {
    padding: 18px 16px 28px;
    background: #f5f7fa;
}

body:has(.dashboard-v3) .topbar {
    padding-left: 16px;
    padding-right: 16px;
}

body:has(.dashboard-v3) .topbar__eyebrow:empty { display: none; }

body:has(.dashboard-v3) .page-header {
    align-items: center;
    margin-bottom: 14px;
    gap: 12px;
}

body:has(.dashboard-v3) .page-header > .row { align-items: center !important; }

body:has(.dashboard-v3) .page-header .icon-badge--lg {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(15, 34, 55, 0.14);
}

body:has(.dashboard-v3) .page-header .icon-badge--lg svg {
    width: 16px;
    height: 16px;
}

body:has(.dashboard-v3) .page-header h1 {
    font-size: 1.5rem;
    line-height: 1.12;
    color: #102240;
    font-weight: 760;
    letter-spacing: -0.028em;
}

body:has(.dashboard-v3) .page-header__subtitle {
    margin-top: 3px;
    color: #516887;
    font-size: 0.78rem;
}

.dashboard-wave { display: inline-block; font-size: 1.1em; margin-left: 2px; }

.dashboard-date {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: #314b70;
    font-size: 0.72rem;
    font-weight: 520;
    white-space: nowrap;
}

.dashboard-date i {
    display: block;
    width: 1px;
    height: 13px;
    background: #bcc7d4;
}

.dashboard-v3 {
    --db-blue-text: #14325c;
    --db-border: #dfe6ee;
    --db-border-soft: #edf1f5;
    --db-link: #075fe5;
    --db-card-radius: 8px;
    --db-shadow: 0 1px 2px rgba(20, 43, 70, 0.035);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    color: #15243a;
}

.dashboard-v3 a { text-decoration: none; }

/* ---------- Cartes génériques du dashboard ----------------------------- */
.db-card {
    background: #fff;
    border: 1px solid var(--db-border);
    border-radius: var(--db-card-radius);
    box-shadow: var(--db-shadow);
    min-width: 0;
    overflow: hidden;
}

.db-card__head {
    min-height: 48px;
    padding: 10px 13px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-bottom: 1px solid var(--db-border-soft);
}

.db-card__head h2,
.db-section-title {
    margin: 0;
    color: #102240;
    font-size: 0.88rem;
    line-height: 1.25;
    font-weight: 760;
    letter-spacing: -0.015em;
}

.db-card-link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--db-link);
    font-size: 0.69rem;
    font-weight: 620;
    white-space: nowrap;
}

.db-card-link:hover { text-decoration: underline; }
.db-card-link svg { width: 11px; height: 11px; }
.db-card__foot { padding: 8px 12px 9px; text-align: right; border-top: 1px solid var(--db-border-soft); }

/* ---------- KPI --------------------------------------------------------- */
.db-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.db-kpi {
    min-width: 0;
    min-height: 96px;
    padding: 13px 11px;
    display: flex;
    align-items: center;
    gap: 11px;
    background: #fff;
    border: 1px solid var(--db-border);
    border-radius: var(--db-card-radius);
    box-shadow: var(--db-shadow);
    color: inherit;
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

a.db-kpi:hover {
    transform: translateY(-1px);
    border-color: #ccd7e2;
    box-shadow: 0 5px 13px rgba(20, 43, 70, 0.07);
}

.db-kpi__icon {
    width: 51px;
    height: 51px;
    flex: 0 0 51px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.db-kpi__icon svg { width: 24px; height: 24px; stroke-width: 2.1; }
.db-kpi__icon--green  { background: #e5f8ef; color: #079b5d; }
.db-kpi__icon--red    { background: #fee8ec; color: #dc2138; }
.db-kpi__icon--blue   { background: #e8f2ff; color: #0868f4; }
.db-kpi__icon--amber  { background: #fff1df; color: #fa8b16; }
.db-kpi__icon--rose   { background: #fee8ed; color: #da2943; }
.db-kpi__icon--violet { background: #f1eaff; color: #7a2be2; }

.db-kpi__content { flex: 1; min-width: 0; }
.db-kpi__line { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.db-kpi__value {
    color: #0e2448;
    font-size: 1.34rem;
    line-height: 1.05;
    font-weight: 790;
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.db-kpi__label {
    margin-top: 4px;
    color: #315079;
    font-size: 0.72rem;
    line-height: 1.18;
    font-weight: 540;
}

.db-kpi__sub {
    margin-top: 3px;
    color: #71839a;
    font-size: 0.63rem;
    line-height: 1.15;
}

.db-trend {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.66rem;
    font-weight: 720;
    white-space: nowrap;
}
.db-trend svg { width: 11px; height: 11px; stroke-width: 2.5; }
.db-trend--green { color: #00a55e; }
.db-trend--red { color: #ee233b; }
.db-trend--slate { color: #738399; }

.db-kpi__budgetline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 5px;
    color: #36577e;
    font-size: 0.61rem;
    font-weight: 600;
}

/* ---------- Barres ------------------------------------------------------ */
.db-progress {
    height: 7px;
    border-radius: 999px;
    background: #e8eef4;
    overflow: hidden;
    min-width: 48px;
}
.db-progress--tiny { height: 3px; margin-top: 3px; }
.db-progress > span { display: block; height: 100%; border-radius: inherit; background: #06aa68; }
.db-progress > span.is-green { background: #08ad69; }
.db-progress > span.is-amber { background: #ff9b39; }
.db-progress > span.is-red { background: #ef4f5e; }
.db-progress > span.is-slate { background: #94a3b8; }

/* ---------- À traiter aujourd'hui -------------------------------------- */
.db-todo { padding: 9px 10px 10px; }
.db-todo .db-section-title { margin: 0 3px 8px; font-size: 0.94rem; }
.db-todo__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 9px;
}

.db-todo-item {
    min-width: 0;
    min-height: 59px;
    padding: 9px 11px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 5px;
    color: #102240;
    transition: filter .12s ease, transform .12s ease;
}

a.db-todo-item:hover { filter: brightness(.985); transform: translateY(-1px); }
.db-todo-item.is-zero { opacity: .72; }
.db-todo-item--red    { background: #fff0f2; border-color: #ffe3e7; }
.db-todo-item--amber  { background: #fff2e7; border-color: #ffe7d0; }
.db-todo-item--yellow { background: #fff7df; border-color: #ffedb9; }
.db-todo-item--rose   { background: #fff0f3; border-color: #ffe0e6; }
.db-todo-item--violet { background: #f4edff; border-color: #e8dbff; }
.db-todo-item--blue   { background: #eef5ff; border-color: #dceafe; }

.db-todo-item__icon {
    width: 27px; height: 27px; flex: 0 0 27px;
    display: grid; place-items: center;
    border-radius: 50%; color: #fff;
}
.db-todo-item__icon svg { width: 13px; height: 13px; stroke-width: 2.3; }
.db-todo-item--red .db-todo-item__icon    { background: #dc263b; }
.db-todo-item--amber .db-todo-item__icon  { background: #f47b17; }
.db-todo-item--yellow .db-todo-item__icon { background: #f0aa00; }
.db-todo-item--rose .db-todo-item__icon   { background: #d92d46; }
.db-todo-item--violet .db-todo-item__icon { background: #7422d3; }
.db-todo-item--blue .db-todo-item__icon   { background: #0d64e8; }

.db-todo-item__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.db-todo-item__text strong {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: #102240; font-size: 0.71rem; font-weight: 720; line-height: 1.15;
}
.db-todo-item__text small {
    display: inline-flex; align-items: center; gap: 2px;
    color: #0960dc; font-size: 0.65rem; font-weight: 560;
}
.db-todo-item__text small svg { width: 9px; height: 9px; }

/* ---------- Grilles principales ---------------------------------------- */
.db-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1.12fr) minmax(260px, .92fr);
    gap: 10px;
    align-items: stretch;
}

.db-bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

.db-main-grid > .db-card { min-height: 326px; }
.db-bottom-grid > .db-card { min-height: 278px; }

/* ---------- Tableaux ---------------------------------------------------- */
.db-table-wrap { min-width: 0; overflow-x: auto; }
.db-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.db-table th {
    padding: 7px 8px;
    background: #f7f9fb;
    border-bottom: 1px solid var(--db-border-soft);
    color: #183253;
    font-size: 0.61rem;
    font-weight: 730;
    line-height: 1.15;
    text-align: left;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}
.db-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #edf1f5;
    color: #1a2f4c;
    font-size: 0.67rem;
    line-height: 1.22;
    vertical-align: middle;
}
.db-table tbody tr:last-child td { border-bottom: 0; }
.db-clickable { cursor: pointer; }
.db-clickable:hover { background: #f8fbfd; }
.db-muted { color: #607690 !important; }
.db-empty { padding: 24px !important; text-align: center; color: #7d8fa4 !important; }

.db-project-table th:nth-child(1) { width: 28%; }
.db-project-table th:nth-child(2) { width: 8%; text-align: center; }
.db-project-table th:nth-child(3) { width: 22%; }
.db-project-table th:nth-child(4) { width: 19%; }
.db-project-table th:nth-child(5) { width: 23%; }
.db-project-table td:nth-child(2) { text-align: center; }

.db-contract-table th:nth-child(1) { width: 31%; }
.db-contract-table th:nth-child(2) { width: 25%; }
.db-contract-table th:nth-child(3) { width: 25%; }
.db-contract-table th:nth-child(4) { width: 19%; }
.db-team-table th:nth-child(1) { width: 35%; }
.db-team-table th:nth-child(2) { width: 31%; }
.db-team-table th:nth-child(3) { width: 34%; }

.db-project-name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.db-project-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 690; color: #102d55; }
.db-project-icon {
    width: 23px; height: 23px; flex: 0 0 23px;
    display: grid; place-items: center; border-radius: 6px;
    background: color-mix(in srgb, var(--project-color), white 86%);
    color: var(--project-color);
}
.db-project-icon svg { width: 14px; height: 14px; }

.db-health-dot { width: 9px; height: 9px; display: inline-block; border-radius: 50%; vertical-align: middle; }
.db-health-dot--green { background: #10a868; }
.db-health-dot--amber { background: #ff9800; }
.db-health-dot--red { background: #e4263f; }
.db-health-dot--slate, .db-health-dot--muted { background: #a9b5c4; }
.db-health-dot--blue { background: #1b73eb; }

.db-meter { display: flex; align-items: center; gap: 7px; min-width: 0; }
.db-meter .db-progress { flex: 1; min-width: 42px; }
.db-meter b { min-width: 31px; color: #264a76; font-size: 0.64rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.db-meter--team b { min-width: 34px; }
.db-overload { width: 12px; height: 12px; color: #df243d; flex: 0 0 12px; }

.db-cell-main { display: block; color: #14325a; font-weight: 660; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-cell-sub { display: block; margin-top: 1px; color: #55708f; font-size: 0.61rem; }

.db-person { display: flex; align-items: center; gap: 7px; min-width: 0; }
.db-person > span:last-child, .db-person > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-person > strong { color: #14325a; font-weight: 650; }
.db-avatar {
    width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%;
    display: grid; place-items: center; color: #fff;
    background: #64758a; font-size: 0.55rem; font-weight: 760;
}
.db-avatar--slate { background: #8190a4; }

.db-pill {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 3px 8px; border-radius: 7px;
    font-size: 0.61rem; font-weight: 650; line-height: 1.15; white-space: nowrap;
}
.db-pill--red { background: #ffe3e7; color: #d92038; }
.db-pill--amber { background: #fff0dd; color: #e86e06; }
.db-pill--green { background: #e3f8ef; color: #087d4a; }
.db-pill--blue { background: #e7f1ff; color: #0e60d9; }
.db-pill--violet { background: #f0e7ff; color: #6a20c8; }
.db-pill--slate { background: #eef2f6; color: #5d7188; }

/* ---------- Budget ------------------------------------------------------ */
.db-budget-body { padding: 10px 13px 9px; }
.db-budget-top { display: flex; align-items: center; gap: 12px; min-height: 132px; }
.db-donut { position: relative; width: 131px; height: 131px; flex: 0 0 131px; }
.db-donut__center {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; pointer-events: none;
}
.db-donut__center strong { color: #11274a; font-size: 1.03rem; line-height: 1; font-weight: 790; }
.db-donut__center span { margin-top: 3px; color: #5b7190; font-size: 0.61rem; }

.db-budget-legend { margin: 0; padding: 0; list-style: none; flex: 1; min-width: 0; }
.db-budget-legend li {
    display: grid;
    grid-template-columns: 9px auto 1fr auto;
    align-items: center; gap: 5px 7px;
    min-height: 26px; color: #325075;
}
.db-budget-legend li i { width: 9px; height: 9px; border-radius: 50%; }
.db-budget-legend li strong { color: #122d56; font-size: 0.67rem; font-weight: 740; white-space: nowrap; }
.db-budget-legend li span { color: #54708f; font-size: 0.62rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-budget-legend li b { color: #4e6685; font-size: 0.61rem; font-weight: 560; }
.db-budget-chart { height: 92px; margin-top: 2px; }
.db-chart-legend {
    margin-top: 5px; display: flex; align-items: center; justify-content: center;
    gap: 12px; color: #4f6887; font-size: 0.57rem; white-space: nowrap;
}
.db-chart-legend span { display: inline-flex; align-items: center; gap: 4px; }
.db-chart-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.db-chart-legend .is-green { background: #10a96b; }
.db-chart-legend .is-blue { background: #8fc1ff; }
.db-chart-legend .is-dash { width: 17px; height: 0; border-top: 1.5px dashed #344d70; border-radius: 0; }

/* ---------- Santé du SI ------------------------------------------------- */
.db-card__head--health .db-card-link { margin-left: auto; }
.db-live { display: inline-flex; align-items: center; gap: 5px; color: #4d6789; font-size: 0.61rem; white-space: nowrap; }
.db-live i { width: 7px; height: 7px; border-radius: 50%; background: #0ead69; }
.db-health-list { padding: 0 10px; }
.db-health-row {
    min-height: 44px;
    display: flex; align-items: center; gap: 9px;
    padding: 7px 2px; border-bottom: 1px solid #edf1f5;
}
.db-health-row:last-child { border-bottom: 0; }
.db-health-icon {
    width: 26px; height: 26px; flex: 0 0 26px; border-radius: 6px;
    display: grid; place-items: center;
}
.db-health-icon svg { width: 16px; height: 16px; }
.db-health-icon--green { color: #1164d8; background: #edf5ff; }
.db-health-icon--amber { color: #0a73dc; background: #edf5ff; }
.db-health-icon--red { color: #dc263d; background: #fff0f2; }
.db-health-row > strong {
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: #163257; font-size: 0.67rem; font-weight: 650;
}
.db-status {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px;
    border-radius: 999px; font-size: 0.59rem; font-weight: 630; white-space: nowrap;
}
.db-status i { width: 7px; height: 7px; border-radius: 50%; }
.db-status--green { background: #e2f8ef; color: #087c49; }
.db-status--green i { background: #10ad69; }
.db-status--amber { background: #fff0df; color: #e36d08; }
.db-status--amber i { background: #ff9818; }
.db-status--red { background: #ffe5e9; color: #d82138; }
.db-status--red i { background: #e52c43; }

/* ---------- Prochaines échéances --------------------------------------- */
.db-select-look {
    margin-left: auto; min-width: 72px; height: 28px; padding: 0 9px;
    display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
    color: #17355c; background: #fff; border: 1px solid #dbe3ec; border-radius: 5px;
    font-size: 0.61rem; font-weight: 600;
}
.db-select-look svg { width: 11px; height: 11px; }
.db-deadline-head {
    display: grid; grid-template-columns: 54px 1fr 62px; gap: 7px;
    padding: 7px 9px; background: #f7f9fb; border-bottom: 1px solid #edf1f5;
    color: #183253; font-size: 0.59rem; font-weight: 730;
}
.db-deadline-row {
    display: grid; grid-template-columns: 54px 1fr 62px; gap: 7px; align-items: center;
    min-height: 36px; padding: 5px 9px; border-bottom: 1px solid #edf1f5;
}
.db-deadline-row:last-child { border-bottom: 0; }
.db-deadline-date { color: #264a76; font-size: 0.62rem; font-weight: 620; font-variant-numeric: tabular-nums; }
.db-deadline-event { display: flex; align-items: center; gap: 7px; min-width: 0; }
.db-deadline-event > span { min-width: 0; }
.db-deadline-event strong { display: block; color: #14325a; font-size: 0.64rem; font-weight: 680; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.db-deadline-event small { display: block; margin-top: 1px; color: #52708f; font-size: 0.57rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ---------- Responsive -------------------------------------------------- */
@media (max-width: 1280px) {
    .db-kpis, .db-todo__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .db-kpi { min-height: 86px; }
}

@media (max-width: 1180px) {
    .db-main-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
    .db-main-grid > .db-health-card { grid-column: 1 / -1; min-height: 0; }
    .db-bottom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .db-bottom-grid > .db-deadlines-card { grid-column: 1 / -1; }
}

@media (max-width: 880px) {
    body:has(.dashboard-v3) .content { padding-left: 12px; padding-right: 12px; }
    body:has(.dashboard-v3) .page-header .icon-badge--lg { width: 34px; height: 34px; flex-basis: 34px; }
    .dashboard-date { width: 100%; justify-content: flex-start; }
    .db-main-grid, .db-bottom-grid { grid-template-columns: minmax(0, 1fr); }
    .db-main-grid > .db-health-card, .db-bottom-grid > .db-deadlines-card { grid-column: auto; }
}

@media (max-width: 690px) {
    .db-kpis, .db-todo__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 460px) {
    .db-kpis, .db-todo__grid { grid-template-columns: minmax(0, 1fr); }
    .db-budget-top { flex-direction: column; align-items: stretch; }
    .db-donut { margin: 0 auto; }
}

/* ==========================================================================
   Portefeuille projets — vue direction / pilotage
   ========================================================================== */
.portfolio-page { gap: 14px; }

.portfolio-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.portfolio-kpi {
    min-width: 0;
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 17px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 9px;
    box-shadow: 0 1px 2px rgba(16, 32, 48, 0.025);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color .12s, box-shadow .12s;
}
.portfolio-kpi:hover { border-color: #c7d2e0; box-shadow: 0 2px 6px rgba(16, 32, 48, 0.06); }
.portfolio-kpi.is-active { border-color: #1368ee; box-shadow: inset 0 0 0 1px #1368ee; }

.portfolio-kpi__icon {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    display: grid;
    place-items: center;
    border-radius: 50%;
}
.portfolio-kpi__icon svg { width: 24px; height: 24px; stroke-width: 2.2; }
.portfolio-kpi__icon--green { color: #04964b; background: #e6f8ef; }
.portfolio-kpi__icon--red { color: #ef233c; background: #fde9ed; }
.portfolio-kpi__icon--amber { color: #ff7a00; background: #fff0df; }
.portfolio-kpi__icon--blue { color: #1368ee; background: #e9f1ff; }

.portfolio-kpi__body { min-width: 0; }
.portfolio-kpi__top { display: flex; align-items: center; gap: 8px; }
.portfolio-kpi__top strong {
    font-size: 1.55rem;
    line-height: 1;
    letter-spacing: -.045em;
    color: #0d1b33;
}
.portfolio-kpi__body > span { display: block; margin-top: 5px; font-size: .77rem; color: #50637a; }

.portfolio-actions { overflow: hidden; border-radius: 10px; }
.portfolio-actions__title { padding: 11px 16px 6px; font-size: .96rem; font-weight: 750; color: #111d31; }
.portfolio-actions__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 0 16px 13px;
}
.portfolio-alert {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 55px;
    padding: 10px 13px;
    border-radius: 5px;
    transition: transform .12s ease, filter .12s ease;
}
.portfolio-alert:hover { transform: translateY(-1px); filter: saturate(1.03); }
.portfolio-alert__icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
}
.portfolio-alert__icon svg { width: 14px; height: 14px; }
.portfolio-alert strong { display: block; font-size: .76rem; color: #172238; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portfolio-alert small { display: block; margin-top: 2px; color: #0767df; font-size: .69rem; }
.portfolio-alert--red { background: #fff0f2; }
.portfolio-alert--red .portfolio-alert__icon { background: #dd1f38; }
.portfolio-alert--orange { background: #fff3e9; }
.portfolio-alert--orange .portfolio-alert__icon { background: #ff7a00; }
.portfolio-alert--yellow { background: #fff8e7; }
.portfolio-alert--yellow .portfolio-alert__icon { background: #f2b300; }
.portfolio-alert--blue { background: #eef5ff; }
.portfolio-alert--blue .portfolio-alert__icon { background: #1267eb; }

.portfolio-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 12px;
    align-items: start;
}
.portfolio-main { min-width: 0; overflow: visible; border-radius: 10px; }
.portfolio-card-head {
    min-height: 48px;
    padding: 10px 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}
.portfolio-card-head h2 { font-size: .93rem; }
.portfolio-card-head > :last-child { margin-left: auto; }

.portfolio-filters { padding: 10px 13px; border-bottom: 1px solid var(--border); }
.portfolio-filter-form {
    display: grid;
    grid-template-columns: minmax(200px, 1.25fr) minmax(130px, .75fr) minmax(150px, .85fr) minmax(160px, .9fr) auto;
    gap: 8px;
    align-items: center;
}
.portfolio-filter-form .select { min-width: 0; height: 34px; font-size: .71rem; border-radius: 5px; }
.portfolio-search { min-width: 0; height: 34px; border-radius: 5px; }
.portfolio-search input { font-size: .71rem; }
.portfolio-reset { color: #0671e9; font-size: .69rem; font-weight: 600; white-space: nowrap; }

.portfolio-table-wrap { min-width: 0; }
.portfolio-table { table-layout: fixed; font-size: .69rem; }
.portfolio-table thead th {
    padding: 9px 8px;
    background: #f8fafc;
    color: #243249;
    font-size: .64rem;
    font-weight: 750;
    border-bottom: 1px solid #dde4ec;
    white-space: nowrap;
}
.portfolio-table tbody td {
    height: 49px;
    padding: 7px 8px;
    border-bottom: 1px solid #e7edf2;
    color: #233248;
    vertical-align: middle;
    overflow: hidden;
}
.portfolio-table tbody tr { background: #fff; transition: background .12s ease; }
.portfolio-table tbody tr:hover { background: #f9fbfd; }
.portfolio-table th:nth-child(1) { width: 19%; }
.portfolio-table th:nth-child(2) { width: 6%; text-align: center; }
.portfolio-table th:nth-child(3) { width: 9%; }
.portfolio-table th:nth-child(4) { width: 11%; }
.portfolio-table th:nth-child(5) { width: 11%; }
.portfolio-table th:nth-child(6) { width: 15%; }
.portfolio-table th:nth-child(7) { width: 13%; }
.portfolio-table th:nth-child(8) { width: 6%; }
.portfolio-table th:nth-child(9) { width: 9%; }
.portfolio-table th:nth-child(10) { width: 30px; }
.portfolio-table td:nth-child(2) { text-align: center; }

.portfolio-project-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.portfolio-project-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    color: var(--project-color, #1478ed);
    background: color-mix(in srgb, var(--project-color, #1478ed) 12%, white);
    border-radius: 50%;
}
.portfolio-project-icon svg { width: 16px; height: 16px; stroke-width: 2.25; }
.portfolio-project-icon--lg { width: 38px; height: 38px; flex-basis: 38px; }
.portfolio-project-icon--lg svg { width: 20px; height: 20px; }
.portfolio-project-copy { min-width: 0; display: block; }
.portfolio-project-copy strong { display: block; color: #11203a; font-size: .7rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portfolio-project-copy small { display: block; margin-top: 2px; color: #7a899d; font-size: .61rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.portfolio-health-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #a9b5c5; }
.portfolio-health-dot--green { background: #08ad5a; }
.portfolio-health-dot--amber { background: #ff9b16; }
.portfolio-health-dot--red { background: #f04452; }
.portfolio-health-dot--muted { background: #a9b5c5; }

.portfolio-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 23px;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
    font-weight: 650;
    font-size: .62rem;
}
.portfolio-status--green { background: #e4f8ed; color: #078a43; }
.portfolio-status--red { background: #fee8ec; color: #d92039; }
.portfolio-status--amber { background: #fff1dc; color: #bd7000; }
.portfolio-status--blue { background: #e8f1ff; color: #0669e4; }
.portfolio-status--slate { background: #eef2f6; color: #64748b; }

.portfolio-progress { display: flex; align-items: center; gap: 7px; white-space: nowrap; color: #34445a; }
.portfolio-progress__track { width: 63px; height: 7px; flex: 0 0 63px; overflow: hidden; background: #eaf0f4; border-radius: 999px; }
.portfolio-progress__fill { display: block; height: 100%; border-radius: inherit; background: #08ad5a; }
.portfolio-progress__fill--amber { background: #f8ba22; }
.portfolio-progress__fill--red { background: #f04d5d; }
.portfolio-date { white-space: nowrap; color: #31445e; font-variant-numeric: tabular-nums; }
.portfolio-date span { color: #71839a; padding: 0 2px; }
.portfolio-milestone { min-width: 0; display: block; }
.portfolio-milestone strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .67rem; color: #22344c; }
.portfolio-milestone small { display: block; color: #72839a; font-size: .61rem; }
.portfolio-owner { display: flex; align-items: center; gap: 6px; min-width: 0; }
.portfolio-owner .person-avatar { width: 22px !important; height: 22px !important; flex: 0 0 22px !important; font-size: .53rem !important; }
.portfolio-owner > span:last-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portfolio-team { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.portfolio-team svg { width: 13px; height: 13px; }
.portfolio-axis { display: inline-block; max-width: 100%; padding: 3px 8px; border-radius: 5px; background: #eaf3ff; color: #0872e8; font-size: .59rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portfolio-more { color: #62748a; }

.portfolio-pagination {
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 13px;
    color: #607188;
    font-size: .67rem;
}
.portfolio-pagination__controls { margin-left: auto; display: flex; align-items: center; gap: 13px; }
.portfolio-page-btn {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #dce4ed;
    background: #fff;
    color: #35475f;
    border-radius: 4px;
    font-size: .65rem;
}
.portfolio-page-btn.is-active { background: #0f6fe9; color: #fff; border-color: #0f6fe9; }
.portfolio-page-btn.is-disabled { opacity: .38; pointer-events: none; }
.portfolio-page-size { width: 94px; height: 30px; font-size: .65rem; border-radius: 4px; }
.portfolio-grid-view { padding: 14px; }
.portfolio-project-card { border-radius: 9px; }

.portfolio-side { gap: 10px; }
.portfolio-widget { border-radius: 10px; padding: 13px 13px 12px; }
.portfolio-widget__title { font-size: .76rem; font-weight: 750; color: #17243a; }
.portfolio-widget__head { display: flex; align-items: center; gap: 10px; }
.portfolio-widget__head > a { margin-left: auto; color: #086fe8; font-size: .62rem; }
.portfolio-donut-row { display: grid; grid-template-columns: 115px 1fr; align-items: center; gap: 10px; margin-top: 9px; }
.portfolio-donut {
    width: 102px;
    height: 102px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--donut);
    position: relative;
}
.portfolio-donut::after { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: #fff; }
.portfolio-donut > span { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; text-align: center; }
.portfolio-donut strong { font-size: 1rem; color: #14233b; }
.portfolio-donut small { color: #61738b; font-size: .59rem; }
.portfolio-donut-legend { display: grid; gap: 6px; }
.portfolio-donut-legend > div { display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: center; gap: 5px; color: #35465e; font-size: .62rem; }
.portfolio-donut-legend strong { color: #1b2d46; font-size: .62rem; white-space: nowrap; }
.portfolio-legend-dot { width: 8px; height: 8px; border-radius: 50%; }

.portfolio-domain-list { display: grid; gap: 7px; margin-top: 10px; }
.portfolio-domain-row { display: grid; grid-template-columns: 82px minmax(0,1fr) 20px; align-items: center; gap: 7px; color: #33455e; font-size: .62rem; }
.portfolio-domain-row > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.portfolio-domain-row strong { text-align: right; font-size: .62rem; }
.portfolio-domain-track { height: 10px; overflow: hidden; border-radius: 2px; background: #edf2f6; }
.portfolio-domain-track i { display: block; height: 100%; border-radius: 1px; }

.portfolio-deadline-list { display: grid; margin-top: 7px; }
.portfolio-deadline { min-height: 45px; display: grid; grid-template-columns: 32px 10px minmax(0,1fr); gap: 7px; align-items: center; border-bottom: 1px solid #edf1f5; }
.portfolio-deadline:last-child { border-bottom: 0; }
.portfolio-deadline__date { width: 30px; height: 33px; display: grid; place-content: center; text-align: center; border: 1px solid #e0e6ed; border-radius: 4px; background: #fff; }
.portfolio-deadline__date strong { font-size: .66rem; color: #1f3451; line-height: 1; }
.portfolio-deadline__date small { font-size: .48rem; color: #7c8da2; line-height: 1.1; }
.portfolio-deadline .portfolio-health-dot { width: 7px; height: 7px; }
.portfolio-deadline__copy { min-width: 0; }
.portfolio-deadline__copy strong { display: block; color: #1e3049; font-size: .63rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portfolio-deadline__copy small { display: block; color: #76879b; font-size: .57rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Sélecteur d'icône dans le formulaire projet */
.project-icon-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 3px; }
.project-icon-choice { position: relative; min-width: 0; cursor: pointer; }
.project-icon-choice input { position: absolute; opacity: 0; pointer-events: none; }
.project-icon-choice__visual {
    height: 54px;
    display: grid;
    place-items: center;
    border: 1px solid #dfe6ed;
    border-radius: 8px;
    background: #fff;
    color: #4f6279;
    transition: border-color .12s ease, background .12s ease, color .12s ease, box-shadow .12s ease;
}
.project-icon-choice__visual svg { width: 22px; height: 22px; }
.project-icon-choice__label { display: block; margin-top: 4px; color: #718197; font-size: .62rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-icon-choice input:checked + .project-icon-choice__visual { border-color: var(--green); background: var(--green-soft); color: var(--green); box-shadow: 0 0 0 2px var(--green-ring); }
.project-icon-choice:focus-within .project-icon-choice__visual { outline: 2px solid var(--green-ring); outline-offset: 2px; }
.project-color-field { display: flex; gap: 8px; align-items: center; }
.project-color-input { width: 52px; height: 38px; padding: 2px; border: 1px solid #dce4ec; border-radius: 7px; background: #fff; cursor: pointer; }
.project-color-hex { width: 110px; }

@media (max-width: 1350px) {
    .portfolio-layout { grid-template-columns: minmax(0, 1fr) 270px; }
    .portfolio-table { font-size: .65rem; }
    .portfolio-table th:nth-child(9), .portfolio-table td:nth-child(9) { display: none; }
    .portfolio-table th:nth-child(1) { width: 21%; }
}

@media (max-width: 1120px) {
    .portfolio-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .portfolio-actions__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portfolio-layout { grid-template-columns: 1fr; }
    .portfolio-side { grid-template-columns: repeat(3, minmax(0,1fr)); display: grid; }
    .portfolio-filter-form { grid-template-columns: 1fr 1fr 1fr; }
    .portfolio-search { grid-column: span 2; }
    .portfolio-table-wrap { overflow-x: auto; }
    .portfolio-table { min-width: 940px; }
}

@media (max-width: 760px) {
    .portfolio-kpis { grid-template-columns: 1fr 1fr; }
    .portfolio-actions__grid { grid-template-columns: 1fr; }
    .portfolio-side { grid-template-columns: 1fr; }
    .portfolio-filter-form { grid-template-columns: 1fr; }
    .portfolio-search { grid-column: auto; }
    .portfolio-pagination { align-items: flex-start; flex-direction: column; }
    .portfolio-pagination__controls { margin-left: 0; width: 100%; justify-content: space-between; }
    .project-icon-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ==========================================================================
   Contrats — vue direction alignée sur la maquette validée
   ========================================================================== */
body:has(.contracts-v2) .content {
    padding-top: 14px;
}
body:has(.contracts-v2) .page-header {
    align-items: center;
    margin-bottom: 12px;
}
body:has(.contracts-v2) .page-header > .row {
    align-items: center !important;
}
body:has(.contracts-v2) .page-header .icon-badge--lg {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    border-radius: 13px;
    color: #1373e8;
    background: #eaf4ff !important;
}
body:has(.contracts-v2) .page-header .icon-badge--lg svg {
    width: 29px;
    height: 29px;
    stroke-width: 2.05;
}
body:has(.contracts-v2) .topbar__eyebrow {
    color: #536b88;
    font-size: .72rem;
    font-weight: 560;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 7px;
}
body:has(.contracts-v2) .page-header h1 {
    color: #10213b;
    font-size: 1.62rem;
    line-height: 1.05;
    letter-spacing: -.035em;
}
body:has(.contracts-v2) .page-header__subtitle {
    margin-top: 5px;
    color: #506785;
    font-size: .81rem;
    max-width: none;
}
.contracts-new-btn {
    height: 38px;
    padding-inline: 16px;
    border-radius: 6px;
    background: #0d72ed !important;
    box-shadow: 0 2px 6px rgba(13, 114, 237, .15);
    font-size: .74rem;
}
.contracts-more-btn {
    width: 39px;
    height: 38px;
    border: 1px solid #dbe4ee;
    border-radius: 6px;
    background: #fff;
}

.contracts-v2 {
    gap: 12px;
    color: #18304f;
}

/* KPI */
.contracts-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 11px;
}
.contracts-kpi {
    min-width: 0;
    min-height: 91px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e1e7ee;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(19, 40, 66, .025);
}
.contracts-kpi__icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
}
.contracts-kpi__icon svg { width: 25px; height: 25px; stroke-width: 2.15; }
.contracts-kpi__icon--green { color: #009d57; background: #e4f8ef; }
.contracts-kpi__icon--red { color: #e51e35; background: #fde8ec; }
.contracts-kpi__icon--amber { color: #f39a00; background: #fff1de; }
.contracts-kpi__icon--blue { color: #1268e8; background: #eaf2ff; }
.contracts-kpi__copy { min-width: 0; display: flex; flex-direction: column; }
.contracts-kpi__copy > span {
    color: #213757;
    font-size: .69rem;
    font-weight: 650;
    line-height: 1.15;
}
.contracts-kpi__copy > strong {
    margin-top: 6px;
    color: #12213c;
    font-size: 1.42rem;
    line-height: 1;
    letter-spacing: -.04em;
    font-weight: 780;
    white-space: nowrap;
}
.contracts-kpi__copy > strong.is-red { color: #dc1730; }
.contracts-kpi__copy > strong.contracts-kpi__date { font-size: 1.25rem; }
.contracts-kpi__copy > small {
    margin-top: 5px;
    color: #516b8b;
    font-size: .64rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.contracts-kpi__trend { color: #00a75d !important; font-weight: 650; }
.contracts-kpi__trend svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; }

/* Bannière échéance */
.contracts-expiry-alert {
    min-height: 67px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 15px 12px 18px;
    border: 1px solid #f2ccd2;
    border-radius: 7px;
    background: linear-gradient(90deg, #fff0f2 0%, #fff7f8 100%);
}
.contracts-expiry-alert--warning { border-color: #f4d9b7; background: linear-gradient(90deg, #fff5e9 0%, #fffaf4 100%); }
.contracts-expiry-alert--ok { border-color: #cce8d8; background: linear-gradient(90deg, #eefaf4 0%, #f8fcfa 100%); }
.contracts-expiry-alert__icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #e21c34;
}
.contracts-expiry-alert--warning .contracts-expiry-alert__icon { background: #f08c00; }
.contracts-expiry-alert--ok .contracts-expiry-alert__icon { background: #079b52; }
.contracts-expiry-alert__icon svg { width: 21px; height: 21px; }
.contracts-expiry-alert__copy { min-width: 0; }
.contracts-expiry-alert__copy strong {
    display: block;
    color: #d91c34;
    font-size: .94rem;
    font-weight: 760;
    letter-spacing: -.012em;
}
.contracts-expiry-alert--warning .contracts-expiry-alert__copy strong { color: #cf6f00; }
.contracts-expiry-alert--ok .contracts-expiry-alert__copy strong { color: #087d45; }
.contracts-expiry-alert__copy span {
    display: block;
    margin-top: 2px;
    color: #e33145;
    font-size: .71rem;
    font-weight: 520;
}
.contracts-expiry-alert--warning .contracts-expiry-alert__copy span { color: #b86600; }
.contracts-expiry-alert--ok .contracts-expiry-alert__copy span { color: #3b7560; }
.contracts-expiry-alert__action {
    margin-left: auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 7px 12px;
    border: 1px solid #d8e0e8;
    border-radius: 5px;
    background: #fff;
    color: #243b5a;
    font-size: .68rem;
    font-weight: 650;
    white-space: nowrap;
}
.contracts-expiry-alert__action svg { width: 14px; height: 14px; }

/* Onglets */
.contracts-tabs {
    min-height: 42px;
    gap: 0;
    margin: 0;
    border-bottom: 1px solid #dfe5ec;
}
.contracts-tabs a {
    min-width: 120px;
    padding: 12px 17px 11px;
    text-align: center;
    color: #19365d;
    font-size: .69rem;
    font-weight: 560;
    border-bottom: 2px solid transparent;
}
.contracts-tabs a.is-active {
    color: #049447;
    font-weight: 710;
    border-bottom-color: #08a052;
}

/* Grille principale */
.contracts-overview-grid {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr) 315px;
    gap: 11px;
    align-items: stretch;
}
.contracts-overview-grid.is-collapsed { grid-template-columns: 210px minmax(0, 1fr); }
.contracts-overview-grid.is-collapsed .contracts-side { display: none; }

/* Filtres */
.contracts-filter-card,
.contracts-list-card,
.contracts-side-card {
    min-width: 0;
    background: #fff;
    border: 1px solid #dfe6ed;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(20, 42, 68, .018);
}
.contracts-filter-card { overflow: hidden; }
.contracts-filter-card__title {
    min-height: 47px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
    border-bottom: 1px solid #e6ebf0;
    color: #172c49;
    font-size: .81rem;
    font-weight: 760;
}
.contracts-filter-card__title svg { width: 17px; height: 17px; }
.contracts-filter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 13px 13px 15px;
}
.contracts-filter-field { display: grid; gap: 5px; }
.contracts-filter-field > label:first-child {
    color: #27405f;
    font-size: .64rem;
    font-weight: 700;
}
.contracts-filter-field .select {
    height: 35px;
    padding: 0 30px 0 10px;
    border-radius: 5px;
    border-color: #d9e1ea;
    color: #24405f;
    background-color: #fff;
    font-size: .65rem;
}
.contracts-filter-search {
    height: 35px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 9px;
    border: 1px solid #d9e1ea;
    border-radius: 5px;
    background: #fff;
}
.contracts-filter-search svg { width: 13px; height: 13px; color: #7a8da5; }
.contracts-filter-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #263f5f;
    font: inherit;
    font-size: .65rem;
}
.contracts-filter-search input::placeholder { color: #9aa7b7; }
.contracts-filter-deadline { gap: 7px; }
.contracts-check {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #425975;
    font-size: .64rem;
    line-height: 1.2;
    cursor: pointer;
}
.contracts-check input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #0a9850;
}
.contracts-filter-reset {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 3px;
    border: 1px solid #d9e1e9;
    border-radius: 5px;
    color: #264566;
    background: #fff;
    font-size: .66rem;
    font-weight: 610;
}
.contracts-filter-reset svg { width: 14px; height: 14px; }

/* Tableau */
.contracts-list-card { overflow: hidden; }
.contracts-list-head {
    min-height: 47px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid #e4eaf0;
}
.contracts-list-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #142b49;
    font-size: .79rem;
    font-weight: 760;
}
.contracts-list-title svg { width: 16px; height: 16px; }
.contracts-export {
    margin-left: auto;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid #d8e0e8;
    border-radius: 5px;
    color: #1d3b61;
    background: #fff;
    font-size: .64rem;
    font-weight: 630;
}
.contracts-export svg { width: 13px; height: 13px; }
.contracts-table-scroll { width: 100%; overflow-x: auto; }
.contracts-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    table-layout: fixed;
}
.contracts-table thead th {
    height: 34px;
    padding: 7px 8px;
    text-align: left;
    vertical-align: middle;
    background: #f7f9fb;
    border-bottom: 1px solid #dfe6ed;
    color: #263b59;
    font-size: .58rem;
    font-weight: 760;
    white-space: nowrap;
}
.contracts-table tbody td {
    height: 39px;
    padding: 7px 8px;
    border-bottom: 1px solid #e8edf2;
    color: #2d4564;
    font-size: .6rem;
    line-height: 1.2;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.contracts-table tbody tr { cursor: pointer; transition: background .12s ease; }
.contracts-table tbody tr:hover { background: #f8fbfe; }
.contracts-table tbody tr.is-selected { background: #eef6ff; }
.contracts-table tbody tr.is-selected td:first-child { box-shadow: inset 3px 0 0 #1a76e8; }
.contracts-table th:nth-child(1) { width: 15%; }
.contracts-table th:nth-child(2) { width: 11%; }
.contracts-table th:nth-child(3) { width: 10%; }
.contracts-table th:nth-child(4) { width: 10%; }
.contracts-table th:nth-child(5) { width: 10%; }
.contracts-table th:nth-child(6) { width: 10%; }
.contracts-table th:nth-child(7) { width: 13%; }
.contracts-table th:nth-child(8) { width: 11%; }
.contracts-table th:nth-child(9) { width: 10%; }
.contracts-table .num { text-align: right; }
.contracts-table__name { color: #1b3658; font-weight: 710; }
.contracts-table__amount { color: #213a59 !important; font-weight: 640; }
.contracts-sort { margin-left: 4px; color: #8596aa; font-size: .56rem; }
.contract-date-hot {
    display: inline-flex;
    padding: 3px 6px;
    border-radius: 7px;
    color: #df2c3c;
    background: #ffedef;
    font-weight: 640;
}
.contract-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 21px;
    max-width: 100%;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: .58rem;
    font-weight: 680;
    white-space: nowrap;
}
.contract-pill--green { color: #098348; background: #e2f7ec; }
.contract-pill--amber { color: #c16a00; background: #fff1dc; }
.contract-pill--orange { color: #ef6a00; background: #fff0e3; }
.contract-pill--red { color: #de2639; background: #ffe7eb; }
.contract-pill--slate { color: #4d6581; background: #edf2f7; }
.contract-pill--blue { color: #1267d9; background: #e8f1ff; }

.contracts-pagination {
    min-height: 55px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-top: 1px solid #e7edf2;
    color: #61738a;
    font-size: .62rem;
}
.contracts-pagination__pages {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 3px;
}
.contracts-page-button {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #223e62;
    background: #fff;
    font-size: .61rem;
}
.contracts-page-button:hover { border-color: #d9e1e9; }
.contracts-page-button.is-active { color: #fff; border-color: #0e70e9; background: #0e70e9; }
.contracts-page-button.is-disabled { opacity: .35; pointer-events: none; }
.contracts-page-size-form { margin-left: 8px; }
.contracts-page-size-form .select { width: 95px; height: 31px; padding-left: 9px; font-size: .61rem; border-radius: 4px; }

/* Panneau détail */
.contracts-side {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.contracts-side-card { overflow: hidden; }
.contract-detail-panel__head {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-bottom: 1px solid #e7ecf1;
}
.contract-detail-panel__title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #162b48;
    font-size: .75rem;
    font-weight: 760;
}
.contract-detail-panel__title svg { width: 15px; height: 15px; }
.contract-detail-panel__close {
    width: 28px;
    height: 28px;
    margin-left: auto;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #57708d;
    cursor: pointer;
}
.contract-detail-panel__close:hover { background: #f1f5f8; }
.contract-detail-panel__close svg { width: 14px; height: 14px; }
.contract-detail-panel__body { padding: 12px; }
.contract-detail-identity {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 11px;
}
.contract-detail-logo {
    width: 51px;
    height: 51px;
    flex: 0 0 51px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #1e8ee5;
}
.contract-detail-logo svg { width: 23px; height: 23px; }
.contract-detail-logo--green { background: #08a45a; }
.contract-detail-logo--amber { background: #f09a13; }
.contract-detail-logo--orange { background: #f47a14; }
.contract-detail-logo--red { background: #e33a4d; }
.contract-detail-logo--slate { background: #718199; }
.contract-detail-name { color: #102643; font-size: 1.05rem; font-weight: 790; letter-spacing: -.025em; line-height: 1.05; }
.contract-detail-vendor { margin-top: 3px; color: #637791; font-size: .67rem; }
.contract-detail-list { display: grid; gap: 4px; margin: 0; }
.contract-detail-list > div {
    display: grid;
    grid-template-columns: 43% minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 20px;
}
.contract-detail-list dt { color: #5a6f8a; font-size: .63rem; }
.contract-detail-list dd { min-width: 0; margin: 0; color: #1e395d; font-size: .63rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.contract-keydates { margin-top: 13px; padding-top: 10px; border-top: 1px solid #eef1f4; }
.contract-keydates__title { color: #172e4d; font-size: .7rem; font-weight: 750; }
.contract-keydates__line {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-top: 16px;
}
.contract-keydates__line::before {
    content: "";
    position: absolute;
    left: 15%;
    right: 15%;
    top: 5px;
    height: 2px;
    background: #dfe6ee;
}
.contract-keydate { position: relative; z-index: 1; padding-top: 16px; text-align: center; min-width: 0; }
.contract-keydate__dot {
    position: absolute;
    top: 0;
    left: 50%;
    width: 12px;
    height: 12px;
    transform: translateX(-50%);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(20, 40, 70, .04);
}
.contract-keydate--start .contract-keydate__dot { background: #0aa05b; }
.contract-keydate--notice .contract-keydate__dot { background: #1674eb; }
.contract-keydate--end .contract-keydate__dot { background: #e52338; }
.contract-keydate strong { display: block; color: #1c3556; font-size: .59rem; font-weight: 710; white-space: nowrap; }
.contract-keydate--end strong { color: #d92539; }
.contract-keydate small { display: block; margin-top: 2px; color: #71839a; font-size: .53rem; line-height: 1.22; }
.contract-keydate--end small { color: #df3548; }

.contract-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 13px;
}
.contract-action {
    min-width: 0;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 8px;
    border: 1px solid #d8e1e9;
    border-radius: 5px;
    color: #243f62;
    background: #fff;
    font-size: .58rem;
    font-weight: 650;
    text-align: center;
}
.contract-action svg { width: 13px; height: 13px; }
.contract-action--primary { color: #fff; border-color: #0d70ea; background: #0d70ea; }
.contract-action.is-disabled { opacity: .45; pointer-events: none; }

/* Échéances du panneau droit */
.contracts-upcoming__head {
    min-height: 43px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-bottom: 1px solid #e7edf2;
    color: #17304f;
    font-size: .69rem;
    font-weight: 760;
}
.contracts-upcoming__head > div { display: flex; align-items: center; gap: 7px; }
.contracts-upcoming__head svg { width: 14px; height: 14px; }
.contracts-upcoming__head a { margin-left: auto; padding: 3px 7px; border-radius: 999px; color: #076bdf; background: #e9f3ff; font-size: .55rem; font-weight: 650; }
.contracts-upcoming__list { padding: 3px 11px 7px; }
.contracts-upcoming__row {
    min-height: 31px;
    display: grid;
    grid-template-columns: 7px minmax(0, 1fr) 69px 46px;
    gap: 6px;
    align-items: center;
    color: inherit;
}
.contracts-upcoming__row + .contracts-upcoming__row { border-top: 1px solid #f0f3f6; }
.contracts-upcoming__dot { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; }
.contracts-upcoming__dot--red { background: #e52e41; }
.contracts-upcoming__dot--amber { background: #f29b0b; }
.contracts-upcoming__dot--slate { background: #9aa8b8; }
.contracts-upcoming__row strong { min-width: 0; color: #273d5b; font-size: .57rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contracts-upcoming__date { color: #385271; font-size: .55rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.contracts-upcoming .contract-pill { min-height: 19px; padding: 2px 6px; font-size: .52rem; }
.contracts-upcoming__empty { padding: 14px 4px; color: #7b8da2; font-size: .62rem; text-align: center; }

/* Les anciens onglets restent fonctionnels mais s'intègrent au même rythme visuel. */
.contracts-v2 > .tab-panel:not(#tab-overview) > .card,
.contracts-v2 > .tab-panel:not(#tab-overview) .card {
    border-radius: 8px;
}

@media (max-width: 1420px) {
    .contracts-overview-grid { grid-template-columns: 195px minmax(0, 1fr) 290px; }
    .contracts-table thead th, .contracts-table tbody td { padding-left: 6px; padding-right: 6px; }
    .contracts-side { font-size: .96em; }
}

@media (max-width: 1240px) {
    .contracts-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .contracts-overview-grid,
    .contracts-overview-grid.is-collapsed { grid-template-columns: 205px minmax(0, 1fr); }
    .contracts-side { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .contracts-overview-grid.is-collapsed .contracts-side { display: none; }
    .contracts-table { min-width: 850px; }
}

@media (max-width: 900px) {
    .contracts-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contracts-expiry-alert { align-items: flex-start; flex-wrap: wrap; }
    .contracts-expiry-alert__action { margin-left: 56px; }
    .contracts-tabs { overflow-x: auto; }
    .contracts-tabs a { min-width: 110px; }
    .contracts-overview-grid,
    .contracts-overview-grid.is-collapsed { grid-template-columns: 1fr; }
    .contracts-side { grid-column: auto; grid-template-columns: 1fr; }
    .contracts-filter-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contracts-filter-deadline, .contracts-filter-reset { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .contracts-kpis { grid-template-columns: 1fr; }
    .contracts-kpi { min-height: 82px; }
    .contracts-expiry-alert__action { margin-left: 0; width: 100%; justify-content: center; }
    .contracts-filter-form { grid-template-columns: 1fr; }
    .contracts-filter-deadline, .contracts-filter-reset { grid-column: auto; }
    .contracts-pagination { flex-wrap: wrap; }
    .contracts-pagination__pages { margin-left: 0; order: 3; width: 100%; }
    .contracts-page-size-form { margin-left: auto; }
}


/* ==========================================================================
   Tableau de bord — vue Direction (lecture d'arbitrage)
   Selecteurs .executive-* repris du patch V6, le reste de la feuille
   (vue DSI .db-*) est inchange.
   ========================================================================== */

.executive-dashboard {
    gap: 14px;
}

.executive-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.executive-kpi {
    min-height: 122px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    border-radius: 14px !important;
}

.executive-kpi:hover {
    border-color: #ccd8e5;
    transform: translateY(-1px);
}

.executive-kpi__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: none;
}

.executive-kpi__icon svg {
    width: 24px;
    height: 24px;
}

.executive-kpi__icon--green { background:#e5f7ed; color:#0a9a58; }

.executive-kpi__icon--blue { background:#e9f2ff; color:#1d6fe8; }

.executive-kpi__icon--red { background:#fdebed; color:#df283f; }

.executive-kpi__icon--amber { background:#fff1df; color:#ed8a19; }

.executive-kpi__body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.executive-kpi__body > strong {
    font-size: 1.9rem;
    line-height: 1;
    color: #0d2146;
    letter-spacing: -.04em;
}

.executive-kpi__label {
    margin-top: 7px;
    color: #17315c;
    font-weight: 700;
    font-size: .9rem;
}

.executive-kpi__body small {
    margin-top: 8px;
    color: #657892;
    line-height: 1.35;
    font-size: .76rem;
}

.executive-kpi__progress {
    margin-top: 9px;
    height: 7px;
}

.executive-actions {
    border-color: #f6cfd3 !important;
    overflow: hidden;
    border-radius: 14px !important;
    background: linear-gradient(180deg, #fff9f9, #fff);
}

.executive-actions__head {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    border-bottom: 1px solid #f3dfe1;
    gap: 12px;
}

.executive-actions__head > div {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d91d2f;
}

.executive-actions__head svg {
    width: 19px;
    height: 19px;
}

.executive-actions__head strong {
    font-size: .95rem;
}

.executive-actions__head > span {
    color: #7a8798;
    font-size: .76rem;
}

.executive-actions__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
}

.executive-action {
    min-height: 92px;
    padding: 16px 18px;
    display: grid;
    grid-template-columns: auto 1fr 18px;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    border-right: 1px solid #f1e4e5;
}

.executive-action:last-child { border-right: 0; }

.executive-action:hover { background: rgba(255,255,255,.72); }

.executive-action > strong {
    font-size: 1.9rem;
    color: #d51d2f;
    line-height: 1;
}

.executive-action--blue > strong { color:#1768e6; }

.executive-action div { display:flex; flex-direction:column; gap:3px; }

.executive-action div span { font-weight: 700; color:#18315c; font-size:.86rem; }

.executive-action div small { color:#64748b; font-size:.76rem; }

.executive-action > svg { width:16px; height:16px; color:currentColor; }

.executive-grid {
    display: grid;
    grid-template-columns: 1.12fr .92fr .92fr;
    gap: 14px;
}

.executive-panel {
    border-radius: 14px !important;
    overflow: hidden;
}

.executive-panel__head {
    min-height: 54px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid #e6edf4;
}

.executive-panel__head > div {
    display:flex;
    align-items:center;
    gap:10px;
}

.executive-panel__head svg { width:20px; height:20px; color:#0d2146; }

.executive-panel__head h2 { margin:0; color:#0e2146; font-size:1.03rem; }

.executive-panel__head a { color:#0566df; text-decoration:none; font-size:.77rem; font-weight:700; }

.executive-project-list { padding:0 14px 12px; }

.executive-project-row {
    display:grid;
    grid-template-columns: 1.3fr .85fr auto;
    gap:14px;
    align-items:center;
    min-height:56px;
    padding:9px 6px;
    border-bottom:1px solid #eef2f6;
    text-decoration:none;
    color:inherit;
}

.executive-project-row:last-child { border-bottom:0; }

.executive-project-row--head { min-height:34px; color:#718096; font-size:.72rem; font-weight:700; }

.executive-project-row__project { min-width:0; display:flex; flex-direction:column; gap:3px; }

.executive-project-row__project strong { color:#15305a; font-size:.86rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.executive-project-row__project span { color:#718096; font-size:.73rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.executive-project-row__progress { display:grid; grid-template-columns: 38px 1fr; gap:8px; align-items:center; }

.executive-project-row__progress strong { color:#1c3154; font-size:.78rem; }

.executive-project-row__progress .progress { height:7px; }

.executive-budget { padding-bottom:14px; }

.executive-budget__main {
    display:grid;
    grid-template-columns: 190px 1fr;
    gap:18px;
    align-items:center;
    padding:24px 22px 18px;
}

.executive-budget__donut {
    width:170px;
    aspect-ratio:1;
    border-radius:50%;
    display:grid;
    place-items:center;
    margin:auto;
}

.executive-budget__donut > div {
    width:106px;
    aspect-ratio:1;
    border-radius:50%;
    background:#fff;
    display:grid;
    place-items:center;
    align-content:center;
    text-align:center;
    box-shadow:inset 0 0 0 1px #e6edf4;
}

.executive-budget__donut strong { font-size:1.55rem; color:#0d2146; }

.executive-budget__donut span { font-size:.74rem; color:#6f8198; margin-top:3px; }

.executive-budget__legend { display:grid; gap:13px; }

.executive-budget__legend > div { display:grid; grid-template-columns:12px auto 1fr; gap:9px; align-items:center; }

.executive-budget__legend i { width:11px; height:11px; border-radius:50%; }

.executive-budget__legend i.is-green { background:#14a465; }

.executive-budget__legend i.is-slate { background:#cbd5e1; }

.executive-budget__legend i.is-dark { background:#334155; }

.executive-budget__legend strong { color:#132b53; font-size:.9rem; }

.executive-budget__legend span { color:#657892; font-size:.75rem; }

.executive-budget__footer {
    margin:0 14px;
    padding:14px 0;
    display:grid;
    grid-template-columns:repeat(3,1fr);
    background:#f8fbff;
    border-radius:10px;
}

.executive-budget__footer > div { text-align:center; border-right:1px solid #e4ebf2; display:flex; flex-direction:column; gap:4px; }

.executive-budget__footer > div:last-child { border-right:0; }

.executive-budget__footer strong { color:#17315c; font-size:1rem; }

.executive-budget__footer span { color:#718096; font-size:.72rem; }

.executive-risks__list { padding:6px 16px 12px; }

.executive-risk {
    display:grid;
    grid-template-columns:12px 1fr auto;
    gap:10px;
    align-items:center;
    min-height:52px;
    border-bottom:1px solid #edf2f7;
    text-decoration:none;
    color:inherit;
}

.executive-risk:last-child { border-bottom:0; }

.executive-risk > div { display:flex; flex-direction:column; gap:2px; }

.executive-risk strong { color:#17315c; font-size:.83rem; }

.executive-risk span { color:#718096; font-size:.72rem; }

.executive-risk time { color:#526783; font-size:.74rem; }

.executive-deadlines__head {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    padding:13px 16px 9px;
    border-top:1px solid #e6edf4;
}

.executive-deadlines__head > div { display:flex; align-items:center; gap:8px; color:#17315c; }

.executive-deadlines__head svg { width:16px; height:16px; }

.executive-deadlines__head a { color:#0566df; font-size:.75rem; font-weight:700; text-decoration:none; }

.executive-deadlines { padding:0 16px 14px; }

.executive-deadline {
    display:grid;
    grid-template-columns:10px 44px 1fr;
    gap:9px;
    align-items:center;
    min-height:42px;
    text-decoration:none;
    color:inherit;
}

.executive-deadline time { color:#16335d; font-size:.75rem; font-weight:700; }

.executive-deadline > div { display:flex; flex-direction:column; gap:2px; }

.executive-deadline strong { color:#36516f; font-size:.78rem; }

.executive-deadline span { color:#8492a6; font-size:.68rem; }

.executive-footer-banner {
    min-height:72px;
    display:flex;
    align-items:center;
    gap:14px;
    padding:15px 20px;
    background:linear-gradient(90deg,#effcf4,#f8fffb);
    border-color:#d6f0df !important;
}

.executive-footer-banner__icon {
    width:44px;
    height:44px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#0f9d58;
    color:white;
}

.executive-footer-banner__icon svg { width:20px; height:20px; }

.executive-footer-banner > div { display:flex; flex-direction:column; gap:4px; }

.executive-footer-banner strong { color:#0a7d46; font-size:.95rem; }

.executive-footer-banner span { color:#557169; font-size:.76rem; }


/* ==========================================================================
   Bascule Vue Direction / Vue DSI (composant <x-view-switch />)
   Feuille globale : le composant sert sur le tableau de bord ET sur la
   fiche projet, project-show.css n'est chargee que sur la seconde.
   ========================================================================== */

/* --- Bascule Vue Direction / Vue DSI, dans les actions d'en-tête ---------- */
.view-switch {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #eef1f4;
}

.view-switch__option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-2);
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.view-switch__option:hover { color: var(--text); }

.view-switch__option svg { width: 15px; height: 15px; }

.view-switch__option.is-active {
    background: var(--surface);
    color: var(--green);
    box-shadow: 0 1px 3px rgba(16, 32, 48, 0.12);
}

@media (max-width: 720px) {
    .view-switch { width: 100%; }
    .view-switch__option { flex: 1; justify-content: center; }
}

/* Statut de charge d'une ressource — remplace le pourcentage nu, qui se lit à
   tort comme un temps partiel. Le chiffre reste en infobulle. */
.db-load {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.79rem;
    font-weight: 600;
    white-space: nowrap;
}
.db-load i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 8px;
    display: block;
}
.db-load--green  { color: #056a33; }
.db-load--green i  { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16); }
.db-load--amber  { color: #97600a; }
.db-load--amber i  { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16); }
.db-load--red    { color: #b01a2f; }
.db-load--red i    { background: var(--red); box-shadow: 0 0 0 3px rgba(215, 38, 61, 0.16); }

/* Action destructrice dans un menu de ligne : même gabarit que les liens
   voisins, mais signalée en rouge. */
.row-menu__danger {
    display: block;
    width: 100%;
    padding: 8px 13px;
    border: 0;
    background: none;
    text-align: left;
    font: inherit;
    font-size: 0.8rem;
    color: var(--red);
    cursor: pointer;
}
.row-menu__danger:hover { background: var(--red-soft); }

/* Compteur accolé à un interrupteur de filtre. */
.switch__count {
    margin-left: 5px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #eef1f4;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-2);
}

/* --- Gantt : colonne Avancement --------------------------------------------
   .meter impose 70 px mini a la barre + 38 px a la valeur, soit 117 px avec
   la gouttiere — dans une colonne de 100 px, le « 100 % » debordait sur la
   colonne Debut. Ici la barre peut se comprimer, la valeur jamais. */
.pgantt__cols .meter { gap: 7px; min-width: 0; }
.pgantt__cols .meter .progress { min-width: 0; }
.pgantt__cols .meter__value {
    min-width: 0;
    flex: 0 0 auto;
    font-size: 0.74rem;
    white-space: nowrap;
}

/* Les dates restent sur une ligne, quoi qu'il arrive. */
.pgantt__date { white-space: nowrap; }
