/* Chatonnel CRM — charte graphique Chatonnel V1 */
/* Polices de la charte, hébergées localement (compatibles avec la CSP font-src 'self') — licence SIL OFL */
@font-face { font-family: "Montserrat"; src: url(fonts/montserrat-var-latin.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; 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: "Montserrat"; src: url(fonts/montserrat-var-latin-ext.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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; }
@font-face { font-family: "Bowlby One"; src: url(fonts/bowlby-one-400-latin.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  /* Charte Chatonnel V1 : menthe #A6CFC4 · sarcelle #094743 · crème #F0EBE1 · charbon #333132 · blanc */
  --menthe: #a6cfc4;
  --teal: #094743;
  --creme: #f0ebe1;
  --charbon: #333132;
  --bg: #f0ebe1;
  --surface: #ffffff;
  --surface-2: #f7f4ee;
  --line: #ddd5c7;
  --ink: #333132;
  --ink-2: #4b4849;
  --muted: #5f5b5c;          /* 6,7:1 sur blanc · 5,6:1 sur crème */
  --primary: #094743;
  --primary-hover: #06322f;
  --primary-ink: #fff;
  --primary-soft: #dceae4;
  --focus: #094743;
  --ok: #1f6b4f;   --ok-soft: #dcefe6;
  --warn: #8a5300; --warn-soft: #fbecd2;
  --bad: #b3261e;  --bad-soft: #f9e0dd;
  /* Étapes : teintes dérivées de la charte, 4 niveaux de clarté distincts (≥ 3:1 sur blanc) */
  --s-a_contacter: #9c8456;      /* crème foncé (sable) */
  --s-en_communication: #2f8076; /* menthe foncée */
  --s-ferme: #7a7576;            /* charbon adouci */
  --s-client: #094743;           /* sarcelle */
  /* Types d'entreprise */
  --t-animalerie: #8a7240;
  --t-veterinaire: #4f9585;
  --t-magasin_surface: #333132;
  --t-distributeur: #094743;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(9, 71, 67, .06), 0 4px 14px rgba(9, 71, 67, .07);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-titre: "Bowlby One", "Arial Black", Impact, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: .2em 0 .4em; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .7em; }
h3 { font-size: .95rem; margin: 1.2em 0 .5em; }
.small { font-size: .85rem; }
.muted { color: var(--muted); }
.warn { color: var(--warn); font-weight: 600; }
.center { text-align: center; }
.lbl-short { display: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.icon { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.18em; flex: none; }
.inline { display: inline; margin: 0; }
[hidden] { display: none !important; }

/* Boutons */
.btn { display: inline-flex; align-items: center; gap: .45em; padding: .55em 1em; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; min-height: 40px; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn-sm { padding: .4em .8em; font-size: .875rem; min-height: 36px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-danger { color: var(--bad); border-color: #ecc5c0; }
.btn-danger:hover { background: var(--bad-soft); color: var(--bad); }
.btn-block { width: 100%; justify-content: center; }
.btn.is-active { background: var(--teal); border-color: var(--teal); color: #fff; }
.iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.iconbtn:hover, .iconbtn[aria-current] { background: var(--surface-2); color: var(--ink); }
.iconbtn-sm { width: 30px; height: 30px; }

/* Formulaires */
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid #c9c0b0; border-radius: var(--radius-sm); padding: .55em .7em; width: 100%; min-height: 42px; }
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: 3px solid rgba(9, 71, 67, .2); outline-offset: 0; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); background: #fffafa; }
label { display: block; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
label > input, label > select, label > textarea { margin-top: .3em; font-weight: 400; }
.hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
.req { color: var(--bad); }
.field-err { display: block; color: var(--bad); font-size: .82rem; margin-top: .25em; font-weight: 600; }
.check { display: flex; align-items: center; gap: .5em; font-weight: 500; }
.check input { width: auto; min-height: 0; }
.stack > * + * { margin-top: 1em; }
.row { display: flex; gap: .8em; flex-wrap: wrap; }
.row > label { flex: 1 1 140px; }
.row-end { align-items: flex-end; }
.row-end .btn { flex: none; }

/* Auth */
body.auth { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: radial-gradient(1100px 600px at 10% -10%, rgba(166,207,196,.75) 0, transparent 60%), radial-gradient(900px 500px at 110% 110%, rgba(166,207,196,.45) 0, transparent 55%), var(--bg); }
.auth-card { width: 100%; max-width: 410px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px; box-shadow: var(--shadow); }
.auth-card h1 { margin-top: .6em; }

/* Barre du haut */
.brand { display: inline-flex; align-items: center; gap: .55em; color: var(--ink); text-decoration: none; font-size: 1.05rem; white-space: nowrap; }
.brand strong { color: var(--primary); }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: #fff; }
.brand-mark .icon { fill: currentColor; stroke: none; width: 20px; height: 20px; }
.brand-lg { font-size: 1.25rem; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 10px 22px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.mainnav { display: flex; gap: 4px; }
.mainnav a { display: inline-flex; align-items: center; gap: .45em; padding: .5em .85em; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .92rem; }
.mainnav a:hover { background: var(--surface-2); color: var(--ink); }
.mainnav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.container { max-width: 1480px; margin: 0 auto; padding: 18px 22px 40px; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 10px 0 24px; }

/* Messages */
.flashes { max-width: 1480px; margin: 0 auto; padding: 0 22px; }
.flashes:not(:empty) { padding-top: 12px; }
.flash { padding: .7em 1em; border-radius: var(--radius-sm); margin: 0 0 .6em; border: 1px solid; font-weight: 500; }
.flash-success { background: var(--ok-soft); border-color: #a9d3bf; color: #174d39; }
.flash-error { background: var(--bad-soft); border-color: #eebbb5; color: #7d1a14; }
.flash-info { background: #e6f0ec; border-color: #b9d6cc; color: #094743; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .7em 1.1em; border-radius: 999px; box-shadow: var(--shadow); z-index: 50; font-weight: 500; max-width: calc(100% - 32px); }
.toast.is-error { background: var(--bad); }

/* Tableau de bord */
.dash { display: grid; gap: 12px; margin-bottom: 16px; }
.dash-stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; border-top: 4px solid var(--line); box-shadow: var(--shadow); }
.stat-n { font-size: 1.7rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-l { color: var(--ink-2); font-size: .85rem; font-weight: 600; }
.stat-a_contacter { border-top-color: var(--s-a_contacter); }
.stat-en_communication { border-top-color: var(--s-en_communication); }
.stat-ferme { border-top-color: var(--s-ferme); }
.stat-client { border-top-color: var(--s-client); }
.stat-total { background: var(--surface-2); border-top-color: var(--ink); }
.dash-types { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .88rem; color: var(--ink-2); padding: 0 2px; }
.typecount strong { color: var(--ink); margin-left: .2em; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .45em; vertical-align: .05em; }
.dot-animalerie { background: var(--t-animalerie); }
.dot-veterinaire { background: var(--t-veterinaire); }
.dot-magasin_surface { background: var(--t-magasin_surface); }
.dot-distributeur { background: var(--t-distributeur); }
.due { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.due summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: .5em; list-style: none; }
.due summary::-webkit-details-marker { display: none; }
.due summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.due:not([open]) summary::after { content: "▸"; }
.due-list { list-style: none; margin: 10px 0 2px; padding: 0; display: grid; gap: 6px; }
.due-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .3em .8em; padding: 6px 0; border-top: 1px dashed var(--line); }
.pill { display: inline-block; min-width: 1.7em; text-align: center; padding: 0 .5em; border-radius: 999px; background: var(--surface-2); font-size: .8rem; }
.pill-warn { background: var(--warn-soft); color: var(--warn); }

/* Barre d'outils */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.search { position: relative; display: flex; gap: 6px; flex: 1 1 300px; max-width: 460px; align-items: center; }
.search > .icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 36px; border-radius: 999px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; padding: .38em .8em; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .85rem; min-height: 34px; }
.chip:hover { border-color: var(--teal); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.chip[aria-pressed="true"] .dot { box-shadow: 0 0 0 2px #fff; }
.viewtoggle { display: flex; gap: 6px; margin-left: auto; }
.filters-note { margin: -4px 0 10px; }

/* Kanban */
.board { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; align-items: start; }
.col { background: var(--surface-2); border-radius: var(--radius); padding: 10px; border: 1px solid var(--line); min-height: 200px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; }
.col-head h2 { margin: 0; font-size: .95rem; display: flex; align-items: center; gap: .5em; }
.col-head h2::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--s-a_contacter); }
.col-en_communication .col-head h2::before { background: var(--s-en_communication); }
.col-ferme .col-head h2::before { background: var(--s-ferme); }
.col-client .col-head h2::before { background: var(--s-client); }
.count { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 .6em; font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.col-add { margin-left: auto; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--ink-2); }
.col-add:hover { background: var(--surface); color: var(--primary); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; min-height: 60px; border-radius: 10px; transition: background .15s, outline-color .15s; outline: 2px dashed transparent; outline-offset: 2px; }
.cards.is-over { background: rgba(166, 207, 196, .3); outline-color: var(--primary); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); cursor: grab; transition: transform .12s, box-shadow .12s, opacity .12s; }
.card:hover { box-shadow: 0 2px 4px rgba(9,71,67,.08), 0 8px 20px rgba(9,71,67,.1); }
.card.is-dragging { opacity: .45; transform: rotate(1.5deg); }
.card.is-saving { opacity: .7; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.value { font-size: .8rem; font-weight: 700; color: var(--ok); font-variant-numeric: tabular-nums; }
.card-title { margin: .4em 0 .2em; font-size: .98rem; line-height: 1.3; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--primary); text-decoration: underline; }
.card-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: .82rem; color: var(--ink-2); }
.card-meta span { display: inline-flex; align-items: center; gap: .3em; }
.card-meta .icon { width: .95em; height: .95em; color: var(--muted); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.card-foot select { width: auto; min-height: 32px; padding: .2em 1.6em .2em .5em; font-size: .8rem; border-radius: 8px; background-color: var(--surface-2); border-color: var(--line); }
.empty { color: var(--muted); font-size: .85rem; text-align: center; padding: 18px 8px; border: 1px dashed #c9c0b0; border-radius: 10px; list-style: none; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: .3em; padding: .12em .6em; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge .icon { width: .95em; height: .95em; }
.type-animalerie { background: #ece3d0; color: #5b4a26; }
.type-veterinaire { background: #dceae4; color: #094743; }
.type-magasin_surface { background: #e5e3e3; color: #333132; }
.type-distributeur { background: #094743; color: #f0ebe1; }
.badge-overdue { background: var(--bad-soft); color: var(--bad); }
.badge-today { background: var(--warn-soft); color: var(--warn); }
.badge-future { background: var(--primary-soft); color: var(--teal); }
.stagepill { display: inline-block; padding: .12em .6em; border-radius: 6px; font-size: .8rem; font-weight: 700; border-left: 4px solid; background: var(--surface-2); }
.stage-a_contacter { border-color: var(--s-a_contacter); }
.stage-en_communication { border-color: var(--s-en_communication); }
.stage-ferme { border-color: var(--s-ferme); }
.stage-client { border-color: var(--s-client); }

/* Table */
.tablewrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--surface-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.table th a { color: var(--ink-2); text-decoration: none; }
.table th a:hover, .table th[aria-sort] a { color: var(--ink); }
.sort-ind { font-size: .7em; margin-left: .3em; }
.table tbody tr:hover { background: #f4f8f6; }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td a { text-decoration: none; }

/* Fiche */
.back { display: inline-flex; align-items: center; gap: .4em; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .9rem; }
.record-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 12px; }
.record-head h1 { margin: .25em 0 .1em; }
.record-head p { margin: 0; }
.record-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stage-inline { display: flex; align-items: center; gap: 6px; }
.stage-inline select { width: auto; border-radius: 999px; font-weight: 600; }
.stepper { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; counter-reset: step; }
.stepper li { position: relative; padding: 8px 10px 8px 34px; background: var(--surface); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--muted); counter-increment: step; }
.stepper li:first-child { border-radius: 10px 0 0 10px; }
.stepper li:last-child { border-radius: 0 10px 10px 0; }
.stepper li::before { content: counter(step); position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: .72rem; }
.stepper li.is-done { color: var(--ink-2); background: var(--primary-soft); }
.stepper li.is-done::before { content: "✓"; background: var(--s-client); color: #fff; }
.stepper li.is-current { background: var(--primary); border-color: var(--primary); color: #fff; }
.stepper li.is-current::before { background: #fff; color: var(--primary); }
.record-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.info { margin: 0 0 18px; display: grid; gap: 0; }
.info > div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.info > div:last-child { border-bottom: 0; }
.info dt { color: var(--muted); font-size: .85rem; font-weight: 600; }
.info dd { margin: 0; overflow-wrap: anywhere; }
.info dd a { display: inline-flex; gap: .4em; align-items: center; }
.info dd .icon { color: var(--muted); }
.notes { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; white-space: normal; overflow-wrap: anywhere; }
.notes p { margin: 0; }
.act-form { display: grid; gap: 10px; padding: 12px; background: var(--primary-soft); border-radius: 12px; margin-bottom: 16px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); }
.tl { position: relative; padding: 0 0 14px 14px; }
.tl::before { content: ""; position: absolute; left: -23px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); }
.tl-etape::before, .tl-creation::before { border-color: var(--s-ferme); background: var(--surface-2); }
.tl-appel::before { border-color: var(--t-veterinaire); }
.tl-courriel::before { border-color: var(--t-distributeur); }
.tl-visite::before { border-color: var(--t-magasin_surface); }
.tl-echantillon::before { border-color: var(--s-client); }
.tl-head { display: flex; align-items: center; flex-wrap: wrap; gap: .4em .6em; }
.tl-kind { font-weight: 700; font-size: .88rem; }
.tl-head time { font-size: .82rem; color: var(--ink-2); }
.tl-del { margin-left: auto; }
.tl p { margin: .2em 0 0; overflow-wrap: anywhere; }
.tl-etape p, .tl-creation p { color: var(--ink-2); font-size: .9rem; }
.errlist { max-height: 300px; overflow: auto; }
.userlist { list-style: none; padding: 0; margin: 0; }
.userlist li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }

/* Formulaire de fiche */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
fieldset { border: 0; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; }
legend { font-weight: 700; font-size: 1rem; padding: 0; margin-bottom: 10px; color: var(--ink); }
.field-name, .field-notes, .field-address, .field-website, .field-source { grid-column: 1 / -1; }
.field label { margin-bottom: .3em; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 16px; }

/* Responsive */
@media (max-width: 1100px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .viewtoggle { margin-left: 0; }
}
@media (max-width: 820px) {
  .record-grid, .form-grid { grid-template-columns: 1fr; }
  .mainnav span { display: none; }
  .mainnav a { padding: .55em .7em; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .topbar { padding: 8px 12px; gap: 8px; }
  .brand > span:last-child { display: none; }
  .topbar-right .btn span { display: none; }
  .topbar-right .btn { padding: .5em .7em; }
  .container { padding: 12px 12px 30px; }
  .flashes { padding: 0 12px; }
  .dash-stages { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .stat { padding: 7px 6px; border-top-width: 3px; min-width: 0; }
  .stat-n { font-size: 1.25rem; }
  .stat-l { font-size: .72rem; line-height: 1.2; overflow-wrap: anywhere; }
  .lbl-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .lbl-short { display: inline; }
  .dash-types { font-size: .8rem; gap: 4px 12px; }
  .due-list li { padding: 4px 0; }
  .stat-total { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: .5em; }
  .board { grid-template-columns: 1fr; }
  .search { max-width: none; flex-basis: 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin: 0 -12px; padding-left: 12px; padding-right: 12px; scrollbar-width: none; }
  .chip { white-space: nowrap; }
  .viewtoggle { width: 100%; }
  .viewtoggle .btn { flex: 1; justify-content: center; }
  .card-foot select { min-height: 38px; font-size: .85rem; }
  fieldset { grid-template-columns: 1fr; }
  .info > div { grid-template-columns: 1fr; gap: 2px; }
  .stepper { grid-template-columns: repeat(2, 1fr); }
  .stepper li, .stepper li:first-child, .stepper li:last-child { border-radius: 8px; }
  .record-actions { width: 100%; }
  .stage-inline { flex: 1 1 100%; }
  .stage-inline select { flex: 1; }
  /* Table → cartes */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 3px 0; display: flex; gap: 10px; }
  .table td::before { content: attr(data-label); flex: 0 0 110px; color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; padding-top: .15em; }
  .table td.num { text-align: left; }
  .table td[colspan]::before { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .topbar, .toolbar, .act-form, .record-actions, .foot { display: none; } body { background: #fff; } }

/* ---------- Charte Chatonnel : marque, titres, emblème ---------- */
h1 { font-family: var(--font-titre); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; color: var(--teal); font-size: 1.55rem; line-height: 1.25; }
.record-head h1 { font-family: var(--font); font-weight: 700; text-transform: none; letter-spacing: -.01em; color: var(--ink); font-size: 1.6rem; } /* noms d'entreprise : lisibilité */
h2, legend { color: var(--teal); }
.brand { gap: .6em; }
.brand-logo { display: block; width: 136px; height: auto; }
.brand-mono { display: none; width: 34px; height: auto; }
.brand-crm { display: inline-block; font-family: var(--font-titre); text-transform: uppercase; font-size: .78rem; line-height: 1; letter-spacing: .04em; color: var(--teal); background: var(--menthe); padding: .42em .6em .36em; border-radius: 6px; }
.brand-lg { flex-direction: column; align-items: center; width: 100%; gap: .7em; }
.brand-lg .brand-logo { width: 230px; }
.auth-card { position: relative; overflow: hidden; padding-bottom: 76px; border-top: 6px solid var(--teal); }
.auth-card h1 { text-align: center; }
.auth-paw { position: absolute; right: 26px; bottom: -2px; width: 34px; height: auto; }
.auth-paw-2 { right: 70px; width: 34px; }
.stat-n { font-family: var(--font-titre); font-weight: 400; color: var(--teal); }
.stat-total .stat-n { color: var(--ink); }
.col-head h2 { color: var(--ink); }
.foot { display: flex; align-items: center; justify-content: center; gap: .5em; }
.foot img { width: 16px; height: auto; opacity: .7; }
@media (max-width: 640px) {
  .brand-logo { display: none; }
  .brand-mono { display: block; }
  .brand-lg .brand-logo { display: block; width: 190px; }
  h1 { font-size: 1.3rem; }
}
