/* =============================================================
   Social Booth CRM : habillage back-office
   Se charge apres app.css et theme-jour.css (structure conservee).
   Charte : encre, papier, rose flash, violet pulse, jaune spark.
   Le portail client (portail.css) n'est pas concerne.
   ============================================================= */

:root {
    /* Surfaces (noms historiques : --ink = fond de page) */
    --ink: #f9f6f1;
    --ink-2: #ffffff;
    --ink-3: #f1ece4;
    --line: #e5ded3;
    --paper: #1a1222;
    --muted: #675c74;

    --accent: #c71f5c;
    --accent-2: #6c3bff;
    --accent-ink: #4a1fcf;
    --mint: #0a7352;
    --danger: #b3261e;

    --nuit: #1a1222;
    --nuit-2: #2c2138;
    --flash: #ff3d7f;
    --pulse: #6c3bff;
    --spark: #dcf94a;
    --brume: #c3bad0;

    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 12px 32px -14px rgba(26, 18, 34, .28);
    --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'DM Mono', ui-monospace, monospace;
}

body { font-size: 15px; line-height: 1.5; }
.btn, input, select, textarea, button { font-family: var(--font-body); }
.data-table td, .kpi-box-value, .finance-kpi-value, .treso, .pil, .kanban-card, .todo-meta { font-variant-numeric: tabular-nums; }
.page-title, .panel-title, .todo-title, .auth-title, .kpi-box-value, .finance-kpi-value, .treso-total-value {
    font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em;
}
:focus-visible { outline: 2px solid var(--pulse); outline-offset: 2px; }

/* ── Structure ─────────────────────────────────────────────── */
.layout { grid-template-columns: 236px minmax(0, 1fr); }
.content { min-width: 0; }
.page-body { padding: 26px 32px 64px; max-width: 1480px; width: 100%; }

