/* 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; }
.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 { overscroll-behavior: contain; }
.defile, .tableau-colonnes { overscroll-behavior-x: contain; overscroll-behavior-y: auto; }

/* ---------- fixed frame (like the Command Center): the window never scrolls, only the content area does; no rubber band, no strip ---------- */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.app { height: 100dvh; min-height: 0; overflow: hidden; }
.cote { height: 100dvh; position: relative; overflow-y: auto; }
.principal { height: 100dvh; min-height: 0; overflow: hidden; }
.haut { position: relative; flex: none; }
.contenu { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; max-width: none; width: 100%; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; align-items: stretch; }
.contenu > * { width: 100%; max-width: 1320px; flex: none; }
.connexion { height: 100dvh; overflow-y: auto; }
.colonne { max-height: calc(100dvh - 250px); }
.barre-mob { display: none; }
@media (max-width: 860px) {
  .app { display: block; }
  .cote { position: fixed; height: 100dvh; }
  .principal { padding-bottom: calc(60px + env(safe-area-inset-bottom)); height: 100dvh; }
  .contenu { padding-bottom: 24px; }
  .barre-mob { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--page); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .barre-mob a, .barre-mob button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 48px; background: none; border: 0; color: var(--fg-3);
    font: 600 11px var(--f); text-decoration: none; border-radius: 10px; cursor: pointer; -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
  .barre-mob a[aria-current="page"] { color: var(--strong); background: var(--active); }
  .barre-mob a[aria-current="page"] .icone { color: var(--amber-deep); }
  .barre-mob .icone { width: 20px; height: 20px; }
  .app.menu-ouvert::after { z-index: 26; } .app.menu-ouvert .cote { z-index: 30; }
  .tableau-colonnes { grid-auto-columns: 84%; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 12px; scroll-padding: 0 16px; }
  .colonne { scroll-snap-align: center; max-height: calc(100dvh - 260px); }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
img, a { -webkit-user-drag: none; }
/* the closed side menu casts no shadow (it leaked as a grey strip on the left edge); five KPI cards fit on one row */
@media (max-width: 860px) { .cote { box-shadow: none; visibility: hidden; transition: transform .2s, visibility 0s .2s; } .app.menu-ouvert .cote { box-shadow: var(--shadow-pop); visibility: visible; transition: transform .2s; } }
.g-kpi { grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); }
@media (max-width: 860px) { .g-kpi { grid-template-columns: 1fr 1fr; } }

