/* KOUNHANY CRM — a business tool, not a chat: light paper, deep-navy sidebar, coral for the one main action.
   Dark theme follows the system (or the toggle). Scale: 14px text, 8px grid, 40px controls (44px on touch). */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/static/pjs-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/static/pjs-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --f: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  /* from the logo: amber #FFBE46 → #F8A629 and warm ink #2E2A1F. One accent only. */
  --ink: #2E2A1F; --amber: #F8A629; --amber-2: #FFBE46; --amber-deep: #B8700F;
  --page: #FBFAF7; --card: #FFFFFF; --card-2: #F6F4EE; --line: #E7E3D8; --line-2: #EFECE3; --hover: #F3F0E8; --active: #EFEBDF;
  --fg: #3A352A; --fg-2: #5E574A; --fg-3: #8B8474; --strong: #1F1C14;
  --accent: #F8A629; --accent-2: #FFBE46; --on-accent: #2E2A1F; --accent-text: #9A5C08; --accent-soft: #F8A62924;
  --ok: #2F7D54; --ok-soft: #2F7D5414; --warn: #8A5A0A; --warn-soft: #F8A62926; --alert: #B23A2A; --alert-soft: #B23A2A12; --info: #4A5A7A; --info-soft: #4A5A7A12;
  --shadow: none; --shadow-pop: 0 12px 40px -8px #2E2A1F33, 0 2px 8px #2E2A1F14;
  --r: 14px; --r-s: 10px; --r-xs: 6px; --ring: 0 0 0 3px #F8A62950;
  --side: 244px;
  --c-decouverte: #9A937F; --c-argumentation: #E3A33A; --c-closing: #D9822B; --c-gagne: #3F8F5F; --c-perdu: #BDB7AA; --c-veille: #8E8AA8;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #F4EFE2;
  --page: #151410; --card: #1C1A15; --card-2: #181611; --line: #2E2B22; --line-2: #24211A; --hover: #24211A; --active: #2C2920;
  --fg: #E6E0D0; --fg-2: #BDB6A4; --fg-3: #8D8676; --strong: #FAF6EA;
  --accent: #F8A629; --accent-2: #FFBE46; --on-accent: #2E2A1F; --accent-text: #FFC567; --accent-soft: #F8A62924;
  --ok: #7FD1A0; --ok-soft: #7FD1A01A; --warn: #FFC567; --warn-soft: #F8A62924; --alert: #FF9E8F; --alert-soft: #FF9E8F1A; --info: #AFC0E0; --info-soft: #AFC0E01A;
  --shadow-pop: 0 12px 40px -8px #000000B0; --ring: 0 0 0 3px #F8A62960;
  --c-decouverte: #A59E88; --c-argumentation: #F0B95A; --c-closing: #F59A45; --c-gagne: #7FD1A0; --c-perdu: #6F6A5E; --c-veille: #A9A4C8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #F4EFE2;
    --page: #151410; --card: #1C1A15; --card-2: #181611; --line: #2E2B22; --line-2: #24211A; --hover: #24211A; --active: #2C2920;
    --fg: #E6E0D0; --fg-2: #BDB6A4; --fg-3: #8D8676; --strong: #FAF6EA;
    --accent-text: #FFC567; --ok: #7FD1A0; --ok-soft: #7FD1A01A; --warn: #FFC567; --alert: #FF9E8F; --alert-soft: #FF9E8F1A; --info: #AFC0E0; --info-soft: #AFC0E01A;
    --shadow-pop: 0 12px 40px -8px #000000B0; --ring: 0 0 0 3px #F8A62960;
    --c-decouverte: #A59E88; --c-argumentation: #F0B95A; --c-closing: #F59A45; --c-gagne: #7FD1A0; --c-perdu: #6F6A5E; --c-veille: #A9A4C8;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--page); overscroll-behavior: none; }   /* no rubber-band, and if the system still bounces, what shows is the page colour */
