/* =========================================================================
   LMF — Client+  (Espace Client)
   Charte reprise de Planning+ : rouge #c62828 + gris ardoise.
   Présentation du 26/11/2026 (projet B + téléphone du projet C) : menu à
   gauche, recherche unique, barre d'onglets en bas sur téléphone, mode sombre
   qui suit le réglage de l'ordinateur ou du téléphone.
   Les pages utilisent les couleurs ci-dessous (var(--…)) : jamais de couleur
   écrite en dur, sinon elle ne suit pas le mode sombre.
   ========================================================================= */
:root {
  color-scheme: light dark;
  --red: #c62828;
  --red-dark: #9b1c1c;          /* liens et textes rouges */
  --red-hover: #a51f1f;         /* survol des boutons rouges */
  --red-soft: #fdecec;          /* fond d'un choix sélectionné */
  --red-soft-2: #fff7f7;
  --slate: #383d42;             /* titres */
  --slate-dark: #23272b;
  --ink: #24303c;               /* texte */
  --bg: #f4f6f9;                /* fond de page */
  --surface: #ffffff;           /* cartes, tableaux, champs */
  --surface-2: #fbfcfd;
  --hover: #f3f6f9;
  --gray-50: #f4f6f9;
  --gray-100: #eef2f6;
  --gray-200: #e1e8ef;
  --gray-300: #cdd7e2;
  --gray-500: #7b8a9a;
  --gray-600: #55606b;
  --gray-700: #45525f;
  --green: #27ae60;
  --green-bg: #e7f7ee;
  --err: #e0524d;
  --err-bg: #fdecec;
  --amber-bg: #fff6e5;
  --amber-line: #f0c987;
  --mark-bg: #ffe58a; --mark-ink: #3b2f00;
  /* Pastilles d'état */
  --b-blue-bg: #e7f0fb;   --b-blue: #16548f;
  --b-orange-bg: #fdf0dd; --b-orange: #8a5200;
  --b-green-bg: #e6f4ea;  --b-green: #1d6b35;
  --b-red-bg: #fceceb;    --b-red: #a32d2d;
  --b-amber-bg: #faeeda;  --b-amber: #854f0b;
  /* Menu de gauche : même gris que Planning+ et OR+ (#383d42, demande de Guillaume du 30/11/2026) */
  --side-bg: #383d42;
  --side-ink: #d3d9df;
  --side-mute: #a3adb7;
  --side-hover: #454b52;
  --side-w: 248px;
  --tab-h: 0px;                 /* hauteur de la barre d'onglets (téléphone) */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(30,36,42,.06), 0 1px 3px rgba(30,36,42,.06);
  --shadow-md: 0 6px 24px rgba(30,36,42,.12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --red: #c9362e;
    --red-dark: #ff8f86;
    --red-hover: #b02a23;
    --red-soft: #3b1f1f;
    --red-soft-2: #2d1c1c;
    --slate: #eef2f5;
    --slate-dark: #0c0f12;
    --ink: #e2e8ee;
    --bg: #111418;
    --surface: #1a1f24;
    --surface-2: #1e242a;
    --hover: #232a31;
    --gray-50: #111418;
    --gray-100: #232a31;
    --gray-200: #2c343c;
    --gray-300: #3b4550;
    --gray-500: #8d9aa7;
    --gray-600: #a6b2be;
    --gray-700: #bcc6d0;
    --green: #3ccf7f;
    --green-bg: #14301f;
    --err: #ff8f86;
    --err-bg: #3b1f1f;
    --amber-bg: #33270f;
    --amber-line: #6b5020;
    --mark-bg: #6a5712; --mark-ink: #fff2c2;
    --b-blue-bg: #17283b;   --b-blue: #93c2f2;
    --b-orange-bg: #352612; --b-orange: #f2bb6b;
    --b-green-bg: #15301f;  --b-green: #85d6a1;
    --b-red-bg: #3b1f1f;    --b-red: #f4a09a;
    --b-amber-bg: #33270f;  --b-amber: #ecb65e;
    --side-bg: #0c0f12;
    --side-hover: #1d2329;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 8px 28px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--red-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { margin: 0 0 .3rem; color: var(--slate); font-weight: 750; font-size: 1.6rem; letter-spacing: -.01em; }
h2 { color: var(--slate); }
h3 { margin: 0 0 .5rem; color: var(--slate); font-weight: 650; font-size: 1rem; }
code { background: var(--gray-100); border-radius: 5px; padding: .05rem .35rem; font-size: .85em; }
.muted { color: var(--gray-500); font-size: .85em; }
.sr-only { position: absolute; 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; z-index: 200; background: var(--surface); color: var(--ink); padding: .5rem .8rem; border-radius: 8px; box-shadow: var(--shadow-md); }
.skip:focus { left: 8px; }
.ic { flex: none; display: block; }
table { color: inherit; }

/* ---------- Marque (logo LMF + « Client+ ») ---------- */
.brand { display: flex; align-items: center; gap: .6rem; }
.brand__logo { height: 32px; width: auto; display: block; }
.brand__name { font-weight: 800; color: var(--slate); font-size: 1.02rem; white-space: nowrap; }
/* « + » de la charte commune des 3 applis (maquette A, 30/11/2026) : rouge, gras, un peu plus grand, collé au nom. */
.brand-plus { color: #c62828; font-weight: 900; font-size: 1.3em; vertical-align: -.06em; margin-left: 5px; line-height: 1; }

.auth-brand { display: flex; flex-direction: column; align-items: center; gap: .55rem; margin-bottom: 1.4rem; text-align: center; }
.auth-brand .brand__logo { height: 44px; background: #fff; border-radius: 10px; padding: 6px 10px; box-sizing: content-box; }
.auth-brand .brand__name { font-size: 1.15rem; }
.auth-brand .sub { color: var(--gray-500); font-size: .85rem; margin: 0; }

/* ---------- Cartes centrées (connexion, admin) ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2rem 2.25rem;
  width: 100%;
  max-width: 440px;
}
.card--wide { max-width: 780px; }
.lead { margin: 0 0 1.25rem; color: var(--gray-700); font-size: .95rem; }

/* ---------- Formulaires ---------- */
.field { margin-bottom: 1rem; }
label { display: block; margin-bottom: .35rem; font-size: .85rem; color: var(--gray-700); font-weight: 600; }
input[type=email], input[type=password], input[type=text], input[type=search], input[type=tel], input[type=date], input[type=number], select, textarea {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--gray-300);
  font-family: inherit;
}
input[type=email], input[type=password], input[type=text] {
  width: 100%;
  padding: .6rem .75rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: var(--red); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  width: 100%;
  padding: .65rem 1.1rem;
  background: var(--red); color: #fff;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 600; cursor: pointer; font-family: inherit;
  text-decoration: none; transition: background .15s, box-shadow .15s;
}
.btn:hover { background: var(--red-hover); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--red); }
.btn--ghost {
  width: auto;
  background: var(--surface); color: var(--gray-700);
  border-color: var(--gray-300); padding: .5rem .9rem; font-size: .9rem;
}
.btn--ghost:hover { background: var(--gray-100); color: var(--ink); }
.btn--cta { width: auto; white-space: nowrap; padding: .55rem 1rem; box-shadow: 0 1px 2px rgba(198,40,40,.25); }

.links { margin-top: 1rem; font-size: .88rem; text-align: center; }

/* ---------- Alertes / flash ---------- */
.alert { padding: .7rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .9rem; border: 1px solid transparent; word-break: break-word; }
.alert.success { background: var(--green-bg); color: var(--b-green); border-color: color-mix(in srgb, var(--b-green) 30%, transparent); }
.alert.error   { background: var(--err-bg); color: var(--b-red); border-color: color-mix(in srgb, var(--b-red) 30%, transparent); }
.alert.info    { background: var(--gray-100); color: var(--gray-700); border-color: var(--gray-200); }

/* ---------- Bandeaux du mode LMF ---------- */
.lmf-band { color: #fff; padding: .55rem 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; position: relative; z-index: 60; }
.lmf-band--apercu { background: #b26a00; }
.lmf-band--compte { background: #9b1c1c; }
.lmf-band__btn { background: transparent; color: #fff; border: 1px solid #fff; border-radius: 6px; padding: .3rem .75rem; font: inherit; font-weight: 600; cursor: pointer; }
.lmf-band__lien { background: #fff; color: #7a3b00; border: 0; border-radius: 6px; padding: .35rem .8rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }

/* =========================================================================
   Cadre : menu à gauche + colonne principale
   ========================================================================= */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--side-bg); color: var(--side-ink);
  display: flex; flex-direction: column; gap: .25rem;
  padding: 14px 12px 16px;
}
/* Charte A (comme OR+) : logo seul dans sa pastille blanche, « Client+ » dessous, centré, en blanc. */
.side__brand { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 6px 0 12px; margin-bottom: .5rem; text-decoration: none; }
.side__brand:hover { text-decoration: none; }
.side__logo { display: inline-block; background: #fff; border-radius: 9px; padding: 5px 7px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.side__logo img { height: 44px; width: auto; display: block; }
.side__app { color: #fff; font-weight: 800; font-size: 19px; letter-spacing: .02em; line-height: 1; white-space: nowrap; }
.side__client { padding: .35rem .6rem .7rem; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: .45rem; }
.side__client-nom { display: block; color: #fff; font-weight: 650; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side__client-lien { display: inline-flex; align-items: center; gap: .3rem; color: var(--side-mute); font-size: .8rem; margin-top: .15rem; }
.side__client-lien:hover { color: #fff; }
.side__nav { display: flex; flex-direction: column; gap: 2px; }
.side__lien {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  padding: .58rem .75rem; border-radius: 9px; border: 0; background: none; cursor: pointer;
  color: var(--side-ink); font: inherit; font-size: .93rem; font-weight: 500; text-align: left; text-decoration: none;
  transition: background .12s, color .12s;
}
.side__lien:hover { background: var(--side-hover); color: #fff; text-decoration: none; }
.side__lien[aria-current="page"] { background: var(--red); color: #fff; font-weight: 650; }
.side__lien span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__lien small { display: block; color: var(--side-mute); font-size: .76rem; font-weight: 400; }
.side__lien[aria-current="page"] small { color: rgba(255,255,255,.8); }
.side__bas { margin-top: auto; padding-top: .6rem; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 2px; }
.side__bas form { margin: 0; }
.side :focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

.col { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: .9rem;
  padding: .7rem 1.75rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--gray-200);
  min-height: 62px;
}
.topbar__logo { display: none; align-items: center; gap: .4rem; text-decoration: none; flex: none; }
.topbar__logo:hover { text-decoration: none; }
.topbar__logo img { height: 26px; width: auto; display: block; background: #fff; border-radius: 6px; padding: 2px 4px; box-sizing: content-box; }
.topbar__logo span { font-weight: 800; color: var(--slate); font-size: .92rem; white-space: nowrap; }
.search { flex: 1; max-width: 680px; position: relative; display: flex; align-items: center; margin: 0; }
.search .ic { position: absolute; left: .8rem; color: var(--gray-500); pointer-events: none; }
.search input {
  width: 100%; padding: .62rem .9rem .62rem 2.5rem; font-size: .95rem;
  border: 1px solid var(--gray-200); border-radius: 999px; background: var(--surface);
  box-shadow: var(--shadow);
}
.search input::placeholder { color: var(--gray-500); }
.topbar .btn--cta { margin-left: auto; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 1.6rem 1.75rem 2.5rem; }
/* Listes à nombreuses colonnes (Mes matériels, Mes rapports) : toute la largeur de l'écran (27/11/2026). */
.container--large { max-width: 1720px; }

/* ---------- Téléphone : barre d'onglets en bas ---------- */
.tabbar, .sheet, .mobile-only { display: none; }
@media (max-width: 860px) {
  :root { --tab-h: 62px; }
  .shell { display: block; }
  .side { display: none; }
  .topbar { padding: .55rem .8rem; gap: .6rem; min-height: 54px; }
  .topbar__logo { display: inline-flex; }
  .topbar__logo span { display: none; }
  .topbar .btn--cta { display: none; }
  .mobile-only { display: inline-flex; }
  /* Barres d'actions des listes : en fin de liste sur téléphone (collées, elles cachaient des lignes). */
  .mt-act, .rp-act { position: static !important; }
  .desktop-only { display: none !important; }
  .hello .btn--cta { width: 100%; }
  .search input { padding: .5rem .8rem .5rem 2.2rem; font-size: 16px; }
  .search .ic { left: .7rem; }
  .container { padding: 1.1rem .9rem calc(var(--tab-h) + 1.6rem + env(safe-area-inset-bottom, 0px)); }
  .app--espace .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    height: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--surface); border-top: 1px solid var(--gray-200);
    box-shadow: 0 -2px 12px rgba(20,26,32,.06);
  }
  .tabbar__lien {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--gray-500); font: inherit; font-size: .72rem; font-weight: 600; text-decoration: none;
    background: none; border: 0; cursor: pointer; padding: 0;
  }
  .tabbar__lien:hover { text-decoration: none; }
  .tabbar__lien .ic { width: 23px; height: 23px; }
  .tabbar__lien[aria-current="page"] { color: var(--red); }
  .tabbar__lien[aria-current="page"] .ic { stroke-width: 2.2; }
  .sheet:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 90; }
  .sheet__fond { position: absolute; inset: 0; background: rgba(12,15,18,.5); }
  .sheet__boite {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: var(--surface); border-radius: 18px 18px 0 0;
    padding: .6rem .7rem calc(1rem + env(safe-area-inset-bottom, 0px));
    box-shadow: var(--shadow-md); max-height: 85vh; overflow-y: auto;
    animation: monte .18s ease-out;
  }
  .sheet__boite form { margin: 0; }
  .sheet__tete { display: flex; justify-content: space-between; align-items: center; padding: .35rem .5rem .6rem; color: var(--slate); }
  .sheet__x { background: none; border: 0; color: var(--gray-500); padding: .3rem; cursor: pointer; }
  .sheet__lien {
    display: flex; align-items: center; gap: .8rem; width: 100%;
    padding: .85rem .75rem; border-radius: 12px; border: 0; background: none;
    color: var(--ink); font: inherit; font-size: 1rem; font-weight: 550; text-align: left; text-decoration: none; cursor: pointer;
  }
  .sheet__lien:hover { background: var(--hover); text-decoration: none; }
  .sheet__lien small { margin-left: auto; color: var(--gray-500); font-weight: 400; font-size: .85rem; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sheet__lien--cta { background: var(--red); color: #fff; margin-bottom: .35rem; }
  .sheet__lien--cta:hover { background: var(--red-hover); }
  body.sheet-ouverte { overflow: hidden; }
  .lmf-band { font-size: .85rem; }
}
@keyframes monte { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet__boite { animation: none; } }

/* Pages sans espace (choix d'espace, erreurs) : pas de recherche. */
body:not(.app--espace) .topbar { min-height: 0; }

/* ---------- Grille de modules ---------- */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 1.25rem; }
.tile {
  background: var(--surface); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow);
}
.tile h3 { margin: .2rem 0 .4rem; }
.tile p { margin: 0; color: var(--gray-500); font-size: .9rem; }
.tile .soon { display: inline-block; margin-top: .8rem; font-size: .72rem; color: var(--gray-500); border: 1px dashed var(--gray-300); border-radius: 999px; padding: .15rem .6rem; }

/* =========================================================================
   Accueil : chiffres, « À faire », prochaines interventions, derniers rapports
   ========================================================================= */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.hello h1 { margin: 0; }
.hello p { margin: .15rem 0 0; color: var(--gray-500); font-size: .92rem; }
.kpis { display: grid; gap: .8rem; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 1.1rem; }
.kpi {
  display: flex; flex-direction: column; gap: .15rem;
  background: var(--surface); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: .9rem 1rem; box-shadow: var(--shadow); color: inherit; text-decoration: none; min-width: 0;
  transition: border-color .15s, transform .15s;
}
a.kpi:hover { border-color: var(--gray-300); text-decoration: none; transform: translateY(-1px); }
.kpi__ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--red-soft); color: var(--red-dark); margin-bottom: .35rem; }
.kpi__n { font-size: 1.75rem; font-weight: 750; color: var(--slate); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi__l { color: var(--gray-600); font-size: .88rem; }
.kpi__x { color: var(--gray-500); font-size: .8rem; min-height: 1.1em; }
.kpi--attente .kpi__n { color: transparent; background: var(--gray-100); border-radius: 6px; width: 3rem; }
.panels { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--gray-200); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; min-width: 0; }
.panel--large { grid-column: 1 / -1; }
.panel__tete { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; margin-bottom: .55rem; }
.panel__tete h2 { font-size: 1rem; font-weight: 700; margin: 0; }
.panel__tete a { font-size: .85rem; font-weight: 600; white-space: nowrap; }
.panel--afaire { background: var(--amber-bg); border-color: var(--amber-line); }
.lignes { list-style: none; margin: 0; padding: 0; }
.ligne { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-top: 1px solid var(--gray-100); min-width: 0; }
.ligne:first-child { border-top: 0; }
.panel--afaire .ligne { border-top-color: color-mix(in srgb, var(--amber-line) 45%, transparent); }
.ligne__ic { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--surface); color: var(--b-orange); border: 1px solid var(--amber-line); }
.ligne__txt { flex: 1; min-width: 0; }
.ligne__txt strong { display: block; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.ligne__txt span { display: block; color: var(--gray-500); font-size: .84rem; overflow-wrap: anywhere; }
.ligne__act { flex: none; font-size: .86rem; font-weight: 650; white-space: nowrap; }
.date-pastille { flex: none; width: 46px; text-align: center; background: var(--gray-100); border-radius: 10px; padding: .3rem 0; line-height: 1.05; }
.date-pastille b { display: block; font-size: 1.05rem; color: var(--slate); }
.date-pastille small { color: var(--gray-500); font-size: .72rem; text-transform: lowercase; }
.vide { color: var(--gray-500); font-size: .9rem; padding: .5rem 0; display: flex; align-items: center; gap: .5rem; }
.vide .ic { color: var(--green); }
.pastille { display: inline-block; border-radius: 999px; padding: .05rem .55rem; font-size: .76rem; font-weight: 600; white-space: nowrap; }
.pastille--prov { background: var(--b-orange-bg); color: var(--b-orange); }
.pastille--plan { background: var(--b-blue-bg); color: var(--b-blue); }
.squelette { display: block; height: .9em; border-radius: 6px; background: linear-gradient(90deg, var(--gray-100), var(--gray-200), var(--gray-100)); background-size: 200% 100%; animation: luit 1.2s linear infinite; }
@keyframes luit { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .squelette { animation: none; } a.kpi:hover { transform: none; } }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .panels { grid-template-columns: 1fr; }
  .kpis { gap: .55rem; }
  .kpi { padding: .7rem .8rem; }
  .kpi__ic { display: none; }
  .kpi__n { font-size: 1.45rem; }
  h1 { font-size: 1.35rem; }
}

/* ---------- Résultats de la recherche ---------- */
.rech-groupe { margin-bottom: 1rem; }
.rech-ligne { display: flex; align-items: center; gap: .75rem; padding: .6rem .2rem; border-top: 1px solid var(--gray-100); color: inherit; text-decoration: none; border-radius: 8px; }
.rech-ligne:first-child { border-top: 0; }
a.rech-ligne:hover { background: var(--hover); text-decoration: none; }
.rech-ligne .ligne__ic { background: var(--gray-100); color: var(--gray-600); border: 0; }
mark { background: var(--mark-bg); color: var(--mark-ink); border-radius: 3px; padding: 0 1px; }

/* ---------- Détails (santé / système) ---------- */
dl.kv { margin: 1rem 0 0; font-size: .9rem; }
dl.kv dt { color: var(--gray-500); margin-top: .6rem; }
dl.kv dd { margin: .1rem 0 0; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; color: var(--ink); word-break: break-all; }
.status { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-radius: var(--radius-sm); font-weight: 600; border: 1px solid transparent; }
.status.ok { background: var(--green-bg); color: var(--b-green); border-color: color-mix(in srgb, var(--b-green) 30%, transparent); }
.status.ko { background: var(--err-bg); color: var(--b-red); border-color: color-mix(in srgb, var(--b-red) 30%, transparent); }

/* ---------- Impression : toujours en clair, sans menu ---------- */
@media print {
  :root {
    color-scheme: light; --bg: #fff; --surface: #fff; --surface-2: #fbfcfd; --hover: #f3f6f9; --ink: #1f2937; --slate: #383d42;
    --gray-50: #fff; --gray-100: #eef2f6; --gray-200: #e1e8ef; --gray-300: #cdd7e2; --gray-500: #6b7682; --gray-600: #55606b; --gray-700: #45525f;
    --red: #c62828; --red-dark: #9b1c1c; --red-soft: #fdecec;
    --b-blue-bg: #e7f0fb; --b-blue: #16548f; --b-orange-bg: #fdf0dd; --b-orange: #8a5200; --b-green-bg: #e6f4ea; --b-green: #1d6b35;
    --b-red-bg: #fceceb; --b-red: #a32d2d; --b-amber-bg: #faeeda; --b-amber: #854f0b;
  }
  body { background: #fff; }
  .side, .topbar, .tabbar, .sheet, .skip, .lmf-band { display: none !important; }
  .shell { display: block; }
  .container { padding: 0; max-width: none; }
}

/* ---------- Tri par colonne (Mes matériels, Mes rapports — 26/11/2026) ---------- */
.th-tri { color: inherit; display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; white-space: nowrap; }
.th-tri:hover { color: var(--ink); text-decoration: none; }
.th-tri__f { color: var(--gray-300); font-size: .85em; }
.th-tri.is-on { color: var(--ink); }
.th-tri.is-on .th-tri__f { color: var(--red); }

/* ---------- Bouton « Demander une inspection » à deux choix (BI1 « C », 27/11/2026) ---------- */
.cta-menu { position: relative; }
.cta-menu--haut { margin-left: auto; }
.cta-menu > summary { list-style: none; cursor: pointer; user-select: none; }
.cta-menu > summary::-webkit-details-marker { display: none; }
.cta-menu__fl { font-size: .75em; margin-left: .1rem; opacity: .85; }
.cta-menu[open] > summary { background: var(--red-hover); }
.cta-menu__boite {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 85; width: 340px; max-width: calc(100vw - 24px);
  background: var(--surface); border: 1px solid var(--gray-200); border-radius: 12px; box-shadow: var(--shadow-md); padding: 6px;
}
.cta-menu__item { display: flex; gap: .7rem; align-items: flex-start; padding: .65rem .7rem; border-radius: 9px; color: var(--ink); text-decoration: none; }
.cta-menu__item:hover, .cta-menu__item:focus-visible { background: var(--hover); text-decoration: none; }
.cta-menu__item .ic { color: var(--red); margin-top: 2px; }
.cta-menu__item b { display: block; font-weight: 650; }
.cta-menu__item small { display: block; color: var(--gray-500); font-size: .82rem; margin-top: .1rem; }
.cta-menu--large { width: 100%; }
.cta-menu--large > summary { width: 100%; }
.cta-menu--large .cta-menu__boite { left: 0; right: 0; width: auto; }
.sheet__titre { font-size: .8rem; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .03em; padding: .3rem .75rem .2rem; }
.sheet__lien--cta2 { border: 1px solid var(--red); color: var(--red-dark); margin-bottom: .45rem; }
@media (max-width: 860px) {
  .topbar .cta-menu { display: none; }
  .hello .cta-menu--large { display: block; }
}
