/* CRM Zapram : feuille de style de l'espace de travail.
   Charte : Bleu Klein #002395, Bleu nuit #001A75, Bleu ciel #7DA2FF, Bleu pâle #E6E9FF,
   titres en Montserrat, texte en Inter. Neutres légèrement teintés de bleu. */

@font-face { font-family: "Inter"; src: url("polices/inter-latin-wght-normal.8e433c0592f7.woff2") format("woff2");
  font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("polices/montserrat-latin-wght-normal.057478083c1d.woff2") format("woff2");
  font-weight: 100 900; font-display: swap; }

:root {
  --klein: #002395; --nuit: #001A75; --ciel: #7DA2FF; --pale: #E6E9FF;
  --fond: #F5F6FA; --surface: #FFFFFF; --surface-2: #F9FAFD; --survol: #F1F3FA;
  --trait: #E3E6EF; --trait-fort: #CDD2E0;
  --texte: #141A33; --texte-2: #4A5170; --texte-3: #6E7593;
  --accent: var(--klein); --accent-fond: var(--pale); --accent-texte: #fff;
  --ok: #17703F; --ok-fond: #E2F3E9; --attention: #8A5300; --attention-fond: #FFF0D6;
  --alerte: #A3260F; --alerte-fond: #FCE7E2; --info: #1D3A9E; --info-fond: #E6E9FF;
  --ombre: 0 1px 2px rgba(10, 20, 60, .05), 0 1px 1px rgba(10, 20, 60, .03);
  --ombre-haute: 0 12px 32px rgba(10, 20, 60, .14), 0 2px 6px rgba(10, 20, 60, .06);
  --rayon: 10px; --rayon-petit: 7px;
  --barre: 236px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #0C0F1C; --surface: #141829; --surface-2: #181D31; --survol: #1D2339;
    --trait: #262C45; --trait-fort: #343C5C;
    --texte: #E9ECF7; --texte-2: #B3B9D1; --texte-3: #8A91AD;
    --accent: #7DA2FF; --accent-fond: #1B2550; --accent-texte: #0C0F1C;
    --ok: #6CD49A; --ok-fond: #12301F; --attention: #F2BC6B; --attention-fond: #35270F;
    --alerte: #FF9C88; --alerte-fond: #3A1A14; --info: #A9C0FF; --info-fond: #1B2550;
    --ombre: none; --ombre-haute: 0 12px 32px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #0C0F1C; --surface: #141829; --surface-2: #181D31; --survol: #1D2339;
  --trait: #262C45; --trait-fort: #343C5C;
  --texte: #E9ECF7; --texte-2: #B3B9D1; --texte-3: #8A91AD;
  --accent: #7DA2FF; --accent-fond: #1B2550; --accent-texte: #0C0F1C;
  --ok: #6CD49A; --ok-fond: #12301F; --attention: #F2BC6B; --attention-fond: #35270F;
  --alerte: #FF9C88; --alerte-fond: #3A1A14; --info: #A9C0FF; --info-fond: #1B2550;
  --ombre: none; --ombre-haute: 0 12px 32px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* --- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte);
  font: 400 14.5px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