html { -webkit-text-size-adjust: 100%; }
body { font: 14px/1.55 var(--f); color: var(--fg); background: var(--page); -webkit-font-smoothing: antialiased; letter-spacing: -.003em; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); }
::selection { background: var(--accent-soft); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xs); }
[hidden] { display: none !important; }
.icone { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- shell: calm, flat, one hairline between sidebar and page ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.cote { position: sticky; top: 0; height: 100vh; background: var(--page); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px 14px; gap: 20px; }
.marque { display: flex; align-items: center; gap: 10px; padding: 2px 8px; }
.marque img { height: 32px; width: 32px; border-radius: 9px; display: block; }
.marque b { font-size: 15px; font-weight: 700; color: var(--strong); letter-spacing: .01em; }
.marque small { display: block; font-size: 12px; color: var(--fg-3); font-weight: 500; margin-top: -3px; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-titre { font-size: 12px; color: var(--fg-3); padding: 14px 10px 6px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: var(--fg-2); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--hover); color: var(--strong); }
.nav a[aria-current="page"] { background: var(--active); color: var(--strong); font-weight: 600; }
.nav a[aria-current="page"] .icone { color: var(--amber-deep); }
:root[data-theme="dark"] .nav a[aria-current="page"] .icone { color: var(--amber-2); }
.nav .pastille { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--amber); color: var(--on-accent); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.cote-bas { margin-top: auto; display: flex; flex-direction: column; gap: 1px; font-size: 13px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.cote-bas .moi { color: var(--fg-3); padding: 0 10px 8px; word-break: break-all; font-size: 12px; }
.cote-bas button { display: flex; align-items: center; gap: 11px; background: none; border: 0; color: var(--fg-2); padding: 7px 10px; border-radius: 9px; cursor: pointer; text-align: left; }
.cote-bas button:hover { background: var(--hover); color: var(--strong); }

.principal { min-width: 0; display: flex; flex-direction: column; }
.haut { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 16px 40px; background: color-mix(in srgb, var(--page) 90%, transparent); backdrop-filter: blur(12px); }
.haut h1 { font-size: 15px; font-weight: 600; color: var(--fg-2); }
.haut .espace { flex: 1; }
.btn.menu-bouton { display: none; }
.recherche { position: relative; width: min(420px, 44vw); }
.recherche .icone { position: absolute; left: 14px; top: 12px; color: var(--fg-3); }
.recherche input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); padding: 0 16px 0 40px; transition: border-color .15s, box-shadow .15s; }
.recherche input:hover { border-color: #D6D0C0; }
.recherche input:focus { outline: none; border-color: var(--amber); box-shadow: var(--ring); }
.contenu { padding: 8px 40px 72px; max-width: 1360px; width: 100%; display: flex; flex-direction: column; gap: 28px; }
.page-titre { font-size: 30px; font-weight: 700; letter-spacing: -.025em; color: var(--strong); line-height: 1.15; }
.page-sous { color: var(--fg-3); margin-top: 6px; font-size: 15px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--strong); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--hover); border-color: #D6D0C0; }
.btn.principal-b { background: var(--amber); border-color: var(--amber); color: #2E2A1F; }
.btn.principal-b:hover { background: var(--amber-2); border-color: var(--amber-2); }
.btn.petit { height: 32px; padding: 0 13px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: default; }
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ label { font-weight: 600; font-size: 13px; color: var(--fg-2); }
.champ input, .champ select, .champ textarea { height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 0 14px; width: 100%; transition: border-color .15s, box-shadow .15s; }
.champ input:focus, .champ textarea:focus, select.compact:focus { outline: none; border-color: var(--amber); box-shadow: var(--ring); }
.champ textarea { height: 104px; padding: 12px 14px; resize: vertical; }
select.compact { height: 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); padding: 0 14px; cursor: pointer; }
.champ-recherche { height: 40px; min-width: 300px; border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; background: var(--card); }
.champ-recherche:focus { outline: none; border-color: var(--amber); box-shadow: var(--ring); }
.puce { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line-2); color: var(--fg-2); white-space: nowrap; }
.puce.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; } .puce.alerte { background: var(--alert-soft); color: var(--alert); border-color: transparent; }
.puce.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; } .puce.info { background: var(--info-soft); color: var(--info); border-color: transparent; } .puce.accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.erreur { color: var(--alert); font-weight: 600; } .vide { color: var(--fg-3); padding: 28px; text-align: center; }

