/* =====================================================================
   Aloes System - charte graphique et interactions
   Bleu #1A4D8F · Turquoise #1FA9A4 · Plus Jakarta Sans
   ===================================================================== */
:root {
  --bleu: #1a4d8f;
  --bleu-700: #153f76;
  --bleu-900: #0f2f5a;
  --bleu-50: #eef4fb;
  --turquoise: #1fa9a4;
  --turquoise-700: #137a76;
  --turquoise-50: #e8f7f6;
  --violet: #6c5ce7;
  --violet-50: #f0eefe;
  --vert: #1e9e63;
  --vert-50: #e7f6ee;
  --ambre: #c98a0c;
  --ambre-50: #fdf4e1;
  --rouge: #c8412f;
  --rouge-50: #fdecea;
  --encre: #13233a;
  --texte: #3b4a5e;
  --muted: #6b7a8f;
  --bord: #e2e8f0;
  --fond: #f4f7fa;
  --blanc: #ffffff;
  --rayon: 16px;
  --ombre: 0 1px 2px rgba(16, 38, 70, 0.05), 0 6px 20px rgba(16, 38, 70, 0.06);
  --ombre-haute: 0 2px 4px rgba(16, 38, 70, 0.06), 0 16px 40px rgba(16, 38, 70, 0.14);
  --degrade: linear-gradient(135deg, var(--bleu) 0%, var(--turquoise) 100%);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--texte);
  background: var(--fond);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--fond); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { color: var(--encre); margin: 0; letter-spacing: -0.01em; }
.muted { color: var(--muted); margin: 0; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.92em; }
.nowrap { white-space: nowrap; }
.bloc { display: block; }
.cache { display: none !important; }
button { font: inherit; }

