/* =====================================================================
   Absences EAF — SKIN v2 « AURORA »
   Refonte audacieuse : identité indigo/violet/fuchsia (plus de rouge),
   typographie Space Grotesk (titres) + Inter (texte), titres en dégradé,
   navigation en pilules, fond de connexion aurora animée.
   Mêmes classes que les autres skins (aucune modification du HTML/JS).
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --ink: #17132b;
  --muted: #6b6685;
  --muted-2: #9b96b5;
  --line: #ece9f6;
  --bg: #f5f4fc;
  --card: #ffffff;

  --primary: #6d5efc;
  --primary-d: #5949e6;
  --violet: #a855f7;
  --fuchsia: #d946ef;
  --cyan: #22d3ee;

  --grad: linear-gradient(120deg, #6d5efc 0%, #a855f7 48%, #d946ef 100%);
  --grad-text: linear-gradient(100deg, #6d5efc, #c026d3);
  --grad-cool: linear-gradient(120deg, #6d5efc, #22d3ee);

  --emerald: #10b981;
  --emerald-s: #e7f9f1;
  --rose: #f43f5e;
  --rose-s: #ffeaee;
  --amber: #f59e0b;
  --amber-s: #fff4e0;

  --r: 22px;
  --r-sm: 14px;
  --pill: 999px;

  --sh-s: 0 2px 8px rgba(109,94,252,.08);
  --sh-m: 0 12px 32px -12px rgba(109,94,252,.30);
  --sh-l: 0 28px 64px -20px rgba(124,58,237,.42);
  --sh-glow: 0 10px 30px -8px rgba(109,94,252,.55);

  --fh: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --fb: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --t-fast: .16s cubic-bezier(.4,0,.2,1);
  --t: .28s cubic-bezier(.4,0,.2,1);
  --spring: .5s cubic-bezier(.34,1.56,.64,1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  width: 100%; max-width: 100%; overflow-x: hidden;
  font-family: var(--fb);
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.01em;
}
body {
  background-image:
    radial-gradient(900px 500px at 108% -8%, rgba(217,70,239,.10), transparent 60%),
    radial-gradient(820px 520px at -8% 4%, rgba(109,94,252,.12), transparent 58%),
    radial-gradient(700px 600px at 50% 120%, rgba(34,211,238,.08), transparent 60%);
  background-attachment: fixed;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Animations ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes drift { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(4%,-6%) scale(1.08); } 66% { transform: translate(-5%,4%) scale(.96); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(18px) scale(.96); } to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); } }
@keyframes sheen { 100% { background-position: 200% 0; } }

/* ---------- Titres en dégradé ---------- */
h1, h2, h3, .title, .balance-box .val { font-family: var(--fh); }

/* ---------- Splash ---------- */
.splash {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px; color: var(--muted);
  animation: fade .4s ease;
}
.spinner {
  width: 48px; height: 48px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--primary), var(--fuchsia), var(--cyan), var(--primary));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 0);
          mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 0);
  animation: spin .8s linear infinite;
}