/* ---------- cards: white, hairline, no shadow ---------- */
.carte { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.carte > header { display: flex; align-items: center; gap: 12px; padding: 18px 22px 0; }
.carte > header h2 { font-size: 14px; font-weight: 600; color: var(--fg-2); }
.carte > header .espace { flex: 1; }
.carte .corps { padding: 14px 22px 22px; }
.grille { display: grid; gap: 16px; }
.g-kpi { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.g-2 { grid-template-columns: 1.35fr 1fr; align-items: start; gap: 20px; }
.kpi { padding: 20px 22px; display: flex; flex-direction: column; gap: 2px; position: relative; }
.kpi .lib { font-size: 13px; font-weight: 500; color: var(--fg-3); }
.kpi .val { font-size: 34px; font-weight: 700; letter-spacing: -.03em; color: var(--strong); line-height: 1.15; margin-top: 4px; }
.kpi .note { font-size: 13px; color: var(--fg-3); }
.kpi.alerte .val { color: var(--alert); } .kpi.ok .val { color: var(--ok); }
a.kpi { text-decoration: none; color: inherit; transition: border-color .15s, background .15s; } a.kpi:hover { border-color: #D6D0C0; background: var(--card-2); }

.entonnoir { display: flex; flex-direction: column; gap: 6px; }
.entonnoir a { display: grid; grid-template-columns: 112px 1fr 36px; align-items: center; gap: 14px; text-decoration: none; color: var(--fg-2); padding: 6px 0; }
.entonnoir a:hover { color: var(--strong); }
.entonnoir .barre { height: 8px; background: var(--card-2); border-radius: 999px; overflow: hidden; }
.entonnoir .barre i { display: block; height: 100%; border-radius: 999px; min-width: 6px; }
.entonnoir b { text-align: right; font-variant-numeric: tabular-nums; color: var(--strong); }

.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line-2); align-items: flex-start; }
.liste li:first-child { border-top: 0; padding-top: 4px; }
.liste .quand { min-width: 54px; text-align: center; font-weight: 600; font-size: 12px; color: var(--fg-2); background: var(--card-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 3px 6px; }
.liste .quand.retard { background: var(--alert-soft); color: var(--alert); border-color: transparent; }
.liste .qui { flex: 1; min-width: 0; } .liste .qui b { display: block; color: var(--strong); font-weight: 600; } .liste .qui span { color: var(--fg-3); font-size: 13px; }
.liste a.qui { text-decoration: none; color: inherit; } .liste a.qui:hover b { color: var(--accent-text); }
.colonne-pile { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* ---------- tables ---------- */
.defile { overflow-x: auto; }
table.donnees { width: 100%; border-collapse: collapse; }
.donnees th { text-align: left; font-size: 12px; color: var(--fg-3); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.donnees td { padding: 13px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.donnees tr:last-child td { border-bottom: 0; }
.donnees tr.clic { cursor: pointer; } .donnees tr.clic:hover td { background: var(--card-2); }
.donnees td .nom { font-weight: 600; color: var(--strong); }
.donnees tr.alerte-ton td:first-child { box-shadow: inset 2px 0 0 var(--alert); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px 0; color: var(--fg-3); font-size: 13px; flex-wrap: wrap; }
.avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--amber-2); color: #2E2A1F; display: grid; place-items: center; font-weight: 800; flex: none; }
.avatar.grand { width: 56px; height: 56px; font-size: 20px; border-radius: 16px; }

/* ---------- pipeline ---------- */
.barre-outils { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tableau-colonnes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.colonne { background: var(--card-2); border: 1px solid var(--line-2); border-radius: var(--r); display: flex; flex-direction: column; max-height: calc(100vh - 230px); }
.colonne > header { padding: 14px 14px 10px; display: flex; align-items: center; gap: 9px; }
.colonne > header::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cc); }
.colonne > header b { color: var(--strong); font-weight: 600; } .colonne > header span.n { margin-left: auto; font-weight: 600; color: var(--fg-3); font-size: 13px; }
.colonne .cartes { padding: 2px 10px 12px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.fiche-mini { display: block; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-align: left; width: 100%; cursor: pointer; transition: border-color .15s; }
.fiche-mini:hover { border-color: var(--amber); }
.fiche-mini b { display: block; color: var(--strong); font-weight: 600; line-height: 1.3; }
.fiche-mini .meta { color: var(--fg-3); font-size: 12px; margin-top: 2px; }
.fiche-mini .bas { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; align-items: center; }

/* ---------- company file ---------- */
.dossier-tete { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dossier-tete h2 { font-size: 28px; font-weight: 700; color: var(--strong); letter-spacing: -.025em; line-height: 1.15; }
.dossier-tete .sous { color: var(--fg-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.dossier-tete .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.g-dossier { grid-template-columns: 300px 1fr; align-items: start; gap: 20px; }
dl.champs { margin: 0; display: grid; gap: 14px; } dl.champs dt { font-size: 12px; color: var(--fg-3); font-weight: 500; } dl.champs dd { margin: 1px 0 0; color: var(--strong); font-weight: 500; word-break: break-word; }
.onglets { display: flex; gap: 2px; border-bottom: 1px solid var(--line-2); padding: 0 14px; overflow-x: auto; }
.onglets button { background: none; border: 0; padding: 14px 12px 12px; font-weight: 500; color: var(--fg-3); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.onglets button:hover { color: var(--strong); }
.onglets button[aria-selected="true"] { color: var(--strong); font-weight: 600; border-bottom-color: var(--amber); }
.fil { list-style: none; margin: 0; padding: 0; position: relative; }
.fil::before { content: ""; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.fil li { position: relative; padding: 0 0 22px 46px; }
.fil .pt { position: absolute; left: 0; top: 0; width: 31px; height: 31px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; color: var(--fg-3); }
.fil .pt .icone { width: 15px; height: 15px; }
.fil .pt.message, .fil .pt.appel, .fil .pt.rdv, .fil .pt.visite { color: var(--amber-deep); background: var(--accent-soft); border-color: transparent; }
:root[data-theme="dark"] .fil .pt.message, :root[data-theme="dark"] .fil .pt.appel, :root[data-theme="dark"] .fil .pt.rdv, :root[data-theme="dark"] .fil .pt.visite { color: var(--amber-2); }
.fil .pt.decision { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.fil .ligne1 { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .fil .ligne1 b { color: var(--strong); font-weight: 600; } .fil .ligne1 span:not(.puce):not(.date) { color: var(--fg-3); }
.fil .date { color: var(--fg-3); font-size: 12px; margin-left: auto; }
.fil .texte { margin-top: 8px; background: var(--card-2); border-radius: 12px; padding: 11px 14px; white-space: pre-wrap; color: var(--fg-2); }
.fil .reponse { margin-top: 8px; border-left: 2px solid var(--ok); padding: 2px 12px; color: var(--fg-2); white-space: pre-wrap; }

/* ---------- decisions ---------- */
.decision { padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.decision h3 { font-size: 16px; font-weight: 600; color: var(--strong); } .decision p { color: var(--fg-2); white-space: pre-wrap; }
.decision .boutons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* ---------- login, dialog, toast ---------- */
.connexion { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--page); }
.connexion form { width: min(400px, 100%); display: flex; flex-direction: column; gap: 16px; }
.connexion .logo-c { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 8px; }
.connexion .logo-c img { height: 52px; width: 52px; border-radius: 14px; }
.connexion h1 { font-size: 30px; font-weight: 700; letter-spacing: -.025em; color: var(--strong); line-height: 1.15; }
.connexion .aide { color: var(--fg-3); font-size: 15px; margin-top: 6px; }
.connexion .btn { height: 46px; font-size: 15px; }
dialog { border: 1px solid var(--line); border-radius: 20px; padding: 0; background: var(--card); color: var(--fg); box-shadow: var(--shadow-pop); width: min(480px, calc(100% - 32px)); }
dialog::backdrop { background: #2E2A1F66; backdrop-filter: blur(2px); }
dialog form { padding: 26px; display: flex; flex-direction: column; gap: 14px; } dialog h2 { font-size: 18px; font-weight: 600; color: var(--strong); } dialog .pied { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--page); padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow-pop); z-index: 50; font-weight: 600; max-width: calc(100% - 32px); }
:root[data-theme="light"] .toast, :root:not([data-theme]) .toast { color: #FBFAF7; }
.toast.mauvais { background: var(--alert); color: #fff; }
.chargement { padding: 48px; text-align: center; color: var(--fg-3); }

/* ---------- small screens ---------- */
@media (max-width: 1100px) { .g-2, .g-dossier { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .cote { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 30; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-pop); }
  .app.menu-ouvert .cote { transform: none; }
  .app.menu-ouvert::after { content: ""; position: fixed; inset: 0; background: #2E2A1F59; z-index: 20; }
  .btn.menu-bouton { display: inline-flex; width: 38px; padding: 0; }
  .haut { padding: 12px 16px; } .contenu { padding: 4px 16px 56px; } .recherche { display: none; }
  .page-titre, .dossier-tete h2 { font-size: 24px; } .kpi .val { font-size: 26px; } .g-kpi { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi { padding: 14px 16px; }
  .btn, .champ input, .champ select { min-height: 44px; }
  .donnees th:nth-child(n+5), .donnees td:nth-child(n+5) { display: none; }
  .colonne { max-height: none; }
  .champ-recherche { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .cote, .haut .btn { display: none; } .app { display: block; } }

/* ---------- no native look anywhere ---------- */
button, input, select, textarea { -webkit-appearance: none; appearance: none; }
input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; display: none; }
input::-ms-reveal, input::-ms-clear { display: none; }
input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--card) inset; -webkit-text-fill-color: var(--fg); }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; } *::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; } *::-webkit-scrollbar-thumb:hover { background: var(--fg-3); background-clip: content-box; border: 3px solid transparent; }
*::-webkit-scrollbar-track { background: transparent; }
dialog { color: var(--fg); } dialog .dlg-texte { color: var(--fg-2); font-size: 15px; }

/* custom dropdown */
.liste-d { position: relative; display: inline-block; }
.btn-select { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--strong); font-weight: 500; cursor: pointer; transition: border-color .15s, background .15s; }
.btn-select:hover { background: var(--hover); border-color: #D6D0C0; }
.btn-select[aria-expanded="true"] { border-color: var(--amber); box-shadow: var(--ring); }
.btn-select .chevron { width: 15px; height: 15px; color: var(--fg-3); transition: transform .15s; } .btn-select[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.menu-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 100%; width: max-content; max-width: 320px; max-height: 300px; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); padding: 5px; animation: pop .12s ease-out; }
.dossier-tete .actions .menu-pop { left: auto; right: 0; }
.menu-item { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 12px; border-radius: 9px; color: var(--fg); cursor: pointer; white-space: nowrap; }
.menu-item:hover, .menu-item:focus-visible { background: var(--hover); outline: none; box-shadow: none; }
.menu-item[aria-selected="true"] { background: var(--accent-soft); color: var(--strong); font-weight: 600; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* polish: entrance, skeleton, empty states, shortcut hint, table avatars */
.entree > * { animation: monte .28s ease-out both; } .entree > *:nth-child(2) { animation-delay: .04s; } .entree > *:nth-child(3) { animation-delay: .08s; } .entree > *:nth-child(n+4) { animation-delay: .12s; }
@keyframes monte { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sq { border-radius: var(--r); background: linear-gradient(90deg, var(--card-2) 0%, var(--hover) 50%, var(--card-2) 100%); background-size: 200% 100%; animation: brille 1.3s linear infinite; }
.sq-titre { height: 38px; width: 260px; border-radius: 10px; } .sq-kpi { height: 112px; } .sq-bloc { height: 320px; }
@keyframes brille { to { background-position: -200% 0; } }
.vide-grand { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 56px 24px; color: var(--fg-3); text-align: center; } .vide-grand .icone { width: 28px; height: 28px; } .vide-grand b { color: var(--strong); font-size: 16px; }
.recherche kbd { position: absolute; right: 12px; top: 9px; font: 600 11px var(--f); color: var(--fg-3); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; background: var(--card-2); pointer-events: none; }
.recherche input { padding-right: 70px; } .recherche input:focus + kbd { display: none; }
.ligne-nom { display: flex; align-items: center; gap: 12px; } .mini-av { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-weight: 700; font-size: 11px; flex: none; }
.donnees th { position: sticky; top: 0; background: var(--card); }
@media (prefers-reduced-motion: reduce) { .entree > *, .sq, .menu-pop { animation: none !important; } }
.barre-outils, .dossier-tete { position: relative; z-index: 10; }   /* a menu opened here must sit above the blocks below, even while they fade in */

/* the sidebar drawer on phones must not let the page scroll behind it */
.app.menu-ouvert { overflow: hidden; height: 100dvh; }
.cote { overscroll-behavior: contain; }
.colonne .cartes, .menu-pop, .defile, .tableau-colonnes { overscroll-behavior: contain; }