.sidebar {
    background: var(--nuit); border-right: 0; padding: 18px 12px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: #4a3d57 transparent;
}
.brand { padding: 4px 10px 18px; gap: 11px; text-decoration: none; }
.brand svg { width: 38px; height: 26px; flex: none; }
.brand-text { color: #f7f1e8; font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: -.03em; line-height: 1.1; }
.nav { gap: 1px; }
.nav-groupe { color: #a296af; font: 400 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; padding: 13px 10px 5px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; color: var(--brume); font-size: 14px; border-radius: 8px; }
.nav-item svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav-item:hover { background: var(--nuit-2); color: #fff; }
.nav-item.is-active { background: var(--nuit-2); color: #fff; font-weight: 600; box-shadow: none; }
.nav-item.is-active svg { color: var(--flash); opacity: 1; }
.sidebar-footer { border-top: 1px solid #3a2e45; padding: 14px 10px 2px; margin-top: 16px; flex-direction: row; justify-content: space-between; align-items: center; gap: 8px; }
.user-name { color: #f7f1e8; }
.logout-link { color: var(--brume); }
.logout-link:hover { color: #ff8fb6; }
.sidebar :focus-visible { outline-color: var(--spark); }

.topbar { padding: 16px 32px; background: rgba(249, 246, 241, .93); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 100; gap: 16px; }
.page-title { font-size: 24px; line-height: 1.15; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { flex: none; }

/* Creation rapide */
.creer { position: relative; }
.creer summary { list-style: none; }
.creer summary::-webkit-details-marker { display: none; }
.creer-menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 190px; z-index: 210; }
.creer-menu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--paper); text-decoration: none; font-size: 14px; }
.creer-menu a:hover { background: var(--ink-3); }

/* ── Boutons, champs ───────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 999px; padding: 9px 18px; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; border: 1px solid transparent; }
.btn-sm { padding: 6px 13px; font-size: 13px; }
.btn-primary, a.btn-primary { background: var(--flash); color: var(--nuit); box-shadow: none; }
.btn-primary:hover { background: var(--accent); color: #fff; filter: none; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--paper); }
.btn-ghost:hover { background: var(--ink-3); filter: none; }
.btn-danger { background: #fff; border-color: #e8c4c0; color: var(--danger); }
.btn-danger:hover { background: #fdeceb; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: 999px 0 0 999px; }
.btn-group .btn:last-child { border-radius: 0 999px 999px 0; }
.btn-group .btn-primary { background: var(--nuit); color: #fff; }

.field-label { font-size: 13px; font-weight: 600; color: var(--paper); }
.field-input { background: #fff; padding: 9px 12px; font-size: 14.5px; border-color: #d5ccbf; width: 100%; min-width: 0; }
.field-input:hover { border-color: #8a7e96; }
.field-input:focus { border-color: var(--pulse); box-shadow: 0 0 0 3px rgba(108, 59, 255, .16); }
.field-input::placeholder { color: #766c80; }
.evt-filtres .field-input, .quick-form-inner .field-input { width: auto; }
.form-page { max-width: 980px; }
.card-form { padding: 26px 28px; }
.card-form > .panel-title:not(:first-of-type) { border-top: 1px solid var(--line); padding-top: 22px; }
.evt-filtre-label { text-transform: none; letter-spacing: 0; font-size: 12px; }

/* ── Surfaces ──────────────────────────────────────────────── */
.panel, .card-form, .kpi-box, .todo-card { border-color: var(--line); box-shadow: none; }
.panel { padding: 22px 24px; }
.panel-title { font-size: 17px; margin-bottom: 14px; }
.detail-grid { gap: 18px; margin-top: 18px; }
.detail-header { margin-bottom: 14px; align-items: center; }
.detail-header .back-link { margin: 0; }
.etapes-panel { margin-top: 0; }
.table-wrap { background: #fff; }
.data-table thead th { background: #fff; font-size: 12.5px; font-weight: 600; padding: 11px 16px; }
.data-table tbody td { font-size: 14px; padding: 12px 16px; }
.row-link:hover, .row-link:focus-visible { background: #faf7f2; }
.row-link:focus-visible { outline-offset: -2px; }
.info-list { grid-template-columns: 130px minmax(0, 1fr); font-size: 14px; gap: 9px 16px; }
.contact-item, .evt-row { background: #fff; }
.alert-success { background: #e6f4ee; border: 1px solid #b4dccb; color: #075e43; }
.alert-error { background: #fdeceb; border: 1px solid #efc3bf; color: #8c1d18; }
.empty-state { background: #fff; border: 1px dashed #d5ccbf; border-radius: var(--radius); padding: 48px 20px; }
.bell-panel { width: min(360px, calc(100vw - 32px)); }
.bell-btn { border-radius: 999px; }

/* Etiquettes */
.badge { margin-left: 0; font-size: 12px; padding: 2px 9px; font-weight: 500; }
.puce { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--ink-3); color: var(--paper); white-space: nowrap; }
.puce::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.puce-confirme { background: #e2f3eb; color: #075e43; }
.puce-option { background: #e9e2ff; color: #4a1fcf; }
.puce-annule { background: #f0ecea; color: #675c74; text-decoration: line-through; }
.marque { font-size: 13px; color: var(--muted); white-space: nowrap; }
.marque b { color: var(--paper); font-weight: 600; }

/* ── Tableau de bord ───────────────────────────────────────── */
.pil { display: grid; grid-template-columns: 1.45fr 1fr; gap: 18px; margin-bottom: 28px; }
.pil-carte { border-radius: 18px; padding: 24px 26px; background: #fff; border: 1px solid var(--line); min-width: 0; }
.pil-b2b { background: var(--nuit); border-color: var(--nuit); color: #f7f1e8; }
.pil-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.pil-tete h2 { font: 700 17px/1.2 var(--font-display); letter-spacing: -.02em; }
.pil-tete span { color: var(--muted); }
.pil-b2b .pil-tete span, .pil-b2b dt, .pil-b2b .pil-cible { color: var(--brume); }
.pil-ca { font: 800 clamp(32px, 3.6vw, 46px)/1 var(--font-display); letter-spacing: -.04em; margin: 18px 0 4px; }
.pil-cible { color: var(--muted); font-size: 14px; }
.pil-jauge { position: relative; height: 10px; border-radius: 99px; background: var(--ink-3); margin: 16px 0 0; }
.pil-b2b .pil-jauge { background: #3a2e45; }
.pil-jauge i { display: block; height: 100%; min-width: 4px; border-radius: 99px; background: var(--pulse); }
.pil-b2b .pil-jauge i { background: var(--flash); }
.pil-jauge u { position: absolute; top: -4px; width: 2px; height: 18px; background: var(--spark); }
.pil-jalon { font-size: 13.5px; color: var(--spark); margin-top: 10px; }
.pil dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 16px 14px; margin-top: 22px; }
.pil dt { font-size: 13px; color: var(--muted); }
.pil .pil-cible { color: var(--muted); }
.pil .pil-b2b dt, .pil .pil-b2b .pil-cible { color: var(--brume); }
.pil dd { font-size: 17px; font-weight: 600; margin-top: 1px; }
.pil dd small { display: block; font-size: 12.5px; font-weight: 400; opacity: .85; }
.annee-nav { display: inline-flex; gap: 4px; }
.annee-nav a { color: inherit; text-decoration: none; padding: 2px 9px; border-radius: 99px; }
.annee-nav a:hover { background: rgba(138, 126, 150, .25); }
.annee-nav a[aria-current] { background: rgba(138, 126, 150, .3); font-weight: 600; }

.todo-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.todo-count-on, .todo-badge { background: var(--accent); }
.todo-empty { font-style: normal; }
.todo-link { color: var(--accent); font-weight: 600; font-size: 13px; }
.evt-row:hover { transform: none; border-color: #8a7e96; }
.evt-date { background: var(--nuit); color: #fff; }
.evt-mois { color: var(--brume); text-transform: none; }
.evt-badge { background: #e9e2ff; color: #4a1fcf; }
.kpi-box-label { text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.kpi-box-value { font-size: 28px; }
.treso-bar { height: 14px; background: #dcd0ff; }
.treso-dot-out { background: #dcd0ff; }
.treso-encaisse, .treso-dot-in { background: #0a7352; }
.occ12-bar, .bar-fill, .bar-fill-haute, .etapes-bar-fill { background: var(--pulse); }
.bar-fill-basse { background: #a98cff; }
.planning-occ, .legend-occ { background: var(--pulse); }
.bar-track, .etapes-bar { background: var(--ink-3); }
.kpi-box-accent { border-color: var(--line); }

/* ── Pipeline ──────────────────────────────────────────────── */
.kanban-board { gap: 10px; scroll-snap-type: x proximity; }
.kanban-col { flex: 1 0 172px; background: var(--ink-3); border: 0; scroll-snap-align: start; max-height: calc(100vh - 190px); }
.kanban-col-head { background: transparent; border: 0; padding: 13px 14px 8px; position: static; }
.kanban-col-title { font-size: 14px; }
.kanban-col-title small { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.kanban-col-count { background: #fff; color: var(--paper); font-weight: 600; }
.kanban-col[data-type="gagne"] .kanban-col-title { color: #075e43; }
.kanban-col[data-type="perdu"] .kanban-col-title { color: var(--muted); }
.kanban-card { background: #fff; border-color: transparent; padding: 12px 13px; box-shadow: 0 1px 2px rgba(26, 18, 34, .07); }
.kanban-card:hover { border-color: #8a7e96; }
.kanban-card-name { font-weight: 600; margin-bottom: 2px; overflow-wrap: anywhere; }
.kc-sous { font-size: 13px; color: var(--muted); }
.kc-bas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 9px; font-size: 12.5px; color: var(--muted); }
.kc-bas .kanban-card-budget { color: var(--paper); font-weight: 600; }
.kc-seg { font-weight: 600; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: #ffe1ec; color: #9c1546; }
.kc-seg-B2C { background: #e9e2ff; color: #4a1fcf; }
.kc-seg-P { background: #edf6c2; color: #4d5a08; }
.kc-retard { color: var(--danger); font-weight: 600; }
.kanban-card-ghost { background: #ffd9e6; }

/* ── Fiche evenement ───────────────────────────────────────── */
.fiche-tete { background: var(--nuit); color: #f7f1e8; border-radius: 18px; padding: 24px 26px; margin-bottom: 14px; display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; }
.fiche-tete h2 { font: 800 clamp(22px, 2.6vw, 30px)/1.1 var(--font-display); letter-spacing: -.03em; overflow-wrap: anywhere; }
.fiche-infos { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; color: var(--brume); font-size: 14.5px; }
.fiche-infos a { color: #ff8fb6; }
.fiche-chiffres { display: flex; gap: 26px; align-items: flex-end; }
.fiche-chiffres div { font: 700 22px/1.1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fiche-chiffres span { display: block; font: 400 13px/1.4 var(--font-body); letter-spacing: 0; color: var(--brume); }
.ancres { display: flex; gap: 4px; overflow-x: auto; position: sticky; top: 69px; z-index: 60; background: var(--ink); padding: 8px 0; margin-bottom: 10px; scrollbar-width: none; }
.ancres a { padding: 6px 14px; border-radius: 99px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.ancres a:hover { background: var(--ink-3); color: var(--paper); }
.panel[id], section[id] { scroll-margin-top: 130px; }
.page-body > .panel { margin-top: 18px; }
.finance-summary, .marge-summary { gap: 12px; }

/* ── Connexion ─────────────────────────────────────────────── */
.auth-body { background: var(--nuit); }
.auth-card { border: 0; border-radius: 22px; box-shadow: none; animation: none; }
.auth-mark svg { width: 76px; height: 50px; }
.auth-title { font-weight: 800; letter-spacing: -.03em; }
.auth-form .btn { padding: 12px 18px; }

/* ── Petits ecrans ─────────────────────────────────────────── */
@media (max-width: 1180px) and (min-width: 761px) {
    .pil { grid-template-columns: 1fr; }
    .page-body, .topbar { padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 760px) {
    .layout { grid-template-columns: minmax(0, 1fr); }
    .sidebar { height: auto; position: fixed; }
    .pil { grid-template-columns: 1fr; gap: 12px; }
    .pil-carte, .fiche-tete { padding: 20px; }
    .topbar { padding: 10px 16px; gap: 10px; }
    .page-title { font-size: 19px; flex: 1; }
    .page-body { padding: 16px 16px 56px; }
    .creer summary span { display: none; }
    .creer summary.btn { padding: 8px 13px; }
    .ancres { top: 57px; }
    .fiche-chiffres { gap: 18px; width: 100%; justify-content: space-between; }
    .fiche-chiffres div { font-size: 18px; }
    .kanban-col { flex-basis: 78vw; max-height: none; }
    .detail-actions { flex-wrap: wrap; }
    .panel, .card-form { padding: 18px; }
    .info-list { grid-template-columns: 105px minmax(0, 1fr); }
    .evt-main { flex-basis: calc(100% - 70px); }
    .toolbar .btn, .burger { min-height: 40px; }
    /* Tableaux en fiches : le libelle vient de data-col (app.js) */
    .data-table.en-fiches thead { display: none; }
    .data-table.en-fiches tr { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); }
    .data-table.en-fiches tbody td { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; border: 0; text-align: right; }
    .data-table.en-fiches tbody td::before { content: attr(data-col); color: var(--muted); font-size: 13px; text-align: left; flex: none; }
    .data-table.en-fiches tbody td:first-child { text-align: left; justify-content: flex-start; font-size: 15px; display: block; }
    .data-table.en-fiches tbody td:first-child::before { content: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Debordements */
.detail-grid, .form-grid { min-width: 0; }
.detail-grid > *, .form-grid > * { min-width: 0; }
.detail-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.finance-form .form-grid, .contact-form .form-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 860px) { .detail-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
    .btn-group, .planning-nav { flex-wrap: wrap; row-gap: 6px; }
    .btn-group .btn, .btn-group .btn:first-child, .btn-group .btn:last-child { border-radius: 999px; margin-right: 4px; }
    .panel, .card-form, .page-body > div { overflow-x: auto; }
    .page-body table { max-width: 100%; }
    .page-body > table, .page-body .table { display: block; overflow-x: auto; }
}
.finance-summary, .finance-synthese-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; }
.finance-kpi-label { text-transform: none; letter-spacing: 0; font-size: 13px; }
@media (max-width: 760px) { .data-table.en-fiches td .muted-inline { display: none; } }

/* ── Pipeline, v2 ──────────────────────────────────────────── */
.pipe-chiffres { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 16px; font-size: 14px; color: var(--muted); }
.pipe-chiffres strong { font: 700 20px/1 var(--font-display); color: var(--paper); letter-spacing: -.02em; margin-right: 3px; }
.pipe-chiffres a { color: inherit; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #d5ccbf; }
.pipe-chiffres .est-du, .pipe-chiffres .est-du strong { color: var(--danger); }
.pipe-barre { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pipe-filtres { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1; }
.pipe-filtres .field-input { width: auto; }
.pipe-filtres input[type=search] { flex: 1 1 200px; max-width: 290px; }
.page-body > .pipe-nouveau { margin: 0 0 14px; }
.pipe-nouveau .form-grid { gap: 14px; }
.pipe-synchro { margin-bottom: 16px; font-size: 14px; }
.pipe-synchro summary { cursor: pointer; color: #075e43; width: fit-content; }
.pipe-synchro.a-alerte summary { color: #8a4b00; font-weight: 600; }
.pipe-synchro-corps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-top: 10px; }
.pipe-synchro-corps p { margin-top: 5px; }
.kanban-card { cursor: grab; position: relative; }
.kanban-card a.kanban-card-name { display: block; color: inherit; text-decoration: none; padding-right: 14px; }
.kanban-card.est-nouveau::after { content: ''; position: absolute; top: 14px; right: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--flash); }
.kanban-card.est-nouveau a.kanban-card-name::after { content: ' (non lu)'; position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.kc-pied { justify-content: space-between; margin-top: 6px; }
.kc-etape { display: none; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.kc-etape select { font-size: 13px; padding: 5px 6px; border: 1px solid #d5ccbf; border-radius: 8px; background: #fff; color: var(--paper); flex: 1; min-width: 0; }
.kanban-card:focus-within .kc-etape { display: flex; }
@media (hover: none) { .kc-etape { display: flex; } }
.kanban-vide { display: none; color: var(--muted); font-size: 13px; padding: 6px 4px; }
.kanban-vide:only-child { display: block; }
.dlg { border: 0; border-radius: 18px; padding: 24px; width: min(420px, calc(100vw - 32px)); margin: auto; box-shadow: var(--shadow); color: var(--paper); }
.dlg::backdrop { background: rgba(26, 18, 34, .55); }
.dlg .form-actions { margin-top: 18px; }
.bulle { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 400; box-shadow: var(--shadow); margin: 0; }
.fiche-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.etapes-fil { list-style: none; display: flex; gap: 4px; margin: 0 0 14px; padding: 0; overflow-x: auto; }
.etapes-fil li { flex: 1 0 auto; }
.etapes-fil span, .etapes-fil button { display: block; width: 100%; text-align: center; padding: 8px 14px; border: 0; border-radius: 8px; background: var(--ink-3); color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.etapes-fil button { cursor: pointer; }
.etapes-fil button:hover { background: #e2d8ff; color: #4a1fcf; }
.etapes-fil .est-fait span, .etapes-fil .est-fait button { background: #e2d8ff; color: #4a1fcf; }
.etapes-fil .est-ici span { background: var(--pulse); color: #fff; font-weight: 600; }
.lead-rapide { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; font-size: 14px; color: var(--muted); }
.lead-lies { background: #fff6db; border: 1px solid #ecd9a0; color: #5c4300; }
.lead-lies a { color: #5c4300; margin-left: 8px; }
.page-body > .lead-demande { margin: 0 0 18px; }
.lead-demande p { max-width: 75ch; overflow-wrap: anywhere; }
#convertir:target .btn { outline: 3px solid var(--pulse); outline-offset: 3px; }
.kanban-col[data-type="ouvert"] { flex-basis: 186px; }
.kanban-col:not([data-type="ouvert"]) { flex: 0 0 148px; }
@media (max-width: 760px) { .kanban-col[data-type] { flex: 0 0 78vw; } .pipe-filtres .field-input, .pipe-filtres input[type=search] { flex: 1 1 140px; max-width: none; } .pipe-barre > .btn { width: 100%; } }
.kanban-col-title small { white-space: nowrap; font-size: 12px; } .kanban-card { user-select: none; }

/* ── CEO IA ────────────────────────────────────────────────── */
.ceo-droits { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ceo-choix { width: 100%; height: 100%; text-align: left; padding: 14px 16px; border: 1px solid #d5ccbf; border-radius: 12px; background: #fff; color: var(--paper); cursor: pointer; font-size: 14px; }
.ceo-choix strong, .ceo-choix span { display: block; }
.ceo-choix span { color: var(--muted); }
.ceo-choix:hover { border-color: #8a7e96; }
.ceo-choix[aria-pressed=true] { border-color: var(--pulse); box-shadow: inset 0 0 0 1px var(--pulse); background: #f5f2ff; }

.codes-secours { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-top: 12px; }
.codes-secours code, .cle-totp { font-family: var(--font-mono); background: var(--ink-3); border-radius: 8px; padding: 8px 12px; display: inline-block; overflow-wrap: anywhere; user-select: all; }
.etapes-securite { padding-left: 20px; display: grid; gap: 10px; margin-bottom: 18px; max-width: 75ch; }
.cle-totp { margin: 6px 0; }

/* ── Page CEO IA ───────────────────────────────────────────── */
.ceo-avis { background: var(--nuit); color: #f7f1e8; border-radius: 18px; padding: 26px 28px; margin-bottom: 18px; }
.ceo-avis .pil-tete h2 { font-size: 15px; color: var(--brume); font-weight: 600; }
.ceo-conclusion { font: 700 clamp(20px, 2.3vw, 28px)/1.25 var(--font-display); letter-spacing: -.02em; max-width: 32em; margin: 12px 0 8px; overflow-wrap: anywhere; text-wrap: pretty; }
.ceo-date { color: var(--brume); font-size: 13.5px; }
.ceo-avis .pil-jauge { background: #3a2e45; max-width: 560px; }
.ceo-avis .pil-jauge i { background: var(--flash); }
.ceo-niveau { font-size: 13px; font-weight: 600; padding: 3px 12px; border-radius: 99px; background: #3a2e45; color: #fff !important; }
.ceo-bon { background: #0a7352; } .ceo-vigilance { background: var(--spark); color: var(--nuit) !important; } .ceo-alerte { background: var(--flash); color: var(--nuit) !important; }
.ceo-details { margin: 12px 0; font-size: 14.5px; } .ceo-details summary { cursor: pointer; color: #ff8fb6; width: fit-content; } .ceo-details p { max-width: 75ch; margin-top: 8px; }
.ceo-details textarea { margin: 10px 0; max-width: 640px; display: block; }
.ceo-avis :focus-visible { outline-color: var(--spark); }
.ceo-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.ceo-grille .panel { margin: 0; }
.ceo-ligne { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.ceo-ligne:first-of-type { border-top: 0; } .ceo-ligne > div { flex: 1; min-width: 0; overflow-wrap: anywhere; } .ceo-ligne > div > a:first-child { color: var(--paper); text-decoration: none; } .ceo-ligne > div > a:first-child:hover { color: var(--accent); }
.ceo-coche { width: 24px; height: 24px; border: 2px solid #8a7e96; border-radius: 7px; background: #fff; cursor: pointer; position: relative; } .ceo-coche:hover { border-color: #0a7352; background: #e2f3eb; }
.ceo-pourquoi { font-size: 13px; color: var(--muted); } .ceo-pourquoi summary { cursor: pointer; width: fit-content; } .ceo-pourquoi p { margin-top: 4px; }
.ceo-point { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; background: #8a7e96; } .ceo-point.g3 { background: var(--danger); } .ceo-point.g2 { background: #e08a00; }
.ceo-decision { border-top: 1px solid var(--line); padding: 18px 0; } .ceo-decision:first-of-type { border-top: 0; padding-top: 0; }
.ceo-decision h3 { font: 700 18px/1.3 var(--font-display); letter-spacing: -.01em; margin-bottom: 8px; } .ceo-decision p { max-width: 75ch; margin-bottom: 10px; }
.ceo-trancher { display: grid; grid-template-columns: minmax(0, 2fr) minmax(160px, 1fr); gap: 12px; margin-top: 14px; } .ceo-boutons { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.ceo-entree { border-top: 1px solid var(--line); padding: 10px 0; font-size: 14.5px; } .ceo-entree summary { cursor: pointer; } .ceo-entree p { margin-top: 8px; }
.ceo-report { margin-top: 12px; font-size: 14px; } .visu-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 860px) { .ceo-grille, .ceo-trancher { grid-template-columns: minmax(0, 1fr); } .ceo-avis { padding: 20px; } }

/* ── Strategie ─────────────────────────────────────────────── */
.strat-cap { font: 700 18px/1.35 var(--font-display); letter-spacing: -.01em; margin: 10px 0 16px; max-width: 42em; }
.strat-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px 26px; font-size: 14.5px; }
.strat-mini { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; margin-top: 12px; font-size: 13.5px; } .strat-barre { grid-column: 1 / -1; height: 6px; border-radius: 9px; background: var(--ink-3); } .strat-barre i { display: block; height: 100%; border-radius: 9px; background: var(--pulse); }
.strat-lien { font-size: 12.5px; color: var(--muted); } .strat-texte { color: var(--brume); max-width: 75ch; margin-top: 10px; font-size: 14.5px; }
.strat-chantier { border-top: 1px solid var(--line); padding: 14px 0 4px; margin-top: 14px; } .strat-tete { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; } .strat-etats { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
.strat-form { display: grid; gap: 12px; max-width: 640px; margin: 12px 0; color: var(--paper); } .strat-pari.est-clos { opacity: .75; } .ceo-resume { margin-bottom: 18px; }

.oauth-choix { border: 0; display: grid; gap: 8px; } .oauth-choix label { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #d5ccbf; border-radius: 12px; padding: 12px 14px; margin-top: 8px; font-size: 14px; cursor: pointer; } .oauth-choix label:has(:checked) { border-color: var(--pulse); background: #f5f2ff; } .oauth-choix input { margin-top: 4px; accent-color: var(--pulse); }

.abby-maj { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: flex-end; margin: 0 0 16px; }

.devis-ligne { border: 1px solid #e5ddd1; border-radius: 14px; padding: 12px 16px 16px; margin: 0 0 14px; } .devis-ligne legend { font-weight: 700; padding: 0 6px; } .devis-ligne textarea { line-height: 1.5; }

.devis-ligne .form-grid { grid-template-columns: 1fr 1fr; margin-top: 10px; } .devis-ligne .field-wide { grid-column: 1 / -1; }
.devis-ligne textarea { min-height: 220px; }

.alert-warning { background: #fff4db; color: #6b4500; border: 1px solid #f0d49a; }

.message-signature { color: #6d6474; border-left: 3px solid #e5ddd1; padding-left: 12px; margin: 10px 0; font-size: 14px; } .message-form .form-actions { flex-wrap: wrap; gap: 8px; }
