/* =====================================================================
   GOULAA CLIENT — système d'interface (espace client & super-admin)
   Palette : /assets/theme.css
   Typographie : Montserrat
   ===================================================================== */
:root {


  /* Couleurs et séries de graphiques définies dans /assets/theme.css. */
    
  --radius:12px; --radius-sm:8px; --radius-lg:18px;


  --sidebar:240px;
  --font:'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing:border-box; }
html, body { margin:0; height:100%; }
body { font-family:var(--font); color:var(--ink); background:var(--mist); font-size:13.5px; line-height:1.5; -webkit-font-smoothing:antialiased; }
a { color:var(--teal-700); text-decoration:none; }
a:hover { text-decoration:underline; }
h1, h2, h3, h4 { margin:0; font-weight:700; letter-spacing:-.01em; color:var(--navy); }
h1 { font-size:21px; } h2 { font-size:16px; } h3 { font-size:14px; } h4 { font-size:12.5px; }
p { margin:0 0 8px; }
button, input, select, textarea { font:inherit; color:inherit; }
.muted { color:var(--muted); }
.small { font-size:12px; }
.mono { font-family:ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size:12px; }
.hidden { display:none !important; }
.nowrap { white-space:nowrap; }
.num { font-variant-numeric:tabular-nums; }
.row { display:flex; align-items:center; gap:12px; }
.row.wrap { flex-wrap:wrap; }
.row.between { justify-content:space-between; }
.stack { display:flex; flex-direction:column; gap:12px; }
.grow { flex:1; min-width:0; }
.grid { display:grid; gap:16px; }
.g2 { grid-template-columns:repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns:repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns:repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns:minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .g4 { grid-template-columns:repeat(2, minmax(0, 1fr)); } .g-2-1, .g3 { grid-template-columns:1fr; } }
@media (max-width: 640px) { .g2, .g4 { grid-template-columns:1fr; } }

/* ---------- Boutons ---------- */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; height:36px; padding:0 14px; border-radius:var(--radius-sm); border:1px solid transparent; font-weight:600; font-size:13px; cursor:pointer; transition:background .15s, border-color .15s, box-shadow .15s, transform .05s; white-space:nowrap; text-decoration:none !important; }
.btn:active { transform:translateY(1px); }
.btn:focus-visible { outline:none; box-shadow:0 0 0 3px color-mix(in srgb,var(--shadow-color) 35%,transparent); }
.btn svg { width:16px; height:16px; }
.btn-primary { background:var(--teal); color:var(--navy); }
.btn-primary:hover { background:var(--accent); }
.btn-dark { background:var(--contrast-surface); color:var(--on-contrast); }
.btn-dark:hover { background:var(--navy-700); }
.btn-ghost { background:var(--surface); color:var(--navy); border-color:var(--line-strong); }
.btn-ghost:hover { border-color:var(--navy); }
.btn-soft { background:var(--teal-50); color:var(--teal-700); }
.btn-soft:hover { background:var(--teal-100); }
.btn-danger { background:var(--surface); color:var(--danger); border-color:var(--danger-line); }
.btn-danger:hover { background:var(--danger-bg); }
.btn-sm { height:30px; padding:0 10px; font-size:12px; }
.btn-lg { height:42px; padding:0 20px; font-size:14px; border-radius:9px; }
.btn-icon { width:34px; padding:0; }
.btn[disabled] { opacity:.5; cursor:not-allowed; }
.btn.loading { position:relative; color:transparent !important; pointer-events:none; }
.btn.loading::after { content:''; position:absolute; width:16px; height:16px; border:2px solid var(--navy); border-right-color:transparent; border-radius:50%; animation:spin .7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ---------- Formulaires ---------- */
.field { display:flex; flex-direction:column; gap:6px; }
.field > label, .label { font-size:12.5px; font-weight:600; color:var(--ink-2); }
.input, .select, .textarea { width:100%; height:38px; border:1px solid var(--line-strong); background:var(--surface); border-radius:var(--radius-sm); padding:0 12px; outline:none; transition:border-color .15s, box-shadow .15s; }
.textarea { height:auto; min-height:110px; padding:10px 12px; resize:vertical; line-height:1.55; }
.input:focus, .select:focus, .textarea:focus { border-color:var(--teal); box-shadow:0 0 0 3px color-mix(in srgb,var(--shadow-color) 18%,transparent); }
.hint { font-size:12px; color:var(--muted); }
.form-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px; }
.form-grid .full { grid-column:1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns:1fr; } }

/* interrupteur */
.switch { position:relative; display:inline-flex; width:42px; height:24px; flex:none; cursor:pointer; }
.switch input { opacity:0; width:0; height:0; position:absolute; }
.switch span { position:absolute; inset:0; background:var(--line-strong); border-radius:99px; transition:background .2s; }
.switch span::after { content:''; position:absolute; top:3px; left:3px; width:18px; height:18px; background:var(--surface); border-radius:50%; box-shadow:0 1px 3px color-mix(in srgb,var(--shadow-color) 20%,transparent); transition:transform .2s; }
.switch input:checked + span { background:var(--teal); }
.switch input:checked + span::after { transform:translateX(18px); }
.switch input:focus-visible + span { box-shadow:0 0 0 3px color-mix(in srgb,var(--shadow-color) 35%,transparent); }

