/* ═══ DIS PITCHS — styles partagés ═══════════════════════════════ */
:root {
    --ink: #141a33;
    --ink-2: #374151;
    --muted: #6b7280;
    --line: #e6e9f2;
    --line-2: #f0f2f8;
    --bg: #f5f6fb;
    --soft: #f8f9ff;
    --blue: #2f5bea;
    --blue-soft: #edf1ff;
    --violet: #6a3df0;
    --green: #15803d;
    --green-soft: #e7f7ee;
    --red: #c2273d;
    --red-soft: #fdecef;
    --amber: #b45309;
    --amber-soft: #fff4e5;
    --grad: linear-gradient(135deg, #2f5bea 0%, #6a3df0 100%);
    --radius: 14px;
    --shadow: 0 1px 2px rgba(20, 26, 51, .04), 0 6px 20px rgba(20, 26, 51, .05);
}

* { box-sizing: border-box; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-feature-settings: "cv11", "ss01";
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); }
.text-primary { color: var(--blue) !important; }
.panel-head a, .kpi a { text-decoration: none; }
::selection { background: #dfe6ff; }

/* ── Navigation ─────────────────────────────────────────────── */
.main-nav { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1030; }
.nav-inner { display: flex; align-items: center; gap: 1rem; min-height: 72px; padding: 0 1.25rem; max-width: 1480px; margin: 0 auto; flex-wrap: wrap; }
.nav-logo img { height: 50px; display: block; }
.nav-toggle { display: none; margin-left: auto; border: 1px solid var(--line); background: #fff; border-radius: 10px; width: 42px; height: 40px; color: var(--ink); }
.nav-menu { display: flex !important; align-items: center; flex: 1; gap: 1rem; }
.nav-links { display: flex; align-items: center; gap: .15rem; list-style: none; margin: 0 auto; padding: 0; }
.nav-links a { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .8rem; border-radius: 10px; font-size: .88rem; font-weight: 600; color: var(--ink-2); text-decoration: none; transition: background .15s, color .15s; white-space: nowrap; }
.nav-links a i { font-size: .85rem; opacity: .7; }
.nav-links a:hover { background: var(--soft); color: var(--blue); }
.nav-links a.active { background: var(--blue-soft); color: var(--blue); }
.nav-links a.active i { opacity: 1; }
.nav-sep { width: 1px; height: 24px; background: var(--line); margin: 0 .4rem; }
.nav-right { display: flex; align-items: center; gap: .6rem; }
.nav-user { display: flex; align-items: center; gap: .5rem; background: var(--soft); border: 1px solid var(--line-2); border-radius: 99px; padding: .25rem .35rem .25rem .3rem; font-size: .84rem; font-weight: 600; }
.nav-user-name { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; font-size: .75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.role-badge { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--ink); color: #fff; border-radius: 99px; padding: .2rem .55rem; }
.role-partner { background: var(--blue-soft); color: var(--blue); }
.btn-logout { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 600; padding: .45rem .8rem; border-radius: 10px; color: var(--red); border: 1px solid #f6c9d1; background: #fff; transition: all .15s; }
.btn-logout:hover { background: var(--red); color: #fff; border-color: var(--red); }

@media (max-width: 1199.98px) {
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .nav-menu { display: none !important; flex-basis: 100%; flex-direction: column; align-items: stretch; padding: .5rem 0 1rem; }
    .nav-menu.show { display: flex !important; }
    .nav-links { flex-direction: column; align-items: stretch; margin: 0; }
    .nav-links a { padding: .7rem .8rem; }
    .nav-sep { width: 100%; height: 1px; margin: .3rem 0; }
    .nav-right { justify-content: space-between; border-top: 1px solid var(--line); padding-top: .75rem; }
    .nav-logo img { height: 42px; }
}

/* ── Mise en page ───────────────────────────────────────────── */
.page-wrapper { flex: 1; width: 100%; max-width: 1480px; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }
.flash-stack .alert { border: none; border-radius: 12px; font-size: .9rem; box-shadow: var(--shadow); }
.partner-banner { background: #fff; border-top: 1px solid var(--line); margin-top: auto; }
.partner-banner img { width: 100%; height: auto; display: block; max-width: 1480px; margin: 0 auto; }

.page-head { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.5rem; }
.page-kicker { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--violet); margin-bottom: .2rem; }
.page-title { font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin: 0; }
.page-sub { color: var(--muted); font-size: .92rem; margin: .3rem 0 0; max-width: 70ch; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── Panneaux ───────────────────────────────────────────────── */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { padding: .9rem 1.15rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { font-size: 1rem; font-weight: 700; margin: 0; color: var(--ink); display: flex; align-items: center; gap: .5rem; }
.panel-head h2 i, .panel-head h3 i { color: var(--blue); font-size: .95rem; }
.panel-body { padding: 1.15rem; }
.panel-grad { background: var(--grad); color: #fff; border: none; }

/* ── Indicateurs ────────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.15rem; position: relative; overflow: hidden; }
.kpi-label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.kpi-value { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: .95rem; color: var(--muted); font-weight: 600; }
.kpi-foot { font-size: .8rem; color: var(--muted); margin-top: .35rem; }
.kpi-accent { background: var(--grad); color: #fff; border: none; }
.kpi-accent .kpi-label, .kpi-accent .kpi-foot, .kpi-accent .kpi-value small { color: rgba(255,255,255,.8); }

/* ── Éléments ───────────────────────────────────────────────── */
.avatar { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .85rem; }
.avatar-num { background: var(--blue-soft); color: var(--blue); }
.avatar-lg { width: 54px; height: 54px; font-size: 1.3rem; border-radius: 15px; }

.tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 600; padding: .24em .62em; border-radius: 7px; background: var(--blue-soft); color: var(--blue); white-space: nowrap; }
.tag i { font-size: .7rem; }
.tag-green { background: var(--green-soft); color: var(--green); }
.tag-orange { background: var(--amber-soft); color: var(--amber); }
.tag-grey { background: #f1f3f5; color: #6c757d; }
.tag-red { background: var(--red-soft); color: var(--red); }
.tag-dark { background: var(--ink); color: #fff; }
.tag-wrap { white-space: normal; }

.progress-thin { height: 8px; border-radius: 99px; background: #eceff7; overflow: hidden; }
.progress-thin > span { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .3s; }
.progress-thin.done > span { background: linear-gradient(90deg, #16a34a, #22c55e); }

.table-clean { width: 100%; margin: 0; font-size: .9rem; border-collapse: separate; border-spacing: 0; }
.table-clean th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; background: var(--soft); border-bottom: 1px solid var(--line); padding: .7rem .85rem; white-space: nowrap; }
.table-clean td { padding: .75rem .85rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table-clean tbody tr:last-child td { border-bottom: none; }
.table-clean tbody tr:hover td { background: #fbfcff; }
.num { font-variant-numeric: tabular-nums; text-align: center; }
.text-ink { color: var(--ink) !important; }
.link-plain { color: inherit; text-decoration: none; }
.link-plain:hover { color: var(--blue); }

.empty { text-align: center; padding: 2.75rem 1rem; color: var(--muted); }
.empty i { font-size: 2rem; opacity: .35; margin-bottom: .7rem; display: block; }

.def-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem 1.5rem; }
.def dt { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .15rem; }
.def dd { margin: 0; font-size: .92rem; color: var(--ink); word-break: break-word; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: .75rem; padding: .6rem 0; border-bottom: 1px dashed var(--line); font-size: .87rem; }
.timeline li:last-child { border-bottom: none; }
.timeline .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); margin-top: .35rem; flex-shrink: 0; }
.timeline .dot.mod { background: #f59e0b; }
.timeline time { color: var(--muted); font-size: .78rem; white-space: nowrap; }

/* ── Formulaires & boutons ──────────────────────────────────── */
.form-control, .form-select { border-radius: 10px; border: 1.5px solid #e2e6f0; font-size: .92rem; }
.form-control:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 91, 234, .13); }
.form-label { color: var(--ink-2); }
.btn { border-radius: 10px; font-weight: 600; font-size: .88rem; }
.btn-sm { border-radius: 8px; font-size: .8rem; }
.btn-grad { background: var(--grad); color: #fff; border: none; box-shadow: 0 4px 14px rgba(47, 91, 234, .25); }
.btn-grad:hover, .btn-grad:focus { color: #fff; filter: brightness(1.07); }
.btn-soft { background: var(--soft); border: 1px solid var(--line); color: var(--ink-2); }
.btn-soft:hover { background: var(--blue-soft); color: var(--blue); border-color: #d6defd; }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

.creds { background: #0f172a; color: #e2e8f0; border-radius: 12px; padding: 1rem 1.2rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; line-height: 1.7; }
.creds b { color: #93c5fd; font-weight: 600; }

.scroll-x { overflow-x: auto; }
.nav-tabs-clean { border-bottom: 1px solid var(--line); gap: .25rem; padding: 0 .75rem; }
.nav-tabs-clean .nav-link { border: none; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; font-size: .9rem; padding: .85rem .8rem; border-radius: 0; }
.nav-tabs-clean .nav-link:hover { color: var(--ink); }
.nav-tabs-clean .nav-link.active { color: var(--blue); border-bottom-color: var(--blue); background: transparent; }
.nav-tabs-clean .count { font-size: .72rem; background: var(--line-2); color: var(--muted); border-radius: 99px; padding: .05rem .45rem; margin-left: .3rem; }
.nav-tabs-clean .nav-link.active .count { background: var(--blue-soft); color: var(--blue); }

@media (max-width: 575.98px) {
    .page-wrapper { padding: 1.1rem .9rem 2.5rem; }
    .page-title { font-size: 1.35rem; }
    .kpi-value { font-size: 1.6rem; }
}
h1, h2, h3, h4, h5, h6 { color: var(--ink); }

/* ── Sélecteur de phase ─────────────────────────────────────── */
.phase-tabs { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .25rem; gap: .2rem; }
.phase-tab { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .95rem; border-radius: 9px; font-size: .88rem; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.phase-tab:hover { background: var(--soft); color: var(--ink); }
.phase-tab.current { background: var(--blue); color: #fff; }
.phase-live { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: #e9f7ef; color: #15803d; border-radius: 99px; padding: .1rem .45rem; }
.phase-tab.current .phase-live { background: rgba(255,255,255,.22); color: #fff; }
.tag-final { background: #fff4e5; color: #b45309; }