/* ---------- sign-in screen: brand panel + one card ---------- */
.connexion { padding: 0; display: block; }
.cx-grille { min-height: 100dvh; display: grid; grid-template-columns: minmax(380px, 46%) 1fr; }
.cx-marque { background: linear-gradient(155deg, #FFC95E 0%, #F8A629 55%, #E58F14 100%); color: #2E2A1F; padding: 44px 56px; display: flex; flex-direction: column; gap: 40px; justify-content: space-between; }
.cx-logo { display: flex; align-items: center; gap: 12px; } .cx-logo img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 4px 14px #2E2A1F33; }
.cx-logo b { font-size: 18px; font-weight: 800; letter-spacing: .02em; display: block; line-height: 1.1; } .cx-logo small { font-size: 13px; font-weight: 600; opacity: .7; }
.cx-texte h2 { font-size: 38px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; max-width: 440px; } .cx-texte p { margin-top: 14px; font-size: 16px; max-width: 400px; opacity: .8; }
.cx-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.cx-points li { display: flex; gap: 14px; align-items: flex-start; }
.cx-points .pt-ic { width: 38px; height: 38px; flex: none; border-radius: 11px; background: #FFFFFF59; display: grid; place-items: center; }
.cx-points b { display: block; font-weight: 700; } .cx-points span:not(.pt-ic) { display: block; font-size: 13px; opacity: .75; margin-top: 1px; }
.cx-droite { display: grid; place-items: center; padding: 32px 24px; background: var(--page); }
.cx-carte { width: min(420px, 100%); display: flex; flex-direction: column; gap: 18px; }
.cx-entete h1 { font-size: 30px; font-weight: 700; letter-spacing: -.025em; color: var(--strong); line-height: 1.15; } .cx-entete .aide { color: var(--fg-3); margin-top: 6px; font-size: 15px; }
.cx-carte .btn { height: 50px; font-size: 15px; font-weight: 700; width: 100%; }
.cx-etapes { list-style: none; margin: 4px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 12px; color: var(--fg-2); font-size: 14px; }
.cx-etapes li { display: flex; gap: 12px; align-items: flex-start; }
.cx-etapes li > span { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 700; display: grid; place-items: center; margin-top: 1px; }
.cx-note { color: var(--fg-3); font-size: 13px; }
@media (max-width: 860px) {
  .cx-grille { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .cx-marque { padding: 28px 24px 30px; gap: 18px; border-radius: 0 0 26px 26px; }
  .cx-texte h2 { font-size: 26px; } .cx-texte p, .cx-points { display: none; }
  .cx-droite { align-items: start; padding-top: 28px; }
}
.connexion { width: 100%; } .cx-grille { width: 100%; max-width: none; }

.cx-logo { gap: 16px; } .cx-logo img { height: 34px; width: auto; border-radius: 0; box-shadow: none; display: block; }

/* =====================================================================================================================
   Studio de connaissances : ce qui s'ajoute à l'identité du CRM (mêmes variables, même cadre fixe, mêmes thèmes)
   ===================================================================================================================== */
:root { --g-agent: #D9822B; --g-base: #4A6FA5; --g-doc: #3F8F5F; --g-tag: #8E6AB0; --g-lien: #9A937F; --sel-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B8474' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] { --g-agent: #F59A45; --g-base: #8FB0E0; --g-doc: #7FD1A0; --g-tag: #C4A3E6; --g-lien: #A59E88; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --g-agent: #F59A45; --g-base: #8FB0E0; --g-doc: #7FD1A0; --g-tag: #C4A3E6; --g-lien: #A59E88; } }
.sans-js { padding: 24px; font-family: sans-serif; }
.grille > *, .g-2 > *, .g-3 > * { min-width: 0; }
.g-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.g-edit { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.g-compare { grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .g-edit { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .g-compare { grid-template-columns: 1fr; } .g-3 { grid-template-columns: 1fr; } }

/* texts */
.aide { color: var(--fg-3); font-size: 13px; line-height: 1.5; }
.aide b { color: var(--fg-2); font-weight: 600; }
.carte .corps > .aide:first-child { margin-bottom: 10px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.texte-long { white-space: pre-wrap; overflow-wrap: anywhere; }
.bandeau { border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: var(--r-s); background: var(--accent-soft); padding: 12px 16px; color: var(--fg); }
.bandeau.alerte { border-left-color: var(--alert); background: var(--alert-soft); }
.bandeau.ok { border-left-color: var(--ok); background: var(--ok-soft); }
.bandeau b { color: var(--strong); }
.bandeau p + p { margin-top: 6px; }
.erreur-bloc { border: 1px solid var(--alert); background: var(--alert-soft); color: var(--alert); border-radius: var(--r-s); padding: 12px 16px; font-weight: 600; overflow-wrap: anywhere; }
.pile { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ligne { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.espace { flex: 1; }
.btn.danger { color: var(--alert); }
.btn.danger:hover { border-color: var(--alert); }
.btn, .btn-select, .menu-item { min-height: 40px; }
.btn.petit { min-height: 40px; }
a.btn { text-decoration: none; }
.retour { align-self: flex-start; }
.lien-nu { color: inherit; text-decoration: none; } .lien-nu:hover { color: var(--accent-text); text-decoration: underline; }

/* forms */
.champ input, .champ select, .champ textarea, .sel, .saisie { border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--fg); padding: 0 14px; width: 100%; min-height: 44px; height: 44px; }
.champ input:focus, .champ select:focus, .champ textarea:focus, .sel:focus, .saisie:focus { outline: none; border-color: var(--amber); box-shadow: var(--ring); }
.sel { background-image: var(--sel-chevron); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 38px; cursor: pointer; text-overflow: ellipsis; }
.sel.court { width: auto; max-width: 100%; min-width: 150px; border-radius: 999px; height: 40px; min-height: 40px; }
.champ textarea.corps-md { height: 420px; min-height: 240px; padding: 12px 14px; line-height: 1.55; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.champ textarea.court-t { height: 84px; min-height: 84px; padding: 12px 14px; }
.champ .aide { margin-top: 0; }
.champ input[type="date"] { min-width: 0; }
.form-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grille .large { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grille { grid-template-columns: 1fr; } }
.case { display: flex; align-items: center; gap: 12px; min-height: 40px; cursor: pointer; color: var(--fg); }
.case input { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; flex: none; margin: 0; border: 1.5px solid var(--fg-3); border-radius: 7px; background: var(--card); cursor: pointer; }
.case input:checked { background: var(--amber) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E2A1F' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / 18px no-repeat; border-color: var(--amber); }
.case input:focus-visible { box-shadow: var(--ring); }
.cases { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.barre-outils .saisie, .barre-outils .sel { width: auto; }
.barre-outils .saisie { min-width: 220px; flex: 1; max-width: 420px; border-radius: 999px; padding: 0 16px; height: 40px; min-height: 40px; }
.barre-outils .sel { border-radius: 999px; height: 40px; min-height: 40px; }
.segments { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.segments button { border: 0; background: none; min-height: 38px; padding: 0 16px; font-weight: 600; color: var(--fg-2); cursor: pointer; }
.segments button[aria-pressed="true"] { background: var(--amber); color: #2E2A1F; }
.segments button:focus-visible { box-shadow: inset var(--ring); }

/* KPI and lists */
.kpi .note a { color: var(--accent-text); }
.liste li .qui span.sous-t { display: block; }
.liste .quand { min-width: 64px; }
.pastille-stat { display: inline-block; min-width: 22px; text-align: center; }
.lignes-liens { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lignes-liens li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.lignes-liens li:first-child { border-top: 0; }
.lignes-liens .qui { flex: 1; min-width: 160px; }
.lignes-liens .qui b { display: block; color: var(--strong); font-weight: 600; overflow-wrap: anywhere; }
.lignes-liens .qui span { color: var(--fg-3); font-size: 13px; }
.mesure { display: grid; grid-template-columns: minmax(80px, 38%) 1fr 44px; gap: 12px; align-items: center; padding: 6px 0; }
.mesure .nom { overflow-wrap: anywhere; color: var(--fg-2); }
.mesure .piste { height: 10px; background: var(--card-2); border-radius: 999px; overflow: hidden; }
.mesure .piste i { display: block; height: 100%; background: var(--amber); border-radius: 999px; min-width: 4px; }
.mesure b { text-align: right; font-variant-numeric: tabular-nums; color: var(--strong); }

/* documents */
.liste-docs { list-style: none; margin: 0; padding: 0; }
.doc-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line-2); text-decoration: none; color: inherit; min-height: 64px; }
.liste-docs li:first-child .doc-ligne { border-top: 0; }
.doc-ligne:hover { background: var(--card-2); }
.doc-ligne:focus-visible { box-shadow: inset var(--ring); border-radius: 0; }
.doc-ligne .titre { font-weight: 600; color: var(--strong); overflow-wrap: anywhere; }
.doc-ligne .sous { color: var(--fg-3); font-size: 13px; overflow-wrap: anywhere; }
.doc-ligne .badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .doc-ligne { grid-template-columns: 1fr; padding: 14px 16px; } .doc-ligne .badges { justify-content: flex-start; } }
.carte.sans-pad .corps { padding: 0; }
.puce.neutre { background: var(--card-2); }
.puce.fonce { background: var(--active); color: var(--strong); }
.puce.lisible { background: var(--ok-soft); color: var(--ok); border-color: transparent; }

/* editor */
.editeur-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.apercu-passage { border: 1px solid var(--line-2); border-radius: 12px; background: var(--card-2); padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.apercu-passage .tete { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.apercu-passage .tete b { color: var(--strong); overflow-wrap: anywhere; }
.apercu-passage .texte { max-height: 110px; overflow: auto; color: var(--fg-2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.apercu-passage .jauge { height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; }
.apercu-passage .jauge i { display: block; height: 100%; background: var(--amber); }
.versions li .qui { min-width: 150px; }
.etat-grille { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.etat-grille dt { color: var(--fg-3); } .etat-grille dd { margin: 0; color: var(--strong); overflow-wrap: anywhere; }

/* passages and search results */
.passage { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.passage .tete { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.passage h3 { font-size: 15px; font-weight: 600; color: var(--strong); overflow-wrap: anywhere; }
.passage .texte { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--fg-2); }
.passage .texte.replie { max-height: 4.6em; overflow: hidden; }
.passage .scores { display: flex; gap: 8px; flex-wrap: wrap; }
.passage.manquant { background: var(--card-2); border-style: dashed; color: var(--fg-3); }
.voir-plus { align-self: flex-start; background: none; border: 0; padding: 4px 0; min-height: 40px; color: var(--accent-text); font-weight: 600; cursor: pointer; }
.contexte { background: var(--card-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 340px; overflow: auto; font-size: 13px; }
details.deplier > summary { cursor: pointer; font-weight: 600; color: var(--fg-2); min-height: 40px; display: flex; align-items: center; }
details.deplier > summary:focus-visible { box-shadow: var(--ring); }
.couverture { display: flex; gap: 12px; align-items: flex-start; }
.couverture .pt-c { width: 12px; height: 12px; border-radius: 50%; flex: none; margin-top: 5px; background: var(--fg-3); }
.couverture.forte .pt-c { background: var(--ok); } .couverture.moyenne .pt-c { background: var(--amber); } .couverture.aucune .pt-c { background: var(--alert); } .couverture.pinglee .pt-c { background: var(--info); }
.couverture b { color: var(--strong); display: block; }

/* review */
.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .duel { grid-template-columns: 1fr; } }
.duel h4 { margin: 0 0 6px; font-size: 12px; color: var(--fg-3); font-weight: 600; }
.duel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.duel li { border: 1px solid var(--line-2); background: var(--card-2); border-radius: 10px; padding: 8px 12px; overflow-wrap: anywhere; }
.duel li.nouveau { border-color: var(--amber); background: var(--accent-soft); }
.duel li.manquant { border-style: dashed; color: var(--fg-3); }
.constat { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.constat .q { font-size: 16px; font-weight: 600; color: var(--strong); overflow-wrap: anywhere; }

/* charts */
.barres-jours { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: 8px; border-bottom: 1px solid var(--line); }
.barres-jours .col { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.barres-jours .col i { display: block; background: var(--amber); border-radius: 4px 4px 0 0; min-height: 0; }
.barres-jours .col i.zero { background: var(--line); height: 2px; }
.axe-jours { display: flex; justify-content: space-between; color: var(--fg-3); font-size: 12px; padding-top: 6px; }
.chiffre-ligne { display: flex; justify-content: space-between; color: var(--fg-3); font-size: 12px; }

/* graph */
.graphe-boite { position: relative; height: calc(100dvh - 250px); min-height: 380px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.graphe-boite canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.graphe-boite canvas.prise { cursor: grabbing; }
.graphe-outils { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.graphe-outils .btn { width: 44px; padding: 0; height: 44px; }
.legende { display: flex; gap: 8px 18px; flex-wrap: wrap; align-items: center; color: var(--fg-2); font-size: 13px; }
.legende .item { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; }
.legende svg { width: 30px; height: 18px; flex: none; }
.legende .forme { fill: none; stroke: currentColor; stroke-width: 1.8; }
.etiquette-type { font-weight: 600; color: var(--strong); }
.legende .t-agent { color: var(--g-agent); } .legende .t-base { color: var(--g-base); } .legende .t-document { color: var(--g-doc); } .legende .t-tag { color: var(--g-tag); } .legende .t-lien { color: var(--g-lien); }

/* settings */
.reglage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 280px); gap: 10px 24px; padding: 16px 0; border-top: 1px solid var(--line-2); align-items: start; }
.reglage:first-child { border-top: 0; }
.reglage b { color: var(--strong); display: block; }
.reglage .commande { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.reglage .commande .saisie { width: 120px; flex: none; }
@media (max-width: 760px) { .reglage { grid-template-columns: 1fr; } }
.verrou { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-2); }

/* sidebar groups on narrow menu and the bottom bar */
.nav { gap: 1px; }
@media (max-width: 860px) { .cote { overflow-y: auto; } .page-titre { overflow-wrap: anywhere; } }
.haut h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast { overflow-wrap: anywhere; }
.chargement-long { display: flex; align-items: center; gap: 10px; color: var(--fg-2); }
.tourne { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--amber); border-radius: 50%; animation: tour .8s linear infinite; flex: none; }
@keyframes tour { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tourne { animation: none !important; } }
dialog { max-height: 90dvh; overflow: auto; }
dialog pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 50dvh; overflow: auto; background: var(--card-2); border-radius: 10px; padding: 12px; margin: 0; font-size: 13px; }
.contenu { overflow-x: hidden; }
label.etiquette-type { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; }
@media (max-width: 860px) { .sel.court { min-width: 0; max-width: 100%; } label.etiquette-type .sel.court { width: 100%; } .barre-outils .sel, .barre-outils .saisie { flex: 1 1 140px; max-width: 100%; } }
.champ .case input, .case input { width: 24px; height: 24px; min-height: 0; padding: 0; flex: none; }
.champ .case { min-height: 44px; }
