/* ════════════════════════════════════════════════════════════════
   ARTIS — v25.css (v2.25.0)
   1. OSSATURE choisie : rail A4 ↔ sidebar A1 + colonne droite permanente
   2. ACCUEIL tableau de bord à widgets (déplaçables / redimensionnables)
   3. AMBIANCES au choix : papier (C11) · technique (C13) · verre (C14)
   Chargé en dernier.
   ════════════════════════════════════════════════════════════════ */

/* ── 1 · OSSATURE ─────────────────────────────────────────────── */
#sidebar { transition: width 0.22s cubic-bezier(0.2, 0.9, 0.3, 1); }

.nav-collapse-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 4px;
  padding: 6px 10px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: var(--surface);
  color: var(--ink-dim);
  font-size: 11.5px;
  cursor: pointer;
}
.nav-collapse-btn:hover { color: var(--ink); background: var(--hover-bg); }
.nav-collapse-btn .icon { width: 14px; height: 14px; }
[data-nav="full"] .nav-collapse-btn .ic-rail { display: none; }
[data-nav="rail"] .nav-collapse-btn .ic-full { display: none; }

/* Rail A4 : icônes seules, tout le texte disparaît */
[data-nav="rail"] #sidebar { width: 62px; }
[data-nav="rail"] #sidebar .sidebar-brand .name,
[data-nav="rail"] #sidebar .sidebar-brand .sub,
[data-nav="rail"] #sidebar .search-btn span,
[data-nav="rail"] #sidebar .search-btn .kbd,
[data-nav="rail"] #sidebar .nav-item .label,
[data-nav="rail"] #sidebar .nav-item .badge,
[data-nav="rail"] #sidebar .nav-section,
[data-nav="rail"] #sidebar .nav-collapse-btn .label,
[data-nav="rail"] #sidebar .sync-status,
[data-nav="rail"] #sidebar .theme-toggle,
[data-nav="rail"] #sidebar .astyle-open-btn span,
[data-nav="rail"] #sidebar .user-info,
[data-nav="rail"] #sidebar .user-card > .icon,
[data-nav="rail"] #sidebar .nav-section-add {
  display: none;
}
[data-nav="rail"] #sidebar .sidebar-header { padding: 12px 0 6px; display: flex; justify-content: center; }
[data-nav="rail"] #sidebar .sidebar-search { padding: 4px 10px; }
[data-nav="rail"] #sidebar .search-btn { justify-content: center; padding: 7px 0; }
[data-nav="rail"] #sidebar .nav-collapse-btn { justify-content: center; margin: 0 10px 4px; padding: 6px 0; }
[data-nav="rail"] #sidebar .nav-item { justify-content: center; padding: 9px 0; margin: 1px 8px; }
[data-nav="rail"] #sidebar .nav-item .icon { width: 18px; height: 18px; }
[data-nav="rail"] #sidebar .astyle-open-btn { justify-content: center; padding: 7px 0; margin: 0 10px 8px; width: auto; }
[data-nav="rail"] #sidebar .user-card { justify-content: center; padding: 8px 0; }
[data-nav="rail"] #sidebar .nav-section-header { display: none; }

/* Colonne droite permanente, repliable */
#scratch { transition: width 0.22s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.18s ease; }
[data-scratch="closed"] #scratch { width: 0; min-width: 0; opacity: 0; overflow: hidden; border-left: none; }
#scratch-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 74px;
  border: 0.5px solid var(--paper-border);
  border-right: none;
  border-radius: 12px 0 0 12px;
  background: linear-gradient(180deg, var(--scratch-bg-start), var(--scratch-bg-end));
  color: var(--paper-ink);
  cursor: pointer;
  box-shadow: -2px 2px 10px rgba(20, 30, 25, 0.12);
}
#scratch-tab i, #scratch-tab svg { width: 15px; height: 15px; }
[data-scratch="closed"] #scratch-tab { display: flex; }