/* ---------- Layout ---------- */
/* App-shell : seul le contenu défile, la topbar reste fixe en haut. */
.app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  position: sticky; top: 0; z-index: 30; flex: 0 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; padding-top: calc(14px + env(safe-area-inset-top));
  background: var(--grad);
  color: #fff;
  box-shadow: var(--sh-glow);
  border-bottom-left-radius: 22px; border-bottom-right-radius: 22px;
}
.topbar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.18), transparent 50%);
}
.topbar .tb-left { flex: 1; display: flex; align-items: center; justify-content: flex-start; }
.topbar .tb-center { flex: none; display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar .tb-right { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.topbar .logo { height: 40px; width: auto; border-radius: 12px; background: #fff; padding: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.topbar .title { font-weight: 700; font-size: 18px; letter-spacing: -.02em; white-space: nowrap; }
.topbar .who { font-size: 13px; text-align: right; line-height: 1.25; font-weight: 600; opacity: .98; }
.topbar .who small { display: block; opacity: .82; font-weight: 500; }
/* Croix de déconnexion */
.topbar .logout-x {
  flex: none; border: none; cursor: pointer;
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1; color: #fff;
  background: rgba(255,255,255,.16); backdrop-filter: blur(6px);
  transition: background var(--t-fast), transform var(--t-fast);
}
.topbar .logout-x:hover { background: rgba(255,255,255,.3); }
.topbar .logout-x:active { transform: scale(.92); }
@media (max-width: 560px) {
  .topbar .who { display: none; }
}

.content { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 22px 16px 30px; max-width: 1060px; width: 100%; margin: 0 auto; animation: fade .3s ease; }

/* ---------- Menu burger ---------- */
.topbar .burger {
  flex: none; border: none; cursor: pointer;
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1; color: #fff;
  background: rgba(255,255,255,.16); backdrop-filter: blur(6px);
  transition: background var(--t-fast), transform var(--t-fast);
}
.topbar .burger:hover { background: rgba(255,255,255,.3); }
.topbar .burger:active { transform: scale(.92); }

/* Voile de fond */
.navbackdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(23,19,43,.45); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity var(--t), visibility var(--t);
}
.navbackdrop.show { opacity: 1; visibility: visible; }

/* Tiroir latéral */
.navmenu {
  position: fixed; top: 0; left: 0; z-index: 50;
  width: 272px; max-width: 82vw; height: 100vh; height: 100dvh;
  background: var(--card); box-shadow: var(--sh-l);
  padding: calc(18px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
  transform: translateX(-100%); transition: transform var(--t);
}
.navmenu.open { transform: translateX(0); }
.navmenu button {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  border: none; background: transparent; cursor: pointer;
  font-family: var(--fb); font-size: 15px; font-weight: 600; color: var(--ink);
  padding: 13px 16px; border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.navmenu button .ico { font-size: 22px; line-height: 1; }
.navmenu button:hover { background: rgba(109,94,252,.08); color: var(--primary); }
.navmenu button:active { transform: scale(.97); }
.navmenu button.active { color: #fff; background: var(--grad); box-shadow: var(--sh-glow); }

/* ---------- Cartes ---------- */
.card {
  background: var(--card); border-radius: var(--r);
  padding: 22px; margin-bottom: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--sh-m);
  animation: rise .5s cubic-bezier(.4,0,.2,1) both;
  transition: box-shadow var(--t), transform var(--t);
}
.content > .card:nth-child(1) { animation-delay: .03s; }
.content > .card:nth-child(2) { animation-delay: .09s; }
.content > .card:nth-child(3) { animation-delay: .15s; }
.content > .card:nth-child(4) { animation-delay: .21s; }
.card:hover { box-shadow: var(--sh-l); transform: translateY(-2px); }
.card h2 {
  margin: 0 0 16px; font-size: 18px; font-weight: 700; letter-spacing: -.02em;
  display: flex; align-items: center; gap: 10px;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.card h2::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--grad); display: inline-block; box-shadow: var(--sh-glow);
}
.card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.section-title { font-size: 12px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .14em; font-weight: 700; margin: 4px 0 12px; }

h1.page {
  font-size: 28px; font-weight: 700; letter-spacing: -.03em; margin: 2px 0 20px;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Soldes ---------- */
.balances { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.balance-box {
  position: relative; overflow: hidden;
  background: var(--grad); color: #fff;
  border-radius: var(--r); padding: 22px;
  box-shadow: var(--sh-glow);
  animation: pop var(--spring) both;
  transition: transform var(--t);
}
.balance-box:nth-child(2) { animation-delay: .08s; }
.balance-box:hover { transform: translateY(-5px) rotate(-.4deg); }
.balance-box::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.16); }
.balance-box::before { content: ""; position: absolute; left: -24px; bottom: -34px; width: 90px; height: 90px; border-radius: 50%; background: rgba(255,255,255,.10); }
.balance-box .val { font-size: 36px; font-weight: 700; line-height: 1; letter-spacing: -.04em; }
.balance-box .unit { font-size: 12px; opacity: .9; margin-top: 4px; font-weight: 600; }
.balance-box .lbl { font-size: 13px; opacity: .96; margin-top: 10px; font-weight: 600; }

/* ---------- Formulaires ---------- */
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
input, select, textarea {
  width: 100%; padding: 12px 14px; font-family: var(--fb); font-size: 15px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: #fbfaff; color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
input:hover, select:hover, textarea:hover { border-color: #d9d4ee; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 4px rgba(109,94,252,.16);
}
textarea { resize: vertical; min-height: 72px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 150px; }
.checkbox-row { display: flex; align-items: center; gap: 9px; font-weight: 500; }
.checkbox-row input { width: auto; accent-color: var(--primary); }
.hint { font-size: 12.5px; color: var(--muted-2); margin-top: 6px; line-height: 1.55; }

/* ---------- Boutons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border: none; border-radius: var(--pill); cursor: pointer;
  font-family: var(--fb); font-size: 15px; font-weight: 700; letter-spacing: -.01em; text-decoration: none;
  color: #fff; background: var(--grad); background-size: 160% 160%;
  box-shadow: var(--sh-glow);
  transition: transform var(--t-fast), box-shadow var(--t-fast), background-position var(--t);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -10px rgba(124,58,237,.6); background-position: 100% 0; }
.btn:active { transform: translateY(0) scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; filter: grayscale(.3); }
.btn.secondary { background: #fff; color: var(--primary); border: 1.5px solid rgba(109,94,252,.4); box-shadow: var(--sh-s); }
.btn.secondary:hover { background: rgba(109,94,252,.07); box-shadow: var(--sh-m); }
.btn.ghost { background: #fff; color: var(--muted); border: 1.5px solid var(--line); box-shadow: var(--sh-s); }
.btn.ghost:hover { background: #f7f5ff; color: var(--ink); border-color: #ddd6f5; }
.btn.success { background: linear-gradient(120deg, #34d399, #10b981 60%, #059669); box-shadow: 0 10px 28px -10px rgba(16,185,129,.6); }
.btn.danger { background: linear-gradient(120deg, #fb7185, #f43f5e 60%, #e11d48); color: #fff; box-shadow: 0 10px 28px -10px rgba(244,63,94,.6); }
.btn.danger:hover { box-shadow: 0 14px 32px -10px rgba(244,63,94,.7); }
.btn.small { padding: 8px 15px; font-size: 13px; }
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Périodes ---------- */
.period {
  border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 16px; margin-bottom: 14px;
  background: linear-gradient(180deg, #fff, #fbfaff); position: relative; box-shadow: var(--sh-s);
  animation: rise .35s ease both;
}
.period::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 4px; background: var(--grad); }
.period .remove {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px;
  background: #f4f1ff; border: none; color: var(--muted); font-size: 18px; cursor: pointer;
  line-height: 1; border-radius: 10px; transition: all var(--t-fast);
}
.period .remove:hover { background: var(--rose-s); color: var(--rose); transform: rotate(90deg); }
.period .period-num { font-size: 11px; color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 8px; padding-left: 10px; }

/* ---------- Listes de demandes ---------- */
.request-item {
  background: var(--card); border-radius: var(--r-sm); padding: 16px; margin-bottom: 12px; cursor: pointer;
  border: 1px solid var(--line); box-shadow: var(--sh-s);
  position: relative; overflow: hidden;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  animation: rise .3s ease both;
}
.request-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--muted-2); }
.request-item:hover { transform: translateX(4px); box-shadow: var(--sh-m); }
.request-item.statut-valide::before { background: linear-gradient(var(--emerald), #34d399); }
.request-item.statut-refuse::before { background: linear-gradient(var(--rose), #fb7185); }
.request-item.statut-en_attente::before { background: linear-gradient(var(--amber), #fbbf24); }
.request-item .ri-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.request-item .ri-types { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.request-item .ri-meta { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; padding: 5px 13px; border-radius: var(--pill); font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 7px; }
.badge.valide { background: var(--emerald-s); color: #0a7d54; }
.badge.refuse { background: var(--rose-s); color: #c01e3c; }
.badge.en_attente { background: var(--amber-s); color: #a96a00; }
.badge.brouillon { background: #eef0f6; color: var(--muted); }
.badge.annule { background: #f0eef7; color: var(--muted-2); }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-sm); border: 1px solid var(--line); }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.data th { background: #f6f4fe; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; padding: 12px; text-align: left; }
table.data td { padding: 13px 12px; text-align: left; border-bottom: 1px solid var(--line); }
table.data tbody tr { transition: background var(--t-fast); }
table.data tbody tr:hover td { background: #faf8ff; }
table.data tbody tr:last-child td { border-bottom: none; }

/* ---------- Calendrier ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-head strong { font-family: var(--fh); font-size: 17px; font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--muted-2); font-weight: 700; padding: 4px 0; text-transform: uppercase; letter-spacing: .08em; }
.cal-cell { min-height: 72px; border: 1px solid var(--line); border-radius: 12px; padding: 6px; font-size: 11px; background: #fff; transition: box-shadow var(--t-fast), transform var(--t-fast); }
.cal-cell:hover { box-shadow: var(--sh-m); transform: translateY(-2px); }
.cal-cell.out { background: #f7f5fd; border-style: dashed; color: #c8c3de; }
.cal-cell.we { background: #f9f7ff; }
.cal-cell .num { font-weight: 700; font-size: 12px; color: var(--muted); }
.cal-ev { display: block; background: rgba(109,94,252,.12); color: #fff; border-radius: 7px; padding: 2px 7px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 10.5px; }
.cal-ev.attente { opacity: .6; border: 1px dashed rgba(23,19,43,.45); }
.cal-cell { cursor: pointer; }
.cal-cell.out { cursor: default; }
.cal-cell.sel { box-shadow: 0 0 0 2px var(--primary); }

/* Détail du jour cliqué */
.cal-detail { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.cal-detail-title { font-family: var(--fh); font-size: 15px; margin: 0 0 10px; }
.cal-detail-list { display: flex; flex-direction: column; gap: 8px; }
.cal-detail-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: #f7f5fd; border-left: 3px solid var(--primary);
}
.cal-detail-item.attente { border-left-style: dashed; opacity: .85; }
.cal-detail-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.cal-detail-name { font-weight: 700; }
.cal-detail-type { color: var(--muted); font-size: 13px; }
.cal-detail-item .st { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted-2); }
.cal-detail-item.attente .st { color: #a96a00; }

/* Légende des couleurs de types */
.cal-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 14px 0 4px; font-size: 12px; color: var(--muted); }
.cal-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }

/* Pastille de couleur dans la liste des types */
.type-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }

/* ---------- Graphique d'évolution des soldes ---------- */
.chart-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; font-size: 13px; color: var(--muted); }
.chart-controls input[type="date"] { width: auto; }
.chart-plot { width: 100%; }
.chart-svg { display: block; width: 100%; height: auto; }
.chart-panel { width: 100%; }
.chart-panel + .chart-panel { margin-top: 4px; }
.chart-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--muted); }
.chart-legend-item { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend-line { display: inline-block; width: 18px; height: 3px; border-radius: 2px; }

/* ---------- Calendrier sur smartphone : grille compacte + pastilles ---------- */
@media (max-width: 560px) {
  .cal-grid { gap: 3px; }
  .cal-dow { font-size: 9px; padding: 2px 0; letter-spacing: .02em; }
  .cal-cell { min-height: 46px; padding: 3px; border-radius: 8px; }
  .cal-cell .num { font-size: 11px; }
  /* Les événements deviennent de simples pastilles colorées alignées. */
  .cal-cell .cal-ev {
    display: inline-block; width: 7px; height: 7px; padding: 0; margin: 2px 2px 0 0;
    border-radius: 50%; text-indent: -9999px; overflow: hidden;
    background: var(--primary);
  }
  .cal-cell .cal-ev.attente { opacity: .5; border: 1px dashed rgba(23,19,43,.5); }
  .cal-cell .hint { font-size: 9px; margin-top: 1px; }
}

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 22px;
  position: relative; overflow: hidden;
  background: #0e0a24;
}
.login-wrap::before, .login-wrap::after, .login-card { will-change: transform; }
.login-wrap::before {
  content: ""; position: absolute; width: 60vw; height: 60vw; border-radius: 50%; top: -18%; left: -12%;
  background: radial-gradient(circle, rgba(109,94,252,.9), transparent 62%);
  filter: blur(40px); animation: drift 13s ease-in-out infinite;
}
.login-wrap::after {
  content: ""; position: absolute; width: 55vw; height: 55vw; border-radius: 50%; bottom: -22%; right: -14%;
  background: radial-gradient(circle, rgba(217,70,239,.8), transparent 60%);
  filter: blur(44px); animation: drift 17s ease-in-out infinite reverse;
}
.login-card {
  position: relative; z-index: 1;
  background: rgba(255,255,255,.10); backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 28px; box-shadow: 0 30px 80px -24px rgba(0,0,0,.6);
  padding: 38px 32px; width: 100%; max-width: 410px; text-align: center; color: #fff;
  animation: pop var(--spring) both;
}
.login-card img { height: 60px; margin-bottom: 12px; border-radius: 14px; background: #fff; padding: 6px; }
.login-card h1 { font-family: var(--fh); font-size: 26px; font-weight: 700; letter-spacing: -.03em; margin: 8px 0 4px; color: #fff; }
.login-card p.sub { color: rgba(255,255,255,.75); font-size: 14px; margin: 0 0 24px; }
.login-card form { text-align: left; }
.login-card label { color: rgba(255,255,255,.8); }
.login-card input {
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff;
}
.login-card input::placeholder { color: rgba(255,255,255,.5); }
.login-card input:focus { background: rgba(255,255,255,.18); border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.18); }
.login-card .btn { width: 100%; margin-top: 24px; background: #fff; color: var(--primary-d); box-shadow: 0 14px 34px -10px rgba(0,0,0,.5); }
.login-card .btn:hover { background: #fff; transform: translateY(-2px); }

/* ---------- Divers ---------- */
.empty { text-align: center; color: var(--muted); padding: 44px 14px; animation: fade .4s ease; }
.empty .big { font-size: 50px; margin-bottom: 10px; }
.error-text { color: var(--rose); font-size: 13px; margin-top: 10px; font-weight: 600; }
.pill-filter { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 16px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.page-actions .spacer { flex: 1; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%) translateY(18px);
  background: rgba(23,19,43,.96); color: #fff; padding: 14px 24px; border-radius: var(--pill);
  font-size: 14px; font-weight: 600; box-shadow: var(--sh-l); backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; z-index: 100; max-width: 90%; border: 1px solid rgba(255,255,255,.1);
}
.toast.show { animation: toastIn .32s cubic-bezier(.34,1.56,.64,1) forwards; }
.toast.err { background: linear-gradient(120deg, #fb7185, #e11d48); }
.toast.ok { background: linear-gradient(120deg, #34d399, #059669); }

/* ---------- Modale ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(23,19,43,.55); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 18px; z-index: 50; animation: fade .2s ease; }
.modal { background: #fff; border-radius: 26px; padding: 28px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; box-shadow: var(--sh-l); animation: pop .34s cubic-bezier(.34,1.56,.64,1) both; }
.modal h2 { font-family: var(--fh); margin: 0 0 18px; font-size: 19px; font-weight: 700; letter-spacing: -.02em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Scrollbar (desktop) ---------- */
@media (pointer: fine) {
  ::-webkit-scrollbar { width: 12px; height: 12px; }
  ::-webkit-scrollbar-thumb { background: #d6cff0; border-radius: 10px; border: 3px solid var(--bg); }
  ::-webkit-scrollbar-thumb:hover { background: var(--primary); }
}

/* ---------- Responsive ---------- */
@media (min-width: 720px) {
  .tabbar { position: static; border-top: none; border-radius: var(--pill); margin: 14px auto 0; max-width: 720px; box-shadow: var(--sh-m); }
  .tabbar button { flex-direction: row; gap: 8px; font-size: 13.5px; padding: 11px 16px; }
}
@media (max-width: 480px) {
  .balances { grid-template-columns: 1fr; }
  .balance-box { display: flex; align-items: center; justify-content: space-between; }
  .balance-box .lbl { margin-top: 0; }
  h1.page { font-size: 24px; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
