/* DELMAK — feuille commune du BO et de l'espace client. DA « Viseur » (10/11/2026, Franck : « On supprime
   complètement le thème SF et Espace du DELMAK BO, pour ne garder que le thème déjà présent en front. On garde à
   l'esprit que l'interface doit privilégier le tactile. ») : Archivo, fond gris chaud, encre, un seul accent rouge,
   aucun arrondi, filets de 1 et 2 px, cibles de 44 px. L'espace client reçoit en plus espace-viseur.css (mêmes
   valeurs sur body.espace) : il ne change pas. Ce qui est propre au BO vit sous :where(body:not(.espace)), en fin
   de feuille. Plan : bancs-delmak/2026-11-10-theme-viseur/PLAN.md. */

/* ---------- Police : Archivo, servie par le site (mêmes fichiers et mêmes déclarations qu'espace-viseur.css) ---------- */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../espace/fonts/archivo-var-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../espace/fonts/archivo-var-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;
}

/* ---------- Jetons ----------
   Les --esp-* sont les jetons du cockpit (mêmes valeurs que body.espace dans espace-viseur.css) ; les variables
   historiques d'app.css (--bg … --lift) en sont un PONT, pour que les feuilles des écrans suivent sans réécriture.
   Rien d'autre sur :root (ni color-scheme, ni --vi-*) : <html> est le seul élément de l'espace qui le lit. */
:root {
  --esp-bg: #f3f2f2;  --esp-surface: #eae9e9;  --esp-panel: #faf9f9;  --esp-champ: #fff;
  --esp-ink: #201e1d; --esp-divider: rgba(32, 30, 29, .4); --esp-muted: #605d5d;
  --esp-accent: #ec3013; --esp-accent-face: #dd2b0f; --esp-accent-hover: #ae1800; --esp-accent-press: #7c1405;
  --esp-accent-text: #ae1800; --esp-accent-on-dark: #ff9783;
  --esp-n100: #f8f4f4; --esp-n200: #eae7e7; --esp-n300: #d7d3d3; --esp-n400: #bab6b6; --esp-n500: #9b9797;
  --esp-n600: #7d7979; --esp-n700: #605d5d; --esp-n800: #444141; --esp-n900: #2d2b2b;
  --esp-a100: #fff2ef; --esp-a200: #ffe0d9; --esp-a300: #ffc4b8; --esp-a400: #ff9783; --esp-a500: #ff563c;
  --esp-a600: #dd2b0f; --esp-a700: #ae1800; --esp-a800: #7c1405; --esp-a900: #4d170e;
  --esp-ok: #444141; --esp-ok-vif: #7d7979;
  --esp-alerte: #7c1405; --esp-alerte-vif: #ff9783; --esp-alerte-fond: #fff2ef;
  --esp-danger: #ae1800; --esp-danger-vif: #ec3013; --esp-danger-fond: #ffe0d9;
  --esp-p1: #dd2b0f; --esp-p2: #ff9783; --esp-p3: #9b9797;
  --esp-font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --esp-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --esp-shadow-sm: 0 1px 2px rgba(45, 43, 43, .14);
  --esp-shadow-md: 0 3px 10px rgba(45, 43, 43, .16);
  --esp-shadow-lg: 0 12px 32px rgba(45, 43, 43, .22);
  --esp-shadow-xl: 0 40px 80px -24px rgba(32, 30, 29, .45), 0 8px 24px -10px rgba(32, 30, 29, .30);
  --esp-scrim: rgba(32, 30, 29, .55);
  --esp-barre: #2d2b2b; --esp-barre-fonce: #201e1d; --esp-barre-encre: #d7d3d3;
  --esp-barre-sep: rgba(248, 244, 244, .1); --esp-barre-bd: rgba(248, 244, 244, .16); --esp-barre-survol: rgba(248, 244, 244, .07);
  --esp-regle: repeating-linear-gradient(90deg, rgba(248, 244, 244, .2) 0 1px, transparent 1px 8px);
  --bg: var(--esp-bg); --bg-2: var(--esp-surface); --card: var(--esp-panel); --card-2: var(--esp-panel);
  --border: var(--esp-n300); --border-lit: var(--esp-n400); --fg: var(--esp-ink); --muted: var(--esp-muted); --dim: var(--esp-n700);
  --accent: var(--esp-accent-text); --accent-2: var(--esp-n700); --accent-soft: var(--esp-a100);
  --success: var(--esp-ok); --danger: var(--esp-danger); --warn: var(--esp-alerte);
  --orange: var(--esp-alerte);
  --radius: 0; --radius-sm: 0;
  --font: var(--esp-font); --font-brand: var(--esp-font); --font-num: var(--esp-font);
  --glow: none; --lift: none;
}

/* Le mouvement est un confort, jamais une information. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-brand); font-weight: 600; letter-spacing: .01em; }
h1 { font-size: 23px; margin: 0 0 4px; }
/* Un titre de panneau s'annonce par un carré d'accent (la marque du bandeau du cockpit). */
h2 { font-size: 15px; margin: 0 0 14px; text-transform: uppercase; letter-spacing: .13em; color: var(--fg); display: flex; align-items: center; gap: 10px; }
h2::before { content: ''; width: 3px; height: 13px; border-radius: 2px; background: var(--esp-accent); flex: none; }
/* h3 = étiquette de section. Un TITRE DE CONTENU garde sa casse et sa couleur :
   passer un intitulé de ticket en capitales grisées le rend illisible. */
h3 { font-size: 13px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
h3.tk-title, .tk-title { text-transform: none; letter-spacing: 0; color: var(--fg); font-family: var(--font); font-size: 13.5px; }
.page-sub { color: var(--muted); margin: 0 0 18px; font-size: 13px; }

/* Nom propre du parc : une boutique ou un client s'affiche TOUJOURS en capitales.
   C'est un effet d'affichage et rien d'autre — le texte réel garde sa casse, donc
   le copier-coller, la recherche dans la page et les lecteurs d'écran restent
   justes. Jamais de strtoupper en base ni dans une entité.
   Un nom déjà mis en capitales par un style hérité (h2, h3, .badge, .msg-ou,
   .ml-site, .tk-site, en-têtes de tableau) ne porte PAS cette classe : elle n'y
   ajouterait rien. Les attributs `title=` restent en casse d'origine : le CSS ne
   les atteint pas, et le nom y est le plus souvent pris dans une phrase. */
.nom-propre { text-transform: uppercase; }

.container { max-width: 1180px; margin: 0 auto; padding: 20px 16px 60px; }

/* ---------- Cartes & grilles ---------- */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--lift);
}
.card.pad-sm { padding: 12px 14px; }
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* Cadran : l'étiquette au-dessus, la valeur en chiffres à chasse fixe ; l'état se lit à l'arête haute (fin de feuille). */
.kpi { text-align: left; overflow: hidden; }
.kpi .kpi-label { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; } :where(body:not(.espace)) .kpi .kpi-label { font-size: 12px; }
.kpi .kpi-value { font-family: var(--font-num); font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 4px; line-height: 1.1; }
.kpi .kpi-value small { font-family: var(--font); font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.kpi.good .kpi-value { color: var(--success); }
.kpi.warn .kpi-value { color: var(--warn); }
.kpi.bad .kpi-value { color: var(--danger); }

/* ---------- Boutons ---------- */
/* Aplat d'accent, libellé blanc en capitales (.acb-mbtn--primary du cockpit). Ni biseau, ni dégradé, ni lueur. */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border: 1px solid var(--esp-accent-face); cursor: pointer;
  border-radius: var(--radius-sm);
  font: 800 13px/1.2 var(--font); letter-spacing: .1em; text-transform: uppercase; color: #fff;
  background: var(--esp-accent-face);
  text-decoration: none;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--esp-accent-hover); border-color: var(--esp-accent-hover); color: #fff; text-decoration: none; }
