/*
 * Iwego CRM — feuille unique.
 * 1. Tokens (copie de Docs/iwego-crm-design/tokens/tokens.css, source de vérité)
 * 2. Base   3. Layout (menu, page)   4. Composants   5. Utilitaires
 *
 * Règle : aucune couleur en dur dans les vues ni dans le JS — uniquement les
 * variables ci-dessous et les classes « tone-* » pour les états.
 * Le catalogue des composants est décrit dans backend/COMPONENTS.md.
 */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --font-sans: "Geist", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --brand-logo: #039E8A;

  --canvas: #F7F7F8;
  --surface: #FFFFFF;
  --sunken: #F1F1F3;
  --border: #E6E6E9;
  --line: #EFEFF1;
  --text: #0A0A0B;
  --muted: #55555E;
  --faint: #6E6E78;
  --nav: #3F3F46;
  --primary: #047C6E;
  --on-primary: #FFFFFF;
  --selected-row: #EEF7F5;
  --chip: #F1F1F3;
  --rail: #F1F1F3;
  --rail-active: #E6F2F0;

  --red: #B42318;   --red-bg: #FEECEB;
  --amber: #A15C07; --amber-bg: #FEF4E2;
  --green: #067647; --green-bg: #E7F6EE;
  --blue: #1D4ED8;  --blue-bg: #EAF0FE;
  --on-red: #FFFFFF;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --control-h: 40px;
  --page-pad-x: 40px;
  --icon-stroke: 1.8;
  --shadow-pop: 0 12px 40px rgba(10, 10, 11, .14);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0A0A0B;
  --surface: #131316;
  --sunken: #1B1B1F;
  --border: #26262B;
  --line: #1F1F23;
  --text: #F4F4F5;
  --muted: #A1A1AA;
  --faint: #8A8A93;
  --nav: #C4C4CC;
  --primary: #F4F4F5;
  --on-primary: #0A0A0B;
  --selected-row: #1B1F1E;
  --chip: #1F1F23;
  --rail: #0E0E10;
  --rail-active: #1F1F23;
  --red: #F97066;   --red-bg: rgba(249,112,102,.14);
  --amber: #FDB022; --amber-bg: rgba(253,176,34,.13);
  --green: #47CD89; --green-bg: rgba(71,205,137,.13);
  --blue: #84ADFF;  --blue-bg: rgba(132,173,255,.14);
  --on-red: #0A0A0B;
  --shadow-pop: 0 12px 40px rgba(0, 0, 0, .5);
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }
.icon { flex: 0 0 auto; display: inline-block; vertical-align: middle; }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 3. Layout ---------------------------------------------------------------- */
body.layout-app { display: flex; min-height: 100vh; }
.page {
  flex: 1 1 auto;
  min-width: 0;
  padding: 28px var(--page-pad-x) 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
body.layout-bare .page { max-width: 1120px; margin: 0 auto; }
/* Pages à en-tête pleine largeur (fiche client, fiche projet) : la vue gère ses marges. */
.page.page-flush { padding: 0; gap: 0; }
.page-body { padding: 28px var(--page-pad-x) 56px; display: flex; flex-direction: column; gap: 20px; }

/* Navigation : rail des espaces (72 px) + panneau de l'espace (236 px, repliable), pleine hauteur et fixes au défilement */
.rail {
  position: sticky; top: 0; z-index: 43;
  flex: 0 0 72px; width: 72px; height: 100vh; height: 100dvh; overflow-y: auto; scrollbar-width: none;
  background: var(--rail); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 0;
}
.rail-logo { display: flex; margin-bottom: 12px; border-radius: 10px; }
.rail-logo img { display: block; }
.rail-space {
  position: relative; flex: none; width: 60px; min-height: 56px; padding: 6px 2px;
  border: 0; border-radius: 12px; background: transparent; color: var(--muted);
  font-size: 10.5px; font-weight: 500; line-height: 1.2; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.rail-space:hover, .rail-tool:hover { color: var(--text); }
.rail-space[aria-pressed="true"], .rail-tool[aria-pressed="true"] { background: var(--rail-active); color: var(--text); }
.rail-badge {
  position: absolute; top: 4px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 16px;
  background: var(--amber); color: var(--on-red); font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.rail-badge.is-red { background: var(--red); }
.rail-bottom { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rail-tool {
  flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.rail-tool-outline { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.rail-avatar {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--chip); color: var(--text);
  font-size: 11px; font-weight: 600; cursor: pointer;
}
/* Fixe : le rail défile (overflow-y), un menu absolu à sa droite serait rogné sous le panneau. */
.rail-user .menu-list { position: fixed; top: auto; bottom: 14px; right: auto; left: 82px; min-width: 200px; }
.rail-menu-only { display: none !important; }
.rail-user-card { display: flex; flex-direction: column; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }

.nav-panel {
  position: sticky; top: 0; z-index: 42;
  flex: 0 0 236px; width: 236px; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 18px 12px; display: flex; flex-direction: column; gap: 18px;
}
.nav-panel-head { display: flex; align-items: center; gap: 8px; padding-left: 8px; }
.nav-panel-title { flex: 1; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.nav-panel-head .btn-icon { width: 32px; height: 32px; border: 0; background: transparent; border-radius: 8px; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-group-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 0 10px 6px; }
.nav-pins-list { display: flex; flex-direction: column; gap: 1px; }
.nav-row { position: relative; }
.nav-item {
  display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 7px 10px; line-height: 1.3;
  border-radius: 8px; text-decoration: none; color: var(--nav); font-weight: 500;
}
.nav-item:hover { background: var(--sunken); }
.nav-item.is-active { background: var(--primary); color: var(--on-primary); font-weight: 600; }
.nav-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nav-badge { font-size: 11px; font-weight: 600; border-radius: 20px; padding: 1px 7px; }
.nav-item.is-active .nav-badge { background: var(--on-primary); }
/* Punaise : visible au survol ou au focus de la ligne, à la place du compteur. */
.nav-pin {
  position: absolute; top: 50%; right: 5px; transform: translateY(-50%);
  width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0;
}
.nav-pin:hover { color: var(--text); background: var(--sunken); }
.nav-pin[aria-pressed="true"] svg { fill: currentColor; }
.nav-row:hover .nav-pin, .nav-pin:focus-visible { opacity: 1; }
.nav-row:hover .nav-item, .nav-row:focus-within .nav-item { padding-right: 36px; }
.nav-row:hover .nav-badge, .nav-row:focus-within .nav-badge { visibility: hidden; }
.nav-row:has(.is-active) .nav-pin { color: var(--on-primary); }
.nav-row:has(.is-active) .nav-pin:hover { background: transparent; }
.nav-pins-list .nav-pin { opacity: .6; }
.nav-hint { margin: auto 0 0; padding: 0 10px; font-size: 12px; color: var(--muted); }
.nav-backdrop { display: none; }

/* Contenu : barre haute (déplier, fil d'Ariane, ⌘K) puis la page */
.app-content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.app-content > .page:not(.page-flush) { padding-top: 22px; }
.app-content > .page-flush { padding-top: 16px; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 24px var(--page-pad-x) 0; min-height: 36px; }
.topbar .topbar-expand { display: none; width: 36px; height: 36px; color: var(--text); }
:root.nav-collapsed .topbar .topbar-expand { display: inline-flex; }
:root.nav-collapsed .nav-panel { display: none; }
.topbar-crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--muted); }
.topbar-crumbs > * { white-space: nowrap; }
.topbar-crumb-current { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
a.topbar-crumb-current:hover { text-decoration: underline; }
.topbar-search {
  margin-left: auto; flex: none; height: 36px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 10px;
}
.topbar-search:hover { color: var(--text); }

/* En-tête de page */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.page-heading { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.page-eyebrow { font-size: 13px; color: var(--muted); }
.page-title { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.page-title .count { color: var(--muted); font-weight: 400; }
.page-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb { font-size: 13px; color: var(--muted); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* En-tête d'entité (fiche client, fiche projet) : bandeau blanc + onglets */
.entity-header {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 22px var(--page-pad-x) 0; display: flex; flex-direction: column; gap: 18px;
}
.entity-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.entity-title { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }

/* Grilles de mise en page */
.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.split-main { flex: 3 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.split-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.split-side-wide { flex: 2 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.grid-auto-sm { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.section-title-row { display: flex; align-items: baseline; gap: 10px; }
.section-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.section-sub { font-size: 13px; color: var(--muted); }
.section-link { margin-left: auto; font-size: 13px; color: var(--muted); text-decoration: none; }
.section-link:hover { color: var(--text); }

/* 4. Composants ------------------------------------------------------------ */

/* Boutons — 40 px, rayon 10 */
.btn {
  height: var(--control-h); padding: 0 14px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover { background: var(--sunken); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { border-color: transparent; background: var(--primary); color: var(--on-primary); font-weight: 600; padding: 0 16px; }
.btn-primary:hover { background: var(--primary); filter: brightness(1.08); }
.btn-danger { border-color: transparent; background: var(--red); color: var(--on-red); font-weight: 600; }
.btn-danger:hover { background: var(--red); filter: brightness(1.08); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { height: 34px; padding: 0 12px; border-radius: 8px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-icon {
  width: var(--control-h); height: var(--control-h); padding: 0; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-icon:hover { color: var(--text); background: var(--sunken); }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--muted); border-right-color: transparent; animation: spin .7s linear infinite;
}
.link-muted { border: 0; background: none; padding: 0; color: var(--muted); font-size: 12px; cursor: pointer; text-align: left; }
.link-muted:hover { color: var(--text); text-decoration: underline; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Cartes */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); }
.card-pad { padding: 20px 22px; }
.card-clip { overflow: hidden; }
.card-header { padding: 18px 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.card-title { font-size: 16px; font-weight: 600; }
.card-sub { font-size: 12px; color: var(--muted); }
.card-eyebrow { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
a.card { text-decoration: none; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius-lg); }
a.card:hover { border-color: var(--muted); }

/* Liste de lignes dans une carte (priorités, projets, domaines…) */
.list-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 14px 22px; border-top: 1px solid var(--line); text-decoration: none;
}
.card > .list-row:first-child { border-top: 0; }
a.list-row:hover { background: var(--sunken); }
.list-row-main { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-row-title { font-weight: 600; }
.list-row-sub { font-size: 13px; color: var(--muted); }
.list-compact .list-row { padding: 10px 0; }
.list-compact .list-row:first-child { border-top: 1px solid var(--line); }

/* Bande de KPI : grands chiffres sans décoration */
.kpi-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.kpi { padding: 18px 16px 18px 0; display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
a.kpi:hover .kpi-label { color: var(--text); }
.kpi-value { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.kpi-label { font-size: 13px; color: var(--muted); }
/* Variante tuiles (panneaux d'aperçu, fiche projet) */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat-grid-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { background: var(--sunken); border-radius: var(--radius-md); padding: 10px 12px; display: flex; flex-direction: column; }
.stat-value { font-size: 18px; font-weight: 600; }
.stat-label { font-size: 12px; color: var(--muted); }

/* Étiquettes d'état (tags), pastilles (chips) et points */
.tag {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 12px; font-weight: 600; border-radius: var(--radius-sm); padding: 3px 8px; white-space: nowrap;
  background: var(--chip); color: var(--text);
}
.tag-sm { font-size: 11px; padding: 2px 7px; border-radius: 5px; }
.tag-wide { min-width: 64px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; background: var(--chip); border-radius: var(--radius-sm); padding: 2px 8px; white-space: nowrap; }
.chip.mono { font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--muted); }
.dot-sm { width: 7px; height: 7px; }
.tone-red { color: var(--red); background-color: var(--red-bg); }
.tone-amber { color: var(--amber); background-color: var(--amber-bg); }
.tone-green { color: var(--green); background-color: var(--green-bg); }
.tone-blue { color: var(--blue); background-color: var(--blue-bg); }
.tone-neutral { color: var(--text); background-color: var(--chip); }
.text-red { color: var(--red); } .text-amber { color: var(--amber); }
.text-green { color: var(--green); } .text-blue { color: var(--blue); }
.dot.tone-red { background: var(--red); } .dot.tone-amber { background: var(--amber); }
.dot.tone-green { background: var(--green); } .dot.tone-blue { background: var(--blue); }
.dot.tone-neutral { background: var(--faint); }
.status.tone-red, .status.tone-amber, .status.tone-green, .status.tone-blue, .status.tone-neutral { background: none; }

/* Avatar à initiales */
.avatar {
  width: 32px; height: 32px; flex: 0 0 auto; border-radius: 9px; background: var(--chip);
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600;
}
.avatar-round { border-radius: 50%; }
.avatar-inv { background: var(--primary); color: var(--on-primary); }
.avatar-lg { width: 44px; height: 44px; border-radius: 12px; font-size: 14px; font-weight: 700; }
.avatar-xl { width: 56px; height: 56px; border-radius: var(--radius-lg); font-size: 18px; font-weight: 700; }
.identity { display: flex; align-items: center; gap: 10px; min-width: 0; text-align: left; }
.identity-text { display: flex; flex-direction: column; min-width: 0; }
.identity-name { font-weight: 600; }
.identity-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
button.identity { border: 0; background: transparent; padding: 0; cursor: pointer; }

/* Champs */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 500; }
.field-label .required { color: var(--red); }
.field-help { font-size: 12px; color: var(--muted); }
.field-error { font-size: 12px; color: var(--red); }
.input, .select, .textarea {
  width: 100%; height: var(--control-h); padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  color: var(--text); outline: none;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--selected-row); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--red); }
.input:disabled, .input[readonly], .select:disabled { background: var(--sunken); color: var(--muted); }
.input.mono { font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 20px; }
.form-grid .span-all { grid-column: 1 / -1; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); }
/* État d'enregistrement automatique (autosave) à côté du libellé */
.save-state { font-size: 11px; color: var(--muted); }
.save-state.is-saving::before { content: "Enregistrement…"; }
.save-state.is-saved::before { content: "Enregistré"; color: var(--green); }
.save-state.is-error::before { content: "Non enregistré"; color: var(--red); }

/* Recherche */
.search {
  display: flex; align-items: center; gap: 8px; height: var(--control-h); padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--muted);
}
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); }
.search:focus-within { border-color: var(--primary); }
.search-lg { height: 60px; padding: 0 18px; gap: 12px; border-radius: var(--radius-lg); }
.search-lg input { font-size: 17px; }

/* Barre d'outils de liste */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar .search { flex: 1 1 280px; }

/* Segments (filtres en pastilles) et pastilles de raccourci */
.segments { display: flex; flex-wrap: wrap; gap: 6px; }
.segment, .pill {
  height: 34px; padding: 0 12px; border-radius: 34px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.pill { height: 32px; font-weight: 400; }
.segment:hover, .pill:hover { background: var(--sunken); }
.segment[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.segment .count { opacity: .7; }

/* Onglets (fiche client, abonnements) */
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--border); }
.entity-header .tabs { border-bottom: 0; }
.tab {
  height: 44px; padding: 0 12px; border: 0; background: transparent; cursor: pointer;
  color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--primary); }
.tab .count { color: var(--muted); font-weight: 400; }

/* Tableaux de données (dans une carte .card-clip) */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-weight: 500; color: var(--muted); background: var(--sunken);
  padding: 10px 12px; white-space: nowrap;
}
.table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table th.is-num, .table td.is-num { text-align: right; font-variant-numeric: tabular-nums; }
.table th[data-sort] { cursor: pointer; user-select: none; }
.table th[data-sort]:hover { color: var(--text); }
.table th[aria-sort="ascending"]::after { content: " ↑"; }
.table th[aria-sort="descending"]::after { content: " ↓"; }
.table tbody tr.is-clickable { cursor: pointer; }
.table tbody tr.is-clickable:hover { background: var(--sunken); }
.table tbody tr.is-selected { background: var(--selected-row); }
.table-empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.table tr.table-group th { background: var(--surface); color: var(--text); font-weight: 600; border-top: 1px solid var(--line); padding-top: 14px; }
.table tr.table-group .count { color: var(--muted); font-weight: 400; margin-left: 4px; }
.pagination { margin-left: auto; display: flex; gap: 6px; }

/* Panneau d'aperçu / de détail à droite d'une liste */
.panel { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; }
.panel-head { display: flex; align-items: center; gap: 12px; }
.panel-empty { color: var(--muted); text-align: center; padding: 40px 10px; }
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv-label { font-size: 12px; color: var(--muted); }
.kv-list { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 8px 14px; font-size: 13px; }
.kv-list dt { color: var(--muted); }
.kv-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Jauges : simple (progress) et forfait (inclus + dépassement) */
.progress { height: 8px; border-radius: 8px; background: var(--sunken); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.progress-sm { height: 6px; }
.progress.tone-red > span { background: var(--red); }
.progress.tone-amber > span { background: var(--amber); }
.progress.tone-red, .progress.tone-amber { background-color: var(--sunken); }
.gauge { display: flex; flex-direction: column; gap: 8px; }
.gauge-value { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.gauge-value strong { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.gauge-bar { display: flex; height: 12px; border-radius: 12px; overflow: hidden; background: var(--sunken); gap: 2px; }
.gauge-bar .used { background: var(--primary); }
.gauge-bar .over { background: var(--red); }
.gauge-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.meter { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.meter .progress { flex: 1; }
.meter-label { font-size: 12px; color: var(--muted); min-width: 34px; text-align: right; }

/* Grille de points « 1 point = 1 élément » (santé du parc) */
.dot-grid { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 5px; }
.dot-grid > span { aspect-ratio: 1; border-radius: 4px; background: var(--green); }
.dot-grid > span.tone-red { background: var(--red); }
.dot-grid > span.tone-amber { background: var(--amber); }
.dot-grid > span.tone-blue { background: var(--blue); }
.dot-grid > span.tone-neutral { background: var(--border); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.tone-red { background: var(--red); } .legend i.tone-amber { background: var(--amber); }
.legend i.tone-green { background: var(--green); } .legend i.tone-blue { background: var(--blue); }
.legend i.tone-neutral { background: var(--border); }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.bar-row .progress { flex: 1; }

/* Kanban (projets, métiers) */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.kanban-col { background: var(--sunken); border-radius: var(--radius-lg); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.kanban-col-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 2px 4px; }
.kanban-col-head .count { color: var(--muted); font-weight: 400; }
.kanban-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.kanban-card:hover { border-color: var(--muted); }

/* Frise d'étapes (fiche projet) */
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.step { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.step::before { content: ""; height: 6px; border-radius: 6px; background: var(--sunken); }
.step.is-done::before { background: var(--primary); }
.step.is-current { color: var(--text); font-weight: 600; }
.step.is-current::before { background: var(--primary); opacity: .55; }

/* Fil d'activité / notes */
.timeline { display: flex; flex-direction: column; }
.timeline-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 13px; }
.timeline-item:first-child { border-top: 0; }
.timeline-meta { font-size: 12px; color: var(--muted); }

/* États vides, chargement, erreurs */
.empty { padding: 40px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.skeleton { background: linear-gradient(90deg, var(--sunken), var(--line), var(--sunken)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; min-height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-md); font-size: 13px; }

/* Modale */
.modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 10, 11, .45); }
.modal-content {
  position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-pop);
}
.modal-lg .modal-content { max-width: 820px; }
.modal-header { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-header h3 { font-size: 17px; flex: 1; }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); }

/* Palette de navigation et de recherche (⌘K) : à 110 px du haut */
.command { align-items: flex-start; padding: 110px 16px 16px; }
.command .modal-content { max-width: 620px; max-height: calc(100vh - 130px); display: flex; flex-direction: column; overflow: hidden; }
.command .modal-body { padding: 0; gap: 0; min-height: 0; flex: 1; }
.command-bar { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--muted); }
.command-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--text); font-size: 16px; padding: 0; }
.command-scope { flex: none; font-size: 12px; color: var(--muted); gap: 8px; }
.command-scope input { width: 28px; height: 16px; }
.command-scope input::after { width: 12px; height: 12px; }
.command-scope input:checked::after { transform: translateX(12px); }
@media (max-width: 640px) { .command-esc { display: none; } }
.command-esc { height: 28px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.command-results { max-height: 420px; overflow-y: auto; padding: 8px; }
.command-group { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; }
.command-group-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 4px 10px; }
.command-item { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; border-radius: 8px; text-decoration: none; }
.command-item[aria-selected="true"] { background: var(--sunken); }
.command-type { margin-left: auto; flex: none; font-size: 12px; color: var(--muted); }
.command-empty { margin: 0; padding: 18px 10px; color: var(--muted); }
@media (max-width: 800px) { .command { padding-top: 24px; } .command .modal-content { max-height: calc(100vh - 40px); } }

/* Menu déroulant d'actions */
.menu { position: relative; }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-pop);
  display: none; flex-direction: column;
}
.menu.open .menu-list { display: flex; }
.menu-list button, .menu-list a { border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 7px; cursor: pointer; text-decoration: none; font-size: 13px; }
.menu-list button:hover, .menu-list a:hover { background: var(--sunken); }
.menu-list .is-danger { color: var(--red); }

/* Notifications éphémères */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--text); color: var(--canvas); border-radius: var(--radius-md); padding: 12px 16px;
  font-size: 13px; box-shadow: var(--shadow-pop); max-width: 380px; animation: toast-in .18s ease-out;
}
.toast.tone-red { background: var(--red); color: var(--on-red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

/* Connexion */
.auth-card { width: 100%; max-width: 400px; margin: 12vh auto 0; padding: 32px; display: flex; flex-direction: column; gap: 20px; }

/* Mot de passe avec œil : <div class="password-field"><input type="password"><button class="btn-icon" data-reveal="#id"></div> */
.password-field { position: relative; }
.password-field .input { padding-right: 44px; }
.password-field .btn-icon { position: absolute; top: 1px; right: 1px; height: calc(var(--control-h) - 2px); width: 40px; border: 0; background: transparent; }

/* Ajouts de la passe d'intégration : composants recréés par plusieurs écrans. */
.link { text-decoration: none; }
.link:hover { text-decoration: underline; }
.tab[aria-current="page"] { color: var(--text); border-bottom-color: var(--primary); }

/* Interrupteur : <label class="switch"><input type="checkbox" role="switch"> Libellé</label> */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 20px; background: var(--border); position: relative; cursor: pointer; flex: 0 0 auto; margin: 0; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform .15s; }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(16px); }

/* Bascule à deux positions (Tableau / Liste) : même dessin que le sélecteur de thème */
.toggle-group { display: inline-grid; grid-auto-flow: column; gap: 4px; background: var(--sunken); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 3px; }
.toggle-group button, .toggle-group a { height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.toggle-group [aria-pressed="true"], .toggle-group [aria-current="page"] { background: var(--surface); color: var(--text); }

/* Histogramme simple (UI.bars) */
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; align-items: end; }
.bar { border: 0; background: transparent; padding: 4px 0; border-radius: 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; min-width: 0; text-decoration: none; }
button.bar, a.bar { cursor: pointer; }
button.bar:hover, a.bar:hover { background: var(--sunken); }
.bar-value { min-height: 16px; font-size: 11px; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar-track { width: 100%; max-width: 36px; height: 150px; display: flex; align-items: flex-end; border-bottom: 1px solid var(--border); }
.bar-fill { width: 100%; background: var(--primary); border-radius: 4px 4px 0 0; min-height: 1px; }
.bar-fill.tone-red { background: var(--red); } .bar-fill.tone-amber { background: var(--amber); }
.bar.is-selected .bar-fill { opacity: .7; }

/* Graphiques SVG (UI.lineChart, UI.barsGrouped) : séries par tone, état is-incomplete */
.chart { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.chart-plot { position: relative; width: 100%; min-width: 0; border-radius: 8px; outline: none; }
.chart-plot:focus-visible { box-shadow: 0 0 0 2px var(--primary); }
.chart-svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.chart-s-primary { color: var(--primary); } .chart-s-blue { color: var(--blue); } .chart-s-red { color: var(--red); }
.chart-s-green { color: var(--green); } .chart-s-amber { color: var(--amber); } .chart-s-muted { color: var(--faint); }
.chart-grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.chart-grid.is-zero { stroke: var(--muted); }
.chart-axis { fill: var(--faint); font-size: 11px; font-family: var(--font-sans); font-variant-numeric: tabular-nums; }
.chart-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-line.is-dashed { stroke-dasharray: 4 4; opacity: .7; }
.chart-area { fill: currentColor; opacity: .08; }
.chart-dot { fill: currentColor; stroke: var(--surface); stroke-width: 2; }
.chart-dot.is-incomplete { fill: var(--surface); stroke: currentColor; }
.chart-dot.is-active { r: 5.5; }
.chart-bar { fill: currentColor; }
.chart-bar.is-soft, .chart-key.is-soft { opacity: .55; }
.chart-bar.is-active { opacity: .85; }
.chart-bar.is-soft.is-active { opacity: .45; }
.chart-hatch-bg { fill: currentColor; opacity: .14; }
.chart-hatch { stroke: currentColor; stroke-width: 2; opacity: .75; }
.chart-guide { stroke: var(--border); stroke-width: 1; }
.chart-band { fill: var(--sunken); }
.chart-tip {
  position: absolute; top: 0; left: 0; z-index: 5; pointer-events: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-pop);
  padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; white-space: nowrap;
}
.chart-tip-title { font-weight: 600; }
.chart-tip-row { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.chart-tip-row strong { color: var(--text); font-variant-numeric: tabular-nums; margin-left: auto; padding-left: 10px; }
.chart-tip-state, .chart-state-note { font-size: 11px; color: var(--amber); }
.chart-empty { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; background: var(--sunken); border-radius: var(--radius-md); }
.chart-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.chart-foot .chart-toggle { margin-left: auto; }
.legend i.chart-key, .chart-key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; background: currentColor; flex: 0 0 auto; }
.legend i.chart-key-line, .chart-key-line { width: 14px; height: 2px; border-radius: 2px; }
.chart-key-svg { flex: 0 0 auto; overflow: hidden; }
.chart-key-hollow { fill: var(--surface); stroke: var(--muted); stroke-width: 2; }
.chart-key-hatch-bg { fill: none; stroke: var(--muted); stroke-width: 1; }
.chart-key-hatch { stroke: var(--muted); stroke-width: 1.5; }
.chart-data { border: 1px solid var(--border); border-radius: var(--radius-md); }
.chart-table th[scope="row"] { font-weight: 500; color: var(--text); background: transparent; text-align: left; border-top: 1px solid var(--line); }
.chart-table td { white-space: nowrap; }

/* Valeur copiable (lien, URI de redirection) */
.copy-field { display: flex; gap: 8px; }
.copy-field .input { font-family: var(--font-mono); font-size: 12.5px; }

/* 5. Utilitaires ----------------------------------------------------------- */
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-sm { font-size: 13px; } .text-xs { font-size: 12px; }
.text-right { text-align: right; }
.fw-600 { font-weight: 600; }
.gap-sm { gap: 6px; }

/* Responsive : sous 800 px, le rail devient une barre d'onglets en bas (5 espaces + compte) et le
   panneau une feuille qui monte du bas, ouverte depuis la barre ou le bouton de la barre haute.
   Administration et thème passent dans le menu du compte ; la recherche reste dans la barre haute. */
@media (max-width: 800px) {
  :root { --page-pad-x: 18px; --tabbar-h: calc(60px + env(safe-area-inset-bottom)); }
  body.nav-open { overflow: hidden; }
  .app-content { padding-bottom: var(--tabbar-h); }
  .rail {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; height: var(--tabbar-h);
    flex-direction: row; align-items: stretch; justify-content: space-around; gap: 0;
    padding: 4px 4px env(safe-area-inset-bottom); overflow: visible;
    border-right: 0; border-top: 1px solid var(--border);
  }
  .rail-logo, .rail-bottom > .rail-tool, .rail-bottom > .rail-space-tool { display: none; }
  .rail-space { flex: 1 1 0; width: auto; min-width: 0; min-height: 0; border-radius: 10px; }
  .rail-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .rail-badge { right: calc(50% - 22px); }
  .rail-bottom { margin: 0; padding: 0; flex: 1 1 0; justify-content: center; }
  .rail-user .menu-list { position: absolute; top: auto; bottom: calc(100% + 10px); left: auto; right: 0; }
  .rail-menu-only:not([hidden]) { display: flex !important; align-items: center; gap: 8px; }
  .nav-panel, :root.nav-collapsed .nav-panel {
    display: flex; position: fixed; top: auto; left: 0; right: 0; bottom: var(--tabbar-h);
    width: auto; height: auto; max-height: calc(100dvh - var(--tabbar-h) - 48px);
    border-right: 0; border-top: 1px solid var(--border); border-radius: 16px 16px 0 0; box-shadow: var(--shadow-pop);
    transform: translateY(100%); visibility: hidden; transition: transform .22s ease, visibility .22s;
  }
  .nav-panel[hidden] { display: none; }
  body.nav-open .nav-panel { transform: none; visibility: visible; }
  .nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 41; background: rgba(10, 10, 11, .4);
    opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
  }
  body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }
  body.layout-app .tmr, body.layout-app .toasts { bottom: calc(var(--tabbar-h) + 12px); }
  .nav-item { min-height: 42px; }
  .nav-pin { opacity: 1; }
  .nav-badge { visibility: visible !important; }
  .nav-row .nav-item { padding-right: 36px; }
  .topbar { padding-top: 14px; }
  .topbar .topbar-expand { display: inline-flex; }
  .topbar-search { width: 36px; padding: 0; justify-content: center; }
  .topbar-search-text, .topbar-search kbd { display: none; }
  @media (prefers-reduced-motion: reduce) { .nav-panel, .nav-backdrop { transition: none; } }
  .page-title { font-size: 24px; }
  .panel { position: static; }
}

