/* ===== Dashboards Sage 1000 — charte ===== */
:root {
  --sb-w: 248px;
  --navy: #0f1d32;
  --navy-2: #16294a;
  --navy-3: #1f3a66;
  --accent: #2f7de1;
  --ink: #1b2430;
  --muted: #6b7a90;
  --line: #e4e8ef;
  --bg: #f4f6f9;
  --good: #1f8f5a;
  --bad: #c8463b;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }

/* ----- structure ----- */
.app { display: flex; min-height: 100vh; }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; margin-left: var(--sb-w); }
.page { flex: 1; padding: 28px 32px; }
.foot { padding: 14px 32px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); background: #fff; }

/* ----- sidebar ----- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sb-w); background: var(--navy); color: #c9d4e5; display: flex; flex-direction: column; padding: 18px 14px; z-index: 100; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 14px; }
.brand-mark { width: 38px; height: 38px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; font-size: 18px; color: #fff; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; font-weight: 600; letter-spacing: .01em; }
.brand-text small { font-size: 11.5px; color: #8fa2c1; }
.nav-section { margin-bottom: 18px; }
.nav-label { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: #6f82a3; padding: 0 10px 8px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: #c9d4e5; font-weight: 500; margin-bottom: 2px; transition: background .12s; }
.nav-item i { font-size: 16px; width: 20px; text-align: center; color: #8fa2c1; }
.nav-item:hover { background: var(--navy-2); color: #fff; }
.nav-item.active { background: var(--navy-3); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nav-item.active i { color: #fff; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy-3); color: #fff; display: grid; place-items: center; font-weight: 600; flex: none; }
.user-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-text strong { font-size: 13px; color: #fff; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-text small { font-size: 11.5px; color: #8fa2c1; }
.btn-logout { background: none; border: 1px solid rgba(255,255,255,.14); color: #c9d4e5; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; }
.btn-logout:hover { background: var(--navy-2); color: #fff; }

/* ----- top bar ----- */
.topbar { height: 56px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 32px; position: sticky; top: 0; z-index: 50; }
.topbar-title { font-size: 15px; font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.societe-form { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.societe-form .form-select { min-width: 220px; border-color: var(--line); font-size: 13px; }
.asof { font-size: 12.5px; color: var(--muted); }
.btn-burger { display: none; background: none; border: 0; font-size: 22px; color: var(--ink); }

/* ----- page ----- */
.page h1 { font-size: 22px; font-weight: 600; margin: 0 0 4px; letter-spacing: -.01em; }
.page .subtitle { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.card { border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 1px 2px rgba(16,24,40,.04); background: #fff; }
.card .card-body { padding: 18px 20px; }
.card h2.card-title { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 12px; }

/* KPI : teintes sobres */
.card.kpi { position: relative; overflow: hidden; border-left: 4px solid var(--k); background: linear-gradient(135deg, var(--k-bg) 0%, #fff 70%); }
.card.kpi .card-body { padding: 16px 18px 14px; }
.kpi-head { display: flex; align-items: flex-start; gap: 10px; min-height: 40px; }
.kpi-icon { width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--k-bg2); color: var(--k); font-size: 14px; }
.card.kpi .kpi-libelle { font-size: 12px; color: var(--muted); font-weight: 500; line-height: 1.3; padding-top: 2px; }
.card.kpi .kpi-valeur { font-size: 22px; font-weight: 600; line-height: 1.15; margin: 10px 0 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; color: var(--ink); }
.card.kpi .kpi-valeur .count { white-space: nowrap; }
@media (min-width: 1400px) and (max-width: 1750px) { .card.kpi .kpi-valeur { font-size: 19px; } }
.card.kpi .kpi-valeur small { font-size: 12px; font-weight: 500; color: var(--muted); }
.card.kpi .delta { font-size: 12px; font-weight: 500; }
.card.kpi .delta.up { color: var(--good); } .card.kpi .delta.down { color: var(--bad); } .card.kpi .delta.na { color: var(--muted); }
.kpi-blue   { --k: #2f6fcf; --k-bg: #eef4fc; --k-bg2: #dce8f9; }
.kpi-teal   { --k: #1f8a86; --k-bg: #ebf6f5; --k-bg2: #d4ecea; }
.kpi-green  { --k: #2e8b57; --k-bg: #edf7f0; --k-bg2: #d8eedf; }
.kpi-amber  { --k: #b7791f; --k-bg: #fbf5ea; --k-bg2: #f5e8cb; }
.kpi-rose   { --k: #b9475c; --k-bg: #fbeff1; --k-bg2: #f5d9df; }
.kpi-indigo { --k: #4c5bb3; --k-bg: #eff0fa; --k-bg2: #dfe2f4; }
.kpi-slate  { --k: #566577; --k-bg: #f1f3f6; --k-bg2: #e2e6ec; }
.kpi-violet { --k: #7a4fa3; --k-bg: #f4eff9; --k-bg2: #e8ddf2; }

/* Apparition en cascade */
@keyframes reveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; animation: reveal .55s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: var(--delay, 0ms); }
.card.kpi { transition: transform .18s, box-shadow .18s; }
.card.kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16,24,40,.08); }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; opacity: 1; } }

/* Carte utilisateur (sidebar) */
.user-card { position: relative; border-radius: 12px; padding: 14px; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, #2f7de1 0%, #5b3fb3 100%); box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.user-card::after { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%; right: -50px; top: -60px; background: rgba(255,255,255,.12); }
.user-card .row-top { display: flex; align-items: center; gap: 12px; position: relative; }
.user-card .photo { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.8); flex: none; background: rgba(255,255,255,.2); display: grid; place-items: center; font-weight: 600; font-size: 17px; }
.user-card .who { min-width: 0; flex: 1; }
.user-card .who strong { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card .who small { font-size: 11.5px; opacity: .85; }
.user-card .btn-logout { border-color: rgba(255,255,255,.35); color: #fff; width: 32px; height: 32px; }
.user-card .btn-logout:hover { background: rgba(255,255,255,.18); }
.sidebar-foot { display: block; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }

.alert { border-radius: 10px; border: 1px solid; font-size: 13.5px; }
.alert-warning { background: #fff8e6; border-color: #f3dfa2; color: #7a5a06; }
.alert-info { background: #eef5ff; border-color: #cfe0fb; color: #1d4e9a; }
.table { font-size: 13.5px; }
.table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
.badge { font-weight: 500; }
.btn-primary { background: var(--accent); border-color: var(--accent); }
.form-control, .form-select { border-color: var(--line); }

/* ----- responsive ----- */
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .content { margin-left: 0; }
  .btn-burger { display: block; }
  .topbar, .page, .foot { padding-left: 16px; padding-right: 16px; }
}

/* ----- logo société dans la sidebar ----- */
.brand-logo { width: 30px; height: 30px; border-radius: 7px; background: #fff; display: grid; place-items: center; flex: none; overflow: hidden; padding: 3px; }
.brand-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-preview { min-height: 90px; border: 1px dashed var(--line); border-radius: 8px; display: grid; place-items: center; padding: 10px; background: #fafbfc; }
.logo-preview img { max-height: 90px; max-width: 100%; object-fit: contain; }
.nav-tabs .nav-link { color: var(--muted); font-weight: 500; } .nav-tabs .nav-link.active { color: var(--ink); }
.form-label { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
.page-head { margin-bottom: 18px; }

/* ----- Analyse IA ----- */
.ia-bloc { margin: 12px 0 18px; }
.ia-actions { display: flex; justify-content: flex-end; }
.btn-ia { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; color: #fff; letter-spacing: .01em;
  background: linear-gradient(135deg, #2f7de1 0%, #6d4fc4 100%); box-shadow: 0 4px 12px rgba(80,90,220,.25); transition: transform .15s, box-shadow .15s; }
.btn-ia i { font-size: 14px; }
.btn-ia:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(80,90,220,.32); }
.btn-ia:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-ia.loading i { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ia-panel { position: relative; margin-top: 12px; border-radius: 12px; padding: 18px 22px 16px 24px; background: linear-gradient(180deg, #f7f6ff 0%, #fbfbff 100%); border: 1px solid #e4e1f6; }
.ia-panel::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 4px; background: linear-gradient(180deg, #2f7de1, #6d4fc4); }
.ia-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ia-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5a4bb5; }
.ia-meta { font-size: 11.5px; color: var(--muted); }
.ia-body { font-size: 14px; line-height: 1.65; color: var(--ink); }
.ia-body h4 { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #3c3f8f; margin: 14px 0 6px; }
.ia-body h4:first-child { margin-top: 0; }
.ia-body p { margin: 0 0 8px; }
.ia-body ul, .ia-body ol { margin: 0 0 8px; padding-left: 20px; }
.ia-body li { margin-bottom: 4px; }
.ia-body strong { color: #1b2460; }
.ia-fade { animation: reveal .45s ease-out; }
.ia-erreur { color: var(--bad); font-size: 13px; }
.ia-skeleton span { display: block; height: 11px; border-radius: 6px; margin: 9px 0; background: linear-gradient(90deg, #e9e7f7 25%, #f4f3fc 50%, #e9e7f7 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.ia-skeleton span.w-50 { width: 50%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ----- Impression ----- */
.print-header, .print-only { display: none; }
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff; font-size: 11.5px; }
  .sidebar, .topbar, .no-print, .btn-ia, .ia-actions, .btn-burger { display: none !important; }
  .content { margin-left: 0; }
  .page { padding: 0; }
  .print-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; border-bottom: 2px solid var(--navy); padding-bottom: 10px; margin-bottom: 16px; }
  .ph-left { display: flex; align-items: center; gap: 14px; }
  .ph-left img { max-height: 56px; max-width: 140px; object-fit: contain; }
  .ph-nom { font-size: 16px; font-weight: 700; color: var(--navy); }
  .ph-titre { font-size: 15px; font-weight: 600; text-align: right; }
  .ph-detail { font-size: 10.5px; color: var(--muted); text-align: inherit; }
  .ph-right { text-align: right; }
  .print-only { display: inline; }
  .foot { border-top: 1px solid var(--line); padding: 8px 0; font-size: 10px; margin-top: 16px; }
  .card { box-shadow: none; break-inside: avoid; }
  .reveal { animation: none; opacity: 1; }
  .card.kpi { background: #fff; }
  .ia-panel { background: #fff; border-color: #ccc; break-inside: avoid; }
  .row.g-3 > [class*="col-"] { page-break-inside: avoid; }
  .col-lg-7, .col-lg-5 { width: 100%; flex: 0 0 100%; max-width: 100%; }
  a[href]::after { content: none; }
}

/* ----- tableaux de détail ----- */
.tbl-num td, .tbl-num th { font-variant-numeric: tabular-nums; white-space: nowrap; vertical-align: middle; }
.tbl-num td { font-size: 13px; }
.tbl-scroll { max-height: 520px; overflow: auto; }
.tbl-scroll thead th { position: sticky; top: 0; background: #fff; z-index: 1; }
.btn-group .btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }
@media print { .tbl-scroll { max-height: none; overflow: visible; } }

/* ----- cartes explorables ----- */
a.card.explo { text-decoration: none; color: inherit; display: block; }
a.card.explo:hover { border-color: var(--k); }
.explo-fleche { margin-left: auto; font-size: 20px; color: var(--k); opacity: 0; transform: translateX(-6px); transition: all .18s; }
a.card.explo:hover .explo-fleche { opacity: 1; transform: none; }
.filtres .form-label { font-size: 11.5px; }
.tbl-scroll-lg { max-height: calc(100vh - 360px); }
.section-titre { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 6px 0 10px; display: flex; justify-content: space-between; align-items: center; }
.section-titre a { font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 12.5px; }

/* ----- en-tête : cloche, badge utilisateur ----- */
.btn-icone { position: relative; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 16px; display: grid; place-items: center; }
.btn-icone:hover { background: var(--bg); }
.pastille { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.notif-menu { width: 360px; padding: 0; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(16,24,40,.12); border-radius: 12px; }
.notif-head { padding: 10px 14px; font-size: 12.5px; font-weight: 600; border-bottom: 1px solid var(--line); }
.notif-vide { padding: 18px 14px; font-size: 13px; color: var(--muted); }
.notif-item { display: flex; gap: 10px; padding: 10px 14px; text-decoration: none; color: var(--ink); border-bottom: 1px solid #f0f2f5; align-items: flex-start; }
.notif-item:hover { background: var(--bg); }
.notif-item strong { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.notif-item small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.notif-foot { display: block; padding: 10px 14px; font-size: 12.5px; font-weight: 500; color: var(--accent); text-decoration: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 5px; }
.dot-critique { background: var(--bad); } .dot-important { background: #b7791f; } .dot-info { background: #566577; }
.user-badge { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.user-badge:hover { background: var(--bg); }
.user-badge img, .user-badge .avatar-sm { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.user-badge .avatar-sm { display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 600; font-size: 13px; }
.user-badge .ub-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.user-badge .ub-text strong { font-size: 12.5px; font-weight: 600; } .user-badge .ub-text small { font-size: 11px; color: var(--muted); }
.user-badge .bi-chevron-down { font-size: 11px; color: var(--muted); }
.dropdown-menu { border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(16,24,40,.12); border-radius: 12px; font-size: 13.5px; }
.dropdown-item { padding: 8px 14px; } .dropdown-header { font-size: 12px; }
.nav-badge { margin-left: auto; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }

/* ----- synthèse : carte héro ----- */
.hero-card { padding: 18px 20px; }
.hero-card .photo { width: 56px; height: 56px; font-size: 20px; }
.hero-card .who strong { font-size: 17px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 16px; position: relative; }
.hero-grid small { display: block; font-size: 11px; opacity: .8; text-transform: uppercase; letter-spacing: .06em; }
.hero-grid strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.hero-actions { display: flex; gap: 8px; margin-top: 16px; position: relative; }
.hero-actions a { flex: 1; text-align: center; padding: 7px 0; border-radius: 8px; background: rgba(255,255,255,.14); color: #fff; font-size: 12.5px; font-weight: 500; text-decoration: none; }
.hero-actions a:hover { background: rgba(255,255,255,.24); }
.mini-prev { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-prev div { background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.mini-prev small { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.mini-prev strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.profil-card .profil-meta { position: relative; margin-top: 12px; font-size: 11.5px; opacity: .85; }

/* ----- alertes ----- */
.alertes-liste { display: flex; flex-direction: column; gap: 8px; }
.alerte { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); border-left-width: 4px; background: #fff; text-decoration: none; color: inherit; }
.alerte-critique { border-left-color: var(--bad); } .alerte-important { border-left-color: #b7791f; } .alerte-info { border-left-color: #566577; }
.alerte-ico { font-size: 16px; margin-top: 1px; } .alerte-critique .alerte-ico { color: var(--bad); } .alerte-important .alerte-ico { color: #b7791f; } .alerte-info .alerte-ico { color: #566577; }
.alerte-corps { flex: 1; min-width: 0; }
.alerte-titre { font-weight: 600; font-size: 13.5px; display: flex; justify-content: space-between; gap: 10px; }
.alerte-titre a { color: var(--ink); text-decoration: none; } .alerte-titre a:hover { color: var(--accent); }
.alerte-montant { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 500; white-space: nowrap; }
.alerte-detail { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.compact .alerte { padding: 9px 12px; } .compact .alerte-titre { font-size: 12.5px; } .compact .alerte-detail { font-size: 11.5px; }
a.alerte:hover { background: var(--bg); }

/* ----- Sage Copilot ----- */
.copilot { display: grid; grid-template-columns: 260px 1fr; gap: 16px; height: calc(100vh - 56px - 28px - 44px - 28px); min-height: 560px; }
.cp-side { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; min-height: 0; }
.cp-nouveau { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border-radius: 10px; color: #fff; font-weight: 600; font-size: 13px; text-decoration: none; background: linear-gradient(135deg, #2f7de1, #6d4fc4); box-shadow: 0 4px 12px rgba(80,90,220,.25); }
.cp-nouveau:hover { color: #fff; filter: brightness(1.05); }
.cp-side-label { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 16px 4px 8px; }
.cp-convs { overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cp-conv { display: flex; align-items: center; border-radius: 8px; }
.cp-conv a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 8px 10px; color: var(--ink); text-decoration: none; font-size: 13px; }
.cp-conv a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-conv a i { color: var(--muted); font-size: 13px; }
.cp-conv:hover { background: var(--bg); } .cp-conv.active { background: #eef3fb; } .cp-conv.active a { font-weight: 600; }
.cp-conv form button { background: none; border: 0; color: var(--muted); padding: 6px 8px; opacity: 0; } .cp-conv:hover form button { opacity: 1; } .cp-conv form button:hover { color: var(--bad); }
.cp-vide { font-size: 12.5px; color: var(--muted); padding: 8px 10px; }
.cp-main { background: #fff; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.cp-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.cp-logo { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 18px; background: linear-gradient(135deg, #2f7de1, #6d4fc4); }
.cp-titre { font-weight: 700; font-size: 15px; } .cp-sous { font-size: 12px; color: var(--muted); }
.cp-head-droite { margin-left: auto; }
.cp-fil { flex: 1; overflow: auto; padding: 22px 24px; background: linear-gradient(180deg, #fafbfe 0%, #f6f7fb 100%); display: flex; flex-direction: column; gap: 14px; }
.cp-accueil { max-width: 760px; margin: auto; text-align: center; padding: 10px 0 20px; }
.cp-accueil-ico { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; color: #fff; font-size: 28px; background: linear-gradient(135deg, #2f7de1, #6d4fc4); box-shadow: 0 10px 30px rgba(80,90,220,.3); }
.cp-accueil h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; } .cp-accueil p { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.cp-suggestions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; text-align: left; }
.cp-sugg { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; transition: all .15s; }
.cp-sugg i { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: #eef3fb; color: var(--accent); flex: none; font-size: 15px; }
.cp-sugg:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16,24,40,.08); }
.cp-msg { display: flex; gap: 12px; max-width: 86%; }
.cp-user { align-self: flex-end; flex-direction: row-reverse; }
.cp-avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 600; font-size: 13px; overflow: hidden; }
.cp-assistant .cp-avatar { background: linear-gradient(135deg, #2f7de1, #6d4fc4); color: #fff; }
.cp-user .cp-avatar { background: var(--navy); color: #fff; } .cp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cp-bulle { padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.6; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.cp-assistant .cp-bulle { background: #fff; border: 1px solid var(--line); border-top-left-radius: 4px; }
.cp-user .cp-bulle { background: var(--navy); color: #fff; border-top-right-radius: 4px; }
.cp-bulle h4 { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #3c3f8f; margin: 10px 0 4px; } .cp-bulle h4:first-child { margin-top: 0; }
.cp-bulle p { margin: 0 0 8px; } .cp-bulle p:last-of-type { margin-bottom: 0; } .cp-bulle ul, .cp-bulle ol { margin: 4px 0 8px; padding-left: 20px; }
.cp-heure { font-size: 10.5px; color: var(--muted); margin-top: 6px; } .cp-user .cp-heure { color: rgba(255,255,255,.65); }
.cp-typing { display: flex; gap: 5px; padding: 4px 2px; } .cp-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9aa6b8; animation: bounce 1.2s infinite; }
.cp-typing span:nth-child(2) { animation-delay: .2s; } .cp-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.cp-saisie { padding: 14px 20px 12px; border-top: 1px solid var(--line); background: #fff; }
.cp-saisie-box { display: flex; align-items: flex-end; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 16px; transition: border-color .15s, box-shadow .15s; }
.cp-saisie-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,125,225,.12); }
.cp-saisie-box textarea { flex: 1; border: 0; outline: 0; resize: none; font: inherit; font-size: 14px; line-height: 1.5; max-height: 160px; padding: 6px 0; background: transparent; }
.cp-saisie-box button { width: 38px; height: 38px; border-radius: 10px; border: 0; color: #fff; font-size: 15px; background: linear-gradient(135deg, #2f7de1, #6d4fc4); cursor: pointer; }
.cp-saisie-box button:disabled { opacity: .5; cursor: not-allowed; }
.cp-note { font-size: 11px; color: var(--muted); margin-top: 8px; text-align: center; }
@media (max-width: 992px) { .copilot { grid-template-columns: 1fr; height: auto; } .cp-side { display: none; } .cp-suggestions { grid-template-columns: 1fr; } .cp-msg { max-width: 100%; } }

/* ----- animation de chargement : anneau multicolore, logo au centre ----- */
:root { --c1: #2f7de1; --c2: #6d4fc4; --c3: #1f8f86; --c4: #e0a526; --violet: #6d4fc4; }
.loader { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(circle at 50% 40%, #ffffff 0%, #f1f4fa 70%, #e9edf5 100%); transition: opacity .45s ease, visibility .45s; }
.loader.cache { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-ring { position: relative; width: 132px; height: 132px; border-radius: 50%; }
.loader-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--c1), var(--c2), var(--c3), var(--c4), var(--c1)); animation: tourne 1.4s linear infinite;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); }
.loader-ring::after { content: ""; position: absolute; inset: -16px; border-radius: 50%; background: conic-gradient(from 180deg, rgba(47,125,225,0), rgba(109,79,196,.4), rgba(31,143,134,0), rgba(224,165,38,.35), rgba(47,125,225,0)); filter: blur(12px); animation: tourne 2.8s linear infinite reverse; z-index: -1; }
.loader-logo { position: absolute; inset: 0; display: grid; place-items: center; }
.loader-logo img, .loader-logo i { width: 62px; height: 62px; object-fit: contain; border-radius: 14px; background: #fff; padding: 8px; box-shadow: 0 8px 24px rgba(16,24,40,.12); animation: pulse 1.4s ease-in-out infinite; }
.loader-logo i { display: grid; place-items: center; font-size: 28px; color: var(--c1); }
.loader-texte { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--navy); text-align: center; }
.loader-texte small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; animation: clignote 1.4s ease-in-out infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes clignote { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
/* version miniature pour les boutons */
.ring-mini { display: inline-block; width: 16px; height: 16px; border-radius: 50%; flex: none; vertical-align: -3px;
  background: conic-gradient(from 0deg, var(--c1), var(--c2), var(--c3), var(--c4), var(--c1)); animation: tourne .9s linear infinite;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)); }
.btn-ia .ring-mini { background: conic-gradient(from 0deg, #fff, rgba(255,255,255,.2), #fff); }
.btn-ia.loading i { display: none; }
.btn.traitement { position: relative; pointer-events: none; opacity: .85; }
.btn.traitement .ring-mini { margin-right: 6px; }
@media (prefers-reduced-motion: reduce) { .loader-ring, .loader-ring::after, .ring-mini, .loader-logo img, .loader-logo i { animation: none; } }

.ia-panel-head { gap: 10px; }
.ia-panel-head .ia-meta { margin-left: auto; }
.ia-fermer { background: none; border: 0; color: var(--muted); width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; cursor: pointer; }
.ia-fermer:hover { background: #e9e6f8; color: var(--ink); }
.hero-card.h-100 { height: auto !important; }

/* ================= PAGES PUBLIQUES ================= */
.corps-public { background: #eef2f8; background-image: radial-gradient(900px 520px at 8% -10%, rgba(47,125,225,.22), transparent 60%), radial-gradient(760px 520px at 92% 8%, rgba(109,79,196,.16), transparent 60%), radial-gradient(900px 600px at 50% 110%, rgba(31,138,134,.14), transparent 60%), linear-gradient(180deg, #f3f6fb 0%, #e9eef7 100%); background-attachment: fixed; }
.corps-public .pub-head { background: rgba(255,255,255,.55); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.7); border-radius: 16px; padding: 12px 18px; margin-top: 14px; box-shadow: 0 6px 24px rgba(20,40,80,.06); }
.corps-public section { position: relative; }
.corps-public .cards4 > div, .corps-public .cards4 > a { background: rgba(255,255,255,.86); backdrop-filter: blur(6px); border-color: rgba(255,255,255,.9); box-shadow: 0 8px 28px rgba(20,40,80,.07); }
.corps-public .pub-foot { background: rgba(255,255,255,.5); border-radius: 16px 16px 0 0; padding: 26px 24px 30px; margin-top: 20px; border-top: 1px solid rgba(255,255,255,.8); }

.pub { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.pub-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.pub-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.pub-brand img { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; background: #fff; padding: 4px; box-shadow: 0 1px 3px rgba(16,24,40,.08); }
.pub-brand strong { display: block; font-size: 15px; } .pub-brand small { font-size: 11.5px; color: var(--muted); }
.pub-nav { display: flex; align-items: center; gap: 22px; } .pub-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14px; } .pub-nav a:hover { color: var(--accent); }
.pub-cta { color: #fff !important; padding: 8px 16px; border-radius: 999px; }
.eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 48px 0 60px; }
.hero h1 { font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 0 0 16px; }
.hero p { font-size: 16px; color: #3d4a5c; line-height: 1.65; max-width: 540px; }
.hero-btns { display: flex; gap: 12px; margin: 22px 0; flex-wrap: wrap; }
.hero-btns .btn-lg { border-radius: 12px; font-size: 15px; padding: 12px 22px; }
.hero-logos { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); }
.hero-logos img { height: 36px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px 6px; box-shadow: 0 1px 3px rgba(16,24,40,.08); }
.hero-logos .hl-hpc { height: 40px; }
.hero-visuel { position: relative; height: 420px; }
.orbite { position: relative; width: 300px; height: 300px; margin: 60px auto 0; }
.orbite-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, var(--c1), var(--c2), var(--c3), var(--c4), var(--c1)); animation: tourne 10s linear infinite;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); opacity: .9; }
.orbite-ring.r2 { inset: 32px; animation-direction: reverse; animation-duration: 16s; opacity: .55; }
.orbite-ring::before { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px var(--c1), 0 0 18px var(--c2); top: -6px; left: calc(50% - 7px); }
.orbite-logo { position: absolute; inset: 70px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 20px 50px rgba(16,24,40,.14); animation: pulse 3s ease-in-out infinite; }
.orbite-logo img { width: 64%; height: 64%; object-fit: contain; }
.orbite.petite { width: 150px; height: 150px; margin: 0; } .orbite.petite .orbite-ring.r2 { inset: 18px; } .orbite.petite .orbite-logo { inset: 34px; }
.orbite.verte .orbite-ring { background: conic-gradient(from 0deg, #1f8f5a, #2f7de1, #26a86b, #1f3a66, #1f8f5a); }
.flot { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; box-shadow: 0 10px 30px rgba(16,24,40,.1); display: flex; flex-direction: column; min-width: 150px; animation: flotte 5s ease-in-out infinite; }
.flot i { font-size: 16px; color: var(--accent); margin-bottom: 4px; } .flot span { font-size: 11px; color: var(--muted); } .flot strong { font-size: 13.5px; }
.f1 { top: 20px; left: 0; } .f2 { top: 60px; right: 0; animation-delay: 1.2s; } .f3 { bottom: 20px; left: 20px; animation-delay: 2.4s; } .f3 i { color: var(--bad); } .f4 { bottom: 0; right: 10px; animation-delay: 3.6s; } .f4 i { color: var(--violet); }
@keyframes flotte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.pub-section { padding: 48px 0; }
.pub-section h2 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 22px; max-width: 760px; }
.cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; transition: transform .18s, box-shadow .18s; }
.pcard:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(16,24,40,.08); }
.pcard-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--violet)); margin-bottom: 14px; }
.pcard h3 { font-size: 15px; font-weight: 700; margin: 0 0 6px; } .pcard p { font-size: 13px; color: #3d4a5c; line-height: 1.55; margin: 0; }
.pub-ia { background: linear-gradient(135deg, #0f1d32, #1f3a66); color: #fff; border-radius: 20px; padding: 48px; margin: 10px 0; }
.pub-ia .eyebrow { color: #9fc0f3; } .pub-ia p { color: #c9d4e5; font-size: 15px; line-height: 1.65; }
.pub-ia .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 16px 0 0; } .checks li { padding-left: 26px; position: relative; margin-bottom: 8px; color: #c9d4e5; font-size: 14px; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: #4ade80; font-weight: 700; }
.ia-demo .ia-panel { background: #fff; color: var(--ink); }
.pub-cta-band { background: linear-gradient(135deg, var(--accent), var(--violet)); color: #fff; border-radius: 20px; padding: 48px; text-align: center; margin: 10px 0 40px; }
.pub-cta-band h2 { color: #fff; margin: 0 auto 10px; } .pub-cta-band p { color: #e5ecff; font-size: 15px; margin-bottom: 22px; }
.pub-foot { border-top: 1px solid var(--line); padding: 26px 0 30px; font-size: 12.5px; color: var(--muted); }
.pub-foot-grid { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; } .pub-foot strong { color: var(--ink); }
.pub-foot-liens a { margin-left: 18px; color: var(--muted); text-decoration: none; } .pub-foot-liens a:hover { color: var(--accent); }
.pub-foot-bas { margin-top: 14px; font-size: 11.5px; }
.legal h3 { font-size: 15px; font-weight: 700; margin: 22px 0 6px; } .legal p { font-size: 14px; line-height: 1.7; color: #3d4a5c; max-width: 860px; } .legal .lead { font-size: 15px; }
/* connexion */
.login-scene { min-height: 100vh; display: grid; grid-template-columns: 1.7fr 1fr; }
.login-gauche { background: linear-gradient(160deg, #0f1d32 0%, #1f3a66 60%, #2f5fa8 100%); color: #fff; padding: 40px 56px; display: flex; flex-direction: column; justify-content: center; position: relative; }
.login-retour { position: absolute; top: 22px; left: 28px; color: #9fc0f3; text-decoration: none; font-size: 13px; }
.duo { display: flex; align-items: center; gap: 22px; margin-bottom: 26px; }
.duo-plus { font-size: 34px; font-weight: 300; color: #9fc0f3; }
.login-gauche h1 { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; }
.login-gauche > p { color: #c9d4e5; font-size: 15px; margin-bottom: 26px; }
.login-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 760px; }
.lcard { display: flex; gap: 12px; align-items: flex-start; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 14px; backdrop-filter: blur(6px); }
.lcard i { font-size: 20px; color: #9fc0f3; margin-top: 2px; } .lcard strong { display: block; font-size: 13.5px; margin-bottom: 2px; } .lcard span { font-size: 12px; color: #c9d4e5; line-height: 1.45; }
.login-droite { display: grid; place-items: center; padding: 40px 24px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #0f1d32 0%, #1f3a66 100%); padding: 24px; }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 16px; padding: 30px; box-shadow: 0 24px 60px rgba(0,0,0,.18); position: relative; }
.login-card h2 { font-size: 22px; font-weight: 700; margin: 0 0 4px; } .login-card > p { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.login-card .login-retour { position: static; color: var(--muted); display: inline-block; }
.login-foot { text-align: center; font-size: 11.5px; color: #9aa6b8; margin-top: 22px; line-height: 1.5; } .login-foot a { color: var(--muted); }
@media (max-width: 992px) { .hero, .pub-ia .grid2, .login-scene { grid-template-columns: 1fr; } .cards4 { grid-template-columns: 1fr 1fr; } .hero-visuel { display: none; } .login-gauche { padding: 70px 24px 30px; } .login-cards { grid-template-columns: 1fr; } .pub-nav a:not(.pub-cta) { display: none; } .hero h1 { font-size: 32px; } }
@media (max-width: 600px) { .cards4 { grid-template-columns: 1fr; } }

/* ---------- Clôture : calendrier, contrôles, check-list ---------- */
.cal-mois { text-decoration: none; color: var(--ink); min-width: 118px; border: 1px solid var(--line); transition: transform .15s, box-shadow .15s; }
.cal-mois:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(20,40,80,.08); color: var(--ink); }
.cal-mois.actif { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,125,225,.12); }
.cal-cloturee { background: linear-gradient(180deg, #f3faf5, #fff); } .cal-en_cours { background: linear-gradient(180deg, #fdf7ea, #fff); }
.ctl-liste { display: flex; flex-direction: column; gap: 8px; }
.ctl { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); background: #fff; border-left-width: 4px; transition: background .15s, transform .15s; }
.ctl:hover { background: #f7f9fc; color: var(--ink); transform: translateX(2px); }
.ctl-ico { font-size: 18px; } .ctl-titre { font-weight: 600; font-size: 13.5px; } .ctl-corps { flex: 1; min-width: 0; }
.ctl-ok { border-left-color: #2e8b57; } .ctl-ok .ctl-ico { color: #2e8b57; }
.ctl-bloquant { border-left-color: var(--bad); } .ctl-bloquant .ctl-ico { color: var(--bad); }
.ctl-attention { border-left-color: #b7791f; } .ctl-attention .ctl-ico { color: #b7791f; }
.ctl-info { border-left-color: #566577; } .ctl-info .ctl-ico { color: #566577; }
.ctl-pastille { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 99px; font-size: 11.5px; background: #eef1f5; }
.ctl-pastille.ctl-ok { background: #e6f4ec; color: #1f6f44; } .ctl-pastille.ctl-bloquant { background: #fbe9e7; color: #a23a30; } .ctl-pastille.ctl-attention { background: #fdf3e2; color: #8a5a12; } .ctl-pastille.ctl-info { background: #eef1f5; color: #4b5767; }
.chk-liste { display: flex; flex-direction: column; }
.chk-cat { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 12px 0 4px; }
.chk { display: flex; align-items: flex-start; gap: 10px; padding: 7px 4px; border-bottom: 1px dashed var(--line); }
.chk:last-child { border-bottom: 0; } .chk-corps { flex: 1; min-width: 0; } .chk-titre { font-size: 13.5px; font-weight: 500; }
.chk-case { width: 24px; height: 24px; border-radius: 7px; border: 2px solid #c7cfdb; background: #fff; color: #fff; display: grid; place-items: center; font-size: 15px; flex: none; margin-top: 1px; transition: all .15s; }
.chk-case:hover:not(:disabled) { border-color: var(--accent); }
.chk-fait .chk-case { background: #2e8b57; border-color: #2e8b57; } .chk-fait .chk-titre { color: var(--muted); text-decoration: line-through; }
.chk-na .chk-case { background: #9aa5b5; border-color: #9aa5b5; } .chk-en_cours .chk-case { border-color: #b7791f; color: #b7791f; }
.chk-actions { display: flex; gap: 8px; opacity: 0; transition: opacity .15s; } .chk:hover .chk-actions { opacity: 1; }
@media print { .cal-cloture { display: none !important; } }

/* ---------- États OHADA ---------- */
.tbl-ohada tr.niv-0 td { font-weight: 700; background: #eef3fb; border-top: 2px solid var(--accent); }
.tbl-ohada tr.niv-1 td { font-weight: 600; background: #f6f8fb; }
.tbl-ohada tr.niv-2 td:nth-child(2), .tbl-ohada tr.niv-3 td:nth-child(2) { padding-left: 18px; }
.tbl-ohada tr.niv-3 td { color: var(--muted); font-style: italic; }
.tbl-ohada tr[role=button]:hover td { background: #f1f5fb; cursor: pointer; }
.ratio-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; height: 100%; background: #fff; }
.ratio-val { font-size: 20px; font-weight: 700; letter-spacing: -.01em; } .ratio-val small { font-size: 11px; color: var(--muted); font-weight: 500; }
.ratio-def { font-size: 11px; color: var(--muted); margin-top: 2px; }
.nav-pills .nav-link { font-size: 13px; font-weight: 500; color: var(--muted); border-radius: 8px; } .nav-pills .nav-link.active { background: var(--accent); }
@media print { .tab-pane { display: block !important; opacity: 1 !important; margin-bottom: 18px; } }

.soc-nom { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: #eef4fc; border-radius: 99px; padding: 3px 10px; margin-bottom: 6px; }
.ia-teaser { display: flex; gap: 14px; align-items: flex-start; }

/* ---------- Pages portail (Pilotage, Administration) ---------- */
.hub-card { text-decoration: none; color: var(--ink); border-left: 4px solid var(--k, var(--accent)); transition: transform .15s, box-shadow .15s; }
.hub-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(20,40,80,.1); color: var(--ink); }
.hub-card:hover .explo-fleche { transform: translateX(4px); }
.hub-ico { width: 44px; height: 44px; font-size: 20px; }
.hub-titre { font-size: 16px; font-weight: 700; margin: 14px 0 6px; display: flex; align-items: center; gap: 4px; }
.hub-desc { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.55; }

/* ---------- Rapports de pilotage ---------- */
.rp-feuille { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 40px rgba(20,40,80,.08); overflow: hidden; max-width: 1180px; margin: 0 auto; }
.rp-entete { position: relative; }
.rp-entete-bande { height: 8px; background: linear-gradient(90deg, #0f1d32 0%, #2f7de1 55%, #6d4fc4 100%); }
.rp-entete-corps { display: flex; justify-content: space-between; gap: 24px; padding: 22px 28px 14px; background: linear-gradient(180deg, #f7f9fd, #fff); }
.rp-societe { display: flex; align-items: center; gap: 14px; }
.rp-societe img { max-height: 64px; max-width: 150px; object-fit: contain; }
.rp-logo-vide { width: 56px; height: 56px; border-radius: 12px; background: #eef4fc; color: var(--accent); display: grid; place-items: center; font-size: 24px; }
.rp-soc-nom { font-size: 17px; font-weight: 700; color: #0f1d32; } .rp-soc-detail { font-size: 11.5px; color: var(--muted); }
.rp-titre-bloc { text-align: right; }
.rp-type { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.rp-titre { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 6px; color: #0f1d32; }
.rp-meta { display: flex; gap: 14px; justify-content: flex-end; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.rp-sous-titre { padding: 10px 28px; background: #0f1d32; color: #dce6f5; font-size: 13px; }
.rp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; padding: 20px 28px 4px; }
.rp-kpi { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: linear-gradient(180deg, #fff, #f7f9fd); }
.rp-kpi-lib { font-size: 11.5px; color: var(--muted); font-weight: 500; } .rp-kpi-val { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin-top: 2px; } .rp-kpi-val small { font-size: 11px; color: var(--muted); font-weight: 500; }
.rp-kpi-var { font-size: 11.5px; margin-top: 2px; color: var(--muted); } .rp-kpi-var.ok { color: #1f6f44; } .rp-kpi-var.ko { color: #a23a30; }
.rp-bloc { padding: 18px 28px 6px; break-inside: avoid; }
.rp-h3 { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #0f1d32; margin: 0 0 10px; padding-left: 10px; border-left: 3px solid var(--accent); }
.rp-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f3f6fb; border-bottom: 1px solid var(--line); }
.rp-table td { font-size: 12.5px; vertical-align: middle; } .rp-dense td { padding: 2px 6px; font-size: 11.5px; }
.rp-total td { font-weight: 700; background: #eef3fb; border-top: 2px solid var(--accent); }
.rp-tot { background: #eef3fb; } .rp-sub { background: #f6f8fb; }
.rp-note { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; }
.rp-texte { font-size: 13px; line-height: 1.6; }
.rp-ia { background: linear-gradient(180deg, #fff, #f6f3fd); border-top: 1px dashed var(--line); margin-top: 10px; padding-bottom: 18px; }
.rp-ia .rp-h3 { border-left-color: #6d4fc4; }
.rp-pied { display: flex; justify-content: space-between; gap: 20px; padding: 12px 28px; border-top: 2px solid #0f1d32; font-size: 10.5px; color: var(--muted); background: #f7f9fd; }
.rp-pied-droite { text-align: right; max-width: 60%; }
@media print {
  @page { size: A4 portrait; margin: 10mm; }
  .rp-outils, .rp-ia .ia-actions { display: none !important; }
  .rp-feuille { border: 0; box-shadow: none; border-radius: 0; max-width: none; }
  .rp-feuille .print-header { display: none !important; }
  .rp-pied { position: running(footer); }
  .rp-kpis { grid-template-columns: repeat(6, 1fr); }
  .rp-bloc { break-inside: avoid; }
  .rp-ia .ia-panel.d-none { display: none; }
}
.rp-table td { white-space: normal; } .rp-table td.text-end, .rp-table th.text-end { white-space: nowrap; }

/* ---------- Copilot : mise en forme des réponses ---------- */
.cp-assistant .cp-bulle { padding: 14px 18px; font-size: 13.5px; }
.cp-bulle h3, .cp-bulle h4, .cp-bulle h5 { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #3c3f8f; margin: 14px 0 6px; padding-left: 8px; border-left: 3px solid #6d4fc4; }
.cp-bulle h3:first-child, .cp-bulle h4:first-child { margin-top: 0; }
.cp-bulle hr { border: 0; border-top: 1px dashed var(--line); margin: 10px 0; }
.cp-bulle blockquote { margin: 8px 0; padding: 8px 12px; background: #f6f3fd; border-left: 3px solid #6d4fc4; border-radius: 6px; color: #3d4a5c; font-size: 13px; }
.cp-bulle code { background: #eef1f5; border-radius: 4px; padding: 1px 5px; font-size: 12px; }
.cp-bulle li { margin-bottom: 3px; } .cp-bulle .nb { white-space: nowrap; font-variant-numeric: tabular-nums; }
.md-table { margin: 8px 0 10px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.md-table table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 0; }
.md-table th { background: linear-gradient(180deg, #f3f0fb, #ebe6f8); color: #3c3f8f; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; padding: 8px 10px; border-bottom: 1px solid #d9d2ee; text-align: left; }
.md-table td { padding: 7px 10px; border-bottom: 1px solid #eef1f5; vertical-align: top; }
.md-table tr:last-child td { border-bottom: 0; } .md-table tbody tr:nth-child(even) td { background: #fafbfd; }
.md-table .al-r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; } .md-table .al-c { text-align: center; }
.md-table td:first-child { font-weight: 500; }
.cp-heure { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; padding-top: 8px; border-top: 1px solid #eef1f5; }
.cp-user .cp-heure { border-top-color: rgba(255,255,255,.15); }
.cp-plein { font-size: 11.5px; color: #6d4fc4; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; border: 1px solid #d9d2ee; background: #fff; transition: background .15s; }
.cp-plein:hover { background: #f6f3fd; color: #3c3f8f; }
.cp-plein-corps { font-size: 14px; line-height: 1.7; padding-bottom: 22px; }
.cp-plein-corps h3, .cp-plein-corps h4, .cp-plein-corps h5 { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #3c3f8f; margin: 20px 0 8px; padding-left: 10px; border-left: 3px solid #6d4fc4; }
.cp-plein-corps h3:first-child, .cp-plein-corps h4:first-child { margin-top: 0; }
.cp-plein-corps blockquote { margin: 10px 0; padding: 10px 14px; background: #f6f3fd; border-left: 3px solid #6d4fc4; border-radius: 6px; }
.cp-plein-corps .md-table table { font-size: 13px; } .cp-plein-corps hr { border: 0; border-top: 1px dashed var(--line); margin: 14px 0; }
.cp-plein-corps p { margin: 0 0 10px; } .cp-plein-corps ul, .cp-plein-corps ol { margin: 4px 0 12px; padding-left: 22px; }
@media print { .md-table { break-inside: avoid; } }

/* ---------- En-tête de document (style bannière) ---------- */
.doc-entete { background: linear-gradient(135deg, #0d2a5e 0%, #1958b8 55%, #2f7de1 100%); color: #fff; border-radius: 16px; margin: 18px 18px 6px; position: relative; overflow: hidden; box-shadow: 0 14px 36px rgba(13,42,94,.25); }
.doc-entete::before { content: ''; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 65%); }
.doc-entete-haut { display: flex; align-items: center; gap: 18px; padding: 20px 24px 14px; border-bottom: 1px solid rgba(255,255,255,.18); position: relative; }
.doc-logo { width: 84px; height: 72px; border-radius: 12px; background: #fff; display: grid; place-items: center; padding: 6px; flex: none; box-shadow: 0 4px 14px rgba(0,0,0,.18); color: #2f7de1; font-size: 28px; }
.doc-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.doc-org { flex: 1; min-width: 0; }
.doc-org-sur { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #cfe0fb; font-weight: 600; }
.doc-org-nom { font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin: 2px 0; }
.doc-org-sous { font-size: 12px; color: #dbe7fb; font-style: italic; }
.doc-btn { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.45); color: #fff; border-radius: 999px; padding: 8px 18px; font-weight: 600; font-size: 13px; backdrop-filter: blur(4px); transition: background .15s; }
.doc-btn:hover { background: rgba(255,255,255,.28); color: #fff; }
.doc-entete-bas { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 18px 24px 22px; position: relative; flex-wrap: wrap; }
.doc-eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #cfe0fb; font-weight: 700; }
.doc-titre { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 6px; color: #fff; }
.doc-ligne { font-size: 13px; color: #e3ecfb; } .doc-ligne strong { color: #fff; }
.doc-tuiles { display: flex; gap: 12px; flex-wrap: wrap; }
.doc-tuile { min-width: 170px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); border-radius: 12px; padding: 12px 18px; text-align: center; backdrop-filter: blur(4px); }
.doc-tuile-val { font-size: 26px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; white-space: nowrap; }
.doc-tuile-lib { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #dbe7fb; margin-top: 4px; }
.doc-bande { display: flex; height: 7px; } .doc-bande span { flex: 1; } .doc-bande span:nth-child(1) { background: #1f8f5a; } .doc-bande span:nth-child(2) { background: #f2c94c; } .doc-bande span:nth-child(3) { background: #c8463b; }
@media (max-width: 992px) { .doc-titre { font-size: 22px; } .doc-tuile { min-width: 130px; } }
@media print {
  .doc-entete { margin: 0 0 8px; border-radius: 10px; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc-titre { font-size: 22px; } .doc-tuile-val { font-size: 20px; }
}

/* ---------- Console SaaS ---------- */
.sa { min-height: 100vh; display: flex; flex-direction: column; }
.sa-top { background: linear-gradient(135deg, #0f1d32 0%, #1f3a66 100%); color: #fff; box-shadow: 0 6px 24px rgba(15,29,50,.25); }
.sa-top-in { max-width: 1360px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.sa-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; } .sa-brand strong { display: block; font-size: 16px; } .sa-brand small { font-size: 11.5px; color: #c9d4e5; }
.sa-mark { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, #2f7de1, #6d4fc4); display: grid; place-items: center; font-size: 18px; box-shadow: 0 6px 16px rgba(47,125,225,.35); }
.sa-nav { display: flex; align-items: center; gap: 18px; font-size: 13.5px; } .sa-nav a { color: #dce6f5; text-decoration: none; } .sa-nav a:hover { color: #fff; } .sa-user { color: #c9d4e5; }
.sa-btn-ghost { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; } .sa-btn-ghost:hover { background: rgba(255,255,255,.2); }
.sa-main { max-width: 1360px; width: 100%; margin: 0 auto; padding: 24px 24px 40px; flex: 1; }
.sa-alert { border-radius: 12px; }
.sa-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.sa-kpi { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--k, var(--accent)); border-radius: 14px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 4px 16px rgba(20,40,80,.05); }
.sa-kpi-lib { font-size: 12px; color: var(--muted); font-weight: 500; } .sa-kpi-val { font-size: 22px; font-weight: 700; letter-spacing: -.01em; } .sa-kpi-val small { font-size: 11px; color: var(--muted); }
.sa-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.sa-col-principale, .sa-col-laterale { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.sa-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 24px rgba(20,40,80,.06); overflow: hidden; }
.sa-card-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fafbfd, #fff); }
.sa-card-head h2 { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #0f1d32; margin: 0; }
.sa-form { padding-bottom: 18px; } .sa-form .form-label { font-size: 12.5px; font-weight: 600; color: #3d4a5c; } .sa-form > label, .sa-form > .input-group, .sa-form > input, .sa-form > select, .sa-form > .form-check, .sa-form > button, .sa-form > p { margin-left: 18px; margin-right: 18px; }
.sa-form > .input-group, .sa-form > input.form-control, .sa-form > select { width: calc(100% - 36px); }
.sa-form > .sa-card-head { margin-bottom: 14px; }
.sa-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #f6f8fb; white-space: nowrap; padding: 10px 12px; }
.sa-table td { padding: 10px 12px; font-size: 13px; vertical-align: middle; }
.sa-client { text-decoration: none; color: var(--ink); } .sa-client strong { display: block; } .sa-client small { color: var(--muted); font-size: 11.5px; } .sa-client:hover strong { color: var(--accent); }
.sa-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #eef4fc; color: #1958b8; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sa-muted { color: var(--muted); font-size: 12px; }
.sa-gerer { background: #f7f9fd !important; padding: 12px 16px !important; }
.sa-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; }
.sa-plan { padding: 18px; border-right: 1px solid var(--line); } .sa-plan:last-child { border-right: 0; }
.sa-plan-nom { font-weight: 700; font-size: 14px; } .sa-plan-prix { font-size: 20px; font-weight: 800; color: var(--accent); margin: 4px 0 10px; letter-spacing: -.01em; } .sa-plan-prix small { font-size: 11px; color: var(--muted); font-weight: 500; }
.sa-plan-liste { list-style: none; padding: 0; margin: 0 0 10px; font-size: 12.5px; } .sa-plan-liste li { display: flex; gap: 8px; align-items: center; padding: 3px 0; } .sa-plan-liste i { color: var(--accent); }
.sa-plan-modules { display: flex; flex-wrap: wrap; gap: 4px; } .sa-plan-modules span { font-size: 10.5px; background: #f1f4f9; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: #3d4a5c; }
.sa-journal { list-style: none; margin: 0; padding: 6px 0; } .sa-journal li { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; padding: 8px 18px; font-size: 12.5px; border-bottom: 1px dashed var(--line); } .sa-journal li:last-child { border-bottom: 0; }
.sa-j-date { color: var(--muted); font-variant-numeric: tabular-nums; } .sa-j-acteur { color: var(--muted); font-size: 11px; }
.sa-foot { text-align: center; font-size: 12px; color: var(--muted); padding: 18px; } .sa-foot a { color: var(--muted); }
@media (max-width: 1100px) { .sa-grid { grid-template-columns: 1fr; } }