.btn:active { background: var(--esp-accent-press); border-color: var(--esp-accent-press); }
.btn:focus-visible { outline: 2px solid var(--esp-accent); outline-offset: 2px; }
.btn.btn-ghost { background: transparent; border-color: var(--esp-ink); color: var(--esp-ink); box-shadow: none; }
.btn.btn-ghost:hover { background: var(--esp-n200); border-color: var(--esp-ink); color: var(--esp-ink); }
.btn.btn-danger { background: transparent; border-color: var(--esp-accent-face); color: var(--esp-accent-text); }
.btn.btn-danger:hover { background: var(--esp-accent-face); color: #fff; }
.btn.btn-sm { min-height: 36px; padding: 0 12px; font-size: 12px; letter-spacing: .08em; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ---------- Formulaires ---------- */
label { display: block; font-size: 12.5px; color: var(--muted); margin: 0 0 5px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number],
input[type=date], input[type=search], select, textarea {
  width: 100%; background: var(--bg-2); color: var(--fg);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 13px; font: 400 13.5px var(--font); line-height: 1.45;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--esp-ink); box-shadow: inset 0 -2px 0 var(--esp-accent); }
input::placeholder, textarea::placeholder { color: var(--esp-muted); }
label { text-transform: uppercase; letter-spacing: .09em; font-size: 10.5px; font-weight: 600; } :where(body:not(.espace)) label { font-size: 12px; }
textarea { min-height: 90px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input[type=checkbox] { accent-color: var(--esp-accent-face); width: 16px; height: 16px; }
.field { margin-bottom: 14px; }
.form-row { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-row-2 { grid-template-columns: 1fr 1fr; } .form-row-3 { grid-template-columns: repeat(3, 1fr); } }
.help { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; padding: 10px 14px; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; background: transparent; white-space: nowrap; border-bottom: 1px solid var(--border-lit); } :where(body:not(.espace)) th { font-size: 12px; }
td { padding: 11px 14px; border-top: 1px solid var(--border); vertical-align: middle; }
tr.rowlink { cursor: pointer; transition: background .12s ease; }
/* Une ligne survolée s'allume par la gauche : on sait où l'on pointe. */
tr.rowlink:hover td { background: var(--esp-n200); }
tr.rowlink:hover td:first-child { box-shadow: inset 3px 0 0 var(--esp-accent); }
td.num, th.num { text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* ---------- Badges / pastilles ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 4px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; background: var(--bg-2); border: 1px solid var(--border-lit); color: var(--muted); white-space: nowrap; } :where(body:not(.espace)) .badge { font-size: 12px; }
.badge.ok { color: var(--esp-ink); border-color: var(--esp-n500); background: transparent; box-shadow: none; }
.badge.warn { color: var(--esp-alerte); border-color: var(--esp-alerte-vif); background: var(--esp-alerte-fond); box-shadow: none; }
.badge.bad { color: #fff; border-color: var(--esp-accent-face); background: var(--esp-accent-face); box-shadow: none; }
.badge.accent { color: var(--esp-accent-text); border-color: var(--esp-accent); background: transparent; box-shadow: none; }

/* Diodes d'état : la FORME code l'état (rond = en ligne, carré = hors ligne, losange = inconnu), sans halo. Dans
   l'espace, la panne clignote encore (espace-viseur.css) ; dans le BO elle est figée (fin de feuille). */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.p3 { background: var(--esp-p1); }
.dot.p2 { background: var(--esp-p2); }
.dot.p1 { background: var(--esp-p3); }
.dot.up { background: var(--esp-ink); }
.dot.down { background: var(--esp-danger-vif); animation: pouls 1.4s ease-in-out infinite; }
.dot.unknown { background: var(--esp-n500); }
@keyframes pouls { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ---------- Jauge santé (anneau conic) ---------- */
.health-ring { --p: 0; --ring: var(--esp-ink); width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--ring) calc(var(--p) * 1%), var(--esp-n200) 0);
  display: flex; align-items: center; justify-content: center; position: relative; }
/* Creux central : un cadran, pas un camembert. */
.health-ring::before { content: ''; position: absolute; inset: 6px; border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border); }
.health-ring span { position: relative; font-family: var(--font-num); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.health-ring.warn { --ring: var(--warn); } .health-ring.bad { --ring: var(--danger); }
.health-ring.lg { width: 96px; height: 96px; } .health-ring.lg span { font-size: 24px; }
.health-ring.na { --ring: var(--esp-n200); filter: none; } .health-ring.na span { color: var(--muted); font-size: 13px; }

/* ---------- Cartes site (dashboard) ---------- */
.site-card { display: block; color: inherit; }
.site-card { transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease; }
.site-card:hover { text-decoration: none; border-color: var(--esp-n400); border-top-color: var(--esp-accent); }
.site-card .site-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.site-card .site-title { min-width: 0; }
.site-card .site-title strong { display: block; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-card .site-title small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.site-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.site-metrics .m { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; }
.site-metrics .m b { display: block; font-family: var(--font-num); font-size: 16px; font-variant-numeric: tabular-nums; }
.site-metrics .m span { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; } :where(body:not(.espace)) .site-metrics .m span { font-size: 12px; }
.site-metrics .m.bad b { color: var(--danger); }
.site-metrics .m.warn b { color: var(--warn); }

/* ---------- Tickets ---------- */
.ticket-row { border-left: 3px solid var(--accent); }
.ticket-row.p3 { border-left-color: var(--danger); }
.ticket-row.p2 { border-left-color: var(--warn); }
.ticket-row.validate { border-left-color: var(--success); }
.section-pill { font-size: 11.5px; padding: 2px 9px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border); color: var(--muted); } :where(body:not(.espace)) .section-pill { font-size: 12px; }
.section-pill.todo { color: var(--accent); border-color: var(--esp-a300); }
.section-pill.validate { color: var(--success); border-color: var(--esp-n500); }
.comment { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; }
.comment.hub { border-color: var(--esp-n400); background: var(--esp-n100); }
.comment .meta { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; } :where(body:not(.espace)) .comment .meta { font-size: 12px; }
.ticket-desc { background: var(--bg-2); border-radius: 12px; padding: 12px 16px; overflow-x: auto; }
.ticket-desc img { max-width: 100%; }

/* ---------- Flash ---------- */
/* Message système : barre d'état à liseré gauche de 3 px ; la teinte n'est que le signal, le texte reste lisible. */
.flash { position: relative; padding: 12px 16px 12px 18px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 13.5px; border: 1px solid; overflow: hidden; }
.flash.success { background: var(--esp-panel); border-color: var(--esp-n300); border-left: 3px solid var(--esp-ink); color: var(--esp-ink); }
.flash.error { background: var(--esp-danger-fond); border-color: var(--esp-a300); border-left: 3px solid var(--esp-accent); color: var(--esp-a900); }
.flash.info { background: var(--esp-n100); border-color: var(--esp-n300); border-left: 3px solid var(--esp-n700); color: var(--esp-ink); }
.flash.warn { background: var(--esp-alerte-fond); border-color: var(--esp-a300); border-left: 3px solid var(--esp-alerte-vif); color: var(--esp-a900); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box .brand { display: block; text-align: center; font-size: 15px; margin-bottom: 6px; }
.auth-box .tagline { text-align: center; color: var(--muted); font-size: 12.5px; margin: 0 0 24px; }

/* ---------- Divers ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar select, .toolbar input { width: auto; min-width: 130px; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--font-num); font-size: 12.5px; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.nav-badge, .tk-age, .ml-age { font-family: var(--font-num); }
.token-box { background: var(--bg-2); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 14px; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; word-break: break-all; user-select: all; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty .big { font-size: 34px; margin-bottom: 8px; }
.stale-banner { font-size: 12px; color: var(--warn); }
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle; } :where(body:not(.espace)) .nav-badge { font-size: 12px; }
.pageactions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.right { text-align: right; }
::-webkit-scrollbar { height: 8px; width: 8px; }
::-webkit-scrollbar-thumb { background: var(--esp-n400); border-radius: 4px; }

/* --- Tickets : grille de cartes (dense, lisible d'un coup d'œil) --- */
.tk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 12px;
    margin: 4px 0 14px;
}
.tk-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 11px 13px 10px 15px;
    background: var(--card, #151a26);
    border: 1px solid var(--border, #2a3142);
    border-radius: 12px;
    cursor: pointer;
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
/* La priorité se lit à la couleur du liseré, sans occuper de place. */
.tk-card::before {
    content: '';
    position: absolute;
    left: 0; top: 10px; bottom: 10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--accent);
}
.tk-card.p3::before { background: var(--danger); }
.tk-card.p2::before { background: var(--warn); }
.tk-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
}
.tk-head { display: flex; align-items: center; gap: 8px; font-size: 11.5px; } :where(body:not(.espace)) .tk-head { font-size: 12px; }
.tk-site {
    font-weight: 600;
    color: var(--fg, #e8ecf5);
    opacity: .85;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tk-age { margin-left: auto; color: var(--muted, #8a8f98); white-space: nowrap; }
.tk-age.warn { color: var(--warn); }
.tk-card.stale { border-style: dashed; }
.tk-title {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    /* Deux lignes maximum : les cartes gardent la même hauteur, la grille reste calme. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tk-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11px; } :where(body:not(.espace)) .tk-foot { font-size: 12px; }
.tk-meta { color: var(--muted, #8a8f98); }
/* Lien étiré : le titre est un vrai lien, mais sa zone de clic couvre la carte
   entière. Un seul arrêt de tabulation par ticket, et les boutons d'action
   restent cliquables grâce au z-index supérieur ci-dessous. */
.tk-lien { color: inherit; }
.tk-lien:hover { text-decoration: none; color: var(--accent); }
.tk-lien::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: 12px; }
/* L'anneau de focus doit cerner la CARTE, pas les trois mots du titre. */
.tk-lien:focus-visible { outline: none; }
.tk-lien:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 2px; }

.tk-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .12s ease; position: relative; z-index: 2; }
.tk-card:hover .tk-actions, .tk-actions:focus-within { opacity: 1; }
.tk-act {
    background: transparent;
    border: 1px solid var(--border, #2a3142);
    color: var(--fg, #e8ecf5);
    border-radius: 6px;
    padding: 1px 7px;
    font-size: 12px;
    cursor: pointer;
    line-height: 1.5;
}
.tk-act:hover { border-color: var(--accent); color: var(--accent); }
/* Sur écran tactile, les actions restent visibles : il n'y a pas de survol. */
@media (hover: none) {
    .tk-actions { opacity: 1; }
}

/* ============ Dashboard : grille des encarts ============ */
/* Depuis le 24/09/2026, chaque utilisateur choisit l'ORDRE et la LARGEUR des encarts
   (mode « Disposer », App\Service\DashboardLayout).
   ORDRE = ordre du DOM, rendu par le serveur : ni `order` ni `dense`, l'ordre de lecture
   et de tabulation reste l'ordre visuel.
   LARGEUR = propriété --dw-<id> posée sur .dash (jamais sur la section : les encarts
   tickets/temps se remplacent en entier quand ils se rechargent). Absente = « Auto » =
   la place d'origine, qui dépend de l'écran (replis des var() ci-dessous).
   Mobile-first : une colonne empilée sous 900 px, où aucune largeur ne s'applique. */
.dash { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.dash > .card { margin-bottom: 0; }
/* Un item de grille vaut min-content par défaut : tableau, piste météo, hash élargiraient
   la piste et TOUTE la page partirait en travers (mesuré : 1052 px sur 375, voir Météo). */
.dash > .card { min-width: 0; }
@media (min-width: 900px) {
    .dash { grid-template-columns: repeat(24, minmax(0, 1fr)); align-items: start; }
    .dash > .card               { grid-column: span 24; }   /* filet : encart inconnu = toute la ligne */
    .dash > .dash-parc          { grid-column: span var(--dw-parc, 24); }
    .dash > .dash-tickets       { grid-column: span var(--dw-tickets, 24); }
    .dash > .dash-temps         { grid-column: span var(--dw-temps, 24); }
    .dash > .dash-agenda        { grid-column: span var(--dw-agenda, 24); }
    .dash > .dash-alertes       { grid-column: span var(--dw-alertes, 24); }
    .dash > .dash-securite      { grid-column: span var(--dw-securite, 24); }
    .dash > .dash-trafic        { grid-column: span var(--dw-trafic, 24); }
    .dash > .dash-weather       { grid-column: span var(--dw-weather, 24); }
}
/* Encarts retirés, leurs règles avec eux (18/10/2026) : Note secrète et Hash PrestaShop
   (28/09/2026, palette ⌘K), Klorel, Argent et Activité (01/10/2026, modale Stats), Factures
   non payées et Raccourcis (18/10/2026). Au-delà de 1400 px, Alertes 1/3 + Dernières actions
   2/3 : public/css/dashboard.css, avec la place de « Dernières actions ». */
/* Mises en page internes réglées sur la largeur de L'ENCART, pas de l'écran : un encart
   réduit à 1/3 ne doit pas afficher 8 cartes de tickets écrasées. Seuils = anciens seuils
   d'écran moins marges et padding (−78 sous 900 px, −86 au-delà), pour qu'un encart en
   pleine largeur garde exactement son rendu d'avant. */
.tk-encart, .tp-encart, .dash-agenda, .dash-pshash { container: encart / inline-size; }
.wk { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: .06em; } :where(body:not(.espace)) .wk { font-size: 12px; }

/* --- Semaine --- */
.wk-grid { display: grid; gap: 8px; grid-template-columns: 1fr; }
/* 7 colonnes seulement quand « mercredi 24 » tient dans sa case (≈ 84 px + padding) ; entre
   les deux, 4 colonnes plutôt que des en-têtes qui débordent (mesuré : agenda à 1/3). */
@container encart (min-width: 482px) { .wk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container encart (min-width: 780px) { .wk-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.wk-day {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 9px 9px;
    min-height: 92px;
}
.wk-day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.wk-day.past { opacity: .55; }
.wk-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.wk-dow { font-size: 11px; color: var(--muted); text-transform: capitalize; } :where(body:not(.espace)) .wk-dow { font-size: 12px; }
.wk-num { margin-left: auto; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wk-day.today .wk-num { color: var(--accent); }
.wk-ev {
    display: flex; gap: 5px; align-items: baseline;
    font-size: 11.5px; line-height: 1.35;
    padding: 3px 6px; margin-bottom: 4px;
    border-radius: 6px;
    background: var(--esp-n200);
    border-left: 2px solid var(--accent);
} :where(body:not(.espace)) .wk-ev { font-size: 12px; }
.wk-ev.allday { background: var(--esp-n200); border-left-color: var(--accent-2); }
.wk-ev b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.wk-ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-empty { margin: 0; color: var(--border); font-size: 12px; }
/* Agenda INTERNE (28/09/2026) : chaque rendez-vous est un lien qui ouvre la modale Agenda
   sur lui (agenda.js) ; sans script, la page /agenda. Barre : ‹ Aujourd'hui › + boutons. */
.wk-barre { margin-bottom: 10px; flex-wrap: wrap; gap: 6px; }
.wk-nav { display: flex; gap: 6px; }
a.wk-ev { color: var(--fg); text-decoration: none; }
a.wk-ev:focus-visible { background: var(--esp-a200); outline: none; box-shadow: 0 0 0 1px var(--accent); text-decoration: none; } @media (hover: hover) { a.wk-ev:hover { background: var(--esp-a200); outline: none; box-shadow: 0 0 0 1px var(--accent); text-decoration: none; } }
a.wk-ev.allday:focus-visible { background: var(--esp-n200); box-shadow: 0 0 0 1px var(--accent-2); } @media (hover: hover) { a.wk-ev.allday:hover { background: var(--esp-n200); box-shadow: 0 0 0 1px var(--accent-2); } }
.wk-ev .wk-ev-titre { flex: 1 1 auto; min-width: 0; }
.wk-ev .wk-ev-client { flex: 0 1 auto; font-size: 10px; color: var(--muted); } :where(body:not(.espace)) .wk-ev .wk-ev-client { font-size: 12px; }
@media (max-width: 767px) {
    .dash-agenda .wk-barre .btn { min-height: 44px; }
    .dash-agenda .wk-nav .btn { min-width: 44px; }
    a.wk-ev { min-height: 44px; align-items: center; font-size: 13px; }
}

/* Jauges (heures, facturation) des encarts Klorel et Argent : retirées avec eux (18/10/2026). */

/* --- Listes compactes (tickets) --- */
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { border-left: 2px solid var(--accent); margin-bottom: 3px; border-radius: 0 6px 6px 0; }
.mini-list li.p3 { border-left-color: var(--danger); }
.mini-list li.p2 { border-left-color: var(--warn); }
.mini-list a {
    display: flex; align-items: baseline; gap: 8px;
    padding: 5px 8px; font-size: 12.5px; color: var(--fg);
    border-radius: 0 6px 6px 0;
}
.mini-list a:hover { background: var(--bg-2); text-decoration: none; }
.ml-site { color: var(--muted); font-size: 11px; white-space: nowrap; max-width: 34%; overflow: hidden; text-overflow: ellipsis; } :where(body:not(.espace)) .ml-site { font-size: 12px; }
.ml-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-age { color: var(--muted); font-size: 11px; white-space: nowrap; } :where(body:not(.espace)) .ml-age { font-size: 12px; }
.ml-age.warn { color: var(--warn); }

/* --- Encart « Sécurité » (13/10/2026, App\Service\Securite\SecuritePortee) ---
   Mobile d'abord : groupes empilés, chaque ligne est une cible de 44 px, le détail (chemin d'un
   fichier, signature) passe à la ligne sous le titre au lieu d'élargir la page. Deux colonnes de
   groupes quand l'ENCART dépasse 760 px — il peut être réduit à un tiers en mode Disposer. */
.dash-securite { container: encart / inline-size; }
.sec-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.sec-tete h2 { margin: 0; flex: 1 1 auto; min-width: 0; flex-wrap: wrap; overflow-wrap: normal; row-gap: 2px; }
/* Le nom du projet passe à la ligne EN ENTIER (13/10/2026) : coupé lettre par lettre au téléphone
   quand le h2 flex n'avait pas de retour à la ligne (même correctif que l'encart Trafic). */
.sec-tete h2 .wk { flex: 1 1 10em; min-width: 0; overflow-wrap: anywhere; }
.sec-pastilles { display: flex; flex-wrap: wrap; gap: 6px; }
.sec-avert, .sec-cockpit {
    margin: 0 0 8px; padding: 8px 10px; font-size: 12.5px; line-height: 1.45;
    border-radius: 0 6px 6px 0; border-left: 2px solid var(--accent); background: var(--bg-2);
    overflow-wrap: anywhere;
}
.sec-avert.warning, .sec-cockpit.warn { border-left-color: var(--warn); }
.sec-cockpit.bad { border-left-color: var(--danger); }
.sec-cockpit.ok { border-left-color: var(--success); }
.sec-avert a, .sec-cockpit a { color: var(--fg); display: block; }
/* Charte sécurité du cockpit (14/10/2026) : « Charte 60 % · 9 à corriger · 3 à surveiller », couleur de la note. */
.sec-charte {
    margin: 0 0 8px; padding: 0 10px; font-size: 13px; line-height: 1.45;
    border-radius: 0 6px 6px 0; border-left: 3px solid var(--dim); background: var(--bg-2); overflow-wrap: anywhere;
}
.sec-charte a { color: var(--fg); display: flex; align-items: center; min-height: 44px; }
.sec-charte.ok { border-left-color: var(--success); }
.sec-charte.warn { border-left-color: var(--warn); }
.sec-charte.bad { border-left-color: var(--danger); background: var(--esp-danger-fond); }
.sec-charte-sos { color: var(--danger); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.sec-groupes { display: grid; gap: 4px 20px; grid-template-columns: minmax(0, 1fr); }
@container encart (min-width: 760px) { .sec-groupes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sec-groupe { min-width: 0; }
.sec-groupe h3 { margin: 12px 0 6px; }
.sec-liste a { flex-wrap: wrap; align-items: center; row-gap: 2px; min-height: 44px; }
.sec-liste a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* Le titre passe à la ligne (2 au plus) au lieu d'être coupé : sur téléphone, « Certificat TLS · Expire… » ne disait rien. */
.sec-liste .sec-titre { flex: 1 1 0; white-space: normal; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sec-badge { padding: 1px 6px; font-size: 9.5px; } :where(body:not(.espace)) .sec-badge { font-size: 12px; }
.sec-detail { flex: 1 0 100%; min-width: 0; color: var(--muted); font-size: 11.5px; line-height: 1.35; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } :where(body:not(.espace)) .sec-detail { font-size: 12px; }
.sec-plus, .sec-note { margin: 4px 0 0; }
.sec-note { color: var(--muted); }
.sec-liens { display: flex; flex-wrap: wrap; gap: 0 14px; margin: 6px 0 0; }
.sec-liens a, .sec-note a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 900px) and (pointer: fine) {
    .sec-liste a, .sec-liens a, .sec-note a { min-height: 0; }
}

/* --- Menu « Actions » : Ignorer / Liste blanche (14/10/2026, securite/_actions.html.twig) ---
   Mobile d'abord : le résumé est une cible de 44 × 44 À CÔTÉ du lien de la ligne (jamais dedans),
   posé en haut à droite ; ouvert, le formulaire passe SOUS la ligne, à pleine largeur, sans rien
   élargir. Même menu dans les journaux d'une boutique (agence) et les alertes. */
.sec-liste li.sec-ligne { position: relative; display: flex; flex-wrap: wrap; min-height: 44px; padding-right: 44px; }
.sec-liste li.sec-ligne > a { flex: 1 1 100%; min-width: 0; }
.sec-liste li.sec-ligne > .sec-act { flex: 1 1 100%; min-width: 0; margin-right: -44px; }
.sec-liste li.sec-ligne > .sec-act > summary { position: absolute; top: 0; right: 0; }
.sec-act > summary { list-style: none; cursor: pointer; }
.sec-act > summary::-webkit-details-marker { display: none; }
.sec-act-bouton { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    color: var(--muted); font-size: 20px; line-height: 1; border-radius: 6px; }
.sec-act-bouton:hover, .sec-act[open] > .sec-act-bouton { color: var(--accent); background: var(--bg-2); }
.sec-act > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sec-act-texte { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-size: 12.5px; }
.sec-act-form { margin: 4px 0 8px; padding: 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-2);
    display: grid; gap: 10px; font-size: 12.5px; overflow-wrap: anywhere; }
.sec-act-choix { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.sec-act-choix > select, .sec-act-choix > input[type=text] { flex: 1 1 12em; min-width: 0; min-height: 44px; font-size: 16px; }
.sec-act-label { flex: 1 0 100%; color: var(--muted); font-size: 11.5px; } :where(body:not(.espace)) .sec-act-label { font-size: 12px; }
.sec-act-confirme { flex: 1 0 100%; display: flex; align-items: center; gap: 8px; min-height: 44px; }
.sec-act-go { min-height: 44px; }
.sec-act-aide { flex: 1 0 100%; margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.4; } :where(body:not(.espace)) .sec-act-aide { font-size: 12px; }
.sec-act-interdit { color: var(--warn); }
.sec-act-effet { margin: 0; padding-top: 8px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11.5px; } :where(body:not(.espace)) .sec-act-effet { font-size: 12px; }
.sec-flash { margin: 0 0 8px; padding: 8px 10px; font-size: 12.5px; border-radius: 0 6px 6px 0; border-left: 2px solid var(--success); background: var(--bg-2); }
.sec-flash.bad { border-left-color: var(--danger); }
.sec-ignores { margin: 4px 0 0; }
.sec-ignores a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
/* Journaux d'une boutique (agence) : colonne d'actions, lignes ignorées grisées (?ignores=1). */
.jr-act { width: 1%; white-space: nowrap; }
.jr-act .sec-act[open] { white-space: normal; min-width: min(20rem, calc(100vw - 64px)); }
.jr-ignore > td:not(.jr-act) { opacity: .55; }
.jr-reactiver { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; white-space: normal; }
.jr-reactiver .btn, .jr-ignores { min-height: 44px; display: inline-flex; align-items: center; }
.al-blanche { flex: 1 0 100%; min-width: 0; }
.al-blanche form:not(.sec-act-form) { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
/* Écran des décisions (/securite/exceptions) : une carte par décision, pas de tableau. */
.secx-liste { list-style: none; margin: 0; padding: 0; }
.secx-ligne { padding: 10px 0; border-top: 1px solid var(--border); min-width: 0; overflow-wrap: anywhere; }
.secx-ligne:first-child { border-top: 0; }
.secx-inactive { opacity: .6; }
.secx-tete { display: flex; flex-wrap: wrap; gap: 6px; }
.secx-libelle { margin: 6px 0 2px; font-weight: 600; }
.secx-detail, .secx-meta, .secx-raison, .secx-sync { margin: 2px 0; }
.secx-reactiver .btn, .secx-filtres .btn { min-height: 44px; display: inline-flex; align-items: center; }
@media (min-width: 900px) and (pointer: fine) {
    .sec-act-bouton { width: 36px; height: 32px; }
    .sec-liste li.sec-ligne { min-height: 0; padding-right: 36px; }
    .sec-liste li.sec-ligne > .sec-act { margin-right: -36px; }
    .sec-act-choix > select, .sec-act-choix > input[type=text], .sec-act-go, .sec-act-confirme, .sec-ignores a,
    .jr-reactiver .btn, .jr-ignores, .secx-reactiver .btn, .secx-filtres .btn { min-height: 0; }
    .sec-act-choix > select, .sec-act-choix > input[type=text] { font-size: inherit; }
}

/* --- Pastilles de lien (modules, audit) --- */
/* Les règles .cl-* de l'encart « Clients » ont été retirées le 22/09/2026 avec
   l'encart lui-même : il faisait doublon avec le parc. .pill reste — elle sert
   encore à l'écran Modules et au PDF d'audit. */
.pill {
    display: inline-block; padding: 1px 8px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--bg-2);
    font-size: 11px; color: var(--fg); white-space: nowrap;
} :where(body:not(.espace)) .pill { font-size: 12px; }
.pill:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pill.bo { border-color: var(--esp-n700); color: var(--accent-2); }
.pill.ghost { color: var(--muted); border-style: dashed; }

/* Filtre de la liste des tickets : le champ vit dans une barre d'outils en flex,
   il lui faut une largeur propre sinon il se réduit à son contenu. */
.tk-filtre-combo { min-width: 240px; flex: 0 1 300px; }
@media (max-width: 620px) { .tk-filtre-combo { flex: 1 1 100%; } }

/* --- Champ à auto-complétion (choix d'une boutique au clavier) --- */
/* Remplace un <select> de quinze entrées dont les noms ne commencent pas par ce
   qu'on tape. Tout se fait au clavier : frappe, flèches, Entrée. */
.kl-combo { position: relative; }
.kl-combo input[aria-invalid="true"] { border-color: var(--danger); }

.kl-combo-liste {
  position: absolute; z-index: 30; left: 0; right: 0; top: 100%;
  margin: 4px 0 0; padding: 0; list-style: none;
  max-height: 264px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--esp-panel); border: 1px solid var(--esp-divider); border-top: 2px solid var(--esp-ink);
  border-radius: 0; box-shadow: var(--esp-shadow-lg);
}
/* `:not([hidden])` inutile ici : la liste n'a pas de display imposé, l'attribut
   hidden suffit. On le note pour ne pas « corriger » ce qui marche. */
/* Rangée de 44 px (R1) : le texte centré par la hauteur de ligne, l'ellipse des noms longs reste. */
.kl-combo-liste li {
  padding: 0 12px; line-height: 44px; min-height: 44px; border-radius: 0; cursor: pointer;
  border-bottom: 1px solid var(--esp-n300);
  font-size: 15px; color: var(--fg); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.kl-combo-liste li:last-child { border-bottom: 0; }
/* Un seul état visuel pour le survol ET la sélection au clavier : sans cela, on
   ne sait plus laquelle des deux lignes Entrée va valider. */
.kl-combo-liste li.on,
.kl-combo-liste li:hover { background: var(--esp-n200); color: var(--esp-ink); box-shadow: inset 3px 0 0 var(--esp-accent); }
.kl-combo-liste li.vide { color: var(--muted); cursor: default; font-style: italic; }
/* Proposition avec complément (projet · date) : le texte s'abrège, le complément reste entier. */
.kl-combo-liste li.avec-detail { display: flex; align-items: baseline; gap: 10px; }
.kl-combo-liste .kl-combo-texte { flex: 1 1 auto; min-width: 30%; overflow: hidden; text-overflow: ellipsis; }
.kl-combo-liste .kl-combo-detail { flex: 0 1 auto; max-width: 64%; overflow: hidden; text-overflow: ellipsis; font-size: 13px; color: var(--muted); }
.kl-combo-liste li.vide:hover { background: none; color: var(--muted); box-shadow: none; }

/* Rappel du raccourci d'envoi, à côté du bouton. */
/* Rappel du raccourci : le style `kbd` global (l. 1079) fait deja le travail. */
.tq-astuce { margin-left: 10px; font-size: 11px; color: var(--dim); } :where(body:not(.espace)) .tq-astuce { font-size: 12px; }

/* Utilisateurs associés dès la création du ticket (07/10/2026) : mêmes pastilles que sous l'en-tête d'un ticket. */
.tq-associes[hidden] { display: none; }
.tq-associes-liste { display: flex; flex-wrap: wrap; gap: 8px; }
.tq-as {
  display: inline-flex; align-items: center; gap: 7px; min-height: 32px; max-width: 240px; padding: 5px 12px 5px 9px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--card-2); color: var(--muted);
  font: inherit; font-size: 12.5px; line-height: 1.2; cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.tq-as:hover { border-color: var(--border-lit); color: var(--fg); }
.tq-as:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tq-as-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tq-as-coche { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .55; position: relative; }
.tq-as[aria-pressed="true"] { color: var(--fg); border-color: var(--esp-ink); background: var(--esp-n200); }
.tq-as[aria-pressed="true"] .tq-as-coche { opacity: 1; border-color: transparent; background: var(--esp-accent-face); }
.tq-as[aria-pressed="true"] .tq-as-coche::after { content: ''; position: absolute; left: 4.5px; top: 2px; width: 3px; height: 6px; border: solid #fff; border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); }
.tq-as-mail { font-size: 12px; color: var(--accent); }
.tq-as.sans-mail .tq-as-nom::after { content: ' · sans e-mail'; font-size: 11px; color: var(--muted); } :where(body:not(.espace)) .tq-as.sans-mail .tq-as-nom::after { font-size: 12px; }
@media (hover: none) { .tq-as { min-height: 40px; } }

/* « @ » dans la description du nouveau ticket (07/10/2026) : même habit que la liste de la discussion. */
.tq-desc-champ { position: relative; }
.tq-mentions {
  position: absolute; left: 0; right: 0; z-index: 30; margin: 4px 0 0; padding: 4px; list-style: none;
  max-width: 360px; max-height: 240px; overflow-y: auto;
  background: var(--card-2); border: 1px solid var(--border-lit); border-radius: 10px; box-shadow: none;
}
.tq-mentions[hidden] { display: none; }
.tq-mentions li { padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.tq-mentions li[aria-selected="true"], .tq-mentions li:hover { background: var(--esp-a200); color: var(--accent); }
@media (hover: none) { .tq-mentions li { min-height: 44px; display: flex; align-items: center; } }

/* Pièces jointes du nouveau ticket : glisser-déposer, sélecteur, capture collée (05/10/2026).
   Le champ natif reste dans la zone, invisible mais atteignable au clavier : c'est lui qu'on
   envoie, et la zone (son <label>) montre le focus. */
/* L'intitulé reprend l'habit des <label> (l. 153 et 163) ; la zone, elle, est un <label> qui s'en défait. */
.tq-label { display: block; margin: 0 0 5px; font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); } :where(body:not(.espace)) .tq-label { font-size: 12px; }
.tq-label .muted { text-transform: none; letter-spacing: normal; font-weight: 400; }
.tq-depot {
  position: relative; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px;
  min-height: 64px; padding: 12px 14px; margin: 0;
  border: 2px dashed var(--border); border-radius: var(--radius); background: var(--esp-n100);
  color: var(--muted); font-size: 13px; font-weight: 400; letter-spacing: normal; text-transform: none;
  text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.tq-depot:hover, .tq-depot:focus-within { border-color: var(--accent); color: var(--fg); }
.tq-depot b { color: var(--accent); font-weight: 600; }
.tq-depot-champ { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; }
.tq-depot-lacher { display: none; font-weight: 600; }
/* Les textes de la zone ne prennent jamais le pointeur : ils changent quand des fichiers la
   survolent, et un élément remplacé sous le curseur en plein glisser relance dragenter/dragleave
   (la zone clignotait et le dépôt pouvait être refusé). La cible reste la zone elle-même. */
.tq-depot > * { pointer-events: none; }
/* Des fichiers survolent la fenêtre : tout le formulaire s'allume, la zone dit « Lâchez ». */
.tk-quick.tq-survol { outline: 2px dashed var(--accent); outline-offset: 6px; border-radius: var(--radius); }
.tk-quick.tq-survol .tq-depot { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.tk-quick.tq-survol .tq-depot-texte { display: none; }
.tk-quick.tq-survol .tq-depot-lacher { display: inline; }
.tq-fichiers { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tq-fichiers[hidden] { display: none; }
.tq-fichiers li {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 3px 4px 3px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 12.5px;
}
.tq-f-nom { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tq-f-taille { flex: none; color: var(--muted); font-family: var(--font-num); font-size: 11px; } :where(body:not(.espace)) .tq-f-taille { font-size: 12px; }
.tq-f-x { flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer; }
.tq-f-x:hover, .tq-f-x:focus-visible { color: var(--danger); background: var(--esp-danger-fond); }
.tq-fichiers .tq-f-refus { padding: 6px 10px; border-color: var(--esp-danger); color: var(--danger); }
.tq-depot-doigt { display: none; }
/* Au doigt, rien ne se glisse : la zone dit « Ajouter des fichiers », la croix grandit. */
@media (hover: none) {
  .tq-depot-ordi { display: none; }
  .tq-depot-doigt { display: inline; }
  .tq-f-x { width: 44px; height: 44px; }
}

/* --- Liste des clients : filtre en direct + navigation au clavier --- */
.cl-filtre { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.cl-filtre input { flex: 1 1 280px; max-width: 460px; }

/* --- Écran Modules : où est installé un module, activé, en quelle version ---
   Mobile-first : une boutique = trois blocs empilés (boutique + état, versions,
   fraîcheur + back-office), en grille de trois colonnes à partir de 600 px. Pas de
   tableau à défilement horizontal : l'écran sert au pouce, en boutique. */
.mod-recherche { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 6px; }
.mod-combo { flex: 1 1 200px; max-width: 520px; }
.mod-combo input { width: 100%; }
.mod-couverture { margin: 0 0 14px; }
.mod-fraicheur { margin: -8px 0 14px; color: var(--accent); }
.mod-vieux { color: var(--warn); }

.mod-entete { margin-bottom: 10px; }
.mod-titre { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* Un nom technique garde sa casse : en capitales, « ps_facetedsearch » ne se lirait plus. */
.mod-nom { margin: 0; text-transform: none; letter-spacing: 0; font-family: var(--font-num); font-size: 17px; overflow-wrap: anywhere; }
.mod-display { margin: 2px 0 0; }
.mod-fiche:focus { outline: none; }
.mod-fiche:focus-visible { border-color: var(--border-lit); }
.mod-resume { margin: 0 0 12px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.mod-resume strong { color: var(--fg); }
.mod-sep { margin: 0 6px; color: var(--dim); }
.mod-sous-titre { margin: 16px 0 2px; }

.mod-lignes { list-style: none; margin: 0; padding: 0; }
.mod-ligne { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 11px 0; border-top: 1px solid var(--border); }
.mod-ligne:first-child { border-top: 0; }
.mod-ligne > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.mod-ligne strong { overflow-wrap: anywhere; }
/* Libellés d'état longs (« activation non fiable… ») : ils passent à la ligne au lieu de déborder à 375 px. */
.mod-ligne .badge { white-space: normal; }
.mod-ligne.grise { opacity: .55; }
.mod-action { flex-basis: 100%; }
.mod-v { display: inline-flex; align-items: center; gap: 5px; }
.mod-etiquette { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); } :where(body:not(.espace)) .mod-etiquette { font-size: 12px; }
.mod-lien { color: inherit; }
.mod-lien:hover { text-decoration: none; }
.mod-lien:hover strong { color: var(--accent); }
.mod-lien:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
@media (min-width: 600px) {
  .mod-ligne { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
  .mod-releve { justify-content: flex-end; }
}

.mod-replie summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.mod-replie summary:hover { color: var(--accent); }
.mod-replie:not(.card) { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.mod-replie[open] summary { margin-bottom: 4px; }

.mod-resultats { list-style: none; margin: 0; padding: 0; }
.mod-resultat { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.mod-resultat:first-child { border-top: 0; }
.mod-resultat .mod-lien { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.mod-resultat .mod-display { margin: 0; color: var(--muted); font-size: 12.5px; }
.mod-compteurs { flex-basis: 100%; }
@media (min-width: 600px) { .mod-compteurs { flex-basis: auto; margin-left: auto; } }

.mod-vide ol { margin: 0 0 14px; padding-left: 20px; }
.mod-vide li { margin-bottom: 6px; }

/* Export du module d'une boutique (fiche d'un module) : un encart sous la ligne, sur toute
   la largeur de la grille. Mobile d'abord : boutons et phrases passent à la ligne ; les
   chemins suspects (sans espace) se coupent n'importe où plutôt que de déborder. */
.mod-export-note { margin: -4px 0 12px; }
.mod-ligne > .mod-export { display: block; grid-column: 1 / -1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--esp-n100); }
.mod-export:focus { outline: none; }
.mod-export:focus-visible { border-color: var(--border-lit); box-shadow: 0 0 0 1px var(--border-lit); }
.mod-export p { margin: 0 0 8px; overflow-wrap: anywhere; }
.mod-export > :last-child { margin-bottom: 0; }
.mod-export-etat { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.mod-ligne .mod-export-etat .badge { white-space: nowrap; }
.mod-export-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.mod-export-actions form { margin: 0; }
.mod-export-raison { flex: 1 1 220px; min-width: 0; }
.mod-export-suspects { margin: 0 0 8px; }
.mod-export-liste { margin: 4px 0 8px; padding-left: 18px; font-family: var(--font-num); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.mod-export-plus summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.mod-export-plus summary:hover { color: var(--accent); }
.mod-export-licence { color: var(--warn); }
.mod-export-nouveau { color: var(--accent); font-weight: 600; }
@media (pointer: coarse) {
  .mod-export-actions .btn, .mod-export-plus summary { min-height: 44px; }
  .mod-export-rafraichir { display: inline-flex; align-items: center; min-height: 44px; }
}

/* --- Lignes cliquables (tr.rowlink) : un vrai lien par ligne ---
   Le nom est un lien (un arrêt de tabulation, empilé dans la modale) ; un clic
   ailleurs sur la ligne le suit, en JavaScript (_modal.html.twig).
   PAS de lien « étiré » en ::after absolu : Safari ne fait pas d'un <tr> le repère
   des positions absolues, et le ::after de la dernière ligne recouvrait toute la
   modale sur iPhone (chaque appui ouvrait le même client). */
.rowlink-cible { color: inherit; }
.rowlink-cible:hover { text-decoration: none; color: var(--accent); }
.rowlink-cible:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
/* La ligne entière signale le focus clavier, comme au survol. */
tr.rowlink:has(.rowlink-cible:focus-visible) td { background: rgba(53, 208, 242, .07); }
tr.rowlink:has(.rowlink-cible:focus-visible) td:first-child { box-shadow: inset 2px 0 0 var(--accent); }

/* --- Dépôt de fichiers sur un ticket --- */
/* Le voile couvre le corps de la modale, qui est la surface de dépôt. En
   `position: fixed` et non `absolute` : le corps de modale défile, un voile
   absolu se serait décalé avec le contenu dès que le ticket est long. */
.pj-voile {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: var(--esp-scrim);

  /* Ne JAMAIS intercepter le pointeur : le voile est sous le curseur au moment
     du lâcher, et c'est la zone en dessous qui doit recevoir l'événement. */
  pointer-events: none;
}
.pj-voile span {
  padding: 16px 26px; border-radius: var(--radius);
  border: 2px dashed var(--accent); background: var(--accent-soft);
  color: var(--accent); font: 600 14px var(--font); letter-spacing: .02em;
}

/* --- Mentions dans un commentaire de ticket --- */
.tk-mention { position: relative; }
.tk-puces { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tk-puces:empty { margin-top: 0; }
.tk-puce {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--esp-a300);
  color: var(--accent); font: 600 11.5px var(--font); white-space: nowrap;
} :where(body:not(.espace)) .tk-puce { font-size: 12px; }
/* Sur un commentaire déjà envoyé, la puce n'est qu'une trace : ni bouton, ni
   couleur d'action. */
.tk-puces.lu .tk-puce {
  background: var(--esp-n200); border-color: var(--border); color: var(--muted);
}
.tk-puce-x {
  background: none; border: 0; padding: 0 0 0 2px; cursor: pointer;
  color: inherit; font: 700 14px/1 var(--font); opacity: .7;
}
.tk-puce-x:hover { opacity: 1; }

/* Encart « Raccourcis » (.dash-liens, .lien-*, .liens-*) : retiré le 18/10/2026, bouton « Accès
   rapide » de l'en-tête (public/css/entete.css). */

/* --- Parc : une ligne par boutique, regroupée par client --- */
/* Le TEMPS est toujours celui de la boutique de la ligne : jamais fusionné.
   Les colonnes d'ARGENT, elles, suivent le réglage de facturation du client
   (Client::factureParSite) : « une facture par site » -> un chiffre par ligne ;
   « une facture pour tous les sites » -> cellule fusionnee (rowspan), parce que
   repeter le chiffre ferait compter cinq fois le client qui a cinq boutiques.
   La fusion dit visuellement « ce chiffre vaut pour ce groupe », et la colonne
   reste additionnable dans les deux cas. */
.parc-tbl { width: 100%; }
.parc-tbl td { vertical-align: middle; }
/* Filet entre deux clients : sans lui, un groupe de cinq lignes se confond avec
   cinq clients differents. */
.parc-tbl tbody tr.grp-debut > td { border-top: 1px solid var(--border-lit); }
.parc-tbl tbody tr:first-child > td { border-top: 0; }

/* Cellule fusionnee : fond legerement creuse pour se lire comme un bloc. */
.parc-tbl td.grp { background: var(--esp-n100); }
.parc-tbl td.fort { font-family: var(--font-num); font-size: 14px; color: var(--fg); font-weight: 700; }
.parc-tbl .du { font-family: var(--font-num); color: var(--warn); font-weight: 700; }

.parc-nom { display: inline-flex; align-items: center; gap: 7px; }
.parc-nom:hover { text-decoration: none; }
.parc-nom strong { color: var(--fg); }
.parc-nom:hover strong { color: var(--accent); }
/* ⌖ contextualiser le tableau de bord sur ce projet (28/09/2026) : discret, visible au survol de la ligne. */
.parc-ctx { display: inline; margin: 0 0 0 4px; }
.parc-ctx-btn { background: none; border: 0; padding: 2px; margin: 0; cursor: pointer; color: var(--muted); opacity: .55; vertical-align: middle; line-height: 0; border-radius: 5px; }
.parc-ctx-btn .ic { width: 14px; height: 14px; }
.parc-tbl tr:hover .parc-ctx-btn, .parc-ctx-btn:focus-visible { opacity: 1; }
.parc-ctx-btn:hover { color: var(--accent); background: var(--esp-a100); }
@media (max-width: 767px), (pointer: coarse) { .parc-ctx-btn { padding: 8px; margin: -6px 0 -6px 4px; opacity: .8; } }

/* FO / BO : deux pastilles courtes, lisibles au pouce sur telephone. */
.parc-tbl td.parc-ver { font-family: var(--font-num); white-space: nowrap; }
/* Admin Cockpit en retard sur la dernière version publiée : ROUGE depuis le 29/09/2026
   (vert = dernière version, rouge = toute autre). */
.parc-retard { color: var(--danger); border-bottom: 1px dashed var(--esp-danger); }
@media (hover: hover) { .parc-retard:hover { color: var(--danger); text-decoration: none; border-bottom-style: solid; } }
/* Couleur des versions PrestaShop / PHP / Admin Cockpit (EtatVersions, 29/09/2026) :
   ok = à jour, warn = à surveiller, bad = dépassée ; na = inconnue, sans couleur. */
.parc-v-ok { color: var(--success); }
.parc-v-warn { color: var(--warn); }
.parc-v-bad { color: var(--danger); }
span.parc-v-ok, span.parc-v-warn, span.parc-v-bad { cursor: help; }
/* Liste des clients : version d'Admin Cockpit derrière le nom du site. */
.cl-cockpit { font-family: var(--font-num); font-size: 11px; color: var(--muted); white-space: nowrap; } :where(body:not(.espace)) .cl-cockpit { font-size: 12px; }
/* Module tiers (Security Pro) au parc : une donnée d'abord, aucune couleur au repos
   sauf ce qui demande une action (retard, fichiers seuls). Classe DISTINCTE de
   .parc-retard, que le banc cockpit-version compte pour Admin Cockpit seul. */
.parc-mod { color: inherit; }
.parc-mod:hover { color: var(--accent); text-decoration: none; }
.parc-mod-retard { color: var(--warn); border-bottom: 1px dashed var(--esp-alerte); }
.parc-mod-retard:hover { color: var(--warn); border-bottom-style: solid; }
.parc-mod-warn { color: var(--warn); }
.parc-mod-off, .parc-mod-absent, .parc-mod-inconnu, .parc-mod-grise { color: var(--muted); }
.parc-mod-vieux { font-style: italic; }
/* Écran Clients : Security Pro derrière la version d'Admin Cockpit. */
.cl-secpro { font-family: var(--font-num); font-size: 11px; color: var(--muted); white-space: nowrap; } :where(body:not(.espace)) .cl-secpro { font-size: 12px; }
.cl-secpro-retard, .cl-secpro-warn { color: var(--warn); }
/* PageSpeed au parc (lot A, 26/09/2026) : note Performance mobile · ordinateur,
   mesurée par DELMAK, aux couleurs de Google (90 / 50). Classe parc-psi et JAMAIS
   parc-ver : le banc cockpit-version compte les parc-ver par index. */
.parc-tbl td.parc-psi { white-space: nowrap; font-family: var(--font-num); }
/* Uptime 7 jours (28/09/2026) : pourcentage + mini-courbe, le tout cliquable → fiche. */
.parc-tbl td.parc-uptime { white-space: nowrap; min-width: 118px; }
.parc-uptime-lien { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.parc-uptime-lien:hover { text-decoration: none; }
.parc-uptime-lien b { font-family: var(--font-num); font-size: 12px; min-width: 52px; }
.parc-uptime .spark { width: 64px; min-width: 64px; height: 20px; }
.parc-uptime .spark-bornes { display: none; }
.parc-uptime .spark-vide { font-size: 11px; } :where(body:not(.espace)) .parc-uptime .spark-vide { font-size: 12px; }
.parc-uptime b.ok { color: var(--success); }
.parc-uptime b.warn { color: var(--warn); }
.parc-uptime b.bad { color: var(--danger); }
.parc-uptime b.vide { color: var(--muted); }
/* Dernier audit : date cliquable → aperçu des audits ; rapport non publié en italique. */
.parc-tbl td.parc-audit { white-space: nowrap; font-family: var(--font-num); }
/* Utilisateurs (07/10/2026) : nombre de comptes de l'espace du client, lien vers la fenêtre Utilisateurs.
   Cible tactile pleine cellule ; 0 grisé (rien à gérer, mais on peut créer le premier accès). */
.parc-tbl td.parc-users { text-align: center; font-family: var(--font-num); }
.parc-tbl th.parc-users-th { text-align: center; }
/* « À faire » (tickets), entre Cockpit et PageSpeed depuis le 02/11/2026 : centré comme les utilisateurs, le chiffre ne colle pas à la note PageSpeed. */
.parc-tbl th.parc-faire, .parc-tbl td.parc-faire { text-align: center; }
/* Anneau des états IA autour du chiffre « À faire » (25/11/2026) : parts gris / bleu / rouge / vert posées par le Parc
   (--a1..--a3 en %), couleurs de la pastille IA (pastille-ia.css). Seul le cercle est peint (masque), le chiffre reste
   cliquable au centre. */
.parc-anneau {
  --an-gris: #8c8680; --an-bleu: #1f6fd6; --an-rouge: #d7261b; --an-vert: #168a4a;
  position: relative; display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; border-radius: 50%;
}
html.bo-sombre .parc-anneau { --an-bleu: #4c9dff; --an-rouge: #ff4b33; --an-vert: #3fbf74; }
.parc-anneau::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--an-gris) 0 var(--a1), var(--an-bleu) var(--a1) var(--a2), var(--an-rouge) var(--a2) var(--a3), var(--an-vert) var(--a3) 100%);
  /* Le cercle est découpé par le masque (le thème Viseur force des angles droits : border-radius n'y suffit pas). */
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px), #000 calc(100% - .5px), transparent 100%);
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px), #000 calc(100% - .5px), transparent 100%);
}
.parc-anneau .chiffre-lien, .parc-anneau form { position: relative; z-index: 1; }
.parc-users-th .ic { width: 16px; height: 16px; vertical-align: -3px; }
.parc-users .chiffre-lien { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; }
.parc-users .parc-users-vide { opacity: .45; }
@media (hover: none) { .parc-users .chiffre-lien { min-width: 44px; min-height: 44px; } }
.parc-audit .parc-audit-brouillon { font-style: italic; opacity: .75; }
/* Fraîcheur du dernier audit (03/10/2026) : orange au-delà d'une semaine, rouge au-delà d'un mois.
   Spécificité 0,2,0 : passe devant .chiffre-lien { color: inherit } ; le survol garde l'accent. */
.parc-audit .parc-audit-vert { color: var(--success); }    /* 3 semaines ou moins (19/11/2026) */
.parc-audit .parc-audit-orange { color: var(--orange); }    /* de 22 à 28 jours */
.parc-audit .parc-audit-rouge { color: var(--danger); }     /* plus de 4 semaines */
.parc-audit :is(.parc-audit-vert, .parc-audit-orange, .parc-audit-rouge):hover { color: var(--accent); }
/* Aucun audit (23/10/2026) : « + » discret qui ouvre le volet sur « Nouvel audit » ; cible tactile de 44 px au doigt. */
.parc-audit .parc-audit-ajout { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; color: var(--muted); font-weight: 600; }
.parc-audit .parc-audit-ajout:hover { color: var(--accent); text-decoration: none; }
@media (hover: none) { .parc-audit .parc-audit-ajout { min-width: 44px; min-height: 44px; } }
.psi-ok { color: var(--success); } .psi-warn { color: var(--warn); } .psi-bad { color: var(--danger); }
.psi-na { color: var(--muted); }
.psi-sep { color: var(--muted); }
.psi-delta { font-size: 10.5px; margin-left: 2px; } :where(body:not(.espace)) .psi-delta { font-size: 12px; }
/* Note de plus de 48 h, ou dernière analyse en échec : elle n'est plus celle du jour. */
.psi-perime { opacity: .55; }
/* Spécificité 0,2,0 : .chiffre-lien (plus bas) remet la couleur héritée. */
.parc-psi .psi-vide { color: var(--muted); }
.parc-psi .psi-echec-lien { color: var(--warn); }
.psi-sans-cle { color: var(--warn); }
/* Écran Clients : note mobile derrière Security Pro. */
.cl-psi { font-family: var(--font-num); font-size: 11px; white-space: nowrap; } :where(body:not(.espace)) .cl-psi { font-size: 12px; }
.cl-psi:hover { text-decoration: none; filter: brightness(1.15); }

/* Écran de détail PageSpeed (modale) : cartes empilées, une colonne sur téléphone. */
.psi-detail .psi-appareil h2 { margin-bottom: 10px; }
.psi-detail .psi-cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.psi-detail .psi-cat {
  text-align: center; min-width: 0; padding: 8px 4px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.psi-detail .psi-cat .psi { display: block; font-family: var(--font-num); font-size: 22px; font-weight: 700; line-height: 1.2; }
.psi-detail .psi-cat > span:last-child { display: block; font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; overflow-wrap: anywhere; } :where(body:not(.espace)) .psi-detail .psi-cat > span:last-child { font-size: 12px; }
@media (max-width: 379px) { .psi-detail .psi-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.psi-detail .psi-appareil-note { margin: 10px 0 0; }
.psi-detail .psi-dernier-echec { margin: 8px 0 0; overflow-wrap: anywhere; }
.psi-echec { color: var(--warn); }
.psi-echec code { font-family: var(--font-num); font-size: 11.5px; color: inherit; } :where(body:not(.espace)) .psi-echec code { font-size: 12px; }
.psi-echec-detail { display: block; color: var(--muted); font-size: 12px; }
.psi-detail .psi-tbl td { padding-top: 8px; padding-bottom: 8px; }
/* Une valeur ne se coupe jamais (« 410 / ms » sur deux lignes à 375 px) : le tableau défile. */
.psi-detail .psi-tbl td.num, .psi-detail .psi-tbl td.psi-jour { white-space: nowrap; }
.psi-detail .psi-tbl td.psi-jour { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.psi-detail .psi-statut { white-space: nowrap; }
.psi-detail .psi-statut-ligne { display: block; }
/* Terrain : cinq valeurs depuis le 02/11/2026 (LCP, INP, CLS, FCP, TTFB). La grille suit la largeur de
   la CARTE (modale ou page pleine), pas celle de l'écran : deux colonnes au téléphone, trois, puis
   les cinq sur une ligne dès que chacune a ses 112 px. Jamais quatre : entre 560 et 660 px d'écran,
   « auto-fit » laissait le TTFB seul sur sa ligne (4 + 1) — paliers fixes 2 / 3 / 5 (relecture,
   Franck, 02/11/2026). Un libellé sur deux lignes (« Réponse du serveur (TTFB) » sur iPad) ne décale
   pas sa valeur : le libellé prend la hauteur libre, les valeurs d'une même ligne restent alignées. */
.psi-detail .psi-terrain-carte { container: psi-terrain / inline-size; }
.psi-detail .psi-terrain { display: grid; gap: 12px 10px; margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@container psi-terrain (min-width: 356px) { .psi-detail .psi-terrain { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container psi-terrain (min-width: 600px) { .psi-detail .psi-terrain { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.psi-detail .psi-terrain > div { min-width: 0; display: flex; flex-direction: column; }
.psi-detail .psi-terrain dt { flex: 1 0 auto; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; overflow-wrap: anywhere; } :where(body:not(.espace)) .psi-detail .psi-terrain dt { font-size: 12px; }
.psi-detail .psi-terrain dd { margin: 2px 0 0; font-family: var(--font-num); font-size: 16px; font-weight: 700; white-space: nowrap; }
.psi-detail .psi-terrain dd.psi-terrain-seuil { margin-top: 1px; font-size: 11px; font-weight: 400; color: var(--muted); } :where(body:not(.espace)) .psi-detail .psi-terrain dd.psi-terrain-seuil { font-size: 12px; }
.psi-detail .psi-terrain-note { margin: 12px 0 0; }
.psi-detail .psi-courbe-info { margin: -2px 0 4px; }
.psi-detail .psi-courbe-info .psi-ok, .psi-detail .psi-courbe-info .psi-warn, .psi-detail .psi-courbe-info .psi-bad { font-family: var(--font-num); font-weight: 700; }
/* Une valeur ne se coupe jamais en fin de ligne (« 610 / ms », « 1 / 240 ms » au téléphone, relecture du 02/11/2026). */
.psi-detail .psi-courbe-info > span { white-space: nowrap; }
.psi-detail .psi-courbe-titre { margin: 14px 0 4px; }
.psi-detail .psi-courbe-titre:first-of-type { margin-top: 0; }
.psi-detail .psi-autres-courbes > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--muted); font-size: 12.5px; }
.psi-detail .psi-pistes { list-style: none; margin: 0; padding: 0; }
.psi-detail .psi-pistes li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.psi-detail .psi-pistes li:first-child { border-top: 0; }
.psi-gain { font-family: var(--font-num); color: var(--warn); white-space: nowrap; }
/* Courbes : gabarit de l'espace (espace/_perf_courbe.html.twig), stylé ici sans charger
   espace/performances.css dans l'admin. */
.psi-detail .esp-pf-courbe { display: block; width: 100%; height: 90px; overflow: visible; margin-top: 2px; }
.psi-detail .psi-autres-courbes .esp-pf-courbe { height: 60px; }
.psi-detail .esp-pf-trace { stroke: var(--accent); }
.psi-detail .esp-pf-repere { stroke: var(--border-lit); stroke-width: 1; stroke-dasharray: 3 4; }
.psi-detail .esp-pf-courbe-vide { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.psi-detail .esp-pf-courbe-legende { display: flex; justify-content: space-between; gap: 8px; margin: 4px 0 0; color: var(--muted); font-size: 12px; font-family: var(--font-num); }
/* Étape 2 : « Analyser maintenant », analyse en cours, rapports du jour (PDF, JSON). */
.psi-detail .psi-en-cours { color: var(--accent); font-size: 12.5px; font-weight: 600; }
.psi-detail .psi-rapports { white-space: nowrap; }
.psi-detail .psi-rapports a {
  display: inline-flex; align-items: center; min-height: 30px; padding: 0 8px; margin-right: 4px;
  border: 1px solid var(--border); border-radius: 5px; font-size: 11px; font-weight: 600; letter-spacing: .04em;
} :where(body:not(.espace)) .psi-detail .psi-rapports a { font-size: 12px; }
.psi-detail .psi-rapports a:hover { border-color: var(--accent); text-decoration: none; }
/* Doigt sur téléphone : cible de 44 px. */
@media (pointer: coarse) { .psi-detail .psi-rapports a { min-height: 44px; padding: 0 12px; } }
.psi-detail .psi-archive { display: block; margin-top: 4px; font-family: var(--font-num); }

/* PageSpeed sur TROIS pages (17/10/2026) : une carte par page (accueil, catégorie, produit), sur la
   fiche du site et en tête de l'écran de détail. Mobile d'abord : empilées, l'URL coupée à la
   largeur ; trois colonnes à partir de 900 px. Les onglets de l'écran de détail suivent. */
.psi-pages-tete { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.psi-pages-tete h2 { margin: 0; flex: 1 1 auto; min-width: 0; }
.psi-pages-intro { margin: 4px 0 12px; }
.psi-pages-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .psi-pages-liste { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.psi-page {
  min-width: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.psi-page-courante { border-color: var(--accent); }
.psi-page-nom { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.psi-page-voir { font-size: 12px; white-space: nowrap; }
.psi-page-url { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-num); font-size: 11.5px; } :where(body:not(.espace)) .psi-page-url { font-size: 12px; }
.psi-page-notes { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.psi-page-notes .psi { font-family: var(--font-num); font-size: 18px; font-weight: 700; margin-left: 4px; color: inherit; }
.psi-page-notes .psi.psi-ok { color: var(--success); } .psi-page-notes .psi.psi-warn { color: var(--warn); } .psi-page-notes .psi.psi-bad { color: var(--danger); } .psi-page-notes .psi.psi-na { color: var(--muted); }
.psi-page-cwv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; }
.psi-page-cwv > div { min-width: 0; }
.psi-page-cwv dt { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; } :where(body:not(.espace)) .psi-page-cwv dt { font-size: 12px; }
.psi-page-cwv dd { margin: 1px 0 0; font-family: var(--font-num); font-size: 13px; font-weight: 700; white-space: nowrap; }
.psi-page-pied, .psi-page-raison, .psi-page-liens { margin: 0; overflow-wrap: anywhere; }
.psi-page-raison { color: var(--warn); }
.psi-page-liens { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.psi-page-liens a { display: inline-flex; align-items: center; min-height: 28px; }
@media (pointer: coarse) { .psi-page-liens a { min-height: 44px; } }
.psi-pages-form { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.psi-pages-form h3 { margin: 0 0 4px; }
.psi-pages-saisie { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .psi-pages-saisie { grid-template-columns: repeat(2, minmax(0, 1fr)); } .psi-pages-saisie .help, .psi-pages-saisie .psi-pages-boutons { grid-column: 1 / -1; } }
.psi-pages-saisie .field { margin: 0; min-width: 0; }
.psi-pages-saisie input { width: 100%; min-width: 0; }
.psi-pages-boutons { display: flex; flex-wrap: wrap; gap: 8px; }
.psi-pages-decouvrir { margin: 0; }
.psi-pages-corriger { margin: 10px 0 0; }
.psi-onglets { display: flex; gap: 6px; margin: 0 0 14px; overflow-x: auto; }
.psi-onglet {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; white-space: nowrap;
  border: 1px solid var(--border); border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.psi-onglet:hover { text-decoration: none; border-color: var(--border-lit); color: var(--fg); }
.psi-onglet.actif { border-color: var(--accent); color: var(--accent); }
@media (pointer: coarse) { .psi-onglet { min-height: 44px; } }

.parc-liens { white-space: nowrap; }
.parc-liens a {
  display: inline-block; min-width: 30px; text-align: center;
  padding: 3px 7px; margin-right: 4px; border-radius: 5px;
  border: 1px solid var(--border); background: var(--esp-n100);
  font: 600 10.5px var(--font); letter-spacing: .06em; color: var(--muted);
} :where(body:not(.espace)) .parc-liens a { font-size: 12px; }
.parc-liens a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
/* Back-office non renseigné : le lien mène à la fiche pour le poser. En pointillé,
   parce que ce n'est pas un accès mais une chose à faire (reprise de l'ancien
   encart « Clients », retiré du tableau de bord le 22/09/2026). */
.parc-liens a.parc-bo-vide { border-style: dashed; opacity: .75; }

/* Mention du MODE DE FACTURATION, sous le nom du client. Discrète — c'est elle qui
   explique pourquoi les colonnes d'argent sont fusionnées, ou ne le sont pas. */
.grp-mode {
  display: block; margin-top: 2px;
  font-size: 9.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted);
} :where(body:not(.espace)) .grp-mode { font-size: 12px; }
.grp-mode.par-site { color: var(--accent-2); }

/* Ligne « sans boutique » d'un groupe : du temps ou une facture qu'aucune boutique
   ne revendique. Elle doit se lire comme une RÉSERVE, pas comme une boutique de
   plus — mais surtout pas disparaître : c'est de l'argent. */
.parc-tbl tr.parc-sans-site > td { background: var(--esp-alerte-fond); }
.parc-orphelin { font-style: italic; }

/* Ligne de totaux : c'est la lecture de pilotage, elle doit trancher. */
.parc-tbl tfoot td {
  border-top: 2px solid var(--border-lit);
  font-family: var(--font-num); font-size: 12.5px; font-weight: 700; color: var(--fg);
  padding-top: 10px;
}
.parc-tbl tfoot td:first-child {
  font-family: var(--font); font-weight: 600; font-size: 10.5px;
  letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
} :where(body:not(.espace)) .parc-tbl tfoot td:first-child { font-size: 12px; }

/* Chiffre cliquable dans le parc (impayé, tickets à faire) : il doit se lire
   comme une donnée, pas comme un lien — pas de cyan ni de soulignement au repos,
   la couleur du chiffre est déjà porteuse de sens. L'affordance vient du survol
   et du focus clavier. */
.chiffre-lien { display: inline-block; color: inherit; }
.chiffre-lien:hover { text-decoration: none; }
.chiffre-lien:hover .du,
.chiffre-lien:hover { color: var(--accent); }
.chiffre-lien .small { display: block; }
.chiffre-lien:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* --- Pagination --- */
.pager { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.pager-etat { font-size: 11.5px; color: var(--muted); } :where(body:not(.espace)) .pager-etat { font-size: 12px; }
/* Un bouton « désactivé » est ici un <span> : il ne doit ni être cliquable ni
   passer au clavier, mais garder l'encombrement du lien qu'il remplace. */
.pager [aria-disabled="true"] { opacity: .4; cursor: default; pointer-events: none; }

/* --- Sélecteur de statut d'une facture (modale) --- */
/* Trois états côte à côte, l'actuel en relief : on voit d'un coup OÙ l'on est et
   VERS QUOI on peut aller, dans les deux sens. Un enchaînement de boutons
   « Marquer envoyée » puis « Marquer payée » laissait croire à un parcours
   obligatoire et interdisait brouillon → payée. */
.inv-statut { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inv-statut-label {
  font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted);
} :where(body:not(.espace)) .inv-statut-label { font-size: 12px; }
.segmented {
  display: inline-flex; align-items: stretch;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  background: var(--bg-2);
}
/* Les formulaires ne doivent pas casser l'alignement du groupe. */
.segmented form { display: flex; margin: 0; }
.seg {
  display: inline-flex; align-items: center; white-space: nowrap;
  padding: 6px 13px; border: 0; background: none; cursor: pointer;
  color: var(--muted); font: 500 12px var(--font);
  border-right: 1px solid var(--border);
}
.segmented > *:last-child .seg,
.segmented > .seg:last-child { border-right: 0; }
.seg:hover { color: var(--fg); background: var(--esp-n200); }
/* L'état courant n'est pas cliquable : c'est un repère, pas une action. */
.seg.on { cursor: default; color: var(--fg); background: var(--esp-n200); font-weight: 600; }
.seg.on.accent { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.seg.on.ok { color: var(--success); box-shadow: inset 0 -2px 0 var(--success); }
.seg.on:not(.accent):not(.ok) { box-shadow: inset 0 -2px 0 var(--muted); }

/* --- Mémo : grande modale (⌘M), éditeur mis en forme --- */
/* Il était un encart du tableau de bord jusqu'au 24/09/2026 : trop étroit pour
   écrire, absent des autres écrans. C'est désormais une <dialog> ouverte par
   showModal() — templates/_memo.html.twig. */

/* Contenu réservé aux lecteurs d'écran (utilitaire absent de cette feuille). */
.kl-sr {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* La boîte : large et haute — on y écrit, on n'y jette pas un œil. Même habit que
   les modales du hub (.mdl-box). `dvh` = hauteur visible réelle (barres mobiles). */
.memo-dlg {
  width: min(980px, calc(100vw - 48px));
  height: min(840px, calc(100vh - 64px));
  height: min(840px, calc(100dvh - 64px));
  max-width: none; max-height: none;
  margin: auto; padding: 0;
  color: var(--fg);
  background: var(--esp-panel);
  border: 1px solid var(--esp-divider); border-top: 2px solid var(--esp-ink); border-radius: 0;
  box-shadow: var(--esp-shadow-xl);
  overflow: hidden; overscroll-behavior: contain;
}
/* `:not([open])` n'a pas besoin de règle : une <dialog> fermée est display:none. */
.memo-dlg[open] { display: flex; flex-direction: column; }
.memo-dlg::backdrop { background: var(--esp-scrim); }
/* La page dessous ne défile plus pendant l'écriture. */
html.memo-ouverte, html.memo-ouverte body { overflow: hidden; }

.memo-tete { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.memo-titre { margin: 0; font-family: var(--font-brand); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; }
.memo-titre::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 10px; vertical-align: 0; background: var(--esp-accent); }
.memo-fermer {
  width: 44px; height: 44px; flex: none; border-radius: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--esp-n400); color: var(--esp-ink);
  font-size: 19px; line-height: 1;
}
.memo-fermer:hover { border-color: var(--esp-ink); background: var(--esp-n200); }
.memo-fermer:active { background: var(--esp-n300); }

/* Largeur réservée une fois pour toutes : le libellé passe de « Modifié… » à
   « Enregistré 14:32 » sans pousser le titre. */
.memo-etat {
  margin-left: auto; flex: 0 0 auto;
  min-width: 15ch; text-align: right; white-space: nowrap;
  font-family: var(--font-num); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--dim); font-variant-numeric: tabular-nums;   /* l'horodatage ne frémit pas */
  transition: color .2s ease;
} :where(body:not(.espace)) .memo-etat { font-size: 12px; }
.memo-etat[data-etat="envoi"] { color: var(--accent); }
.memo-etat[data-etat="ok"] { color: var(--success); }
.memo-etat[data-etat="echec"],
.memo-etat[data-etat="session"] { color: var(--danger); }
.memo-etat[data-etat="hors"],
.memo-etat[data-etat="conflit"],
.memo-etat[data-etat="long"] { color: var(--warn); }

/* Barre d'outils : huit boutons, rien d'autre. Elle défile sous le doigt plutôt que
   de passer sur deux lignes sur un petit écran. */
.memo-outils {
  flex: none; display: flex; align-items: center; gap: 3px;
  padding: 7px 12px; border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.memo-outils::-webkit-scrollbar { display: none; }
.memo-bt {
  width: 34px; height: 32px; flex: none; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px; border: 1px solid transparent; background: none;
  color: var(--muted); cursor: pointer; font: 600 14px/1 var(--font);
  transition: color .12s ease, background-color .12s ease;
}
.memo-bt:hover { color: var(--fg); background: var(--esp-n200); }
.memo-bt[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); border-color: var(--esp-a300); }
.memo-bt:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.memo-bt b { font-weight: 800; }
.memo-bt i { font-family: Georgia, 'Times New Roman', serif; font-size: 16px; font-weight: 400; }
.memo-bt s { font-weight: 500; }
.memo-bt-h { font-family: var(--font-brand); font-weight: 700; font-size: 15px; }
.memo-bt svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.memo-bt svg circle, .memo-bt svg text { fill: currentColor; stroke: none; }
.memo-bt svg text { font: 700 6.5px var(--font-num); }
.memo-sep { flex: none; width: 1px; height: 18px; margin: 0 6px; background: var(--border-lit); }

/* Ligne de saisie du lien. `:not([hidden])` OBLIGATOIRE : un display:flex nu
   l'emporterait sur l'attribut hidden. */
.memo-lien:not([hidden]) {
  flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--esp-n100);
}
.memo-lien input { flex: 1 1 240px; min-width: 0; font-size: 16px; }   /* 16 px : pas de zoom iOS */
.memo-lien input.invalide { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }

/* Messages et arbitrages. Même règle `:not([hidden])` que ci-dessus. */
.memo-alerte:not([hidden]) {
  flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 10px 14px 0; padding: 8px 10px;
  border: 1px solid var(--esp-alerte); border-radius: var(--radius-sm);
  background: var(--esp-alerte-fond); color: var(--warn); font-size: 12px;
}

/* La page d'écriture : elle seule défile. Colonne de lecture centrée, ~75 signes. */
.memo-zone { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; cursor: text; }
.memo-ed {
  position: relative; box-sizing: border-box;
  min-height: 100%; max-width: 760px; margin: 0 auto;
  padding: 22px clamp(16px, 5vw, 48px) 48px;
  outline: none;
  /* 16 px À TOUTES LES LARGEURS : en dessous, iOS Safari zoome à la mise au point. */
  font: 400 16px/1.6 var(--font); color: var(--fg);
  overflow-wrap: anywhere;
  caret-color: var(--accent);
}
.memo-ed.vide::before { content: attr(data-placeholder); position: absolute; color: var(--dim); pointer-events: none; }
.memo-ed > :first-child { margin-top: 0; }
.memo-ed h3 { margin: 20px 0 6px; font: 600 18px/1.35 var(--font-brand); letter-spacing: .01em; text-transform: none; color: var(--esp-ink); }
.memo-ed p { margin: 0 0 8px; }
.memo-ed ul, .memo-ed ol { margin: 4px 0 8px; padding-left: 24px; }
.memo-ed li { margin: 2px 0; padding-left: 2px; }
.memo-ed li::marker { color: var(--accent); }
.memo-ed b, .memo-ed strong { font-weight: 700; color: var(--esp-ink); }
.memo-ed s, .memo-ed strike, .memo-ed del { color: var(--muted); }
.memo-ed a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--esp-a300); text-underline-offset: 2px; }
.memo-ed blockquote { margin: 8px 0; padding-left: 12px; border-left: 2px solid var(--border-lit); color: var(--muted); }

/* Liste à cocher (27/09/2026) : <ul class="kl-todo">, élément coché <li data-fait="1">.
   La case est DESSINÉE (::before, et la coche en ::after) : aucun <input>, que
   MemoHtml jetterait et qui casse la sélection d'un contenteditable. La colonne de
   gauche (padding-left) est la zone cliquable, repérée au clic par le script : on
   règle sa largeur ici, le script la relit. Un ::before en position absolue n'est
   pas barré avec le texte. `content: … / …` : ce que lit un lecteur d'écran — sur un
   contenu NON vide, sinon Chrome ignore le pseudo-élément, texte de remplacement
   compris ; le glyphe ☐ / ☑ est éteint par font-size: 0 (la boîte garde sa taille). */
.memo-ed ul.kl-todo { list-style: none; padding-left: 0; }
.memo-ed ul.kl-todo > li { position: relative; margin: 3px 0; padding-left: 30px; }
.memo-ed ul.kl-todo > li::before {
  content: '\2610'; content: '\2610' / 'À faire, ';
  font-size: 0;
  position: absolute; left: 5px; top: 4px;
  width: 17px; height: 17px; box-sizing: border-box;
  border: 1.5px solid var(--muted); border-radius: 5px;
  background: var(--esp-n100);
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease;
}
.memo-ed ul.kl-todo > li:hover::before { border-color: var(--accent); }
.memo-ed ul.kl-todo > li[data-fait="1"]::before { content: '\2611'; content: '\2611' / 'Fait, '; background: var(--accent); border-color: var(--accent); }
.memo-ed ul.kl-todo > li[data-fait="1"]::after {
  content: ''; position: absolute; left: 11px; top: 7px;
  width: 5px; height: 9px; box-sizing: border-box;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg); pointer-events: none;
}
.memo-ed ul.kl-todo > li[data-fait="1"] { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--esp-n500); }
.memo-ed ul.kl-todo > li[data-fait="1"] :is(b, strong, a) { color: inherit; }

/* Téléphone : plein écran, et de la marge sous le texte pour que la dernière ligne
   ne reste pas cachée derrière le clavier. */
@media (max-width: 899px) {
  .memo-dlg { width: 100vw; height: 100vh; height: 100dvh; border: 0; border-radius: 0; }
  .memo-ed { padding: 16px 16px 40vh; }
}

/* Au doigt : cibles de 44 px. La barre tient alors sans défiler dès 372 px (huit
   boutons collés, séparateurs resserrés) ; une rangée de liste à cocher fait 44 px
   de haut et sa case, 44 px de large. */
@media (max-width: 767px), (pointer: coarse) {
  .memo-outils { gap: 0; padding: 0 4px; }
  .memo-bt { width: 44px; height: 44px; }
  .memo-sep { margin: 0 2px; }
  .memo-fermer { width: 44px; height: 44px; }
  .memo-lien .btn, .memo-lien input, .memo-alerte .btn { min-height: 44px; }
  .memo-ed ul.kl-todo > li { box-sizing: border-box; min-height: 44px; margin: 0; padding: 9px 0 9px 44px; }
  .memo-ed ul.kl-todo > li::before { left: 12px; top: 12px; width: 20px; height: 20px; border-radius: 6px; }
  .memo-ed ul.kl-todo > li[data-fait="1"]::after { left: 19px; top: 15px; width: 6px; height: 11px; }
}

/* ============ Météo : bandeau 15 jours + détail horaire ============ */
/*
  RÈGLE QUI DÉBLOQUE TOUT LE RESTE, et la seule mesurée deux fois de façon
  indépendante : sans elle, à 375 px la carte météo fait 1052 px de large,
  document.scrollWidth monte à ~1074 pour un écran de 375, la piste ne défile
  JAMAIS (clientWidth == scrollWidth) et c'est toute la page du dashboard qui part
  en travers — l'encart voisin compris. Cause : .dash-weather est un item de
  grille, donc min-width:auto = taille min-content, et la min-content de la piste
  vaut les quinze colonnes côte à côte ; la contrainte traverse le conteneur à
  défilement et élargit la piste de grille. Le défaut PRÉEXISTE à ce lot (l'ancien
  bandeau de chips produisait déjà ~1094 px), mais tout le dispositif mobile
  d'ici en dépend.
  Mettre min-width:0 sur .mto ou sur .mto-scroll ne change RIEN : la contrainte
  doit être coupée au niveau de l'item de grille. Généralisée le 24/09/2026 :
  `.dash > .card { min-width: 0 }` (grille des encarts), pour tous les encarts.
*/

.mto {
    /* Largeur PLANCHER d'une colonne : en dessous, la piste défile au lieu de
       compresser les étiquettes. --n (nombre de jours) est posé par le gabarit. */
    --mto-col: 42px;
    /* Hauteur de la zone de courbe. */
    --mto-h: 92px;
}

/* 375 px : quinze colonnes lisibles réclament ~630 px. On ne tronque pas les
   étiquettes, on ne les incline pas et on ne les empile pas (illisible au doigt) :
   la piste défile horizontalement — geste déjà en place sur l'ancien bandeau — et
   comme la prévision commence TOUJOURS par aujourd'hui, rien d'important n'est
   caché au premier coup d'œil.
   Le rembourrage vertical n'est pas décoratif : overflow-x:auto force overflow-y à
   « auto » quoi qu'on déclare, donc tout ce qui dépasse du bord haut d'une colonne
   est rogné. 5 px laissent passer l'anneau de focus et le halo d'aujourd'hui. */
.mto-scroll {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 4px;
    padding: 5px 4px 8px;
    margin: -5px -4px 0;
    -webkit-overflow-scrolling: touch;
}

/* La piste fait au moins toute la largeur disponible, et au moins la largeur
   plancher des quinze colonnes : c'est ce `max()` qui décide « ça rentre » ou
   « ça défile », une seule fois, pour toutes les rangées. */
.mto-track {
    position: relative;
    min-width: max(100%, calc(var(--n) * var(--mto-col)));
}

/* Une rangée = une ligne de colonnes égales. En flex plutôt qu'en grid : pas de
   var() dans un repeat(), donc aucune déclaration invalide possible. */
.mto-row {
    display: flex;
    align-items: flex-end;
    /* Les rangées ne reçoivent aucun pointeur : c'est la couche de liens, au-dessus,
       qui capte le survol et le clic sur TOUTE la hauteur de la colonne. */
    pointer-events: none;
}
.mto-cell { flex: 1 1 0; min-width: 0; text-align: center; }

/* --- Rangée 1 : jour + numéro --- */
/* Le rembourrage HAUT sépare l'étiquette du bord de la carte : collée dessus, la
   frise donnait l'impression de déborder. Il est posé ici et non sur .mto-scroll,
   dont le padding compense le rognage du dépassement (anneau de focus, halo
   d'aujourd'hui) et n'est donc pas un réglage d'espacement. */
.mto-heads { padding-top: 10px; padding-bottom: 3px; }
.mto-dow { display: block; font-size: 9.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); } :where(body:not(.espace)) .mto-dow { font-size: 12px; }
.mto-dnum { display: block; font-family: var(--font-num); font-size: 12.5px; font-weight: 700; line-height: 1.25; color: var(--dim); }
.mto-head.is-auj .mto-dow,
.mto-head.is-auj .mto-dnum { color: var(--accent); }

/* --- Rangée 2 : icône --- */
.mto-icos { margin-bottom: 2px; }
.mto-ico { font-size: 22px; line-height: 1.2; }

/* --- Rangées 3 et 5 : les chiffres --- */
.mto-tmax .mto-cell { font-family: var(--font-num); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; }
.mto-tmin .mto-cell { font-family: var(--font-num); font-size: 11.5px; font-variant-numeric: tabular-nums; line-height: 1.4; padding-top: 2px; color: var(--muted); } :where(body:not(.espace)) .mto-tmin .mto-cell { font-size: 12px; }
.mto-tmax .mto-cell.is-auj,
.mto-tmin .mto-cell.is-auj { color: var(--accent); }
.mto-nodata { flex: 1 1 100%; text-align: left; font-size: 12px; color: var(--muted); }

/* --- Rangée 4 : le graphique --- */
.mto-plot { position: relative; height: var(--mto-h); }
.mto-svg { display: block; width: 100%; height: 100%; }

/* Aire min→max : dégradé volontairement très faible. Sa couleur ne veut RIEN dire
   (ce n'est pas une échelle de chaleur) : elle donne l'amplitude. */
.mto-g1 { stop-color: var(--accent); stop-opacity: .22; }
.mto-g2 { stop-color: var(--accent-2); stop-opacity: .06; }

/* Bâtonnet vertical du jour : amplitude d'une seule journée, lisible même isolée. */
.mto-tige { fill: none; stroke: var(--esp-n200); stroke-width: 6; stroke-linecap: round; }
/* La teinte ne sert qu'à deux seuils qui se DÉCIDENT : le gel et la forte chaleur.
   Un dégradé arc-en-ciel sur quinze jours serait du bruit. */
.mto-t-gel { stroke: var(--esp-a300); }
.mto-t-chaud { stroke: var(--esp-alerte-fond); }
.mto-t-halo { stroke: var(--esp-a200); stroke-width: 16; }
.mto-t-auj { stroke: var(--esp-accent); }
.mto-aujguide { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 5; opacity: .28; }

.mto-courbe { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mto-c-max { stroke: var(--fg); stroke-width: 1.7; }
.mto-c-min { stroke: var(--accent); stroke-width: 1.4; opacity: .75; }
.mto-pts { fill: none; stroke: var(--fg); stroke-width: 3.4; stroke-linecap: round; }

.mto-gelzone { fill: var(--esp-a100); }
.mto-zeroline { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 4; opacity: .45; }
/* Collée au bord DROIT : à gauche, son fond opaque découpait un carré dans le halo
   cyan de la colonne d'aujourd'hui, qui est toujours la première. */
.mto-zerolab {
    position: absolute; right: 0; transform: translateY(-50%);
    padding: 0 3px; border-radius: 3px;
    background: var(--card);
    font-family: var(--font-num); font-size: 9.5px; color: var(--accent); opacity: .85;
    pointer-events: none;
} :where(body:not(.espace)) .mto-zerolab { font-size: 12px; }

/* --- Rangée 6 : la pluie --- */
.mto-rains { margin-top: 7px; }
.mto-eau { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mto-eau-piste {
    display: flex; align-items: flex-end; justify-content: center;
    width: 58%; max-width: 22px; height: 24px;
    border-radius: 3px 3px 0 0;
    /* Pas de cadre : quinze cases vides sur une quinzaine sèche font du bruit.
       Une simple ligne de sol suffit à donner l'appui des barres. */
    background: var(--esp-n100);
    box-shadow: 0 1px 0 var(--border);
}
.mto-eau-barre { display: block; width: 100%; min-height: 2px; border-radius: 3px; background: var(--esp-a300); }
.mto-eau-barre.moyen { background: var(--esp-accent); }
.mto-eau-barre.fort { background: var(--accent); box-shadow: none; }
.mto-eau-val { display: block; min-height: 13px; font-family: var(--font-num); font-size: 9.5px; font-weight: 600; color: var(--muted); } :where(body:not(.espace)) .mto-eau-val { font-size: 12px; }
.mto-eau-val.fort { color: var(--accent); }

/* --- Rangée 7 : le vent, seulement s'il y a du vent --- */
.mto-vents .mto-cell { min-height: 14px; font-family: var(--font-num); font-size: 9.5px; font-weight: 600; color: var(--warn); } :where(body:not(.espace)) .mto-vents .mto-cell { font-size: 12px; }

/* --- Couche de visée : un lien par jour, pleine hauteur --- */
.mto-hits { position: absolute; inset: 0; display: flex; }
.mto-hit {
    flex: 1 1 0; min-width: 0;
    position: relative; display: block;
    border-radius: var(--radius-sm);
    scroll-snap-align: center;
    /* Les liens sont VIDES : rien n'hérite du cyan de `a` (app.css l. 61). On
       neutralise quand même couleur et soulignement, patron déjà suivi par
       .site-card, .parc-nom, .pal-item, .top-new. */
    color: inherit; text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background .12s ease, box-shadow .12s ease;
}
.mto-hit:hover, .mto-hit:focus { text-decoration: none; }
/* La couche de liens est posée PAR-DESSUS les rangées : ses fonds (week-end, aujourd'hui, survol) sont opaques
   dans la DA Viseur ; « multiplier » les teinte sans cacher le jour, la courbe ni les chiffres (11/11/2026). */
/* Plus de « multiplier » (11/11/2026 : un mélange isole le bloc et refait un calque de page entier sur iPad) : les fonds
   du BO sont des teintes TRANSPARENTES, qui laissent voir le jour, la courbe et les chiffres. */
body:not(.espace) .mto-hit.is-we { background: rgba(155, 151, 151, .10); }
body:not(.espace) .mto-hit.is-auj { background: rgba(255, 86, 60, .08); }
/* Samedi et dimanche en très léger retrait : organiser une semaine de boutique
   demande de savoir où tombe le week-end. */
.mto-hit.is-we { background: var(--esp-n100); }
.mto-hit.is-auj { background: var(--esp-a100); }
.mto-hit.is-auj::before {
    content: '';
    position: absolute; left: 22%; right: 22%; top: 0; height: 2px;
    border-radius: 0 0 2px 2px;
    background: var(--accent);
    box-shadow: none;
}
.mto-hit:hover { background: var(--esp-a100); }
.mto-hit.is-auj:hover { background: var(--esp-a200); }
/* Focus : box-shadow INSET et pas outline. Un outline se peint à l'extérieur de
   la boîte et serait rogné par le conteneur à défilement ; un inset, jamais.
   Le survol LAVE la colonne, le focus l'ENCADRE : les deux états restent
   distinguables côte à côte. */
.mto-hit:focus-visible {
    outline: none;
    background: var(--esp-a200);
    box-shadow: inset 0 0 0 2px var(--accent);
}

/* --- En-tête de l'encart --- */
.mto-bar { margin-bottom: 10px; gap: 10px; flex-wrap: wrap; }
.mto-meta { display: flex; align-items: baseline; gap: 10px; margin-left: auto; }
.mto-ech { font-family: var(--font-num); font-size: 10.5px; color: var(--muted); white-space: nowrap; } :where(body:not(.espace)) .mto-ech { font-size: 12px; }
.mto-leg { display: none; }
@media (min-width: 680px) {
    .mto-leg { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--muted); white-space: nowrap; } :where(body:not(.espace)) .mto-leg { font-size: 12px; }
}
/* Sous 680 px, « 15 jours » est redondant avec les quinze colonnes et le texte
   d'aide : on le retire plutôt que de faire passer la barre sur trois lignes. */
@media (max-width: 679px) { .mto-compte { display: none; } }
.mto-lg { display: inline-block; width: 12px; height: 0; border-top: 2px solid; border-radius: 2px; }
.mto-lg-max { color: var(--fg); }
.mto-lg-min { color: var(--accent); }
.mto-lg-eau { width: 5px; height: 9px; border: 0; border-radius: 2px; background: var(--esp-accent); }
.mto-help { margin-top: 10px; }

/* L'espace gagné sur grand écran sert à RESPIRER, pas à étirer : la zone de
   courbe grandit, les traits s'épaississent, les chiffres restent des chiffres. */
@media (min-width: 900px) {
    .mto { --mto-col: 46px; --mto-h: 118px; }
    .mto-ico { font-size: 25px; }
}
@media (min-width: 1400px) {
    .mto { --mto-h: 150px; }
    .mto-tige { stroke-width: 9; }
    .mto-t-halo { stroke-width: 22; }
    .mto-ico { font-size: 28px; }
    .mto-tmax .mto-cell { font-size: 14.5px; }
    .mto-tmin .mto-cell { font-size: 12.5px; }
    .mto-eau-piste { height: 30px; max-width: 26px; }
    .mto-eau-val, .mto-vents .mto-cell { font-size: 10.5px; } :where(body:not(.espace)) .mto-eau-val, :where(body:not(.espace)) .mto-vents .mto-cell { font-size: 12px; }
}

/* ============ Météo : détail d'une journée (fragment de modale) ============ */
/*
  container-type sur le panneau : la densité des étiquettes doit dépendre de la
  largeur du PANNEAU, pas de celle de l'écran. Le fragment vit dans une modale
  (max-width 1120 px, plein écran sous 700 px) : une media query piloterait une
  grandeur qu'elle ne mesure pas.
*/
.mtj { container-type: inline-size; }

.mtj-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.mtj-ico { font-size: 26px; line-height: 1; flex: none; }
.mtj-titre { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
/* ::first-letter et NON text-transform:capitalize : en français seule la première
   lettre prend la majuscule (« Jeudi 12 septembre », pas « Jeudi 12 Septembre »).
   Les enfants d'un conteneur flex sont blockifiés, la pseudo-classe s'applique. */
.mtj-titre strong::first-letter { text-transform: uppercase; }
.mtj-titre strong { font-size: 14px; }
.mtj-sub { font-size: 11px; color: var(--muted); font-family: var(--font-num); } :where(body:not(.espace)) .mtj-sub { font-size: 12px; }
.mtj-step {
    flex: none;
    /* 44 px : la règle de cible tactile du projet. */
    min-width: 44px; min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-lit); border-radius: var(--radius-sm);
    background: var(--esp-n100); color: var(--fg);
    font-size: 18px; line-height: 1; text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.mtj-step:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.mtj-step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Bord de fenêtre : un <span>, pas un lien désactivé — aucun lien mort. */
.mtj-off { opacity: .3; }
/* Sous 520 px, deux cibles de 44 px et « jeudi 12 septembre » ne tiennent pas sur
   une ligne : le titre prend sa propre rangée plutôt que d'être tronqué. */
@container (max-width: 519px) {
    .mtj-head { flex-wrap: wrap; }
    .mtj-titre { order: -1; flex: 1 1 100%; }
}

/* Rangées d'étiquettes : MÊME découpe en colonnes que le SVG. L'alignement est
   structurel, il ne peut pas dériver. */
.mtj-row { display: flex; }
.mtj-cell {
    flex: 1 1 0; min-width: 0; text-align: center;
    font-family: var(--font-num); font-size: 9.5px; color: var(--dim);
    /* overflow visible : sur un panneau étroit le texte fait 11 px pour une cellule
       de 14 — les voisines étant invisibles, le débord ne gêne personne. */
    overflow: visible; white-space: nowrap;
} :where(body:not(.espace)) .mtj-cell { font-size: 12px; }
/* visibility et JAMAIS display:none : display retirerait la cellule de la rangée
   et auto-placerait les survivantes dans les premières colonnes — l'axe mentirait
   de plus de 100 px, faisant lire « il pleut à 21 h » sur les barres de 9 h. */
.mtj-row .j1 { visibility: hidden; }
@container (min-width: 620px) { .mtj-row .j1 { visibility: visible; } }
.mtj-temps .mtj-cell { font-size: 11px; font-weight: 700; color: var(--fg); padding-bottom: 2px; } :where(body:not(.espace)) .mtj-temps .mtj-cell { font-size: 12px; }
.mtj-axe { margin-top: 5px; }
.mtj-axe .j3 { color: var(--muted); font-weight: 600; }

/* Le tracé. Hauteur FIXE et égale à la hauteur du viewBox : 1 unité = 1 px en
   vertical, donc les étiquettes posées en pixels retombent pile sur les traits. */
.mtj-plot { position: relative; height: 174px; }
.mtj-svg { display: block; width: 100%; height: 174px; }

.mtj-g0 { stop-color: var(--warn); stop-opacity: .30; }
.mtj-g1 { stop-color: var(--warn); stop-opacity: 0; }
.mtj-aire { stroke: none; }
.mtj-ligne { fill: none; stroke: var(--warn); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mtj-nuit { fill: var(--esp-n100); }
.mtj-gelzone { fill: var(--esp-a100); }
.mtj-zero { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 3; opacity: .55; }
.mtj-nuagebox { fill: none; stroke: var(--border); stroke-width: 1; }
.mtj-nuage { fill: var(--fg); }
.mtj-barre { fill: var(--accent); }
.mtj-coiffe { fill: var(--esp-n500); }
/* Probabilité inconnue (queue de fenêtre) : ni barre, ni « 0 % ». */
.mtj-inc { fill: var(--esp-n200); }
.mtj-sol { fill: none; stroke: var(--border-lit); stroke-width: 1; }
.mtj-moitie { fill: none; stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.mtj-voile { fill: var(--bg); opacity: .5; }
.mtj-now { fill: none; stroke: var(--accent); stroke-width: 1.5; }

.mtj-lab {
    position: absolute; transform: translateY(-50%); pointer-events: none;
    font-family: var(--font-num); font-size: 9px; color: var(--dim);
    background: none;
    /* Pas de fond opaque : un liseré suffit, et rien ne découpe le dessin. */
    text-shadow: 0 0 4px var(--card), 0 0 4px var(--card);
} :where(body:not(.espace)) .mtj-lab { font-size: 12px; text-shadow: none; background: var(--esp-panel); padding: 0 3px; }
.mtj-lab-zero { right: 0; color: var(--accent); }
.mtj-lab-50 { left: 0; }

.mtj-leg { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 0; font-size: 10.5px; color: var(--muted); } :where(body:not(.espace)) .mtj-leg { font-size: 12px; }
.mtj-leg span { display: inline-flex; align-items: center; gap: 6px; }
.mtj-leg i { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.mtj-leg .sw-t { background: var(--warn); }
.mtj-leg .sw-n { height: 9px; background: linear-gradient(90deg, var(--esp-n200), var(--fg)); }
.mtj-leg .sw-p { height: 9px; background: var(--accent); }
.mtj-leg .sw-m { height: 9px; background: linear-gradient(180deg, var(--esp-n500) 0 34%, var(--accent) 34% 100%); }
.mtj-leg .sw-v { height: 9px; background: var(--esp-n700); }
@container (min-width: 620px) { .mtj-leg { flex-direction: row; flex-wrap: wrap; gap: 6px 14px; } }

.mtj-tab { margin-top: 12px; }
.mtj-tab summary { cursor: pointer; color: var(--muted); font-size: 11.5px; } :where(body:not(.espace)) .mtj-tab summary { font-size: 12px; }
.mtj-tab summary:hover { color: var(--accent); }
.mtj-tab .table-wrap { margin-top: 8px; }
.mtj-tab td, .mtj-tab th { font-size: 11.5px; } :where(body:not(.espace)) .mtj-tab td, :where(body:not(.espace)) .mtj-tab th { font-size: 12px; }
.mtj-passe { opacity: .5; }

/* --- Modale (rendez-vous) --- */
/* display:flex l'emporterait sur la règle par défaut de [hidden] : on la rétablit. */
.modal[hidden] { display: none; }
.modal {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    background: var(--esp-scrim);


}
.modal-box {
    width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    box-shadow: var(--esp-shadow-xl);
}

/* ============ Vitesse serveur ============ */
/* Sparkline SVG : largeur fluide, hauteur fixe. preserveAspectRatio="none"
   étire le tracé, d'où vector-effect côté SVG pour garder un trait constant. */
.spark { display: block; width: 100%; height: 30px; min-width: 90px; overflow: visible; }
.spark-cell { min-width: 120px; }
.spark-vide { color: var(--muted); font-size: 12px; }
.spark-bornes { display: block; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; } :where(body:not(.espace)) .spark-bornes { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.warn-txt { color: var(--warn); }

.perf-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.perf-row:last-of-type { border-bottom: 0; }
.perf-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }

/* Barre empilée : la part réseau/hébergeur puis la part applicative. */
.perf-bar { display: flex; height: 9px; margin: 8px 0 5px; border-radius: 2px; overflow: hidden; background: var(--esp-n200); border: 1px solid var(--border); }
.perf-bar > span { display: block; height: 100%; }
.perf-bar > span.reseau { background: var(--muted); }
.perf-bar > span.appli { background: var(--esp-accent); box-shadow: none; }
.perf-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--muted); } :where(body:not(.espace)) .perf-legend { font-size: 12px; }
.perf-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.perf-legend i.reseau { background: var(--muted); }
.perf-legend i.appli { background: var(--accent); }
.perf-meta { margin-top: 6px; }
.perf-spark { margin-top: 8px; max-width: 420px; }
.perf-urls { margin-top: 12px; }
.perf-urls summary { cursor: pointer; color: var(--muted); }
.perf-urls summary:hover { color: var(--accent); }

/* ============ Dashboard pleine largeur ============ */
/* Seul le dashboard passe en pleine largeur : c'est un poste de pilotage.
   Les écrans de lecture gardent leur colonne à 1180 px. */
.container-full { max-width: none; padding-left: 22px; padding-right: 22px; }

/* Au-delà de 1400 px : voir public/css/dashboard.css (Alertes 1/3, Dernières actions 2/3). */

/* ============ Finitions (DA Viseur, 10/11/2026) ============
   Ni coins d'écoutille, ni lueur, ni dégradé : l'état se lit à l'arête et à la typographie. */

/* Cartes de tickets : plaque à angle droit, liseré de priorité plein (sans halo). */
.tk-card { background: var(--card); border-color: var(--border); border-radius: 0; }
.tk-card::before { box-shadow: none; }
.tk-card:hover { border-color: var(--esp-n500); box-shadow: inset 0 2px 0 var(--esp-accent); }
.tk-site { text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 800; color: var(--muted); }
.tk-age { font-size: 12px; }
.tk-act { border-radius: 0; border-color: var(--border-lit); }
.tk-act:hover { border-color: var(--esp-ink); color: var(--esp-ink); box-shadow: none; }

/* Listes compactes : le liseré gauche dit la priorité, sans halo. */
.mini-list li { border-radius: 0; box-shadow: none; }
.mini-list a:hover { background: var(--esp-n200); }
.ml-site { text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 800; }

/* Agenda : cases à angle droit ; le jour courant porte une arête d'accent. */
.wk-day { background: var(--esp-n100); border-radius: 0; }
.wk-day.today { border-color: var(--esp-ink); box-shadow: inset 0 2px 0 var(--esp-accent); }
.wk-num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.wk-dow { text-transform: capitalize; letter-spacing: .02em; font-size: 12px; font-weight: 800; }   /* « MERCREDI » en capitales débordait des cases de 88 px (11/11/2026) */
.wk-ev { border-radius: 0; background: var(--esp-n200); border-left-color: var(--esp-accent); }
.wk-ev.allday { background: var(--esp-n100); border-left-color: var(--esp-n700); }
.wk-ev b { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* Pastilles de raccourci (clients). */
.pill { border-radius: 0; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 800; border-color: var(--border-lit); }
.pill:hover { border-color: var(--esp-ink); color: var(--esp-ink); box-shadow: none; }
.pill.bo { border-color: var(--esp-n700); color: var(--esp-n700); }

/* Jeton, zone vide, ascenseur. */
.token-box { border-color: var(--border-lit); background: var(--esp-n100); }
.empty { color: var(--muted); }
.empty .big { filter: none; }
::-webkit-scrollbar-thumb { background: var(--esp-n400); }
::-webkit-scrollbar-thumb:hover { background: var(--esp-n600); }

/* Sous-titre de page et barre d'outils. */
.page-sub { color: var(--muted); font-size: 14px; }
.section-pill { border-radius: 0; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 800; border-color: var(--border-lit); }
.nav-badge { box-shadow: none; border-radius: 0; }

/* Modale : boîte opaque au-dessus d'un voile, sans flou. */
.modal { background: var(--esp-scrim); }
.modal-box { background: var(--esp-panel); border-color: var(--esp-divider); border-top: 2px solid var(--esp-ink); border-radius: 0; box-shadow: var(--esp-shadow-xl); }

/* Écran d'authentification. */
.auth-box .brand { justify-content: center; font-size: 14px; }
:where(body:not(.espace)) .auth-box .card { box-shadow: var(--esp-shadow-lg); }   /* BO seul : l'espace garde sa boîte sans ombre (C3) */

/* ============================================================
   BARRES FIXES DU BO : en-tête et pied (DA Viseur, 10/11/2026)
   Barres OPAQUES, sans flou ni dégradé (R11, R15 du plan) : en-tête de 44 px (42 sous 900 px), pied de 36 px plus
   la zone sûre (Franck, 11/11/2026 : « un poil trop grands, réduis » ; avant 56 et 48 px). Ici la mise en page ; l'habit des cellules, du sélecteur et du pied est dans entete.css.
   AUCUN transform, filter ni perspective sur un ancêtre : un bloc conteneur ferait défiler les barres fixes.
   ============================================================ */

/* ---------- Bandeau supérieur ---------- */
.hud-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 45;
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 24px;
  background: var(--esp-barre-fonce);
  border-bottom: 1px solid var(--esp-barre-bd);
  color: #fff;
}
.brand {
  font-family: var(--font-brand); font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  white-space: nowrap; color: var(--fg); font-weight: 800;
  display: inline-flex; align-items: center; gap: 9px;
}
.brand:hover { text-decoration: none; }

/* Relevés permanents.
   Mesuré à 1280 px : trois chronos réclamaient 1472 px et poussaient « Ticket » puis « Aller à… » HORS de l'écran.
   La bande est donc rétrécissable partout, et c'est ELLE qui glisse — jamais le reste du bandeau qui s'en va. */
.tele { display: flex; gap: 0; align-items: center; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tele::-webkit-scrollbar { display: none; }
.tele > * { flex: none; }
.tele-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 12px;
  border: 0; background: transparent;
  font-size: 11px; color: var(--esp-barre-encre);
}
/* Police de l'en-tête réduite (Franck, 11/11/2026) : valeurs en 13 px, petits textes en 11 px. */
.tele-item b { font-family: var(--font); font-size: 13px; color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; }
/* Boîte de réception (08/10/2026) : lien vers la Messagerie ; un carré d'accent quand des mails attendent. */
a.tele-item.boite { text-decoration: none; white-space: nowrap; }
.tele-item.boite b.allume { color: var(--esp-accent-on-dark); }
/* Demandes hey@ (23/11/2026) : « à traiter / demandes ». */
.tele-item.boite .boite-sep { color: var(--esp-barre-encre); margin: 0 -3px; font-size: 12px; }
/* Solde bancaire (05/10/2026) : un relevé qui est un BOUTON (il ouvre la modale Banque). */
button.tele-item.bq { font: inherit; font-size: 11px; cursor: pointer; white-space: nowrap; }
/* Rentrée d'argent (tiroir-caisse, 05/10/2026) : la valeur passe en accent clair pendant 4 s, sans animation
   (le script de l'en-tête retire la classe). */
.tele-item.bq.rentree b { color: var(--esp-accent-on-dark); }
.tele-item i { font-style: normal; font-size: 11px; color: var(--esp-barre-encre); }
.tele-item.ok b { color: #fff; }
.tele-item.warn b { color: var(--esp-accent-on-dark); }
.tele-item.bad { background: var(--esp-accent-face); color: #fff; }
.tele-item.bad b { color: #fff; }
/* La semaine (07/10/2026) : valeur HT des heures facturables et jauge vers l'objectif hebdomadaire
   (Réglages → Mes préférences). Jauge de 3 px au pied du relevé ; blanche, avec « ATTEINT » écrit, une fois
   l'objectif atteint. */
.tele-semaine { position: relative; overflow: hidden; }
.tele-ht { font-family: var(--font); font-size: 11px; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tele-jauge { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--esp-barre-sep); pointer-events: none; }
.tele-jauge > span { display: block; height: 100%; width: var(--sem, 0%); background: var(--esp-barre-encre); }
.tele-semaine.atteint .tele-jauge > span { background: #fff; }
.ic { width: 15px; height: 15px; flex: none; }

/* ---------- Le chrono en cours, dans l'en-tête fixe ----------
   Il dit trois choses : sur quoi on travaille, depuis combien de temps, et comment arrêter. Le tout est un <form> :
   le bouton ■ est un vrai envoi, sans une ligne de script. La zone du chrono est TOUJOURS dans le bandeau, même
   quand rien ne tourne : c'est elle que le script repeint quand on lance un chrono depuis une carte. */
.chrono-zone { display: contents; }
.chrono-zone:empty { display: none; }
/* PLUSIEURS CHRONOS À LA SUITE (23/09/2026) : chaque nom rétrécit ; le COMPTEUR et le ■ restent visibles. Le nom
   d'un chrono lié à un ticket est un lien vers le ticket ; sans ticket, il ouvre sa petite fenêtre (base.html.twig). */
/* Le nombre de chronos se lit sur <body> (kl-chrono, kl-chronos-2, -3, -4 : posées par Twig, puis par le script du
   chrono quand le nombre change), plus par des :has() : ceux-ci faisaient revérifier les styles de toute la page à
   chaque seconde du compteur (11/11/2026, 17,7 ms par seconde sur iPad). */
body.kl-chronos-2 .chrono-zone .chrono-nom { max-width: min(15vw, 150px); }
body.kl-chronos-3 .chrono-zone .chrono-nom { max-width: min(11vw, 100px); }
body.kl-chronos-4 .chrono-zone .chrono-nom { max-width: min(8vw, 76px); }

.chrono-top {
  display: inline-flex; align-items: center; gap: 8px;
  min-width: 0;                       /* sans lui, le nom long déborde du bandeau */
  padding: 0 0 0 12px;
  border: 0; border-left: 1px solid var(--esp-barre-sep);
  background: transparent;
}
/* Carré de 6 px, STATIQUE : le compteur qui avance suffit à dire « ça tourne ». */
.chrono-pastille { width: 6px; height: 6px; flex: none; background: var(--esp-accent); }
.chrono-nom {
  font-size: 12px; color: #fff; font-weight: 600;
  max-width: 24vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
a.chrono-ticket { text-decoration: none; cursor: pointer; }
a.chrono-ticket:hover, a.chrono-ticket:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.chrono-compteur {
  font-family: var(--font); font-size: 13px; font-weight: 800;
  color: #fff; font-variant-numeric: tabular-nums;
  /* Chasse fixe RÉSERVÉE : sans elle, « 0:09:59 » → « 0:10:00 » fait sauter le bouton d'arrêt sous le doigt. */
  min-width: 7ch; text-align: right;
}
/* ---------- Relancer un chrono depuis une saisie : 44 × 44 ---------- */
.tp-relance { display: inline-flex; margin-left: 8px; }
.tp-play {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border-radius: 0; cursor: pointer;
  border: 1px solid var(--esp-ink); background: transparent; color: var(--esp-ink);
  font-size: 14px; line-height: 1;
}
.tp-play:hover { background: var(--esp-n200); }
.tp-play:active { background: var(--esp-n300); }
.tp-facturee .tp-play { opacity: .75; }

/* ---------- « + Chrono » et sa fenêtre ----------
   `static` et non `relative` : le panneau des derniers chronos prend le HEADER FIXE pour bloc conteneur, hors de
   `.tele` — une bande qui défile (overflow-x) rogne tout ce qui dépasse sa hauteur. */
.chrono-neuf { position: static; }
.chrono-neuf > .chrono-neuf-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  min-height: 44px; padding: 0 14px;
  border: 1px solid var(--esp-accent-face); background: var(--esp-accent-face);
  color: #fff; font-family: inherit; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
/* DÈS QU'UN CHRONO TOURNE, l'étiquette laisse la place à un « + » : le bouton ne disparaît jamais (on cumule les
   chronos), mais le bandeau est alors plein. */
.chrono-neuf > .chrono-neuf-btn .chrono-plus { display: none; font-size: 18px; line-height: 1; }
body.kl-chrono .chrono-neuf > .chrono-neuf-btn .chrono-etiquette,
body.kl-chrono .chrono-neuf > .chrono-neuf-btn .chrono-pastille { display: none; }
body.kl-chrono .chrono-neuf > .chrono-neuf-btn .chrono-plus { display: inline; }
body.kl-chrono .chrono-neuf > .chrono-neuf-btn { min-width: 44px; padding: 0 12px; justify-content: center; }
.chrono-neuf > .chrono-neuf-btn:hover, .chrono-neuf > .chrono-neuf-btn[aria-expanded="true"] { background: var(--esp-accent-hover); border-color: var(--esp-accent-hover); }
.chrono-neuf > .chrono-neuf-btn:active { background: var(--esp-accent-press); border-color: var(--esp-accent-press); }
.chrono-pastille.vide { display: none; }
/* « Chrono » : fenêtre CENTRÉE (<dialog> showModal, 28/09/2026), projet en auto-complétion.
   overflow visible : la liste du projet déborde de la boîte au lieu d'y être rognée. */
.chrono-dlg {
  width: min(440px, calc(100vw - 32px)); max-width: none;
  margin: auto; padding: 20px 20px 18px; overflow: visible;
  color: var(--fg); background: var(--esp-panel);
  border: 1px solid var(--esp-divider); border-top: 2px solid var(--esp-ink); border-radius: 0;
  box-shadow: var(--esp-shadow-xl);
}
.chrono-dlg::backdrop { background: var(--esp-scrim); }
.chrono-dlg-form { display: flex; flex-direction: column; gap: 12px; }
.chrono-dlg-titre { margin: 0; font-family: var(--font-brand); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; }
.chrono-dlg-titre::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 10px; vertical-align: 0; background: var(--esp-accent); }
.chrono-dlg .field { margin: 0; }
.chrono-dlg input[type=text] { width: 100%; min-height: 44px; font-size: 16px; }
.chrono-dlg .kl-combo-liste { z-index: 5; max-height: min(320px, 45vh); }
.chrono-dlg-erreur { margin: 0; color: var(--esp-danger); font-size: 13px; }
.chrono-dlg-erreur:empty { display: none; }
.chrono-dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }
.chrono-dlg-actions .btn { min-height: 44px; justify-content: center; }
/* ✎ du chrono en cours (28/09/2026) : même habit que le « # ». */
.chrono-modifier .ic { width: 14px; height: 14px; }
.chrono-modifier { border-style: solid; }
/* Texte seul à toutes les largeurs (10/11/2026) : « + CHRONO » reste écrit au téléphone ; la bande des relevés défile. */
@media (max-width: 560px) {
  .chrono-neuf > .chrono-neuf-btn { padding: 0 12px; min-width: 44px; justify-content: center; }
}

.chrono-stop {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none; border-radius: 0;
  border: 1px solid var(--esp-barre-bd); background: transparent;
  color: #fff; font-size: 12px; line-height: 1; cursor: pointer;
}
.chrono-stop:hover { background: var(--esp-accent-face); border-color: var(--esp-accent-face); }
.chrono-stop:active { background: var(--esp-accent-press); border-color: var(--esp-accent-press); }
/* Chrono oublié (passé le plafond) : la saisie sera plafonnée ET non facturable. Ça doit se voir AVANT l'arrêt :
   cellule pleine d'accent, compteur blanc. */
.chrono-top.bad { background: var(--esp-accent-face); }
.chrono-top.bad .chrono-compteur { color: #fff; }
.chrono-top.bad .chrono-pastille { background: #fff; }
/* TROIS CHRONOS OU PLUS : les relevés secondaires s'effacent (ils se relisent sur le tableau de bord). */
body.kl-chronos-3 .tele .tele-item.tele-secondaire { display: none; }

/* ---------- Le contenu, entre l'en-tête et le pied ----------
   Marge haute = en-tête + 16 px ; marge basse = pied + 24 px + zone sûre (reprise de l'ancienne feuille du décor, retirée le 10/11/2026) : la dernière
   ligne d'une page finit toujours au-dessus du pied. Largeurs inchangées (ce lot change l'habit, pas la mise en page).
   La marge basse est écrite DANS chaque règle `main.container` (11/11/2026) : la règle `> main` pèse moins, elle perdait
   et le bas des pages passait sous le pied (−9 à −60 px mesurés dans le Safari de l'iPad). */
body.hud-on main.container { max-width: 1180px; margin: 0 auto; padding: 60px 20px calc(36px + 24px + env(safe-area-inset-bottom, 0px)); }
body.hud-on main.container-full { max-width: none; }
body.hud-on > main { padding-bottom: calc(36px + 24px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) {
  body.hud-on main.container { padding-left: 74px; padding-right: 74px; }
  body.hud-on > main { padding-left: 34px; padding-right: 34px; }
}
@media (min-width: 1500px) {
  body.hud-on main.container { padding-left: 20px; padding-right: 20px; }
}
/* Après une navigation douce, le focus est rendu au début du nouveau contenu (<main tabindex="-1">) : sans cadre. */
body.bo > main[tabindex="-1"]:focus { outline: none; }
/* Navigation douce : plus d'estompage pendant la relecture (11/11/2026, BO fluide : une opacité sur chaque panneau
   = un calque par panneau sur iPad). Le contenu reste tel quel jusqu'à son remplacement. */

/* ---------- Téléphone : en-tête de 42 px ---------- */
@media (max-width: 899px) {
  .hud-top { height: 42px; padding: 0 12px; gap: 8px; }
  /* `min-width:0` + défilement : à 375 px, si tout ne tient pas, la bande de relevés glisse sous le doigt — la
     page, elle, ne bouge pas. */
  .tele { margin-left: auto; gap: 0; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .tele::-webkit-scrollbar { display: none; }
  .tele > * { flex: none; }
  .tele-item { padding: 0 8px; }
  /* Chrono en cours : le nom rétrécit, le ■ garde ses 44 px. */
  .chrono-top { padding: 0 0 0 8px; gap: 6px; }
  .chrono-nom { max-width: 100px; font-size: 12px; }
  body.kl-chronos-2 .chrono-zone .chrono-nom { max-width: 66px; }
  body.kl-chronos-3 .chrono-zone .chrono-nom { max-width: 52px; }
  .chrono-compteur { font-size: 13px; min-width: 6.5ch; }
  /* QUAND UN CHRONO TOURNE, IL PREND LA PLACE : un bouton d'arrêt qu'il faut aller CHERCHER est un chrono qu'on laisse
     tourner, donc une facture fausse. On efface ce qui se relit ailleurs ; la SEMAINE reste. */
  body.kl-chrono .tele .tele-item:not(.tele-semaine) { display: none; }
  @media (max-width: 639px) {
    body.kl-chrono .brand { display: none; }
    body.kl-chrono .top-new { display: none; }
  }
  body.hud-on main.container { padding: 56px 14px calc(36px + 24px + env(safe-area-inset-bottom, 0px)); }
}
/* Écran de connexion : pas de barre. */
body:not(.hud-on) .auth-wrap { min-height: 100vh; }
/* ============================================================
   PALETTE DE COMMANDE (Ctrl+K)
   ============================================================ */
.pal { position: fixed; inset: 0; z-index: 120; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: var(--esp-scrim); overscroll-behavior: contain; }
.pal[hidden] { display: none; }
.pal-box {
  width: 100%; max-width: 680px; max-height: 74vh; display: flex; flex-direction: column;
  background: var(--esp-panel);
  border: 1px solid var(--esp-divider); border-top: 2px solid var(--esp-ink); border-radius: 0; overflow: hidden;
  box-shadow: var(--esp-shadow-xl);
}
.pal-field { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; border-bottom: 2px solid var(--esp-divider); }
/* 18 px (≥ 16 px : iOS ne zoome pas au focus), toute la hauteur du bandeau pour le doigt. */
.pal-field input { flex: 1; align-self: stretch; min-height: 56px; background: none; border: 0; padding: 0; font: 600 18px var(--font); color: var(--fg); outline: none; }
.pal-field input:focus { box-shadow: none; border: 0; }
.pal-field input::placeholder { color: var(--dim); }
/* « Fermer » (10/11/2026) : au doigt et au téléphone seulement — il n'y a pas de touche Échap sur une tablette. */
.pal-fermer {
  display: none; flex: none; min-height: 44px; min-width: 44px; padding: 0 14px; margin-right: -8px; cursor: pointer;
  border: 1px solid var(--esp-ink); border-radius: 0; background: transparent; color: var(--esp-ink);
  font: 800 12px var(--esp-font); letter-spacing: .1em; text-transform: uppercase;
}
.pal-fermer:hover { background: var(--esp-n200); }
.pal-fermer:active { background: var(--esp-n300); }
@media (hover: none) and (pointer: coarse), (max-width: 599px) {
  .pal-fermer { display: inline-flex; align-items: center; justify-content: center; }
  .pal-field kbd { display: none; }
  /* Les rappels du clavier (↑ ↓, Entrée, « g » puis…) ne servent à rien au doigt : « Aller vite » les remplace. */
  .pal .pal-foot { display: none; }   /* .pal : la règle de base de .pal-foot vient plus bas */
}

.pal-list { overflow-y: auto; padding: 6px; }
.pal-group { padding: 14px 12px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); font-weight: 800; }
.pal-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 0; border-bottom: 1px solid var(--esp-n300); color: var(--fg); font-size: 15px; font-weight: 600; }
.pal-item:hover { text-decoration: none; }
.pal-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-hint { color: var(--muted); font-size: 13px; font-weight: 400; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* La ligne visée s'allume : c'est elle qu'Entrée ouvrira. */
.pal-item.on { background: var(--esp-n200); box-shadow: inset 3px 0 0 var(--esp-accent); }
.pal-item:active { background: var(--esp-n300); }
.pal-vide { padding: 22px 12px; text-align: center; color: var(--muted); font-size: 13px; margin: 0; }

.pal-foot { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--esp-n300); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
kbd { display: inline-block; padding: 1px 6px; border-radius: 0; border: 1px solid var(--esp-n400); background: var(--esp-panel); font-family: var(--esp-mono); font-size: 11px; font-weight: 600; color: var(--fg); } :where(body:not(.espace)) kbd { font-size: 12px; }

/* Déclencheur dans le bandeau. */
/* Bouton d'action de la barre du haut : contrairement à « Aller à… », qui est un
   outil de navigation en gris, celui-ci CRÉE quelque chose — il porte donc l'accent.
   Il reste discret : c'est un liseré teinté, pas un aplat. */
.top-new {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  min-height: 44px; padding: 0 14px; border-radius: 0;
  background: var(--esp-accent-face); border: 1px solid var(--esp-accent-face);
  color: #fff; font: 800 11px var(--font); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.top-new:hover { background: var(--esp-accent-hover); border-color: var(--esp-accent-hover); color: #fff; text-decoration: none; }
.top-new:active { background: var(--esp-accent-press); border-color: var(--esp-accent-press); }
.top-new .ic { width: 16px; height: 16px; }
/* Le « + » est dessiné en CSS : pas d'icône supplémentaire à ajouter au sprite. */
.top-new::before { content: '+'; font: 700 14px/1 var(--font-num); margin-right: -2px; }
/* « + » et l'icône du ticket (11/11/2026) ; plus serré sous 900 px. */
@media (max-width: 899px) { .top-new { min-width: 44px; padding: 0 12px; justify-content: center; } }

/* « Aller à… » (⌘K), « Sons », « Agenda », « Mémo » : des cellules du PIED depuis le 10/11/2026 (texte seul,
   public/css/entete.css, classes .vi-pied-*). Sous 900 px, la palette perd son pied de raccourcis clavier. */
.pal-open { flex: none; white-space: nowrap; }
@media (max-width: 899px) { .pal-foot { display: none; } .pal { padding-top: 8vh; } }
/* Bouton Mémo du tableau de bord : montré à toutes les largeurs, avec le carré du brouillon retrouvé. */
.dash-memo-bt { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.dash-memo-bt .ic { width: 13px; height: 13px; }
.dash-memo-bt.memo-a-voir::after {
  content: ''; position: absolute; top: 4px; right: 4px;
  width: 6px; height: 6px; border-radius: 0;
  background: var(--esp-accent); box-shadow: none;
}

/* ============================================================
   MODALES — DELMAK n'a qu'un écran
   Tout écran interne est chargé en fragment et affiché ici.
   La boîte est grande : elle accueille des tableaux entiers,
   pas seulement une fiche.
   ============================================================ */
.mdl {
  position: fixed; inset: 0; z-index: 110;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 16px 16px;
  background: var(--esp-scrim);
  overscroll-behavior: contain;
}
.mdl[hidden] { display: none; }
/* La page dessous n'est plus figée (overflow:hidden sur body = toute la page remise en page à chaque ouverture) : elle
   reste visible sous le voile (fluide.css), et garde sa position. */

.mdl-box {
  width: 100%; max-width: 1120px; max-height: 90vh;
  display: flex; flex-direction: column;
  background: var(--esp-panel);
  border: 1px solid var(--esp-divider); border-top: 2px solid var(--esp-ink); border-radius: 0; overflow: hidden;
  box-shadow: var(--esp-shadow-xl);
}
.mdl-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--esp-n300); }
/* min-width:0 et overflow-wrap : un titre fait d'un long mot insécable (libellé de tâche cron
   « Synchronisation_du_… ») se replie au lieu de pousser ✕ hors de l'écran (élément flex). */
.mdl-title { margin: 0; min-width: 0; overflow-wrap: anywhere; font-family: var(--font-brand); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; }
.mdl-title::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 10px; vertical-align: 0; background: var(--esp-accent); }
/* Barre du titre garnie par l'écran (19/11/2026, _modal.html.twig : data-mdl-gauche / data-mdl-droite). Fiche ticket :
   la pastille IA à la place du carré (la forme seule, son menu au toucher), la date de création accolée au ✕. */
.mdl-head--marque .mdl-title::before { display: none; }
.mdl-head > .tk-barre-pia { flex: none; display: inline-flex; margin: -8px 0; }
.mdl-head > .tk-barre-pia .tk-pia-mot, .mdl-head > .tk-barre-pia .tk-menu-fl { display: none; }
.mdl-head > .tk-barre-pia .tk-pia-pill { justify-content: center; min-width: 44px; min-height: 44px; padding: 0; gap: 0; }
.mdl-head > .tk-barre-pia .tk-pia--grand { width: 14px; height: 14px; }
.mdl-head > .tk-barre-pia .tk-menu-pan { top: calc(100% + 2px); }
/* RACCOURCI IA (25/11/2026, _raccourci_ia.html.twig) : œil « Analyser » (losange gris), « Go » (bleu plein, analysé).
   Cartes : un bouton .tk-act de 44 px comme le chrono. Fiche : à côté du losange, avec le mot ; dans la tête de la
   modale, l'icône seule (la bulle dit le reste). Le « Go » prend le bleu plein du losange « à lancer ». */
.tk-ia-rac { display: inline-flex; margin: 0; }
.tk-barre-pia { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tk-ia-rac-btn { gap: 6px; }
.tk-ia-rac-btn .ic { width: 18px; height: 18px; }
.tk-ia-rac-go { font-weight: 800; letter-spacing: .06em; font-size: 13px; }
.tk-act.tk-ia-rac-btn--go { background: #1f6fd6; border-color: #1f6fd6; color: #fff; }
.tk-act.tk-ia-rac-btn--go:hover { background: #185bb0; border-color: #185bb0; color: #fff; }
html.bo-sombre .tk-act.tk-ia-rac-btn--go { background: #4c9dff; border-color: #4c9dff; color: #0b1220; }
.tk-ia-rac--fiche .tk-act { min-height: 44px; padding: 0 10px; display: inline-flex; align-items: center; font-size: 14px; }
.tk-ia-rac--fiche .tk-ia-rac-mot { font-weight: 700; }
/* « Go traitement » : une seule typo, sans écart entre les deux morceaux. */
.tk-ia-rac--fiche .tk-ia-rac-btn--go { gap: 0; }
.tk-ia-rac--fiche .tk-ia-rac-go { font-size: inherit; letter-spacing: 0; font-weight: 700; }
.tk-ia-rac[aria-busy="true"] .tk-act { opacity: .5; pointer-events: none; }
.tk-ia-rac-avis { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mdl-head > .tk-barre-pia { gap: 4px; }
.mdl-head > .tk-barre-pia .tk-ia-rac-mot { display: none; }
.mdl-head > .tk-barre-pia .tk-ia-rac .tk-act { min-width: 44px; justify-content: center; padding: 0 8px; }
.mdl-head > .tk-barre-date { flex: none; margin-left: auto; font-size: 13px; color: var(--esp-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 599px) { .mdl-head > .tk-barre-date .tk-date-mot, .mdl-head > .tk-barre-date .tk-date-h { display: none; } }
/* ✕ et ‹ : 44 × 44 à toutes les largeurs (R12). */
.mdl-nav {
  width: 44px; height: 44px; flex: none; border-radius: 0; cursor: pointer;
  background: transparent; border: 1px solid var(--esp-n400); color: var(--esp-ink);
  font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.mdl-nav:hover { border-color: var(--esp-ink); background: var(--esp-n200); }
.mdl-nav:active { background: var(--esp-n300); }
/* display:flex ci-dessus annule l'attribut hidden : sans cette règle, ‹ restait
   affiché à la racine de la pile, où un clic fermait la modale. */
.mdl-nav[hidden] { display: none; }
.mdl-body { overflow-y: auto; padding: 18px; }
/* Le contenu injecté est un écran entier : son premier titre fait doublon
   avec celui de la modale, et sa marge du haut déséquilibre la boîte. */
.mdl-body .frag > .toolbar:first-child h1 { font-size: 17px; }
.mdl-body .card:last-child { margin-bottom: 0; }
.mdl-erreur { color: var(--danger); text-align: center; padding: 30px 10px; }

/* Attente : un mot fixe, « Chargement… » (11/11/2026 : plus de points animés). */
.mdl-attente { margin: 0; padding: 48px 0; text-align: center; color: var(--esp-muted); font-size: 14px; }

/* ENVOI DE FICHIERS depuis une modale (vidéos en PJ, 09/11/2026 — _modal.html.twig) : le formulaire reste à l'écran,
   grisé et inerte ; la progression vit en pied de boîte, visible où que l'on soit dans la fiche. Un échec (413,
   coupure) y laisse son message, liseré rouge, et rend le formulaire intact. */
.mdl-body form[aria-busy="true"] { opacity: .55; transition: opacity .2s; }
.mdl-envoi {
  flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px;
  padding: 10px 14px max(10px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border-lit);
  background: var(--esp-panel);
  box-shadow: var(--esp-shadow-md);
}
.mdl-envoi[hidden] { display: none; }
.mdl-envoi-texte { margin: 0; min-width: 0; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.mdl-envoi-bt { min-height: 44px; white-space: nowrap; }
.mdl-envoi-bt[hidden] { display: none; }
.mdl-envoi-barre { grid-column: 1 / -1; display: block; height: 6px; border-radius: 0; background: var(--esp-n200); overflow: hidden; }
.mdl-envoi-barre i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--esp-accent); box-shadow: none; transition: width .15s ease-out; }
/* Tout est parti, le serveur enregistre : la barre est pleine, le texte le dit (plus de pulsation). */
.mdl-envoi-echec { border-top-color: var(--esp-danger); box-shadow: inset 3px 0 0 var(--danger), var(--esp-shadow-md); }
.mdl-envoi-echec .mdl-envoi-texte { color: var(--fg); }
.mdl-envoi-echec .mdl-envoi-barre { display: none; }
@media (pointer: coarse), (max-width: 767px) { .mdl-envoi-bt { min-height: 50px; padding: 0 18px; } }

@media (max-width: 899px) {
  .mdl { padding: 0; }
  .mdl-box { max-width: none; max-height: 100vh; height: 100vh; max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
  .mdl-body { padding: 14px; }
}

/* Le contenu occupe toute la largeur : plus de rails à contourner. */
body.hud-on main.container { padding-left: 20px; padding-right: 20px; }
@media (min-width: 900px) { body.hud-on main.container { padding-left: 24px; padding-right: 24px; } }

/* --- Nouveaux panneaux du dashboard --- */
/* Placement : voir « Dashboard : grille des encarts » (largeurs réglables). */
.dash-parc .table-wrap { border: 0; border-radius: 0; }
.dash-parc th:first-child, .dash-parc td:first-child { padding-left: 0; }
.dash-parc td { font-size: 13px; }

/* --- Écran « Hash mot de passe PrestaShop » (palette ⌘K, encart du tableau de bord jusqu'au
   28/09/2026) --- */
/* Ses champs se règlent sur la largeur de LA CARTE (container encart, plus haut). */

/* Champs : empilés sur téléphone ; côte à côte dès 640 px, bouton calé en pied. */
.psh-champs { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); align-items: end; }
.psh-champs .field { margin-bottom: 0; min-width: 0; }
@container encart (min-width: 562px) { .psh-champs { grid-template-columns: minmax(0, 1fr) auto; } }
/* `.mono` seule perd contre `input[type=text]`, qui pose sa police en raccourci. */
.psh-champs input.mono { font-family: var(--font-num); }
/* 16 px au doigt : en dessous, iOS zoome la page à la mise au point du champ. */
@media (pointer: coarse) { .psh-champs input { font-size: 16px; } }

.psh-mdp { display: flex; gap: 6px; }
.psh-mdp input { flex: 1 1 auto; min-width: 0; }
/* Largeur fixe : « Afficher » ↔ « Masquer » ne fait pas sauter le champ. */
.psh-oeil {
  flex: none; min-width: 5.8em; padding: 0 10px; cursor: pointer;
  background: var(--bg-2); color: var(--muted);
  border: 1px solid var(--border-lit); border-radius: 10px;
  font: 600 10.5px var(--font); letter-spacing: .08em; text-transform: uppercase;
} :where(body:not(.espace)) .psh-oeil { font-size: 12px; }
.psh-oeil:hover { border-color: var(--accent); color: var(--accent); }
.psh-oeil:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Même hauteur que les champs voisins (≈ 42 px) ; pleine largeur sous 640 px. */
.psh-go { min-height: 42px; }
@media (max-width: 639px) { .psh-go { width: 100%; } }
/* Calcul en cours : aria-disabled et non disabled (le focus clavier reste sur le bouton). */
.btn.psh-go[aria-disabled="true"] { opacity: .55; cursor: progress; filter: grayscale(.4); box-shadow: none; }

/* Messages. La région d'alerte n'est JAMAIS en display:none : une région live
   démasquée au moment où le message arrive n'est pas lue par tous les lecteurs
   d'écran. Vide, elle n'a déjà aucune hauteur ; seule sa marge est conditionnelle.
   Le bloc d'avertissements, lui, n'est pas une région live : vide, il sort de la
   grille, sinon il y laisserait un espacement fantôme. */
.psh-erreurs:not(:empty) { margin-top: 10px; }
.psh-avert:empty { display: none; }
.psh-msg {
  margin: 0; padding: 8px 10px; font-size: 12.5px;
  border: 1px solid; border-radius: var(--radius-sm);
}
.psh-msg + .psh-msg { margin-top: 6px; }
.psh-msg.bad { color: var(--danger); border-color: var(--esp-danger); background: var(--esp-danger-fond); }
.psh-msg.warn { color: var(--warn); border-color: var(--esp-alerte); background: var(--esp-alerte-fond); }

/* Résultat. display posé : [hidden] rétabli juste après. */
.psh-res { display: grid; gap: 10px; margin-top: 14px; }
.psh-res[hidden] { display: none; }
.psh-ligne {
  display: grid; gap: 6px 16px; grid-template-columns: minmax(0, 1fr);
  padding: 10px 12px; min-width: 0;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
/* Colonne d'intitulé bornée à 280 px : à 1000 px d'écran, un bcrypt (60 caractères)
   tient encore sur une ligne à côté du bouton « Copier ». */
@media (min-width: 900px) { .psh-ligne { grid-template-columns: minmax(210px, 280px) minmax(0, 1fr); align-items: center; } }
.psh-lib { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.psh-lib strong { font-size: 13px; }
.psh-algo { font-weight: 400; color: var(--muted); }
.psh-val { display: flex; align-items: center; gap: 8px; min-width: 0; }
.psh-val[hidden] { display: none; }
/* Le hash : coupé n'importe où (aucune espace dedans), et sélectionné d'un seul clic. */
.psh-hash {
  flex: 1 1 auto; min-width: 0;
  padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg);
  font-family: var(--font-num); font-size: 12.5px; line-height: 1.45; color: var(--fg);
  overflow-wrap: anywhere; word-break: break-all;
  -webkit-user-select: all; user-select: all; cursor: text;
}
.psh-copier { flex: none; }
@media (pointer: coarse) { .psh-copier { min-height: 40px; } }
.psh-pied code { font-family: var(--font-num); font-size: 11.5px; color: var(--fg); overflow-wrap: anywhere; } :where(body:not(.espace)) .psh-pied code { font-size: 12px; }
.psh-pied { margin: 12px 0 0; }

/* ============================================================
   TICKETS — groupes de priorité et classement à la main
   (glisser la poignée ⋮⋮, ou ⌥↑ / ⌥↓ sur le lien du ticket).
   En fin de feuille : les règles « plaque d'identification » des
   cartes (.tk-card:hover…) sont plus haut et ne doivent pas
   l'emporter sur la carte en cours de glisser.
   ============================================================ */
.tk-groupe-titre { font-size: 12px; margin: 16px 0 8px; letter-spacing: .1em; }
.tk-groupe:first-of-type .tk-groupe-titre { margin-top: 4px; }
/* Le voyant du titre prend la couleur du groupe, comme le liseré des cartes. */
.tk-groupe.p3 .tk-groupe-titre::before { background: var(--danger); box-shadow: none; }
.tk-groupe.p2 .tk-groupe-titre::before { background: var(--warn); box-shadow: none; }
.tk-groupe-nb { color: var(--muted); font-family: var(--font-num); font-weight: 500; letter-spacing: 0; }
/* Repère des positions absolues : le trait d'insertion est posé dans la grille. */
.tk-grid { position: relative; }
/* Message d'échec COLLANT : on glisse souvent tout en bas de la liste, un message
   posé en tête serait hors de vue. Fond opaque sous la teinte d'erreur, sinon les
   cartes transparaîtraient ; en page pleine, sous la barre fixe du HUD (46 px). */
.flash.tk-ordre-msg {
  position: sticky; top: 0; z-index: 25; margin: 4px 0 10px;
  background: var(--esp-danger-fond);
}
body:not(.mdl-ouverte) .flash.tk-ordre-msg { top: 60px; }

/* Plus de poignée ⋮⋮ (17/11/2026) : la carte ENTIÈRE se glisse (_classement.html.twig) — à la souris dès 4 px, au
   doigt après un appui long. Pendant cet appui, ni bulle « Ouvrir le lien » d'iOS ni sélection de texte. */
.tk-glissable .tk-card { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* Carte en cours de glisser : décalée par transform (sa place reste marquée par le
   vide qu'elle laisse), sans transition, au-dessus de ses voisines. */
.tk-card.tk-glisse {
  z-index: 20; transition: none; cursor: grabbing; opacity: .94;
  border-color: var(--esp-ink);
  box-shadow: var(--esp-shadow-lg);
}
body.tk-glisse-en-cours, body.tk-glisse-en-cours * { cursor: grabbing; -webkit-user-select: none; user-select: none; }

/* Trait d'insertion : vertical entre deux cartes d'une rangée, horizontal sur
   une seule colonne (téléphone). display posé ici : [hidden] rétabli juste après. */
.tk-repere {
  position: absolute; z-index: 15; display: block; pointer-events: none;
  border-radius: 3px; background: var(--accent); box-shadow: none;
}
.tk-repere[hidden] { display: none; }
/* Changer de PRIORITÉ en glissant (28/09/2026) : un groupe vide n'apparaît que pendant un
   glisser, avec sa zone de dépôt ; le groupe visé s'éclaire. */
.tk-groupe-vide { display: none; }
body.tk-glisse-en-cours .tk-groupe-vide { display: block; }
.tk-vide-cible { margin: 0; padding: 14px; border: 1px dashed var(--border-lit); border-radius: 10px; color: var(--muted); font-size: 12px; text-align: center; }
.tk-groupe.tk-groupe-cible .tk-vide-cible { border-color: var(--accent); color: var(--fg); background: var(--esp-a100); }
.tk-groupe.tk-groupe-cible .tk-groupe-titre { color: var(--accent); }

/* Jamais reclassé à la main : suit les classés, par ancienneté. Discret. */
.tk-nonclasse {
  font-size: 10px; line-height: 1.5; padding: 0 6px; border-radius: 999px; white-space: nowrap;
  border: 1px dashed var(--border-lit); color: var(--muted);
} :where(body:not(.espace)) .tk-nonclasse { font-size: 12px; }

/* ---------- Tâches cron : titre, état, boutons (partagés avec webcron/*.html.twig) ---------- */
.wc-titre { display: flex; align-items: center; gap: 8px; }
.wc-etat { margin: 6px 0 0; font-size: 12.5px; color: var(--fg); }
.wc-etat .muted { font-size: 11.5px; } :where(body:not(.espace)) .wc-etat .muted { font-size: 12px; }
.wc-boutons { display: flex; flex-wrap: wrap; gap: 6px; }
@media (min-width: 640px) {
  .wc-boutons { flex: none; }
}

/* ---------- Canaux d'alerte (Alertes → Canaux) ----------
   Une carte par canal, au doigt d'abord : destination et erreurs passent à la ligne
   n'importe où plutôt que d'élargir la page. Réglages et journal repliés. */
.chn-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chn-tete form { display: inline; }
.chn-tete .badge[type=submit] { font: inherit; font-size: 10.5px; } :where(body:not(.espace)) .chn-tete .badge[type=submit] { font-size: 12px; }
.chn-dest { margin-top: 8px; color: var(--fg); overflow-wrap: anywhere; word-break: break-all; }
.chn-regles { margin-top: 4px; line-height: 1.6; }
.chn-etat { margin-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.chn-erreur { color: var(--danger); overflow-wrap: anywhere; }
.chn-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chn-replie { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.chn-replie summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.chn-replie summary:hover { color: var(--accent); }
.chn-replie[open] summary { margin-bottom: 10px; }
.chn-types { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 6px; }
.chn-case { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 400; color: var(--fg); }
.chn-envois { list-style: none; margin: 0; padding: 0; }
.chn-envoi { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 12.5px; }
.chn-envoi:first-child { border-top: 0; }
.chn-objet { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 640px) {
  .chn-objet { flex: 1 1 0; }
}

/* ============================================================
   Disponibilité (lot B du 19/09) : écran, fiche d'un site, réglages.
   Mobile d'abord : cartes sous 640 px, grille-tableau au-delà ; la colonne
   « dernier incident » passe sous le nom entre 640 et 999 px.
   ============================================================ */
a.tele-item:hover { text-decoration: none; }
.bad-txt { color: var(--danger); }
.ok-txt { color: var(--success); }
.dsp-pct b.ok, .dsp-parc b.ok, .dsp-tuile.ok b { color: var(--success); }
.dsp-pct b.warn, .dsp-parc b.warn, .dsp-tuile.warn b { color: var(--warn); }
.dsp-pct b.bad, .dsp-parc b.bad, .dsp-tuile.bad b { color: var(--danger); }
.dsp-pct b.vide, .dsp-parc b.vide, .dsp-tuile.vide b { color: var(--muted); }
.dsp-bandeau a { color: inherit; text-decoration: underline; }
/* Bandeau « dernier envoi en échec » : une erreur de transport sans espace (URL, jeton)
   passe à la ligne au lieu d'être coupée par l'overflow:hidden de .flash (téléphone). */
.dsp-bandeau { overflow-wrap: anywhere; }
.site-metrics a.m { display: block; color: inherit; }
.site-metrics a.m:hover { text-decoration: none; border-color: var(--accent); }

/* En-tête : parc et fraîcheur de la sonde */
.dsp-entete { padding: 14px 16px; }
.dsp-synthese { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.dsp-compte { display: flex; align-items: baseline; gap: 2px; }
.dsp-compte b { font-size: 30px; line-height: 1; font-weight: 700; }
.dsp-compte i { font-style: normal; font-size: 16px; color: var(--muted); }
.dsp-compte span { margin-left: 8px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; } :where(body:not(.espace)) .dsp-compte span { font-size: 12px; }
.dsp-compte.ok b { color: var(--success); }
.dsp-compte.warn b { color: var(--warn); }
.dsp-compte.bad b { color: var(--danger); }
/* Téléphone : compteur et parc 30 j sur la 1re ligne, états en dessous sur toute la largeur. */
.dsp-etats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; order: 3; flex: 1 1 100%; }
@media (min-width: 640px) { .dsp-etats { order: 0; flex: 1 1 200px; } }
.dsp-parc { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; }
.dsp-parc span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; } :where(body:not(.espace)) .dsp-parc span { font-size: 12px; }
.dsp-parc b { font-size: 20px; }
.dsp-fraicheur { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.dsp-fraicheur.warn { color: var(--warn); }
.dsp-fraicheur.bad { color: var(--danger); }
.dsp-fraicheur strong { color: inherit; }

/* Liste : une carte par site (téléphone) */
.dsp-liste { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.dsp-tete { display: none; }
.dsp-ligne {
  display: grid; gap: 8px 10px; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas: "site site site" "etat etat etat" "p24 p7 p30" "temps temps temps" "dern dern dern";
  padding: 12px 14px; color: inherit;
  background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .12s ease, background .12s ease;
}
.dsp-ligne:hover { text-decoration: none; border-color: var(--accent); }
.dsp-ligne:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dsp-ligne.eteinte { opacity: .62; }
.dsp-site { grid-area: site; display: flex; align-items: center; gap: 9px; min-width: 0; }
.dsp-nom { display: flex; flex-direction: column; min-width: 0; }
/* Le nom peut tenir sur deux lignes : en capitales il est plus large que la
   colonne à 375 et à 768 px, et le rogner effacerait ce qui distingue deux
   boutiques d'un même client (« … de Brest », « … Quimper »). */
.dsp-nom strong { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dsp-nom small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsp-nom small, .dsp-etat small { color: var(--muted); font-size: 12px; }
.dsp-etat { grid-area: etat; display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.dsp-etat small.warn-txt { color: var(--warn); }
.dsp-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.dsp-pct { display: flex; flex-direction: column; padding: 6px 8px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.dsp-p24 { grid-area: p24; } .dsp-p7 { grid-area: p7; } .dsp-p30 { grid-area: p30; }
.dsp-l { font-style: normal; font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; } :where(body:not(.espace)) .dsp-l { font-size: 12px; }
.dsp-pct b { font-size: 14px; }
.dsp-temps { grid-area: temps; display: flex; align-items: center; gap: 10px; min-width: 0; }
.dsp-temps b { white-space: nowrap; font-size: 13px; }
.dsp-spark { flex: 1; min-width: 0; max-width: 240px; }
.dsp-spark .spark { height: 22px; min-width: 60px; }
.dsp-spark .spark-bornes { display: none; }
.dsp-dernier { grid-area: dern; overflow-wrap: anywhere; }

@media (min-width: 640px) {
  .dsp-liste { gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
  .dsp-tete, .dsp-ligne {
    display: grid; column-gap: 14px;
    /* Colonne « temps » : 140 px au moins = valeur en nowrap (≈ 62 px) + écart de 10 px
       + petite courbe (min-width 60 px) ; à 110 px, la courbe était rognée de 10 px par
       l'overflow:hidden de .dsp-liste entre 640 et ~800 px. */
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.5fr) 70px 70px 70px minmax(140px, 1fr);
    grid-template-areas: "site etat p24 p7 p30 temps" "dern etat p24 p7 p30 temps";
  }
  .dsp-tete {
    grid-template-areas: "site etat p24 p7 p30 temps";
    padding: 10px 14px; background: var(--esp-surface); border-bottom: 1px solid var(--border-lit);
    color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; white-space: nowrap;
  } :where(body:not(.espace)) .dsp-tete { font-size: 12px; }
  .dsp-tete > :nth-child(1) { grid-area: site; } .dsp-tete > :nth-child(2) { grid-area: etat; }
  .dsp-tete > :nth-child(3) { grid-area: p24; } .dsp-tete > :nth-child(4) { grid-area: p7; }
  .dsp-tete > :nth-child(5) { grid-area: p30; } .dsp-tete > :nth-child(6) { grid-area: temps; }
  .dsp-tete-dernier { display: none; }
  .dsp-c { text-align: right; }
  .dsp-ligne { row-gap: 2px; align-items: center; padding: 10px 14px; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: transparent; }
  .dsp-ligne:hover { background: var(--esp-a100); box-shadow: inset 2px 0 0 var(--accent); }
  .dsp-ligne:focus-visible { outline-offset: -2px; }
  .dsp-site { align-self: end; }
  .dsp-dernier { align-self: start; padding-left: 17px; }
  .dsp-pct { padding: 0; background: none; border: 0; align-items: flex-end; }
  /* Libellés des cellules : l'en-tête les porte ; gardés pour les lecteurs d'écran. */
  .dsp-l { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .dsp-ligne { position: relative; }
}
@media (min-width: 1000px) {
  .dsp-tete, .dsp-ligne {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) 68px 68px 68px minmax(140px, .9fr) minmax(0, 1.15fr);
    grid-template-areas: "site etat p24 p7 p30 temps dern";
  }
  .dsp-tete > :nth-child(7) { grid-area: dern; }
  .dsp-tete-dernier { display: block; }
  .dsp-site, .dsp-dernier { align-self: center; }
  .dsp-dernier { padding-left: 0; }
}

/* Journal d'incidents */
.dsp-journal { list-style: none; margin: 0; padding: 0; }
.dsp-inc { padding: 10px 0 10px 12px; border-top: 1px solid var(--border); border-left: 2px solid transparent; }
.dsp-inc:first-child { border-top: 0; }
.dsp-inc.bad { border-left-color: var(--danger); }
.dsp-inc.warn { border-left-color: var(--warn); }
.dsp-inc-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 3px; }
.dsp-inc-cause { overflow-wrap: anywhere; }
.dsp-inc-mails { margin-top: 2px; }
.dsp-replie { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.dsp-replie summary { cursor: pointer; color: var(--muted); font-size: 12.5px; padding: 6px 0; }
.dsp-replie summary:hover { color: var(--accent); }

/* Fiche d'un site */
.dsp-fiche-titre { min-width: 0; }
.dsp-fiche-titre h1 { display: flex; align-items: center; gap: 10px; }
.dsp-fiche-titre .page-sub { overflow-wrap: anywhere; }
.dsp-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.dsp-actions form { display: inline-flex; margin: 0; }
.dsp-fiche-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dsp-controles { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 12px 0 0; }
.dsp-controles dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; } :where(body:not(.espace)) .dsp-controles dt { font-size: 12px; }
.dsp-controles dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.dsp-tuiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.dsp-tuile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-2); }
.dsp-tuile-lib { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; } :where(body:not(.espace)) .dsp-tuile-lib { font-size: 12px; }
.dsp-tuile b { font-size: 20px; line-height: 1.25; }
.dsp-test { border-left: 3px solid var(--border-lit); }
.dsp-test.ok { border-left-color: var(--success); }
.dsp-test.warn { border-left-color: var(--warn); }
.dsp-test.bad { border-left-color: var(--danger); }
.dsp-test p { overflow-wrap: anywhere; }
@media (min-width: 640px) {
  .dsp-controles { grid-template-columns: 1fr 1fr; }
  .dsp-tuiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Courbe des temps de réponse (SVG rendu côté serveur, graduations en HTML) */
.dsp-courbe-tete { margin-bottom: 6px; }
.dsp-onglets { display: flex; gap: 6px; }
.dsp-courbe-resume { margin: 0 0 10px; }
.dsp-courbe { display: flex; gap: 6px; }
.dsp-courbe-y { position: relative; flex: none; width: 42px; height: 170px; font-family: var(--font-num); font-size: 10px; color: var(--muted); } :where(body:not(.espace)) .dsp-courbe-y { font-size: 12px; }
.dsp-courbe-y span { position: absolute; right: 0; transform: translateY(-50%); white-space: nowrap; }
.dsp-courbe-zone { position: relative; flex: 1; min-width: 0; }
.dsp-courbe-zone svg { display: block; width: 100%; height: 170px; overflow: visible; }
.dsp-courbe-zone .grille { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.dsp-courbe-zone .grille.base { stroke: var(--border-lit); stroke-dasharray: none; }
.dsp-courbe-zone .panne { fill: rgba(251, 95, 122, .2); }
.dsp-courbe-zone path.moy { stroke: var(--accent); stroke-width: 1.6; }
.dsp-courbe-zone path.p95 { stroke: var(--accent-2); stroke-width: 1.2; stroke-dasharray: 4 3; }
.dsp-courbe-x { position: relative; height: 20px; font-size: 10px; color: var(--muted); } :where(body:not(.espace)) .dsp-courbe-x { font-size: 12px; }
.dsp-courbe-x span { position: absolute; top: 5px; transform: translateX(-50%); white-space: nowrap; }
.dsp-courbe-vide { padding: 30px 0; text-align: center; color: var(--muted); font-size: 13px; }
.dsp-legende { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; }
.dsp-legende i { display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.dsp-legende i.moy { background: var(--accent); }
.dsp-legende i.p95 { background: var(--accent-2); }
.dsp-legende i.panne { height: 10px; background: rgba(251, 95, 122, .4); }
@media (max-width: 639px) {
  /* Un libellé sur deux : sinon ils se chevauchent sur 300 px. */
  .dsp-courbe-x span:nth-child(even) { display: none; }
}

/* 90 barres journalières (30 sur téléphone, sauf « Voir les 90 jours ») */
.dsp-barres { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 2px; height: 34px; }
.dsp-barres .b { display: block; border-radius: 2px; background: var(--success); opacity: .85; transition: opacity .1s ease; }
.dsp-barres .b.warn { background: var(--warn); }
.dsp-barres .b.bad { background: var(--danger); }
.dsp-barres .b.vide { background: var(--border-lit); opacity: .55; }
.dsp-barres .b.auj { box-shadow: inset 0 -3px 0 rgba(255, 255, 255, .35); }
.dsp-barres .b:hover { opacity: 1; }
.dsp-barres:not(.tout) .b:nth-child(-n+60) { display: none; }
.dsp-barres.tout { height: auto; grid-auto-rows: 26px; row-gap: 6px; }
.dsp-barres-bornes { display: flex; margin-top: 4px; font-size: 11px; } :where(body:not(.espace)) .dsp-barres-bornes { font-size: 12px; }
.dsp-barres-bornes .loin { display: none; }
.dsp-barres.tout + .dsp-barres-bornes .loin { display: inline; }
.dsp-barres.tout + .dsp-barres-bornes .pres { display: none; }
.dsp-barres-resume { margin: 6px 0 0; }
.dsp-barres-90 { display: inline-block; margin-left: 4px; padding: 6px 0; }
.dsp-jours-mauvais { list-style: none; margin: 8px 0 0; padding: 0; color: var(--muted); }
.dsp-jours-mauvais li { display: flex; align-items: center; gap: 8px; padding: 3px 0; overflow-wrap: anywhere; }
@media (min-width: 640px) {
  .dsp-barres, .dsp-barres.tout { grid-template-columns: repeat(90, minmax(0, 1fr)); height: 38px; grid-auto-rows: auto; row-gap: 0; }
  .dsp-barres:not(.tout) .b:nth-child(-n+60) { display: block; }
  .dsp-barres-bornes .loin, .dsp-barres.tout + .dsp-barres-bornes .loin { display: inline; }
  .dsp-barres-bornes .pres { display: none; }
  .dsp-barres-90 { display: none; }
}

/* Réglages de la sonde (une colonne) */
.dsp-reglages { position: relative; max-width: 680px; }
.dsp-case { display: flex; align-items: flex-start; gap: 9px; margin: 8px 0 0; font-size: 13px; color: var(--fg); font-weight: 400; text-transform: none; letter-spacing: 0; cursor: pointer; }
.dsp-case input { flex: none; margin-top: 2px; }
.dsp-cases .dsp-case { min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-2); }
.dsp-reglages .dsp-actions { margin: 6px 0 0; }
.dsp-reglages input.invalide, .dsp-reglages select.invalide { border-color: var(--danger); }
/* Bouton par défaut (Entrée = Enregistrer), hors écran mais rendu : Safari n'active pas un bouton masqué. */
.dsp-defaut { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Alias historique : plusieurs écrans admin (audit, dérives) écrivent `.badge.danger`
   là où la palette dit `.badge.bad`. Sans cet alias, le badge « Critique » sortait gris.
   Ajouté par le lot « onglet Sécurité » de l'espace client. */
.badge.danger { color: var(--danger); border-color: var(--esp-danger); background: var(--esp-danger-fond); box-shadow: none; }

/* ==========================================================================
   Note secrète (lot du 22/09/2026)

   Trois écrans partagent ce bloc : l'encart du tableau de bord (admin), l'écran
   /dashboard/note-secrete, l'encart et la page de l'espace client — et la page
   PUBLIQUE d'ouverture, qui n'a que app.css (gabarit autonome, aucune police
   distante, aucun script). Préfixe `ns-`, rien d'autre n'est touché.
   Mobile d'abord : tout est en colonne, et les cibles tactiles font 44 px.
   ========================================================================== */

/* ---------- Formulaire et encarts (admin + espace) ---------- */
.ns-bloc { margin-bottom: 14px; }
.ns-intro { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.ns-form { display: flex; flex-direction: column; gap: 10px; }
.ns-form label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 4px; } :where(body:not(.espace)) .ns-form label { font-size: 12px; }
/* Chasse fixe : on y écrit des mots de passe. Un l et un 1 doivent se distinguer
   AVANT l'envoi — c'est la seule relecture possible, le texte disparaît ensuite. */
.ns-zone {
  width: 100%; resize: vertical; min-height: 88px;
  font-family: var(--font-num); font-size: 14px; line-height: 1.5;
  background: var(--bg-2); color: var(--fg);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px;
}
.ns-zone:focus { outline: none; border-color: var(--border-lit); box-shadow: none; }
.ns-form-bas { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.ns-form-duree { flex: 1 1 140px; min-width: 0; }
.ns-form-duree select { width: 100%; min-height: 44px; }
.ns-form-bas .btn, .ns-form-bas .btn-sm { min-height: 44px; flex: 0 0 auto; }
.ns-aide { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 6px 0 0; }

/* ---------- Lien fraîchement créé ---------- */
.ns-lien {
  border: 1px solid var(--esp-a300); background: var(--accent-soft);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.ns-lien-titre { margin: 0 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
/* Le lien, en entier et sélectionnable d'un seul appui : même recette que
   `.ns-secret`. Dans un <input>, 25 à 35 caractères sur 82 étaient visibles au
   téléphone et il fallait trois gestes pour le copier — or c'est la seule et unique
   fois qu'il s'affiche. `all` sélectionne le bloc entier au premier appui. */
.ns-lien-champ {
  display: block; width: 100%; min-height: 44px; padding: 10px 12px;
  font-family: var(--font-num); font-size: 13px; line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal;
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--border-lit); border-radius: var(--radius-sm);
  user-select: all; -webkit-user-select: all;
}

/* ---------- Suivi ---------- */
.ns-liste { list-style: none; margin: 0; padding: 0; }
.ns-liste-l { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.ns-liste-l:first-child { border-top: 0; }
.ns-liste-date { font-family: var(--font-num); font-size: 12.5px; color: var(--muted); }
/* « En attente · expire le 23/09 à 08:36 » débordait de 3 px à 320 px (iPhone SE de
   première génération, Galaxy Fold replié) et décalait la page latéralement. */
.ns-liste-l .badge { min-width: 0; overflow-wrap: anywhere; white-space: normal; }

/* ---------- Page publique d'ouverture ---------- */
body.ns-page { background: var(--bg); color: var(--fg); }
.ns-shell { max-width: 620px; margin: 0 auto; padding: 24px 16px 40px; }
.ns-card { padding: 20px 18px; }
.ns-marque { margin: 0 0 18px; font-family: var(--font-brand); font-size: 12px; font-weight: 700; letter-spacing: .3em; color: var(--muted); }
.ns-titre { margin: 0 0 14px; font-size: 21px; line-height: 1.25; overflow-wrap: anywhere; }
.ns-avert { margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; }
.ns-avert-fort { border-left: 3px solid var(--warn); padding-left: 12px; }
.ns-delai { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.ns-alerte { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13.5px; background: var(--esp-danger-fond); border: 1px solid var(--esp-danger); color: var(--danger); }
.ns-btn { width: 100%; min-height: 48px; margin: 4px 0 0; justify-content: center; }
/* Le secret lui-même. `pre-wrap` : les retours à la ligne et les espaces multiples
   d'un mot de passe sont conservés ; `anywhere` replie une longue clé sans insérer
   de coupure — ce qui est copié est exactement ce qui a été écrit. */
.ns-secret {
  margin: 0 0 12px; padding: 14px;
  font-family: var(--font-num); font-size: 15px; line-height: 1.6;
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal;
  background: var(--bg-2); border: 1px solid var(--border-lit); border-radius: var(--radius-sm);
  color: var(--fg); user-select: all; -webkit-user-select: all;
}
.ns-secret:focus { outline: none; box-shadow: none; }
.ns-pied { margin: 18px 0 0; text-align: center; color: var(--dim); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; } :where(body:not(.espace)) .ns-pied { font-size: 12px; }

@media (min-width: 640px) {
  .ns-card { padding: 26px 26px 24px; }
  .ns-titre { font-size: 24px; }
}

/* Lien « écran complet » / « voir mes notes » sous un encart : SEUL dans son
   paragraphe, c'est une vraie cible tactile et non un lien en ligne dans une phrase
   — WCAG 2.5.8 demande alors 44 px de haut. Mesuré à 375 px dans Chrome. */
.ns-plus { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Impression ----------
   Le destinataire n'a qu'une seule chance : s'il ouvre la note sur un poste qui
   n'est pas celui où il doit saisir le mot de passe, il imprime. Or les navigateurs
   n'impriment PAS les fonds par défaut (« Graphiques d'arrière-plan » décoché) : le
   thème sombre laissait un texte presque blanc sur papier blanc, c'est-à-dire une page
   blanche à l'œil nu — et il s'en apercevait une fois la page fermée, donc trop
   tard. Même bloc que public/css/espace.css l. 300 et suivantes. */
@media print {
  body.ns-page { background: #fff !important; color: #000; }
  .ns-card, .ns-lien { background: #fff; border-color: #999; box-shadow: none; }
  .ns-secret, .ns-lien-champ { background: #fff; border-color: #000; color: #000; }
  .ns-marque, .ns-pied, .ns-delai, .ns-aide, .ns-lien-titre { color: #333; }
  .ns-avert, .ns-titre { color: #000; }
}

/* ---------- Saisies sans client (/temps/sans-client) ----------
   Mobile-first : une carte par boutique, une ligne par saisie empilée en
   bloc (jamais de tableau à faire défiler horizontalement sur un téléphone). À
   partir de 640 px, la ligne se remet sur un rang. Mesuré à 375 px. */
.sc-groupe { margin-top: 14px; }
/* Déjà facturées : présentes, mais délibérément SANS alarme. */
.sc-hors { margin-top: 22px; border-style: dashed; opacity: .88; }
.sc-hors .sc-titre { color: var(--muted); }
.sc-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.sc-titre { font-size: 15px; font-weight: 600; color: var(--fg); }
.sc-compte { color: var(--muted); font-size: 12px; font-family: var(--font-num); margin-left: auto; }
.sc-quoi { margin: 10px 0 12px; }
.sc-motif { margin: 0 0 6px; font-size: 13px; line-height: 1.55; color: var(--fg); }
/* Lien d'action SEUL sur sa ligne : vraie cible tactile (WCAG 2.5.8, 44 px). */
.sc-action { display: inline-flex; align-items: center; min-height: 44px; }
.sc-liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.sc-ligne { padding: 10px 0; border-bottom: 1px solid var(--border); }
.sc-ligne:last-child { border-bottom: 0; padding-bottom: 0; }
.sc-ligne-haut { display: flex; align-items: baseline; gap: 10px; }
.sc-date { font-family: var(--font-num); font-size: 12px; color: var(--muted); }
.sc-duree { font-family: var(--font-num); font-size: 13px; font-weight: 600; margin-left: auto; }
.sc-desc { font-size: 13px; line-height: 1.5; margin-top: 2px; overflow-wrap: anywhere; }
.sc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

@media (min-width: 640px) {
  .sc-ligne { display: flex; align-items: baseline; gap: 12px; }
  .sc-ligne-haut { flex: 0 0 auto; gap: 12px; }
  .sc-desc { flex: 1; margin-top: 0; }
  .sc-meta { margin-top: 0; }
  .sc-ligne .sc-duree { margin-left: 0; }
}

/* Alerte « n saisies sans client » : un lien, pas un bouton — l'action est d'aller
   voir. Rouge seulement s'il y en a : à zéro, l'indicateur disparaît. */
.sc-alerte {
  display: flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 8px 12px; margin: 0 0 12px;
  border-radius: var(--radius-sm);
  background: var(--esp-danger-fond); border: 1px solid var(--esp-danger);
  color: var(--danger); font-size: 13px; font-weight: 500; text-decoration: none;
}
.sc-alerte:hover { text-decoration: none; border-color: var(--danger); }
.sc-alerte strong { font-family: var(--font-num); }
/* Indicateur du tableau de bord : la même barre que l'état de synchro, mais
   cliquable — l'action attendue est d'aller voir la liste. */

/* ============================================================
   Liaison (lot du 23/09) : hub ↔ cockpits, une ligne par boutique.
   Mobile d'abord : une carte par boutique sous 900 px, grille-tableau au-delà —
   cinq colonnes ne tiennent pas plus tôt sans rogner les motifs d'échec, qui
   sont justement ce qu'on vient lire.
   ============================================================ */
.lsn-entete { margin-bottom: 16px; }
.lsn-tuiles { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lsn-tuile {
  display: flex; flex-direction: column; gap: 3px; padding: 10px 12px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.lsn-tuile i { font-style: normal; font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; } :where(body:not(.espace)) .lsn-tuile i { font-size: 12px; }
.lsn-tuile b { font-size: 20px; line-height: 1.1; }
.lsn-tuile b small { font-size: 12px; color: var(--muted); font-weight: 400; }
.lsn-tuile.ok b { color: var(--success); }
.lsn-tuile.warn b { color: var(--warn); }
.lsn-tuile.bad b { color: var(--danger); }
.lsn-tuile.vide b { color: var(--muted); }
@media (min-width: 640px) { .lsn-tuiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.lsn-liste { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.lsn-tete { display: none; }
.lsn-ligne {
  display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr);
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
}
/* Une boutique dont tout va bien s'efface : l'écran est fait pour les autres. */
.lsn-ligne.lsn-ok { opacity: .82; }
.lsn-ligne.lsn-ok:hover { opacity: 1; }
.lsn-site { display: flex; align-items: center; gap: 9px; min-width: 0; }
.lsn-nom { display: flex; flex-direction: column; min-width: 0; }
/* Le nom peut tenir sur deux lignes : en capitales il déborde la colonne à 375 px,
   et le rogner effacerait ce qui distingue deux boutiques d'un même client. */
.lsn-nom strong { overflow-wrap: anywhere; }
.lsn-nom small { color: var(--muted); font-size: 11.5px; } :where(body:not(.espace)) .lsn-nom small { font-size: 12px; }
.lsn-reveil, .lsn-push, .lsn-livraison { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lsn-reveil small, .lsn-push small, .lsn-livraison small { font-size: 12px; overflow-wrap: anywhere; }
.lsn-push b, .lsn-livraison b { font-size: 14px; }
.lsn-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.lsn-l { font-style: normal; font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; } :where(body:not(.espace)) .lsn-l { font-size: 12px; }
.lsn-action { display: flex; }
.lsn-action form { flex: 1; }
/* Cible de 44 px au doigt, pleine largeur sur téléphone : c'est le seul bouton de
   la carte, rien ne sert à le faire chercher. */
.lsn-action .btn { width: 100%; min-height: 44px; justify-content: center; }

.lsn-legende { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--muted); }
.lsn-legende li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lsn-legende strong { color: var(--fg); }

@media (min-width: 900px) {
  .lsn-liste { gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
  .lsn-tete, .lsn-ligne {
    display: grid; column-gap: 14px; row-gap: 2px;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.75fr) minmax(0, .85fr) minmax(0, 1.2fr) 150px;
    align-items: start;
  }
  .lsn-tete {
    padding: 10px 14px; background: var(--esp-surface); border-bottom: 1px solid var(--border-lit);
    color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700;
  } :where(body:not(.espace)) .lsn-tete { font-size: 12px; }
  .lsn-ligne { padding: 12px 14px; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: transparent; }
  .lsn-ligne:first-of-type { border-top: 0; }
  .lsn-ligne:hover { background: var(--esp-a100); }
  .lsn-action .btn { width: auto; min-height: 0; }
  /* Libellés des cellules : l'en-tête les porte ; gardés pour les lecteurs d'écran. */
  .lsn-l { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}

/* ==========================================================================
   CONTEXTE PROJET — le champ unique du header fixe (23/09/2026)
   Un projet choisi, et tout le tableau de bord ne parle plus que de lui.
   Ordinateur : un champ à plat dans le bandeau. Téléphone : une pastille qui
   ouvre le même formulaire dans une boîte sous l'en-tête (le bandeau n'a pas la
   place d'un champ texte à 320/375 px — mesuré avec les chronos).
   Un contexte ACTIF se voit toujours : liseré d'accent, nom en capitales. Un
   filtre global oublié fausse la lecture de tout l'écran.
   ========================================================================== */
/* Mise en page et habit du sélecteur : public/css/entete.css (barre foncée, 44 px, nom écrit à toutes les largeurs). */

/* Le rappel sous la barre d'outils du tableau de bord. */
.ctx-bandeau {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 8px 12px; font-size: 14px;
  border: 1px solid var(--esp-n300); border-left: 3px solid var(--esp-accent); border-radius: 0; background: var(--esp-panel);
}
.ctx-bandeau .ic { width: 16px; height: 16px; flex: none; color: var(--esp-ink); }
.ctx-bandeau form { margin: 0; }
.tk-ctx { margin-left: 8px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--esp-accent-text); }

/* Le chiffre « À faire » d'une autre boutique POSE le contexte : un vrai bouton,
   habillé comme le lien qu'il était. */
.parc-vers-projet { display: inline; margin: 0; }
button.chiffre-lien { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; }

/* 320 px ET trois chronos : il n'y a plus la place de tout (mesuré — les noms sont
   déjà à zéro, le troisième ■ sortait de 5 px). La pastille du contexte s'efface :
   le projet reste dit par le bandeau du tableau de bord, avec son « Tous les sites »,
   alors qu'un bouton d'arrêt hors de l'écran est un chrono qu'on laisse tourner.
   Requête de CONTENEUR et non de média : c'est la largeur du BANDEAU qui compte
   (et c'est elle que mesurent les bancs Chrome, bridés à 320 px dans une fenêtre
   qui ne descend pas sous 500). */
.hud-top { container: hud / inline-size; }
/* 340 px de CONTENU : la requête de conteneur lit la boîte de contenu du bandeau,
   marges intérieures (2 × 12 px) déduites — 320 px d'écran donnent 296 px. */
@container hud (max-width: 340px) {
  body.kl-chronos-3 .hud-top .ctx { display: none; }
}

/* ---------- Rapports d'audit de la fiche site (AuditReport, 24/09/2026) ----------
   Mobile d'abord : texte au-dessus, actions en dessous qui passent à la ligne. */
.ar-liste { list-style: none; margin: 0 0 6px; padding: 0; }
.ar-ligne { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.ar-ligne:first-child { border-top: 0; }
.ar-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 260px; }
.ar-txt > span { overflow-wrap: anywhere; }
.ar-etats { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.ar-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ar-actions form { margin: 0; }
.ar-actions .btn { min-height: 36px; }
.ar-depot .ar-case { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; font-weight: 400; }
.ar-depot .ar-case input { margin-top: 3px; flex: none; }
.ar-depot .btn { margin-top: 6px; min-height: 40px; }

/* ---------- Tâches cron (admin + espace) ----------
   Webcrons des sites (26/09/2026) : carte de la fiche, écran de la tâche, formulaire,
   détail d'une exécution. Feuille chargée AUSSI par l'espace client : classes .wc-*
   seulement. Mobile d'abord, aucune largeur fixe ; URL, en-têtes et réponses se replient
   (overflow-wrap: anywhere) : rien ne déborde à 375 px. */
.wc-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 10px; }
.wc-tete h2 { margin: 0; }
.wc-titre { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; }
.wc-titre strong, .wc-url, .wc-message { overflow-wrap: anywhere; }
/* Titre de l'écran de la tâche : .dsp-fiche-titre h1 est en flex (le texte devient un élément
   anonyme qui ne descend pas sous son plus long mot) ; un libellé snake_case déborderait. */
.dsp-fiche-titre .wc-h1 { min-width: 0; overflow-wrap: anywhere; }
.wc-etat-ligne { gap: 6px 8px; }
.wc-etat-ligne .small { overflow-wrap: anywhere; }
.wc-etat dd, .wc-detail dd { overflow-wrap: anywhere; }
.wc-attente { margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--border-lit); border-left: 3px solid var(--muted); border-radius: var(--radius-sm); background: var(--bg-2); font-size: 13px; }
.wc-attente.recente { border-left-color: var(--accent); }
.wc-attente a { display: inline-block; margin-left: 6px; padding: 4px 0; white-space: nowrap; }
/* Formulaire : un bloc par type de fréquence, affiché en CSS (aucun script : la CSP de
   l'espace bloque le script en ligne). Sans :has(), tous les blocs restent visibles. */
.wc-freq { min-width: 0; margin: 0 0 14px; padding: 0; border: 0; }
.wc-freq legend, .wc-sous-titre { display: block; padding: 0; margin: 0 0 5px; font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); } :where(body:not(.espace)) .wc-freq legend, :where(body:not(.espace)) .wc-sous-titre { font-size: 12px; }
.wc-types { display: grid; grid-template-columns: 1fr; gap: 6px; margin-bottom: 12px; }
.wc-type { align-items: center; min-height: 44px; margin: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-2); }
.wc-type input { margin-top: 0; }
.wc-type:has(input:checked) { border-color: var(--accent); }
.wc-f { display: none; }
form:has(#wc-t-minutes:checked) .wc-f-minutes,
form:has(#wc-t-heures:checked) .wc-f-heures,
form:has(#wc-t-semaine:checked) .wc-f-semaine,
form:has(#wc-t-mois:checked) .wc-f-mois,
form:has(#wc-t-jour:checked) .wc-f-heure,
form:has(#wc-t-semaine:checked) .wc-f-heure,
form:has(#wc-t-mois:checked) .wc-f-heure { display: block; }
@supports not selector(:has(*)) { .wc-f { display: block; } }
.wc-jours { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.wc-jours .dsp-case { align-items: center; min-height: 44px; margin: 0; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-2); }
.wc-jours .dsp-case input { margin-top: 0; }
.wc-f input[type=time] {
  width: 100%; max-width: 180px; background: var(--bg-2); color: var(--fg); color-scheme: dark;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 13px; font: 400 13.5px var(--font); line-height: 1.45; outline: none;
}
.wc-form input.invalide, .wc-form select.invalide { border-color: var(--danger); }
.wc-types[aria-invalid="true"] .wc-type, .wc-jours[aria-invalid="true"] .dsp-case { border-color: rgba(251, 95, 122, .6); }
.wc-boutons { margin: 4px 0 0; }
.wc-apercu { border-color: rgba(53, 208, 242, .45); }
.wc-date { white-space: nowrap; }
/* Historique : une ligne = un lien de 44 px au moins, sur deux rangées sous 640 px. */
.wc-hist-tete { gap: 8px 10px; }
/* Onglets « Toutes N · Réussies N · Échecs N » : plus larges qu'un écran de 320 px avec leurs
   compteurs, ils passent à la ligne (même règle que la .segmented de l'espace). */
.wc-hist-tete .dsp-onglets { flex-wrap: wrap; max-width: 100%; }
.wc-n { margin-left: 2px; font-family: var(--font-num); opacity: .75; }
.wc-hist { list-style: none; margin: 0; padding: 0; }
.wc-hist li + li { border-top: 1px solid var(--border); }
.wc-hist a { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 44px; padding: 8px 26px 8px 4px; border-radius: var(--radius-sm); color: var(--fg); text-decoration: none; }
.wc-hist a:hover, .wc-hist a:focus-visible { background: rgba(255, 255, 255, .04); }
.wc-h-l1, .wc-h-l2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; flex: 1 1 100%; }
.wc-h-l2 { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wc-h-date { font-family: var(--font-num); font-size: 12.5px; }
.wc-h-cause { color: var(--danger); overflow-wrap: anywhere; }
.wc-h-chevron { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); color: var(--muted); font-size: 16px; }
@media (min-width: 640px) {
  .wc-types { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .wc-jours { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .wc-h-l1 { flex: 0 0 auto; min-width: 15.5em; }
  .wc-h-l2 { flex: 1 1 0; }
}
/* Réponse d'une boutique : échappée, repliée, jamais plus large que l'écran. */
.wc-pre { margin: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font: 12px/1.5 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 60vh; overflow: auto; }

/* ============ Dashboard : mode « Disposer » ============ */
/* Déplacer les encarts et choisir leur largeur (demande de Franck du 24/09/2026).
   `.btn` impose display:inline-flex, qui annulerait l'attribut hidden : garde-fous. */
.dsp-bouton[hidden], .dsp-barre[hidden], .dsp-barre .btn[hidden], .dsp-note[hidden] { display: none; }
.dsp-barre {
  position: sticky; top: 54px; z-index: 30;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  margin: 0 0 14px; padding: 10px 12px;
  background: var(--card); border: 1px solid var(--border-lit); border-radius: var(--radius); box-shadow: none;
}
@media (max-width: 899px) { .dsp-barre { top: 48px; } }          /* mêmes valeurs que .tk-statuts */
.dsp-titre { font-family: var(--font-brand); font-size: 13px; text-transform: uppercase; letter-spacing: .13em; outline: none; }
.dsp-etat { color: var(--muted); }
.dsp-aide { flex-basis: 100%; margin: 0; }
/* Repère absolu ; tuiles d'une même rangée à la même hauteur. */
.dash.dsp-on { position: relative; align-items: stretch; }
/* Vue schéma : le contenu disparaît (ni lien, ni ligne cliquable, ni piste météo, ni
   poignée de ticket sous le doigt). !important : des enfants portent des display plus
   spécifiques ou en ligne. */
.dash.dsp-on > .card > :not(.dsp-outils) { display: none !important; }
.dash.dsp-on > .card { padding: 10px 12px; border-style: dashed; border-color: var(--border-lit); }
.dash.dsp-on > .card::after { display: none; }
@media (min-width: 900px) {
  /* 6 bandes de 4 pistes derrière les tuiles : les trous se voient. */
  .dash.dsp-on {
    background-image: linear-gradient(to right, var(--esp-a100) calc(100% - 14px), transparent 0);
    background-size: calc((100% + 14px) / 6) 100%;
  }
}
.dsp-outils { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 44px; }
.dsp-nom { flex: 1 1 7em; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.dsp-note { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--muted); }
.dsp-outils button { touch-action: manipulation; }
.dsp-poignee { touch-action: none; cursor: grab; font-size: 15px; }   /* condition du glisser au doigt */
@media (pointer: coarse) { .dsp-outils button { min-width: 44px; min-height: 44px; } }
.dsp-larg { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.dsp-larg-titre { font-size: 12px; color: var(--muted); }
@media (min-width: 900px) { .dsp-larg-titre { display: none; } }
.dsp-larg button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.dsp-outils [aria-disabled="true"] { opacity: .35; cursor: default; }
.dsp-bord {
  position: absolute; top: 50%; right: -7px; width: 14px; height: 36px; margin-top: -18px;
  border-radius: 7px; background: var(--border-lit); cursor: ew-resize; touch-action: none;
}
@media (hover: hover) { .dsp-bord:hover { background: var(--accent); } }
@media (max-width: 899px), (pointer: coarse) { .dsp-bord { display: none; } }
.dsp-fantome { opacity: .7; }
.dash.dsp-on > .dsp-glisse { z-index: 20; transition: none; cursor: grabbing; box-shadow: none; }
body.dsp-glisse-en-cours { user-select: none; -webkit-user-select: none; cursor: grabbing; }
.dsp-repere { position: absolute; z-index: 21; background: var(--accent); border-radius: 2px; pointer-events: none; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .dash.dsp-on * { transition: none !important; } }

/* ============ Facture libre (/facturation/nouvelle, 25/09/2026) ============ */
.fl-carte { max-width: 760px; }
.fl-titre { margin: 18px 0 8px; font-size: 14px; }
.fl-erreurs { margin: 0; padding-left: 18px; }
.fl-lignes { display: grid; gap: 10px; }
/* Téléphone : libellé sur toute la largeur, montant et ✕ dessous. */
.fl-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; align-items: end; }
.fl-ligne .field { margin-bottom: 0; min-width: 0; }
.fl-libelle { grid-column: 1 / -1; }
.fl-montant input { text-align: right; font-variant-numeric: tabular-nums; }
.fl-suppr { min-height: 40px; }
@media (min-width: 640px) {
  .fl-ligne { grid-template-columns: minmax(0, 1fr) 160px auto; }
  .fl-libelle { grid-column: auto; }
  /* Une seule ligne d'intitulés : les suivantes gardent leurs libellés pour les lecteurs d'écran. */
  .fl-ligne + .fl-ligne label {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
}
.fl-ajouter { margin-top: 10px; }
.fl-totaux {
  display: grid; grid-template-columns: auto auto; justify-content: end; gap: 4px 18px;
  margin: 16px 0 0; font-variant-numeric: tabular-nums;
}
.fl-totaux dt { color: var(--muted); text-align: right; }
.fl-totaux dd { margin: 0; text-align: right; font-family: var(--font-num); }
.fl-totaux .fl-ttc { font-weight: 700; color: var(--fg); }
.fl-actions { margin-top: 16px; display: flex; justify-content: flex-end; }
@media (max-width: 639px) { .fl-actions .btn { width: 100%; } }
.fl-cache {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.fl-montant input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.fl-boutique[hidden], .fl-plein[hidden] { display: none; }

/* ---------- Abonnements mensuels (fiche site, 30/09/2026) ---------- */
.abo-liste { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.abo { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 11px; display: grid; gap: 3px; }
.abo-arrete { opacity: .6; }
.abo-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.abo-montant { font-family: var(--font-num); font-size: 13px; white-space: nowrap; }
.abo-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.abo-actions form { margin: 0; }
.abo-form { display: grid; gap: 8px; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 640px) { .abo-form { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; } }
.abo-form .field { margin: 0; }
.abo-envoi .btn { width: 100%; }
@media (max-width: 767px) { .abo-actions .btn, .abo-envoi .btn { min-height: 44px; } }

/* ---------- Infobulle des lignes de facturation (01/10/2026) ---------- */
.fac-tip {
  position: fixed; z-index: 140; pointer-events: none;
  width: max-content; max-width: min(460px, calc(100vw - 16px));
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--esp-panel); border: 1px solid var(--esp-divider); border-top: 2px solid var(--esp-ink);
  box-shadow: var(--esp-shadow-lg); font-size: 13px; color: var(--fg);
}
.fac-tip-tete { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.fac-tip-tete strong { color: var(--fg); font-family: var(--font-num); }
.fac-tip-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.fac-tip-liste li { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.fac-tip-date, .fac-tip-duree { font-family: var(--font-num); font-size: 11.5px; color: var(--muted); white-space: nowrap; } :where(body:not(.espace)) .fac-tip-date, :where(body:not(.espace)) .fac-tip-duree { font-size: 12px; }
.fac-tip-duree { color: var(--accent); text-align: right; }
.fac-tip-lib { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fac-tip-tk { font-family: var(--font-num); font-size: 11px; color: var(--accent-2); } :where(body:not(.espace)) .fac-tip-tk { font-size: 12px; }
.fac-tip-site { font-size: 10.5px; color: var(--dim); } :where(body:not(.espace)) .fac-tip-site { font-size: 12px; }
.fac-tip-plus, .fac-tip-vide { margin-top: 6px; font-size: 11.5px; color: var(--muted); } :where(body:not(.espace)) .fac-tip-plus, :where(body:not(.espace)) .fac-tip-vide { font-size: 12px; }

/* Visionneuse d'images (01/10/2026) : <dialog> plein écran, image entière, mobile d'abord. */
.visio {
  position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: rgba(3, 6, 12, .92); color: #e8eef7;
  display: none; overscroll-behavior: contain;
}
.visio[open] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); }
.visio::backdrop { background: rgba(3, 6, 12, .6); backdrop-filter: blur(4px); }
.visio-barre {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 10px;
  padding: max(8px, env(safe-area-inset-top)) 12px 8px 16px; min-width: 0;
}
.visio-legende { flex: 1 1 auto; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visio-compte { font-family: var(--font-num); font-size: 12px; color: #9fb0c8; white-space: nowrap; }
.visio-bt {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 8px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06);
  color: #e8eef7; font-size: 22px; line-height: 1; text-decoration: none; cursor: pointer;
}
.visio-bt:hover, .visio-bt:focus-visible { background: rgba(53, 208, 242, .18); text-decoration: none; }
.visio-cadre { grid-row: 2; grid-column: 2; margin: 0; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 0 max(12px, env(safe-area-inset-bottom)); }
.visio-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); background: #fff1; }
.visio-nav {
  grid-row: 2; align-self: center; width: 44px; height: 72px; margin: 0 6px;
  border: 0; border-radius: 8px; background: rgba(255, 255, 255, .06); color: #e8eef7; font-size: 34px; cursor: pointer;
}
.visio-nav:hover, .visio-nav:focus-visible { background: rgba(53, 208, 242, .18); }
.visio-nav[hidden] { display: block; visibility: hidden; }
.visio-prec { grid-column: 1; }
.visio-suiv { grid-column: 3; }
@media (max-width: 599px) { .visio-nav { width: 36px; margin: 0 2px; } }
.ticket-desc img { cursor: zoom-in; }
/* Visionneuse de documents (09/10/2026) : PDF et aperçus d'e-mail en cadre, sous la barre. */
.visio-doc[open] { display: flex; flex-direction: column; }
.visio-bt[hidden], .visio-doc-attente[hidden] { display: none; }
.visio-doc-corps { position: relative; flex: 1 1 auto; min-height: 0; padding: 0 12px max(12px, env(safe-area-inset-bottom)); overflow: auto; -webkit-overflow-scrolling: touch; }
.visio-doc-cadre { display: block; width: 100%; height: 100%; border: 0; border-radius: 6px; background: #fff; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.visio-doc-html .visio-doc-cadre { max-width: 860px; margin: 0 auto; }
.visio-doc-attente { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; color: #9fb0c8; font-size: 13px; pointer-events: none; }
.visio-doc-refus { display: grid; justify-items: center; gap: 12px; padding: 48px 16px; text-align: center; }
@media (max-width: 599px) { .visio-doc-corps { padding: 0 0 env(safe-area-inset-bottom); } .visio-doc-cadre { border-radius: 0; } }

/* Relevés de l'en-tête rechargés en direct (01/10/2026) : le conteneur ne crée pas de boîte. */
.tele-direct { display: contents; }
.tele-direct > * { flex: none; }
/* Encart mis à jour en direct : remplacé sans effet (11/11/2026 : plus de liseré animé de 1,6 s). */

/* ── Modale Stats (01/10/2026) ─────────────────────────────────────────────────────
   Mobile d'abord : plein écran sous 900 px, réglages empilés, tuiles en colonne. */
@media (max-width: 899px) { .top-stats { display: inline-flex; } }
.stats-dlg {
  width: min(1100px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
  max-width: none; margin: auto; padding: 0; color: var(--fg);
  background: var(--esp-panel);
  border: 1px solid var(--esp-divider); border-top: 2px solid var(--esp-ink); border-radius: 0;
  box-shadow: var(--esp-shadow-xl);
  overflow: hidden auto; overscroll-behavior: contain;
}
.stats-dlg[open] { display: flex; flex-direction: column; }
.stats-dlg::backdrop { background: var(--esp-scrim); }
.stats-tete { display: flex; align-items: center; gap: 12px; padding: 14px 16px 6px 20px; position: sticky; top: 0; background: inherit; z-index: 1; }
.stats-titre { margin: 0; font-size: 18px; }
.stats-portee { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.stats-fermer { width: 44px; height: 44px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 24px; cursor: pointer; }
.stats-fermer:hover, .stats-fermer:focus-visible { color: var(--fg); background: var(--esp-n200); }
.stats-reglages { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 4px 20px 10px; border-bottom: 1px solid var(--border); }
.stats-ligne { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.stats-dates, .stats-comparaison { display: inline-flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.stats-dates[hidden], .stats-comparaison[hidden] { display: none; }
.stats-champ { display: grid; gap: 4px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; } :where(body:not(.espace)) .stats-champ { font-size: 12px; }
.stats-champ select, .stats-champ input { min-height: 44px; font-size: 16px; text-transform: none; letter-spacing: 0; }
.stats-coche { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; color: var(--fg); cursor: pointer; }
.stats-corps { padding: 12px 20px 18px; }
.stats-corps[aria-busy="true"] .stats-chiffres, .stats-corps[aria-busy="true"] .stats-graphe { opacity: .55; transition: opacity .2s; }
.stats-libelles { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.stats-chiffres { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .stats-chiffres { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stats-tuile { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--esp-n100); min-width: 0; }
.stats-tuile-titre { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; } :where(body:not(.espace)) .stats-tuile-titre { font-size: 12px; }
.stats-tuile-valeur { font-family: var(--font-num); font-size: 26px; font-weight: 800; color: var(--esp-ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stats-tuile-detail { font-size: 12px; color: var(--dim); overflow-wrap: anywhere; }
.stats-comp { color: var(--muted); }
.stats-delta.hausse { color: var(--esp-ink); font-weight: 800; }
.stats-delta.baisse { color: var(--esp-accent-text); font-weight: 800; }
.stats-graphe { position: relative; height: 320px; margin-top: 14px; }
.stats-note { margin: 10px 0 0; }
@media (max-width: 899px) {
  .stats-dlg { width: 100vw; max-height: 100dvh; height: 100dvh; border: 0; border-radius: 0; }
  .stats-graphe { height: 260px; }
  .stats-tuile-valeur { font-size: 22px; }
}

/* ---------- Volet « Tâches cron » (08/10/2026) ---------- */
.wcv-nouvelle { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wcv-nouvelle select { max-width: 260px; min-height: 36px; }
.wcv-filtres { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; margin: 0 0 12px; }
.wcv-filtres input[type="search"] { flex: 1 1 200px; min-width: 0; min-height: 36px; }
.wcv-filtres select { min-height: 36px; max-width: 100%; }
.wcv-groupe .wc-tete h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.wcv-compte { margin: 0 0 8px; }
.wcv-nouvelle .btn, .wcv-filtres .btn { min-height: 36px; }
@media (max-width: 760px) {
  .wcv-nouvelle .btn, .wcv-filtres .btn, .wcv-filtres select, .wcv-filtres input[type="search"], .wcv-nouvelle select { min-height: 40px; }
  .wcv-nouvelle, .wcv-nouvelle select { width: 100%; max-width: none; }
  .wcv-filtres select, .wcv-filtres .btn { flex: 1 1 100%; }
}

/* CHEMINS DE FICHIERS (filtre Twig « chemin », 19/10/2026) : un caractère invisible ou de direction dans un chemin
   reçu d'une boutique est montré en étiquette (« U+202E »), jamais appliqué. */
.chemin-invisible {
  display: inline-block; margin: 0 1px; padding: 0 3px; border-radius: 3px;
  font: 600 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; vertical-align: 1px;
  color: var(--esp-danger); background: var(--esp-danger-fond); border: 1px solid var(--esp-danger);
} :where(body:not(.espace)) .chemin-invisible { font-size: 12px; }

/* ============================================================
   TABLETTE AU DOIGT (iPad Pro 13, 31/10/2026)
   Franck : « utiliser DELMAK à toutes ses capacités sur l'iPad, la même version que sur
   le MacBook ». Même mise en page que l'ordinateur ; seules les CIBLES grandissent quand
   le pointeur principal est le doigt. Le Mac (pointeur fin) ne lit aucune de ces règles.
   ============================================================ */
@media (pointer: coarse) {
  /* En-tête : toutes les cibles font 44 px (R1), au doigt comme à la souris. */
  a.tele-item { min-height: 44px; display: inline-flex; align-items: center; }
  /* Actions des cartes ticket, aussi dans la liste /tickets (l'encart a sa règle dans tickets.css). */
  .tk-act { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; padding: 0 10px; }
  .tk-actions { gap: 8px; }
  /* Petits boutons communs : Facturation (Télécharger / Envoi test / Envoyer), Temps, encart Claude. */
  .btn.btn-sm { min-height: 44px; padding-inline: 14px; }
  /* Fenêtres : ✕ fermer et ‹ retour. */
  .mdl-nav { width: 44px; height: 44px; }
  /* Listes de choix (projet du chrono, sélecteur de l'en-tête) et palette « Aller à… ».
     Padding plutôt que flex : l'ellipse des noms longs reste. */
  .pal-item { min-height: 48px; }
}
/* Sans clavier physique, les rappels ⌘K / ⌘+↵ ne servent à rien. */
@media (hover: none) and (pointer: coarse) {
  kbd, .tq-astuce { display: none; }
}

/* Mon compte : « Se déconnecter » à droite du titre, passe dessous quand la place manque (02/11/2026). */
.compte-tete { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 4px 16px; }
.compte-tete .compte-deco { flex: 0 0 auto; margin-bottom: 14px; }
@media (pointer: coarse) { .compte-tete .compte-deco { min-height: 44px; } }   /* cible au doigt (iPad, téléphone) */

/* ==========================================================================================================
   2. SOCLE DU BO (miroir de la section 2 d'espace-viseur.css)
   ========================================================================================================== */
body:not(.espace) {
  background: var(--esp-bg);
  background-image: none;         /* ni halos ni grille d'instrument du SF */
  color: var(--esp-ink);
  font-family: var(--esp-font);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* PRINCIPE DU COCKPIT : aucun arrondi (ac-tokens.css, #admin-cockpit *). Une seule règle neutralise les
   border-radius d'app.css et des feuilles partagées. */
body:not(.espace) *,
body:not(.espace) *::before,
body:not(.espace) *::after { border-radius: 0 !important; }
/* Seule exception : la diode « en ligne » reste RONDE. Dans l'espace, la FORME de la diode code l'état
   (rond = en ligne, carré = hors ligne, losange = surveillance indisponible) pour qui ne distingue pas les
   teintes (WCAG 1.4.1) : l'arrondi y porte une information. */
body:not(.espace) .dot.up { border-radius: 50% !important; }

:where(body:not(.espace)) :focus { outline: none; }
/* Jamais l'anneau bleu natif : liseré d'accent, comme au cockpit. */
:where(body:not(.espace)) :focus-visible { outline: 2px solid var(--esp-accent); outline-offset: 2px; }
:where(body:not(.espace)) ::selection { background: rgba(236, 48, 19, .25); color: inherit; }
:where(body:not(.espace)) button { font-family: inherit; }
:where(body:not(.espace)) hr { border: 0; height: 1px; background: var(--esp-n300); margin: 24px 0; }
:where(body:not(.espace)) code,
:where(body:not(.espace)) .mono { font-family: var(--esp-mono); font-size: max(12px, .9em); }
:where(body:not(.espace)) kbd {
  border: 1px solid var(--esp-n400); background: var(--esp-champ); color: var(--esp-ink);
  font: 700 12px/1.4 var(--esp-font); padding: 1px 6px; box-shadow: inset 0 -1px 0 var(--esp-n400);
}
/* Toute valeur susceptible de changer est en chiffres à chasse fixe : pas de saut de largeur. */
:where(body:not(.espace)) .num,
:where(body:not(.espace)) td.num,
:where(body:not(.espace)) th.num { font-family: var(--esp-font); font-variant-numeric: tabular-nums; }
:where(body:not(.espace)) ::-webkit-scrollbar-thumb { background: var(--esp-n400); }
:where(body:not(.espace)) ::-webkit-scrollbar-thumb:hover { background: var(--esp-n600); }
:where(body:not(.espace)) ::-webkit-scrollbar-track { background: transparent; }

/* ---------- Titres ---------- */
:where(body:not(.espace)) h1 {
  margin: 0 0 6px; font-family: var(--esp-font); font-weight: 800; font-size: 28px; line-height: 1.12;
  letter-spacing: -.015em; color: var(--esp-ink); overflow-wrap: anywhere;
}
@media (min-width: 900px) { :where(body:not(.espace)) h1 { font-size: 34px; } }
/* h2 = titre de section : capitales espacées, carré d'accent (la marque du bandeau du cockpit). */
:where(body:not(.espace)) h2 {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font-family: var(--esp-font); font-size: 13px; font-weight: 800; line-height: 1.3;
  letter-spacing: .16em; text-transform: uppercase; color: var(--esp-ink);
}
:where(body:not(.espace)) h2::before {
  content: ''; flex: none; width: 9px; height: 9px; background: var(--esp-accent); box-shadow: none;
}
:where(body:not(.espace)) h3 {
  margin: 0 0 8px; font-family: var(--esp-font); font-size: 12px; font-weight: 800; line-height: 1.35;
  letter-spacing: .12em; text-transform: uppercase; color: var(--esp-muted);
}
:where(body:not(.espace)) .page-sub { margin: 0 0 22px; color: var(--esp-muted); font-size: 15px; }

/* ---------- Liens ----------
   Accent LISIBLE (#ae1800) ; souligné au survol. Pris dans une phrase, le lien est souligné d'office : sa
   teinte seule ne se distingue pas assez du texte (2,3:1, il faut 3:1 — WCAG 1.4.1). */
:where(body:not(.espace)) a { color: var(--esp-accent-text); text-decoration: none; }
:where(body:not(.espace)) a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
/* Spécificité nulle hors de `a` : une rangée de liens (.esp-site-liens…) les désoulignent d'une seule règle. */
:where(body:not(.espace)) :where(p, li, dd, .help, .flash) > a:where(:not([class])) {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}

/* ==========================================================================================================
   3. COMPOSANTS COMMUNS DU BO (miroir de la section 3 d'espace-viseur.css)
   ========================================================================================================== */

/* ---------- Panneau (carte) ----------
   Comme la fenêtre du cockpit : panneau clair, filet de 1 px, arête haute de 2 px à l'encre. Pas d'ombre :
   la carte est posée, elle ne flotte pas. */
:where(body:not(.espace)) .card {
  background: var(--esp-panel);
  border: 1px solid var(--esp-n300);
  border-top: 2px solid var(--esp-ink);
  box-shadow: none;
  padding: 20px;
  margin-bottom: 16px;
}
:where(body:not(.espace)) .card::before { content: none; }
:where(body:not(.espace)) .card.pad-sm { padding: 12px 14px; }
:where(body:not(.espace)) a.card { color: inherit; transition: background .12s, border-color .12s; }
:where(body:not(.espace)) a.card:hover { text-decoration: none; background: var(--esp-champ); border-color: var(--esp-n400); border-top-color: var(--esp-accent); }
@media (min-width: 900px) { :where(body:not(.espace)) .card { padding: 22px 24px; } }

/* ---------- Grilles : plus de place, plus de colonnes ---------- */
:where(body:not(.espace)) .grid { gap: 16px; }
@media (min-width: 1500px) {
  :where(body:not(.espace)) .grid-2 { gap: 20px; }
  :where(body:not(.espace)) .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Indicateurs (KPI) ----------
   Gros chiffre en 800, micro-libellé en capitales au-dessus : la rangée d'indicateurs du cockpit. L'état se
   lit à l'arête haute du panneau (encre : neutre ; accent clair : à surveiller ; accent : à traiter) ET à la
   couleur du chiffre ; la note dessous le dit en toutes lettres. */
:where(body:not(.espace)) .kpi { overflow: hidden; }
:where(body:not(.espace)) .kpi::after { content: none; }
:where(body:not(.espace)) .kpi .kpi-label {
  color: var(--esp-muted); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
:where(body:not(.espace)) .kpi .kpi-value {
  margin-top: 6px; font-family: var(--esp-font); font-size: 34px; font-weight: 800; line-height: 1.05;
  letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--esp-ink);
}
:where(body:not(.espace)) .kpi .kpi-value small { font-family: var(--esp-font); font-size: 14px; color: var(--esp-muted); font-weight: 600; }
:where(body:not(.espace)) .kpi.good .kpi-value { color: var(--esp-ink); }
:where(body:not(.espace)) .kpi.warn { border-top-color: var(--esp-alerte-vif); }
:where(body:not(.espace)) .kpi.warn .kpi-value { color: var(--esp-alerte); }
:where(body:not(.espace)) .kpi.bad { border-top-color: var(--esp-danger-vif); }
:where(body:not(.espace)) .kpi.bad .kpi-value { color: var(--esp-danger); }
:where(body:not(.espace)) .kpi.good::after,
:where(body:not(.espace)) .kpi.warn::after,
:where(body:not(.espace)) .kpi.bad::after { content: none; }

/* ---------- Boutons ----------
   Bouton principal : aplat d'accent, libellé blanc en capitales 800 (.acb-mbtn--primary). Secondaire :
   cadre d'encre (.acb-mbtn). Danger : cadre d'accent qui se remplit au survol (.ac-btn-compact). Ni biseau,
   ni dégradé, ni lueur. Libellé fer à gauche dans un bouton pleine largeur (règle du cockpit). */
:where(body:not(.espace)) .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--esp-accent-face);
  clip-path: none; filter: none; box-shadow: none;
  background: var(--esp-accent-face); color: #fff;
  font: 800 13px/1.2 var(--esp-font); letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
:where(body:not(.espace)) .btn:hover { background: var(--esp-accent-hover); border-color: var(--esp-accent-hover); color: #fff; filter: none; box-shadow: none; text-decoration: none; }
:where(body:not(.espace)) .btn:active { background: var(--esp-accent-press); border-color: var(--esp-accent-press); transform: none; box-shadow: none; }
:where(body:not(.espace)) .btn:focus-visible { outline: 2px solid var(--esp-accent); outline-offset: 2px; }
:where(body:not(.espace)) .btn.btn-ghost { background: transparent; border-color: var(--esp-ink); color: var(--esp-ink); box-shadow: none; }
:where(body:not(.espace)) .btn.btn-ghost:hover { background: var(--esp-n200); border-color: var(--esp-ink); color: var(--esp-ink); box-shadow: none; }
:where(body:not(.espace)) .btn.btn-danger { background: transparent; border-color: var(--esp-accent-face); color: var(--esp-accent-text); box-shadow: none; }
:where(body:not(.espace)) .btn.btn-danger:hover { background: var(--esp-accent-face); color: #fff; box-shadow: none; }
:where(body:not(.espace)) .btn.btn-sm { min-height: 36px; padding: 0 12px; font-size: 12px; letter-spacing: .08em; clip-path: none; }
:where(body:not(.espace)) .btn[disabled],
:where(body:not(.espace)) .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; filter: none; box-shadow: none; }
@media (pointer: coarse) { :where(body:not(.espace)) .btn.btn-sm { min-height: 44px; } }

/* ---------- Champs ----------
   Champ blanc, filet gris, encre au focus et soulignement d'accent (.acb-input). 16 px : iOS ne zoome pas. */
:where(body:not(.espace)) label {
  margin: 0 0 6px; color: var(--esp-ink);
  font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
:where(body:not(.espace)) input[type=text], :where(body:not(.espace)) input[type=email], :where(body:not(.espace)) input[type=password],
:where(body:not(.espace)) input[type=url], :where(body:not(.espace)) input[type=number], :where(body:not(.espace)) input[type=date],
:where(body:not(.espace)) input[type=search], :where(body:not(.espace)) input[type=tel], :where(body:not(.espace)) input[type=time],
:where(body:not(.espace)) input[type=datetime-local], :where(body:not(.espace)) input[type=month], :where(body:not(.espace)) input[type=week],
:where(body:not(.espace)) select, :where(body:not(.espace)) textarea {
  background-color: var(--esp-champ); color: var(--esp-ink);
  border: 1px solid var(--esp-n400);
  padding: 10px 12px; font: 400 16px/1.45 var(--esp-font);
  box-shadow: none; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
/* La flèche dessinée par app.css (dégradés à droite) garde sa place : le texte ne passe pas dessous. */
:where(body:not(.espace)) select { padding-right: 36px; }
:where(body:not(.espace)) input:focus, :where(body:not(.espace)) select:focus, :where(body:not(.espace)) textarea:focus {
  border-color: var(--esp-ink); box-shadow: inset 0 -2px 0 var(--esp-accent);
}
:where(body:not(.espace)) input::placeholder, :where(body:not(.espace)) textarea::placeholder { color: var(--esp-muted); opacity: 1; }
:where(body:not(.espace)) input[type=checkbox], :where(body:not(.espace)) input[type=radio] { accent-color: var(--esp-accent-face); }
/* Champ fichier : son bouton natif devient une cible de 44 px (R1), le nom du fichier choisi à 16 px (R3). */
:where(body:not(.espace)) input[type=file] { min-height: 44px; max-width: 100%; font: 400 16px var(--esp-font); color: var(--esp-muted); }
:where(body:not(.espace)) input[type=file]::file-selector-button {
  min-height: 44px; margin-right: 12px; padding: 0 14px; cursor: pointer;
  border: 1px solid var(--esp-ink); background: transparent; color: var(--esp-ink);
  font: 800 12px var(--esp-font); letter-spacing: .1em; text-transform: uppercase;
}
:where(body:not(.espace)) input[type=file]::file-selector-button:hover { background: var(--esp-n200); }
:where(body:not(.espace)) input:-webkit-autofill,
:where(body:not(.espace)) textarea:-webkit-autofill,
:where(body:not(.espace)) select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--esp-champ) inset; -webkit-text-fill-color: var(--esp-ink); caret-color: var(--esp-ink);
}
/* iPad et iPhone : le champ date natif de Safari garde une largeur et une hauteur à lui, et débordait de sa colonne
   (/temps, « Ajouter du temps à la main », 11/11/2026). Sans habillage natif, il suit la colonne. Seulement là où
   -webkit-touch-callout existe (Safari d'iOS et d'iPadOS) : sur Mac, le calendrier reste celui du navigateur. */
@supports (-webkit-touch-callout: none) {
  :where(body:not(.espace)) :is(input[type=date], input[type=time], input[type=datetime-local], input[type=month], input[type=week]) {
    -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; box-sizing: border-box;
  }
  :where(body:not(.espace)) ::-webkit-date-and-time-value { text-align: left; min-height: 1.45em; }
}
:where(body:not(.espace)) .field { margin-bottom: 16px; }
:where(body:not(.espace)) .help { margin-top: 5px; color: var(--esp-muted); font-size: 13px; }

/* ---------- Tableaux ----------
   En-têtes en micro-libellés, filet de 2 px à l'encre dessous, lignes séparées par un filet de 1 px
   (.ac-thead / .ac-row). La ligne survolée s'allume par la gauche (liseré d'accent). */
:where(body:not(.espace)) .table-wrap { border: 0; background: transparent; }
:where(body:not(.espace)) table { font-size: 14px; }
:where(body:not(.espace)) th {
  padding: 10px 14px 8px; background: transparent; color: var(--esp-muted);
  font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  border-bottom: 2px solid var(--esp-ink);
}
:where(body:not(.espace)) td { padding: 12px 14px; border-top: 0; border-bottom: 1px solid var(--esp-n300); }
/* En-tête de LIGNE (<th scope="row">, numéro de facture…) : une cellule comme les autres, pas un en-tête de colonne. */
:where(body:not(.espace)) tbody th,
:where(body:not(.espace)) tfoot th {
  padding: 12px 14px; border-bottom: 1px solid var(--esp-n300); color: var(--esp-ink);
  font-size: 14px; font-weight: 700; letter-spacing: .02em; text-transform: none;
}
:where(body:not(.espace)) tr.rowlink:hover td { background: var(--esp-n200); }
:where(body:not(.espace)) tr.rowlink:hover td:first-child { box-shadow: inset 3px 0 0 var(--esp-accent); }

/* ---------- Étiquettes (badges) ----------
   Puce cadrée en capitales (« INVITÉ » du cockpit). Neutre par défaut ; « bad » est PLEINE (on doit la voir
   d'un coup d'œil), « warn » est cadrée d'accent clair, « ok » reste à l'encre. */
:where(body:not(.espace)) .badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px;
  border: 1px solid var(--esp-n400); background: transparent; color: var(--esp-muted); box-shadow: none;
  font: 700 12px/1.3 var(--esp-font); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
:where(body:not(.espace)) .badge.ok { color: var(--esp-ink); border-color: var(--esp-n500); background: transparent; box-shadow: none; }
:where(body:not(.espace)) .badge.warn { color: var(--esp-alerte); border-color: var(--esp-alerte-vif); background: var(--esp-alerte-fond); box-shadow: none; }
:where(body:not(.espace)) .badge.bad,
:where(body:not(.espace)) .badge.danger { color: #fff; border-color: var(--esp-accent-face); background: var(--esp-accent-face); box-shadow: none; }
:where(body:not(.espace)) .badge.accent { color: var(--esp-accent-text); border-color: var(--esp-accent); background: transparent; box-shadow: none; }

/* ---------- Diodes ----------
   Carrées comme au cockpit (le point « live » est un carré de 7 px), sauf « en ligne » (ronde, voir §2).
   Plus de halo. La panne clignote toujours (neutralisé par « réduire les animations »). */
:where(body:not(.espace)) .dot { width: 9px; height: 9px; box-shadow: none; }
:where(body:not(.espace)) .dot.up { background: var(--esp-ink); box-shadow: none; }
:where(body:not(.espace)) .dot.down { background: var(--esp-danger-vif); box-shadow: none; }
:where(body:not(.espace)) .dot.unknown { background: var(--esp-n500); }
:where(body:not(.espace)) .dot.p3 { background: var(--esp-p1); box-shadow: none; }
:where(body:not(.espace)) .dot.p2 { background: var(--esp-p2); box-shadow: none; }
:where(body:not(.espace)) .dot.p1 { background: var(--esp-p3); box-shadow: none; }
:where(body:not(.espace)) .dot:is(.unknown, .p2) { transform: rotate(45deg) scale(.85); }

/* ---------- Messages (flash) ----------
   Barre d'état à liseré gauche de 3 px, fond du panneau, texte à l'encre : lisible, la teinte n'est que le
   signal. */
:where(body:not(.espace)) .flash {
  padding: 12px 16px 12px 16px; border: 1px solid var(--esp-n300); border-left: 3px solid var(--esp-ink);
  background: var(--esp-panel); color: var(--esp-ink); font-size: 14px;
}
:where(body:not(.espace)) .flash::before { content: none; }
:where(body:not(.espace)) .flash.success { background: var(--esp-panel); border-color: var(--esp-n300); border-left-color: var(--esp-ink); color: var(--esp-ink); }
:where(body:not(.espace)) .flash.error { background: var(--esp-danger-fond); border-color: var(--esp-a300); border-left-color: var(--esp-accent); color: var(--esp-a900); }
:where(body:not(.espace)) .flash.info { background: var(--esp-n100); border-color: var(--esp-n300); border-left-color: var(--esp-n700); color: var(--esp-ink); }
:where(body:not(.espace)) .flash.warn { background: var(--esp-alerte-fond); border-color: var(--esp-a300); border-left-color: var(--esp-alerte-vif); color: var(--esp-a900); }

/* ---------- Sélecteurs segmentés (.ac-seg du cockpit) ----------
   Groupe cadré, options en capitales. L'option courante est À L'ENCRE pour un filtre neutre (période, vue) —
   l'accent est réservé à ce qui alerte — et à l'accent quand la page le demande (.seg.on.accent). */
:where(body:not(.espace)) .segmented { border: 1px solid var(--esp-divider); background: transparent; }
:where(body:not(.espace)) .seg {
  min-height: 40px; padding: 0 14px; border-right: 1px solid var(--esp-divider);
  color: var(--esp-muted); font: 700 12px var(--esp-font); letter-spacing: .08em; text-transform: uppercase;
}
:where(body:not(.espace)) .seg:hover { background: var(--esp-n200); color: var(--esp-ink); text-decoration: none; }
:where(body:not(.espace)) .seg.on { background: var(--esp-ink); color: #fff; font-weight: 800; box-shadow: none; }
:where(body:not(.espace)) .seg.on.accent { background: var(--esp-accent-face); color: #fff; box-shadow: none; }
:where(body:not(.espace)) .seg.on.ok { background: var(--esp-ink); color: #fff; box-shadow: none; }
:where(body:not(.espace)) .seg.on:not(.accent):not(.ok) { box-shadow: none; }
@media (pointer: coarse) { :where(body:not(.espace)) .seg { min-height: 44px; } }

/* ---------- Pastilles et divers ---------- */
:where(body:not(.espace)) .pill {
  border: 1px solid var(--esp-n400); background: transparent; color: var(--esp-ink); box-shadow: none;
  font: 700 12px/1.4 var(--esp-font); letter-spacing: .06em; text-transform: uppercase;
}
:where(body:not(.espace)) .pill:hover { border-color: var(--esp-ink); color: var(--esp-ink); box-shadow: none; }
:where(body:not(.espace)) .section-pill { border-color: var(--esp-n400); background: transparent; color: var(--esp-muted); font-size: 12px; }
:where(body:not(.espace)) .nav-badge { background: var(--esp-accent-face); color: #fff; box-shadow: none; }
:where(body:not(.espace)) .muted { color: var(--esp-muted); }
:where(body:not(.espace)) .small { font-size: 13px; }
:where(body:not(.espace)) .empty { color: var(--esp-muted); }
:where(body:not(.espace)) .empty .big { filter: none; }
:where(body:not(.espace)) .token-box { background: var(--esp-champ); border: 1px dashed var(--esp-n400); }
:where(body:not(.espace)) .toolbar { gap: 10px; }
/* Chiffres de site (aperçu) : la rangée d'indicateurs du cockpit, filet de 2 px à gauche de chaque valeur. */
:where(body:not(.espace)) .site-metrics { gap: 8px; }
:where(body:not(.espace)) .site-metrics .m { background: transparent; border: 0; border-left: 2px solid var(--esp-divider); padding: 2px 10px; }
:where(body:not(.espace)) .site-metrics .m b { font-family: var(--esp-font); font-size: 24px; font-weight: 800; line-height: 1.15; }
:where(body:not(.espace)) .site-metrics .m span { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--esp-muted); }
:where(body:not(.espace)) .site-metrics .m.warn { border-left-color: var(--esp-alerte-vif); }
:where(body:not(.espace)) .site-metrics .m.warn b { color: var(--esp-alerte); }
:where(body:not(.espace)) .site-metrics .m.bad { border-left-color: var(--esp-danger-vif); }
:where(body:not(.espace)) .site-metrics .m.bad b { color: var(--esp-danger); }
/* Barre réseau / application (performances). */
:where(body:not(.espace)) .perf-bar { height: 10px; background: var(--esp-n200); border: 0; }
:where(body:not(.espace)) .perf-bar > span.reseau { background: var(--esp-n500); }
:where(body:not(.espace)) .perf-bar > span.appli { background: var(--esp-accent); box-shadow: none; }
:where(body:not(.espace)) .perf-legend i.reseau { background: var(--esp-n500); }
:where(body:not(.espace)) .perf-legend i.appli { background: var(--esp-accent); }
/* Jauge circulaire (si une page en affiche une). */
:where(body:not(.espace)) .health-ring { --ring: var(--esp-ink); filter: none; background: conic-gradient(var(--ring) calc(var(--p) * 1%), var(--esp-n200) 0); }
:where(body:not(.espace)) .health-ring::before { background: var(--esp-panel); border-color: var(--esp-n300); }
:where(body:not(.espace)) .health-ring::after { content: none; }
:where(body:not(.espace)) .health-ring.warn { --ring: var(--esp-alerte-vif); }
:where(body:not(.espace)) .health-ring.bad { --ring: var(--esp-danger-vif); }
:where(body:not(.espace)) .health-ring.na { --ring: var(--esp-n200); }
/* Commentaires et description de ticket (repris d'app.css, rendus clairs ; la page des tickets les affine). */
:where(body:not(.espace)) .comment { background: var(--esp-panel); border: 1px solid var(--esp-n300); }
:where(body:not(.espace)) .comment.hub { background: var(--esp-n100); border-color: var(--esp-n400); }
:where(body:not(.espace)) .ticket-desc { background: var(--esp-champ); border: 1px solid var(--esp-n300); }
:where(body:not(.espace)) .pager-etat { color: var(--esp-muted); font-size: 13px; }
/* Note secrète (encart de l'aperçu, page /espace/note-secrete) : champ blanc, et la CHASSE FIXE est gardée —
   on y écrit des mots de passe, un l et un 1 doivent se distinguer avant l'envoi (app.css le faisait par
   --font-num, devenue Archivo dans l'espace). */
:where(body:not(.espace)) .ns-zone { background: var(--esp-champ); border-color: var(--esp-n400); font-family: var(--esp-mono); }
:where(body:not(.espace)) .ns-zone:focus { border-color: var(--esp-ink); box-shadow: inset 0 -2px 0 var(--esp-accent); }
:where(body:not(.espace)) .ns-lien { border-color: var(--esp-accent); background: var(--esp-a100); }
:where(body:not(.espace)) .ns-lien-titre { color: var(--esp-accent-text); }
:where(body:not(.espace)) .ns-lien-champ,
:where(body:not(.espace)) .ns-secret { font-family: var(--esp-mono); background: var(--esp-champ); }
/* Détails repliables (<details>) : le triangle natif garde la couleur du texte. */
:where(body:not(.espace)) summary { cursor: pointer; }

/* ==========================================================================================================
   4. BO AU DOIGT : réglages par-dessus le miroir (règles R1 à R15 du plan, 10/11/2026)
   Tout est sous :where(body:not(.espace)) : l'espace client ne lit RIEN de cette section.
   ========================================================================================================== */
:where(body:not(.espace)) {
  --vi-cible: 44px;          /* plus petite cible au doigt (R1) */
  --vi-entete-h: 45px;       /* en-tête fixe (44 px + son filet) */
  --vi-pied-h: 36px;         /* pied fixe, SANS la zone sûre (ajoutée à part) */
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 899px) { :where(body:not(.espace)) { --vi-entete-h: 43px; } }

/* R1 : 44 px partout, souris comme doigt. */
:where(body:not(.espace)) .btn.btn-sm { min-height: 44px; }
:where(body:not(.espace)) .seg { min-height: 44px; }
/* R3 : champs de 44 px au moins, 16 px (iOS ne zoome pas au focus) ; zone de texte de 88 px. */
:where(body:not(.espace)) :is(input[type=text], input[type=email], input[type=password], input[type=url], input[type=number],
  input[type=date], input[type=search], input[type=tel], input[type=time], input[type=datetime-local], input[type=month], input[type=week], select) { min-height: 44px; }
:where(body:not(.espace)) textarea { min-height: 88px; }
/* R12 : un appui se voit. */
:where(body:not(.espace)) .btn.btn-ghost:active { background: var(--esp-n300); }
:where(body:not(.espace)) .btn.btn-danger:active { background: var(--esp-accent-press); border-color: var(--esp-accent-press); color: #fff; }
:where(body:not(.espace)) .seg:active { background: var(--esp-n300); }
:where(body:not(.espace)) a.card:active,
:where(body:not(.espace)) tr.rowlink:active td { background: var(--esp-n300); }
/* R13 : rien ne bouge au repos — la diode « hors ligne » ne clignote plus dans le BO (sa FORME carrée dit l'état). */
:where(body:not(.espace)) .dot.down { animation: none; }
/* R8 : un tableau large défile DANS son cadre ; la page, jamais. Filet d'encre de 2 px sur le bord qui cache encore
   des colonnes (classes posées par tactile.js). */
:where(body:not(.espace)) .table-wrap {
  overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  border-left: 2px solid transparent; border-right: 2px solid transparent;
}
:where(body:not(.espace)) .table-wrap.vi-plus-droite { border-right-color: var(--esp-ink); }
:where(body:not(.espace)) .table-wrap.vi-plus-gauche { border-left-color: var(--esp-ink); }
/* La ligne au-dessus d'un tableau qui cache encore des colonnes : posée par le gabarit (.vi-defile-reserve, parc),
   remplie par tactile.js. Sa place est toujours gardée — elle paraît sans rien pousser (11/11/2026, BO fluide). */
.vi-defile { margin: 0 0 6px; text-align: right; font: 800 12px/1.3 var(--esp-font); letter-spacing: .08em; text-transform: uppercase; color: var(--esp-muted); }
.vi-defile[hidden] { display: none; }
.vi-defile-reserve:not(.vi-on) { visibility: hidden; }
/* Description d'un ticket (un tableau collé plus large qu'elle) : même filet que les tableaux. */
:where(body:not(.espace)) .ticket-desc.vi-plus-droite { box-shadow: inset -2px 0 0 var(--esp-ink); }
:where(body:not(.espace)) .ticket-desc.vi-plus-gauche { box-shadow: inset 2px 0 0 var(--esp-ink); }
:where(body:not(.espace)) .ticket-desc.vi-plus-droite.vi-plus-gauche { box-shadow: inset -2px 0 0 var(--esp-ink), inset 2px 0 0 var(--esp-ink); }
/* Parc : plus de première colonne figée (11/11/2026). Une cellule collante par ligne = un calque par ligne qui suit le
   défilement : sur l'iPad, c'est ce qui vidait le milieu du tableau (tuiles jetées). Le tableau glisse d'un bloc. */

/* Reprises tactiles du Parc (tactile.md, P2). */
:where(body:not(.espace)) :is(button, a).chiffre-lien { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
:where(body:not(.espace)) .parc-liens { display: inline-flex; gap: 8px; }
:where(body:not(.espace)) .parc-liens a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: 0; padding: 0 10px;
  border: 1px solid var(--esp-n400); background: transparent; color: var(--esp-ink);
  font: 800 12px var(--esp-font); letter-spacing: .1em; text-transform: uppercase;
}
:where(body:not(.espace)) .parc-liens a:hover { border-color: var(--esp-ink); background: var(--esp-n200); color: var(--esp-ink); }
:where(body:not(.espace)) .parc-liens a:active { background: var(--esp-n300); }
:where(body:not(.espace)) .parc-liens a.parc-bo-vide { border-style: dashed; opacity: 1; color: var(--esp-muted); }
:where(body:not(.espace)) .parc-ctx-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; margin: 0 0 0 4px;
  border: 1px solid var(--esp-n400); background: transparent; color: var(--esp-ink); opacity: 1; line-height: 1;
}
:where(body:not(.espace)) .parc-ctx-btn:hover { background: var(--esp-n200); color: var(--esp-ink); }
:where(body:not(.espace)) .parc-ctx-btn:active { background: var(--esp-n300); }
:where(body:not(.espace)) .parc-nom { min-height: 44px; }

/* Règles d'app.css partagées avec l'espace (gabarits gelés) : l'habit SF est retiré ICI pour le BO seul,
   l'espace garde son rendu à l'identique (contrôle C3). */
:where(body:not(.espace)) tr.rowlink:has(.rowlink-cible:focus-visible) td { background: var(--esp-n200); }
:where(body:not(.espace)) .wc-f input[type=time] { color-scheme: light; }
:where(body:not(.espace)) .wc-types[aria-invalid="true"] .wc-type,
:where(body:not(.espace)) .wc-jours[aria-invalid="true"] .dsp-case { border-color: var(--esp-danger); }
:where(body:not(.espace)) .wc-apercu { border-color: var(--esp-accent); }
:where(body:not(.espace)) .wc-hist a:focus-visible, :where(body:not(.espace)) .wc-hist a:hover { background: var(--esp-n200); }
:where(body:not(.espace)) .dsp-courbe-zone .panne { fill: var(--esp-a200); }
:where(body:not(.espace)) .dsp-legende i.panne { background: var(--esp-a300); }
:where(body:not(.espace)) .dsp-barres .b.auj { box-shadow: inset 0 -3px 0 var(--esp-accent); }
/* Visionneuse : reste SOMBRE (on regarde une image), mais à l'encre Viseur, sans flou ni teinte bleue. */
:where(body:not(.espace)) .visio { background: rgba(32, 30, 29, .96); color: #fff; }
:where(body:not(.espace)) .visio::backdrop { background: var(--esp-scrim); backdrop-filter: none; -webkit-backdrop-filter: none; }
:where(body:not(.espace)) .visio-compte,
:where(body:not(.espace)) .visio-doc-attente { color: var(--esp-barre-encre); }
:where(body:not(.espace)) .visio-bt { border: 1px solid var(--esp-barre-bd); background: transparent; color: #fff; }
:where(body:not(.espace)) .visio-nav { background: transparent; color: #fff; }
:where(body:not(.espace)) :is(.visio-bt, .visio-nav):focus-visible, :where(body:not(.espace)) :is(.visio-bt, .visio-nav):hover { background: var(--esp-accent-face); }
:where(body:not(.espace)) :is(.visio-bt, .visio-nav):active { background: var(--esp-accent-press); }
:where(body:not(.espace)) :is(.visio-img, .visio-doc-cadre) { box-shadow: var(--esp-shadow-xl); }
@media (max-width: 599px) { :where(body:not(.espace)) .visio-nav { width: 44px; } }

/* Modales et <dialog> : plein écran sous 600 px (R12). */
@media (max-width: 599px) {
  :where(body:not(.espace)) :is(.memo-dlg, .stats-dlg, .chrono-dlg) { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; }
  :where(body:not(.espace)) .pal { padding: 0; }
  :where(body:not(.espace)) .pal-box { max-width: none; max-height: none; height: 100dvh; border: 0; }
}

/* Connexion, mot de passe oublié, nouveau mot de passe, inscription (security/*.html.twig) : la boîte centrée
   encadrée des quatre équerres, sur le modèle des pages publiques de l'espace client. Champs à 16 px (app.css § 4),
   bouton plein de 44 px, « Rester connecté » dans une rangée de 44 px, liens de 44 px. */
:where(body:not(.espace)) .auth-wrap { min-height: 100vh; min-height: 100dvh; padding: 32px 16px calc(32px + env(safe-area-inset-bottom, 0px)); }
:where(body:not(.espace)) .auth-box { max-width: 440px; }
:where(body:not(.espace)) .auth-box > .brand {
  display: flex; justify-content: center; align-items: center; gap: 10px; margin: 0 0 12px;
  font: 800 13px/1.2 var(--esp-font); letter-spacing: .24em; text-transform: uppercase; color: var(--fg);
}
:where(body:not(.espace)) .auth-box > .brand .brand-carre { width: 8px; height: 8px; }
:where(body:not(.espace)) .auth-box > .tagline { font-size: 14px; line-height: 1.45; margin: 0 0 26px; }
:where(body:not(.espace)) .auth-box > .card { position: relative; padding: 26px 24px 22px; }
:where(body:not(.espace)) .auth-box > .card::after {
  content: ''; position: absolute; inset: -10px; pointer-events: none;
  background:
    linear-gradient(var(--esp-ink), var(--esp-ink)) top left / 16px 2px no-repeat,
    linear-gradient(var(--esp-ink), var(--esp-ink)) top left / 2px 16px no-repeat,
    linear-gradient(var(--esp-ink), var(--esp-ink)) top right / 16px 2px no-repeat,
    linear-gradient(var(--esp-ink), var(--esp-ink)) top right / 2px 16px no-repeat,
    linear-gradient(var(--esp-ink), var(--esp-ink)) bottom left / 16px 2px no-repeat,
    linear-gradient(var(--esp-ink), var(--esp-ink)) bottom left / 2px 16px no-repeat,
    linear-gradient(var(--esp-ink), var(--esp-ink)) bottom right / 16px 2px no-repeat,
    linear-gradient(var(--esp-ink), var(--esp-ink)) bottom right / 2px 16px no-repeat;
}
.auth-case { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 4px 0 16px; color: var(--fg); font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; cursor: pointer; }
.auth-case input[type=checkbox] { width: 20px; height: 20px; min-height: 0; margin: 0; flex: none; accent-color: var(--esp-accent-face); }
.btn.auth-envoyer { width: 100%; min-height: 44px; justify-content: center; }
.auth-lien { margin: 8px 0 0; text-align: center; font-size: 14px; }
.auth-lien a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-weight: 700; }

/* Suivi d'une demande (suivi/page.html.twig, page publique) : ce que portaient trois style= refusés par la CSP. */
:where(body:not(.espace)) .ns-numero { margin: 0 0 4px; }
:where(body:not(.espace)) .btn.ns-envoyer { min-height: 44px; justify-content: center; }

/* ==========================================================================================================
   5. CLASSES UTILITAIRES DU BO (préfixe vi-, contrat du socle pour les autres écrans — socle/CONTRAT.md)
   ========================================================================================================== */
/* Micro-libellé : capitales espacées 12 px, gris. */
.vi-micro { font-family: var(--esp-font); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--esp-muted); }
/* Sur-titre d'encart (« 02 / TICKETS ») : accent lisible. */
.vi-kicker { display: block; margin: 0 0 4px; font-family: var(--esp-font); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--esp-accent-text); }
/* Rangée de liste : 44 px, filet dessous ; visée (survol, focus, .on) = liseré d'accent de 3 px à gauche. */
.vi-ligne { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-bottom: 1px solid var(--esp-n300); color: inherit; text-decoration: none; }
.vi-ligne:focus-visible, .vi-ligne.on { background: var(--esp-n200); box-shadow: inset 3px 0 0 var(--esp-accent); text-decoration: none; } @media (hover: hover) { .vi-ligne:hover { background: var(--esp-n200); box-shadow: inset 3px 0 0 var(--esp-accent); text-decoration: none; } }
.vi-ligne:active { background: var(--esp-n300); }
/* Bouton icône : 44 × 44, cadre gris, encre. */
.vi-btn-icone {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; padding: 0; cursor: pointer;
  border: 1px solid var(--esp-n400); background: transparent; color: var(--esp-ink); font: 700 16px/1 var(--esp-font);
}
@media (hover: hover) { .vi-btn-icone:hover { border-color: var(--esp-ink); background: var(--esp-n200); } }
.vi-btn-icone:active { background: var(--esp-n300); }
/* Poignée de glisser : 44 × 44, le doigt déplace l'élément au lieu de faire défiler. */
.vi-poignee {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--esp-muted);
  cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
@media (hover: hover) { .vi-poignee:hover { color: var(--esp-ink); background: var(--esp-n200); } }
.vi-poignee:active { cursor: grabbing; background: var(--esp-n300); }
/* Glisser-déposer : carte d'origine estompée, copie qui suit le doigt, repère d'insertion, zone de dépôt. */
.vi-glisse { opacity: .4; }
.vi-flotte { position: fixed; z-index: 130; pointer-events: none; background: var(--esp-panel); border: 1px solid var(--esp-ink); box-shadow: var(--esp-shadow-lg); }
.vi-repere { position: absolute; z-index: 21; pointer-events: none; min-width: 3px; min-height: 3px; background: var(--esp-accent); }
.vi-repere::before, .vi-repere::after { content: ''; position: absolute; width: 9px; height: 9px; border: 0 solid var(--esp-accent); }
.vi-repere::before { left: -3px; top: -3px; border-left-width: 3px; border-top-width: 3px; }
.vi-repere::after { right: -3px; bottom: -3px; border-right-width: 3px; border-bottom-width: 3px; }
.vi-depot { border: 2px dashed var(--esp-accent); background: var(--esp-a100); }
/* Menu « Déplacer vers… » (le glisser a toujours un équivalent à l'appui, R7) : liste de rangées de 44 px ;
   sous 600 px, feuille collée au bas de l'écran. */
.vi-menu {
  position: absolute; z-index: 125; min-width: 220px; max-width: min(360px, calc(100vw - 32px)); margin: 0; padding: 0; list-style: none;
  background: var(--esp-panel); border: 1px solid var(--esp-divider); border-top: 2px solid var(--esp-ink); box-shadow: var(--esp-shadow-lg);
  overscroll-behavior: contain;
}
.vi-menu > li > :is(a, button) {
  display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 14px; border: 0; border-bottom: 1px solid var(--esp-n300);
  background: transparent; color: var(--esp-ink); font: 600 15px var(--esp-font); text-align: left; text-decoration: none; cursor: pointer;
}
.vi-menu > li > :is(a, button):focus-visible { background: var(--esp-n200); box-shadow: inset 3px 0 0 var(--esp-accent); } @media (hover: hover) { .vi-menu > li > :is(a, button):hover { background: var(--esp-n200); box-shadow: inset 3px 0 0 var(--esp-accent); } }
.vi-menu > li > :is(a, button):active { background: var(--esp-n300); }
@media (max-width: 599px) {
  .vi-menu { position: fixed; left: 0; right: 0; bottom: 0; top: auto; max-width: none; padding-bottom: env(safe-area-inset-bottom, 0px); max-height: 70dvh; overflow-y: auto; }
}
/* Bulle d'information (tactile.js) : ce que disait le seul title= s'ouvre d'un appui (R5). */
[data-bulle]:not(a, button) { cursor: help; }
/* Appui long (½ s) sur un lien ou un bouton qui porte une bulle : Safari (iPad, iPhone) n'ouvre plus son menu
   (aperçu du lien, « Copier ») ni la sélection du texte, qui recouvraient la bulle. Les barres du haut et du pied
   ne se sélectionnent pas non plus au doigt (comme Pocket, pocket.css) ; les panneaux du pied (Accès rapide,
   montants) restent sélectionnables. */
:where(body:not(.espace)) :is(a, button, summary, [role="button"])[data-bulle],
.hud-top, .hud-pied :is(.vi-pied-bt, .acces-btn) { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* Sur iPad, un appui long sur un lien lance aussi le glisser-déposer du lien (pointercancel) : la bulle ne venait
   jamais. Un lien porteur de bulle ne se glisse plus. */
:where(body:not(.espace)) a[data-bulle] { -webkit-user-drag: none; }
/* … sauf leurs champs (chrono, sélecteur de site, Accès rapide, Mémo) : sans cela, Safari d'iOS refuse d'y écrire. */
:is(.hud-top, .hud-pied) :is(input, textarea, select, [contenteditable="true"]) { -webkit-touch-callout: default; -webkit-user-select: text; user-select: text; }
.vi-bulle {
  position: fixed; z-index: 150; max-width: min(320px, calc(100vw - 32px)); margin: 0; padding: 10px 12px;
  background: #201e1d; color: #fff; border-top: 2px solid var(--esp-accent); box-shadow: var(--esp-shadow-lg);
  font: 400 13px/1.45 var(--esp-font); overflow-wrap: anywhere;
}
.vi-bulle[hidden] { display: none; }
/* État écrit, précédé d'un carré de 6 px (la couleur n'est jamais seule, R4). */
.vi-etat { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.vi-etat::before { content: ''; flex: none; width: 6px; height: 6px; background: currentColor; }
.vi-etat.ok::before { background: var(--esp-ink); }
.vi-etat.warn::before { background: var(--esp-alerte-vif); }
.vi-etat.bad::before { background: var(--esp-accent); }
/* Montant masqué : « — » et le micro-libellé « MASQUÉ ». */
.vi-masque { display: inline-flex; align-items: baseline; gap: 6px; color: var(--esp-muted); }
.vi-masque::after { content: 'MASQUÉ'; font-size: 12px; font-weight: 800; letter-spacing: .12em; }

/* R1 « partout, pas seulement au doigt » (11/11/2026) : les dernières petites cibles relevées par la sonde sur le Mac
   (souris), portées à 44 px. Rien de tout cela n'existe dans l'espace client ; la portée :where() le garantit. */
:where(body:not(.espace)) .tq-as { min-height: 44px; }
:where(body:not(.espace)) .memo-bt, :where(body:not(.espace)) .memo-fermer { width: 44px; height: 44px; }
:where(body:not(.espace)) .fl-suppr { min-height: 44px; min-width: 44px; }
:where(body:not(.espace)) .sec-act-bouton { width: 44px; height: 44px; }
:where(body:not(.espace)) .sec-liste li.sec-ligne { min-height: 44px; padding-right: 44px; }
:where(body:not(.espace)) .sec-liste li.sec-ligne > .sec-act { margin-right: -44px; }
:where(body:not(.espace)) :is(.sec-liste a, .sec-liens a, .sec-note a, .sec-avert a) { display: inline-flex; align-items: center; min-height: 44px; }
:where(body:not(.espace)) :is(.sec-act-choix > select, .sec-act-choix > input[type=text], .sec-act-go, .sec-act-confirme, .sec-ignores a,
  .jr-reactiver .btn, .jr-ignores, .secx-reactiver .btn, .secx-filtres .btn) { min-height: 44px; }
:where(body:not(.espace)) :is(.sec-act-choix > select, .sec-act-choix > input[type=text]) { font-size: 16px; }
/* R3 : cases à cocher et boutons radio de 20 px (16 px auparavant). */
:where(body:not(.espace)) :is(input[type=checkbox], input[type=radio]) { width: 20px; height: 20px; }
/* Demandes de pages-1 (RETOUR.md) : l'emoji décoratif des écrans vides n'est plus montré dans le BO (la phrase suffit,
   « menus sans pictos ») ; le chiffre « 0 » des utilisateurs d'un client n'est plus estompé (contraste 4,5:1). */
:where(body:not(.espace)) .empty .big { display: none; }
:where(body:not(.espace)) .parc-users .parc-users-vide { opacity: 1; color: var(--esp-muted); }
/* Passe finale (sonde du 11/11/2026) : un <small> dans un libellé en 12 px tombait à 10 px (modules, « installé : … ») ;
   R4 veut 12 px au moins. */
:where(body:not(.espace)) label small { font-size: 12px; }
/* Liens « ← retour » en tête de page (import, journaux d'un site, audit, visiteurs) : cible de 44 px (R1). */
:where(body:not(.espace)) .vi-retour { display: inline-flex; align-items: center; min-height: 44px; }

/* PRIORITÉ EN BOUTONS à la création d'un ticket (Franck, 01/12/2026) — ticket/_priorite_boutons.html.twig.
   Trois boutons de même largeur, collés ; le choisi en couleur d'accent. Radios natives (clavier : flèches). */
.tk-prio-choix { display: flex; min-width: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--card-2); }
.tk-prio-bouton { flex: 1 1 0; min-width: 0; position: relative; display: flex; margin: 0; cursor: pointer; }
.tk-prio-bouton + .tk-prio-bouton { border-left: 1px solid var(--border); }
.tk-prio-bouton input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tk-prio-bouton span {
  flex: 1; display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 6px 8px;
  font-size: 13px; font-weight: 600; line-height: 1.2; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--muted); transition: background .15s, color .15s;
}
.tk-prio-bouton:hover span { color: var(--fg); background: var(--esp-n200); }
.tk-prio-bouton input:checked + span { color: #fff; background: var(--esp-accent-face); }
.tk-prio-bouton input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -3px; }
@media (hover: none), (pointer: coarse) { .tk-prio-bouton span { min-height: 44px; } }

/* ACRONYME DU SITE (03/12/2026) : pastille à côté du nom, champ de 3 lettres avec l'aperçu du sous-domaine de dev. */
.site-acro { display: inline-block; margin-left: 10px; padding: 2px 8px; border: 1px solid var(--esp-accent, #ff6a1f); color: var(--esp-accent-text, #ff6a1f); font-family: var(--esp-mono, ui-monospace, monospace); font-size: .5em; font-weight: 700; letter-spacing: .12em; vertical-align: middle; }
.site-acro-saisie { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.site-acro-saisie input.site-acro-champ { width: 6.5em; flex: none; text-align: center; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.site-acro-dom { color: var(--muted, #aaa49e); white-space: nowrap; }
.site-acro-dom b { color: var(--fg, inherit); font-weight: 600; }
.sl-acro { margin-left: 6px; color: var(--muted); font-size: 11px; letter-spacing: .1em; }