/* ── 2 · TABLEAU DE BORD À WIDGETS ────────────────────────────── */
.dash-page { max-width: none; }
.dash-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.dash-head .page-subtitle { margin-top: 2px; }
.dash-head-actions { margin-left: auto; position: relative; }
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-auto-rows: 158px;
  grid-auto-flow: dense;
  gap: 12px;
}
.dw {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-md, 0 2px 8px rgba(0, 0, 0, 0.06));
  overflow: hidden;
  min-width: 0;
}
.dw-resizing { outline: 2px dashed var(--c-forest, #1B4332); outline-offset: 2px; z-index: 5; }
.dw-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px 7px;
  cursor: grab;
  flex-shrink: 0;
  border-bottom: 0.5px solid var(--border-soft, var(--border));
}
.dw-head:active { cursor: grabbing; }
.dw-head .icon { width: 14px; height: 14px; color: var(--c-forest, #1B4332); flex-shrink: 0; }
.dw-head h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); font-weight: 700; }
.dw-open { margin-left: auto; color: var(--ink-dim); text-decoration: none; font-size: 13px; padding: 0 3px; border-radius: 6px; }
.dw-open:hover { color: var(--c-forest, #1B4332); background: var(--hover-bg); }
.dw-body { flex: 1; padding: 8px 12px 10px; overflow: hidden; min-height: 0; }
.dw-body.scroll-y { overflow-y: auto; }
.dw-loading, .dw-empty { color: var(--ink-dim); font-size: 12px; padding: 6px 2px; }
.dw-rs {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 26px;
  height: 26px;
  cursor: nwse-resize;
  touch-action: none;
  background:
    linear-gradient(135deg, transparent 58%, var(--border-strong, #D6D2C7) 58%, var(--border-strong, #D6D2C7) 66%, transparent 66%,
                    transparent 74%, var(--border-strong, #D6D2C7) 74%, var(--border-strong, #D6D2C7) 82%, transparent 82%);
  border-bottom-right-radius: var(--radius-lg, 12px);
}
.dw-rs:hover { background-color: var(--hover-bg); }
.dw-pilotis { display: flex; flex-direction: column; }
.dw-pilotis .pilotis-quote { flex-shrink: 1; overflow: hidden; }
.dash-aff-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--border-soft, var(--border));
  text-decoration: none;
  color: var(--ink);
  font-size: 12.5px;
}
.dash-aff-row:hover { background: var(--hover-bg); border-radius: 7px; }
.dash-aff-code {
  background: color-mix(in srgb, var(--c-forest, #1B4332) 10%, transparent);
  color: var(--c-forest, #1B4332);
  border-radius: 7px;
  padding: 1px 8px;
  font-size: 10.5px;
  font-weight: 700;
  flex-shrink: 0;
}
.dash-aff-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dash-aff-count {
  margin-left: auto;
  background: var(--c-warning-bg, rgba(176, 125, 43, 0.12));
  color: var(--c-warning, #B07D2B);
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
}
.dash-frise { display: flex; gap: 5px; height: calc(100% - 4px); align-items: stretch; }
.dash-frise-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0.5px solid var(--border);
  border-radius: 9px;
  text-decoration: none;
  color: var(--ink-soft);
  min-width: 0;
  padding: 4px 0;
}
.dash-frise-day:hover { border-color: var(--c-forest, #1B4332); }
.dash-frise-day.today { border: 1.5px solid var(--c-forest, #1B4332); background: color-mix(in srgb, var(--c-forest, #1B4332) 6%, transparent); }
.dfd-dow { font-size: 8.5px; text-transform: uppercase; color: var(--ink-dim); }
.dfd-num { font-size: 13px; font-weight: 700; color: var(--ink); }
.dfd-dot {
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-forest, #1B4332);
  color: #fff;
  padding: 0 4px;
}
.dfd-dot.late { background: var(--c-danger, #C44536); }
.dfd-dot.empty { background: transparent; }
.dash-frise-late {
  display: inline-block;
  margin-bottom: 7px;
  background: var(--c-danger-bg, rgba(196, 69, 54, 0.1));
  color: var(--c-danger, #C44536);
  border-radius: 8px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.dash-addpop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  background: var(--surface-elevated, var(--surface));
  border: 0.5px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg, 0 8px 30px rgba(0, 0, 0, 0.12));
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 240px;
}
.dash-addpop label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink); cursor: pointer; }
.dash-addpop input { width: 15px; height: 15px; accent-color: var(--c-forest, #1B4332); }

/* ── 2bis · v2.25.1 — BARRE D'OUTILS DU CARNET LISIBLE ──
   Retour Sébastien : « barre d'outils en haut moche et illisible (trop
   petite) » — les boutons étaient des pastilles 30 px icône seule.
   Désormais : pilules 36 px AVEC LIBELLÉ, groupées, qui passent à la
   ligne au lieu de rapetisser. */
.carnet-add-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  row-gap: 5px;
}
.carnet-add-bar .carnet-add-btn {
  width: auto;
  min-height: 31px;
  padding: 4px 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  border: 1px solid var(--border);
  background: var(--surface, #fff);
}
.carnet-add-bar .carnet-add-btn span { display: inline; }
.carnet-add-bar .carnet-add-btn .icon,
.carnet-add-bar .carnet-add-btn svg { width: 14px; height: 14px; }
.carnet-add-bar .carnet-add-btn:hover {
  border-color: color-mix(in srgb, var(--cn-accent, var(--c-forest, #0F6E56)) 45%, transparent);
  background: color-mix(in srgb, var(--cn-accent, var(--c-forest, #0F6E56)) 9%, var(--surface, #fff));
  color: var(--cn-accent, var(--c-forest, #0F6E56));
}
.carnet-add-bar .carnet-add-btn-primary {
  border-color: color-mix(in srgb, var(--cn-accent, var(--c-forest, #0F6E56)) 45%, transparent);
  background: color-mix(in srgb, var(--cn-accent, var(--c-forest, #0F6E56)) 10%, var(--surface, #fff));
  color: var(--cn-accent, var(--c-forest, #0F6E56));
}
.carnet-add-sep { width: 1px; height: 22px; background: var(--border-strong); margin: 0 3px; flex-shrink: 0; }
/* Boutons d'action de l'en-tête (épingle, focus, ✨, palette…) :
   31 px — même gabarit que les pilules d'ajout, icônes 15 px */
.carnet-editor-header-actions .carnet-btn-icon {
  width: 31px;
  height: 31px;
}
.carnet-editor-header-actions .carnet-btn-icon .icon,
.carnet-editor-header-actions .carnet-btn-icon svg { width: 15px; height: 15px; }

/* v2.25.3 — Échéance sur les TÂCHES DE DÉSIGNATION : COMPACTE et à DROITE.
   Le texte de la tâche garde TOUTE la largeur ; la date, discrète, se cale
   à droite et passe SOUS le texte (alignée droite) quand la colonne est
   étroite — elle ne comprime jamais la désignation. */
.reg-cell-des .reg-item { flex-wrap: wrap; }
.reg-cell-des .reg-item .reg-item-text { min-width: 110px; }
.reg-des-date {
  margin-left: auto;
  flex-shrink: 0;
  order: 20;              /* toujours en dernier : seule à passer à la ligne */
}
.reg-des-date input[type="date"] {
  width: 96px;
  height: 21px;
  font-size: 10px;
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 0 3px;
  color: var(--ink-dim);
  background: transparent;
}
.reg-des-date input[type="date"]:focus,
.reg-des-date.cn-due-late input[type="date"],
.reg-des-date.cn-due-soon input[type="date"] { color: inherit; background: var(--surface, #fff); }

/* ── 2quinquies · v2.25.4 — PHOTO DE CELLULE AGRANDISSABLE ──
   « pourquoi je ne peux pas agrandir l'image ? » : la vignette de cellule
   était figée (110 px, toucher = ouverture directe de l'éditeur). Elle a
   maintenant le MÊME système que les photos de note : toucher = sélection
   (4 poignées de coins + barre Annoter/Calques), glisser un coin =
   largeur 20-100 % de la colonne, persistée (img.largeur). */
.cn-cell-box {
  margin: 4px 12px 6px;
  max-width: calc(100% - 24px);
}
.cn-cell-box .carnet-img {
  max-height: none;          /* la largeur choisie commande, plus de plafond 110px */
  border: 0.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  width: 100%;
  display: block;
}

/* ── 2quater · v2.25.2 — TABLETTE : PLUS AUCUNE COMMANDE CACHÉE AU SURVOL ──
   Retour Sébastien : « la 2e ligne n'est pas effaçable » — le × de
   suppression n'apparaissait qu'au survol souris (opacity 0), invisible
   au doigt/stylet. Inventaire complet corrigé : ×, poignées, boutons
   d'ajout, badge de liaison, ↺ — toujours visibles (discrets), cibles
   tactiles élargies. */
.reg-item-rm,
.carnet-bloc-del,
.carnet-bloc-drag,
.reg-link-badge,
.reg-untache,
.reg-add-row {
  opacity: 0.5 !important;
}
.reg-item-rm:hover, .reg-item-rm:active,
.carnet-bloc-del:hover, .carnet-bloc-del:active,
.carnet-bloc-drag:hover, .carnet-bloc-drag:active,
.reg-link-badge:hover, .reg-link-badge:active,
.reg-untache:hover, .reg-untache:active,
.reg-add-row:hover, .reg-add-row:active { opacity: 1 !important; }
.reg-item-rm {
  min-width: 27px;
  min-height: 27px;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.reg-item-rm:active { color: #A32D2D; background: rgba(163, 45, 45, 0.1); }
.carnet-bloc-del { width: 27px; height: 27px; }
.reg-add-row .reg-add-btn { min-height: 26px; padding: 2px 9px; }

/* ── 2ter · v2.25.1 — RECHERCHE GLOBALE (Ctrl+K) ── */
.gsearch-overlay { align-items: flex-start; padding-top: 9vh; }
.gsearch-modal {
  width: min(640px, 94vw);
  background: var(--surface-elevated, var(--surface, #fff));
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(10, 25, 20, 0.35);
  border: 0.5px solid var(--border);
  overflow: hidden;
}
.gsearch-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.gsearch-bar .icon { width: 17px; height: 17px; color: var(--c-forest, #1B4332); flex-shrink: 0; }
.gsearch-input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-size: 15px;
  color: var(--ink);
  font-family: inherit;
}
.gsearch-results { max-height: 56vh; overflow-y: auto; padding: 7px; }
.gsearch-hint { color: var(--ink-dim); font-size: 12.5px; padding: 10px 12px; }
.gsearch-group {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  font-weight: 700;
  padding: 9px 12px 3px;
}
.gsearch-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
}
.gsearch-row:hover { background: var(--selected-bg, rgba(27, 67, 50, 0.07)); }
.gsearch-row-t { font-size: 13.5px; font-weight: 600; }
.gsearch-row-t small { color: var(--ink-dim); font-weight: 500; margin-left: 6px; }
.gsearch-row-x { font-size: 11.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 3 · AMBIANCES (choix utilisateur : Apparence → Ambiance) ─── */

/* C11 · PAPIER DE CHANTIER — crème, cartes papier, titres serif */
[data-skin="papier"] {
  --bg: #F6F1E5;
  --surface: #FFFDF6;
  --sidebar-bg: #EFE7D5;
  --border: #E8DFC9;
  --border-soft: #F0E9D8;
  --border-strong: #D9CDAF;
  --hover-bg: #F1EAD8;
  --scratch-bg-start: #FFFCF3;
  --scratch-bg-end: #F8F0DC;
}
[data-skin="papier"] .page-title,
[data-skin="papier"] .dw-head h3,
[data-skin="papier"] .card-header h3,
[data-skin="papier"] .carnet-editor-title {
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: 0.01em;
}
[data-skin="papier"] .dw, [data-skin="papier"] .dashboard-card, [data-skin="papier"] .carnet-card {
  box-shadow: 0 3px 12px rgba(120, 95, 40, 0.1);
}
[data-theme="dark"][data-skin="papier"] {
  --bg: #191611;
  --surface: #211D15;
  --sidebar-bg: #1C1812;
  --border: #332C1E;
  --border-soft: #2A2418;
  --hover-bg: #2A2418;
}

/* C13 · CALQUE TECHNIQUE — quadrillage, filets, chasse fixe */
[data-skin="technique"] {
  --bg: #F4F7F9;
  --surface: #FFFFFF;
  --sidebar-bg: #EDF2F5;
  --border: #C3D2DD;
  --border-soft: #DCE5EC;
  --border-strong: #9FB4C4;
  --hover-bg: #E4ECF1;
  --radius-lg: 6px;
  --radius-md: 5px;
  --radius-sm: 4px;
  --radius-xl: 8px;
}
[data-skin="technique"] #view {
  background-image: linear-gradient(var(--border-soft) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 22px 22px;
}
[data-skin="technique"] .dw, [data-skin="technique"] .dashboard-card, [data-skin="technique"] .carnet-card, [data-skin="technique"] .carnet-editor {
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
[data-skin="technique"] .dw-head h3, [data-skin="technique"] .card-header h3 {
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  letter-spacing: 0.08em;
}
[data-skin="technique"] .num, [data-skin="technique"] .mono,
[data-skin="technique"] .kpi-value, [data-skin="technique"] .dfd-num,
[data-skin="technique"] .cnp-eche-date {
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
}
[data-theme="dark"][data-skin="technique"] {
  --bg: #10171C;
  --surface: #162027;
  --sidebar-bg: #131B21;
  --border: #273A47;
  --border-soft: #1E2E38;
  --border-strong: #3A566B;
  --hover-bg: #1C2A33;
}

/* C14 · VERRE & PROFONDEUR — fond dégradé, panneaux translucides */
[data-skin="verre"] {
  --bg: transparent;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-elevated: rgba(255, 255, 255, 0.94);
  --sidebar-bg: rgba(255, 255, 255, 0.16);
  --border: rgba(255, 255, 255, 0.45);
  --border-soft: rgba(255, 255, 255, 0.3);
  --hover-bg: rgba(255, 255, 255, 0.28);
  --scratch-bg-start: rgba(255, 252, 243, 0.75);
  --scratch-bg-end: rgba(253, 248, 232, 0.75);
}
[data-skin="verre"] body,
[data-skin="verre"] #app {
  background: linear-gradient(135deg, #16382C 0%, #1E5A44 46%, #2A9D8F 100%) fixed;
}
[data-skin="verre"] #sidebar { backdrop-filter: blur(10px); border-right-color: rgba(255, 255, 255, 0.25); }
[data-skin="verre"] #sidebar .nav-item { color: #DFF0E8; }
[data-skin="verre"] #sidebar .nav-item:hover { color: #fff; }
[data-skin="verre"] #sidebar .sidebar-brand .name, [data-skin="verre"] #sidebar .nav-section { color: #EAF6EF; }
[data-skin="verre"] #sidebar .sidebar-brand .sub, [data-skin="verre"] #sidebar .sync-status { color: #BFDCCC; }
[data-skin="verre"] #topbar { background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(9px); }
[data-skin="verre"] #view { background: transparent; }
[data-skin="verre"] .dw, [data-skin="verre"] .dashboard-card, [data-skin="verre"] .carnet-card, [data-skin="verre"] .carnet-editor {
  backdrop-filter: blur(9px);
  box-shadow: 0 10px 30px rgba(10, 30, 24, 0.22);
}
[data-skin="verre"] #scratch { backdrop-filter: blur(9px); }
[data-skin="verre"] .page-title { color: #fff; text-shadow: 0 1px 8px rgba(10, 30, 24, 0.35); }
[data-skin="verre"] .page-subtitle { color: #D5EBDD; }
[data-theme="dark"][data-skin="verre"] body,
[data-theme="dark"][data-skin="verre"] #app {
  background: linear-gradient(135deg, #0A1712 0%, #12362A 50%, #14574E 100%) fixed;
}
[data-theme="dark"][data-skin="verre"] {
  --surface: rgba(18, 28, 24, 0.82);
  --surface-elevated: rgba(20, 30, 26, 0.95);
  --border: rgba(255, 255, 255, 0.14);
  --hover-bg: rgba(255, 255, 255, 0.08);
}

/* ═══════════════════════════════════════════════════════════════
   v2.26.0 — PAGE ③ DOSSIER D'AFFAIRE (maquette B « dossier à onglets »)
   + Suivi financier global + widget Facturation
   ═══════════════════════════════════════════════════════════════ */

/* ── Barre d'onglets du dossier (partagée par toutes les pages d'affaire) ── */
.adoss-wrap { padding: 0; }
.adoss-tabs {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  padding: 5px;
  margin: 0 0 14px;
  width: fit-content; max-width: 100%;
  box-shadow: 0 1px 6px rgba(20, 30, 25, .05);
}
.adoss-wrap .adoss-tabs { margin: 12px 16px 2px; }
.adoss-tab {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--radius-md, 9px);
  padding: 8px 15px; min-height: 36px;
  font-size: var(--text-sm, 13px); font-weight: 600;
  color: var(--ink-soft); text-decoration: none;
  white-space: nowrap;
}
.adoss-tab:hover { background: var(--hover-bg); color: var(--ink); }
.adoss-tab.on { background: var(--c-forest, #1B4332); color: #fff; }
.adoss-tab-back { padding: 8px 10px; }
.adoss-tab-back .icon, .adoss-tab-back svg { width: 17px; height: 17px; }

/* ── En-tête du dossier ── */
.adoss-head {
  display: flex; align-items: center; gap: 13px; flex-wrap: wrap;
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl, 14px);
  padding: 13px 17px; margin-bottom: 13px;
  box-shadow: 0 2px 10px rgba(20, 30, 25, .06);
}
.adoss-code {
  background: var(--c-forest, #1B4332); color: #fff;
  border-radius: 9px; padding: 6px 12px; font-weight: 700;
  font-size: var(--text-sm, 13px); letter-spacing: .02em;
}
.adoss-head-main { min-width: 0; }
.adoss-nom { font-size: var(--text-lg, 17px); font-weight: 700; line-height: 1.25; }
.adoss-moa { color: var(--ink-soft); font-size: var(--text-xs, 12px); margin-top: 1px; }
.adoss-chip {
  border-radius: 999px; padding: 4px 12px; font-size: var(--text-xs, 11.5px); font-weight: 600;
  background: color-mix(in srgb, var(--c-forest, #1B4332) 11%, transparent); color: var(--c-forest, #1B4332);
}
.adoss-chip.warn { background: #FAEEDA; color: #7C5A1F; }
.adoss-chip.off { background: var(--hover-bg); color: var(--ink-dim); }
.adoss-head-spacer { flex: 1; }
.adoss-head-figs { display: flex; gap: 22px; align-items: center; margin-left: auto; }
.adoss-head-fig { text-align: right; }
.adoss-head-fig b { display: block; font-size: var(--text-md, 15px); font-variant-numeric: tabular-nums; }
.adoss-head-fig small { color: var(--ink-dim); font-size: var(--text-xs, 10.5px); text-transform: uppercase; letter-spacing: .04em; }

/* ── Bandeau KPI ── */
.adoss-kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 10px; margin-bottom: 13px;
}
.adoss-kpi {
  background: var(--surface, #fff); border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px); padding: 10px 13px;
  box-shadow: 0 1px 6px rgba(20, 30, 25, .04);
}
.adoss-kpi small { color: var(--ink-soft); font-size: var(--text-xs, 10.5px); text-transform: uppercase; letter-spacing: .04em; display: block; }
.adoss-kpi b { display: block; font-size: var(--text-md, 15.5px); margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adoss-kpi.warn { border-color: #E7C88A; background: color-mix(in srgb, #B07D2B 7%, var(--surface, #fff)); }
.adoss-kpi-sub { display: block; font-size: var(--text-xs, 11px); color: var(--ink-dim); margin-top: 3px; }
.adoss-kpi-bar { height: 5px; border-radius: 4px; background: var(--hover-bg); margin-top: 7px; overflow: hidden; }
.adoss-kpi-bar i { display: block; height: 100%; background: var(--c-lagoon, #2A9D8F); border-radius: 4px; }
.adoss-kpi-bar i.paye { background: var(--c-forest, #1B4332); }
.adoss-kpi-bar i.late { background: var(--c-coral, #C44536); }
.adoss-kpi-bar i.warnb { background: var(--c-amber, #B07D2B); }

/* ── Grilles et cartes ── */
.adoss-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; align-items: start; }
.adoss-grid-contra .adoss-span2, .adoss-grid-fin .adoss-span2, .adoss-grid-synthese .adoss-span2 { grid-column: 1 / -1; }
@media (max-width: 980px) { .adoss-grid, .adoss-grid-synthese { grid-template-columns: 1fr; } }
.adoss-card {
  background: var(--surface, #fff); border: 1px solid var(--border);
  border-radius: var(--radius-xl, 14px); padding: 13px 15px; margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(20, 30, 25, .05);
  min-width: 0;
}
.adoss-grid .adoss-card { margin-bottom: 0; }
.adoss-card h3 {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: var(--text-sm, 12.5px); text-transform: uppercase; letter-spacing: .05em;
  color: var(--c-forest, #1B4332); margin: 0 0 10px; font-weight: 700;
}
.adoss-card h3 .icon, .adoss-card h3 svg { width: 16px; height: 16px; }
.adoss-h3-sub { text-transform: none; letter-spacing: 0; color: var(--ink-soft); font-weight: 600; }
.adoss-more { margin-left: auto; font-size: var(--text-xs, 11.5px); color: var(--ink-dim); font-weight: 500; text-transform: none; letter-spacing: 0; text-decoration: none; }
a.adoss-more:hover { color: var(--ink); }
.adoss-empty { color: var(--ink-dim); font-size: var(--text-sm, 12.5px); padding: 6px 2px; margin: 0; }
.adoss-dim { color: var(--ink-dim); font-size: var(--text-xs, 11.5px); }
.adoss-link { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--border-strong, #bbb); }
.adoss-link:hover { color: var(--c-forest, #1B4332); }

/* ── Tables ── */
.adoss-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
/* Colonnes secondaires escamotées quand la carte est étroite (colonne droite
   ouverte sur tablette) : l'essentiel — cumul, TTC, statut, ACTIONS — reste
   visible sans glisser. Le détail complet vit dans « Saisie ». */
.adoss-cible, .adoss-card { container-type: inline-size; }
@container (max-width: 1010px) {
  .adoss-col-recu, .adoss-col-rg, .adoss-col-emis, .adoss-col-dest, .adoss-col-periode { display: none; }
}
@container (max-width: 680px) {
  .adoss-col-type, .adoss-col-delta, .adoss-col-idx { display: none; }
}
.adoss-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm, 12.5px); }
.adoss-table th {
  text-align: left; color: var(--ink-soft); font-weight: 600; font-size: var(--text-xs, 11px);
  padding: 5px 8px; border-bottom: 1.5px solid var(--c-forest, #1B4332); white-space: nowrap;
}
.adoss-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.adoss-table td:first-child { white-space: nowrap; }
.adoss-table tr:last-child td { border-bottom: none; }
.adoss-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adoss-td-wrap { max-width: 230px; white-space: normal; overflow-wrap: break-word; }
.adoss-th-act { text-align: right; }
.adoss-td-act { text-align: right; white-space: nowrap; }
.adoss-act {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 30px; padding: 4px 9px; margin-left: 4px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface, #fff); color: var(--ink-soft);
  font-size: var(--text-xs, 11.5px); font-weight: 600; text-decoration: none; cursor: pointer;
}
.adoss-act:hover { background: var(--hover-bg); color: var(--ink); }
.adoss-act.danger:hover { color: var(--c-coral, #C44536); border-color: var(--c-coral, #C44536); }
.adoss-act .icon, .adoss-act svg { width: 15px; height: 15px; }

/* ── Badges statut ── */
.adoss-badge {
  display: inline-block; border-radius: 999px; padding: 2px 10px;
  font-size: var(--text-xs, 10.5px); font-weight: 700;
  background: var(--hover-bg); color: var(--ink-soft); white-space: nowrap;
}
.adoss-badge.late { background: #FCEBEB; color: #9C2B3B; }

/* ── Sélecteur de statut compact (situations, OS) ── */
.adoss-sit-statut {
  font: inherit; font-size: var(--text-xs, 11.5px); font-weight: 600;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 8px; min-height: 30px; max-width: 168px;
  background: var(--surface, #fff); color: var(--ink);
}

/* ── Timeline compacte (synthèse, fil contractuel) ── */
.adoss-tl { list-style: none; margin: 0; padding: 0; }
.adoss-tl li {
  display: flex; gap: 9px; padding: 6px 0; border-bottom: 1px dashed var(--border);
  font-size: var(--text-sm, 12.5px); align-items: baseline;
}
.adoss-tl li:last-child { border-bottom: none; }
.adoss-tl-date { color: var(--ink-dim); font-size: var(--text-xs, 11px); min-width: 58px; font-variant-numeric: tabular-nums; }
.adoss-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; align-self: center; background: var(--c-forest-light, #52796F); }
.adoss-dot.os { background: var(--c-amber, #B07D2B); }
.adoss-dot.av { background: var(--c-lagoon, #2A9D8F); }
.adoss-dot.late { background: var(--c-coral, #C44536); }
.adoss-dot.ok { background: var(--c-forest-light, #52796F); }
.adoss-alerte {
  margin: 10px 0 0; padding: 8px 11px; border-radius: 9px;
  background: #FAEEDA; color: #7C5A1F; font-size: var(--text-xs, 12px);
}
.adoss-alerte.ok { background: color-mix(in srgb, var(--c-forest, #1B4332) 9%, var(--surface, #fff)); color: var(--c-forest, #1B4332); }

/* ── Onglet Facturation : paramètres + pieds de cartes ── */
.adoss-params-row { display: flex; gap: 14px; flex-wrap: wrap; }
.adoss-param { display: flex; flex-direction: column; gap: 4px; font-size: var(--text-xs, 11.5px); color: var(--ink-soft); font-weight: 600; }
.adoss-param-in { display: inline-flex; align-items: center; gap: 5px; }
.adoss-param-in input {
  width: 74px; min-height: 34px; padding: 5px 8px;
  border: 1px solid var(--border); border-radius: 8px;
  font: inherit; font-size: var(--text-sm, 13px); text-align: right;
  background: var(--surface, #fff); color: var(--ink);
}
.adoss-param-in small { color: var(--ink-dim); }
.adoss-cible-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.adoss-actions .btn { justify-content: flex-start; margin-bottom: 8px; min-height: 38px; }
.adoss-actions .btn:last-child { margin-bottom: 0; }

/* ── Modales OS / avenant ── */
.adoss-modal { max-width: 560px; }
.adoss-modal-body { display: flex; flex-direction: column; gap: 10px; }
.adoss-f { display: flex; flex-direction: column; gap: 4px; font-size: var(--text-xs, 11.5px); color: var(--ink-soft); font-weight: 600; }
.adoss-f input, .adoss-f select, .adoss-f textarea {
  font: inherit; font-size: var(--text-sm, 13px); color: var(--ink);
  border: 1px solid var(--border); border-radius: 9px;
  padding: 8px 10px; min-height: 38px; background: var(--surface, #fff);
}
.adoss-f textarea { min-height: 58px; resize: vertical; }
.adoss-f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ── Suivi financier global ── */
.fin-pct { font-weight: 700; }
.fin-bar { display: inline-block; width: 64px; margin-left: 7px; vertical-align: middle; }

/* ── Réglage clé API (modale Apparence) ── */
.astyle-key-wrap { flex: 1; min-width: 0; }
.astyle-key-input { flex: 1; min-width: 150px; font-family: var(--font-mono, monospace); font-size: 12px; }
.astyle-key-status { font-size: var(--text-xs, 11.5px); color: var(--ink-dim); flex: 1; }
.astyle-key-status.ok { color: var(--c-forest, #1B4332); font-weight: 600; }
.astyle-key-status.ko { color: var(--c-coral, #C44536); font-weight: 600; }

/* ── Mode sombre : cartes et contrôles suivent les surfaces du thème ── */
[data-theme="dark"] .adoss-alerte { background: rgba(176, 125, 43, .16); color: #E7C88A; }
[data-theme="dark"] .adoss-badge.late { background: rgba(196, 69, 54, .2); color: #F0A9A0; }
[data-theme="dark"] .adoss-chip.warn { background: rgba(176, 125, 43, .18); color: #E7C88A; }

/* ═══ v2.27.0 — Révision de prix · pénalités · DGD · libération RG ═══ */
.adoss-cible-opts { display: flex; flex-direction: column; gap: 7px; margin-top: 11px; border-top: 1px dashed var(--border); padding-top: 10px; }
.adoss-opt { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: var(--text-xs, 11.5px); color: var(--ink-soft); }
.adoss-opt-toggle { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; min-height: 28px; cursor: pointer; }
.adoss-opt-toggle input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--c-forest, #1B4332); }
.adoss-opt-toggle .icon, .adoss-opt-toggle svg { width: 14px; height: 14px; }
.adoss-opt-fields { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.adoss-opt-fields label { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.adoss-opt-fields input {
  font: inherit; font-size: var(--text-sm, 12.5px); color: var(--ink);
  border: 1px solid var(--border); border-radius: 7px;
  padding: 4px 7px; min-height: 30px; width: 84px; text-align: right;
  background: var(--surface, #fff);
}
.adoss-opt-fields input[type="text"] { text-align: left; width: 68px; }
.adoss-opt-fields input[type="date"] { width: 140px; text-align: left; }
.adoss-idx-in {
  font: inherit; font-size: var(--text-sm, 12.5px); color: var(--ink);
  border: 1px solid var(--border); border-radius: 7px;
  padding: 4px 6px; min-height: 30px; width: 78px; text-align: right;
  background: var(--surface, #fff);
}
.adoss-rev-note { display: block; font-size: var(--text-xs, 10.5px); color: var(--c-lagoon, #2A9D8F); white-space: nowrap; }
.adoss-badge.dgd { background: var(--c-forest, #1B4332); color: #fff; }
.adoss-tr-dgd td { background: color-mix(in srgb, var(--c-forest, #1B4332) 5%, transparent); }
.adoss-act.on { border-color: var(--c-forest, #1B4332); color: var(--c-forest, #1B4332); font-weight: 700; }
@container (max-width: 760px) { .adoss-col-idx { display: none; } }

/* ═══ v2.28.0 — ONGLET MARCHÉ UNIFIÉ (blocs déplaçables) + doctrine OS + contacts ═══ */

/* Gros bouton Paramètres contractuels */
.btn-params-contractuels {
  min-height: 44px; padding: 10px 22px; font-size: var(--text-md, 15px); font-weight: 700;
  border-radius: 12px; box-shadow: 0 3px 12px color-mix(in srgb, var(--c-forest, #1B4332) 35%, transparent);
}
.btn-params-contractuels .icon, .btn-params-contractuels svg { width: 19px; height: 19px; }

/* Blocs déplaçables de la page Marché */
.marche-blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)); gap: 13px; align-items: start; }
@media (max-width: 900px) { .marche-blocks { grid-template-columns: 1fr; } }
.mblk { position: relative; min-width: 0; }
.mblk-wide { grid-column: 1 / -1; }
.mblk > .section-card, .mblk > .adoss-card { margin-bottom: 0; }
.mblk-grip {
  position: absolute; top: 9px; right: 9px; z-index: 6;
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px;
  color: var(--ink-dim); background: transparent; cursor: grab;
  opacity: .55; touch-action: none;
}
.mblk-grip:hover { background: var(--hover-bg); opacity: 1; }
.mblk-grip:active { cursor: grabbing; }
.mblk-grip .icon, .mblk-grip svg { width: 15px; height: 15px; }
.mblk .adoss-kpis { margin-bottom: 0; }
.adoss-alertes-strip { margin-top: 9px; }
.adoss-alertes-strip .adoss-alerte { margin-top: 6px; }

/* Séparation nette MOE / travaux dans les Paramètres contractuels */
.form-section-marche-moe, .form-section-marche-travaux {
  border: 1.5px solid var(--border-strong, #D6D2C7);
  border-radius: var(--radius-xl, 14px);
  padding: 16px 18px;
  margin-top: 22px;
  background: color-mix(in srgb, var(--c-forest, #1B4332) 2.5%, var(--surface, #fff));
}
.form-section-marche-travaux { background: color-mix(in srgb, var(--c-amber, #B07D2B) 3%, var(--surface, #fff)); }
.form-section-marche-moe > .form-section-title, .form-section-marche-travaux > .form-section-title {
  font-size: var(--text-lg, 17px); padding-bottom: 8px; border-bottom: 2px solid var(--c-forest, #1B4332);
}
.form-section-marche-travaux > .form-section-title { border-bottom-color: var(--c-amber, #B07D2B); }

/* Contacts / interlocuteurs (annuaire) */
.int-contacts-cell { min-width: 210px; }
.int-contacts-line, .int-contacts-cell { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.moa-contacts-block { margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--border-strong, #D6D2C7); border-radius: 10px; }
.int-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: color-mix(in srgb, var(--c-forest, #1B4332) 9%, transparent);
  color: var(--c-forest, #1B4332);
  border-radius: 999px; padding: 3px 6px 3px 11px;
  font-size: var(--text-xs, 11.5px); font-weight: 600; white-space: nowrap;
}
.int-chip-rm {
  border: none; background: transparent; color: inherit; cursor: pointer;
  font-size: 14px; line-height: 1; padding: 2px 5px; border-radius: 999px; min-width: 22px; min-height: 22px;
}
.int-chip-rm:hover { background: rgba(0,0,0,.09); }
.int-contact-add { max-width: 150px; min-height: 30px; }

/* Lignes d'événements imbriquées : actions + chaîne OS */
.evt-sub-act {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--border); border-radius: 7px;
  background: var(--surface, #fff); color: var(--ink-soft);
  font-size: var(--text-xs, 11px); font-weight: 700;
  min-height: 26px; padding: 2px 7px; margin-left: 5px; cursor: pointer;
  opacity: .85;
}
.evt-sub-act:hover { background: var(--hover-bg); color: var(--ink); opacity: 1; }
.evt-sub-act.danger:hover { color: var(--c-coral, #C44536); border-color: var(--c-coral, #C44536); }
.evt-sub-act .icon, .evt-sub-act svg { width: 13px; height: 13px; }
.evt-add-inline { margin-left: 7px; vertical-align: middle; }
.evt-sub-osline {
  flex-basis: 100%; display: flex; gap: 14px; flex-wrap: wrap;
  margin: 3px 0 0 19px; font-size: var(--text-xs, 11px); color: var(--ink-soft);
}
.evt-sub-osline b { color: var(--ink); }
.evt-os-reserve { color: var(--c-coral, #C44536); }
.evt-os-consequence { color: var(--c-forest, #1B4332); font-weight: 600; }
.evt-sub-item { flex-wrap: wrap; }

/* Badge TF/TC cliquable (bascule de type) */
.badge-tf-tc-toggle { cursor: pointer; border: none; min-height: 30px; min-width: 38px; }

/* ═══════════════════════════════════════════════════════════════
   v2.29.0 — Marché→Délais épuré · fiche OS cliquable · Notes ·
   pièces de marché · AOR · classeur PF (remarques 1-23)
   ═══════════════════════════════════════════════════════════════ */

/* (6) Bandeau d'en-tête masqué dans le dossier d'affaire — les onglets
   suffisent ; menu ☰ et carnet repris dans la ligne d'onglets */
body.affaire-dossier #topbar { display: none; }
body.affaire-dossier #view { padding-top: 4px; }
.adoss-tabs-spacer { flex: 1; }
.adoss-tab-tool {
  border: none; background: transparent; cursor: pointer;
  min-width: 40px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-soft);
}
.adoss-tab-tool:hover { color: var(--ink); background: var(--surface-2, rgba(0,0,0,0.05)); }
.adoss-tab-tool .icon, .adoss-tab-tool svg { width: 17px; height: 17px; }
/* Le ☰ des onglets ne sert que si la sidebar est repliée */
@media (min-width: 1025px) {
  body:not(.sidebar-collapsed) .adoss-tabs .adoss-tab-tool[data-toggle="sidebar"] { display: none; }
}

/* (1/11) Chaîne OS cliquable → fiche OS */
.evt-sub-osline-clickable { cursor: pointer; border-radius: 6px; transition: background .12s; }
.evt-sub-osline-clickable:hover { background: rgba(16,122,87,0.08); }
.evt-os-edit-hint { opacity: 0.45; margin-left: 2px; }
.evt-sub-osline-clickable:hover .evt-os-edit-hint { opacity: 1; }
.evt-os-edit-hint svg { width: 12px; height: 12px; }
.evt-os-scan { color: var(--text-soft); }
.evt-os-scan svg { width: 12px; height: 12px; }
.evt-sub-os-badge { cursor: pointer; }

/* (1) Scan de l'OS dans la fiche */
.os-scan-zone { border-top: 1px dashed var(--border, #d5d9d2); padding-top: 10px; margin-top: 4px; }
.os-scan-zone > span { font-size: 12px; color: var(--text-soft); display: block; margin-bottom: 6px; }
.os-scan-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.os-scan-name { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px;
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-scan-name svg { width: 13px; height: 13px; flex: none; }

/* (18) Onglet Notes — saisie rapide à colonnes */
.notes-aff-add-grid {
  display: grid; grid-template-columns: 1.4fr 1.2fr 1fr 150px auto;
  gap: 10px; align-items: end;
}
.notes-aff-add-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--text-soft); }
.notes-aff-add-actions { display: flex; align-items: center; gap: 10px; padding-bottom: 2px; }
.notes-aff-todo-check { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; }
@container (max-width: 900px) { .notes-aff-add-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .notes-aff-add-grid { grid-template-columns: 1fr 1fr; } }

/* (22) Pièces du marché (Paramètres contractuels) */
.pieces-zone { margin: 12px 0 4px; border: 1px solid var(--border, #d5d9d2); border-radius: 8px;
  padding: 8px 10px; background: var(--surface-2, rgba(0,0,0,0.015)); }
.pieces-zone-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pieces-zone-head svg { width: 15px; height: 15px; color: var(--text-soft); }
.pieces-zone-list { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.piece-row { display: flex; align-items: center; gap: 8px; padding: 3px 2px; border-radius: 6px; }
.piece-row:hover { background: rgba(0,0,0,0.03); }
.piece-type-sel { width: 150px; flex: none; }
.piece-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.piece-taille { font-size: 11px; flex: none; }

/* (20) Note pièces sur la page DQE */
.dqe-docs-note { display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  color: var(--text-soft); padding: 8px 12px; border: 1px dashed var(--border, #d5d9d2);
  border-radius: 8px; margin: 8px 0; }
.dqe-docs-note svg { width: 15px; height: 15px; flex: none; }

/* (21) Séparation NETTE entre co-traitants (DQE membres du groupement) */
.moe-membres-grid { gap: 14px; }
.moe-membre-card {
  border: 2px solid var(--border, #cfd6cd) !important; border-radius: 10px !important;
  padding: 12px !important; background: var(--surface, #fff);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.moe-membre-card + .moe-membre-card { margin-left: 0; }
.moe-membre-mand { border-color: var(--primary, #0f5132) !important; box-shadow: 0 1px 6px rgba(16,81,50,0.18); }

/* (23) Bouton ISPF près de l'index */
.adoss-act-ispf { margin-left: 3px; }
.adoss-col-idx { white-space: nowrap; }

/* (19) AOR — cartes d'étapes */
.aor-refs .adoss-badge { flex: none; }
.aor-ref { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; }
.aor-steps { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.aor-step { border: 1px solid var(--border, #d5d9d2); border-radius: 10px; padding: 10px 12px;
  background: var(--surface, #fff); }
.aor-step.aor-ok { border-color: #10B981; background: rgba(16,185,129,0.05); }
.aor-step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--primary, #0f5132);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex: none; }
.aor-ok .aor-step-num { background: #10B981; }
.aor-file-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.aor-echeancier td, .aor-echeancier th { padding: 5px 8px; }

/* Jeu d'essai (12) */
[data-demo-toggle] { white-space: nowrap; }

/* ── v2.30.0 — Marché MOE à bons de commande ─────────────────────── */
.moe-type-switch {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 12px 0 6px; padding: 8px 10px;
  border: 1px solid var(--border, #d5d9d2); border-radius: 8px;
  background: var(--surface-2, rgba(0,0,0,0.015));
}
.moe-type-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-soft); font-weight: 600; }
.moe-type-label svg { width: 14px; height: 14px; }
.moe-type-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 5px 12px; cursor: pointer;
  border: 1px solid var(--border, #d5d9d2); border-radius: 999px;
  background: var(--surface, #fff); font-size: 12.5px; color: var(--ink);
}
.moe-type-btn svg { width: 14px; height: 14px; }
.moe-type-btn.on { background: var(--primary, #0f5132); border-color: var(--primary, #0f5132); color: #fff; font-weight: 600; }
.moe-bc-section { margin-top: 10px; }
.moe-bc-section .tranche-card { margin: 8px 0; }

/* ── v2.30.0 — Rapport de cohérence d'un OS ──────────────────────── */
.osc-section { margin-bottom: 14px; }
.osc-section h4 { margin: 0 0 6px; font-size: 13px; color: var(--text-soft); text-transform: uppercase; letter-spacing: .03em; }
.osc-list { margin: 0; padding-left: 18px; }
.osc-ko { color: #B91C1C; font-size: 12.5px; }
.osc-ok-line { color: #15803D; font-size: 12.5px; margin: 0; }
.osc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.osc-table th { text-align: left; font-size: 11px; color: var(--text-soft); text-transform: uppercase; padding: 4px 6px; border-bottom: 1px solid var(--border, #d5d9d2); }
.osc-table td { padding: 5px 6px; border-bottom: 1px solid rgba(0,0,0,0.05); }
.osc-b { font-size: 11px; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.osc-b.ok { background: rgba(16,185,129,0.14); color: #047857; }
.osc-b.ko { background: rgba(220,38,38,0.12); color: #B91C1C; }
.osc-b.warn { background: rgba(245,158,11,0.16); color: #B45309; }
.osc-b.dim { background: rgba(0,0,0,0.05); color: var(--text-soft); }
/* Libellés de phases MOE BC : plus longs que ceux des travaux */
.moe-bc-section .tranche-phase-libelle-input { min-width: 210px; }
.moe-bc-section .tranche-phases-table th:first-child { min-width: 240px; }

/* ── v2.31.0 — Colonnes de phases : Phase resserrée, Intervenants au large ── */
.data-table th.col-intervenants, .tranche-phases-table th.col-intervenants { min-width: 210px; }
/* Une société = UNE ligne, avec son « M » de mandataire collé au nom */
.int-nom-ligne {
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap; line-height: 1.45;
}
.badge-mandataire {
  flex: none; font-size: 9px; font-weight: 700; line-height: 1;
  padding: 2px 4px; border-radius: 3px;
  background: var(--c-forest, #1B4332); color: #fff;
}

/* ── v2.31.0 (remarque 2) — alerte de cohérence événement ↔ phase ── */
.evt-sub-item-incoh { background: rgba(245, 158, 11, 0.07); border-radius: 6px; }
.evt-incoh-line {
  flex-basis: 100%; display: flex; align-items: center; gap: 6px;
  margin: 3px 0 1px 18px; padding: 3px 8px;
  font-size: 11.5px; color: #92400E;
  background: rgba(245, 158, 11, 0.14); border-radius: 5px;
}
.evt-incoh-line svg { width: 13px; height: 13px; flex: none; }
.evt-incoh-fix { margin-left: auto; font-weight: 600; }

/* ─── v2.32.0 — Suivi financier : alerte de cumul M-1 divergent ───────────── */
.adoss-m1-ko {
  display: inline-block; margin-left: 6px; padding: 1px 5px; border-radius: 4px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
  background: rgba(245, 158, 11, .16); color: #92400E; cursor: help;
}
[data-theme="dark"] .adoss-m1-ko { background: rgba(245, 158, 11, .22); color: #FCD34D; }
/* v2.32.0 — le champ « Exonération » doit afficher 120 000 en entier */
.adoss-params .adoss-param .adoss-param-in input[data-ados-param="pen_exoneration"] { width: 92px; min-width: 92px; }
.adoss-param-info {
  display: inline-block; width: 12px; height: 12px; line-height: 12px; text-align: center;
  border-radius: 50%; font-size: 9px; font-weight: 700; vertical-align: 1px;
  background: var(--border, #DDD8CE); color: var(--ink-soft, #6B6659); cursor: help;
}