/* ---------- Cartes ---------- */
.card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow-sm); }
.card-pad { padding:20px; }
.card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 18px; border-bottom:1px solid var(--line); }
.card-head h2, .card-head h3 { font-size:14px; }
.card-body { padding:18px; }
.card-foot { padding:12px 20px; border-top:1px solid var(--line); background:var(--surface); border-radius:0 0 var(--radius) var(--radius); }

.kpi { padding:16px 18px; display:flex; flex-direction:column; gap:6px; }
.kpi .kpi-label { font-size:12.5px; color:var(--muted); font-weight:600; display:flex; align-items:center; gap:8px; }
.kpi .kpi-label svg { width:16px; height:16px; color:var(--teal-700); }
.kpi .kpi-value { font-size:24px; font-weight:700; color:var(--navy); line-height:1.1; font-variant-numeric:tabular-nums; }
.kpi .kpi-sub { font-size:12px; color:var(--muted); }

/* ---------- Badges / pastilles ---------- */
.badge { display:inline-flex; align-items:center; gap:6px; height:22px; padding:0 9px; border-radius:99px; font-size:12px; font-weight:600; background:var(--mist); color:var(--ink-2); white-space:nowrap; }
.badge::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.9; }
.badge.plain::before { display:none; }
.badge.ok { background:var(--success-bg); color:var(--success); }
.badge.warn { background:var(--warning-bg); color:var(--warning); }
.badge.bad { background:var(--danger-bg); color:var(--danger); }
.badge.info { background:var(--info-bg); color:var(--info); }
.badge.teal { background:var(--teal-50); color:var(--teal-700); }
.badge.navy { background:var(--contrast-surface); color:var(--on-contrast); }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x:auto; }
table.table { width:100%; border-collapse:collapse; font-size:13px; }
.table th { text-align:left; font-size:12px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color:var(--muted); padding:10px 16px; border-bottom:1px solid var(--line); background:var(--surface); white-space:nowrap; }
.table td { padding:12px 16px; border-bottom:1px solid var(--line); vertical-align:middle; }
.table tr:last-child td { border-bottom:0; }
.table tbody tr:hover td { background:var(--surface); }
.table tr.clickable { cursor:pointer; }
.empty { padding:40px 20px; text-align:center; color:var(--muted); }
.empty svg { width:36px; height:36px; color:var(--line-strong); margin-bottom:8px; }

/* ---------- Onglets ---------- */
.tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin-bottom:20px; overflow-x:auto; }
.tab { padding:10px 14px; font-weight:600; font-size:13.5px; color:var(--muted); border:0; background:none; border-bottom:2px solid transparent; cursor:pointer; white-space:nowrap; margin-bottom:-1px; }
.tab:hover { color:var(--navy); }
.tab.active { color:var(--navy); border-bottom-color:var(--teal); }
.seg { display:inline-flex; background:var(--mist); border:1px solid var(--line); border-radius:10px; padding:3px; gap:2px; }
.seg button { border:0; background:none; padding:6px 12px; border-radius:7px; font-weight:600; font-size:12.5px; color:var(--muted); cursor:pointer; }
.seg button.active { background:var(--surface); color:var(--navy); box-shadow:var(--shadow-sm); }

/* ---------- Mise en page applicative ---------- */
.shell { display:grid; grid-template-columns:var(--sidebar) minmax(0, 1fr); min-height:100vh; }
.sidebar { background:var(--navy); color:var(--muted); display:flex; flex-direction:column; position:sticky; top:0; height:100vh; }
.sidebar .brand { padding:20px 20px 16px; display:flex; align-items:center; gap:10px; }
.sidebar .brand img { height:34px; }
.sidebar .brand .wordmark { font-weight:800; color:var(--on-contrast); font-size:15px; letter-spacing:.02em; line-height:1.05; }
.sidebar .brand .wordmark b { color:var(--teal); font-weight:800; }
.sidebar .brand .wordmark small { display:block; font-weight:500; font-size:12px; color:var(--muted); letter-spacing:.02em; margin-top:3px; }
.nav { padding:8px 12px; display:flex; flex-direction:column; gap:2px; overflow-y:auto; flex:1; }
.nav .nav-section { font-size:12px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); font-weight:700; padding:14px 10px 6px; }
.nav a { display:flex; align-items:center; gap:11px; padding:8px 12px; border-radius:8px; color:var(--muted); font-weight:500; font-size:13px; text-decoration:none; position:relative; }
.nav a span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nav a svg { width:17px; height:17px; flex:none; opacity:.85; }
.nav a:hover { background:color-mix(in srgb,var(--surface) 6%,transparent); color:var(--on-contrast); }
.nav a.active { background:color-mix(in srgb,var(--accent) 14%,transparent); color:var(--on-contrast); font-weight:600; }
.nav a.active::before { content:''; position:absolute; left:-12px; top:8px; bottom:8px; width:3px; border-radius:0 3px 3px 0; background:var(--teal); }
.nav a.active svg { color:var(--teal); opacity:1; }
.nav .count { margin-left:auto; background:var(--teal); color:var(--navy); font-size:12px; font-weight:700; border-radius:99px; padding:1px 7px; }
.sidebar-foot { padding:14px; border-top:1px solid color-mix(in srgb,var(--on-contrast) 8%,transparent); }
.plan-box { background:color-mix(in srgb,var(--surface) 5%,transparent); border-radius:10px; padding:12px; font-size:12px; }
.plan-box b { color:var(--on-contrast); }
.meter { height:6px; border-radius:99px; background:color-mix(in srgb,var(--contrast-surface) 10%,transparent); overflow:hidden; }
.meter > i { display:block; height:100%; background:var(--teal); border-radius:99px; }
.sidebar .meter { background:color-mix(in srgb,var(--surface) 12%,transparent); margin-top:8px; }