h1, h2, h3 { font-family: Montserrat, Inter, sans-serif; margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 15px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0 0 .6em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.chiffre, .montant { font-variant-numeric: tabular-nums; }
.discret { color: var(--texte-3); }
.petit { font-size: 12.5px; }
.icone { flex: none; display: inline-block; vertical-align: -3px; }
.vide { color: var(--texte-3); padding: 20px 4px; text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* --- Charpente ----------------------------------------------------------- */
.app { display: grid; grid-template-columns: var(--barre) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.barre { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
  background: var(--nuit); color: #fff; display: flex; flex-direction: column; padding: 18px 12px 14px; }
.marque { display: flex; align-items: center; gap: 10px; padding: 2px 8px 22px; color: #fff; }
.marque:hover { text-decoration: none; }
.marque img { width: 30px; height: 30px; }
.marque b { font: 700 16px/1 Montserrat, sans-serif; letter-spacing: .06em; }
.marque small { display: block; font-size: 11px; opacity: .65; letter-spacing: .02em; margin-top: 3px; }
.nav-groupe { margin-bottom: 18px; }
.nav-titre { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em;
  color: rgba(255, 255, 255, .5); padding: 0 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px;
  color: rgba(255, 255, 255, .82); font-weight: 500; font-size: 14px; }
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav a[aria-current="page"] { background: rgba(125, 162, 255, .2); color: #fff; }
.nav a[aria-current="page"] .icone { color: var(--ciel); }
.nav .compte { margin-left: auto; font-size: 11.5px; font-weight: 600; min-width: 20px; text-align: center;
  border-radius: 999px; padding: 1px 6px; background: rgba(255, 255, 255, .14); }
.nav .compte--alerte { background: #E8573F; color: #fff; }
.barre-pied { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .1); padding: 12px 8px 0;
  display: flex; align-items: center; gap: 10px; font-size: 13px; }
.barre-pied .avatar { background: rgba(255, 255, 255, .14); color: #fff; }
.barre-pied .qui { min-width: 0; flex: 1; }
.barre-pied .qui b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre-pied a, .barre-pied button { color: rgba(255, 255, 255, .7); font-size: 12px; background: none; border: 0;
  padding: 0; cursor: pointer; }
.barre-pied a:hover, .barre-pied button:hover { color: #fff; }

.principal { min-width: 0; display: flex; flex-direction: column; }
.haut { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 32px; background: color-mix(in srgb, var(--fond) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent; }
.haut .marque-mobile { display: none; }
.cherche { position: relative; flex: 1; max-width: 520px; }
.cherche .icone { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--texte-3); }
.cherche input { width: 100%; height: 38px; border-radius: 9px; border: 1px solid var(--trait);
  background: var(--surface); padding: 0 12px 0 36px; outline: none; }
.cherche input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-fond); }
.haut .actions-haut { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.contenu { padding: 8px 32px 56px; max-width: 1440px; width: 100%; }

/* --- En-tête de page ----------------------------------------------------- */
.entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin: 10px 0 22px; }
.entete .surtitre { color: var(--texte-3); font-size: 13px; margin-bottom: 6px; display: flex; gap: 6px;
  align-items: center; flex-wrap: wrap; }
.entete .surtitre a { color: var(--texte-2); }
.entete h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.entete .sous { color: var(--texte-2); margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.entete .sous > span { display: inline-flex; align-items: center; gap: 6px; }
.boutons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* --- Boutons ------------------------------------------------------------- */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px;
  padding: 0 14px; border-radius: 8px; border: 1px solid var(--trait-fort); background: var(--surface);
  color: var(--texte); font-weight: 550; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background-color .12s, border-color .12s, box-shadow .12s; }
.bouton:hover { text-decoration: none; border-color: var(--accent); background: var(--survol); }
.bouton--principal { background: var(--klein); border-color: var(--klein); color: #fff; }
.bouton--principal:hover { background: var(--nuit); border-color: var(--nuit); }
:root[data-theme="dark"] .bouton--principal { background: var(--ciel); border-color: var(--ciel); color: #0C0F1C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bouton--principal {
  background: var(--ciel); border-color: var(--ciel); color: #0C0F1C; } }
.bouton--discret { background: transparent; border-color: transparent; color: var(--texte-2); }
.bouton--discret:hover { background: var(--survol); border-color: transparent; color: var(--texte); }
.bouton--danger { color: var(--alerte); }
.bouton--danger:hover { border-color: var(--alerte); background: var(--alerte-fond); }
.bouton--petit { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.bouton--icone { width: 36px; padding: 0; }
.bouton--petit.bouton--icone { width: 30px; }

/* Menu « Nouveau » */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-liste { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 210px;
  background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon);
  box-shadow: var(--ombre-haute); padding: 6px; }
.menu-liste a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; color: var(--texte); }
.menu-liste a:hover { background: var(--survol); text-decoration: none; }
.menu-liste .icone { color: var(--texte-3); }

/* --- Panneaux ------------------------------------------------------------ */
.panneau { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon);
  box-shadow: var(--ombre); min-width: 0; }
.panneau-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px 0; min-height: 44px; }
.panneau-tete h2 { display: flex; align-items: center; gap: 8px; }
.panneau-tete .compteur { color: var(--texte-3); font-weight: 500; font-family: Inter, sans-serif; font-size: 13px; }
.panneau-corps { padding: 12px 18px 16px; }
.panneau-corps--plein { padding: 8px 0 6px; }
.grille { display: grid; gap: 18px; }
.grille--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grille--fiche { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: start; }
.grille--tdb { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.pile { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* Indicateurs */
.indicateurs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  background: var(--trait); border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden;
  margin-bottom: 18px; box-shadow: var(--ombre); }
.indicateur { background: var(--surface); padding: 16px 18px; min-width: 0; }
.indicateur .libelle { color: var(--texte-2); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.indicateur .valeur { font: 700 26px/1.15 Montserrat, sans-serif; margin-top: 6px; font-variant-numeric: tabular-nums;
  letter-spacing: -.02em; white-space: nowrap; }
.indicateur .detail { color: var(--texte-3); font-size: 12.5px; margin-top: 3px; }
.indicateur--alerte .valeur { color: var(--alerte); }
a.indicateur { color: inherit; }
a.indicateur:hover { text-decoration: none; background: var(--surface-2); }

/* --- Pastilles, avatars -------------------------------------------------- */
.pastille { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; font-family: Inter, sans-serif; letter-spacing: 0; vertical-align: middle; }
.pastille--ok { background: var(--ok-fond); color: var(--ok); }
.pastille--info { background: var(--info-fond); color: var(--info); }
.pastille--attention { background: var(--attention-fond); color: var(--attention); }
.pastille--alerte { background: var(--alerte-fond); color: var(--alerte); }
.pastille--neutre { background: var(--survol); color: var(--texte-2); }
.pastille--marque { background: var(--klein); color: #fff; }
.pastille--ciel { background: var(--ciel); color: #0C0F1C; }
.pastille--tlp-red { background: #2b0a06; color: #FF5B45; }
.pastille--tlp-amber { background: #2b1e05; color: #FFC000; }
.pastille--tlp-green { background: #052b10; color: #33FF00; }
.pastille--tlp-clear { background: #1c1f26; color: #fff; }
.avatar { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: var(--accent-fond); color: var(--accent); font: 700 12px/1 Montserrat, sans-serif; letter-spacing: .02em; }
.avatar--grand { width: 52px; height: 52px; border-radius: 13px; font-size: 18px; }
.avatar--part { background: color-mix(in srgb, var(--ciel) 28%, var(--surface)); color: var(--nuit); }

/* --- Tableaux ------------------------------------------------------------ */
.tableau-cadre { overflow-x: auto; }
table.tableau { width: 100%; border-collapse: collapse; }
.tableau th { text-align: left; font-size: 12px; font-weight: 600; color: var(--texte-3); padding: 10px 14px;
  border-bottom: 1px solid var(--trait); white-space: nowrap; background: var(--surface-2); }
.tableau th:first-child, .tableau td:first-child { padding-left: 18px; }
.tableau th:last-child, .tableau td:last-child { padding-right: 18px; }
.tableau td { padding: 11px 14px; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau tbody tr { position: relative; }
.tableau tbody tr:hover td { background: var(--surface-2); }
.tableau .lien-ligne { color: var(--texte); font-weight: 600; }
.tableau .lien-ligne::after { content: ""; position: absolute; inset: 0; }
.tableau .nombre, .tableau th.nombre { text-align: right; font-variant-numeric: tabular-nums; }
.tableau .sous-ligne { color: var(--texte-3); font-size: 12.5px; margin-top: 1px; }
.tableau .cellule-nom { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.tableau a:not(.lien-ligne) { position: relative; z-index: 1; }

/* Listes simples dans un panneau */
.liste { list-style: none; margin: 0; padding: 0; }
.liste > li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 18px; border-top: 1px solid var(--trait); }
.liste > li:first-child { border-top: 0; }
.liste .corps { flex: 1; min-width: 0; }
.liste .titre { font-weight: 600; color: var(--texte); }
.liste .meta { color: var(--texte-3); font-size: 12.5px; margin-top: 1px; }
.liste .droite { margin-left: auto; text-align: right; flex: none; }

/* --- Onglets, filtres ---------------------------------------------------- */
.filtres { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.onglets { display: flex; gap: 2px; flex-wrap: wrap; padding: 3px; background: var(--survol);
  border-radius: 9px; border: 1px solid var(--trait); }
.onglets a { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 7px;
  color: var(--texte-2); font-weight: 550; font-size: 13.5px; }
.onglets a:hover { color: var(--texte); text-decoration: none; }
.onglets a[aria-current="true"] { background: var(--surface); color: var(--texte); box-shadow: var(--ombre); }
.onglets .n { color: var(--texte-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.filtres .champ { height: 36px; width: auto; }
.filtres .cherche-liste { flex: 1; min-width: 200px; max-width: 360px; }

/* --- Formulaires --------------------------------------------------------- */
.champ { width: 100%; min-height: 38px; padding: 7px 11px; border: 1px solid var(--trait-fort); border-radius: 8px;
  background: var(--surface); outline: none; transition: border-color .12s, box-shadow .12s; }
textarea.champ { resize: vertical; line-height: 1.5; }
select.champ { appearance: none; -webkit-appearance: none; padding-right: 32px; background-repeat: no-repeat;
  background-position: right 10px center; background-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E7593' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
select[multiple].champ { background-image: none; padding-right: 11px; }
.champ:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-fond); }
.champ[aria-invalid="true"], .erreur .champ { border-color: var(--alerte); }
.case { width: 18px; height: 18px; accent-color: var(--klein); vertical-align: -3px; }
.formulaire { max-width: 760px; }
.form-section { padding: 18px 22px 8px; border-top: 1px solid var(--trait); }
.form-section:first-child { border-top: 0; }
.form-section h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--texte-3);
  font-family: Inter, sans-serif; font-weight: 600; margin-bottom: 14px; }
.rang { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 14px; }
.zone label, .zone .etiquette { display: block; font-size: 13px; font-weight: 550; color: var(--texte-2); margin-bottom: 5px; }
.zone--case label { display: inline-flex; gap: 9px; align-items: center; color: var(--texte); font-weight: 500; margin: 6px 0 0; }
.zone .aide { font-size: 12.5px; color: var(--texte-3); margin-top: 4px; }
.zone .message-erreur { font-size: 12.5px; color: var(--alerte); margin-top: 4px; font-weight: 550; }
.form-pied { display: flex; gap: 8px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--trait);
  background: var(--surface-2); border-radius: 0 0 var(--rayon) var(--rayon); }
.form-pied .a-droite { margin-left: auto; }
.form-erreurs { margin: 16px 22px 0; padding: 10px 14px; border-radius: 8px; background: var(--alerte-fond); color: var(--alerte); }
.ligne-saisie { display: flex; gap: 8px; flex-wrap: wrap; }
.ligne-saisie .champ { width: auto; }
.ligne-saisie .grandit { flex: 1; min-width: 180px; }
.ligne-saisie .grandit .champ { width: 100%; }
.tableau .champ { min-width: 0; }
.tableau tfoot td { white-space: nowrap; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--klein); }

/* --- Messages ------------------------------------------------------------ */
.messages { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.messages li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 9px;
  background: var(--ok-fond); color: var(--ok); font-weight: 550; animation: arrivee .25s ease-out; }
.messages li.error { background: var(--alerte-fond); color: var(--alerte); }
@keyframes arrivee { from { opacity: 0; transform: translateY(-4px); } }

/* --- Données clé-valeur -------------------------------------------------- */
dl.donnees { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 14px; margin: 0; }
dl.donnees dt { color: var(--texte-3); font-size: 13px; padding-top: 1px; }
dl.donnees dd { margin: 0; overflow-wrap: anywhere; }

/* --- Relances ------------------------------------------------------------ */
.action { display: flex; gap: 12px; align-items: flex-start; padding: 10px 18px; border-top: 1px solid var(--trait); }
.action:first-child { border-top: 0; }
.action form.coche { margin: 0; }
.action .bouton-coche { width: 22px; height: 22px; border-radius: 50%; border: 1.75px solid var(--trait-fort);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; padding: 0; color: transparent; margin-top: 1px; }
.action .bouton-coche:hover { border-color: var(--ok); color: var(--ok); }
.action.faite .bouton-coche { background: var(--ok); border-color: var(--ok); color: #fff; }
.action.faite .titre { text-decoration: line-through; color: var(--texte-3); }
.action .corps { flex: 1; min-width: 0; }
.action .titre { font-weight: 550; }
.action .meta { color: var(--texte-3); font-size: 12.5px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.action .meta .icone { vertical-align: -3px; }
.echeance--retard { color: var(--alerte); font-weight: 600; }
.echeance--jour { color: var(--attention); font-weight: 600; }
.groupe-titre { display: flex; align-items: center; gap: 8px; font: 600 12px/1 Inter, sans-serif; text-transform: uppercase;
  letter-spacing: .07em; color: var(--texte-3); padding: 16px 18px 8px; }
.groupe-titre--retard { color: var(--alerte); }
.ajout-rapide { padding: 12px 18px; border-top: 1px solid var(--trait); background: var(--surface-2);
  border-radius: 0 0 var(--rayon) var(--rayon); }

/* --- Frise (historique 360°) --------------------------------------------- */
.frise { list-style: none; margin: 0; padding: 4px 18px 8px; position: relative; }
.frise li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 10px 0; position: relative; }
.frise li::before { content: ""; position: absolute; left: 14.5px; top: 40px; bottom: -10px; width: 1px; background: var(--trait); }
.frise li:last-child::before { display: none; }
.frise .puce { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-fond); color: var(--accent); }
.frise .puce--gagnee { background: var(--ok-fond); color: var(--ok); }
.frise .puce--perdue { background: var(--alerte-fond); color: var(--alerte); }
.frise .puce--proposition, .frise .puce--contrat { background: var(--survol); color: var(--texte-2); }
.frise .quoi { font-size: 12.5px; color: var(--texte-3); }
.frise .quoi b { color: var(--texte-2); font-weight: 600; }
.frise .texte { margin-top: 2px; white-space: pre-line; overflow-wrap: anywhere; }

/* --- Pipeline (kanban) --------------------------------------------------- */
.resume { display: flex; gap: 4px 28px; flex-wrap: wrap; color: var(--texte-2); margin-top: 6px; }
.resume b { color: var(--texte); font-variant-numeric: tabular-nums; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(268px, 1fr); gap: 12px;
  overflow-x: auto; padding-bottom: 12px; align-items: start; scroll-snap-type: x proximity;
  margin: 0 -32px; padding-left: 32px; padding-right: 32px; scroll-padding: 0 32px; }
.colonne { background: var(--survol); border: 1px solid var(--trait); border-radius: 12px; display: flex;
  flex-direction: column; max-height: calc(100vh - 210px); max-height: calc(100dvh - 210px); scroll-snap-align: start; min-width: 0; }
.colonne--close { grid-column: span 1; background: transparent; border-style: dashed; }
.colonne-tete { padding: 12px 14px 10px; }
.colonne-tete .nom { display: flex; align-items: center; gap: 8px; font: 650 14px/1.2 Montserrat, sans-serif; }
.colonne-tete .nom .n { font: 600 12px/1 Inter, sans-serif; color: var(--texte-3); background: var(--surface);
  border: 1px solid var(--trait); border-radius: 999px; padding: 3px 7px; }
.colonne-tete .somme { color: var(--texte-3); font-size: 12.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.colonne-tete .jauge { height: 3px; border-radius: 3px; background: var(--trait); margin-top: 10px; overflow: hidden; }
.colonne-tete .jauge i { display: block; height: 100%; background: var(--accent); }
.colonne--gagnee .jauge i { background: var(--ok); }
.colonne-corps { padding: 4px 8px 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 80px; flex: 1; }
.colonne.survolee { border-color: var(--accent); background: var(--accent-fond); }
.carte { background: var(--surface); border: 1px solid var(--trait); border-radius: 9px; padding: 11px 12px;
  box-shadow: var(--ombre); cursor: grab; position: relative; transition: box-shadow .15s, transform .15s, border-color .15s; }
.carte:hover { border-color: var(--trait-fort); box-shadow: var(--ombre-haute); }
.carte.en-vol { opacity: .45; transform: rotate(1deg); }
.carte .titre { font-weight: 600; color: var(--texte); display: block; line-height: 1.3; }
.carte .titre::after { content: ""; position: absolute; inset: 0; }
.carte .societe { color: var(--texte-2); font-size: 13px; margin-top: 2px; }
.carte .bas { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12.5px; }
.carte .valeur { font-weight: 650; font-variant-numeric: tabular-nums; }
.carte .quand { color: var(--texte-3); display: inline-flex; gap: 4px; align-items: center; }
.carte .prochaine { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--trait); font-size: 12.5px;
  color: var(--texte-2); display: flex; gap: 6px; align-items: center; }
.carte .prochaine--endormie { color: var(--attention); }
.colonne-vide { color: var(--texte-3); font-size: 13px; text-align: center; padding: 18px 8px;
  border: 1px dashed var(--trait-fort); border-radius: 9px; }

/* Étapes sur la fiche affaire */
.etapes { display: flex; gap: 4px; flex-wrap: wrap; margin: 0; }
.etapes form { margin: 0; flex: 1 1 110px; display: flex; }
.etapes button { flex: 1; height: 38px; border: 1px solid var(--trait); background: var(--surface); color: var(--texte-2);
  font-weight: 550; font-size: 13px; cursor: pointer; border-radius: 8px; padding: 0 10px; white-space: nowrap; }
.etapes button:hover { border-color: var(--accent); color: var(--texte); }
.etapes .passee button { background: var(--accent-fond); color: var(--accent); border-color: transparent; }
.etapes .actuelle button { background: var(--klein); color: #fff; border-color: var(--klein); }
.etapes .gagnee.actuelle button { background: var(--ok); border-color: var(--ok); }
.etapes .perdue.actuelle button { background: var(--alerte); border-color: var(--alerte); }

/* --- Graphiques légers --------------------------------------------------- */
.barres { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; align-items: end; height: 170px; padding: 8px 18px 0; }
.barres .col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.barres .val { font-size: 12px; color: var(--texte-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.barres .barre-v { width: 100%; max-width: 44px; background: var(--klein); border-radius: 5px 5px 2px 2px; min-height: 2px; }
.barres .col:first-child .barre-v { background: var(--nuit); }
:root[data-theme="dark"] .barres .barre-v { background: var(--ciel); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .barres .barre-v { background: var(--ciel); } }
.barres-legende { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding: 6px 18px 16px;
  text-align: center; color: var(--texte-3); font-size: 12px; }
.entonnoir { list-style: none; margin: 0; padding: 6px 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.entonnoir .ligne-haut { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 5px; }
.entonnoir .ligne-haut span:last-child { color: var(--texte-2); font-variant-numeric: tabular-nums; }
.entonnoir .piste-barre { height: 8px; background: var(--survol); border-radius: 5px; overflow: hidden; }
.entonnoir .piste-barre i { display: block; height: 100%; background: var(--klein); border-radius: 5px; min-width: 4px; }
:root[data-theme="dark"] .entonnoir .piste-barre i { background: var(--ciel); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .entonnoir .piste-barre i { background: var(--ciel); } }
.score { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.score .piste-barre { width: 56px; height: 6px; background: var(--survol); border-radius: 4px; overflow: hidden; }
.score .piste-barre i { display: block; height: 100%; background: var(--accent); }

/* --- Divers -------------------------------------------------------------- */
.reserve { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px dashed var(--trait-fort);
  border-radius: 9px; color: var(--texte-2); font-size: 13px; }
.reserve .icone { color: var(--texte-3); margin-top: 1px; }
.bandeau { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--rayon);
  background: var(--ok-fond); color: var(--ok); margin-bottom: 18px; font-weight: 550; }
.bandeau .bouton { margin-left: auto; }
.bandeau--attention { background: var(--attention-fond); color: var(--attention); }
.prix-grand { font: 700 34px/1.1 Montserrat, sans-serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pagination { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 18px; color: var(--texte-3); font-size: 13px; }
.lien-discret { color: var(--texte-2); }
.total-ligne td { font-weight: 650; background: var(--surface-2); }

/* Connexion */
.connexion { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.connexion-visuel { background: var(--nuit); color: #fff; padding: 48px; display: flex; flex-direction: column;
  justify-content: space-between; position: relative; overflow: hidden; }
.connexion-visuel::after { content: ""; position: absolute; right: -140px; bottom: -140px; width: 420px; height: 420px;
  border-radius: 50%; border: 56px solid rgba(125, 162, 255, .14); }
.connexion-visuel img { width: 180px; }
.connexion-visuel h1 { font-size: 34px; max-width: 420px; line-height: 1.15; }
.connexion-visuel p { color: rgba(255, 255, 255, .7); max-width: 400px; margin-top: 14px; }
.connexion-form { display: grid; place-items: center; padding: 32px 20px; }
.connexion-form .boite { width: 100%; max-width: 380px; }
.connexion-form h2 { font-size: 22px; margin-bottom: 6px; }
.bouton--large { width: 100%; height: 46px; font-size: 15px; }
.separateur { display: flex; align-items: center; gap: 12px; color: var(--texte-3); font-size: 12.5px; margin: 22px 0; }
.separateur::before, .separateur::after { content: ""; flex: 1; height: 1px; background: var(--trait); }

/* --- Barre d'onglets mobile ---------------------------------------------- */
.onglets-mobile { display: none; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1180px) {
  .grille--tdb { grid-template-columns: minmax(0, 1fr); }
  .indicateurs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .grille--fiche, .grille--2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .barre { display: none; }
  .haut { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); gap: 10px; }
  .haut .marque-mobile { display: block; }
  .haut .marque-mobile img { width: 30px; height: 30px; display: block; }
  .contenu { padding: 4px 16px calc(92px + env(safe-area-inset-bottom)); }
  h1 { font-size: 21px; }
  .entete { margin: 6px 0 16px; }
  .kanban { margin: 0 -16px; padding-left: 16px; padding-right: 16px; grid-auto-columns: 84%; }
  .colonne { max-height: none; }
  .masque-mobile { display: none; }
  .tableau td, .tableau th { padding: 10px 10px; }
  .tableau .cellule-nom { min-width: 0; }
  .onglets { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; }
  .onglets a { white-space: nowrap; }
  .connexion { grid-template-columns: minmax(0, 1fr); }
  .connexion-visuel { padding: 28px 24px; min-height: 200px; }
  .connexion-visuel h1 { font-size: 24px; }
  .form-section, .form-pied { padding-left: 16px; padding-right: 16px; }
  dl.donnees { grid-template-columns: 100px minmax(0, 1fr); }
  .onglets-mobile { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; z-index: 40;
    left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-top: 1px solid var(--trait); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .onglets-mobile a, .onglets-mobile summary { display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 10.5px; font-weight: 600; color: var(--texte-3); padding: 4px 0; position: relative; cursor: pointer; list-style: none; }
  .onglets-mobile summary::-webkit-details-marker { display: none; }
  .onglets-mobile a:hover { text-decoration: none; }
  .onglets-mobile [aria-current="page"] { color: var(--accent); }
  .onglets-mobile .compte { position: absolute; top: 0; left: calc(50% + 6px); background: #E8573F; color: #fff;
    font-size: 10px; border-radius: 999px; padding: 0 5px; line-height: 16px; }
  .onglets-mobile details { display: contents; }
  .onglets-mobile .feuille { position: fixed; left: 8px; right: 8px; bottom: calc(70px + env(safe-area-inset-bottom));
    background: var(--surface); border: 1px solid var(--trait); border-radius: 14px; box-shadow: var(--ombre-haute); padding: 6px; }
  .onglets-mobile .feuille a { flex-direction: row; gap: 12px; font-size: 15px; color: var(--texte); padding: 12px; border-radius: 9px; font-weight: 500; }
  .onglets-mobile .feuille a .icone { color: var(--texte-3); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print {
  .barre, .haut, .onglets-mobile, .boutons, .messages, .pas-imprimer { display: none !important; }
  .app { display: block; }
  .contenu { padding: 0; }
  body { background: #fff; }
  .panneau { box-shadow: none; border: 0; }
}

/* --- Annuaire des entreprises (nouvelle société) -------------------------- */
.annuaire-etat { margin-top: 12px; }
.annuaire-resultats { margin: 12px -22px -16px; border-top: 1px solid var(--trait); }
.annuaire-resultats > li { padding: 0; }
.annuaire-resultats button { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left;
  padding: 11px 22px; background: none; border: 0; cursor: pointer; }
.annuaire-resultats button:hover, .annuaire-resultats button:focus-visible { background: var(--survol); }
.annuaire-resultats .titre { display: block; }
.champ.rempli { animation: rempli 1.2s ease-out; }
@keyframes rempli { from { background: var(--accent-fond); border-color: var(--accent); } }
@media (max-width: 820px) { .annuaire-resultats { margin-left: -16px; margin-right: -16px; }
  .annuaire-resultats button { padding-left: 16px; padding-right: 16px; } }