/* Écran : accueil (lot 1) ---------------------------------------------------- */
.accueil-shortcuts { gap: 8px; }
.accueil-columns { gap: 24px; }
.accueil-health-head { align-items: baseline; gap: 8px; }
.accueil-health-head .kpi-value { font-size: 28px; }
.accueil-health .legend i.tone-neutral { background: var(--border); }
.accueil-prio .tag { min-width: 88px; }
.accueil-health .legend i.tone-amber { background: var(--amber); }
.accueil-health .legend i.tone-blue { background: var(--blue); }
.accueil-health .legend i.tone-red { background: var(--red); }
.accueil-servers { border-top: 1px solid var(--line); padding-top: 14px; gap: 10px; }
.accueil-servers .bar-row { text-decoration: none; border-radius: var(--radius-sm); }
.accueil-servers .bar-row:hover .mono { text-decoration: underline; }
.accueil-server { width: 118px; flex: 0 0 auto; display: flex; flex-direction: column; line-height: 1.25; }
.accueil-server .mono { font-size: 12px; }
.accueil-server-count { width: 58px; text-align: right; flex: 0 0 auto; }

/* Écran : tâches planifiées (lot 1) ------------------------------------------- */
.taches-list { display: flex; flex-direction: column; gap: 12px; }
.taches-task { display: flex; flex-direction: column; gap: 12px; }
.taches-task-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.taches-task-main { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.taches-task-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.taches-task-name .mono { font-size: 13px; font-weight: 600; }
.taches-log summary { cursor: pointer; font-size: 12px; font-weight: 500; color: var(--muted); }
.taches-log pre {
  margin: 8px 0 0; max-height: 260px; overflow: auto; padding: 12px 14px;
  background: var(--sunken); border: 1px solid var(--line); border-radius: var(--radius-md);
  font-family: var(--font-mono); font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere;
}

/* Écran : infra (serveurs, domaines, boîtes mail, comptes GSC, utilisateurs — lot 5) */
.infra-link { text-decoration: none; }
.infra-link:hover { text-decoration: underline; }
.infra-alert { border: 1px solid var(--border); }
.infra-alert .btn { margin-left: auto; }
.infra-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.infra-filters .select { width: auto; min-width: 180px; height: 34px; font-size: 13px; }
.infra-ellipsis { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Écran : abonnements (lot 3 — /abonnements, /abonnements/{id}, /factures) */
.abo-filter { width: auto; flex: 0 1 220px; min-width: 160px; }
.abo-panel-title { font-size: 18px; font-weight: 600; }
.abo-facts { margin: 0; gap: 12px 16px; }
.abo-facts dd { margin: 0; font-weight: 500; }
.abo-pack { padding: 14px; background: var(--sunken); border-radius: 12px; }
.abo-pack .gauge-value strong { font-size: 22px; }
.abo-pack .gauge-bar { height: 8px; }
.abo-chart { padding: 0 22px 18px; }
.abo-bottom { gap: 20px; }
.abo-bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; }
.abo-bar { border: 0; background: transparent; padding: 4px 0; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; min-width: 0; }
.abo-bar:hover { background: var(--sunken); }
.abo-bar-value { min-height: 16px; font-size: 11px; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.abo-bar-track { width: 100%; max-width: 36px; height: 150px; display: flex; align-items: flex-end; border-bottom: 1px solid var(--border); }
.abo-bar-fill { width: 100%; background: var(--primary); border-radius: 4px 4px 0 0; }
.abo-bar.is-active .abo-bar-label { color: var(--text); font-weight: 600; }
.abo-bar.is-active .abo-bar-track { box-shadow: inset 0 -2px 0 var(--primary); }
.abo-bar-sub { font-size: 11px; color: var(--faint); }
.abo-chart-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.abo-items .list-row { align-items: flex-end; }
.abo-links .list-row { padding-inline: 22px; gap: 12px; }
/* Liste avec recherche (UI.combobox) : flottante, sauf dans une fenêtre (.modal-content défile et la couperait). */
.combo { position: relative; }
.combo-list { position: absolute; z-index: 30; left: 0; right: 0; max-height: 260px; overflow-y: auto; margin: 4px 0 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); }
.modal-content .combo-list { position: static; }
.combo-list [role=option] { padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13.5px; overflow-wrap: anywhere; }
.combo-list [role=option]:hover, .combo-list .is-active { background: var(--selected-row); }
.combo-note { padding: 7px 10px; font-size: 12.5px; color: var(--muted); }
.abo-rat-head { align-items: flex-start; border-bottom: 1px solid var(--line); }
.abo-rat-title { gap: 2px; min-width: 0; flex: 1 1 360px; }
.abo-rat-renewal { white-space: nowrap; }
.abo-rat-row { cursor: pointer; flex-wrap: nowrap; }
.abo-rat-row:hover { background: var(--sunken); }
.abo-rat-row input[type=checkbox] { flex: none; width: 16px; height: 16px; accent-color: var(--primary); }
.card > .abo-rat-head + .list-row { border-top: 0; }
.abo-item-form { flex: 1 1 auto; display: grid; grid-template-columns: minmax(220px, 3fr) minmax(70px, 0.8fr) minmax(130px, 1.2fr) minmax(90px, 0.9fr); gap: 10px 12px; min-width: 0; }
.abo-item-form .span-all { grid-column: 1 / -1; }
.abo-item-form .textarea { min-height: 40px; height: 40px; }
.abo-item-amount { min-width: 96px; text-align: right; font-family: var(--font-mono); font-size: 12.5px; padding-bottom: 10px; }
.abo-expand { width: 28px; height: 28px; border: 0; background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.abo-expand:hover { background: var(--sunken); color: var(--text); }
.abo-expand[aria-expanded="true"] { transform: rotate(90deg); }
.abo-detail-row > td { background: var(--sunken); }
.abo-detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px 24px; padding: 6px 0; }
.abo-task { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; border-top: 1px solid var(--line); }
.abo-task-head { display: flex; justify-content: space-between; gap: 10px; font-weight: 500; }
.abo-task-lines { margin: 0; padding: 0 0 0 12px; list-style: none; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
.abo-task-lines li { display: flex; justify-content: space-between; gap: 10px; }
/* Support Client : matériel et frais refacturés, sous-totaux du trimestre (support-client-commun.js). */
.sup-exp-list { margin: 0; padding: 0 0 0 12px; list-style: none; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.sup-exp { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sup-exp-main { display: flex; align-items: center; gap: 8px; flex: 1 1 220px; min-width: 0; }
.sup-exp-num { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.sup-exp-actions { display: inline-flex; gap: 2px; }
.sup-exp-actions .btn-icon { width: 28px; height: 28px; }
.sup-totals { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; margin: 8px 0 4px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; }
.sup-totals dt { color: var(--muted); }
.sup-totals dd { margin: 0; text-align: right; }
.sup-totals .sup-total { color: var(--text); font-weight: 600; }
.abo-section { padding: 0 22px 18px; }
@media (max-width: 800px) {
  .abo-bars { gap: 2px; }
  .abo-bar-value { display: none; }
  .abo-item-form { grid-template-columns: 1fr 1fr; }
  .abo-item-form > .field:first-child { grid-column: 1 / -1; }
}
.accueil-health .dot-grid { grid-template-columns: repeat(auto-fill, minmax(18px, 1fr)); }
.infra-p { margin: 0; }
.infra-pre-line { white-space: pre-line; }
.infra-bar-label { min-width: 72px; font-size: 12px; }
.infra-log pre {
  margin: 6px 0 0; max-height: 220px; overflow: auto; padding: 10px 12px;
  background: var(--sunken); border: 1px solid var(--line); border-radius: var(--radius-md);
  font-family: var(--font-mono); font-size: 12px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
}
.abo-panel-items .list-row-main { flex-basis: 0; }
.abo-items .list-row { flex-wrap: nowrap; }
@media (max-width: 800px) { .abo-items .list-row { flex-wrap: wrap; } }
.infra-filters .select { max-width: 260px; }

/* Écran : sites (liste, fiche, audit SEO) */
.sites-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 14px; }
.sites-filters .field-label { font-size: 12px; color: var(--muted); }
.sites-filters-reset { justify-content: flex-end; }
.sites-columns { max-height: 420px; overflow-y: auto; gap: 2px; }
.sites-columns .checkbox { padding: 6px 10px; font-size: 13px; border-radius: 7px; }
.sites-columns .checkbox:hover { background: var(--sunken); }
.sites-link { text-decoration: none; }
.sites-link:hover { text-decoration: underline; }
a.sites-plain { text-decoration: none; }
.sites-panel-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sites-panel-empty p { margin: 0; }
.mono-title { font-family: var(--font-mono); font-weight: 500; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.sites-big { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.sites-grow { flex: 1 1 320px; min-width: 0; }
.sites-score-row { gap: 8px 20px; }
.sites-score { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.sites-score small { font-size: 12px; font-weight: 400; color: var(--faint); margin-left: 2px; }
.sites-delta { min-width: 34px; text-align: right; }
.sites-inner { border-radius: var(--radius-md); }
.sites-text { margin: 0; line-height: 1.6; color: var(--muted); max-width: 78ch; }
.sites-details summary { cursor: pointer; font-size: 13px; }
.sites-details[open] summary { margin-bottom: 6px; }
/* Histogramme une série (score, clics) : barres fines, coins arrondis en haut, 2 px d'écart */
.sites-chart { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.sites-bars { display: flex; align-items: flex-end; gap: 2px; height: 64px; border-bottom: 1px solid var(--line); }
.sites-bar { flex: 1 1 0; max-width: 28px; min-width: 3px; background: var(--primary); border-radius: 4px 4px 0 0; }
.sites-bar:hover { opacity: .75; }
.sites-chart-scale { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); }
/* Disponibilité : une case par jour sur 30 jours */
.sites-days { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; }
.sites-days > span { height: 28px; border-radius: 4px; }
.sites-days > span.tone-green, .sites-legend.tone-green { background: var(--green); }
.sites-days > span.tone-amber, .sites-legend.tone-amber { background: var(--amber); }
.sites-days > span.tone-red, .sites-legend.tone-red { background: var(--red); }
.sites-days > span.tone-neutral, .sites-legend.tone-neutral { background: var(--border); }
/* Rapport d'audit : sections par catégorie, lignes dépliables */
.sites-audit tr.sites-audit-group th { background: var(--canvas); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: 8px; padding-bottom: 8px; border-top: 1px solid var(--line); }
.sites-audit-toggle { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: var(--text); }
.sites-audit-toggle .icon { margin-right: 2px; }
.sites-chevron { display: inline-block; color: var(--muted); transition: transform .15s; }
.sites-chevron.is-open { transform: rotate(180deg); }
.sites-audit tr.sites-audit-detail > td { background: var(--canvas); padding-top: 16px; padding-bottom: 18px; }
.sites-audit-body { max-width: 920px; }
.sites-occurrences { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sites-occurrences li { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.sites-occurrences input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--primary); flex: 0 0 auto; }
.sites-occurrence { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.sites-occurrence a { text-decoration: none; }
.sites-occurrence a:hover { text-decoration: underline; }
.sites-done { color: var(--faint); text-decoration: line-through !important; }
.sites-detail-item { margin-right: 12px; }
.sites-page { max-width: 460px; }
.sites-page .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sites-headings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.sites-h3 { padding-left: 16px; } .sites-h4 { padding-left: 32px; } .sites-h5, .sites-h6 { padding-left: 48px; }
.sites-form-1 { grid-template-columns: 1fr; }
.infra-narrow { max-width: 170px; }
.sites-table .table td { white-space: nowrap; }
.infra-meter { display: block; min-width: 190px; }
.infra-meter .progress { min-width: 56px; }
.infra-meter .meter-label { white-space: nowrap; }
.abo-items .btn-icon { flex: 0 0 auto; }
.sites-table .identity-text { align-items: flex-start; }
.sites-table .sites-link { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; }

/* Écran : clients (liste, fiche 360°) — préfixe cli- */
.cli-filter { width: auto; min-width: 170px; }
.cli-abo { display: inline-flex; align-items: baseline; gap: 4px; max-width: 135px; white-space: nowrap; }
.cli-toolbar .search { flex: 1 1 220px; }
td.cli-col-client .identity-name, td.cli-col-client .identity-sub { display: block; max-width: 165px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cli-abo .truncate { min-width: 0; }
.cli-panel-name { font-size: 16px; }
.cli-modal-intro { margin: 0; }
.cli-results { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 4px; }
.cli-result { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.cli-result:hover:not(:disabled), .cli-result[aria-selected="true"] { background: var(--selected-row); }
.cli-result:disabled { opacity: .6; cursor: not-allowed; }
.cli-result .identity-text { flex: 1; }
.cli-results-empty { padding: 14px 10px; text-align: center; }
.abo-table a.identity-name, .abo-table a.identity-sub { text-decoration: none; }
.abo-table a.identity-name:hover, .abo-table a.identity-sub:hover { text-decoration: underline; }

/* Écran : projets (portefeuille, fiche projet, vue métier, étapes Odoo) */
.prj-switch { display: flex; gap: 3px; background: var(--sunken); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 3px; }
.prj-switch button { height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; }
.prj-switch button[aria-pressed="true"] { background: var(--surface); color: var(--text); }
.prj-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.prj-summary > .segments { margin-left: auto; }
.prj-summary-figures { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.prj-figure { display: inline-flex; align-items: baseline; gap: 6px; border: 0; background: none; padding: 4px 0; cursor: pointer; border-bottom: 2px solid transparent; }
.prj-figure[aria-pressed="true"] { border-bottom-color: var(--primary); }
.prj-figure-value { font-size: 20px; font-weight: 600; }
.prj-figure-label { font-size: 13px; color: var(--muted); }
.prj-figure:hover .prj-figure-label { color: var(--text); }
.prj-kanban { grid-auto-columns: minmax(248px, 1fr); align-items: start; }
.prj-kanban .kanban-col { padding: 10px; gap: 8px; }
.prj-col-todo { background: var(--amber-bg); }
.prj-col-empty { border: 1px dashed var(--border); border-radius: 12px; padding: 18px 12px; text-align: center; font-size: 12px; color: var(--muted); }
.prj-card { border-radius: 12px; gap: 9px; }
.prj-card-eyebrow { font-size: 11px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.prj-card-title { font-weight: 600; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.prj-card-client { font-size: 12px; color: var(--muted); margin-top: -5px; }
.prj-card-flag { display: flex; }
.prj-card-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); min-width: 0; }
.prj-av { flex: 0 0 auto; }
.prj-av-sm { width: 24px; height: 24px; font-size: 10px; }
.prj-av-md { width: 30px; height: 30px; font-size: 11px; }
.prj-av-none { background: transparent; border: 1px dashed var(--amber); color: var(--amber); }
.prj-row-link { text-decoration: none; display: block; }
.prj-row-link:hover .identity-name { text-decoration: underline; }
/* Fiche projet */
.prj-header { padding-bottom: 0; }
.prj-sections { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2px; }
.prj-sections > .tabs { flex-wrap: nowrap; }
button.section-link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 13px; }
.prj-title-row { align-items: flex-start; }
.prj-heading { gap: 8px; min-width: 0; }
.prj-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.prj-meta a, .prj-meta strong { color: var(--text); font-weight: 500; }
.prj-meta .prj-who { display: inline-flex; align-items: center; gap: 6px; }
.prj-steps .step { font-size: 13px; font-weight: 500; }
.prj-steps .step.is-current { font-weight: 600; }
.prj-steps .step.is-current::before { opacity: 1; }
.prj-task-group { border-top: 1px solid var(--line); }
.prj-task-group-head { padding: 10px 22px; background: var(--sunken); font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; display: flex; gap: 8px; }
.prj-task { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 11px 22px; border-top: 1px solid var(--line); }
.prj-task input { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; flex: 0 0 auto; }
.prj-task-name { flex: 1 1 220px; min-width: 0; }
.prj-task-name a { text-decoration: none; }
.prj-task-name a:hover { text-decoration: underline; }
.prj-task.is-closed .prj-task-name a { color: var(--muted); text-decoration: line-through; }
.prj-task-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.prj-task-due { width: 84px; text-align: right; }
.prj-more { padding: 10px 22px; border-top: 1px solid var(--line); }
/* Sous-tâches : retrait par niveau, bouton déplier, « + » au survol */
.prj-task.is-sub { padding-left: calc(22px + var(--depth, 1) * 26px); background: color-mix(in srgb, var(--sunken) 45%, transparent); }
.prj-task-toggle { width: 18px; height: 18px; flex: 0 0 auto; border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0; font-size: 15px; line-height: 1; border-radius: 4px; }
.prj-task-toggle:hover { color: var(--text); background: var(--sunken); }
.prj-task-toggle.is-empty { cursor: default; background: none; }
.prj-task-kids { border: 0; background: none; cursor: pointer; padding: 0; }
.prj-task-kids:hover { color: var(--text); }
.prj-task-parent { font-size: 12px; }
.prj-task-add { width: 28px; height: 28px; flex: 0 0 auto; }
.prj-task .prj-task-add.btn-icon { opacity: 0; }
.prj-task:hover .prj-task-add.btn-icon, .prj-task .prj-task-add.btn-icon:focus-visible { opacity: 1; }
@media (hover: none) { .prj-task .prj-task-add.btn-icon { opacity: 1; } }
.prj-ticket { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 22px; border-top: 1px solid var(--line); text-decoration: none; }
.prj-ticket:hover { background: var(--sunken); }
.prj-ticket-src { font-size: 11px; font-weight: 600; border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; min-width: 56px; text-align: center; }
.prj-ticket-key { width: 82px; color: var(--muted); }
.prj-ticket-title { flex: 1 1 220px; min-width: 0; }
.prj-link { margin-left: 0; color: var(--text); font-weight: 500; }
.prj-linked { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; }
.prj-linked-kind { font-size: 12px; color: var(--muted); width: 76px; flex: 0 0 auto; }
.prj-linked-value { flex: 1; min-width: 0; }
.prj-linked:hover .prj-linked-value { text-decoration: underline; }
.prj-member { display: flex; align-items: center; gap: 10px; }
.prj-note-input { min-height: 76px; background: var(--sunken); }
.prj-notes-text { white-space: pre-line; overflow-wrap: anywhere; }
/* Vue métier, étapes */
.prj-owner { width: auto; min-width: 210px; }
.prj-owner-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.prj-owner-name { width: 170px; flex: 0 0 auto; }
.prj-owner-row .progress { flex: 1; }
.prj-owner-row.is-none .progress > span { background: var(--amber); }
.prj-owner-n { width: 28px; text-align: right; font-weight: 600; }
.prj-intro { margin: 0; max-width: 820px; font-size: 13px; }
.prj-stage-select { min-width: 170px; height: 34px; }
@media (max-width: 800px) {
  .prj-summary > .segments { margin-left: 0; }
  .prj-owner-name { width: 120px; }
  .prj-task-due { width: auto; }
}
.infra-scroll { max-height: 380px; overflow-y: auto; }

/* Écran : intégrations (lot 7 — /connecteurs, /projets/{id}/integrations) */
.intg-tabs .tab[aria-current="page"] { color: var(--text); border-bottom-color: var(--primary); }
.intg-icon { width: 40px; height: 40px; flex: 0 0 auto; border-radius: var(--radius-md); background: var(--sunken); display: inline-flex; align-items: center; justify-content: center; }
.intg-card { padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.intg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.intg-head > .tag { margin-left: auto; }
.intg-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.intg-foot > .row { margin-left: auto; }
.intg-rule { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.intg-rule input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--primary); cursor: pointer; }
.intg-rule.is-disabled { cursor: not-allowed; opacity: .6; }
.intg-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 13px; }
.intg-ticket { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; text-decoration: none; }
.intg-ticket:hover .truncate { text-decoration: underline; }
.intg-src { font-size: 11px; font-weight: 600; border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; flex: 0 0 auto; }
.intg-copy { display: flex; gap: 6px; align-items: center; min-width: 0; }
.intg-copy code { flex: 1; min-width: 0; overflow-wrap: anywhere; background: var(--sunken); border-radius: var(--radius-sm); padding: 6px 8px; }
.prj-stats .stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; gap: 4px; }
.prj-stats .stat-label { order: -1; font-size: 13px; }
.prj-stats .stat-value { font-size: 26px; letter-spacing: -0.02em; }
.sites-page .identity-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prj-steps { list-style: none; margin: 0; padding: 0; }
.prj-heading { flex: 1 1 420px; }
.infra-mid { max-width: 210px; }
.infra-meter { min-width: 150px; } .infra-meter .progress { min-width: 36px; }
.cli-skel-title { display: inline-block; width: 260px; height: 26px; }
.cli-p { margin: 0; }
.cli-pre-line { white-space: pre-line; overflow-wrap: anywhere; }
button.cli-contact-open.link { padding: 0; border: 0; background: none; font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; text-align: left; }
button.cli-contact-open.list-row { width: 100%; padding: 8px 0; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.cli-contact-open.list-row:first-child { border-top: 0; }
button.cli-contact-open.list-row:hover .truncate:first-child { text-decoration: underline; }
.cli-tight { gap: 2px; }
.cli-abo-card { display: flex; flex-direction: column; gap: 18px; }
.cli-abo-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.cli-abo-title { font-size: 18px; font-weight: 600; }
.cli-abo-title a { text-decoration: none; }
.cli-abo-title a:hover { text-decoration: underline; }
.cli-tab-link { font-size: 13px; }
.cli-meter { width: 130px; }
.cli-due { width: 80px; text-align: right; }
.cli-big { display: flex; align-items: baseline; gap: 8px; }
.cli-big strong { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.cli-metier { font-size: 12px; font-weight: 500; border: 1px solid var(--border); border-radius: 20px; padding: 4px 10px; }
.cli-act-title { margin-bottom: 6px; }
.cli-act-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex: 0 0 auto; border: 2px solid var(--faint); }
.cli-act-red { border-color: var(--red); }
.cli-act-amber { border-color: var(--amber); }
.cli-act-text { border-color: var(--text); }
.cli-icon-sm { width: 30px; height: 30px; }
.cli-copy { flex-wrap: nowrap; }
.cli-copy .input { flex: 1; min-width: 0; }
.cli-periods { display: flex; flex-direction: column; }
.cli-period { border-top: 1px solid var(--line); }
.cli-period > summary { display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; list-style: none; }
.cli-period > summary::-webkit-details-marker { display: none; }
.cli-period-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.cli-period-types { margin-left: auto; }
.cli-period[open] > summary .icon { color: var(--primary); }
.cli-type { padding: 0 0 12px 22px; display: flex; flex-direction: column; gap: 6px; }
.cli-type-head { display: flex; justify-content: space-between; gap: 10px; }
.cli-task { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; border-top: 1px solid var(--line); }
.cli-task-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.cli-lines { margin: 0; padding: 0 0 0 12px; list-style: none; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.cli-lines li { display: grid; grid-template-columns: 84px 1fr auto 56px; gap: 10px; }
.cli-lines li .mono { text-align: right; }
@media (max-width: 800px) {
  .cli-lines li { grid-template-columns: 76px 1fr 50px; }
  .cli-lines li > :nth-child(3) { display: none; }
  .cli-period-types { display: none; }
  .cli-meter { width: 100px; }
}
.intg-head > .identity-text { flex: 1 1 200px; min-width: 0; }
.cli-dom-row { flex-wrap: nowrap; }
.cli-dom-row .list-row-main { flex: 1 1 auto; }
.cli-body .table td { white-space: nowrap; }
.cli-body .table a { text-decoration: none; }
.cli-body .table a:hover { text-decoration: underline; }

/* Écran : espace client public (/espace/{jeton}) — préfixe esp- */
body.layout-bare:has(.esp-header) { overflow-x: hidden; font-size: 15px; line-height: 1.5; }
body.layout-bare .page:has(.esp-header) { max-width: none; }
.esp-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.esp-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.esp-header-row { min-height: 68px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.esp-brand { display: flex; align-items: center; gap: 10px; }
.esp-brand .brand-name { font-size: 17px; }
.esp-brand-tag { font-size: 13px; color: var(--muted); border-left: 1px solid var(--border); padding-left: 10px; }
.esp-header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.esp-main { padding-top: 36px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 24px; }
.esp-skel-sm { width: 180px; }
.esp-skel-lg { width: 420px; height: 34px; }
.esp-tight { gap: 2px; }
.esp-p { margin: 0; }
.esp-client { font-size: 14px; }
.esp-title { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.esp-h1b { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.esp-h2 { font-size: 20px; font-weight: 600; }
.esp-h3 { font-size: 16px; font-weight: 600; }
.esp-card { border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.esp-card-flat { border-radius: 20px; }
.esp-invalid { max-width: 560px; }
.esp-pack-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.esp-pill { margin-left: auto; font-size: 13px; padding: 4px 10px; border-radius: 8px; }
.esp-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.esp-figure { display: flex; flex-direction: column; font-size: 13px; }
.esp-figure strong { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.esp-bar { display: flex; height: 14px; border-radius: 14px; overflow: hidden; gap: 2px; background: var(--sunken); }
.esp-bar .used { background: var(--primary); }
.esp-bar .over { flex: 1 1 auto; background: var(--red); }
.esp-scale { font-size: 13px; }
.esp-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.esp-btn { height: 44px; padding: 0 18px; border-radius: 12px; }
.esp-section { gap: 14px; }
.esp-section-title { align-items: baseline; }
.esp-site { padding: 24px; gap: 20px; }
.esp-site-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.esp-site-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--sunken); display: inline-flex; align-items: center; justify-content: center; }
.esp-site-link { font-size: 18px; font-weight: 600; text-decoration: none; }
.esp-site-link:hover { text-decoration: underline; }
.esp-status { gap: 6px; }
.esp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.esp-stat { background: var(--sunken); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.esp-stat strong { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.esp-chart-title { gap: 8px; align-items: baseline; }
.esp-chart { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 120px; border-bottom: 1px solid var(--border); }
.esp-col { height: 100%; display: flex; align-items: flex-end; }
.esp-col-bar { width: 100%; background: var(--primary); border-radius: 4px 4px 0 0; }
.esp-col-skel { background: var(--border); }
.esp-chart-note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.esp-chart-note::before { content: ""; position: absolute; inset: 30% 25%; background: var(--surface); opacity: .85; border-radius: 10px; z-index: -1; }
.esp-chart-note { z-index: 1; }
.esp-chart-axis { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; font-size: 11px; color: var(--muted); text-align: center; }
.esp-care { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 24px; }
.esp-care li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.esp-care-label { flex: 1; }
.esp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.esp-small { padding: 22px 24px; gap: 12px; }
.esp-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.esp-domain { flex: 1 1 180px; font-size: 13.5px; }
.esp-big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.esp-big strong { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.esp-details summary { cursor: pointer; font-size: 14px; font-weight: 500; list-style: none; }
.esp-details summary::-webkit-details-marker { display: none; }
.esp-mail-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; }
.esp-mail-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.esp-entries-head { padding: 20px 24px; }
.esp-period { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.esp-period .select { height: 36px; width: auto; }
.esp-table { font-size: 14px; }
.esp-table td { padding-top: 14px; padding-bottom: 14px; }
.esp-table th:first-child, .esp-table td:first-child { padding-left: 24px; }
.esp-table th:last-child, .esp-table td:last-child { padding-right: 24px; }
.esp-total td { font-weight: 600; border-top: 1px solid var(--border); }
.esp-solved { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.esp-solved li { display: flex; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.esp-note { background: var(--sunken); border-radius: 20px; padding: 18px 22px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.esp-note-title { font-size: 14px; font-weight: 600; color: var(--text); }
.esp-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 800px) {
  .esp-card { padding: 20px; }
  .esp-title { font-size: 26px; }
  .esp-pill { margin-left: 0; }
  .esp-chart-axis span:nth-child(even) { visibility: hidden; }
  .esp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Écran : comptabilité (compta 360, /comptabilite) — préfixe cpt- */
.cpt-period { width: auto; min-width: 190px; }
.cpt-body { gap: 20px; }
.cpt-tight { gap: 2px; }
.cpt-right { align-items: flex-end; text-align: right; white-space: nowrap; }
.cpt-card-body { padding: 0 22px 20px; }
.cpt-note { margin: 0; padding: 12px 22px 16px; font-size: 12px; color: var(--muted); }
.cpt-card-body .cpt-note, .card-pad .cpt-note { padding: 14px 0 0; }
.cpt-odoo { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.cpt-two { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); align-items: start; }
.cpt-pad-x { padding: 0 22px 8px; }
.cpt-checks { padding: 0 22px; }
.cpt-checks .list-row:first-child { border-top: 0; }
.cpt-stats-6 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.cpt-stats-5 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
/* Tableaux à libellés en ligne (projection, TVA par mois) */
.cpt-grid td:first-child { white-space: normal; min-width: 180px; }
.cpt-grid td { white-space: nowrap; }
.cpt-grid tr.cpt-strong td { font-weight: 600; }
.cpt-grid tr.cpt-trend td { color: var(--muted); font-style: italic; }
.cpt-grid tr.cpt-muted-row td { color: var(--muted); }
.cpt-grid tfoot td { border-top: 1px solid var(--border); background: var(--sunken); }
/* Histogramme à deux séries (UI.bars n'en gère qu'une) */
.cpt-chart { display: flex; flex-direction: column; gap: 12px; }
.cpt-pairs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; align-items: end; }
.cpt-pair { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; font-size: 12px; color: var(--muted); }
.cpt-pair-track { width: 100%; max-width: 44px; height: 150px; display: flex; align-items: flex-end; gap: 3px; border-bottom: 1px solid var(--border); }
.cpt-pair-fill { flex: 1 1 0; min-height: 1px; border-radius: 3px 3px 0 0; background: var(--primary); }
.cpt-pair-fill.is-prev, .cpt-swatch.is-prev { background: var(--faint); opacity: .35; }
.cpt-pair-fill.is-out, .cpt-swatch.is-out { background: var(--amber); }
.cpt-pair-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.legend i.cpt-swatch { background: var(--primary); }
.legend i.cpt-swatch.is-prev { background: var(--faint); opacity: .35; }
.legend i.cpt-swatch.is-out { background: var(--amber); }
@media (max-width: 800px) {
  .cpt-period { min-width: 0; flex: 1 1 160px; }
  .cpt-two { grid-template-columns: 1fr; }
  .cpt-pairs { gap: 2px; }
  .cpt-pair .bar-value { display: none; }
  .cpt-pair-track { height: 110px; gap: 1px; }
}
/* Onglet « Résultat mensuel » : cartes KPI, barre de sélection, tableau mensuel */
.cpt-mres-bar { gap: 10px 18px; }
.cpt-mres-asof { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.cpt-mres-asof .select { width: auto; min-width: 180px; }
.switch.is-disabled { opacity: .55; cursor: not-allowed; }
.cpt-mk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cpt-mk { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; border-radius: var(--radius-lg); }
.cpt-mk-label { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cpt-mk-value { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cpt-mk-sub { font-size: 12px; color: var(--text); display: flex; flex-direction: column; gap: 1px; }
.cpt-mk.is-prev .cpt-mk-value { color: var(--muted); }
.cpt-mk-full { grid-column: span 2; }
.cpt-mk-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cpt-mk-trio > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cpt-mk-trio .cpt-mk-value { font-size: 20px; }
.cpt-mres-month { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.cpt-mres-table tr.cpt-mres-out td { color: var(--faint); }
.cpt-mres-table tr.cpt-mres-out td .muted, .cpt-mres-table tr.cpt-mres-out td .fw-600 { color: var(--faint); }
.cpt-mres-table td:first-child { min-width: 150px; }
.cpt-mres-table tfoot tr.cpt-mres-full td { border-top: 1px solid var(--line); color: var(--muted); }
.cpt-mres-foot-sub { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
@media (max-width: 800px) {
  .cpt-mk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cpt-mk-value { font-size: 21px; }
  .cpt-mk-trio .cpt-mk-value { font-size: 17px; }
  .cpt-mres-asof { flex: 1 1 100%; }
  .cpt-mres-asof .select { flex: 1 1 auto; }
}
.cpt-lines .list-row { flex-wrap: nowrap; align-items: flex-start; }
.cpt-lines .list-row-main { flex: 1 1 0; }
.cpt-aged td:first-child { min-width: 210px; }
.cpt-aged td { white-space: nowrap; }
/* Compta 360 › Pôles */
.pol-method { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.pol-fold summary { cursor: pointer; list-style-position: inside; }
.pol-fold ul { list-style: none; margin: 6px 0 2px; padding: 0 0 0 14px; display: grid; gap: 3px; min-width: 300px; }
.pol-fold li { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.pol-fold li > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
#pol-monthly td, #pol-monthly th { white-space: nowrap; }
#pol-review .select-sm { max-width: 260px; }
/* Compta 360 › Projection : contrôles compacts dans les tableaux. */
.prj-edit { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prj-ctl { height: 32px; font-size: 13px; width: auto; max-width: 240px; }
.cpt-grid td .prj-ctl[type=number] { text-align: right; }

/* Écran : plan de charge */
.wl-filter { width: auto; min-width: 190px; max-width: 280px; }
.wl-grid .table td.wl-col, .wl-grid .table th.wl-col { padding: 6px 3px; text-align: center; min-width: 78px; }
.wl-grid .table td.wl-person { min-width: 200px; }
.wl-grid .table td.wl-col-beyond { color: var(--muted); }
.wl-head { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.wl-head .muted { font-weight: 400; font-size: 11px; text-transform: none; letter-spacing: 0; }
.wl-cell {
  width: 100%; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  padding: 6px 4px; border: 1px solid transparent; border-radius: var(--radius-sm); font: inherit; cursor: pointer;
}
.wl-cell.is-empty { background: transparent; color: var(--muted); border-color: var(--line); }
.wl-cell.tone-neutral { background-color: var(--sunken); }
.wl-cell:hover { border-color: currentColor; }
.wl-cell.is-selected { outline: 2px solid var(--primary); outline-offset: 1px; }
.wl-rate { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.wl-sub { font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; opacity: .85; }
.wl-note { font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.wl-cause { display: block; }
.wl-cause-head { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.wl-cause-head::-webkit-details-marker { display: none; }
.wl-cause-body { padding-top: 8px; }
.wl-cause-list { margin: 0; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.wl-assign-tasks { border: 0; padding: 0; margin: 0; max-height: 280px; overflow-y: auto; }
.wl-team-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.wl-team-row .wl-team-name { flex: 1 1 140px; min-width: 0; }
.wl-team-cells { display: grid; grid-template-columns: repeat(4, 52px); gap: 4px; }
.wl-team-cells .wl-cell { min-height: 30px; padding: 3px 2px; cursor: default; }
.wl-team-cells .wl-cell:hover { border-color: transparent; }
.wl-team-cells .wl-cell.is-empty:hover { border-color: var(--line); }
.wl-team-head { font-size: 11px; color: var(--muted); text-align: center; }
.wl-panel { position: static; }
.wl-panel .panel-empty { padding: 16px 10px; }
#sans-responsable .card-sub, #a-traiter .card-sub { margin: 2px 0 0; }
.wl-stats { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }

/* Écran : rentabilité (/rentabilite, blocs des fiches projet et client) — préfixe rnt- */
.rnt-period { width: auto; min-width: 190px; }
.rnt-body, .rnt-signals { gap: 16px; }
.rnt-signals:empty { display: none; }
.rnt-tight { gap: 2px; }
.rnt-right { align-items: flex-end; text-align: right; white-space: nowrap; }
.rnt-card-body { padding: 0 22px 20px; }
.rnt-note { margin: 0; padding: 12px 22px 16px; font-size: 12px; color: var(--muted); }
.rnt-alert { margin-bottom: 4px; }
.rnt-ext { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.rnt-links { gap: 14px; flex-wrap: wrap; font-size: 13px; }
.rnt-panel-title { font-size: 17px; font-weight: 600; line-height: 1.3; }
.rnt-panel .bars { min-height: 0; }
.rnt-lines .list-row { flex-wrap: nowrap; align-items: flex-start; padding-left: 0; padding-right: 0; }
.rnt-lines .list-row-main { flex: 1 1 0; min-width: 0; }
.rnt-two { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); align-items: start; }
.rnt-checks { padding: 0 22px; }
.rnt-checks .list-row:first-child { border-top: 0; }
.rnt-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.rnt-costs .rnt-cost-row { padding: 14px 22px; align-items: flex-end; }
.rnt-cost-fields { display: grid; grid-template-columns: 180px 170px; gap: 12px; }
.rnt-cost-fields .field { margin: 0; }
.rnt-fiche .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rnt-name { min-width: 200px; white-space: normal; }
.rnt-p { margin: 0; }
.rnt-grid td.is-num, .rnt-grid th.is-num { white-space: nowrap; }
@media (max-width: 800px) {
  .rnt-period { min-width: 0; flex: 1 1 160px; }
  .rnt-two { grid-template-columns: 1fr; }
  .rnt-costs .rnt-cost-row { flex-wrap: wrap; align-items: stretch; }
  .rnt-cost-fields { grid-template-columns: 1fr 1fr; width: 100%; }
}

/* Écran : revenu récurrent (/revenu-recurrent) — préfixe rr- */
.rr-body { gap: 20px; }
.rr-tight { gap: 2px; }
.rr-card-body { padding: 0 22px 20px; }
.rr-note { margin: 0; padding: 12px 22px 16px; font-size: 12px; color: var(--muted); }
.rr-card-body .rr-note { padding: 14px 0 0; }
.rr-h3 { margin: 16px 0 8px; font-size: 13px; font-weight: 600; }
.panel .rr-h3 { margin: 0 0 4px; }
.rr-odoo { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 12px; color: var(--muted); }
.rr-two { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); align-items: start; }
.rr-filter { width: auto; min-width: 170px; }
.rr-chart.bars { padding-top: 4px; }
.rr-legend { margin-top: 12px; }
.legend i.rr-swatch { background: var(--primary); }
/* Source du point de la courbe : mesuré plein, reconstitué atténué, saisie initiale très atténuée */
.rr-src-reconstitue .bar-fill, .legend i.rr-swatch.rr-src-reconstitue { opacity: .55; }
.rr-src-saisie_initiale .bar-fill, .legend i.rr-swatch.rr-src-saisie_initiale { opacity: .25; }
.rr-src-avant_odoo .bar-fill { opacity: 0; }
.rr-grid td { white-space: nowrap; }
.rr-grid td.rr-wrap { white-space: normal; min-width: 240px; }
.rr-n { font-size: 11px; }
.rr-sub { display: block; font-size: 11px; }
.rr-checks { padding: 0; }
.rr-checks .list-row:first-child { border-top: 0; }
.rr-barlist { gap: 8px; }
.rr-bar-row .rr-bar-label { flex: 0 0 38%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-bar-row .rr-bar-amount { flex: 0 0 auto; min-width: 64px; text-align: right; }
.rr-bar-row .rr-bar-share { flex: 0 0 40px; text-align: right; font-size: 12px; }
.rr-subs { gap: 4px; min-width: 240px; }
.rr-sub-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.rr-score { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.rr-panel-title { font-size: 18px; font-weight: 600; }
.rr-weights .list-row:first-child { border-top: 0; }
.rr-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
@media (max-width: 800px) {
  .rr-two { grid-template-columns: 1fr; }
  .rr-filter { min-width: 0; flex: 1 1 160px; }
  .rr-chart.bars { gap: 2px; }
  .rr-chart .bar-value { display: none; }
  .rr-chart .bar-track { height: 110px; }
  .rr-bar-row .rr-bar-label { flex-basis: 45%; }
}
.rr-action { display: inline-block; min-width: 150px; font-size: 13px; font-weight: 500; }

/* Écran : sauvegardes (/sauvegardes, blocs des fiches serveur et site) — préfixe bkp- */
.bkp-bars.bars { gap: 2px; }
.bkp-bars .bar { padding: 0; font-size: 10px; }
.bkp-bars .bar-value { display: none; }
.bkp-bars .bar-track { height: 80px; max-width: none; }
.bkp-bars .bar-fill.tone-blue { background: var(--blue); }
.bkp-days.dot-grid { grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 4px; }
.bkp-light { font-weight: 400; }
.bkp-rules { margin: 0; }
.bkp-files summary { cursor: pointer; font-size: 13px; }

/* Écran : serveurs — versions et charge (/serveurs, /serveurs/{id}) — préfixe srv- */
.srv-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.srv-cell .tag { white-space: nowrap; }
.srv-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.srv-chart-title { font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.srv-disk { display: flex; flex-direction: column; gap: 6px; }
.srv-disk-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; }
.srv-disk-head .mono { font-weight: 600; }
.srv-disk-trend { font-size: 12px; color: var(--muted); }
.srv-list .meter { min-width: 92px; }
.srv-list .meter-label { min-width: 0; white-space: nowrap; }
/* Mesures toutes les 15 min : points masqués hors survol, repère « cœurs » en pointillé. */
.srv-chart .chart-dot:not(.is-active) { opacity: 0; }
.srv-chart .chart-s-muted .chart-line { stroke-dasharray: 4 4; }

/* Écran : contrats de maintenance (/contrats-maintenance, résumés des fiches site et client) — préfixe mnt- */
.mnt-score { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mnt-hours { min-width: 96px; }
.mnt-hours .progress { width: 100%; }
.mnt-frise { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 6px; }
.mnt-month { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 11px; color: var(--muted); }
.mnt-month-bar { height: 8px; border-radius: 6px; background: var(--sunken); }
.mnt-month.tone-green .mnt-month-bar { background: var(--green); }
.mnt-month.tone-red .mnt-month-bar { background: var(--red); }
.mnt-month.tone-amber .mnt-month-bar { background: var(--amber); }
.mnt-month.tone-empty .mnt-month-bar { background: transparent; border: 1px dashed var(--faint); }
.mnt-month.is-future .mnt-month-bar { opacity: .6; }
.mnt-month.is-current .mnt-month-label { color: var(--text); font-weight: 600; }
.mnt-month-marks { display: flex; flex-wrap: wrap; gap: 2px 4px; min-height: 14px; }
.mnt-mark { font-family: var(--font-mono, monospace); color: var(--text); }
.mnt-done { color: var(--green); font-weight: 600; }
.mnt-month-hours { font-variant-numeric: tabular-nums; min-height: 14px; }
.mnt-method summary { cursor: pointer; }
.mnt-method[open] summary { margin-bottom: 12px; }
.mnt-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.mnt-summary .list-row-title .tag { margin-left: 6px; }

/* Écran : fournisseurs (/fournisseurs) — préfixe sup- */
.sup-period { width: auto; min-width: 190px; }
.sup-tight { gap: 2px; }
.sup-stack { gap: 20px; }
.sup-card-body { padding: 0 22px 20px; }
.sup-pad { padding: 0 22px 6px; }
.sup-pad .list-row:first-child { border-top: 0; }
.sup-note { margin: 0; padding: 4px 2px 0; font-size: 12px; color: var(--muted); }
.card .sup-note { padding: 10px 22px 16px; }
.sup-odoo { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.sup-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; font-weight: 500; }
.sup-linkbtn:hover, .sup-linkbtn:focus-visible { text-decoration: underline; }
.sup-name { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sup-sub { display: block; font-size: 11px; white-space: normal; line-height: 1.35; }
.sup-subs td { white-space: normal; }
.sup-subs td.is-num { white-space: nowrap; }
.sup-ellipsis { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.sup-list strong { color: var(--text); }
.sup-two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.sup-chart { min-height: 220px; }
.sup-chart-sm { min-height: 160px; }
.sup-h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.sup-right { align-items: flex-end; gap: 4px; }
.sup-event .list-row-main { min-width: 0; }
.sup-event .list-row-sub { overflow-wrap: anywhere; }
.sup-mark .textarea { min-height: 72px; }
.sup-dup { align-items: flex-start; }
.sup-moves { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 4px; }
/* Pont N-1 → N : barre centrée, hausse à droite (rouge), baisse à gauche (vert) */
.sup-bridge td:first-child { min-width: 200px; }
.sup-bar-col { width: 32%; min-width: 140px; }
.sup-bar { position: relative; height: 10px; }
.sup-bar::before { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--border); }
.sup-bar span { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.sup-bar.is-up span { left: 50%; background: var(--red); }
.sup-bar.is-down span { right: 50%; background: var(--green); }
@media (max-width: 800px) {
  .sup-period { min-width: 0; flex: 1 1 160px; }
  .sup-ellipsis { max-width: 220px; }
}
.mnt-table .identity-sub { max-width: 260px; }
.mnt-table .table th, .mnt-table .table td { padding-left: 10px; padding-right: 10px; }
.mnt-expand { align-self: flex-start; }
/* Page en grand d'un contrat Maint : le détail du panneau sur toute la largeur. */
.mnt-page { max-width: 980px; }

/* Écran : services-non-factures (préfixe unb-) */
.unb-tight { gap: 2px; }
.unb-sub { display: block; font-size: 11px; }
.unb-h3 { margin: 0 0 4px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.unb-list { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.unb-method summary { cursor: pointer; }
.unb-method .unb-h3 { margin-top: 14px; }
.unb-panel { gap: 18px; }
.unb-panel .list-row { padding: 10px 0; align-items: flex-start; }
.unb-rows .list-row:first-child { border-top: 1px solid var(--line); }
.unb-rows .list-row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.unb-rates { gap: 8px 22px; }
.unb-actions { flex-wrap: nowrap; gap: 6px; }
.unb-alt { padding: 10px 0; border-top: 1px solid var(--line); gap: 4px; }
.unb-alt .unb-list { margin-top: 0; }

/* Écran : coût de l'infrastructure (/cout-infrastructure) — préfixe ic- */
.ic-body { gap: 20px; }
.ic-tight { gap: 2px; }
.ic-card-body { padding: 0 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.ic-note { margin: 0; font-size: 12px; color: var(--muted); }
.ic-body > .ic-note { padding: 0 4px; }
.ic-h3 { margin: 4px 0 8px; font-size: 13px; font-weight: 600; }
.ic-sub { display: block; font-size: 11px; }
.ic-light { font-weight: 400; }
.ic-wrap { white-space: normal; overflow-wrap: anywhere; }
.ic-refs { overflow-wrap: anywhere; }
.ic-odoo { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 12px; color: var(--muted); }
.ic-grid td, .ic-grid th { white-space: nowrap; }
.ic-key { gap: 10px; align-items: center; flex-wrap: wrap; }
.ic-key .field-label { margin: 0; }
.ic-select { width: auto; min-width: 240px; }
.ic-panel { gap: 14px; }
.ic-chart-sm { min-height: 150px; }
.ic-lines { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-md); }
.ic-line + .ic-line { border-top: 1px solid var(--line); }
.ic-line summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
.ic-line summary::-webkit-details-marker { display: none; }
.ic-line summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.ic-line-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.ic-line-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 12px 6px 22px; font-size: 12px; border-top: 1px dashed var(--line); }
.ic-manual .alert { margin: 0; }
.ic-rec { display: flex; flex-direction: column; gap: 14px; }
.ic-rec-head { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; }
.ic-gain { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex: 0 0 auto; }
.ic-caveats { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.ic-rule-form .ic-sample { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.ic-buckets .stat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 800px) {
    .ic-rec-head { flex-direction: column; }
    .ic-gain { align-items: flex-start; text-align: left; }
}
.ic-panel .chips .tag { white-space: normal; max-width: 100%; }

/* Écran : e-mails transactionnels (/emails-transactionnels) — préfixe tem- */
.tem-domains { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.tem-domain { gap: 14px; }
.tem-domain-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tem-dates { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.tem-domain .alert { margin: 0; }
.tem-rep { display: flex; align-items: center; gap: 14px; }
.tem-score { font-size: 32px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.tem-score small { font-size: 14px; font-weight: 400; color: var(--muted); }
.tem-stats.stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tem-details summary { cursor: pointer; font-size: 13px; }
.tem-domain-footer { justify-content: space-between; margin: 0 -22px -20px; }
.tem-wrap { overflow-wrap: anywhere; word-break: break-word; }
.tem-ellipsis { display: block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tem-filters .select { width: auto; min-width: 160px; height: 36px; font-size: 13px; }
.tem-date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.tem-date .input { width: auto; height: 36px; font-size: 13px; }
.tem-try { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tem-panel { gap: 14px; }
.tem-chart { min-height: 120px; }
@media (max-width: 800px) {
    .tem-domains { grid-template-columns: 1fr; }
    .tem-ellipsis { max-width: 200px; }
    .tem-filters .select, .tem-date { flex: 1 1 140px; }
}
/* Écran : sites archivés (section repliée commune : fiche serveur, fiche client, comptes GSC) */
.archived-section > summary { display: flex; align-items: center; gap: 8px; padding: 12px 20px; cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; }
.archived-section > summary::-webkit-details-marker { display: none; }
.archived-section > summary::before { content: ''; width: 6px; height: 6px; margin: 0 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.archived-section[open] > summary::before { transform: rotate(45deg); }
.card-header + .archived-section, .table-wrap + .archived-section, .empty + .archived-section { border-top: 1px solid var(--line); }
.archived-section[open] > summary { border-bottom: 1px solid var(--border); }
.archived-section .list-row-title { color: var(--muted); }
.panel .archived-section > summary { padding: 8px 0; }

/* Écran : sites — sous-domaines rangés sous leur site principal (liste, aperçu, fiche, serveur) */
.sites-subs-toggle { align-self: flex-start; padding: 2px 0; text-align: left; }
.sites-subs { display: flex; flex-direction: column; gap: 3px; padding: 4px 0 2px 10px; border-left: 2px solid var(--line); }
.sites-sub { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; }
.sites-sub:hover { color: var(--text); text-decoration: underline; }
.cli-subs > summary { cursor: pointer; list-style: none; }
.cli-subs > summary::-webkit-details-marker { display: none; }

/* Écran : banque */
.bank-tabs { margin-bottom: 4px; }
.bank-check { align-items: flex-start; }
.bank-check .list-row-sub { display: block; }
.bank-actions { justify-content: flex-end; flex-wrap: nowrap; }
.bank-pick-list { max-height: 340px; overflow-y: auto; margin: 10px 0 14px; }
.bank-pick { width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--border); cursor: pointer; font: inherit; color: inherit; }
.bank-pick:hover { background: var(--selected-row); }
.bank-pick.is-selected { background: var(--selected-row); box-shadow: inset 3px 0 0 var(--primary); }
.bank-modal-title { margin-top: 16px; }
.bank-new { margin: 12px 0 4px; }
.bank-new > summary { cursor: pointer; margin-bottom: 10px; }
.bank-closed { width: auto; margin-left: 6px; }

/* Écran : domaines — contrôle DNS */
.dns-section { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.dns-head { justify-content: space-between; }
.dns-issues { display: flex; flex-direction: column; gap: 6px; }
.dns-issues .alert { padding: 8px 10px; font-size: 12.5px; }
.dns-fix { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 11.5px; overflow-wrap: anywhere; }
.dns-key { overflow-wrap: anywhere; font-size: 11px; }

/* Écran : consommation IA */
.ia-client { width: auto; min-width: 150px; max-width: 220px; height: 30px; font-size: 12.5px; }
.ia-month { width: auto; min-width: 170px; height: 36px; }

/* Écran : avis Google (widget grw.js) */
.gav-stars { white-space: nowrap; letter-spacing: 1px; }
.gav-stars strong { letter-spacing: 0; }
.gav-review { align-items: flex-start; }
.gav-text { margin: 4px 0 0; font-size: 13px; white-space: pre-line; overflow-wrap: anywhere; }
.gav-site-item + .gav-site-item { padding-top: 12px; border-top: 1px solid var(--line); }
.gav-snippet .copy-field { align-items: flex-start; }
.gav-snippet .textarea { font-size: 11.5px; min-height: 0; resize: none; white-space: pre; overflow-x: auto; }
.gav-howto > summary { cursor: pointer; }
.gav-howto[open] > summary { margin-bottom: 12px; }
.gav-misses { margin-top: 16px; }
.gav-miss-actions { justify-content: flex-end; flex-wrap: nowrap; }

/* Écran : wordpress */
.wpo-nowrap { white-space: nowrap; }
.wpo-auto { width: auto; flex: none; height: 28px; padding: 0 8px; font-size: 12px; }

/* Écran : mails envoyés (/mails) — préfixe mlg- */
.mlg-templates { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: stretch; }
.mlg-template { gap: 10px; }
.mlg-template .card-footer { margin: auto -22px -20px; gap: 8px; justify-content: flex-start; }
.mlg-filters .select { width: auto; min-width: 160px; height: 36px; font-size: 13px; }
.mlg-dates { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.mlg-date, .mlg-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.mlg-date .input { width: auto; height: 36px; font-size: 13px; }
.mlg-link { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.mlg-wrap { overflow-wrap: anywhere; word-break: break-word; }
.mlg-ellipsis { display: block; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mlg-panel { gap: 14px; }
.mlg-frame { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.modal .mlg-frame { height: 65vh; }
@media (max-width: 800px) {
    .mlg-ellipsis { max-width: 180px; }
    .mlg-filters .select, .mlg-date { flex: 1 1 140px; }
}

/* Écran : checklists des tâches, modèles, mes actions — préfixe chk- (+ bouton de tâche de la fiche projet) */
.chk-modal .modal-body { gap: 18px; }
.chk-task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.chk-list { border: 1px solid var(--line); border-radius: var(--radius-md); }
.chk-list-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--sunken); border-bottom: 1px solid var(--line); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.chk-list-title { font-weight: 600; flex: 1 1 auto; }
.chk-progress { width: 90px; flex: none; }
.chk-list-head > .mono { white-space: nowrap; }
.chk-items { list-style: none; margin: 0; padding: 0; }
.chk-item { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.chk-item > input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; flex: none; }
.chk-item-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chk-item-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.chk-item-sub:empty { display: none; }
.chk-label { width: 100%; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text); font: inherit; padding: 2px 6px; margin-left: -6px; }
.chk-label:hover { border-color: var(--line); }
.chk-label:focus { outline: none; border-color: var(--primary); background: var(--surface); }
.chk-item.is-done .chk-label { color: var(--muted); text-decoration: line-through; }
.chk-who { width: 170px; flex: none; height: 32px; font-size: 13px; padding: 0 8px; }
.chk-due { width: 140px; flex: none; height: 32px; font-size: 13px; padding: 0 8px; }
.chk-add { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
.chk-add > .input:first-of-type { flex: 1 1 200px; height: 32px; font-size: 13px; }
.chk-new-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chk-new-list .select { flex: 0 1 280px; }
.chk-new-list .input { flex: 1 1 200px; }
.chk-help { margin: 0; }
.chk-modal .menu-list { right: 0; left: auto; }
.chk-tpl-items .chk-item { padding: 8px 0; }
.chk-offset { width: 90px; flex: none; height: 32px; font-size: 13px; padding: 0 8px; }
.chk-row-link { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.chk-row-link:hover { text-decoration: underline; }
.chk-group-head { padding: 10px 22px; background: var(--sunken); font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; border-top: 1px solid var(--line); }
.chk-action { display: flex; align-items: center; gap: 12px; padding: 11px 22px; border-top: 1px solid var(--line); }
.chk-action > input { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; flex: none; }
.chk-action-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chk-action.is-done .chk-action-label { color: var(--muted); text-decoration: line-through; }
.chk-action-due { font-size: 12px; white-space: nowrap; }
.chk-action > .menu { flex: none; }
/* Mes notifications : appareils abonnés aux notifications push. */
.push-devices { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.push-devices li { padding: 8px 0; border-bottom: 1px solid var(--line); gap: 8px; }
@media (max-width: 800px) {
    .chk-item { flex-wrap: wrap; }
    .chk-who, .chk-due { flex: 1 1 140px; width: auto; }
}
.chk-tpl-row { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: 12px 18px; }
.chk-tpl-row:hover, .chk-tpl-row.is-selected { background: var(--sunken); }
.chk-tpl-items .chk-item { align-items: flex-start; padding: 12px 0; }
.chk-tpl-items .chk-item > .mono { padding-top: 10px; width: 18px; }
.chk-tpl-fields { gap: 8px; }
.chk-tpl-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.chk-tpl-offset { display: inline-flex; align-items: center; gap: 6px; }
.chk-offset { width: 70px; }
.chk-task-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.chk-task-fields .chk-task-name { grid-column: 1 / -1; }
.chk-task-fields .chk-people { grid-column: span 1; }
.chk-people-toggle { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.chk-people .menu-list { min-width: 220px; max-height: 280px; overflow-y: auto; padding: 8px; gap: 4px; }
.chk-people .menu-list .checkbox { padding: 6px 8px; border-radius: 7px; font-size: 13px; }
.chk-people .menu-list .checkbox:hover { background: var(--sunken); }
@media (max-width: 800px) { .chk-task-fields { grid-template-columns: 1fr 1fr; } }
.chk-board { padding: 14px 16px 16px; border-top: 1px solid var(--line); }
.chk-board .kanban-col.is-over { outline: 2px dashed var(--primary); outline-offset: -2px; }
.chk-card { font: inherit; color: inherit; text-align: left; cursor: grab; width: 100%; }
.chk-card.is-dragging { opacity: .45; }
.chk-card.is-closed .chk-card-title { color: var(--muted); text-decoration: line-through; }
.chk-card-title { font-weight: 500; line-height: 1.35; }
.chk-card-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); min-width: 0; }

/* Écran : temps (grille de la semaine) et chrono global — préfixes tms-, tmr- */
.tms-nav { display: inline-flex; align-items: center; gap: 4px; }
.tms-scroll { overflow-x: auto; }
.tms-grid { min-width: 860px; }
.tms-grid th, .tms-grid td { vertical-align: middle; }
.tms-label { font-weight: 400; min-width: 240px; max-width: 360px; }
.tms-grid thead th.tms-c { text-align: center; }
.tms-daynum { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.tms-today { background: var(--selected-row); }
.tms-weekend { background: var(--sunken); }
.tms-cell { width: 64px; height: 32px; padding: 0 6px; text-align: center; font-size: 13px; }
.tms-cell:disabled { border-color: transparent; background: transparent; color: var(--muted); }
.tms-cell.is-saving { border-color: var(--primary); opacity: .6; }
.tms-grid tfoot th, .tms-grid tfoot td { font-weight: 600; border-top: 1px solid var(--border); }
.tms-suggestions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--line); }
.tms-suggest { cursor: pointer; border: 1px dashed var(--border); background: none; font: inherit; font-size: 13px; }
.tmr { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: calc(100vw - 40px); }
.tmr-pill { display: flex; align-items: center; gap: 10px; max-width: min(620px, calc(100vw - 40px));
  padding: 8px 8px 8px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-pop); }
.tmr-pill.is-paused .tmr-dot { background: var(--muted); animation: none; }
.tmr-pill.is-paused .tmr-clock { color: var(--muted); }
.tmr-launcher { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-pop); }
.tmr-launcher:hover, .tmr-launcher[aria-expanded="true"] { color: var(--primary); border-color: var(--primary); }
.tmr-panel { width: min(380px, calc(100vw - 40px)); max-height: min(440px, 70vh); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); overflow: hidden; }
.tmr-panel-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.tmr-recent { overflow-y: auto; }
.tmr-recent-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.tmr-recent-row:last-child { border-bottom: 0; }
.tmr-recent-row:hover { background: var(--sunken); }
.tmr-recent-main { display: flex; flex-direction: column; min-width: 0; text-decoration: none; color: var(--text); }
.tmr-recent-title { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tmr-recent-sub { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tmr-panel-foot { padding: 10px 14px; border-top: 1px solid var(--line); }
.tmr-recent-empty { padding: 16px 14px; font-size: 13px; color: var(--muted); }
.tmr-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; animation: tmr-blink 1.4s ease-in-out infinite; }
@keyframes tmr-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .tmr-dot { animation: none; } }
.tmr-clock { font-weight: 600; }
.tmr-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; color: var(--muted); font-size: 13px; }
.tmr-label:hover { text-decoration: underline; }
.tms-grid tbody th, .tms-grid tfoot th { background: transparent; white-space: normal; border-top: 1px solid var(--line); color: var(--text); text-transform: none; letter-spacing: normal; font-size: 13px; }
.tms-grid tbody tr:hover { background: var(--sunken); }
.tms-c { text-align: center; }

/* Écran : page d'une tâche — préfixe tsk- */
.tsk-heading { min-width: 0; }
.tsk-desc { min-height: 120px; resize: vertical; line-height: 1.55; }
.tsk-desc-text { white-space: pre-wrap; line-height: 1.55; }
.tsk-person { gap: 10px; padding: 6px 0; font-size: 13px; }
.tsk-lines summary { cursor: pointer; color: var(--muted); padding: 4px 0; }
.tsk-lines .timeline { margin-top: 10px; }

/* Écran : planning (calendrier, frise) — préfixe pln- */
.pln-filter { width: auto; min-width: 180px; height: 36px; font-size: 13px; }
.pln-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.pln-head { padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; background: var(--sunken); border-bottom: 1px solid var(--line); }
.pln-day { min-height: 118px; max-height: 230px; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pln-day:nth-child(7n) { border-right: 0; }
.pln-head.is-weekend, .pln-day.is-weekend { background: var(--sunken); }
.pln-day.is-out .pln-num { color: var(--faint, var(--muted)); opacity: .6; }
.pln-day.is-today .pln-num { background: var(--primary); color: var(--surface); border-radius: 999px; padding: 0 7px; align-self: flex-start; }
.pln-day.is-over { outline: 2px dashed var(--primary); outline-offset: -3px; }
.pln-num { font-size: 12px; font-weight: 600; color: var(--muted); line-height: 20px; }
.pln-ev { display: flex; flex-direction: column; gap: 1px; padding: 4px 6px; border-radius: 6px; font-size: 12px; line-height: 1.3; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--primary); cursor: grab; min-width: 0; }
.pln-ev:hover { border-color: var(--muted); }
.pln-ev.is-late { border-left-color: var(--red); }
.pln-ev.is-dragging { opacity: .45; }
.pln-item { border-left-color: var(--blue); background: transparent; border-style: dashed; border-left-style: solid; }
.pln-item.is-done { opacity: .55; cursor: pointer; }
.pln-item.is-done .pln-ev-title { text-decoration: line-through; }
.pln-ev-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pln-ev-sub { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pln-tl { overflow-x: auto; }
.pln-tl-row { display: grid; grid-template-columns: 260px minmax(720px, 1fr); border-bottom: 1px solid var(--line); }
.pln-tl-head { background: var(--sunken); font-size: 12px; color: var(--muted); font-weight: 600; }
.pln-tl-label { padding: 8px 12px 8px 20px; display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); font-size: 13px; }
.pln-tl-head .pln-tl-label { justify-content: center; }
.pln-tl-track { position: relative; min-height: 46px; }
.pln-tl-week { position: absolute; top: 50%; transform: translateY(-50%); padding-left: 6px; white-space: nowrap; }
.pln-tl-grid { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.pln-tl-today { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--red); z-index: 1; }
.pln-tl-bar { position: absolute; top: 50%; height: 8px; transform: translateY(-50%); border-radius: 999px; background: var(--selected-row); border: 1px solid var(--primary); }
.pln-tl-bar.is-derived { border-style: dashed; background: transparent; }
.pln-tl-dot { position: absolute; top: 50%; width: 12px; height: 12px; margin-left: -6px; transform: translateY(-50%); border-radius: 50%; background: var(--primary); border: 2px solid var(--surface); z-index: 2; }
.pln-tl-dot.is-late { background: var(--red); }
.pln-tl-dot.is-item { background: var(--blue); width: 9px; height: 9px; margin-left: -4.5px; }
.pln-tl-dot.is-item.is-done { opacity: .45; }
.pln-tl-dot:hover { transform: translateY(-50%) scale(1.35); }
@media (max-width: 800px) { .pln-cal { min-width: 720px; } #board { overflow-x: auto; } }

/* Écran : actions à mener (rapports reçus par mail) et bloc de la fiche site — préfixe sac- */
.sac-source { width: auto; min-width: 190px; }
.sac-title { line-height: 1.35; }
.sac-reco { align-items: flex-start; }
.sac-detail { margin: 0; font-size: 13px; color: var(--muted); white-space: pre-line; }
.sac-cell-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 420px; margin-bottom: 2px; }
.sac-mail { margin: 0; max-height: 60vh; overflow: auto; padding: 12px; background: var(--sunken); border: 1px solid var(--border); border-radius: var(--radius-md); font-family: var(--font-mono); font-size: 12px; white-space: pre-wrap; word-break: break-word; }
.sac-site-item { border-top: 1px solid var(--line); padding: 8px 0; }
.sac-site-item > summary { cursor: pointer; list-style: none; font-size: 13.5px; }
.sac-site-item > summary::-webkit-details-marker { display: none; }
.sac-site-detail { padding: 10px 0 4px; }
.sac-unmatched { margin-top: 16px; }

/* Notifications (cloche de la barre du haut, mentions @) et écran Équipe — préfixe ntf- */
.ntf-wrap { position: relative; flex: none; }
.topbar-search + .ntf-wrap { margin-left: 0; }
.ntf-bell { position: relative; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--muted); }
.ntf-bell[aria-expanded="true"], .ntf-bell:hover { color: var(--text); }
.ntf-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }
.ntf-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 45; width: min(400px, calc(100vw - 32px)); max-height: min(520px, 75vh); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); overflow: hidden; }
.ntf-head, .ntf-foot { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-size: 13px; }
.ntf-head { border-bottom: 1px solid var(--line); }
.ntf-foot { border-top: 1px solid var(--line); }
.ntf-list { overflow-y: auto; }
.ntf-item { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.ntf-item:last-child { border-bottom: 0; }
.ntf-item:hover { background: var(--sunken); }
.ntf-item.is-unread { background: var(--selected-row); }
.ntf-kind { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); font-size: 12px; font-weight: 600; color: var(--muted); }
.ntf-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ntf-title { font-size: 13px; font-weight: 500; }
.ntf-body { font-size: 12px; color: var(--muted); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ntf-meta { font-size: 11px; color: var(--muted); }
.ntf-dot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--primary); }
.ntf-mentions { display: flex; flex-direction: column; margin-top: -4px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-pop); overflow: hidden; }
.ntf-mention { text-align: left; border: 0; background: none; padding: 7px 10px; font: inherit; font-size: 13px; cursor: pointer; color: var(--text); }
.ntf-mention.is-active, .ntf-mention:hover { background: var(--sunken); }
.ntf-people .input, .ntf-people .select { height: 32px; font-size: 13px; }
.ntf-people td { vertical-align: middle; }

/* Écran : congés et mon agenda — préfixes cng-, agd- (+ absences et événements du planning, pln-abs, pln-cal-ev) */
.cng-person { width: auto; min-width: 180px; }
.cng-balances { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cng-balance { display: flex; flex-direction: column; gap: 4px; }
.cng-big { font-size: 26px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cng-tight { gap: 2px; }
.cng-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }
.cng-preview:empty { display: none; }
#scope-note { margin-bottom: 16px; }
.agd-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.agd-cal { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.agd-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--agd-color, var(--primary)); margin-right: 6px; flex: 0 0 auto; }
.agd-day { border-bottom: 1px solid var(--line); }
.agd-day:last-child { border-bottom: 0; }
.agd-day-head { padding: 8px 16px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--sunken); }
.agd-day.is-today .agd-day-head { color: var(--primary); }
.agd-ev { width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); font: inherit; color: inherit; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.agd-ev:first-of-type { border-top: 0; }
.agd-ev:hover { background: var(--sunken); }
.agd-ev.is-readonly { cursor: default; }
.agd-ev-time { flex: 0 0 110px; font-size: 12px; color: var(--muted); }
.agd-ev-tags { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.agd-form [hidden] { display: none; }
.pln-abs { border-left-color: var(--green); background: var(--green-bg); cursor: default; }
.pln-abs.is-pending { background: transparent; border-style: dashed; border-left-style: solid; border-left-color: var(--amber); }
.pln-cal-ev { border-left-color: var(--agd-color, var(--muted)); background: var(--sunken); cursor: default; }
.pln-cal-ev.is-editable { cursor: pointer; }
.agd-mday { cursor: pointer; min-height: 104px; }
.agd-mday:hover { background: var(--sunken); }
.agd-mev { width: 100%; text-align: left; font: inherit; font-size: 12px; cursor: pointer; }
.agd-mev.is-leave { border-left-color: var(--green); background: var(--green-bg); }
.prj-switch + .tms-nav { margin-left: 8px; }
.split.agd-wide > * { flex: 1 1 100%; max-width: 100%; }
.cng-tight strong { white-space: nowrap; }
#disconnect { align-self: flex-start; }

/* Écran : demandes par mail — préfixe dmd- */
.dmd-help { margin-bottom: 16px; }
.dmd-head { align-items: flex-start; gap: 12px; }
.dmd-tight { gap: 2px; }
.dmd-text { white-space: pre-wrap; font: inherit; font-size: 13px; max-height: 320px; overflow-y: auto; background: var(--sunken); padding: 12px; border-radius: var(--radius-md); margin: 8px 0 0; }
.dmd-actions { gap: 8px; }
.dmd-form { border-top: 1px solid var(--line); padding-top: 14px; }
/* Boîte support : liste à gauche, lecture à droite */
.inbox { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 16px; }
.inbox-list { max-height: calc(100vh - 220px); overflow-y: auto; padding: 6px; }
.inbox-row { display: flex; align-items: flex-start; gap: 2px; }
.inbox-row + .inbox-row { margin-top: 2px; }
.inbox-row > .inbox-item { flex: 1 1 auto; min-width: 0; }
.inbox-check { margin: 13px 0 0 6px; width: 15px; height: 15px; accent-color: var(--primary); flex: 0 0 auto; }
.inbox-count { font-size: 11px; color: var(--muted); background: var(--sunken); border-radius: 999px; padding: 0 6px; flex: 0 0 auto; }
.inbox-thread { gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.inbox-msg { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 8px 12px; }
.inbox-msg > summary { cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.inbox-msg[open] > summary .inbox-snippet { display: none; }
.inbox-msg .inbox-body { margin-top: 8px; }
.inbox-frame { width: 100%; min-height: 120px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.inbox-boxes { margin-bottom: 12px; }
.inbox-bulk { gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; min-height: 32px; }
.inbox-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 10px 18px; border-radius: var(--radius-md); color: inherit; text-decoration: none; position: relative; }
.inbox-item + .inbox-item { margin-top: 2px; }
.inbox-item:hover { background: var(--sunken); }
.inbox-item.is-selected { background: var(--selected-row); }
.inbox-item.is-unread::before { content: ""; position: absolute; left: 6px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.inbox-item.is-unread .inbox-from, .inbox-item.is-unread .inbox-subject { font-weight: 600; }
.inbox-item-head { gap: 6px; align-items: baseline; }
.inbox-from { font-size: 13px; flex: 1 1 auto; min-width: 0; }
.inbox-clip { color: var(--faint); flex: 0 0 auto; }
.inbox-date { font-size: 12px; color: var(--faint); flex: 0 0 auto; white-space: nowrap; }
.inbox-subject { font-size: 13px; }
.inbox-snippet { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.inbox-tags { gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.inbox-read { position: sticky; top: 16px; max-height: calc(100vh - 220px); overflow-y: auto; }
.inbox-read-head { gap: 4px; }
.inbox-read-title { font-size: 18px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.inbox-actions { gap: 8px; flex-wrap: wrap; }
.inbox-client { display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.inbox-task { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; }
.ticket-files { border: 0; padding: 0; margin: 0; min-width: 0; gap: 6px; }
.ticket-files .checkbox { word-break: break-word; }
#ticket-body { min-height: 260px; }
.ticket-ai { align-items: center; gap: 10px; flex-wrap: wrap; }
.ticket-ai .field-help { flex: 1 1 260px; margin: 0; }
.inbox-body { max-height: none; margin: 0; }
.inbox-hint { margin: 0; }
@media (max-width: 900px) {
  .inbox { grid-template-columns: 1fr; }
  .inbox-list, .inbox-read { max-height: none; position: static; }
}
/* Fiche client : derniers mails de la boîte support */
.cli-mail { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; color: inherit; text-decoration: none; min-width: 0; }
.cli-mail + .cli-mail { border-top: 1px solid var(--line); }
.cli-mail:hover .fw-600 { text-decoration: underline; }

/* Écran : hébergement iwego-host (onglets Hébergement des fiches serveur et site) — préfixe heb- */
.heb-cards { align-items: start; }
.heb-buttons, .heb-toolbar { flex-wrap: wrap; gap: 8px; }
.heb-toolbar { gap: 12px; }
.heb-dbs .list-row, .heb-jobs .list-row { padding: 10px 0; }
.heb-dbs .list-row:first-child, .heb-jobs .list-row:first-child { border-top: 0; }
.heb-job { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.heb-job:hover .list-row-title, .heb-job:focus-visible .list-row-title { text-decoration: underline; }
.heb-secrets { padding: 14px 16px; border-radius: var(--radius-md); background: var(--amber-bg); }
.heb-danger { border-color: var(--red-bg); }
.heb-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.heb-modal-site .heb-cards { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.heb-follow .infra-log pre { max-height: 360px; overflow: auto; }

/* Écran : connexion (double authentification) */
.auth-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
/* Fond blanc voulu, même en thème sombre : les applications ne lisent pas un QR code inversé. */
.auth-qr { align-self: center; width: 200px; height: 200px; padding: 8px; border-radius: var(--radius-md); background: #fff; }
.auth-qr svg { display: block; width: 100%; height: 100%; }
.auth-code { font-family: var(--font-mono); font-size: 20px; letter-spacing: .2em; text-align: center; }
.auth-recovery { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-family: var(--font-mono); }

/* Écran : rôles et droits — préfixe rol- */
.rol-scroll { overflow-x: auto; }
.rol-table th.rol-ability, .rol-table th.rol-ability-head { text-align: left; min-width: 220px; }
.rol-table tbody th.rol-ability { font-weight: 400; background: transparent; text-transform: none; letter-spacing: 0; padding-top: 10px; padding-bottom: 10px; border-top: 1px solid var(--line); }
.rol-ability-name { display: block; font-weight: 600; color: var(--text); }
.rol-ability-help { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; max-width: 340px; }
.rol-table thead th { vertical-align: top; }
.rol-col { text-align: center; min-width: 112px; }
.rol-col-head { display: flex; align-items: center; justify-content: center; gap: 2px; min-height: 28px; }
.rol-col-head .btn-icon { width: 24px; height: 24px; }
.rol-col-name { font-weight: 600; color: var(--text); }
.rol-col-sub { display: block; font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.rol-col .menu-list { right: auto; left: 50%; transform: translateX(-50%); text-align: left; }
.rol-cell { text-align: center; }
.rol-note { margin-top: 12px; }
.usr-rights { display: flex; flex-direction: column; gap: 6px; }
.usr-right { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.usr-right .tag { margin-left: auto; }

/* Écran : contacts — sélection, actions groupées, étiquettes Odoo — préfixe cnt- */
.table th.cnt-pick, .table td.cnt-pick { width: 1%; padding-right: 0; }
.cnt-pick input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.cnt-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; position: sticky; top: 0; z-index: 5; }
.cnt-bulk .select { height: 34px; width: auto; min-width: 180px; font-size: 13px; }
/* Fiche société / personne saisie dans le CRM (contact-form.js) : recherche dans l’annuaire des entreprises */
.cf-lookup-bar { display: flex; gap: 8px; }
.cf-lookup-bar .input { flex: 1; min-width: 0; }
.cf-lookup .list-compact { max-height: 220px; overflow-y: auto; }
.cnt-bulk-sep { width: 1px; align-self: stretch; background: var(--border); margin: 0 4px; }
.cnt-bulk-clear { margin-left: auto; }
.cnt-tags { align-items: center; }
.cnt-tag { display: inline-flex; align-items: center; gap: 4px; }
.cnt-tag-x { border: 0; background: none; padding: 0 2px; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; }
.cnt-tag-x:hover { color: var(--red); }
.cnt-tag-add { height: 26px; width: auto; font-size: 12px; padding: 0 8px; }
.cnt-tag-new .input { flex: 1; }
.cnt-tag-list { max-height: 50vh; overflow-y: auto; }
.cnt-tag-row { display: flex; align-items: center; gap: 8px; }
.cnt-tag-row .input { flex: 1; height: 32px; }
.cnt-tag-count { min-width: 80px; text-align: right; }
.cnt-failed { padding-left: 18px; }

/* Écran : lien ticket ↔ tâche (fiche projet, panneau tâche, règles d'intégration) */
.prj-ticket-task { margin-left: auto; }
.intg-rule-sub { padding: 0 0 12px 0; max-width: 420px; }
.chk-ticket-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; }
.chk-ticket-title { flex: 1 1 200px; min-width: 0; }
.chk-ticket-link { width: auto; max-width: 320px; }

/* Écran : devis et produits — lignes de devis, éditeur, totaux — préfixe dev- */
.dev-filter { width: auto; flex: 0 1 220px; min-width: 160px; }
.dev-lines td { vertical-align: top; }
.dev-desc, .dev-note { white-space: pre-line; }
.dev-section td { font-weight: 600; background: var(--sunken); }
.dev-line-note td { font-style: italic; color: var(--muted); white-space: pre-line; }
.dev-totals { display: grid; grid-template-columns: auto auto; gap: 4px 24px; margin: 0; padding: 14px 20px; justify-content: end; font-variant-numeric: tabular-nums; }
.dev-totals dt { color: var(--muted); }
.dev-totals dd { margin: 0; text-align: right; }
.dev-totals .dev-total { font-weight: 600; color: var(--text); }
.card-footer .dev-totals { padding: 0; }
.dev-rows { display: flex; flex-direction: column; }
.dev-row { display: flex; align-items: flex-end; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.dev-row.has-error { box-shadow: inset 3px 0 0 var(--red); }
.dev-row-section .input { flex: 1; font-weight: 600; }
.dev-row-note .textarea { flex: 1; font-style: italic; min-height: 0; }
.dev-product { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dev-desc-input { min-height: 0; resize: vertical; }
.dev-num { display: flex; flex-direction: column; gap: 2px; width: 96px; flex: 0 0 auto; }
.dev-num-sm { width: 76px; }
.dev-num .input { text-align: right; }
.dev-subtotal { width: 110px; flex: 0 0 auto; text-align: right; padding-bottom: 9px; }
.dev-tools { display: flex; gap: 2px; flex: 0 0 auto; padding-bottom: 2px; }
@media (max-width: 800px) {
    .dev-row { flex-wrap: wrap; }
    .dev-product { flex-basis: 100%; }
}

/* Écran : comptabilité — analyses IA (commentaire du mois, dépenses à vérifier) — préfixe cia- */
.cia-summary { margin: 0 0 8px; font-size: 15px; line-height: 1.5; }
.cia-points .list-row, .cia-list .list-row, .cia-group .list-row { padding-left: 0; padding-right: 0; }
.cia-h { margin: 14px 0 6px; font-size: 13px; }
.cia-checks { margin: 0; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.cia-ai { color: var(--text); }
.cia-actions { flex: 0 0 auto; align-self: center; }
.cia-group { margin-top: 10px; }
.cia-group summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 6px 0; }
.cia-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.cia-card .alert { margin-bottom: 10px; }

/* Composant : échanges et pièces jointes Odoo (devis, factures) — préfixe fil- */
.fil-body { padding: 4px 20px 16px; }
.fil-section + .fil-section { margin-top: 12px; }
.fil-h { font-size: 13px; margin: 12px 0 4px; }
.fil-file-row { padding-left: 0; padding-right: 0; }
.fil-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.fil-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fil-subject { font-weight: 600; }
.fil-text { white-space: pre-line; overflow-wrap: anywhere; }
.fil-changes { margin: 0; padding-left: 18px; }
.fil-modal { max-height: 65vh; overflow-y: auto; }
.fil-note { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 4px; }
.fil-note .textarea { min-height: 0; }

/* Fiche client : onglet Échanges (analyse IA des mails de la boîte personnelle) — préfixe xch- */
.xch-months { width: auto; min-width: 0; }
.xch-h { margin: 6px 0 0; font-size: 13px; }
.xch-row { padding-left: 0; padding-right: 0; }
.xch-list { margin: 0; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.xch-amber li::marker { color: var(--amber, #b45309); }
.xch-red li::marker { color: var(--red, #b91c1c); }
.xch-green li::marker { color: var(--green, #15803d); }
/* Ma boîte › Dossiers : arborescence IMAP (indentation par profondeur) */
.inbox-folders { display: flex; flex-direction: column; }
.inbox-folder { display: flex; align-items: center; gap: 8px; padding: 7px 10px 7px calc(10px + var(--depth, 0) * 16px); border-radius: var(--radius-md); color: inherit; text-decoration: none; min-width: 0; font-size: 14px; }
.inbox-folder:hover { background: var(--sunken); }
.inbox-folder.is-node { color: var(--muted, #6b7280); }
.inbox-folder .tag { margin-left: auto; flex: 0 0 auto; }
.inbox-folder-head { gap: 8px; padding: 4px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; min-width: 0; }
.inbox-folder-note { margin: 4px 12px; }
/* Onglet Échanges : questions libres à l'IA */
.xch-ask { border-top: 1px solid var(--border); }
.xch-q { min-height: 60px; }
.xch-qa { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px dashed var(--border); }
.xch-qhead { align-items: flex-start; }
.xch-qtext { font-size: 13px; }
.xch-answer { margin: 0; font-size: 13px; line-height: 1.5; white-space: pre-line; }
.xch-sources { color: var(--text); }
.xch-sources li::marker { color: var(--muted); }

/* Écran : vulnérabilités (veille CERT-FR, KEV, NVD croisée avec nos serveurs) — préfixe vul- */
.vul-lookup { gap: 8px; }
.vul-lookup .input { width: 300px; max-width: 60vw; }
.vul-server { width: auto; min-width: 190px; }
.vul-cell-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 460px; margin-bottom: 2px; }
.vul-summary { margin: 0; font-size: 13px; color: var(--muted); white-space: pre-line; max-height: 220px; overflow: auto; }
.vul-exposure { border-top: 1px solid var(--line); padding: 10px 0; }
.vul-exposure > summary { cursor: pointer; list-style: none; font-size: 13.5px; }
.vul-exposure > summary::-webkit-details-marker { display: none; }
.vul-exposure-body { padding: 10px 0 4px; }
.vul-reason { margin: 0; font-size: 13px; white-space: pre-line; }
.vul-steps { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.vul-steps .checkbox { align-items: flex-start; }
.vul-steps .checkbox input { margin-top: 2px; flex: none; }
.vul-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.vul-inventory { margin-top: 16px; }
.vul-inventory > summary { cursor: pointer; }
.vul-inv-server { border-top: 1px solid var(--line); padding: 10px 0; font-size: 13px; }
.vul-chips { flex-wrap: wrap; }

/* Écran : rapports mensuels de maintenance (relecture et espace client) — préfixe rm- */
.rm-report { gap: 18px; }
.rm-tight { gap: 2px; }
.rm-p { margin: 0; }
.rm-h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.rm-h3 { font-size: 16px; font-weight: 600; margin: 0; }
.rm-h4 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 0; }
.rm-card { padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.rm-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.rm-figure { display: flex; flex-direction: column; font-size: 13px; }
.rm-figure strong { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.rm-site-head { gap: 10px; flex-wrap: wrap; align-items: center; }
.rm-site-icon { display: inline-flex; color: var(--muted); }
.rm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.rm-stat { background: var(--sunken); border-radius: var(--radius-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.rm-stat strong { font-size: 20px; font-weight: 600; }
.rm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rm-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rm-list li:first-child { border-top: 0; padding-top: 0; }
.rm-note { margin: 0; padding: 14px 18px; border-left: 3px solid var(--primary); background: var(--sunken); border-radius: var(--radius-md); display: flex; flex-direction: column; gap: 4px; }
.rm-note-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.rm-note-text { white-space: pre-line; }
.rm-warnings { margin: 0; padding-left: 18px; }
.rm-month { width: auto; min-width: 180px; }
.rm-recipients { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.rm-recipients .checkbox { align-items: flex-start; }
.rm-recipients .checkbox input { margin-top: 2px; flex: none; }
.rm-espace-head { align-items: center; gap: 12px; flex-wrap: wrap; }

/* Documents du client sur le NAS (fiche client › Documents) */
.nas-link { border: 0; background: none; padding: 0; color: var(--blue); font: inherit; cursor: pointer; text-align: left; }
.nas-link:hover { text-decoration: underline; }
.nas-crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 15px; }
.nas-drop { border: 1px dashed var(--border); border-radius: var(--radius-md); padding: 8px 12px; transition: background .15s, border-color .15s; }
.nas-drop.is-over { border-color: var(--blue); background: var(--blue-bg); }
.nas-list { list-style: none; margin: 0; padding: 0; }
.nas-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr) 90px 130px; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.nas-list li:first-child { border-top: 0; }
.nas-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nas-hint { margin: 8px 0 0; }
.nas-list-tools li { grid-template-columns: 22px minmax(0, 1fr) 90px 130px auto; }
.nas-tools { display: inline-flex; gap: 10px; justify-content: flex-end; white-space: nowrap; }
@media (max-width: 640px) { .nas-list-tools li { grid-template-columns: 22px minmax(0, 1fr) auto; } .nas-list-tools li > :nth-child(3), .nas-list-tools li > :nth-child(4) { display: none; } .nas-list-tools li > :last-child { display: inline-flex; } }
@media (max-width: 640px) { .nas-list li { grid-template-columns: 22px minmax(0, 1fr) 70px; } .nas-list li > :last-child { display: none; } }

/* Écran : /vulnerabilites/assistant, assistant IA (vulnerabilites-assistant.js) — préfixes vul-ai, vul-chat */
.vul-ai { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; padding: 16px; align-items: start; }
.vul-ai-server { min-width: 260px; max-width: 100%; }
.vul-ai-server-card { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.vul-ai-head { flex-wrap: wrap; }
.vul-ai-head .card-title { margin: 0; }
.vul-ai-point { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--sunken); }
.vul-ai-points { margin-top: 10px; }
.vul-ai-block { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.vul-ai-block p { margin: 0; }
.vul-ai-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.vul-chat-msg.is-auto { opacity: .75; }
.vul-chat-item.is-point { padding-left: 22px; }
.vul-chat-list { display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 220px); overflow: auto; }
.vul-chat-list > .btn { align-self: flex-start; margin-bottom: 6px; }
.vul-chat-item { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: none; color: inherit; font: inherit; cursor: pointer; }
.vul-chat-item:hover, .vul-chat-item.is-active { background: var(--sunken); }
.vul-chat-item-title { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vul-chat-thread { display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 330px); min-height: 240px; overflow: auto; padding-right: 4px; }
.vul-chat-msg { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 12px; font-size: 13.5px; }
.vul-chat-msg.is-me { align-self: flex-end; max-width: 85%; background: var(--sunken); }
.vul-chat-meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.vul-chat-text { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; }
.vul-chat-prose p, .vul-chat-prose ul { margin: 0 0 8px; }
.vul-chat-prose ul, .vul-chat-ask ul { padding-left: 18px; }
.vul-chat-prose code { font-family: var(--font-mono); font-size: 12.5px; }
.vul-chat-prios { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.vul-chat-prio { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.vul-chat-prio p { margin: 0; }
.vul-chat-rank { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); font-size: 12px; flex: none; }
.vul-chat-cmds { position: relative; }
.vul-chat-cmds pre { margin: 0; padding: 8px 10px; padding-right: 70px; border-radius: var(--radius-sm); background: var(--sunken); font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.vul-chat-cmds .btn { position: absolute; top: 4px; right: 4px; }
.vul-chat-exp { cursor: pointer; border: 0; font: inherit; text-decoration: none; color: inherit; }
.vul-chat-ask { margin-top: 8px; font-size: 13px; }
.vul-chat-main textarea { font-size: 13px; }
@media (max-width: 800px) { .vul-ai { grid-template-columns: 1fr; } .vul-chat-list { max-height: 220px; } .vul-chat-thread { max-height: none; } }
.vul-chat-class { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 13px; }
.vul-chat-class ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.vul-chat-class li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vul-chat-class li > div { flex-basis: 100%; }
.vul-chat-class li.is-done { opacity: .7; }

/* Écran : vulnérabilités — rapport par client (/vulnerabilites/rapport, rapport-vulnerabilites-commun.js) */
.vr-toolbar { flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.vr-toolbar .select, .vr-toolbar .input { width: auto; }
.vr-client { min-width: 340px; }
.vr-client .combo, .vr-client .input { width: 100%; }
.vr-client .field { margin: 0; }
.vr-page { max-width: 1100px; }
.vr-report .table td { vertical-align: top; }
.vr-explain { margin: 0; line-height: 1.55; }
.vul-client-fields { border-top: 1px dashed var(--line); padding-top: 10px; }
@media print {
    .rail, .nav-panel, .nav-backdrop, .topbar, .toasts, .vr-noprint { display: none !important; }
    body, .page, main { background: #fff !important; margin: 0 !important; padding: 0 !important; display: block !important; }
    .vr-page { max-width: none; }
    .vr-report .card { break-inside: avoid; box-shadow: none; }
    .vr-report a { color: inherit; text-decoration: none; }
}

/* Écran : boîtes mail — rédaction dans le CRM (mail-compose.js) — préfixe mc- */
.mc-form { gap: 12px; }
.mc-form.is-drop { outline: 2px dashed var(--primary); outline-offset: 4px; border-radius: var(--radius-md); }
.mc-head { gap: 8px; align-items: baseline; flex-wrap: wrap; }
.mc-rcpt { position: relative; display: flex; align-items: flex-start; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.mc-rcpt-label { flex: 0 0 34px; font-size: 13px; color: var(--muted); padding-top: 6px; }
.mc-chips { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 32px; cursor: text; min-width: 0; }
.mc-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; font-size: 13px; background: var(--chip); border-radius: 999px; padding: 2px 4px 2px 10px; overflow-wrap: anywhere; }
.mc-chip.is-invalid { background: var(--red-bg); color: var(--red); }
.mc-chip-x { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; line-height: 1; }
.mc-chip-x:hover, .mc-chip-x:focus-visible { background: var(--border); }
.mc-rcpt-input { flex: 1 1 160px; min-width: 120px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; padding: 6px 2px; }
.mc-suggest { position: absolute; left: 42px; right: 0; top: 100%; z-index: 20; margin: 2px 0 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); max-height: 260px; overflow-y: auto; }
.mc-suggest li { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; min-width: 0; }
.mc-suggest li.is-active, .mc-suggest li:hover { background: var(--selected-row); }
.mc-rcpt-more { gap: 12px; margin-top: -4px; }
.mc-editor { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.mc-editor:focus-within { border-color: var(--primary); }
.mc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); background: var(--sunken); }
.mc-tool { border: 0; background: none; color: var(--text); font: inherit; font-size: 13px; min-width: 30px; height: 28px; padding: 0 8px; border-radius: var(--radius-sm); cursor: pointer; }
.mc-tool:hover, .mc-tool:focus-visible { background: var(--border); }
.mc-tool.is-on { background: var(--rail-active); color: var(--primary); }
.mc-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.mc-area { min-height: 180px; max-height: 480px; overflow-y: auto; padding: 12px 14px; font-size: 14px; line-height: 1.5; outline: 0; overflow-wrap: anywhere; }
.mc-area p { margin: 0 0 .5em; }
.mc-area img { max-width: 100%; height: auto; }
.mc-area blockquote { margin: 0 0 .5em .8ex; border-left: 2px solid var(--border); padding-left: 1ex; color: var(--muted); }
.mc-area a { color: var(--blue); }
.mc-signature { margin-top: 12px; padding-top: 8px; border-top: 1px dashed var(--border); color: var(--muted); }
.mc-sig-bar { gap: 8px; align-items: center; flex-wrap: wrap; }
.mc-sig-bar .select { width: auto; min-width: 160px; height: 32px; }
.mc-files { border: 0; padding: 0; margin: 0; min-width: 0; gap: 6px; }
.mc-files .field-help { flex: 1 1 220px; margin: 0; }
.mc-file { gap: 8px; align-items: center; font-size: 13px; }
.mc-file .truncate { min-width: 0; flex: 0 1 auto; }
.mc-quote .inbox-frame { margin-top: 6px; }
.mc-quote summary { cursor: pointer; }
.mc-actions { border-top: 1px solid var(--line); padding-top: 12px; }
.mc-dl { max-width: 100%; gap: 6px; }
.mc-dl .truncate { min-width: 0; max-width: 260px; }
.inbox-files { gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.inbox-files:empty { display: none; }
.mc-sig-row { gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.mc-sig-main { gap: 2px; flex: 1 1 auto; min-width: 0; }
.mc-nas-crumbs { gap: 2px; flex-wrap: wrap; }
.mc-nas-list { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow-y: auto; }
.mc-nas-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: none; color: inherit; font: inherit; font-size: 13px; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.mc-nas-item:hover, .mc-nas-item:focus-visible { background: var(--sunken); }
.mc-nas-item.is-picked { background: var(--green-bg); }
.mc-nas-item .truncate { flex: 1 1 auto; min-width: 0; }
/* Signature en code HTML (Mes signatures) et brouillon rédigé par l'IA */
.mc-sig-head { gap: 8px; align-items: center; margin-bottom: 6px; }
.mc-code { min-height: 160px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.45; white-space: pre; overflow-wrap: normal; }
.mc-sig-code { gap: 8px; }
.mc-sig-frame { min-height: 60px; }
.mc-signature { overflow-x: auto; }
.mc-signature table { max-width: none; }
.mc-ai { gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--sunken); }
.mc-ai-bar { gap: 8px; align-items: center; flex-wrap: wrap; }
.mc-ai-input { flex: 1 1 240px; min-width: 0; height: 32px; }
.mc-ai-presets { gap: 2px; flex-wrap: wrap; }
.mc-ai .field-help { margin: 0; }
.mc-ai-done { gap: 8px; align-items: center; flex-wrap: wrap; }
.mc-ai-list { margin: 0; padding-left: 18px; }
@media (max-width: 800px) {
  .mc-rcpt-label { flex-basis: 28px; }
  .mc-suggest { left: 0; }
  .mc-actions .ml-auto { margin-left: 0; }
}

/* Écran : communication clients (communications*.js, ticket #16) — préfixe comm- */
.comm-row { width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; cursor: pointer; }
.comm-row:hover, .comm-row:focus-visible { background: var(--sunken); }
.comm-row.is-selected { background: var(--selected-row); }
.comm-tpl-desc { white-space: normal; font-style: italic; }
.comm-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.comm-field { border: 1px solid var(--line); cursor: pointer; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.comm-field:hover, .comm-field:focus-visible { border-color: var(--primary); }
.comm-composer .field-help { margin-top: -6px; }
.comm-meta { align-items: start; }
.comm-readonly { display: flex; align-items: center; background: var(--sunken); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comm-filters { display: flex; flex-direction: column; gap: 10px; }
.comm-filter-row { gap: 8px 16px; flex-wrap: wrap; align-items: flex-start; }
.comm-filter { position: relative; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.comm-filter > summary { padding: 6px 10px; cursor: pointer; font-size: 13px; font-weight: 500; }
.comm-filter[open] > summary { border-bottom: 1px solid var(--line); }
.comm-filter-list { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; max-height: 260px; overflow-y: auto; min-width: 220px; }
.comm-chip { gap: 6px; }
.comm-chip button { border: 0; background: none; cursor: pointer; padding: 0 2px; font-size: 14px; line-height: 1; }
.comm-summary { gap: 6px 10px; flex-wrap: wrap; align-items: center; }
.comm-warn { padding: 8px 10px; border-radius: var(--radius-md); background: var(--amber-bg); }
.comm-warn.text-red { background: var(--red-bg); }
.comm-audience { max-height: 520px; overflow-y: auto; }
.comm-preview-pick { max-width: 420px; }
.comm-head { display: flex; flex-direction: column; gap: 2px; }
.comm-actions { gap: 8px 12px; flex-wrap: wrap; align-items: center; }
.comm-rules { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.comm-confirm-count { font-size: 16px; margin: 0; }
.comm-progress-head { gap: 8px 12px; flex-wrap: wrap; align-items: center; }
.comm-error { max-width: 420px; overflow-wrap: anywhere; }
.comm-title-status { display: inline-flex; align-items: center; margin-right: 4px; }
/* Mise en page de marque (communications-mise-en-page.js, migration 1013) et aperçus clair / sombre / mobile */
.comm-layout-split .split-main { flex: 1 1 460px; }
.comm-layout-split .split-side { flex: 1 1 640px; position: sticky; top: 12px; }
.comm-layout-section { border: 0; margin: 0; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.comm-layout-section:last-of-type { border-bottom: 0; }
.comm-layout-section > legend { padding: 0; margin-bottom: 8px; }
.comm-layout-help { margin: 0 0 10px; }
.comm-layout-logo { gap: 8px; align-items: center; flex-wrap: wrap; }
.comm-layout-logo-box { display: inline-flex; align-items: center; justify-content: center; min-width: 160px; min-height: 56px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.comm-layout-logo-box img { max-width: 220px; max-height: 64px; display: block; }
.comm-layout-color { gap: 8px; align-items: center; }
.comm-layout-color input[type="color"] { width: 40px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: none; cursor: pointer; }
.comm-layout-color .input { max-width: 120px; }
.comm-layout-social { gap: 6px; align-items: center; }
.comm-layout-social .select { max-width: 150px; }
.comm-layout-social .input { flex: 1 1 auto; }
.comm-layout-field .checkbox { margin: 6px 0; }
.comm-layout-frame { min-height: 400px; }
.comm-layout-stage, .comm-stage { display: flex; justify-content: center; }
.comm-layout-stage.is-mobile .inbox-frame, .comm-stage.is-mobile .inbox-frame { width: 375px; max-width: 100%; }
@media (max-width: 800px) {
  .comm-layout-split .split-side { position: static; }
  .comm-preview-pick { max-width: 100%; margin-left: 0; }
  .comm-filter-list { min-width: 0; }
}