.main { min-width:0; display:flex; flex-direction:column; }
.topbar { height:58px; background:var(--surface); border-bottom:1px solid var(--line); display:flex; align-items:center; gap:16px; padding:0 28px; position:sticky; top:0; z-index:20; }
.topbar .crumb { font-weight:700; font-size:15px; color:var(--navy); }
.topbar .spacer { flex:1; }
.avatar { width:34px; height:34px; border-radius:50%; background:var(--contrast-surface); color:var(--on-contrast); display:grid; place-items:center; font-weight:700; font-size:12.5px; flex:none; }
.avatar.teal { background:var(--teal-50); color:var(--teal-700); }
.content { padding:24px 26px; max-width:1440px; width:100%; }
.page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:22px; flex-wrap:wrap; }
.page-head .eyebrow { font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--teal-700); margin-bottom:4px; }
.page-head p { color:var(--muted); margin:4px 0 0; max-width:680px; }
.menu-btn { display:none; }
@media (max-width: 960px) {
  .shell { grid-template-columns:1fr; }
  .sidebar { position:fixed; left:0; top:0; bottom:0; width:270px; z-index:50; transform:translateX(-100%); transition:transform .2s; }
  .shell.nav-open .sidebar { transform:none; box-shadow:var(--shadow-lg); }
  .menu-btn { display:inline-flex; }
  .content { padding:18px 16px; }
  .topbar { padding:0 16px; }
}

