/* Yiriwa — design « relief doux » (2.0) : profondeur, ombres en couches, icônes en pastilles 3D, barre vitrée.
   Se charge APRÈS app.css : supprimer ce fichier de index.html suffit pour revenir à l'ancien design. */
:root {
  --radius: 14px; --radius-s: 10px;
  --d-hi: inset 0 1px 0 rgba(255, 255, 255, .9);
  --d-1: 0 1px 2px rgba(16, 60, 33, .06), 0 2px 6px rgba(16, 60, 33, .05);
  --d-2: 0 1px 2px rgba(16, 60, 33, .05), 0 6px 16px rgba(16, 60, 33, .07), 0 18px 40px -18px rgba(16, 60, 33, .18);
  --d-3: 0 2px 4px rgba(16, 60, 33, .06), 0 14px 30px rgba(16, 60, 33, .12), 0 30px 60px -20px rgba(16, 60, 33, .25);
  --g-primary: linear-gradient(180deg, #2E9A57 0%, #1B7340 55%, #166137 100%);
  --g-gold: linear-gradient(180deg, #F3CB62 0%, #E8B640 50%, #D29A26 100%);
  --g-forest: linear-gradient(150deg, #1F7A42 0%, #14532D 55%, #0E3E21 100%);
  --page-wash: radial-gradient(1100px 500px at 85% -10%, rgba(232, 182, 64, .10), transparent 60%), radial-gradient(900px 600px at -10% 10%, rgba(42, 145, 80, .10), transparent 60%), linear-gradient(180deg, #F6F8F3, #EEF3EC);
  --glass: rgba(255, 255, 255, .72);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --d-hi: inset 0 1px 0 rgba(255, 255, 255, .06);
    --d-1: 0 1px 2px rgba(0, 0, 0, .35); --d-2: 0 2px 4px rgba(0, 0, 0, .35), 0 12px 28px rgba(0, 0, 0, .35); --d-3: 0 4px 10px rgba(0, 0, 0, .4), 0 24px 50px rgba(0, 0, 0, .45);
    --page-wash: radial-gradient(1100px 500px at 85% -10%, rgba(232, 182, 64, .06), transparent 60%), radial-gradient(900px 600px at -10% 10%, rgba(42, 145, 80, .10), transparent 60%), #0D1510;
    --glass: rgba(23, 33, 26, .72);
  }
}
:root[data-theme="dark"] {
  --d-hi: inset 0 1px 0 rgba(255, 255, 255, .06);
  --d-1: 0 1px 2px rgba(0, 0, 0, .35); --d-2: 0 2px 4px rgba(0, 0, 0, .35), 0 12px 28px rgba(0, 0, 0, .35); --d-3: 0 4px 10px rgba(0, 0, 0, .4), 0 24px 50px rgba(0, 0, 0, .45);
  --page-wash: radial-gradient(1100px 500px at 85% -10%, rgba(232, 182, 64, .06), transparent 60%), radial-gradient(900px 600px at -10% 10%, rgba(42, 145, 80, .10), transparent 60%), #0D1510;
  --glass: rgba(23, 33, 26, .72);
}

body { background: var(--page-wash); background-attachment: fixed; }

/* ---------- Menu latéral : vert profond en relief ---------- */
.side { background: var(--g-forest); box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06), 6px 0 24px rgba(10, 40, 22, .18); }
.nav a { border-left: 0; border-radius: 12px; margin: 2px 4px; padding: 9px 10px; transition: background .15s, transform .15s; }
.nav a svg { width: 30px; height: 30px; padding: 6px; border-radius: 10px; background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.05)); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 6px rgba(0,0,0,.18); opacity: 1; }
.nav a:hover { background: rgba(255, 255, 255, .08); transform: translateX(2px); }
.nav a.active { background: linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,.08)); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 6px 16px rgba(0,0,0,.22); }
.nav a.active svg { background: var(--g-gold); color: #3A2A06; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 4px 10px rgba(176,122,20,.45); }

/* ---------- Barre du haut vitrée ---------- */
.head { background: var(--glass); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid rgba(20, 83, 45, .08); box-shadow: 0 4px 20px rgba(16, 60, 33, .06); }
.search-global input { background: var(--surface); border-color: transparent; box-shadow: var(--d-hi), inset 0 1px 3px rgba(16,60,33,.08), 0 1px 0 rgba(255,255,255,.6); border-radius: 14px; }
.space-switch { border: 0; border-radius: 14px; background: var(--line-2); padding: 3px; box-shadow: inset 0 1px 3px rgba(16,60,33,.12); gap: 2px; }
.space-switch a { border-radius: 11px; }
.space-switch a.on { background: var(--g-gold); color: #3A2A06; box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 3px 8px rgba(176,122,20,.35); }
.caisse-badge, .chip { box-shadow: var(--d-hi), var(--d-1); }
.avatar { background: var(--g-primary); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 8px rgba(27,115,64,.35); }

/* ---------- Cartes, panneaux, chiffres clés ---------- */
.panel, .stat, .kpi, .mini-stats > *, .tasks-panel .task, .dl-card, .page-card, .empty-state, .table-wrap, .collect-panel {
  border-color: transparent !important; box-shadow: var(--d-hi), var(--d-2);
}
.panel { border-radius: 20px; padding: 18px; }
.dash-grid > div > .panel { border-radius: 20px; }
.stat { border-radius: 16px; transition: transform .18s, box-shadow .18s; }
.kpi { border-radius: 20px; transition: transform .18s, box-shadow .18s; }
.kpi:hover, .stat:hover, .mini-stats a:hover, .tasks-panel .task:hover, .dl-card:hover { transform: translateY(-3px); box-shadow: var(--d-hi), var(--d-3); text-decoration: none; }
.kpi.k-leaf { background: var(--g-forest); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 12px 30px rgba(14, 62, 33, .35), 0 30px 60px -24px rgba(14, 62, 33, .55); }
.kpi-v { text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.kpi.k-leaf .kpi-v { text-shadow: 0 2px 6px rgba(0,0,0,.25); }
.kpi-ic, .task-n, .hh-ic, .es-ic {
  background: linear-gradient(180deg, #E9F6EC, #CFEBD6) !important; color: #1B7340 !important; border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -2px 0 rgba(27,115,64,.12), 0 4px 10px rgba(27,115,64,.18);
}
.kpi.k-gold .kpi-ic, .task.warn .task-n { background: linear-gradient(180deg, #FDF1D0, #F5D88A) !important; color: #8A5E0A !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -2px 0 rgba(176,122,20,.18), 0 4px 10px rgba(176,122,20,.25); }
.kpi.k-warn .kpi-ic, .task.bad .task-n { background: linear-gradient(180deg, #FCE7E4, #F5C3BD) !important; color: #A3302A !important; }
.kpi.k-leaf .kpi-ic { background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.08)) !important; color: #F3CB62 !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 12px rgba(0,0,0,.25); }
.mini-stats > * { border-radius: 14px; }
.tile-group { border-color: transparent; border-radius: 18px; background: linear-gradient(180deg, var(--surface), var(--line-2)); box-shadow: var(--d-hi), var(--d-1); }
.tile { border-radius: 12px; transition: transform .15s, background .15s, box-shadow .15s; }
.tile:hover { background: var(--surface); transform: translateY(-2px); box-shadow: var(--d-2); }
.tile .ic { border-radius: 11px; background: linear-gradient(180deg, #E9F6EC, #CFEBD6); color: #1B7340; box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -2px 0 rgba(27,115,64,.12), 0 4px 10px rgba(27,115,64,.18); }

/* ---------- Boutons en relief ---------- */
.btn { border-radius: 12px; border-color: transparent; box-shadow: var(--d-hi), 0 1px 2px rgba(16,60,33,.08), 0 3px 8px rgba(16,60,33,.07); transition: transform .12s, box-shadow .12s, filter .12s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--d-hi), 0 4px 12px rgba(16,60,33,.12); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(16,60,33,.15); }
.btn.primary { background: var(--g-primary); border-color: transparent; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,0,0,.12), 0 4px 12px rgba(27,115,64,.35); }
.btn.primary:hover { background: var(--g-primary); filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,0,0,.12), 0 8px 18px rgba(27,115,64,.4); }
.btn.primary:active { box-shadow: inset 0 2px 5px rgba(0,0,0,.25); }
.btn.danger.solid, .btn.danger.primary { background: linear-gradient(180deg, #D9534B, #B3362F); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 4px 12px rgba(179,54,47,.35); }
.btn.ok { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 12px rgba(46,125,79,.3); }

/* ---------- Champs de saisie ---------- */
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea, .inp {
  border-radius: 12px; border-color: rgba(20, 83, 45, .12); box-shadow: inset 0 1px 3px rgba(16,60,33,.07); background-color: var(--surface);
}
.field input:focus, .field select:focus, .field textarea:focus, .inp:focus { box-shadow: inset 0 1px 3px rgba(16,60,33,.07), 0 0 0 4px rgba(42,145,80,.18); }

/* ---------- Tableaux ---------- */
.table-wrap { border-radius: 16px; overflow: auto; background: var(--surface); }
table.dt th { background: linear-gradient(180deg, var(--surface), var(--line-2)); border-bottom: 1px solid var(--line); }
table.dt tbody tr { transition: background .12s; }
table.dt tbody tr:hover { background: linear-gradient(90deg, rgba(42,145,80,.09), rgba(42,145,80,.03)); }
.dt-exports .btn { box-shadow: var(--d-1); }

/* ---------- Onglets en pilule ---------- */
.tabs, .ktabs { border-bottom: 0; background: var(--line-2); padding: 4px; border-radius: 16px; gap: 4px; box-shadow: inset 0 1px 3px rgba(16,60,33,.10); width: fit-content; max-width: 100%; }
.tabs a, .ktabs > * { border-bottom: 0 !important; border-radius: 12px; }
.tabs a.on { background: var(--surface); color: var(--primary); box-shadow: var(--d-hi), 0 2px 8px rgba(16,60,33,.12); }

/* ---------- Badges, alertes ---------- */
.badge { border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 1px 2px rgba(16,60,33,.08); }
.alert { border-radius: 14px; box-shadow: var(--d-hi), var(--d-1); }

/* ---------- Fenêtres ---------- */
.modal-bg { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); background: rgba(10, 30, 18, .38); }
.modal { border-radius: 24px; box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 30px 80px rgba(10, 40, 22, .35); animation: pop3d .22s cubic-bezier(.2, .9, .3, 1.2); }
.modal-head { border-bottom-color: var(--line-2); }
@keyframes pop3d { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.dropdown, .search-results { border-radius: 16px; border-color: transparent; box-shadow: var(--d-3); }
.toast { border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }

/* ---------- Barre mobile flottante ---------- */
@media (max-width: 960px) {
  .bottom-nav { left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); height: 64px; padding: 6px; border-radius: 22px; border-top: 0; background: var(--glass); -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 10px 30px rgba(10, 40, 22, .22); }
  .bottom-nav a.active { color: var(--primary); }
  .bottom-nav a.active svg { background: linear-gradient(180deg, #E9F6EC, #CFEBD6); border-radius: 10px; padding: 3px; box-shadow: inset 0 1px 0 #fff, 0 3px 8px rgba(27,115,64,.25); }
  .bottom-nav .bn-main { background: var(--g-gold); box-shadow: inset 0 2px 0 rgba(255,255,255,.55), inset 0 -3px 0 rgba(0,0,0,.12), 0 10px 22px rgba(176, 122, 20, .45); }
  .content { padding-bottom: 110px !important; }
}

/* ---------- Page de connexion ---------- */
.login-art { background: var(--g-forest); }
.login-art::before, .login-art::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; }
.login-art::before { width: 160px; height: 160px; right: 9%; top: 56%; background: radial-gradient(circle at 32% 28%, #FBE3A0, #E8B640 45%, #A87412 100%); box-shadow: 0 30px 60px rgba(0,0,0,.35), inset -10px -14px 30px rgba(0,0,0,.18); opacity: .9; animation: float3d 7s ease-in-out infinite; }
.login-art::after { width: 80px; height: 80px; right: 13%; top: 14%; background: radial-gradient(circle at 32% 28%, #BFF0C6, #2A9150 50%, #14532D 100%); box-shadow: 0 20px 40px rgba(0,0,0,.35); animation: float3d 9s ease-in-out infinite reverse; }
@keyframes float3d { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .login-art::before, .login-art::after, .modal { animation: none; } }
.login-form { background: transparent; }
.login-form form { background: var(--surface); padding: 28px; border-radius: 26px; box-shadow: var(--d-hi), var(--d-3); }
.dl-card { border-radius: 16px; }
.dl-ic { box-shadow: inset 0 1px 0 #fff, 0 4px 10px rgba(27,115,64,.2); }
@media (max-width: 900px) { .login-form form { padding: 20px; border-radius: 22px; } }

/* =================== Animations et scènes 3D =================== */
.fx-page { animation: fxPage .45s cubic-bezier(.2, .8, .2, 1) both; transform-origin: 50% 0; }
@keyframes fxPage { from { opacity: 0; transform: perspective(1200px) rotateX(4deg) translateY(14px); } to { opacity: 1; transform: none; } }
.fx-in { animation: fxIn .55s cubic-bezier(.2, .85, .25, 1.1) both; animation-delay: calc(var(--fx-i, 0) * 45ms + 80ms); }
@keyframes fxIn { from { opacity: 0; transform: perspective(900px) rotateX(-10deg) translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.fx-tilt { transition: transform .08s linear, box-shadow .2s !important; will-change: transform; }
.kpi, .stat, .tile, .dl-card, .mini-stats > a, .tasks-panel .task { position: relative; transform-style: preserve-3d; }
.fx-tilt::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255,255,255,.45), transparent 55%); mix-blend-mode: soft-light; }

.page-head { position: relative; }
.ph-title { align-items: center; }
.fx-emblem { width: 112px; height: 70px; flex: none; pointer-events: none; margin-right: 6px; position: relative; }
.fx-emblem .fx-scene { position: absolute; left: 0; top: 0; width: 170px; height: 104px; transform: scale(.66); transform-origin: 0 0; }
@media (max-width: 760px) { .fx-emblem { width: 74px; height: 48px; margin-right: 2px; } .fx-emblem .fx-scene { transform: scale(.44); } }
.fx-scene { position: relative; perspective: 600px; transform-style: preserve-3d; }
.fx-floor { position: absolute; left: 22%; right: 22%; bottom: 4px; height: 12px; border-radius: 50%; background: radial-gradient(closest-side, rgba(16,60,33,.28), transparent); animation: fxShadow 3.2s ease-in-out infinite; }
@keyframes fxShadow { 50% { transform: scaleX(.82); opacity: .7; } }

/* pièce d'or 3D */
.fx-coin { position: absolute; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal;
  background: radial-gradient(circle at 34% 30%, #FFF1BE 0, #F3CB62 30%, #D29A26 70%, #9C6A10 100%);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.25), inset -3px -4px 6px rgba(120,80,0,.35), 0 6px 12px rgba(120,80,0,.3); animation: fxSpin 3s linear infinite; }
.fx-coin b { font: 700 15px/1 var(--font-title); color: #8A5E0A; text-shadow: 0 1px 0 rgba(255,255,255,.6); }
@keyframes fxSpin { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }

/* Accueil : pousse + pièces en orbite */
.sc-home .fx-sprout { position: absolute; left: 50%; bottom: 14px; width: 60px; height: 70px; transform: translateX(-50%); animation: fxBob 3.2s ease-in-out infinite; }
.sc-home .st { position: absolute; left: 28px; bottom: 0; width: 5px; height: 46px; border-radius: 4px; background: linear-gradient(90deg, #1B7340, #2A9150); }
.sc-home .lf { position: absolute; top: 4px; width: 32px; height: 20px; border-radius: 0 100% 0 100%; background: linear-gradient(135deg, #8AD68C, #2A9150); box-shadow: 0 4px 8px rgba(27,115,64,.3); }
.sc-home .lf.l { left: 0; transform: rotate(-20deg) scaleX(-1); } .sc-home .lf.r { right: 0; transform: rotate(-20deg); }
.sc-home .fx-orbit { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(68deg); animation: fxOrbit 6s linear infinite; }
.sc-home .fx-orbit .fx-coin { width: 24px; height: 24px; left: calc(50% - 12px); top: calc(50% - 12px); animation: none; transform: rotateX(-68deg); }
.sc-home .fx-orbit .fx-coin b { font-size: 11px; }
.sc-home .o1 { translate: 60px 0; } .sc-home .o2 { translate: -30px 52px; } .sc-home .o3 { translate: -30px -52px; }
@keyframes fxOrbit { to { transform: rotateX(68deg) rotateZ(360deg); } }
@keyframes fxBob { 50% { transform: translateX(-50%) translateY(-6px); } }

/* Clients : anneau de personnes */
.sc-clients .fx-ring { position: absolute; left: 50%; top: 46%; width: 0; height: 0; transform-style: preserve-3d; animation: fxRing 8s linear infinite; }
.sc-clients .fx-person { position: absolute; left: -14px; top: -24px; width: 28px; height: 44px; font-style: normal; transform-style: preserve-3d; }
.sc-clients .fx-person b { position: absolute; left: 6px; top: 0; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFE3B8, #C98A4B); }
.sc-clients .fx-person s { position: absolute; left: 0; top: 17px; width: 28px; height: 24px; border-radius: 14px 14px 6px 6px; background: linear-gradient(180deg, #34A862, #14532D); box-shadow: 0 4px 8px rgba(0,0,0,.2); }
.sc-clients .p1 s { background: linear-gradient(180deg, #F3CB62, #B07A14); } .sc-clients .p3 s { background: linear-gradient(180deg, #8AD68C, #2A9150); }

.sc-clients .p0 { transform: rotateY(0deg) translateZ(52px); } .sc-clients .p1 { transform: rotateY(72deg) translateZ(52px); } .sc-clients .p2 { transform: rotateY(144deg) translateZ(52px); } .sc-clients .p3 { transform: rotateY(216deg) translateZ(52px); } .sc-clients .p4 { transform: rotateY(288deg) translateZ(52px); }
@keyframes fxRing { from { transform: rotateX(-12deg) rotateY(0); } to { transform: rotateX(-12deg) rotateY(-360deg); } }

/* Tontine : pile de pièces qui monte + pièce qui tombe */
.sc-tontine .fx-stack { position: absolute; left: 50%; bottom: 12px; width: 50px; transform: translateX(-50%); }
.sc-tontine .fx-disc { position: absolute; left: 0; width: 50px; height: 14px; border-radius: 50%; bottom: calc(var(--k) * 8px);
  background: linear-gradient(180deg, #F7D77E, #D29A26 60%, #9C6A10); box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 2px 3px rgba(120,80,0,.3); animation: fxStack 4s ease-in-out infinite; animation-delay: calc(var(--k) * .12s); }
@keyframes fxStack { 0%, 10% { opacity: 0; transform: translateY(-14px); } 25%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.fx-coin.drop { left: calc(50% - 17px); top: -6px; animation: fxDrop 2.4s cubic-bezier(.5, 0, .7, .4) infinite, fxSpin 1.2s linear infinite; }
@keyframes fxDrop { 0% { translate: 0 -20px; opacity: 0; } 15% { opacity: 1; } 70% { translate: 0 44px; opacity: 1; } 100% { translate: 0 50px; opacity: 0; } }

/* Épargne : bocal qui se remplit */
.sc-epargne .fx-jar { position: absolute; left: 50%; bottom: 10px; width: 62px; height: 60px; transform: translateX(-50%); border-radius: 14px 14px 18px 18px; overflow: hidden;
  background: linear-gradient(90deg, rgba(255,255,255,.55), rgba(220,240,226,.35) 40%, rgba(255,255,255,.6)); border: 2px solid rgba(27,115,64,.35); box-shadow: inset 6px 0 10px rgba(255,255,255,.6), 0 8px 18px rgba(16,60,33,.2); }
.sc-epargne .lid { position: absolute; left: -2px; right: -2px; top: 0; height: 9px; background: linear-gradient(180deg, #2A9150, #14532D); }
.sc-epargne .fill { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(180deg, #F3CB62, #C98A1C); animation: fxFill 4s ease-in-out infinite; }
@keyframes fxFill { 0% { height: 20%; } 60% { height: 70%; } 100% { height: 20%; } }
.sc-epargne .fx-coin.drop { width: 24px; height: 24px; left: calc(50% - 12px); } .sc-epargne .fx-coin b { font-size: 11px; }

/* Crédit : carte qui tourne */
.sc-credit .fx-card3d { position: absolute; left: 50%; top: 18px; width: 96px; height: 62px; margin-left: -48px; border-radius: 10px; transform-style: preserve-3d;
  background: linear-gradient(135deg, #1F7A42, #0E3E21 70%); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 12px 24px rgba(10,40,22,.35); animation: fxCard 5s ease-in-out infinite; }
.sc-credit .chip { position: absolute; left: 12px; top: 18px; width: 18px; height: 14px; border-radius: 3px; background: linear-gradient(135deg, #FBE3A0, #D29A26); }
.sc-credit .ln { position: absolute; left: 12px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.55); } .sc-credit .a { bottom: 14px; width: 54px; } .sc-credit .b { bottom: 6px; width: 30px; background: rgba(232,182,64,.8); }
@keyframes fxCard { 0%, 100% { transform: rotateY(-25deg) rotateX(12deg); } 50% { transform: rotateY(25deg) rotateX(-6deg) translateY(-6px); } }

/* Caisse : billets qui flottent */
.sc-caisse .fx-note { position: absolute; left: 50%; top: 26px; width: 80px; height: 42px; margin-left: -40px; border-radius: 6px; display: grid; place-items: center; font-style: normal;
  background: linear-gradient(135deg, #CFEBD6, #8AD68C 50%, #4DAA6C); border: 2px solid rgba(255,255,255,.6); box-shadow: 0 8px 16px rgba(16,60,33,.25); animation: fxNote 4s ease-in-out infinite; }
.sc-caisse .fx-note b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--font-title); color: #14532D; background: rgba(255,255,255,.6); }
.sc-caisse .n0 { --r: -12deg; animation-delay: 0s; } .sc-caisse .n1 { --r: 4deg; animation-delay: -1.3s; } .sc-caisse .n2 { --r: 16deg; animation-delay: -2.6s; }
@keyframes fxNote { 0%, 100% { transform: rotateZ(var(--r)) rotateX(30deg) translateY(4px); } 50% { transform: rotateZ(calc(var(--r) * -1)) rotateX(10deg) translateY(-10px); } }

/* Paiement en ligne : téléphone + ondes */
.sc-pay .fx-phone { position: absolute; left: 50%; top: 10px; width: 40px; height: 72px; margin-left: -20px; border-radius: 9px; background: linear-gradient(160deg, #2B3A30, #0E1A12); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 10px 18px rgba(0,0,0,.3); animation: fxBob2 3s ease-in-out infinite; }
.sc-pay .scr { position: absolute; inset: 6px 4px 9px; border-radius: 5px; background: linear-gradient(180deg, #F3CB62, #2A9150); }
.sc-pay .fx-wave { position: absolute; left: 50%; top: 46px; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 2px solid rgba(42,145,80,.55); animation: fxWave 2.4s ease-out infinite; }
.sc-pay .w2 { animation-delay: .8s; } .sc-pay .w3 { animation-delay: 1.6s; }
@keyframes fxWave { from { transform: scale(.8); opacity: .9; } to { transform: scale(3); opacity: 0; } }
@keyframes fxBob2 { 50% { transform: translateY(-5px) rotateY(18deg); } }

/* États : graphique en barres 3D */
.sc-etats .fx-bars { position: absolute; left: 50%; bottom: 12px; width: 110px; height: 80px; margin-left: -55px; display: flex; align-items: flex-end; gap: 8px; transform: rotateX(12deg) rotateY(-22deg); transform-style: preserve-3d; }
.sc-etats .fx-bar { flex: 1; border-radius: 4px 4px 2px 2px; background: linear-gradient(90deg, #2A9150, #14532D); box-shadow: 6px 0 0 #0E3E21, 0 6px 10px rgba(0,0,0,.2); animation: fxBar 3.2s ease-in-out infinite; animation-delay: calc(var(--k) * .15s); }
.sc-etats .b3 { background: linear-gradient(90deg, #F3CB62, #D29A26); box-shadow: 6px 0 0 #9C6A10, 0 6px 10px rgba(0,0,0,.2); }
.sc-etats .b0 { --h: 35%; } .sc-etats .b1 { --h: 55%; } .sc-etats .b2 { --h: 70%; } .sc-etats .b3 { --h: 95%; }
@keyframes fxBar { 0%, 100% { height: 12%; } 40%, 70% { height: var(--h); } }

/* Réglages : engrenages */
.fx-gear { position: absolute; border-radius: 50%; background: radial-gradient(circle, transparent 28%, #2A9150 30%, #14532D 62%, transparent 64%), repeating-conic-gradient(#14532D 0 15deg, transparent 15deg 30deg); box-shadow: 0 8px 14px rgba(0,0,0,.15); }
.sc-gears .g1 { width: 64px; height: 64px; left: calc(50% - 50px); top: 14px; animation: fxRot 6s linear infinite; }
.sc-gears .g2 { width: 44px; height: 44px; left: calc(50% + 8px); top: 44px; background: radial-gradient(circle, transparent 28%, #F3CB62 30%, #B07A14 62%, transparent 64%), repeating-conic-gradient(#B07A14 0 15deg, transparent 15deg 30deg); animation: fxRot 4s linear infinite reverse; }
@keyframes fxRot { to { transform: rotate(360deg); } }

/* Validations : bouclier */
.sc-valid .fx-shield { position: absolute; left: 50%; top: 10px; width: 64px; height: 76px; margin-left: -32px; border-radius: 12px 12px 34px 34px; background: linear-gradient(135deg, #34A862, #14532D); box-shadow: inset 0 2px 0 rgba(255,255,255,.3), 0 12px 22px rgba(10,40,22,.3); animation: fxCard 5s ease-in-out infinite; }
.sc-valid .ck { position: absolute; left: 20px; top: 22px; width: 24px; height: 13px; border-left: 5px solid #F3CB62; border-bottom: 5px solid #F3CB62; transform: rotate(-45deg); }

/* Messagerie : enveloppe */
.sc-mail .fx-env { position: absolute; left: 50%; top: 22px; width: 86px; height: 56px; margin-left: -43px; border-radius: 8px; background: linear-gradient(180deg, #FFFFFF, #E6EFE8); box-shadow: 0 10px 20px rgba(10,40,22,.25); animation: fxBob2 3s ease-in-out infinite; overflow: hidden; }
.sc-mail .flap { position: absolute; left: 0; right: 0; top: -30px; height: 58px; background: linear-gradient(180deg, #2A9150, #14532D); transform: rotate(45deg) scale(.72); transform-origin: 50% 50%; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) { .fx-emblem * { animation: none !important; } .fx-page, .fx-in { animation: none !important; } }
/* Écran de chargement : logo en relief qui pivote */
.splash { background: var(--g-forest); perspective: 800px; }
.splash img { animation: splash3d 2.4s ease-in-out infinite; filter: drop-shadow(0 18px 24px rgba(0,0,0,.35)); }
@keyframes splash3d { 0%, 100% { transform: rotateY(-14deg) translateY(0); } 50% { transform: rotateY(14deg) translateY(-8px); } }

/* =================== Carte des tournées =================== */
.mp-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.mp-bar .field { margin: 0; min-width: 160px; }
.mp-dot b::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 6px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.mp-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; margin-bottom: 10px; }
.mp-map-box { position: relative; border-radius: 20px; overflow: hidden; box-shadow: var(--d-hi), var(--d-2); background: var(--line-2); }
.mp-map { height: min(70vh, 640px); width: 100%; z-index: 0; }
.mp-ctrl { position: absolute; z-index: 500; top: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mp-ctrl .btn { background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.mp-ctrl .btn.on { background: var(--g-primary); color: #fff; }
.mp-side { background: var(--surface); border-radius: 20px; box-shadow: var(--d-hi), var(--d-2); display: flex; flex-direction: column; max-height: min(70vh, 640px); overflow: hidden; }
.mp-side-h { padding: 14px 16px 10px; display: flex; flex-direction: column; border-bottom: 1px solid var(--line-2); }
.mp-list { overflow-y: auto; padding: 8px; }
.mp-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; cursor: pointer; transition: background .15s; }
.mp-item:hover { background: var(--primary-soft); }
.mp-item.done { opacity: .75; cursor: default; }
.mp-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 .8rem var(--font-title); color: #fff; background: var(--c); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 3px 8px color-mix(in srgb, var(--c) 45%, transparent); }
.mp-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mp-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .92rem; }
.mp-t small { color: var(--ink-3); font-size: .78rem; }
.mp-sec { margin: 12px 8px 4px; font-size: .78rem; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.mp-empty { padding: 12px; }
.mp-pin { background: none; border: 0; }
.mp-pin-b { display: block; width: 34px; height: 34px; border-radius: 50% 50% 50% 6px; transform: rotate(-45deg); background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--c) 55%, #fff), var(--c) 60%); border: 3px solid #fff; box-shadow: 0 6px 12px rgba(0,0,0,.35); }
.mp-pin-b i { display: grid; place-items: center; width: 100%; height: 100%; transform: rotate(45deg); font: 700 12px var(--font-title); color: #fff; font-style: normal; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.mp-pop { display: flex; flex-direction: column; gap: 3px; min-width: 210px; font-family: var(--font); }
.mp-pop b { font-size: .98rem; } .mp-pop small { color: #5a6a60; }
.mp-st { font-size: .8rem; font-weight: 600; color: var(--c); }
.mp-pop-a { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.mp-pop-a .btn { min-height: 32px; padding: 5px 10px; text-decoration: none; }
.mp-pop-a .btn.primary { color: #fff; }
.leaflet-popup-content-wrapper { border-radius: 16px; box-shadow: 0 14px 30px rgba(0,0,0,.25); }
@media (max-width: 960px) { .mp-wrap { grid-template-columns: 1fr; } .mp-map { height: 58vh; } .mp-side { max-height: none; } }

/* =================== Connexion : choix de l'espace =================== */
.login-choose, .login-form form { width: 100%; }
.login-choose h1 { margin-bottom: 4px; }
.lc-cards { display: grid; gap: 14px; margin: 22px 0 18px; }
.lc-card { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; padding: 18px 18px; border-radius: 20px; border: 0; cursor: pointer; text-decoration: none; color: var(--ink);
  background: var(--surface); box-shadow: var(--d-hi), var(--d-2); transition: transform .18s, box-shadow .18s; font: inherit; }
.lc-card:hover, .lc-card:focus-visible { transform: translateY(-3px); box-shadow: var(--d-hi), var(--d-3); text-decoration: none; outline: none; }
.lc-card:active { transform: translateY(0) scale(.99); }
.lc-ic { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: var(--g-primary); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,0,0,.12), 0 6px 14px rgba(27,115,64,.35); }
.lc-ic.gold { background: var(--g-gold); color: #3A2A06; box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 0 rgba(0,0,0,.10), 0 6px 14px rgba(176,122,20,.35); }
.lc-ic svg { width: 26px; height: 26px; }
.lc-tx { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.lc-tx b { font-family: var(--font-title); font-size: 1.12rem; }
.lc-tx small { color: var(--ink-3); font-size: .88rem; }
.lc-arrow { color: var(--ink-3); } .lc-arrow svg { width: 22px; height: 22px; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px; padding: 8px 14px 8px 10px; border-radius: 999px; border: 0; cursor: pointer; font: 600 .9rem var(--font); color: var(--primary); text-decoration: none;
  background: var(--primary-soft); box-shadow: var(--d-hi), var(--d-1); transition: transform .15s, box-shadow .15s; }
.back-btn:hover { transform: translateX(-2px); box-shadow: var(--d-hi), var(--d-2); text-decoration: none; }
.back-btn svg { width: 18px; height: 18px; }
.fx-swap { animation: fxSwap .35s cubic-bezier(.2, .85, .25, 1) both; }
@keyframes fxSwap { from { opacity: 0; transform: perspective(900px) rotateY(-8deg) translateX(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fx-swap { animation: none; } }
.credit .support-contact:not(:empty)::before { content: "·"; margin: 0 8px; opacity: .6; }
.side-credit .support-contact a { color: inherit; }

/* =================== Notifications : panneau type messagerie =================== */
.np-bg { position: fixed; inset: 0; z-index: 900; background: rgba(10, 30, 18, 0); transition: background .22s; }
.np-bg.open { background: rgba(10, 30, 18, .28); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.np { position: absolute; top: 10px; right: 10px; bottom: 10px; width: min(440px, calc(100vw - 20px)); display: flex; flex-direction: column; background: var(--surface); border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 30px 80px rgba(10, 40, 22, .35); transform: translateX(30px); opacity: 0; transition: transform .25s cubic-bezier(.2,.85,.25,1), opacity .2s; overflow: hidden; }
.np-bg.open .np { transform: none; opacity: 1; }
.np-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 18px 18px 10px; }
.np-h h2 { margin: 0; font-size: 1.3rem; }
.np-sub { color: var(--ink-3); font-size: .82rem; }
.np-ha { display: flex; align-items: center; gap: 6px; }
.np-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--line-2); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.np-x svg { width: 18px; height: 18px; } .np-x:hover { background: var(--line); }
.np-f { display: flex; gap: 6px; padding: 0 16px 12px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line-2); }
.np-f button { flex: none; border: 0; border-radius: 999px; padding: 7px 13px; font: 600 .82rem var(--font); color: var(--ink-2); background: var(--line-2); cursor: pointer; transition: background .15s, color .15s; }
.np-f button.on { background: var(--primary); color: #fff; box-shadow: 0 3px 8px rgba(27,115,64,.3); }
.np-list { flex: 1; overflow-y: auto; padding: 4px 8px 10px; }
.np-day { position: sticky; top: 0; z-index: 1; padding: 12px 10px 6px; font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); background: var(--surface); }
.np-item { position: relative; display: flex; gap: 12px; padding: 11px 12px; border-radius: 14px; color: var(--ink); text-decoration: none; transition: background .12s; }
.np-item:hover { background: var(--line-2); text-decoration: none; }
.np-item.unread { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.np-item.unread:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.np-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.np-t { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.np-t b { font-weight: 500; font-size: .93rem; line-height: 1.3; }
.np-item.unread .np-t b { font-weight: 700; }
.np-t time { flex: none; font-size: .74rem; color: var(--ink-3); white-space: nowrap; }
.np-item.unread .np-t time { color: var(--primary); font-weight: 600; }
.np-b { font-size: .85rem; color: var(--ink-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.np-u { position: absolute; right: 12px; bottom: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.nt-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.nt-ic svg { width: 20px; height: 20px; }
.nt-pay { background: #E4F3E8; color: #1B7340; } .nt-req { background: #E6EEFB; color: #2155B8; } .nt-alert { background: #FCEBE4; color: #B4432A; }
.nt-msg { background: #F1E9FB; color: #6D3CB3; } .nt-sys { background: var(--line-2); color: var(--ink-2); }
.np-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 60px 20px; color: var(--ink-3); text-align: center; }
.np-empty svg { width: 44px; height: 44px; opacity: .5; } .np-empty b { color: var(--ink-2); }
.np-foot { border-top: 1px solid var(--line-2); padding: 12px 14px; }
.np-push { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--line-2); }
.np-push > div { flex: 1; display: flex; flex-direction: column; gap: 2px; } .np-push b { font-size: .88rem; } .np-push small { color: var(--ink-3); font-size: .78rem; line-height: 1.35; }
.np-push.on { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.np-push.warn { background: var(--warning-soft, #FFF4DB); }
.np-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 20%, transparent); flex: none; }
@media (prefers-color-scheme: dark) { .nt-pay { background: #17331F; color: #8FD6A8; } .nt-req { background: #1A2740; color: #9DB8EE; } .nt-alert { background: #3A2119; color: #F0A58F; } .nt-msg { background: #2B2140; color: #C8A9F0; } }
@media (max-width: 600px) { .np { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; } }

/* =================== Messagerie =================== */
.mx { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - 300px); min-height: 480px; background: var(--surface); border-radius: 22px; overflow: hidden; box-shadow: var(--d-hi), var(--d-2); }
.mx-side { display: flex; flex-direction: column; border-right: 1px solid var(--line-2); min-height: 0; }
.mx-search { padding: 14px 14px 8px; } .mx-new { margin: 0 14px 10px; justify-content: center; }
.mx-threads { flex: 1; overflow-y: auto; padding: 0 8px 10px; }
.mx-none { padding: 14px; }
.mx-th { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border: 0; border-radius: 14px; background: none; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.mx-th:hover { background: var(--line-2); } .mx-th.on { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.mx-av { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 700 .9rem var(--font); color: #fff;
  background: linear-gradient(145deg, hsl(var(--h) 45% 48%), hsl(var(--h) 50% 34%)); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 3px 8px rgba(0,0,0,.15); }
.mx-th-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mx-th-t { display: flex; justify-content: space-between; gap: 8px; } .mx-th-t b { font-weight: 600; font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-th-t time { flex: none; font-size: .72rem; color: var(--ink-3); }
.mx-th-l { font-size: .83rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-th.unread .mx-th-t b, .mx-th.unread .mx-th-l { color: var(--ink); font-weight: 700; } .mx-th.unread time { color: var(--primary); font-weight: 600; }
.mx-badge { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--primary); color: #fff; font: 700 .72rem/20px var(--font); text-align: center; }
.mx-tick { font-style: normal; font-size: .72rem; letter-spacing: -3px; margin-right: 6px; color: var(--ink-3); } .mx-tick.read { color: #2F80ED; }
.mx-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 3%, var(--surface)), var(--surface)); }
.mx-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink-3); } .mx-empty svg { width: 56px; height: 56px; opacity: .45; } .mx-empty b { color: var(--ink-2); }
.mx-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: var(--surface); }
.mx-head div { display: flex; flex-direction: column; } .mx-head small { color: var(--ink-3); }
.mx-back { display: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--line-2); color: var(--ink); cursor: pointer; place-items: center; } .mx-back svg { width: 20px; height: 20px; }
.mx-msgs { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.mx-start { margin: auto; color: var(--ink-3); }
.mx-day { text-align: center; margin: 10px 0 4px; } .mx-day span { font-size: .74rem; font-weight: 600; color: var(--ink-3); background: var(--surface); padding: 4px 12px; border-radius: 999px; box-shadow: var(--d-1); }
.mx-msg { display: flex; } .mx-msg.me { justify-content: flex-end; }
.mx-bub { max-width: min(72%, 520px); padding: 9px 12px 6px; border-radius: 18px 18px 18px 6px; background: var(--surface); box-shadow: 0 1px 2px rgba(16,60,33,.08), 0 4px 10px rgba(16,60,33,.05); display: flex; flex-direction: column; gap: 3px; }
.mx-msg.me .mx-bub { border-radius: 18px 18px 6px 18px; background: linear-gradient(180deg, #2E9A57, #1B7340); color: #fff; }
.mx-txt { white-space: pre-wrap; word-wrap: break-word; line-height: 1.45; font-size: .93rem; }
.mx-subj { font-size: .88rem; } .mx-tag { align-self: flex-start; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: #FCEBE4; color: #B4432A; }
.mx-meta { align-self: flex-end; font-size: .7rem; opacity: .7; } .mx-msg.me .mx-tick { color: rgba(255,255,255,.75); } .mx-msg.me .mx-tick.read { color: #CFE6FF; }
.mx-send { display: flex; gap: 10px; align-items: flex-end; padding: 12px 14px; border-top: 1px solid var(--line-2); background: var(--surface); }
.mx-send textarea { flex: 1; resize: none; border-radius: 22px; padding: 11px 16px; min-height: 44px; max-height: 140px; line-height: 1.4; }
.mx-go { width: 46px; height: 46px; border-radius: 50%; padding: 0; justify-content: center; flex: none; } .mx-go svg { width: 20px; height: 20px; }
@media (max-width: 860px) {
  .mx { grid-template-columns: 1fr; height: calc(100vh - 210px); }
  .mx .mx-main { display: none; } .mx.in-thread .mx-side { display: none; } .mx.in-thread .mx-main { display: flex; } .mx-back { display: grid; }
}

/* =================== Service client et annonces =================== */
.sc .mx-side .np-f { padding: 0 14px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.sc-tag { display: inline-block; font-style: normal; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 7px; border-radius: 999px; margin-right: 6px; background: var(--line-2); color: var(--ink-2); vertical-align: 1px; }
.sc-tag.bad { background: #FCEBE4; color: #B4432A; } .sc-tag.info { background: #E6EEFB; color: #2155B8; } .sc-tag.warn { background: #FFF2D6; color: #8A5E0A; }
.mx-bub .sc-tag { align-self: flex-start; margin: 0 0 2px; }
.sc-done { color: var(--primary); font-weight: 700; }
.sc-hacts { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mx-head > div { min-width: 0; }
.mx-msg.auto .mx-bub { background: var(--line-2); color: var(--ink-2); font-style: italic; }
.mx-msg.auto .mx-tick { color: var(--ink-3); }
.sc-quick { display: flex; gap: 6px; padding: 8px 14px 0; overflow-x: auto; scrollbar-width: none; background: var(--surface); border-top: 1px solid var(--line-2); }
.sc-q { flex: none; border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); background: color-mix(in srgb, var(--primary) 6%, transparent); color: var(--primary); border-radius: 999px; padding: 6px 12px; font: 600 .78rem var(--font); cursor: pointer; }
.sc-quick + .mx-send { border-top: 0; }
.ga-new { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--line-2); margin-bottom: 14px; }
.ga-kinds { display: flex; gap: 14px; flex-wrap: wrap; font-weight: 600; font-size: .9rem; }
.ga-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ga-list { display: grid; gap: 10px; max-height: 50vh; overflow-y: auto; }
.ga-item { padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--d-1); border-left: 4px solid var(--primary); }
.ga-item.rappel { border-left-color: #E8A21C; } .ga-item.urgent { border-left-color: #C2412F; }
.ga-item p { margin: 4px 0; white-space: pre-wrap; } .ga-item small { color: var(--ink-3); }
.ga-k { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }

/* Offres de l'application client */
.oc-legend { margin-bottom: 12px; }
.oc-list { display: grid; gap: 10px; }
.oc-item { display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--d-hi), var(--d-1); opacity: .72; }
.oc-item.on { opacity: 1; box-shadow: var(--d-hi), var(--d-2); }
.oc-ord { display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 700; color: var(--ink-3); }
.oc-ord .btn { min-height: 26px; padding: 0 8px; font-size: .7rem; }
.oc-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .oc-tx small { color: var(--ink-3); } .oc-tx p { margin: 4px 0 0; font-size: .88rem; color: var(--ink-2); }
.oc-k { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--primary); }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .82rem; font-weight: 600; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 44px; height: 26px; border-radius: 999px; background: var(--line); position: relative; transition: background .18s; box-shadow: inset 0 1px 3px rgba(0,0,0,.15); }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.25); transition: transform .18s; }
.switch input:checked + span { background: var(--primary); } .switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.switch em { font-style: normal; min-width: 60px; }
@media (max-width: 700px) { .oc-item { grid-template-columns: auto 1fr; } .oc-item .switch, .oc-item [data-edit] { grid-column: 2; justify-self: start; } }

/* =================== Transferts =================== */
.tr-puces { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 14px 0; }
.tr-puce { padding: 14px 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--d-hi), var(--d-2); display: flex; flex-direction: column; gap: 2px; }
.tr-puce.low { box-shadow: var(--d-hi), var(--d-2), inset 0 0 0 2px #E8A21C; }
.tr-pn { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--primary); }
.tr-puce b { font: 700 1.45rem var(--font-title); } .tr-puce small { color: var(--ink-3); }
.tr-pa { display: flex; gap: 6px; margin-top: 8px; }
.tr-h { margin: 18px 0 10px; }
.tr-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.tr-act { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 16px; border: 0; border-radius: 18px; background: var(--surface); box-shadow: var(--d-hi), var(--d-2); cursor: pointer; text-align: left; font: inherit; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.tr-act:hover { transform: translateY(-3px); box-shadow: var(--d-hi), var(--d-3); }
.tr-ai { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.tr-act.in .tr-ai { background: #E4F3E8; color: #1B7340; } .tr-act.out .tr-ai { background: #FCEBE4; color: #B4432A; }
.tr-act b { font-family: var(--font-title); font-size: 1.05rem; } .tr-act small { color: var(--ink-3); font-size: .82rem; line-height: 1.35; }
.tr-act em { margin-top: 6px; font-style: normal; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.tr-ctl { display: grid; gap: 10px; margin-top: 12px; }
.tr-cr { display: grid; grid-template-columns: 200px 180px 1fr 140px; gap: 10px; align-items: center; }
.tr-cr > div { display: flex; flex-direction: column; } .tr-cr small { color: var(--ink-3); }
.tr-gap { font-weight: 700; font-size: .88rem; } .tr-gap.bad { color: #B4432A; } .tr-gap.ok { color: var(--primary); }
.tr-svcs { display: grid; gap: 10px; margin-top: 12px; }
.tr-svc { display: grid; grid-template-columns: 220px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--d-hi), var(--d-1); }
.tr-svc.off { opacity: .6; } .tr-svc > div:first-child { display: flex; flex-direction: column; } .tr-svc small { color: var(--ink-3); }
.tr-rates { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .84rem; color: var(--ink-2); }
@media (max-width: 760px) { .tr-cr { grid-template-columns: 1fr 1fr; } .tr-cr > div { grid-column: 1 / -1; } .tr-svc { grid-template-columns: 1fr; } }

/* Carnet : menu « Plus » et écran allégé */
.kmore { position: relative; display: inline-block; }
.kmore > summary { list-style: none; cursor: pointer; }
.kmore > summary::-webkit-details-marker { display: none; }
.kmore-m { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 240px; padding: 6px; border-radius: 14px; background: var(--card, #fff); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(10, 40, 20, .18); display: grid; gap: 2px; }
.kmi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: .92rem; color: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.kmi:hover { background: var(--bg, #f1f5f2); }
.kmi svg { width: 18px; height: 18px; flex: none; opacity: .75; }
.kmi.danger { color: var(--danger, #b42318); }
.kstats.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kstats.k3 .stat .v { font-size: 1.25rem; }
@media (max-width: 640px) { .kstats.k3 { grid-template-columns: 1fr 1fr; } .kstats.k3 .stat:first-child { grid-column: 1 / -1; } .kmore-m { position: fixed; left: 12px; right: 12px; top: auto; bottom: 90px; } }
.page-card .del-link { color: var(--danger, #b42318); background: none; box-shadow: none; border: 0; padding-left: 0; font-weight: 500; text-decoration: underline; }
.mat-bar { position: relative; height: 14px; border-radius: 99px; background: var(--line, #e5e7eb); overflow: hidden; margin: 4px 0 16px; }
.mat-bar span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #16a34a, #22c55e); border-radius: 99px; }
.mat-bar b { position: absolute; right: 8px; top: -1px; font-size: .72rem; }
.calc-box { padding: 10px 12px; border-radius: 10px; background: var(--bg, #f1f5f2); font-size: .92rem; }
.calc-box .bad { color: var(--danger, #b42318); }
.relay-code { font: 600 1.05rem/1.4 ui-monospace, monospace; padding: 12px; border-radius: 10px; background: var(--bg, #f1f5f2); word-break: break-all; user-select: all; }

/* ===== 1.35 : plein écran — aucune page ne défile sur le côté ===== */
html, body { overflow-x: hidden; max-width: 100%; }
.app, .main, .content { min-width: 0; }
.content > *, .panel, .page-head, .stats, .grid, .dash-grid > * { min-width: 0; max-width: 100%; }
.content img, .content svg, .content canvas, .content video { max-width: 100%; }
.page-head { flex-wrap: wrap; gap: 10px; }
.page-head .btns, .btns, .kbar, .dt-tools, .filters, .f { flex-wrap: wrap; }
.table-wrap { overflow-x: visible; }
table.dt { table-layout: auto; width: 100%; }
table.dt th { white-space: normal; line-height: 1.25; vertical-align: bottom; }
table.dt td { overflow-wrap: anywhere; word-break: normal; }
table.dt td.num, table.dt th.num { white-space: nowrap; overflow-wrap: normal; }
table.dt td.actions { white-space: normal; }
table.dt td.actions .btn { margin: 2px 0 2px 4px; }
pre, code { white-space: pre-wrap; overflow-wrap: anywhere; }
.tabs { flex-wrap: wrap; overflow-x: visible; }
.tabs a { white-space: nowrap; }
.chips-filter { flex-wrap: wrap; overflow-x: visible; }
/* Tableaux larges sur écran moyen : police un peu plus petite plutôt que défilement */
@media (max-width: 1400px) { table.dt.auto { font-size: .82rem; } table.dt.auto th, table.dt.auto td { padding: 6px 7px; } }
/* Tablette et téléphone : chaque ligne devient une fiche lisible (libellé à gauche, valeur à droite) */
@media (max-width: 900px) {
  table.dt.auto, table.dt.auto tbody, table.dt.auto tfoot { display: block; width: 100%; }
  table.dt.auto thead { display: none; }
  table.dt.auto tr { display: block; margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
  table.dt.auto tbody tr.clickable:active { transform: scale(.995); }
  table.dt.auto td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
  table.dt.auto td::before { content: attr(data-l); flex: none; max-width: 48%; text-align: left; color: var(--ink-2); font-size: .8rem; font-weight: 500; }
  table.dt.auto td.blank { display: none; }
  table.dt.auto td.actions { justify-content: flex-end; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed var(--line); margin-top: 4px; }
  table.dt.auto td.actions::before { content: none; }
  table.dt.auto tfoot tr { background: var(--line-2); font-weight: 600; }
  table.dt.auto tfoot td:empty { display: none; }
  table.dt:not(.auto) { font-size: .8rem; }
  table.dt:not(.auto) th, table.dt:not(.auto) td { padding: 5px 4px; }
}
@media (max-width: 900px) { table.dt:not(.auto) td .btn { white-space: normal; text-align: center; line-height: 1.2; } table.dt:not(.auto) td.n, table.dt:not(.auto) th.n { white-space: normal; } }
.in-app .dl-apps { display: none !important; }
.switch-row { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-weight: 500; cursor: pointer; }
.switch-row input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.steps-l { padding-left: 18px; line-height: 1.55; }
.staff-dl { margin-top: 18px; }