/* ---------- Animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-5px); } 40%, 60% { transform: translateX(5px); } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes growX { from { transform: scaleX(0); } }
@keyframes shimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(-12px, 10px) rotate(8deg); } }

.page { animation: fadeUp 0.4s var(--ease) both; display: flex; flex-direction: column; gap: 22px; }
.stagger > * { animation: fadeUp 0.5s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: 0.05s; }
.stagger > *:nth-child(3) { animation-delay: 0.1s; }
.stagger > *:nth-child(4) { animation-delay: 0.15s; }
.stagger > *:nth-child(5) { animation-delay: 0.2s; }
.stagger > *:nth-child(6) { animation-delay: 0.25s; }
.stagger > *:nth-child(7) { animation-delay: 0.3s; }
.stagger > *:nth-child(n + 8) { animation-delay: 0.35s; }

/* Onde au clic (ajoutée par fx.js) */
.btn, .nav-item, .card.clickable, .icon-btn, .tab, .choice { position: relative; overflow: hidden; }
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: 0.18; transform: scale(0); animation: ripple 0.65s ease-out forwards;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border: 1.5px solid transparent; border-radius: 11px;
  font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; user-select: none;
  transition: transform 0.12s var(--ease), box-shadow 0.2s, background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
}
.btn:active:not(:disabled) { transform: scale(0.96); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--degrade); color: #fff; box-shadow: 0 6px 16px rgba(26, 77, 143, 0.24); background-size: 140% 140%; }
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 24px rgba(26, 77, 143, 0.32); background-position: 100% 0; }
.btn-ghost { background: var(--blanc); color: var(--encre); border-color: var(--bord); }
.btn-ghost:hover:not(:disabled) { border-color: var(--bleu); color: var(--bleu); background: var(--bleu-50); }
.btn-danger { background: var(--rouge); color: #fff; box-shadow: 0 6px 16px rgba(200, 65, 47, 0.25); }
.btn-danger-ghost { background: var(--blanc); color: var(--rouge); border-color: #f2cbc5; }
.btn-danger-ghost:hover:not(:disabled) { background: var(--rouge-50); border-color: var(--rouge); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { height: 50px; font-size: 16px; }
.btn .spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; animation: spin 0.7s linear infinite; }
.btn.loading .spinner { display: inline-block; }
.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; transition: background 0.2s, color 0.2s, transform 0.12s;
}
.icon-btn:hover { background: var(--fond); color: var(--encre); }
.icon-btn:active { transform: scale(0.92); }
.lien { color: var(--bleu); font-weight: 700; font-size: 13px; transition: transform 0.2s var(--ease); display: inline-block; }

/* ---------- Champs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--encre); }
.field input, .field select, .recherche, .select-court {
  width: 100%; height: 44px; padding: 0 14px; font: inherit; font-size: 14px; font-weight: 500; color: var(--encre);
  background: var(--blanc); border: 1.5px solid var(--bord); border-radius: 11px; outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.field input::placeholder, .recherche::placeholder { color: #9aa7b8; font-weight: 400; }
.field input:focus, .field select:focus, .recherche:focus, .select-court:focus { border-color: var(--bleu); box-shadow: 0 0 0 4px rgba(26, 77, 143, 0.12); }
.field input:disabled, .field select:disabled { background: var(--fond); color: var(--texte); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.sous-titre, .bloc-titre { font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 22px 0 12px; }
.bloc-titre:first-child { margin-top: 0; }
.alert { padding: 12px 14px; border-radius: 11px; background: var(--rouge-50); color: var(--rouge); font-size: 14px; font-weight: 600; border: 1px solid #f5c6c0; }
.shake { animation: shake 0.45s both; }
.appear { animation: fadeUp 0.3s var(--ease) both; }

/* ---------- Connexion ---------- */
.login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 56px 64px 32px; background: #f3f4f6; }
.login-brand::before { content: ""; position: absolute; right: -20%; bottom: -35%; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(31, 169, 164, 0.2), transparent 65%); animation: drift 14s ease-in-out infinite; }
.login-brand::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--degrade); }
.brand-inner { position: relative; max-width: 560px; animation: fadeUp 0.7s var(--ease) both; }
.brand-logo { width: 220px; height: auto; mix-blend-mode: multiply; margin: 0 0 28px -8px; animation: float 6s ease-in-out infinite; }
.login-brand h1 { font-size: clamp(26px, 2.6vw, 36px); font-weight: 800; line-height: 1.18; color: var(--bleu-900); }
.brand-lead { margin: 16px 0 28px; font-size: 16px; line-height: 1.6; }
.brand-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.brand-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--encre); animation: fadeUp 0.6s var(--ease) both; }
.brand-points li:nth-child(1) { animation-delay: 0.25s; }
.brand-points li:nth-child(2) { animation-delay: 0.35s; }
.brand-points li:nth-child(3) { animation-delay: 0.45s; }
.dot { flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 3px; background: var(--degrade); transform: rotate(45deg); }
.brand-foot { position: relative; display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); }
.login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; background: var(--blanc); }
.login-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; animation: pop 0.6s var(--ease) 0.1s both; }
.card-icon { width: 56px; height: 56px; object-fit: contain; mix-blend-mode: multiply; }
.login-card h2 { font-size: 28px; font-weight: 800; }
.login-card > .muted { margin-top: -10px; }
.champs { display: flex; flex-direction: column; gap: 16px; }
.field > input { height: 46px; }
.pwd { position: relative; }
.pwd input { padding-right: 92px; }
.pwd-toggle { position: absolute; right: 6px; top: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--bleu-50); color: var(--bleu); font-size: 13px; font-weight: 700; cursor: pointer; }
.hint { font-size: 13px; color: var(--muted); text-align: center; margin: 4px 0 0; }
.secure { margin-top: 28px; font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }

/* ---------- Onglets ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--fond); border-radius: 12px; }
.tab { flex: 1; height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; transition: background 0.25s var(--ease), color 0.25s, box-shadow 0.25s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; }
.tab:hover { color: var(--encre); }
.tab.active { background: var(--blanc); color: var(--bleu); box-shadow: 0 2px 8px rgba(16, 38, 70, 0.1); }
.tabs.petit { flex: none; }
.tabs.petit .tab { flex: none; height: 34px; }
.compteur { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bord); color: var(--texte); font-size: 11px; display: inline-grid; place-items: center; }
.tab.active .compteur { background: var(--bleu-50); color: var(--bleu); }

/* ---------- Coque de l'application ---------- */
.shell { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; animation: fadeIn 0.4s ease both; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px; background: var(--bleu-900); color: #c9d6e8; overflow-y: auto; z-index: 30; }
.side::before { content: ""; position: absolute; inset: auto -60px -60px auto; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(31, 169, 164, 0.18), transparent 70%); pointer-events: none; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 8px; }
.side-brand img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 11px; padding: 3px; }
.side-brand strong { display: block; color: #fff; font-size: 18px; font-weight: 800; line-height: 1; }
.side-brand small { color: var(--turquoise); font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; font-size: 10px; }
.side nav { display: flex; flex-direction: column; gap: 16px; }
.nav-groupe { display: flex; flex-direction: column; gap: 3px; }
.nav-titre { padding: 0 12px 4px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #6f87a8; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-radius: 11px; background: transparent;
  color: #c9d6e8; text-align: left; font-weight: 600; font-size: 14px; cursor: pointer; transition: background 0.2s, color 0.2s, transform 0.15s var(--ease);
}
.nav-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; transform: translateX(2px); }
.nav-item.active { background: rgba(31, 169, 164, 0.18); color: #fff; box-shadow: inset 3px 0 0 var(--turquoise); }
.nav-ico { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, 0.08); font-size: 14px; transition: background 0.2s, transform 0.2s var(--ease); }
.nav-item.active .nav-ico { background: var(--degrade); transform: scale(1.05); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); color: #fff; }
.side-who { display: flex; flex-direction: column; min-width: 0; }
.side-who strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-who small { color: #8fa3bf; font-size: 12px; }
.voile { display: none; }

.main { display: flex; flex-direction: column; min-width: 0; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 32px; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--bord); }
.burger { display: none; }
.top-soc { display: flex; align-items: center; gap: 12px; min-width: 0; }
.top-soc strong { display: block; color: var(--encre); font-size: 15px; }
.top-soc small { color: var(--muted); font-size: 12px; }
.soc-pastille { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--bleu-50); color: var(--bleu); font-weight: 800; font-size: 14px; }
.console-pastille { background: var(--degrade); color: #fff; }
.top-user { display: flex; align-items: center; gap: 12px; }
.who { text-align: right; }
.who strong { display: block; color: var(--encre); font-size: 14px; }
.who small { color: var(--muted); font-size: 12px; }
.avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--degrade); color: #fff; font-weight: 800; font-size: 14px; box-shadow: 0 0 0 3px rgba(31, 169, 164, 0.15); }
.avatar.sm { width: 34px; height: 34px; font-size: 12px; box-shadow: none; }
.avatar.xl { width: 84px; height: 84px; font-size: 28px; box-shadow: 0 0 0 6px rgba(31, 169, 164, 0.12); }
.avatar.carre { border-radius: 10px; }
.content { padding: 28px 32px 48px; width: 100%; max-width: 1280px; }
.console .side { background: linear-gradient(180deg, #0c2547 0%, #0f2f5a 100%); }

/* ---------- Cartes et grilles ---------- */
.card { background: var(--blanc); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 22px; box-shadow: var(--ombre); transition: transform 0.25s var(--ease), box-shadow 0.25s; }
.card.clickable { cursor: pointer; }
.card.clickable:hover { transform: translateY(-4px); box-shadow: var(--ombre-haute); }
.card.clickable:hover .lien { transform: translateX(4px); }
.card.clickable:active { transform: translateY(-1px) scale(0.99); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-head h3 { font-size: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.grid-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 800; }
.page-head .muted { margin-top: 6px; max-width: 720px; }
.section-titre h2 { font-size: 18px; }

/* Bandeau d'accueil */
.hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; padding: 28px 32px; border-radius: 20px; background: var(--degrade); color: #fff; box-shadow: 0 14px 34px rgba(26, 77, 143, 0.25); }
.hero-console { background: linear-gradient(135deg, #0f2f5a 0%, var(--bleu) 55%, var(--turquoise) 130%); }
.hero-txt { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; }
.hero h1 { color: #fff; font-size: 30px; font-weight: 800; }
.hero p { margin: 0; color: rgba(255, 255, 255, 0.9); font-weight: 600; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hero-date { font-size: 13px; color: rgba(255, 255, 255, 0.75); font-weight: 600; }
.hero-meta { font-size: 13px; color: rgba(255, 255, 255, 0.75); margin-top: 6px; }
.hero-deco { position: absolute; inset: 0; pointer-events: none; }
.hero-deco span { position: absolute; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.16); animation: drift 12s ease-in-out infinite; }
.hero-deco span:nth-child(1) { width: 260px; height: 260px; right: -60px; top: -110px; }
.hero-deco span:nth-child(2) { width: 160px; height: 160px; right: 140px; bottom: -90px; animation-delay: -4s; background: rgba(255, 255, 255, 0.06); }
.hero-deco span:nth-child(3) { width: 70px; height: 70px; right: 60px; bottom: 30px; animation-delay: -8s; background: rgba(255, 255, 255, 0.1); border: 0; }

/* Indicateurs */
.kpi { display: flex; align-items: flex-start; gap: 14px; }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--ombre-haute); }
.kpi-ico { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; font-size: 19px; font-weight: 800; }
.kpi-bleu .kpi-ico { background: var(--bleu-50); color: var(--bleu); }
.kpi-turquoise .kpi-ico { background: var(--turquoise-50); color: var(--turquoise-700); }
.kpi-violet .kpi-ico { background: var(--violet-50); color: var(--violet); }
.kpi-vert .kpi-ico { background: var(--vert-50); color: var(--vert); }
.kpi-rouge .kpi-ico { background: var(--rouge-50); color: var(--rouge); }
.kpi-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi-titre { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi-val { font-size: 28px; font-weight: 800; color: var(--encre); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi-val small { font-size: 13px; color: var(--muted); font-weight: 700; }
.kpi-detail { font-size: 12px; color: var(--muted); }

/* Histogramme */
.hist { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-top: 18px; }
.hist-col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.hist-bar { width: 100%; max-width: 30px; height: var(--h); border-radius: 7px 7px 3px 3px; background: var(--degrade); transform-origin: bottom; animation: grow 0.9s var(--ease) both; animation-delay: calc(var(--i) * 40ms); transition: filter 0.2s, transform 0.2s; }
.hist-bar.zero { background: var(--bord); }
.hist-col:hover .hist-bar { filter: brightness(1.12); transform: scaleX(1.08); }
.hist-v { font-size: 11px; font-weight: 700; color: var(--bleu); opacity: 0; transition: opacity 0.2s; }
.hist-col:hover .hist-v { opacity: 1; }
.hist-col small { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hist-total { margin-top: 10px; font-size: 13px; }

/* Répartition */
.rep { display: flex; flex-direction: column; gap: 14px; }
.rep-lib { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--encre); margin-bottom: 6px; }
.rep-piste { height: 9px; border-radius: 6px; background: var(--fond); overflow: hidden; }
.rep-barre { height: 100%; width: var(--w); border-radius: 6px; background: var(--degrade); transform-origin: left; animation: growX 1s var(--ease) both; animation-delay: calc(var(--i) * 70ms + 0.1s); }

/* Activité */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px dashed var(--bord); border-radius: 10px; transition: background 0.2s; animation: fadeUp 0.45s var(--ease) both; }
.timeline li:hover { background: var(--fond); }
.timeline li:last-child { border-bottom: 0; }
.tl-ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; font-weight: 800; font-size: 14px; }
.ton-bleu { background: var(--bleu-50); color: var(--bleu); }
.ton-vert { background: var(--vert-50); color: var(--vert); }
.ton-rouge { background: var(--rouge-50); color: var(--rouge); }
.ton-ambre { background: var(--ambre-50); color: var(--ambre); }
.ton-turquoise { background: var(--turquoise-50); color: var(--turquoise-700); }
.tl-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.tl-txt strong { font-size: 14px; color: var(--encre); font-weight: 600; }
.tl-txt small { font-size: 12px; color: var(--muted); }

/* Bandeau d'alerte */
.bandeau { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: var(--ambre-50); border-color: #f3dca8; }
.bandeau-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--ambre); font-size: 18px; }
.bandeau div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.bandeau strong { color: #7a5306; }
.bandeau span { font-size: 13px; color: #7a5306; }

/* Modules */
.module { display: flex; flex-direction: column; gap: 10px; }
.module h3 { font-size: 17px; }
.module p { margin: 0; font-size: 14px; line-height: 1.55; flex: 1; }
.module-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--degrade); color: #fff; font-weight: 800; font-size: 20px; transition: transform 0.3s var(--ease); }
.module:hover .module-ico { transform: rotate(-8deg) scale(1.08); }

/* Badges et pastilles */
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--bleu-50); color: var(--bleu); font-size: 12px; font-weight: 700; }
.badge.clair { background: rgba(255, 255, 255, 0.2); color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.vert { background: var(--vert-50); color: var(--vert); }
.pill.rouge { background: var(--rouge-50); color: var(--rouge); }
.pill.ambre { background: var(--ambre-50); color: var(--ambre); }
.pill.gris { background: var(--fond); color: var(--muted); }
.pill.bleu { background: var(--bleu-50); color: var(--bleu); }

/* Tableaux */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.recherche { max-width: 320px; height: 40px; }
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--bord); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--bord); vertical-align: middle; }
.table tbody tr { transition: background 0.18s; }
.table tbody tr:hover { background: #f8fafc; }
.table tr:last-child td { border-bottom: 0; }
.table .r, .table .actions { text-align: right; }
.table .actions { white-space: nowrap; }
.table .actions .btn { margin-left: 6px; }
tr.inactif td { opacity: 0.6; }
.cell-user { display: flex; align-items: center; gap: 12px; }
.cell-user strong { display: block; color: var(--encre); font-weight: 700; }
.cell-user small { color: var(--muted); font-size: 12.5px; }
.moi { color: var(--turquoise-700); font-weight: 600; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.pagination .btn { margin-left: 6px; }

/* Fenêtres */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(15, 35, 60, 0.45); backdrop-filter: blur(3px); animation: fadeIn 0.2s ease both; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow-y: auto; background: var(--blanc); border-radius: 20px; box-shadow: 0 30px 80px rgba(10, 30, 60, 0.35); animation: pop 0.3s var(--ease) both; }
.modal.large { max-width: 760px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 24px 0; }
.modal-head h3 { font-size: 19px; }
.modal-head .muted { margin-top: 4px; font-size: 14px; }
.modal-body { padding: 18px 24px 24px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.confirm-msg { margin: 0; line-height: 1.6; }

/* Choix (profils, abonnements) */
.choix-profils, .choix-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.choice { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1.5px solid var(--bord); border-radius: 13px; cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.15s var(--ease), box-shadow 0.2s; }
.choice:hover { border-color: #b9c9de; transform: translateY(-1px); }
.choice.on { border-color: var(--bleu); background: var(--bleu-50); box-shadow: 0 0 0 3px rgba(26, 77, 143, 0.08); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-txt { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.choice-txt strong { color: var(--encre); font-size: 14px; }
.choice-txt span { font-size: 12.5px; line-height: 1.45; }
.choice-txt small { font-size: 11.5px; color: var(--muted); }
.choice-txt .prix { color: var(--bleu); font-weight: 800; font-size: 14px; }
.choice-check { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--bord); color: transparent; font-size: 12px; font-weight: 800; transition: all 0.2s var(--ease); }
.choice.on .choice-check { background: var(--degrade); border-color: transparent; color: #fff; transform: scale(1.1); }

/* Mot de passe provisoire */
.secret { text-align: center; }
.secret-ico { font-size: 34px; animation: pop 0.5s var(--ease) both; }
.secret p { line-height: 1.55; margin: 10px 0 18px; }
.secret-grid { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; text-align: left; padding: 16px; border-radius: 13px; background: var(--fond); margin: 0; }
.secret-grid dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.secret-grid dd { margin: 0; }
.secret-grid code { font-family: ui-monospace, Consolas, monospace; font-size: 14px; color: var(--encre); }
.secret-grid .mdp { font-size: 17px; font-weight: 700; color: var(--bleu); letter-spacing: 0.04em; }
.copy.copied { border-color: var(--vert); color: var(--vert); background: var(--vert-50); }
.copy.copied::after { content: " ✓"; }

/* Notifications */
.toasts { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 36px)); }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 13px; background: var(--blanc); box-shadow: var(--ombre-haute); border-left: 4px solid; animation: slideIn 0.35s var(--ease) both; font-size: 14px; color: var(--encre); font-weight: 600; }
.toast.ok { border-color: var(--vert); }
.toast.err { border-color: var(--rouge); }
.toast.info { border-color: var(--bleu); }
.toast-ico { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 800; }
.toast.ok .toast-ico { background: var(--vert); }
.toast.err .toast-ico { background: var(--rouge); }
.toast.info .toast-ico { background: var(--bleu); }
.toast-txt { flex: 1; }
.toast-x { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }

/* Squelettes et états vides */
.skeleton-bloc { display: flex; flex-direction: column; gap: 10px; padding: 6px 0; }
.skeleton { height: 14px; border-radius: 7px; background: linear-gradient(90deg, #edf1f6 0, #f7f9fb 40%, #edf1f6 80%); background-size: 800px 100%; animation: shimmer 1.3s linear infinite; }
.skeleton:nth-child(2n) { width: 70%; }
.skeleton:first-child { height: 20px; width: 45%; }
.vide { text-align: center; padding: 36px 16px; }
.vide-ico { font-size: 34px; margin-bottom: 8px; }
.vide h3 { font-size: 16px; margin-bottom: 4px; }

/* Interrupteurs */
.switch-ligne { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--bord); cursor: pointer; }
.switch-ligne:last-of-type { border-bottom: 0; }
.switch-ligne.off { opacity: 0.55; cursor: not-allowed; }
.switch-txt { display: flex; flex-direction: column; gap: 4px; max-width: 640px; }
.switch-txt strong { color: var(--encre); font-size: 15px; }
.switch-txt .muted { font-size: 13px; line-height: 1.5; }
.switch { appearance: none; flex: none; width: 48px; height: 28px; border-radius: 14px; background: #cfd8e3; position: relative; cursor: pointer; transition: background 0.25s var(--ease); margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); transition: transform 0.25s var(--ease); }
.switch:checked { background: var(--turquoise); }
.switch:checked::after { transform: translateX(20px); }
.switch:active::after { width: 26px; }
.select-court { width: auto; min-width: 150px; height: 40px; }

/* Profils et droits */
.grid-profils { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.profil { padding: 0; overflow: hidden; }
.profil-head { display: flex; justify-content: space-between; gap: 12px; padding: 20px 22px; cursor: pointer; }
.profil-head h3 { font-size: 16px; margin-bottom: 4px; }
.profil-head .muted { font-size: 13px; line-height: 1.5; }
.profil-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.chevron { font-size: 18px; color: var(--muted); transition: transform 0.3s var(--ease); }
.profil.ouvert .chevron { transform: rotate(180deg); color: var(--bleu); }
.profil-corps { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s var(--ease); }
.profil-corps > div { overflow: hidden; }
.profil.ouvert .profil-corps { grid-template-rows: 1fr; }
.profil.ouvert .profil-corps > div { padding: 0 22px 20px; border-top: 1px solid var(--bord); }
.droits { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; padding-top: 14px; }
.droit-groupe h4 { font-size: 13px; color: var(--bleu); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.droit-groupe h4::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--degrade); transform: rotate(45deg); }
.droit-groupe ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.droit-groupe li { font-size: 13.5px; padding-left: 22px; position: relative; line-height: 1.4; }
.droit-groupe li::before { content: "✓"; position: absolute; left: 0; color: var(--turquoise); font-weight: 800; }

/* Mon compte */
.profil-carte { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.profil-carte .badges { justify-content: center; margin: 6px 0; }
.infos { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; text-align: left; width: 100%; margin: 12px 0 0; padding-top: 14px; border-top: 1px solid var(--bord); font-size: 13.5px; }
.infos dt { color: var(--muted); }
.infos dd { margin: 0; font-weight: 600; color: var(--encre); }
.form-mdp { display: flex; flex-direction: column; gap: 14px; }
.regles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 12.5px; color: var(--muted); }
.regles li { transition: color 0.2s; }
.regles li.ok { color: var(--vert); font-weight: 700; }

/* Module à venir */
.a-venir { text-align: center; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.a-venir-ico { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 24px; background: var(--degrade); color: #fff; font-size: 36px; font-weight: 800; animation: float 5s ease-in-out infinite; box-shadow: 0 16px 34px rgba(26, 77, 143, 0.3); }
.a-venir .muted { max-width: 540px; }
.liste-check { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.liste-check li { padding-left: 28px; position: relative; font-size: 14px; }
.liste-check li::before { content: "✓"; position: absolute; left: 0; top: -1px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--turquoise-50); color: var(--turquoise-700); font-weight: 800; font-size: 11px; }

/* Sceau d'intégrité */
.sceau { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: var(--rayon); border: 1px solid; animation: fadeUp 0.4s var(--ease) both; }
.sceau div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sceau span { font-size: 13px; }
.sceau-ico { flex: none !important; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; font-size: 20px !important; font-weight: 800; color: #fff; }
.sceau.ok { background: var(--vert-50); border-color: #bfe6d1; color: #14623e; }
.sceau.ok .sceau-ico { background: var(--vert); animation: pop 0.5s var(--ease) both; }
.sceau.ko { background: var(--rouge-50); border-color: #f2c4bd; color: #8a2b1f; }
.sceau.ko .sceau-ico { background: var(--rouge); }
.sceau.attente { background: var(--bleu-50); border-color: #cfdcef; color: var(--bleu); }
.sceau.attente .sceau-ico { background: var(--bleu); }
.spin { animation: spin 1s linear infinite; }

/* Abonnements */
.grid-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.plan-carte { position: relative; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.plan-carte:hover { transform: translateY(-4px); box-shadow: var(--ombre-haute); }
.plan-carte.vedette { border: 2px solid var(--turquoise); }
.ruban { position: absolute; top: 16px; right: -34px; transform: rotate(45deg); background: var(--degrade); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 40px; }
.plan-prix { font-size: 30px; font-weight: 800; color: var(--encre); font-variant-numeric: tabular-nums; }
.plan-prix small { font-size: 13px; color: var(--muted); font-weight: 700; }
.plan-pied { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--bord); }

/* ---------- Adaptation mobile ---------- */
@media (max-width: 1100px) {
  .grid-kpi { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { padding: 32px 16px 24px; }
  .brand-logo { width: 150px; margin-bottom: 16px; }
  .brand-points, .brand-lead { display: none; }
  .login-panel { padding: 32px 16px; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform 0.3s var(--ease); }
  .menu-ouvert .side { transform: none; box-shadow: 20px 0 50px rgba(0, 0, 0, 0.3); }
  .menu-ouvert .voile { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(15, 35, 60, 0.4); animation: fadeIn 0.2s both; }
  .burger { display: grid; }
  .top { padding: 10px 16px; }
  .who, .top-soc small { display: none; }
  .content { padding: 18px 16px 40px; }
  .hero { padding: 22px 20px; }
  .hero h1 { font-size: 24px; }
  .grid-kpi { grid-template-columns: 1fr; }
  .regles { grid-template-columns: 1fr; }
  .table-wrap { margin: 0 -22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