/* ---------- Toast / modale / tiroir ---------- */
.toasts { position:fixed; right:20px; bottom:20px; display:flex; flex-direction:column; gap:8px; z-index:200; }
.toast { background:var(--contrast-surface); color:var(--on-contrast); padding:12px 16px; border-radius:10px; box-shadow:var(--shadow-lg); font-size:13px; max-width:380px; display:flex; gap:10px; align-items:flex-start; animation:rise .2s ease-out; }
.toast.error { background:var(--danger); }
.toast.ok svg { color:var(--teal); }
.toast svg { width:18px; height:18px; flex:none; margin-top:1px; }
@keyframes rise { from { transform:translateY(8px); opacity:0; } }
.overlay { position:fixed; inset:0; background:color-mix(in srgb,var(--contrast-surface) 45%,transparent); z-index:100; display:grid; place-items:center; padding:20px; animation:fade .15s; }
@keyframes fade { from { opacity:0; } }
.modal { background:var(--surface); border-radius:16px; width:min(560px, 100%); max-height:calc(100vh - 40px); overflow:auto; box-shadow:var(--shadow-lg); }
.modal.wide { width:min(820px, 100%); }
.modal-head { padding:18px 22px; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; }
.modal-body { padding:22px; }
.modal-foot { padding:14px 22px; border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:10px; background:var(--surface); }
.drawer-overlay { place-items:stretch end; padding:0; }
.drawer { background:var(--mist); width:min(760px, 100%); height:100vh; overflow:auto; box-shadow:var(--shadow-lg); animation:slide .2s ease-out; }
@keyframes slide { from { transform:translateX(30px); opacity:.6; } }
.drawer-head { background:var(--surface); padding:20px 24px; border-bottom:1px solid var(--line); position:sticky; top:0; z-index:2; display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.drawer-body { padding:20px 24px; display:flex; flex-direction:column; gap:16px; }

/* ---------- Alertes ---------- */
.alert { display:flex; gap:12px; padding:12px 14px; border-radius:10px; font-size:13px; border:1px solid; }
.alert svg { width:18px; height:18px; flex:none; margin-top:1px; }
.alert.info { background:var(--info-bg); border-color:var(--info-line); color:var(--info); }
.alert.ok { background:var(--success-bg); border-color:var(--success-line); color:var(--success); }
.alert.warn { background:var(--warning-bg); border-color:var(--warning-line); color:var(--brown); }
.alert.bad { background:var(--danger-bg); border-color:var(--danger-line); color:var(--danger); }

/* ---------- Graphiques ---------- */
.chart { position:relative; }
.chart svg { display:block; width:100%; overflow:visible; }
.chart .axis { font-size:12px; fill:var(--muted); }
.chart .grid-line { stroke:var(--line); stroke-width:1; }
.legend { display:flex; gap:16px; flex-wrap:wrap; font-size:12px; color:var(--ink-2); }
.legend span { display:inline-flex; align-items:center; gap:6px; }
.legend i { width:10px; height:10px; border-radius:3px; display:inline-block; }
.tip { position:absolute; pointer-events:none; background:var(--contrast-surface); color:var(--on-contrast); padding:8px 10px; border-radius:8px; font-size:12px; box-shadow:var(--shadow); white-space:nowrap; z-index:5; transform:translate(-50%, calc(-100% - 10px)); }
.tip b { font-weight:700; }
.tip .tip-row { display:flex; align-items:center; gap:6px; }
.tip .tip-row i { width:8px; height:8px; border-radius:2px; }
.hbar { display:grid; grid-template-columns:minmax(90px, 160px) 1fr 44px; align-items:center; gap:10px; font-size:12.5px; padding:5px 0; }
.hbar .track { height:10px; background:var(--mist); border-radius:99px; overflow:hidden; }
.hbar .track i { display:block; height:100%; border-radius:99px; background:var(--s1); }
.hbar .v { text-align:right; font-weight:600; font-variant-numeric:tabular-nums; }
.gauge { position:relative; width:132px; height:132px; flex:none; }
.gauge svg { transform:rotate(-90deg); }
.gauge .gauge-v { position:absolute; inset:0; display:grid; place-items:center; text-align:center; }
.gauge .gauge-v b { font-size:30px; font-weight:800; color:var(--navy); line-height:1; }
.gauge .gauge-v small { font-size:12px; color:var(--muted); font-weight:600; display:block; margin-top:4px; }

/* ---------- Listes de contrôle ---------- */
.check { display:flex; align-items:center; gap:10px; padding:7px 0; font-size:13px; }
.check .dot { width:20px; height:20px; border-radius:50%; display:grid; place-items:center; flex:none; background:var(--mist); border:1.5px solid var(--line-strong); }
.check .dot svg { width:12px; height:12px; }
.check.done .dot { background:var(--teal); border-color:var(--teal); color:var(--navy); }
.check .w { margin-left:auto; font-size:12px; color:var(--muted); font-weight:600; }

.skeleton { background:var(--surface-alt); background-size:200% 100%; animation:shimmer 1.2s infinite; border-radius:8px; min-height:16px; }
@keyframes shimmer { to { background-position:-200% 0; } }

/* ---------- Écrans d'authentification ---------- */
.auth { min-height:100vh; display:grid; grid-template-columns:minmax(0, 1.05fr) minmax(0, 1fr); background:var(--surface); }
.auth-side { background:var(--surface-alt); color:var(--info); padding:48px 56px; display:flex; flex-direction:column; justify-content:space-between; position:relative; overflow:hidden; }
.auth-side h2 { color:var(--on-contrast); font-size:24px; line-height:1.2; font-weight:800; max-width:460px; }
.auth-side h2 em { font-style:normal; color:var(--teal); }
.auth-side .glow { position:absolute; right:-80px; bottom:-40px; width:460px; opacity:.55; pointer-events:none; }
.auth-points { display:flex; flex-direction:column; gap:14px; margin-top:28px; position:relative; }
.auth-points div { display:flex; gap:12px; align-items:flex-start; font-size:14px; max-width:420px; }
.auth-points svg { width:20px; height:20px; color:var(--teal); flex:none; margin-top:1px; }
.auth-main { display:grid; place-items:center; padding:40px 24px; }
.auth-card { width:min(400px, 100%); }
.auth-card h1 { font-size:22px; margin-bottom:6px; }
.steps { display:flex; gap:6px; margin-bottom:22px; }
.steps i { height:4px; flex:1; border-radius:99px; background:var(--line); }
.steps i.on { background:var(--teal); }
@media (max-width: 900px) { .auth { grid-template-columns:1fr; } .auth-side { display:none; } }

/* ---------- Erreurs de champ (pointées sur le champ concerné) ---------- */
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea { border-color:var(--danger); box-shadow:0 0 0 3px color-mix(in srgb,var(--shadow-color) 12%,transparent); }
.field-error { display:flex; align-items:flex-start; gap:6px; font-size:12px; font-weight:500; color:var(--danger); margin-top:2px; animation:rise .18s ease-out; }
.field-error::before { content:'!'; flex:none; width:14px; height:14px; border-radius:50%; background:var(--danger); color:var(--on-contrast); font-size:12px; font-weight:800; display:grid; place-items:center; margin-top:1px; }
.is-invalid { animation:shake .32s ease-in-out; }
@keyframes shake { 20%, 60% { transform:translateX(-4px); } 40%, 80% { transform:translateX(4px); } }
.check-line { display:flex; flex-direction:column; gap:4px; }
.check-line label { display:flex; align-items:flex-start; gap:10px; font-size:12.5px; color:var(--ink-2); cursor:pointer; line-height:1.45; }
.check-line input[type=checkbox] { appearance:none; -webkit-appearance:none; flex:none; width:18px; height:18px; margin:1px 0 0; border:1.5px solid var(--line-strong); border-radius:5px; background:var(--surface); cursor:pointer; display:grid; place-items:center; transition:background .15s, border-color .15s, box-shadow .15s; }
.check-line input[type=checkbox]::after { content:''; width:9px; height:5px; border:2px solid var(--navy); border-top:0; border-right:0; transform:rotate(-45deg) scale(0); transition:transform .15s; margin-top:-2px; }
.check-line input[type=checkbox]:checked { background:var(--teal); border-color:var(--teal); }
.check-line input[type=checkbox]:checked::after { transform:rotate(-45deg) scale(1); }
.check-line input[type=checkbox]:focus-visible { box-shadow:0 0 0 3px color-mix(in srgb,var(--shadow-color) 30%,transparent); }
.check-line.is-invalid input[type=checkbox] { border-color:var(--danger); box-shadow:0 0 0 3px color-mix(in srgb,var(--shadow-color) 15%,transparent); }
.check-line .field-error { margin-left:28px; }
.pw-meter { display:flex; gap:4px; margin-top:2px; }
.pw-meter i { flex:1; height:3px; border-radius:99px; background:var(--line); transition:background .2s; }
.pw-meter[data-s="1"] i:nth-child(-n+1) { background:var(--danger); }
.pw-meter[data-s="2"] i:nth-child(-n+2) { background:var(--warning); }
.pw-meter[data-s="3"] i:nth-child(-n+3) { background:var(--teal); }
.pw-meter[data-s="4"] i { background:var(--success); }
.field.is-invalid .hint { display:none; }
@media (min-width: 901px) { .auth-card > a:first-child { display:none; } }

/* ---------- Finitions & animations de l'application ---------- */
.row > svg { width:18px; height:18px; flex:none; }
.sidebar .brand .wordmark { font-size:14px; white-space:nowrap; }
.sidebar .brand img { height:30px; }
.gauge { width:112px; height:112px; }
.gauge svg { width:100%; height:100%; }
.gauge .gauge-v b { font-size:26px; }
#page > * { animation:pageIn .4s cubic-bezier(.2, .7, .2, 1) both; }
#page > *:nth-child(2) { animation-delay:.04s; } #page > *:nth-child(3) { animation-delay:.08s; } #page > *:nth-child(4) { animation-delay:.12s; } #page > *:nth-child(5) { animation-delay:.16s; }
.grid > .card { animation:pageIn .45s cubic-bezier(.2, .7, .2, 1) both; }
.grid > .card:nth-child(2) { animation-delay:.05s; } .grid > .card:nth-child(3) { animation-delay:.1s; } .grid > .card:nth-child(4) { animation-delay:.15s; }
@keyframes pageIn { from { opacity:0; transform:translateY(8px); } }
.card { transition:box-shadow .2s, border-color .2s; }
.card.kpi:hover, .plan-card:hover { border-color:var(--line-strong); box-shadow:var(--shadow); }
.chart svg path, .chart svg rect:not([data-i]) { transform-box:fill-box; transform-origin:bottom; animation:barGrow .7s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes barGrow { from { transform:scaleY(0); } }
.gauge svg circle:last-of-type { transition:stroke-dasharray 1s cubic-bezier(.2, .7, .2, 1); }
.meter > i { transition:width .8s cubic-bezier(.2, .7, .2, 1); }
.nav a { transition:background .15s, color .15s; }
.btn-primary:hover { box-shadow:0 4px 14px -6px color-mix(in srgb,var(--shadow-color) 80%,transparent); }
.bubble { animation:pageIn .25s ease-out both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation:none !important; transition:none !important; } }

/* ---------- Cloche de notifications ---------- */
.bell-wrap { position:relative; }
.bell-btn { position:relative; width:36px; height:36px; border-radius:9px; border:1px solid var(--line); background:var(--surface); display:grid; place-items:center; cursor:pointer; color:var(--navy); transition:border-color .15s, background .15s; }
.bell-btn:hover { border-color:var(--line-strong); background:var(--mist); }
.bell-btn svg { width:18px; height:18px; }
.bell-btn.ring svg { animation:ring .9s cubic-bezier(.36, .07, .19, .97); transform-origin:50% 2px; }
@keyframes ring { 0% { transform:rotate(0); } 15% { transform:rotate(16deg); } 30% { transform:rotate(-14deg); } 45% { transform:rotate(10deg); } 60% { transform:rotate(-6deg); } 75% { transform:rotate(3deg); } 100% { transform:rotate(0); } }
.bell-count { position:absolute; top:-5px; right:-5px; min-width:18px; height:18px; padding:0 5px; border-radius:99px; background:var(--danger); color:var(--on-contrast); font-size:12px; font-weight:700; display:grid; place-items:center; box-shadow:0 0 0 2px var(--shadow-color); animation:pop .25s cubic-bezier(.2, .7, .2, 1.4); }
.bell-count[hidden] { display:none; }
@keyframes pop { from { transform:scale(.4); } }
.bell-panel { position:absolute; right:0; top:calc(100% + 8px); width:min(380px, calc(100vw - 24px)); background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow-lg); z-index:60; overflow:hidden; animation:pageIn .18s ease-out; }
.bell-head, .bell-foot { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; }
.bell-head { border-bottom:1px solid var(--line); }
.bell-foot { border-top:1px solid var(--line); background:var(--surface); }
.bell-list { max-height:380px; overflow-y:auto; }
.bell-item { display:flex; gap:10px; width:100%; text-align:left; padding:11px 14px; border:0; border-bottom:1px solid var(--line); background:var(--surface); cursor:pointer; font:inherit; }
.bell-item:hover { background:var(--mist); }
.bell-item.unread { background:var(--surface-alt); }
.bell-item.unread b::after { content:''; display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--teal); margin-left:6px; vertical-align:middle; }
.bell-ico { width:28px; height:28px; border-radius:8px; display:grid; place-items:center; flex:none; background:var(--mist); color:var(--ink-2); }
.bell-ico svg { width:15px; height:15px; }
.sev-danger .bell-ico { background:var(--danger-bg); color:var(--danger); }
.sev-warning .bell-ico { background:var(--warning-bg); color:var(--warning); }
.sev-success .bell-ico { background:var(--success-bg); color:var(--success); }
.sev-info .bell-ico { background:var(--teal-50); color:var(--teal-700); }
.bell-txt { display:flex; flex-direction:column; gap:1px; min-width:0; font-size:12.5px; }
.bell-txt b { font-size:12.5px; color:var(--navy); }
.bell-txt span { color:var(--ink-2); overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.bell-txt time { font-size:12px; color:var(--muted); }
.link-btn { border:0; background:none; color:var(--teal-700); font:inherit; font-size:12px; font-weight:600; cursor:pointer; display:inline-flex; align-items:center; gap:6px; padding:0; }
.link-btn svg { width:14px; height:14px; }
.link-btn:hover { text-decoration:underline; }

/* ---------- Réglages notifications & support ---------- */
.set-row { display:flex; align-items:center; gap:14px; padding:13px 0; border-bottom:1px solid var(--line); }
.set-row:last-child { border-bottom:0; }
.set-row .grow b { display:block; font-size:13.5px; }
.set-row .grow span { font-size:12.5px; color:var(--muted); }
.range { width:140px; accent-color:var(--teal); }
.contact-cards { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:12px; }
.contact-card { display:flex; gap:12px; align-items:center; padding:14px; border:1px solid var(--line); border-radius:12px; background:var(--surface); text-decoration:none !important; color:var(--ink); transition:border-color .15s, transform .15s; }
.contact-card:hover { border-color:var(--teal); transform:translateY(-1px); }
.contact-card .ci { width:36px; height:36px; border-radius:10px; background:var(--teal-50); color:var(--teal-700); display:grid; place-items:center; flex:none; }
.contact-card .ci svg { width:18px; height:18px; }
.contact-card small { display:block; color:var(--muted); font-size:12px; }
.contact-card b { font-size:13px; word-break:break-word; }
@media (max-width: 1100px) { .contact-cards { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
.thread-box { display:flex; flex-direction:column; gap:10px; max-height:50vh; overflow-y:auto; padding:4px; }
.tmsg { max-width:85%; padding:10px 12px; border-radius:12px; font-size:13px; white-space:pre-wrap; }
.tmsg.user { align-self:flex-end; background:var(--teal-50); border:1px solid var(--teal-100); border-top-right-radius:4px; }
.tmsg.admin { align-self:flex-start; background:var(--surface); border:1px solid var(--line); border-top-left-radius:4px; }
.tmsg .by { font-size:12px; font-weight:700; color:var(--muted); margin-bottom:3px; display:flex; justify-content:space-between; gap:10px; }
.card-head h2 svg, .card-head h3 svg { width:17px; height:17px; vertical-align:-3px; margin-right:6px; color:var(--teal-700); }

/* Barre de chargement (haut de page) */
.top-progress { position:fixed; top:0; left:0; height:3px; width:0; background:var(--surface-alt); z-index:9999; box-shadow:0 0 8px color-mix(in srgb,var(--shadow-color) 60%,transparent); opacity:0; pointer-events:none; }
.top-progress.run { opacity:1; width:85%; transition:width 2.5s cubic-bezier(.08, .8, .2, 1), opacity .1s; }
.top-progress.done { opacity:0; width:100%; transition:width .2s ease, opacity .35s ease .15s; }

/* ===== États de chargement ===== */
.btn-spin { display:inline-block; width:15px; height:15px; flex:none; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:spin .7s linear infinite; vertical-align:-3px; }
.btn.is-busy { opacity:.72; filter:saturate(.55); cursor:progress; pointer-events:none; gap:8px; }
.btn.is-busy .btn-spin + span { white-space:nowrap; }
.is-loading { position:relative; pointer-events:none; }
.is-loading::before { content:''; position:absolute; inset:0; background:color-mix(in srgb,var(--surface) 60%,transparent); z-index:4; border-radius:inherit; animation:fadeIn .15s ease both; }
.is-loading::after { content:''; position:absolute; top:50%; right:16px; width:16px; height:16px; margin-top:-8px; border:2px solid var(--teal); border-right-color:transparent; border-radius:50%; animation:spin .7s linear infinite; z-index:5; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.screen-loader { position:fixed; inset:0; z-index:10000; background:color-mix(in srgb,var(--contrast-surface) 92%,transparent); backdrop-filter:blur(6px); display:grid; place-items:center; opacity:0; transition:opacity .2s ease; }
.screen-loader.on { opacity:1; }
.sl-box { width:min(420px, 82vw); text-align:center; color:var(--on-contrast); }
.sl-box img { width:64px; height:64px; margin-bottom:18px; filter:drop-shadow(0 8px 24px color-mix(in srgb,var(--accent) 45%,transparent)); animation:slPulse 1.4s ease-in-out infinite; }
.sl-text { font-weight:700; font-size:17px; letter-spacing:.01em; margin-bottom:18px; }
.sl-bar { height:8px; border-radius:99px; background:color-mix(in srgb,var(--surface) 14%,transparent); overflow:hidden; }
.sl-bar i { display:block; height:100%; width:40%; border-radius:99px; background:var(--surface-alt); animation:slMove 1.1s cubic-bezier(.45, .05, .55, .95) infinite; }
@keyframes slMove { 0% { transform:translateX(-110%); } 100% { transform:translateX(260%); } }
@keyframes slPulse { 0%, 100% { transform:scale(1); } 50% { transform:scale(1.07); } }
.bell-loading { display:inline-flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); }
.bell-loading .btn-spin { width:13px; height:13px; color:var(--teal); }
.bell-skel { display:flex; gap:10px; padding:12px 14px; border-bottom:1px solid var(--line); }
.bell-skel i { width:30px; height:30px; border-radius:50%; flex:none; }
.bell-skel div { flex:1; display:flex; flex-direction:column; gap:6px; }
.bell-skel b { height:11px; width:70%; border-radius:6px; } .bell-skel span { height:9px; width:90%; border-radius:6px; }
.bell-skel i, .bell-skel b, .bell-skel span { background:var(--surface-alt); background-size:200% 100%; animation:shimmer 1.2s linear infinite; }
@keyframes shimmer { from { background-position:200% 0; } to { background-position:-200% 0; } }
.top-progress { height:3px !important; }

/* Mot de passe : afficher / masquer */
.pw-wrap { position:relative; display:block; width:100%; }
.pw-wrap > .input { padding-right:44px; }
.pw-eye { position:absolute; right:4px; top:50%; transform:translateY(-50%); width:34px; height:30px; border:0; background:transparent; color:var(--muted); border-radius:8px; display:grid; place-items:center; cursor:pointer; }
.pw-eye:hover { color:var(--navy); background:color-mix(in srgb,var(--contrast-surface) 6%,transparent); }
.pw-eye:focus-visible { outline:2px solid var(--teal); outline-offset:1px; }
.pw-eye svg { width:18px; height:18px; }
.pw-wrap > .input::-ms-reveal { display:none; }

/* Vérification anti-robot */
.captcha-row { display:flex; gap:8px; align-items:center; }
.captcha-img { flex:none; width:150px; height:54px; border:1px solid var(--line-strong); border-radius:var(--radius-sm); overflow:hidden; background:var(--surface-alt); display:grid; place-items:center; transition:opacity .15s; }
.captcha-img svg { width:100%; height:100%; display:block; }
.captcha-img.loading { opacity:.45; }
.captcha-load { width:18px; height:18px; border-radius:50%; border:2px solid color-mix(in srgb,var(--info) 20%,transparent); border-top-color:var(--teal); animation:spin .7s linear infinite; }
.captcha-new { flex:none; width:40px; height:40px; padding:0; display:grid; place-items:center; }
.captcha-input { flex:1; min-width:0; height:44px; font-size:17px; letter-spacing:.12em; text-transform:uppercase; font-weight:700; }
.captcha-input::placeholder { letter-spacing:normal; text-transform:none; font-weight:500; }
.hp-field { position:absolute !important; left:-9999px !important; width:1px; height:1px; opacity:0; pointer-events:none; }
.captcha-field { position:relative; }

/* =====================================================================
   COUCHE « DASHBOARD » — interfaces de gestion uniquement
   (espace client + super-admin ; le site public utilise site/css/site.css et n'est pas concerné)
   Échelle d'espacement : 4 · 8 · 12 · 16 · 20 · 24 · 32 px
   ===================================================================== */
:root {
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:20px; --sp-6:24px; --sp-7:32px;
  --sidebar:232px; --sidebar-mini:64px; --topbar:56px;
  --fs-page:22px; --fs-section:16px; --fs-body:14px; --fs-label:13px; --fs-meta:12px; --fs-kpi:26px;
  --h-control:38px; --h-btn:36px; --h-btn-sm:32px; --h-row:46px;
  --radius:12px; --radius-sm:8px; --radius-lg:12px;
  
  --fw-title:700; --fw-ui:500; --fw-text:400;
}
body { font-size:var(--fs-body); line-height:1.55; }
h1 { font-size:var(--fs-page); font-weight:var(--fw-title); }
h2 { font-size:var(--fs-section); }
h3 { font-size:14px; }
.small, .hint { font-size:var(--fs-meta); }

/* Boutons et champs : hauteurs homogènes, Montserrat Medium */
.btn { height:var(--h-btn); font-weight:var(--fw-ui); font-size:var(--fs-label); padding:0 var(--sp-4); }
.btn-sm { height:var(--h-btn-sm); font-size:var(--fs-meta); padding:0 var(--sp-3); }
.btn-lg { height:40px; font-size:14px; border-radius:var(--radius-sm); }
.btn-icon { width:var(--h-btn); padding:0; }
.btn-sm.btn-icon { width:var(--h-btn-sm); }
.btn-ghost { color:var(--navy); border-color:var(--navy); }
.btn-ghost:hover { background:var(--mist); }
.input, .select { height:var(--h-control); font-size:var(--fs-body); }
.textarea { font-size:var(--fs-body); }
.field > label, .label { font-size:var(--fs-label); font-weight:var(--fw-ui); color:var(--ink-2); }
.form-grid { gap:var(--sp-4); }
.stack { gap:var(--sp-3); }
.grid { gap:var(--sp-4); }

/* Focus clavier toujours visible */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, summary:focus-visible { outline:2px solid var(--teal); outline-offset:2px; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline:none; }

/* Cartes, tableaux, indicateurs */
.card-pad { padding:var(--sp-5); }
.card-head { padding:var(--sp-3) var(--sp-4); min-height:52px; }
.card-head h2, .card-head h3 { font-size:15px; }
.card-body { padding:var(--sp-4); }
.kpi { padding:var(--sp-4); gap:var(--sp-1); height:100%; }
.kpi .kpi-label { font-size:var(--fs-label); font-weight:var(--fw-ui); }
.kpi .kpi-value { font-size:var(--fs-kpi); }
.table th { font-size:var(--fs-meta); padding:var(--sp-3) var(--sp-4); }
.table td { padding:0 var(--sp-4); height:var(--h-row); font-size:13.5px; }
.badge { font-size:var(--fs-meta); height:22px; }
.tab { font-size:var(--fs-label); font-weight:var(--fw-ui); padding:var(--sp-3) var(--sp-4); }
.tab.active { font-weight:600; }
.seg button { font-size:var(--fs-meta); font-weight:var(--fw-ui); }
.empty { padding:var(--sp-7) var(--sp-5); }

/* Coquille : navigation 232 px, barre supérieure 56 px, marges 24 px */
.sidebar .brand { padding:var(--sp-4) var(--sp-4) var(--sp-3); }
.sidebar .brand img { height:30px; }
.nav { padding:var(--sp-2) var(--sp-3); }
.nav .nav-section { font-size:var(--fs-meta); letter-spacing:.06em; padding:var(--sp-3) var(--sp-3) var(--sp-1); }
.nav a { font-size:var(--fs-label); font-weight:var(--fw-ui); padding:var(--sp-2) var(--sp-3); min-height:36px; }
.nav a svg { width:18px; height:18px; }
.nav a.active { background:color-mix(in srgb,var(--accent) 16%,transparent); }
.topbar { height:var(--topbar); padding:0 var(--sp-6); gap:var(--sp-3); }
.topbar .crumb { font-size:15px; }
.avatar { width:32px; height:32px; }
.content { padding:var(--sp-6); max-width:1600px; }
.page-head { margin-bottom:var(--sp-5); align-items:center; }
.page-head h1 { font-size:var(--fs-page); }
.page-head p { font-size:var(--fs-label); }
.modal-head { padding:var(--sp-4) var(--sp-5); }
.modal-body { padding:var(--sp-5); }
.modal-foot { padding:var(--sp-3) var(--sp-5); }

/* Sobriété : pas de dégradés ni de halos décoratifs dans les interfaces de gestion */
.onboard { background:var(--navy); border-radius:var(--radius); padding:var(--sp-5); margin-bottom:var(--sp-5); }
.onboard::after { display:none; }
.onboard h2 { font-size:17px; }

/* Écrans tactiles : zones d'interaction confortables */
@media (pointer: coarse) {
  .btn, .input, .select { min-height:44px; }
  .nav a { min-height:44px; }
}
@media (max-width: 960px) {
  .content { padding:var(--sp-4); }
  .topbar { padding:0 var(--sp-4); }
}

/* Codes de validation accessibles, un chiffre par case. */
.otp-cases { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; width:min(100%,340px); }
.otp-cases .otp-digit { min-width:0; width:100%; height:54px; padding:0; border-radius:12px; text-align:center; font-size:23px; font-weight:700; font-variant-numeric:tabular-nums; caret-color:var(--teal); }
.otp-cases .otp-digit:focus { border-color:var(--teal); box-shadow:0 0 0 3px color-mix(in srgb,var(--shadow-color) 14.12%,transparent); }
.is-invalid .otp-digit { border-color:var(--danger); }
@media(max-width:380px) { .otp-cases { gap:5px; } .otp-cases .otp-digit { height:46px; font-size:20px; } }
