/* SCAE Courtage – feuille de style principale (aucune dépendance externe) */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --primary: #1d4ed8;
  --primary-soft: #dbeafe;
  --success: #15803d;
  --success-soft: #dcfce7;
  --warning: #b45309;
  --warning-soft: #fef3c7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --info: #0e7490;
  --info-soft: #cffafe;
  --sidebar-bg: #0f172a;
  --sidebar-text: #cbd5e1;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120; --surface: #111827; --surface-2: #0f172a; --border: #1f2937;
    --text: #e5e7eb; --text-muted: #94a3b8; --primary: #60a5fa; --primary-soft: #1e3a8a;
    --success: #4ade80; --success-soft: #14532d; --warning: #fbbf24; --warning-soft: #78350f;
    --danger: #f87171; --danger-soft: #7f1d1d; --info: #22d3ee; --info-soft: #164e63;
    --sidebar-bg: #020617;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.45; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }
.muted, .text-muted { color: var(--text-muted); }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; }
.hidden { display: none !important; }

/* Mise en page */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 260px; flex-shrink: 0; background: var(--sidebar-bg); color: var(--sidebar-text); padding: 14px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; padding: 4px 8px 14px; }
.brand:hover { text-decoration: none; }
.brand-logo { background: #fff; width: 40px; height: 40px; border-radius: 8px; padding: 4px; object-fit: contain; flex-shrink: 0; }
.brand-texte { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-texte small { font-size: 11px; font-weight: 500; color: var(--sidebar-text); }
.login-logo { display: block; margin: 0 auto 10px; height: 110px; width: auto; background: #fff; border-radius: 8px; padding: 6px; }
.login-card .login-cabinet { text-align: center; color: var(--text-muted); font-size: 13px; margin: -8px 0 16px; }
.global-search input { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid #334155; background: #1e293b; color: #fff; margin-bottom: 10px; }
.nav-section summary { cursor: pointer; padding: 8px; border-radius: 6px; font-weight: 600; color: #e2e8f0; list-style: none; display: flex; gap: 8px; align-items: center; }
.nav-section summary::-webkit-details-marker { display: none; }
.nav-section summary:hover { background: #1e293b; }
.nav-section ul { list-style: none; margin: 0 0 6px; padding: 0 0 0 30px; }
.nav-link { display: block; padding: 5px 8px; color: var(--sidebar-text); border-radius: 6px; font-size: 13px; }
.nav-link:hover, .nav-link.active { background: #1e293b; color: #fff; text-decoration: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar-right { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.breadcrumbs { color: var(--text-muted); font-size: 13px; }
.menu-toggle { display: none; }
.content { padding: 22px 24px 60px; max-width: 1500px; width: 100%; }
.content-anon { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.user { font-weight: 600; }
.link-muted { color: var(--text-muted); background: none; border: 0; cursor: pointer; font: inherit; padding: 0; }

/* En-tête de page */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-header .subtitle { color: var(--text-muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Cartes et grilles */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 16px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; }
.card-header h2, .card-header h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-main-side { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -280px; z-index: 50; transition: left .2s; }
  .sidebar.open { left: 0; }
  .menu-toggle { display: inline-block; }
  .content { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .user, .masque-mobile, .topbar .breadcrumbs { display: none; }
  .topbar-right { gap: 8px; }
}

/* Indicateurs */
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi-label { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 24px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.kpi.warn .kpi-value { color: var(--warning); }
.kpi.danger .kpi-value { color: var(--danger); }
.kpi.success .kpi-value { color: var(--success); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tableaux */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 600; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; padding: 8px 10px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr.ligne-active { background: var(--primary-soft); }
.table tbody tr.groupe td { background: var(--surface-2); font-size: 12px; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { font-weight: 700; background: var(--surface-2); }
.table .row-link { cursor: pointer; }
.empty { text-align: center; color: var(--text-muted); padding: 24px; }

/* Fiche détail */
dl.fields { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 6px 14px; margin: 0; }
dl.fields dt { color: var(--text-muted); }
dl.fields dd { margin: 0; font-weight: 500; word-break: break-word; }
dl.fields.fields-empiles { grid-template-columns: 1fr; gap: 2px; }
dl.fields.fields-empiles dd { margin-bottom: 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.tab { padding: 8px 10px; font-size: 13px; border: 0; background: none; cursor: pointer; color: var(--text-muted); border-bottom: 2px solid transparent; font: inherit; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 16px; border-left: 2px solid var(--border); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.timeline .date { color: var(--text-muted); font-size: 12px; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; }
.badge-en_cours, .badge-payee, .badge-client, .badge-gagne, .badge-encaisse, .badge-valide, .badge-regle, .badge-paye, .badge-reverse, .badge-percue, .badge-fait, .badge-realisee, .badge-accepte, .badge-transforme, .badge-rapproche, .badge-obtenu, .badge-delivre, .badge-lu { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge-emise, .badge-prospect, .badge-nouveau, .badge-declare, .badge-saisi, .badge-brouillon, .badge-a_faire, .badge-planifiee, .badge-importe, .badge-a_reverser, .badge-a_percevoir, .badge-transmis, .badge-envoye, .badge-planifie { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.badge-partielle, .badge-warning, .badge-suspendue, .badge-expertise, .badge-attente_pieces, .badge-instruction, .badge-negociation, .badge-proposition, .badge-cotation, .badge-qualifie, .badge-remis, .badge-extrait, .badge-en_cours.badge-warn, .badge-offre, .badge-offres_recues, .badge-propose, .badge-moyen, .badge-haute, .badge-doublon, .badge-a_payer, .badge-a_envoyer { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge-danger, .badge-impayee, .badge-resiliee, .badge-perdu, .badge-rejete, .badge-erreur, .badge-contentieux, .badge-bloque, .badge-eleve, .badge-urgente, .badge-annulee, .badge-sans_effet, .badge-refuse, .badge-echec { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-expiree, .badge-ancien, .badge-clos, .badge-annule, .badge-remplacee, .badge-non_applicable, .badge-simule { background: var(--surface-2); color: var(--text-muted); }

/* Boutons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); background: var(--primary); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-sm { padding: 3px 9px; font-size: 12px; }
.btn-icon { background: none; border: 0; font-size: 18px; cursor: pointer; color: inherit; }
.pill { padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: 13px; }
.pill-warn { background: var(--warning-soft); color: var(--warning); }

/* Formulaires */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }
.form-row { display: flex; flex-direction: column; gap: 4px; }
.form-row.full { grid-column: 1 / -1; }
.form-row label { font-weight: 600; font-size: 13px; }
.form-row .help { color: var(--text-muted); font-size: 12px; }
.form-row .errorlist { color: var(--danger); margin: 0; padding: 0; list-style: none; font-size: 12px; }
.input, .select, input[type=text], input[type=search], input[type=number], input[type=date], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit;
}
textarea { resize: vertical; }
.input:focus, .select:focus, input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.checkbox { width: auto; }
.form-actions { display: flex; gap: 8px; margin-top: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
.filters .input, .filters .select, .filters input, .filters select { width: auto; min-width: 160px; }
.field-low { background: var(--warning-soft) !important; }
.field-completed { background: var(--info-soft) !important; }

/* Alertes */
.filters .btn-filtres { display: none; }
.filters .filtres-plus { display: contents; }
.messages { margin-bottom: 14px; position: sticky; top: 64px; z-index: 15; }
.messages .alert { box-shadow: 0 2px 8px rgba(0, 0, 0, .08); position: relative; padding-right: 34px; }
.messages .fermer { position: absolute; right: 8px; top: 6px; border: 0; background: none; cursor: pointer; font-size: 18px; color: inherit; opacity: .6; }
@media print { .messages { display: none; } }
/* Impression propre : des boîtes de marge vides remplacent l'en-tête et le pied ajoutés par le navigateur (date,
   titre, adresse de la page, n° de page) dans Chrome et Edge ; les marges de chaque document sont conservées */
@page {
  @top-left { content: ""; } @top-center { content: ""; } @top-right { content: ""; }
  @bottom-left { content: ""; } @bottom-center { content: ""; } @bottom-right { content: ""; }
}
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; border: 1px solid transparent; }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-error, .alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }
.alert-info { background: var(--info-soft); color: var(--info); }

/* Pipeline (kanban) */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; min-height: 200px; }
.kanban-col h3 { display: flex; justify-content: space-between; font-size: 13px; text-transform: uppercase; color: var(--text-muted); }
.kanban-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 8px; box-shadow: var(--shadow); }
.kanban-card .title { font-weight: 600; }

/* Barres simples (graphiques sans librairie) */
.bars { display: flex; flex-direction: column; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 150px; gap: 8px; align-items: center; font-size: 13px; }
.bar-track { background: var(--surface-2); border-radius: 4px; height: 12px; overflow: hidden; }
.bar-fill { background: var(--primary); height: 100%; border-radius: 4px; }
.pagination { display: flex; gap: 6px; align-items: center; margin-top: 12px; }

/* Connexion */
/* .content-anon : plus précis que « .card { max-width: 100% } » (téléphones), sinon la carte prend tout l'écran du PC */
.content-anon .login-card { width: 100%; max-width: 400px; }
.login-card h1 { text-align: center; margin-bottom: 16px; }
.login-lien { text-align: center; margin: 14px 0 0; font-size: 13px; }
.champ-mdp { position: relative; }
.champ-mdp input { width: 100%; padding-right: 44px; }
.champ-mdp .voir-mdp { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0;
  cursor: pointer; padding: 4px 8px; font-size: 16px; line-height: 1; color: var(--text-muted); }

/* Impression */
@media print {
  .sidebar, .topbar, .actions, .no-print, .filters { display: none !important; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 0; }
  body { background: #fff; }
  /* Écrans imprimés tels quels (état des impayés, listes…) : tout le tableau sur la page, pas de défilement */
  .main, .content { margin: 0 !important; width: auto !important; }
  .table-wrap { overflow: visible !important; }
  table.table { font-size: 10px; }
  .table th, .table td { padding: 3px 4px; white-space: normal; }
  .table th { letter-spacing: 0; }
  .btn { display: none !important; }
}

/* Graphiques (barres CSS, une seule série par graphique, survol = valeur) */
:root { --series-1: #2a78d6; --chart-grid: #e7e5e4; }
@media (prefers-color-scheme: dark) { :root { --series-1: #3987e5; --chart-grid: #292524; } }
.colchart { display: flex; align-items: flex-end; gap: 2px; height: 180px; padding-top: 22px; border-bottom: 1px solid var(--chart-grid); }
.colchart .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; outline: none; }
.colchart .col .fill { background: var(--series-1); border-radius: 4px 4px 0 0; min-height: 1px; margin: 0 2px; transition: filter .1s; }
.colchart .col:hover .fill, .colchart .col:focus .fill { filter: brightness(1.15); }
.colchart .col .tip { display: none; position: absolute; bottom: calc(100% - 18px); left: 50%; transform: translateX(-50%); background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 6px; padding: 4px 8px; font-size: 12px; white-space: nowrap; z-index: 5; pointer-events: none; }
.colchart .col:hover .tip, .colchart .col:focus .tip { display: block; }
.colchart-labels { display: flex; gap: 2px; font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.colchart-labels span { flex: 1; text-align: center; overflow: hidden; white-space: nowrap; }
.bar-fill { background: var(--series-1); border-radius: 0 4px 4px 0; }
.bar-row .bar-value { text-align: right; font-variant-numeric: tabular-nums; }
.bar-row .bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.table-view summary { cursor: pointer; color: var(--text-muted); font-size: 12px; margin-top: 8px; }
a.kpi { display: block; color: inherit; } a.kpi:hover { text-decoration: none; border-color: var(--primary); }

/* Agenda */
.agenda { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.agenda-jour { min-height: 180px; padding: 10px; margin: 0; }
.agenda-jour h3 { font-size: 13px; text-transform: capitalize; color: var(--text-muted); }
.agenda-aujourdhui { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.agenda-item { font-size: 12px; margin-bottom: 6px; line-height: 1.35; }
@media (max-width: 1100px) { .agenda { grid-template-columns: 1fr; } }

/* Bouton « + Nouveau » */
.nouveau { position: relative; }
.nouveau summary { list-style: none; }
.nouveau summary::-webkit-details-marker { display: none; }
.nouveau-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(15, 23, 42, .15); padding: 6px; min-width: 260px; }
.nouveau-menu a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 6px; color: var(--text); font-weight: 500; }
.nouveau-menu a:hover { background: var(--surface-2); text-decoration: none; }
.nav-parametres { margin-top: 14px; border-top: 1px solid #1e293b; padding-top: 12px !important; font-weight: 600; color: #e2e8f0 !important; }
.param-groupe ul { margin: 8px 0 0; padding-left: 18px; }
.param-groupe li { margin: 4px 0; }
.param-groupe h2 { margin-bottom: 4px; }

/* Actions rapides (tableau de bord, fiches) */
.raccourcis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.raccourci { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); font-weight: 600; }
.raccourci span { font-size: 22px; }
.raccourci:hover { border-color: var(--primary); text-decoration: none; }
.raccourci small { font-weight: 400; color: var(--text-muted); }

/* Saisie guidée */
.etape h2 { display: flex; align-items: center; gap: 10px; }
.num-etape { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 13px; }
.choix-onglets { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.choix { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-weight: 600; background: var(--surface); }
.choix:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.choix input { width: auto; margin: 0; }
.choix-ligne { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.choix-ligne input { width: auto; }
.client-choisi { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border: 1px solid var(--primary); background: var(--primary-soft); border-radius: 8px; font-weight: 600; }
.resultats-clients { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.resultat-client { text-align: left; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; font: inherit; color: var(--text); }
.resultat-client:hover { border-color: var(--primary); background: var(--surface-2); }
.plus-options summary { cursor: pointer; color: var(--primary); margin-top: 10px; }
.panneau-fixe { position: sticky; top: 70px; }
.btn-large { width: 100%; justify-content: center; padding: 12px; font-size: 15px; margin-top: 12px; }
.decompte-direct td { padding: 5px 8px; }
.decompte-cabinet { display: grid; gap: 4px; margin-top: 10px; padding: 10px; border-radius: 8px; background: var(--surface-2); }
.decompte-cabinet div { display: flex; justify-content: space-between; font-size: 13px; }
.tableau-saisie input.montant { text-align: right; max-width: 130px; }
.form-row.has-error input, .form-row.has-error select { border-color: var(--danger); }
.hidden { display: none !important; }
.section-form { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.section-form:first-of-type { border-top: 0; margin-top: 0; }
.section-form h3 { margin-bottom: 10px; }
details.section-form summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.bandeau-suite { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--text); }
.bandeau-suite strong { color: var(--success); margin-right: 4px; }

/* Barre de sélection (reversements, encaissements…) */
.barre-selection { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  padding: 12px 18px; margin: 12px -18px -16px; background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 12px rgba(0,0,0,.05); }
.barre-selection .gros { font-size: 16px; }
.filters .recherche-liste { flex: 1 1 320px; min-width: 260px; }
.filters select.filtre-actif { border-color: var(--primary); background: var(--primary-soft, #eef2ff); }
.filters .periode { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filters .periode input[type=date] { min-width: 0; }

/* Recherche dans les listes déroulantes et filtre des tableaux */
.select-recherche { display: block; width: 100%; margin-bottom: 4px; padding: 5px 8px; font-size: 13px; }
.filters .select-recherche { display: inline-block; width: 150px; min-width: 0; margin: 0; }
.filtre-tableau { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.filtre-tableau .input { max-width: 520px; }
tr.masque-filtre { display: none !important; }
tr.ligne-choisie td { background: var(--primary-soft); }
.filters div > input[type=search].input:not(.select-recherche) { width: 100%; }
.filters input.select-recherche { display: inline-block; width: 130px; min-width: 0; margin: 0 4px 0 0; }
.filters input[type=checkbox] { width: auto; min-width: 0; }

/* Formulaires par étapes */
.etapes-entete { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; }
.etapes-entete li { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; font-weight: 600; color: var(--text-muted); }
.etapes-entete li.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.etapes-entete li.active .num-etape { background: #fff; color: var(--primary); }
.etapes-entete li.faite { color: var(--text); border-color: var(--primary); }
.etapes-entete li.a-erreur { border-color: var(--danger, #dc2626); color: var(--danger, #dc2626); }
.etape-panneau .form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
ul.choix-multiples, .choix-multiples ul, div.choix-multiples { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 16px; }
.choix-multiples label { display: flex; gap: 6px; align-items: center; font-weight: 400; }
.form-row > div[id^="id_"]:has(input[type=checkbox]), .form-row > div[id^="id_"]:has(input[type=radio]) { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 16px; }
.form-row > div[id^="id_"] label { display: flex; gap: 6px; align-items: center; font-weight: 400; }
/* Case ou bouton radio jamais écrasé par un long libellé à côté (étiquette en flex) */
.form-row > div[id^="id_"] input[type=checkbox], .form-row > div[id^="id_"] input[type=radio],
.choix-multiples input[type=checkbox], .choix-multiples input[type=radio] { width: auto; min-width: 0; flex: 0 0 auto; }
.grid > *, .card { min-width: 0; }

/* Téléphone : filtres des listes repliés derrière un bouton, les résultats d'abord (après les règles générales) */
@media (max-width: 760px) {
  .filters .btn-filtres { display: inline-flex; }
  .filters .filtres-plus { display: none; width: 100%; }
  .filters .filtres-plus.ouvert { display: flex; flex-wrap: wrap; gap: 8px; }
  .filters .recherche-liste { flex-basis: 100%; min-width: 0; }
}

/* Clients VIP : lignes signalées dans les listes */
.table tr.vip > td { background: #fff6dd; }
.table tr.vip > td:first-child { box-shadow: inset 3px 0 0 #d4a017; }
.badge-vip { background: #fff1c2; color: #8a6100; border-color: #e9c45a; }
@media (prefers-color-scheme: dark) { .table tr.vip > td { background: rgba(212, 160, 23, .14); } }
/* Traçabilité : saisi le … par …, modifié le … par … (fiches) */
.tracabilite { font-size: .8rem; margin-top: .25rem; }
.tracabilite a { color: inherit; text-decoration: underline; }

/* Téléphone : rien ne dépasse de l'écran (barre du haut compacte, contenus contraints à la largeur, longs mots coupés) */
.mobile-seul { display: none; }
.content, .card, .grid > * { min-width: 0; max-width: 100%; }
.content img, .content svg, .content canvas, .content iframe { max-width: 100%; }
@media (max-width: 760px) {
  .mobile-seul { display: inline; }
  .topbar { gap: 8px; padding: 8px 12px; }
  .topbar .nouveau summary { padding: 6px 10px; }
  .topbar-right { gap: 6px; min-width: 0; }
  .topbar .pill { padding: 4px 8px; }
  .content { padding: 12px; overflow-wrap: anywhere; }
  .page-header { flex-wrap: wrap; gap: 8px; }
  .page-header .actions { flex-wrap: wrap; }
  .filters, .form-grid, .actions { min-width: 0; }
  .filters select, .filters input, .form-control { max-width: 100%; min-width: 0; }
  .table th, .table td { overflow-wrap: normal; }
  .form-actions, .filters { flex-wrap: wrap; }
  .filters label.nowrap, .filters .nowrap { white-space: normal; }
  dl.fields { grid-template-columns: minmax(0, 40%) minmax(0, 1fr); }
  dl.fields dd, dl.fields dt { min-width: 0; overflow-wrap: anywhere; }
  .transport-filtres-dates { flex-wrap: wrap; }
  .filters input[type=date] { min-width: 0; max-width: 100%; }
  .filters label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 100%; }
  .filters label input, .filters label select { flex: 1 1 140px; min-width: 0; }
  .badge { white-space: normal; }
  .btn { white-space: normal; max-width: 100%; }
  .page-header .subtitle { overflow-wrap: anywhere; }
}
/* États : raccourcis de période (mois, trimestre, exercices) */
.raccourcis-periode { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
/* Lignes en retard (réclamations…) */
.table tr.alerte > td { color: var(--danger); }
/* Histogramme : exercice et exercice précédent côte à côte */
.colchart .col .paire { display: flex; align-items: flex-end; height: 100%; gap: 1px; margin: 0 1px; }
.colchart .col .paire .fill { flex: 1; margin: 0; }
.colchart .col .fill-n1 { background: var(--chart-n1, #a8b3c4); }
.colchart-legende { font-size: 12px; color: var(--text-muted); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.colchart-legende .pastille { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--series-1); }
.colchart-legende .pastille-n1 { background: var(--chart-n1, #a8b3c4); margin-left: 10px; }

/* Fenêtre de double validation des actions importantes */
.dialogue-confirmation { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35); padding: 20px 22px; width: min(520px, calc(100vw - 32px)); }
.dialogue-confirmation::backdrop { background: rgba(15, 23, 42, .55); }
.dialogue-confirmation h3 { margin: 0 0 10px; }
.dialogue-confirmation .dc-message { font-size: 15px; margin: 0 0 8px; }
.dialogue-confirmation .dc-detail { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; font-weight: 600; }
.dialogue-confirmation .dc-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* Recherche à la frappe : liste sous la case de recherche */
.suggestions { position: absolute; z-index: 1000; max-width: min(560px, calc(100vw - 16px)); max-height: 60vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(15, 23, 42, .18); padding: 4px 0; }
.suggestions .s-groupe { padding: 6px 12px 2px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); }
.suggestions .s-item { display: block; padding: 6px 12px; color: var(--text); text-decoration: none; line-height: 1.3; }
.suggestions .s-item:hover, .suggestions .s-item.actif { background: var(--primary-soft); text-decoration: none; }
.suggestions .s-texte { display: block; font-weight: 500; }
.suggestions .s-detail { display: block; font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestions .s-vide { padding: 6px 12px; font-size: 12px; color: var(--text-muted); }
.suggestions .s-tous { display: block; padding: 6px 12px; border-top: 1px solid var(--border); font-size: 13px; }
.nav-version { padding: 4px 10px 10px; font-size: 11px; color: #64748b; }
/* Utilisateurs : rôles et droits */
.roles-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; }
.role-choix { display: block; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.categorie-droits { border-top: 1px solid var(--border); padding: 6px 0; }
.categorie-droits summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 4px 0; }
.categorie-droits .niveau-categorie { margin-left: auto; max-width: 240px; }
.droit-particulier { display: inline-block; padding: 3px 0; }
.role-choix input[type=checkbox] { width: auto; display: inline-block; margin: 0 6px 0 0; vertical-align: middle; }

/* Tableaux larges : 1re colonne figée quand le tableau défile en largeur (2 colonnes si la 1re n'est qu'une case à cocher),
   barre de défilement horizontale toujours visible en bas de l'écran, en-tête des colonnes qui reste sous la barre du haut */
.table-wrap.deborde > table.table > * > tr > :first-child,
.entete-flottante.deborde > table.table > thead > tr > :first-child,
.table-wrap.deborde > table.table.fige-2 > * > tr > :nth-child(2),
.entete-flottante.deborde > table.table.fige-2 > thead > tr > :nth-child(2) {
  position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: inset -1px 0 0 var(--border), 6px 0 6px -6px rgba(15, 23, 42, .35);
}
.table-wrap.deborde > table.table.fige-2 > * > tr > :first-child,
.entete-flottante.deborde > table.table.fige-2 > thead > tr > :first-child { box-shadow: none; }
.table-wrap.deborde > table.table.fige-2 > * > tr > :nth-child(2),
.entete-flottante.deborde > table.table.fige-2 > thead > tr > :nth-child(2) { left: var(--fige-gauche, 0); }
.table-wrap.deborde > table.table > thead > tr > th:first-child,
.table-wrap.deborde > table.table.fige-2 > thead > tr > th:nth-child(2),
.entete-flottante.deborde > table.table > thead > tr > th:first-child,
.entete-flottante.deborde > table.table.fige-2 > thead > tr > th:nth-child(2),
.table-wrap.deborde > table.table > tfoot > tr > :first-child { background: var(--surface-2); z-index: 2; }
/* 1re case qui couvre plusieurs colonnes (« Total » des pieds de tableau) : figée, elle masquerait les montants qui défilent
   dessous ; seul son libellé reste visible à gauche */
.table-wrap.deborde > table.table > * > tr > :first-child[colspan]:not([colspan="1"]) { position: static; box-shadow: none; }
.table-wrap.deborde > table.table > * > tr > :first-child[colspan]:not([colspan="1"]) > * { position: sticky; left: 8px; display: inline-block; }
.table-wrap.deborde > table.table > tbody > tr:hover > td:first-child,
.table-wrap.deborde > table.table.fige-2 > tbody > tr:hover > td:nth-child(2) { background: var(--surface-2); }
.table-wrap.deborde > table.table > tbody > tr.vip > td:first-child { background: #fff6dd; box-shadow: inset 3px 0 0 #d4a017, 6px 0 6px -6px rgba(15, 23, 42, .35); }
.table-wrap.deborde > table.table > tbody > tr.ligne-choisie > td:first-child,
.table-wrap.deborde > table.table.fige-2 > tbody > tr.ligne-choisie > td:nth-child(2) { background: var(--primary-soft); }
@media (prefers-color-scheme: dark) { .table-wrap.deborde > table.table > tbody > tr.vip > td:first-child { background: #2a2614; } }
.defilement-flottant { position: fixed; bottom: 0; z-index: 40; height: 18px; overflow-x: scroll; overflow-y: hidden;
  background: var(--surface-2); border-top: 1px solid var(--border); box-shadow: 0 -2px 8px rgba(15, 23, 42, .12); }
.defilement-flottant > div { height: 1px; }
.entete-flottante { position: fixed; z-index: 9; overflow: hidden; box-shadow: 0 3px 6px rgba(15, 23, 42, .12); pointer-events: auto; }
.entete-flottante > table.table { table-layout: fixed; margin: 0; }
.entete-flottante > table.table th { overflow: hidden; text-overflow: ellipsis; }
@media print { .defilement-flottant, .entete-flottante { display: none !important; } }
/* Listes : une ligne par fiche (le tableau défile en largeur) ; texte trop long coupé, complet au survol */
.table.liste-compacte td { white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.filters select { max-width: 230px; text-overflow: ellipsis; }
/* Quittances : statut de paiement (recouvrement), distinct du statut de production */
.badge-encaissee { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge-non_encaissee { background: var(--surface); color: var(--text); border-color: var(--border); }
.badge-retard { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
/* Fiches : informations sur deux colonnes quand la place le permet ; tableau vide réduit à une ligne */
.card:has(> dl.fields) { container-type: inline-size; }
@container (min-width: 620px) {
  dl.fields:not(.fields-empiles) { grid-template-columns: minmax(110px, 170px) minmax(0, 1fr) minmax(110px, 170px) minmax(0, 1fr); }
}
.card-vide { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
.card-vide h3 { margin: 0; font-size: 14px; color: var(--text-muted); }
/* Barre du haut : fil d'Ariane coupé (« … ») plutôt que de passer sur deux lignes ; bouton ☰ pour replier le menu */
.breadcrumbs { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .nouveau, .topbar-right { flex-shrink: 0; }
.topbar-right .pill, .topbar-right .user, .topbar-right a { white-space: nowrap; }
.menu-toggle { display: inline-block; padding: 2px 6px; border-radius: 6px; }
.menu-toggle:hover { background: var(--surface-2); }
@media (min-width: 761px) {
  .menu-replie .sidebar { display: none; }
  .menu-replie .content { max-width: none; }
}
.table.liste-compacte .badge { white-space: nowrap; }
dl.fields dt, dl.fields dd { min-width: 0; }
dl.fields dd .badge { white-space: normal; }

/* Ma journée : liste de travail du jour par métier */
.journee-entete { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 12px; }
.journee-entete h2 { margin: 0; }
.journee-entete .segment { display: flex; gap: 6px; }
.rubrique-journee .petite { font-size: 12px; margin: -4px 0 8px; }
.liste-journee { list-style: none; margin: 0; padding: 0; }
.liste-journee li { padding: 7px 0; border-bottom: 1px solid var(--border); }
.liste-journee li:last-child { border-bottom: 0; }
.liste-journee li small { display: block; color: var(--text-muted); font-size: 12px; }
.liste-journee li.alerte { border-left: 3px solid var(--danger); padding-left: 8px; }

/* Aide de l'écran (bouton ❔ Aide) */
.aide-page { max-width: 560px; width: calc(100% - 32px); border: 1px solid var(--border); border-radius: var(--radius, 10px);
             padding: 18px 22px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.aide-page::backdrop { background: rgba(15, 23, 42, .45); }
.aide-page h2 { margin: 0 24px 10px 0; font-size: 18px; }
.aide-page p { line-height: 1.55; margin: 0 0 10px; }
.aide-page .fermer { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--text-muted); }
button.pill { cursor: pointer; font: inherit; }
/* Barre du haut : sur un écran moyen, les pastilles Aide / Assistant / Signaler n'affichent que leur icône */
@media (max-width: 1500px) { .masque-moyen { display: none; } }

/* Fiches : tableaux repliables (clic sur le titre), 10 premières lignes puis « Afficher les autres » */
details.tableau-fiche > summary { cursor: pointer; list-style: none; user-select: none; }
details.tableau-fiche > summary::-webkit-details-marker { display: none; }
details.tableau-fiche > summary h3 { margin: 0; }
details.tableau-fiche .chevron { display: inline-block; width: 1em; color: var(--text-muted); transition: transform .15s; }
details.tableau-fiche:not([open]) .chevron { transform: rotate(-90deg); }
details.tableau-fiche:not([open]) { padding-bottom: 10px; }
details.tableau-fiche:not([open]) > summary { margin-bottom: 0; }
details.tableau-fiche:not(.tout-voir):not(.en-filtre) tr.ligne-repliee { display: none; }
details.tableau-fiche .voir-tout { margin-top: 8px; }
.tableaux-vides { flex-wrap: wrap; justify-content: flex-start; gap: 6px 18px; font-size: 13px; color: var(--text-muted); }
.tableaux-vides:empty { display: none; }
.tableaux-vides .tableau-vide { white-space: nowrap; }
.tableaux-vides .btn-sm { padding: 0 7px; line-height: 1.5; }
.replier-tout { display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 8px; }
@media print { details.tableau-fiche tr.ligne-repliee { display: table-row !important; } }

/* États : menu de tri / filtre par colonne (comme le filtre automatique d'Excel) */
.table-triable th { white-space: nowrap; }
.table-triable th .tri-menu { border: 0; background: none; color: var(--text-muted); cursor: pointer; padding: 0 2px 0 4px;
  font-size: 11px; line-height: 1; vertical-align: middle; }
.table-triable th .tri-menu:hover { color: var(--primary); }
.table-triable th.colonne-filtree { background: var(--primary-soft); }
.table-triable th.colonne-filtree .tri-menu { color: var(--primary); font-weight: 700; }
tr.masque-colonne, tr.masque-tri { display: none !important; }
.tri-info { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12.5px; color: var(--text-muted);
  margin: 4px 0 6px; }
.tri-popover { position: absolute; z-index: 50; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .18); padding: 10px; width: 280px; max-width: calc(100vw - 16px);
  display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.tri-popover .tri-sens, .tri-popover .tri-actions { display: flex; flex-direction: column; gap: 4px; }
.tri-popover .tri-actions { flex-direction: row; flex-wrap: wrap; }
.tri-popover .tri-sens .btn { justify-content: flex-start; text-align: left; }
.tri-popover .tri-filtre { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border); padding-top: 8px; }
.tri-popover .tri-filtre label { display: flex; align-items: center; gap: 6px; }
.tri-popover .tri-valeurs { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.tri-popover .tri-valeurs label { font-weight: normal; cursor: pointer; }

/* ===== Chantier prise en main : barre du haut lisible, recherche sur téléphone, pages d'erreur ===== */
/* Barre du haut : chaque outil a un libellé (visible sur PC, accessible partout) ; sur téléphone, icône légendée */
.entete-outils { gap: 8px; }
.entete-outil { display: inline-flex; align-items: center; gap: 5px; line-height: 1.3; }
.entete-outil:hover { text-decoration: none; border-color: var(--primary); }
.entete-outil .entete-compte { font-weight: 700; font-variant-numeric: tabular-nums; }
.tel-seul { display: none !important; }
.entete-plus summary { cursor: pointer; }
.entete-plus .nouveau-menu { left: auto; right: 0; min-width: 240px; }
.entete-plus-qui { padding: 6px 10px 8px; font-size: 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.entete-plus-bouton { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px;
  background: none; color: var(--danger); font: inherit; font-weight: 500; cursor: pointer; text-align: left; }
.entete-plus-bouton:hover { background: var(--surface-2); }
.entete-court { display: none; }
/* Écran moyen : le nom passe dans l'infobulle de « Déconnexion », Administration et Déconnexion en icônes ;
   en dessous de 1280 px, les outils n'affichent plus que leur icône (libellé accessible et infobulle gardés) */
@media (min-width: 761px) and (max-width: 1499px) {
  .entete-admin .entete-long, .avec-admin .entete-deconnexion .entete-long { display: none; }
  .entete-admin .entete-court, .avec-admin .entete-deconnexion .entete-court { display: inline; font-size: 16px; }
}
@media (min-width: 761px) and (max-width: 1365px) {
  .topbar-right .user, .entete-deconnexion .entete-long { display: none; }
  .entete-deconnexion .entete-court { display: inline; font-size: 16px; }
}
@media (min-width: 761px) and (max-width: 1279px) {
  .entete-outil .entete-libelle { display: none; }
}
@media (max-width: 760px) {
  .masque-tel { display: none !important; }
  .tel-seul { display: inline-flex !important; }
  details.tel-seul { display: block !important; }
  .topbar .entete-outils { gap: 2px; margin-left: auto; padding-right: 2px; }
  .topbar .entete-outil { position: relative; flex-direction: column; gap: 0; min-width: 48px; padding: 3px 4px 2px;
    border-radius: 8px; font-size: 10.5px; line-height: 1.15; justify-content: center; }
  .topbar .entete-outil .entete-icone { font-size: 17px; line-height: 1.2; }
  .topbar .entete-outil .entete-compte { position: absolute; top: -3px; right: 2px; min-width: 16px; padding: 0 4px;
    border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 10px; line-height: 14px; }
  .topbar .entete-outil.pill-warn .entete-compte { background: var(--warning); color: #fff; border-color: transparent; }
  .topbar .entete-plus .nouveau-menu { position: fixed; top: 56px; right: 8px; left: auto; max-width: calc(100vw - 16px); }
}
/* Paramètres : état de l'IA (Direction) */
.param-ia-off { border-left: 4px solid var(--warning); }
.param-ia-ok { border-left: 4px solid var(--success); }
.param-ia p:last-child { margin-bottom: 0; }
/* Pages d'erreur dans le gabarit habituel (404, 403) */
.page-erreur { max-width: 680px; margin: 32px auto; }
.page-erreur h1 { margin-bottom: 10px; }
.page-erreur-recherche { margin: 14px 0; display: flex; flex-direction: column; gap: 6px; }
.page-erreur-ligne { display: flex; gap: 8px; flex-wrap: wrap; }
.page-erreur-ligne input { flex: 1 1 240px; min-width: 0; }
.page-erreur-demande { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.page-erreur-actions { justify-content: flex-start; flex-wrap: wrap; }
/* Formulaires : bloc replié (« Ajuster les taxes de l'avis d'échéance ») */
details.bloc-repliable { border: 1px dashed var(--border); border-radius: 8px; padding: 8px 12px; margin: 12px 0 4px; }
details.bloc-repliable > summary { cursor: pointer; font-weight: 600; color: var(--primary); }
details.bloc-repliable[open] > summary { margin-bottom: 10px; }
details.bloc-repliable > summary .muted { font-weight: 400; font-size: 12.5px; }
/* Attestation : « Envoyer au client » */
.envoi-client .nouveau-menu { min-width: 300px; max-width: calc(100vw - 24px); }
.envoi-client-note { display: block; padding: 6px 10px; font-size: 12.5px; margin: 0; }
@media print { .envoi-client { display: none !important; } }
/* ===== Fin chantier prise en main ===== */

/* ===========================================================================
   Chantier écrans métier : erreurs de saisie, menus d'actions, choix à la frappe, barres de sélection
   =========================================================================== */
/* Erreurs de saisie : bandeau en haut de l'écran, champ fautif encadré en rouge avec son message juste dessous */
.bandeau-erreurs { border-color: var(--danger); }
.bandeau-erreurs ul { margin: 6px 0 0; padding-left: 20px; }
.bandeau-erreurs a { color: inherit; text-decoration: underline; font-weight: 600; }
.has-error > input:not([type=checkbox]):not([type=radio]), .has-error > select, .has-error > textarea,
.has-error > .etiquettes, .has-error .cc-recherche > input,
input[aria-invalid="true"]:not([type=checkbox]):not([type=radio]), select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--danger) !important; box-shadow: 0 0 0 2px var(--danger-soft);
}
.has-error > label, .form-row.has-error > label { color: var(--danger); }
.has-error > div[id^="id_"]:has(input[type=radio]), .has-error > div[id^="id_"]:has(input[type=checkbox]) {
  outline: 2px solid var(--danger); outline-offset: 4px; border-radius: 6px;
}
.errorlist { color: var(--danger); margin: 2px 0 0; padding: 0; list-style: none; font-size: 12.5px; font-weight: 600; }
.errorlist.nonfield { font-weight: 400; }

/* Message sur plusieurs lignes (motif par quittance…) : retours à la ligne conservés */
.messages .alert { white-space: pre-line; }

/* Fenêtre de confirmation : récapitulatif détaillé (encaissement…) */
.dialogue-confirmation .dc-detail.dc-riche { font-weight: 400; }
.dc-riche dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; }
.dc-riche dt { color: var(--text-muted); }
.dc-riche dd { margin: 0; font-weight: 600; }
.dc-riche ul { margin: 0; padding-left: 18px; }
.dc-riche .dc-alerte { margin: 8px 0 0; color: var(--warning); font-weight: 600; }

/* Choix multiples à la frappe : étiquettes + une case de recherche */
.etiquettes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 6px; min-height: 36px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: text; }
.etiquettes:focus-within { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.etiquettes-liste { display: contents; }
.etiquette { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-weight: 600; font-size: 13px; }
.etiquette-retirer { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 4px; font-size: 12px; line-height: 1; }
input.etiquettes-saisie { flex: 1 1 180px; min-width: 120px; border: 0 !important; padding: 4px; background: transparent; }
input.etiquettes-saisie:focus { outline: none; }

/* Menu « Plus ▾ » des fiches : actions rares, actions risquées en rouge */
.menu-plus .nouveau-menu { left: auto; right: 0; min-width: 270px; }
.menu-plus .nouveau-menu .sep { border-top: 1px solid var(--border); margin: 6px 4px; }
.menu-plus .nouveau-menu .titre-menu { padding: 4px 10px 2px; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .03em; color: var(--text-muted); }
.menu-plus .nouveau-menu a.risque { color: var(--danger); }
.menu-plus .nouveau-menu a.risque:hover { background: var(--danger-soft); }
.menu-plus .nouveau-menu a { flex-wrap: wrap; row-gap: 0; }
.menu-plus .nouveau-menu small { display: block; flex-basis: 100%; font-weight: 400; color: var(--text-muted); font-size: 12px; }
.menu-plus summary { list-style: none; }
.menu-plus summary::-webkit-details-marker { display: none; }
.menu-plus .nouveau-menu { max-width: calc(100vw - 16px); }

/* Formulaire par étapes : étape en erreur lisible, qu'elle soit affichée ou non */
.etapes-entete li.a-erreur { background: var(--danger-soft); }
.etapes-entete li.a-erreur .num-etape { background: var(--danger); }
.etapes-entete li.active.a-erreur { background: var(--danger); border-color: var(--danger); color: #fff; }
.etapes-entete li.active.a-erreur .num-etape { background: #fff; color: var(--danger); }
.confirmation-alertes { border: 2px solid var(--danger); border-radius: var(--radius); background: var(--danger-soft);
  color: var(--text); padding: 12px 14px; margin-top: 14px; }
.confirmation-alertes ul { margin: 6px 0 10px; padding-left: 20px; color: var(--danger); font-weight: 600; }
.confirmation-alertes label { display: flex; gap: 8px; align-items: flex-start; font-weight: 700; cursor: pointer; }
.confirmation-alertes input[type=checkbox] { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; }
.alerte-saisie { margin-top: 4px; font-size: 12.5px; color: var(--warning); font-weight: 600; }

/* Listes vides : l'action utile plutôt que « Aucun élément. » */
.liste-vide, .table.liste-compacte td.liste-vide { padding: 22px 16px; text-align: center; color: var(--text-muted);
  white-space: normal; max-width: none; overflow: visible; }
.liste-vide p { margin: 0 0 10px; }
.liste-vide .actions { justify-content: center; }

/* Tableaux de travail plus denses (impayés…) */
.table.table-dense td { padding: 5px 8px; vertical-align: middle; }
.table.table-dense th { padding: 6px 8px; }
.table.table-dense .badge { font-size: 11px; padding: 1px 7px; }
.table.table-dense .btn-sm { padding: 1px 7px; }
.barre-selection { z-index: 20; }
.barre-selection.au-repos { position: static; box-shadow: none; }
.barre-selection .actions label { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; max-width: 100%; }
.barre-selection .actions label > select, .barre-selection .actions label > input { min-width: 0; }
.barre-selection .actions select { max-width: 260px; }
.table tr.groupe-client > td { background: var(--surface-2); }
.table.table-impayes td.nowrap .badge { margin-left: 2px; }
.table.table-impayes { font-size: 12.5px; }
.table.table-impayes th { font-size: 11px; letter-spacing: 0; }
.table.table-impayes td.police-cie { line-height: 1.25; }
.table.table-impayes td.police-cie .muted { display: block; font-size: 11.5px; }
.table.table-impayes td.relance .badge { white-space: normal; text-align: center; }
.table.table-impayes td.num, .table.table-impayes th.num { padding-left: 5px; padding-right: 6px; }
.barre-selection .compte-selection { font-weight: 600; }
@media (max-width: 760px) {
  .barre-selection { margin-left: -12px; margin-right: -12px; padding: 10px 12px; }
  .barre-selection .btn { width: 100%; justify-content: center; }
}

/* Encaissement : un seul bloc de saisie selon le mode, tableau des quittances lisible */
.encaissement-mode .form-row[hidden], .encaissement-mode [data-modes][hidden] { display: none !important; }
.table.quittances-a-regler td { vertical-align: middle; }
.table.quittances-a-regler input.montant { width: 118px; text-align: right; }
.table.quittances-a-regler .badge { font-size: 11px; padding: 1px 7px; }
.pieces-reglement input { min-width: 110px; }
.pieces-reglement input.montant-piece { width: 120px; text-align: right; }
@media (max-width: 760px) {
  /* Téléphone : quittance, reste dû et montant réglé tiennent dans l'écran (police et période sur la fiche quittance) */
  .table.quittances-a-regler > thead > tr > :nth-child(3), .table.quittances-a-regler > thead > tr > :nth-child(4),
  .table.quittances-a-regler > tbody > tr > :nth-child(3), .table.quittances-a-regler > tbody > tr > :nth-child(4),
  .table.quittances-a-regler > tfoot > tr > :nth-child(2), .table.quittances-a-regler > tfoot > tr > :nth-child(3) { display: none; }
  .table.quittances-a-regler input.montant { width: 88px; }
  .table.quittances-a-regler > tbody > tr > td:nth-child(2) .badge { display: none; }
  .table.quittances-a-regler td, .table.quittances-a-regler th { padding-left: 6px; padding-right: 6px; }
  .table.quittances-a-regler th { white-space: normal; }
}
.payeur-choisi { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }

/* ==========================================================================
   Chantier « Sinistres, espace client et usage sur téléphone » (audit de novembre 2026)
   ========================================================================== */
/* Fiche sinistre : onglets « Ouverture » et « Clôture » sur une colonne tant que l'écran est étroit (les valeurs
   n'étaient lisibles qu'à raison de deux mots par ligne) */
@media (max-width: 1700px) {
  #onglet-declaration > .grid-2, #onglet-cloture > .grid-2 { grid-template-columns: 1fr; }
}
#chronologie form .filters { align-items: flex-start; }
#chronologie form textarea { min-height: 58px; }
textarea.input, .card textarea { max-width: 100%; }
/* Suivi financier du dossier */
.table.suivi-financier td { padding: 5px 0; border-bottom: 1px solid var(--border); }
.table.suivi-financier td.num { white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 10px; }
.table.suivi-financier tr.fort td { font-weight: 600; }
.table.suivi-financier tr.alerte td { color: var(--danger); font-weight: 600; }
.table.suivi-financier tr:last-child td { border-bottom: 0; }
/* Information de l'assuré */
.infos-assure { list-style: none; margin: 0 0 6px; padding: 0; }
.infos-assure li { display: grid; grid-template-columns: 22px 1fr; gap: 4px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.infos-assure li:last-child { border-bottom: 0; }
.infos-assure .etat { text-align: center; color: var(--text-muted); }
.infos-assure li.fait .etat { color: var(--success); }
.infos-assure li.retard .etat, .infos-assure li.retard strong { color: var(--danger); }
.infos-assure li.sans-objet { color: var(--text-muted); }
.infos-assure .muted { display: block; font-size: 12px; }
.message-whatsapp textarea { width: 100%; }
/* Portefeuille du gestionnaire sinistres */
.portefeuille-vues { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.portefeuille-vues .kpi { padding: 10px 12px; }
.portefeuille-vues .kpi-value { font-size: 22px; }
.portefeuille-vues .kpi.actif { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft, #dbeafe); }
.texte-danger { color: var(--danger); }
.badge-attente-cabinet { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-attente-assure { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge-attente-compagnie { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.badge-attente-expert { background: var(--surface-2); color: var(--text); }
/* Espace client : suivi d'un dossier sinistre */
.espace .etapes-dossier { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 10px 0 4px; padding: 0; }
.espace .etapes-dossier li { flex: 1 1 110px; text-align: center; padding: 8px 6px; border-radius: 6px; background: var(--surface-2); color: var(--text-muted); font-size: 13px; }
.espace .etapes-dossier li.faite { background: var(--success-soft, #dcfce7); color: var(--success); font-weight: 600; }
.espace .etapes-dossier li.courante { background: var(--primary); color: #fff; font-weight: 600; }
.espace .pieces-client { list-style: none; margin: 0; padding: 0; }
.espace .pieces-client li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.espace .pieces-client li:last-child { border-bottom: 0; }
.espace .pieces-client form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.espace .table-wrap { overflow-x: auto; }
.espace dl.dl { display: grid; grid-template-columns: minmax(110px, 200px) 1fr; gap: 6px 14px; margin: 0 0 12px; }
.espace dl.dl dt { color: var(--text-muted); }
.espace dl.dl dd { margin: 0; font-weight: 500; }
@media (max-width: 760px) {
  /* Téléphone : boutons et liens assez hauts pour le doigt, menus déroulants dans l'écran, textes qui passent à la ligne */
  .espace-nav .btn { flex: 1 1 45%; justify-content: center; min-height: 40px; }
  .espace .btn { min-height: 40px; }
  .espace input[type=file] { max-width: 100%; }
  body .liste-etats .emplacement { white-space: normal; }
  .page-header details.nouveau > .nouveau-menu { position: fixed; left: 12px; right: 12px; top: auto; min-width: 0; max-height: 60vh; overflow-y: auto; }
  #onglets-sinistre .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #onglets-sinistre .tabs .tab { white-space: nowrap; flex: 0 0 auto; }
  .checklist .ctrl .btn, .timeline + form .btn { min-height: 36px; }
  .portefeuille-vues { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .document { padding: 18px 14px !important; }
  .doc-destinataire { width: auto !important; min-width: 0 !important; margin-left: 0 !important; }
}
/* ===== Chantier Production et contrats (audit de novembre 2026) ===== */
/* Échéances à renouveler : compteurs par statut de suivi, saisie du suivi sur la ligne */
.suivi-etapes { display: flex; flex-wrap: wrap; gap: 8px; }
.suivi-etape { flex: 1 1 150px; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; border-top: 3px solid var(--border); }
.suivi-etape:hover { background: var(--bg, #f4f6fb); }
.suivi-etape.actif { box-shadow: 0 0 0 2px var(--primary); }
.suivi-etape .nombre { font-size: 22px; font-weight: 700; line-height: 1.1; }
.suivi-etape .libelle { font-weight: 600; font-size: 13px; }
.suivi-etape .montant { font-size: 12px; color: var(--muted, #6b7280); }
.suivi-etape.etape-a_preparer { border-top-color: #94a3b8; }
.suivi-etape.etape-avis_envoye { border-top-color: #2563eb; }
.suivi-etape.etape-negociation { border-top-color: #d97706; }
.suivi-etape.etape-perdu { border-top-color: var(--danger); }
.suivi-etape.etape-renouvele { border-top-color: var(--success); }
.table-suivi td.saisie-suivi { width: 330px; min-width: 280px; }
.ligne-suivi { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; align-items: center; margin: 0; }
.ligne-suivi .select, .ligne-suivi .input { width: 100%; min-width: 0; padding-top: 4px; padding-bottom: 4px; font-size: 13px; }
.ligne-suivi .input, .ligne-suivi select[name=motif_perte] { grid-column: 1 / -1; }
.ligne-suivi .select.statut-avis_envoye { border-color: #2563eb; }
.ligne-suivi .select.statut-negociation { border-color: #d97706; }
.ligne-suivi .select.statut-perdu, .ligne-suivi .select.a-completer { border-color: var(--danger); }
.table-suivi tr.ligne-perdue td { background: var(--danger-soft); }
.badge-suivi-avis_envoye { background: #dbeafe; color: #1d4ed8; border-color: transparent; }
.badge-suivi-negociation { background: #fef3c7; color: #92400e; border-color: transparent; }
.badge-suivi-perdu { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
@media (max-width: 760px) { .table-suivi td.saisie-suivi { min-width: 240px; } }
/* Fiche police : vie du contrat (frise), pièces attendues */
.frise { list-style: none; margin: 0; padding: 0 0 0 6px; }
.frise li { position: relative; padding: 0 0 12px 18px; border-left: 2px solid var(--border); }
.frise li:last-child { border-left-color: transparent; padding-bottom: 0; }
.frise li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary); border: 2px solid var(--surface); }
.frise li.frise-alerte::before { background: var(--danger); }
.frise li.frise-sinistre::before { background: #d97706; }
.frise li.frise-fin::before { background: #64748b; }
.frise .frise-date { font-size: 12px; color: var(--muted, #6b7280); }
.frise .frise-titre { font-weight: 600; }
.frise .frise-detail { font-size: 13px; color: var(--muted, #6b7280); }
.pieces-attendues { list-style: none; margin: 0; padding: 0; }
.pieces-attendues li { padding: 3px 0; display: flex; gap: 8px; align-items: baseline; }
.pieces-attendues .manque { color: var(--danger); font-weight: 600; }
.pieces-attendues .present { color: var(--success); }
.print-only { display: none; }
@media print { table.print-only { display: table; width: 100%; } }
/* ===== Chantier « Direction, pilotage, états et paramètres » (audit de novembre 2026) ===== */
/* Tableau de bord : à regarder aujourd'hui, tendance, objectif de l'exercice */
a.kpi { display: block; color: inherit; }
a.kpi[href]:hover { text-decoration: none; border-color: var(--primary); }
.tendance { font-weight: 600; white-space: nowrap; }
.tendance.hausse { color: var(--success); }
.tendance.baisse { color: var(--danger); }
.a-regarder .points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.a-regarder .point { border-left: 4px solid var(--warning); padding: 4px 0 4px 10px; display: flex; flex-direction: column; }
.a-regarder .point-danger { border-left-color: var(--danger); }
.a-regarder .point a, .a-regarder .point strong { font-weight: 600; }
.a-regarder .point .muted { font-size: 12.5px; }
.a-regarder-vide { border-left: 4px solid var(--success); }
.a-regarder-vide p { margin: 0; }
.objectif-barre { position: relative; height: 16px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); margin: 6px 0 12px; }
.objectif-realise { height: 100%; border-radius: 8px; background: var(--success); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.objectif-realise.retard { background: var(--warning); }
.objectif-repere { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); }
.objectif-chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.objectif-chiffres > div { display: flex; flex-direction: column; }
.objectif-chiffres strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.objectif-chiffres span { font-size: 12.5px; }
@media (max-width: 760px) {
  .a-regarder .points { grid-template-columns: 1fr; }
  .objectif-chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* États sur téléphone : la première colonne (libellé de la ligne) reste visible quand on fait défiler les chiffres */
  .etat-doc .table th:first-child, .etat-doc .table td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
  .etat-doc .table tfoot td:first-child, .etat-doc .table thead th:first-child { background: var(--surface-2); }
}
/* Graphiques des états : la barre garde de la place à côté du libellé et de la valeur */
.etat-graphique .bar-row { grid-template-columns: minmax(90px, 34%) 1fr minmax(70px, auto); }

/* Chantier « contrats et listes » : cases à cocher des listes et barre d'actions des lignes cochées */
.barre-selection { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; margin: 8px 0; border: 1px solid var(--primary); border-radius: 8px; background: var(--surface-2); position: sticky; top: 0; z-index: 5; }
.barre-selection[hidden] { display: none; }
.barre-selection .sel-choix { display: inline-flex; gap: 4px; align-items: center; }
.barre-selection .sel-choix select { width: auto; min-width: 150px; padding: 4px 8px; }
.barre-selection .sel-note { font-size: 12.5px; flex-basis: 100%; }
.table th.col-sel, .table td.col-sel { width: 30px; text-align: center; padding-left: 8px; padding-right: 4px; }
.table tr.ligne-cochee > td { background: color-mix(in srgb, var(--primary) 8%, transparent); }
/* Chantier « contrats et listes » : pièces attendues au dossier d'une police */
.pieces-attendues .facultative { color: var(--text-muted, #6b7280); }
.pieces-attendues .piece-a-joindre { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pieces-attendues .joindre-piece { display: inline; margin: 0; }
.pieces-manquantes { margin: 0; padding-left: 16px; }
/* ===== Chantier « Clients et relation » (lot 2 de l'audit de novembre 2026) ===== */
/* Fiche client : fil de la relation (saisie rapide d'un échange, filtre par type, lignes datées) */
.fiche-principal { display: flex; flex-direction: column; }
.fil-saisie { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.fil-saisie input[type=text] { flex: 1 1 260px; min-width: 0; }
.fil-saisie select { flex: 0 0 auto; width: auto; }
.fil-confirmation { color: var(--success); font-weight: 600; margin: 0 0 8px; }
.fil-filtres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.fil-filtre { padding: 2px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: 12.5px; }
.fil-filtre.actif { background: var(--primary-soft); color: var(--primary); border-color: transparent; font-weight: 600; }
.fil-lignes { list-style: none; margin: 0 0 8px; padding: 0; }
.fil-lignes li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.fil-lignes li:last-child { border-bottom: 0; }
.fil-picto { flex: 0 0 22px; text-align: center; }
.fil-texte { word-break: break-word; }
.fil-lignes .date { color: var(--text-muted); font-size: 12px; }
@media (max-width: 760px) {
  .fiche-principal .fil-relation { order: -1; }
  .fil-saisie select, .fil-saisie .btn { min-height: 38px; }
}
/* Écrans de travail du portefeuille clients : compteurs cliquables, liste */
.liste-indicateurs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.liste-indicateurs .kpi { flex: 1 1 130px; padding: 8px 12px; }
.liste-indicateurs .kpi-value { font-size: 20px; }
.liste-travail td .badge { margin: 1px 0; }
.liste-travail td .btn { margin-top: 3px; white-space: nowrap; }
.liste-travail td:first-child { min-width: 170px; }
.fiche-completude ul { margin: 0 0 10px; padding-left: 18px; }
.fiche-completude .objectif-barre { margin: 4px 0 8px; height: 10px; }
/* Fiche client : branches à proposer (vente croisée) */
.a-proposer-titre { margin: 10px 0 4px; }
.a-proposer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 3px 0; }
/* Risque de départ (indicatif) : carte de la fiche client, boutons de la liste « Clients à fidéliser » */
.risque-depart ul { margin: 0 0 8px; padding-left: 18px; }
.risque-depart.risque-eleve { border-left: 4px solid var(--danger); }
.risque-depart.risque-surveiller { border-left: 4px solid var(--warning); }
.form-ligne { display: inline-block; margin: 0; }
/* Fusion de deux fiches clients : case de confirmation */
.fusion-confirmation { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.fusion-confirmation input { width: auto; margin-top: 3px; }
