/* ============================================================
   THEME ADN_PAY — Palette from logo: #0099CC → #30B880
   ============================================================ */

/* ─── VARIABLES ─── */
:root {
  --bg-deepest: #0f172a;
  --bg-panel: #1a2332;
  --bg-card: #1e293b;
  --bg-card-hover: #253244;
  --bg-input: #131d2b;
  --bg-hover: #263247;

  --blue-500: #0099CC;
  --blue-600: #0088B3;
  --blue-700: #007099;
  --blue-glow: rgba(0, 153, 204, 0.25);
  --blue-border: rgba(0, 153, 204, 0.15);

  --green-teal: #30B880;
  --green-glow: rgba(48, 184, 128, 0.25);

  --adn-gradient: linear-gradient(135deg, #0099CC, #30B880);
  --adn-gradient-hover: linear-gradient(135deg, #0088B3, #28A070);

  --gold-400: #fbbf24;
  --gold-500: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.25);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --success-glow: rgba(16, 185, 129, 0.25);

  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --danger-glow: rgba(239, 68, 68, 0.25);

  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);

  --info: #0099CC;
  --info-bg: rgba(0, 153, 204, 0.1);

  --text-primary: #e8edf4;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --border: rgba(0, 153, 204, 0.12);
  --border-subtle: rgba(255, 255, 255, 0.05);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
  --shadow-blue: 0 0 25px rgba(0, 153, 204, 0.1);
  --shadow-gold: 0 0 25px rgba(245, 158, 11, 0.1);

  --font-mono: 'Courier New', Courier, monospace;
  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  /* Typographie de marque : sans-serif géométrique (charte ADN_pay) */
  --font-display: 'Sora', 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* ─── RESET / BASE ─── */
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-deepest) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-sans);
  font-size: 14px;
  min-height: 100vh;
}

a { color: var(--blue-500); text-decoration: none; transition: 0.2s; }
a:hover { color: var(--blue-400); text-decoration: underline; }

::selection { background: var(--blue-600); color: white; }

/* ─── TYPOGRAPHIE DE MARQUE ─── */
/* Titres et éléments forts en sans-serif géométrique (Sora) */
h1, h2, h3, h4, h5, h6,
.section-title,
.cyber-panel h3,
.page-header h3,
.balance-value,
.auth-title,
.btn-adn,
.adncorp-sidebar {
  font-family: var(--font-display);
}

/* Wordmark texte ADN_pay (charte : "ADN" majuscules + "_pay" minuscules) */
.adn-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
}
.adn-wordmark .wm-adn {
  text-transform: uppercase;
  background: var(--adn-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.adn-wordmark .wm-pay {
  text-transform: lowercase;
  font-weight: 600;
  color: var(--green-teal);
  margin-left: 1px;
}

/* ─── JAUGE DE FORCE MOT DE PASSE ─── */
.pwd-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.pwd-meter-track {
  flex: 1;
  height: 4px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
}
.pwd-meter-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.25s ease, background 0.25s ease;
}
.pwd-meter-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  min-width: 38px;
  text-align: right;
}

/* ─── KYC : champs manquants ─── */
.kyc-missing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 12px 14px;
  background: var(--warning-bg);
  border: 1px solid var(--warning);
  border-radius: var(--radius-md);
  font-size: 0.72rem;
  color: var(--warning);
}
.kyc-missing-chip {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--text-primary);
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 600;
}

/* ─── LAYOUT ─── */
.page {
  display: flex;
  min-height: 100vh;
  background: var(--bg-deepest);
  position: relative;
}
.page::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 12% -5%, rgba(0, 153, 204, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 88% 105%, rgba(48, 184, 128, 0.08) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] .page::before {
  background:
    radial-gradient(ellipse 80% 55% at 12% -5%, rgba(0, 153, 204, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 88% 105%, rgba(48, 184, 128, 0.06) 0%, transparent 55%);
}

.sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 40% at 50% 0%, rgba(0, 153, 204, 0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.sidebar > * {
  position: relative;
  z-index: 1;
}

.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.top-bar {
  height: 64px;
  background: rgba(12, 21, 38, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.content-area {
  flex: 1;
  padding: 32px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Auth layout (non connecté) */
.auth-layout {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* ─── SIDEBAR LOGO ─── */
.logo-area {
  padding: 32px 20px;
  text-align: center;
}

.sidebar-logo {
  display: block;
  margin: 0 auto;
  max-width: 90%;
  max-height: 60px;
  object-fit: contain;
  background: transparent !important;
}

.auth-logo {
  display: block;
  margin: 0 auto 16px;
  max-width: 260px;
  height: auto;
  background: transparent !important;
}

.logo-text {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 3px;
  color: var(--text-primary);
}

.logo-text .adn-grad {
  background: var(--adn-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text .pay-suffix {
  font-size: 0.7rem;
  color: var(--green-teal);
  font-style: italic;
  margin-left: 4px;
}

.logo-divider {
  height: 2px;
  width: 70%;
  margin: 8px auto;
  background: linear-gradient(90deg, transparent, #0099CC, #30B880, transparent);
  opacity: 0.5;
}

.adncorp-sidebar {
  font-size: 0.55rem;
  text-align: center;
  color: var(--text-muted);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 300;
  margin-top: 2px;
  opacity: 0.6;
}

.adn-logo-svg {
  display: block;
  margin: 0 auto 8px;
}

/* ─── NAV MENU ─── */
.nav-list {
  list-style: none;
  padding: 8px;
  margin: 0;
}

.nav-item {
  margin-bottom: 2px;
}

.nav-link-custom {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: 0.2s;
  text-decoration: none;
  border-left: 3px solid transparent;
}

.nav-link-custom:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  text-decoration: none;
}

.nav-link-custom.active {
  background: var(--info-bg);
  color: var(--blue-500);
  border-left-color: var(--blue-500);
  box-shadow: inset 3px 0 0 var(--blue-500), 0 0 12px rgba(0, 212, 255, 0.08);
}

.nav-link-custom i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

/* ─── HAMBURGER MENU ─── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: 0.2s;
}

.hamburger:hover span {
  background: var(--text-primary);
}

/* ─── SIDEBAR OVERLAY (mobile) ─── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── TOP BAR ─── */
.server-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.server-status .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 6px;
  box-shadow: 0 0 6px var(--success-glow);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Badge de solde dans la barre — visible sur tous les modules,
   affiche l'équivalent en euros (indicatif, non cliquable) */
.solde-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 153, 204, 0.16), rgba(48, 184, 128, 0.16));
  border: 1px solid rgba(48, 184, 128, 0.35);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}
.solde-badge i {
  color: var(--success);
  font-size: 0.9rem;
}
.solde-badge-value {
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .solde-badge {
    padding: 5px 10px;
    font-size: 0.78rem;
  }
  .solde-badge i { display: none; }
}

.user-badge {
  text-align: right;
}

.user-badge .rank {
  font-size: 0.55rem;
  color: var(--blue-500);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.user-badge .name {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* Compteur de notifications non lues dans un onglet (Paramètres) */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--danger);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
}

.notif-bell {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
  font-size: 0.85rem;
  position: relative;
}

.notif-bell:hover {
  border-color: var(--blue-500);
  color: var(--blue-500);
  box-shadow: 0 0 8px var(--blue-glow);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  font-size: 0.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px var(--danger-glow);
}

.theme-toggle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--gold-500);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
  font-size: 0.9rem;
}

.theme-toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--gold-400);
  box-shadow: 0 0 12px var(--gold-glow);
}

/* ─── AUTH PAGES (Login / Register) ─── */
.auth-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

/* ─── LOGIN PAGE: glass card + animated background ─── */
.login-page {
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0f1e 0%, #141b2d 30%, #1a1f35 60%, #0f172a 100%);
}
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(0, 153, 204, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(48, 184, 128, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 153, 204, 0.05) 0%, transparent 40%);
  animation: loginBgShift 10s ease-in-out infinite alternate;
  pointer-events: none;
}
.login-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
  z-index: 0;
}
@keyframes loginBgShift {
  0%   { transform: scale(1) rotate(0deg); opacity: 0.8; }
  100% { transform: scale(1.1) rotate(3deg); opacity: 1; }
}

/* Floating glass shapes */
.login-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}
.login-shape-1 {
  width: 300px; height: 300px;
  background: rgba(0, 153, 204, 0.15);
  top: -80px; left: -100px;
  animation: shapeFloat1 14s ease-in-out infinite;
}
.login-shape-2 {
  width: 200px; height: 200px;
  background: rgba(48, 184, 128, 0.10);
  bottom: -40px; right: -60px;
  animation: shapeFloat2 12s ease-in-out infinite reverse;
}
.login-shape-3 {
  width: 150px; height: 150px;
  background: rgba(0, 153, 204, 0.08);
  bottom: 30%; left: -80px;
  animation: shapeFloat3 16s ease-in-out infinite;
}
.login-shape-4 {
  width: 100px; height: 100px;
  background: rgba(0, 153, 204, 0.12);
  top: 20%; right: -30px;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: shapeFloat4 10s ease-in-out infinite alternate;
}
.login-shape-5 {
  width: 180px; height: 180px;
  background: rgba(57, 255, 20, 0.06);
  top: 60%; left: 60%;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: shapeFloat5 18s ease-in-out infinite;
  filter: blur(80px);
}

@keyframes shapeFloat1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, 30px) scale(1.1); }
  100% { transform: translate(20px, -20px) scale(0.95); }
}
@keyframes shapeFloat2 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-30px, -40px) scale(1.15); }
  100% { transform: translate(20px, 20px) scale(0.9); }
}
@keyframes shapeFloat3 {
  0%   { transform: translate(0, 0) rotate(0deg); }
  50%  { transform: translate(50px, -20px) rotate(180deg); }
  100% { transform: translate(10px, 30px) rotate(360deg); }
}
@keyframes shapeFloat4 {
  0%   { transform: translate(0, 0) scale(1) rotate(0deg); }
  100% { transform: translate(-20px, -30px) scale(1.2) rotate(90deg); }
}
@keyframes shapeFloat5 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(-60px, 40px) scale(1.3); }
  66%  { transform: translate(40px, -30px) scale(0.8); }
  100% { transform: translate(-10px, 10px) scale(1.1); }
}

/* Login glass card */
.login-page .auth-card {
  position: relative;
  z-index: 1;
  background: rgba(26, 35, 50, 0.65);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid rgba(0, 212, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    0 0 40px rgba(0, 212, 255, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.04);
  width: 100%;
  max-width: 400px;
  transition: box-shadow 0.4s ease;
}
.login-page .auth-card:hover {
  box-shadow:
    0 24px 70px rgba(0,0,0,0.55),
    0 0 60px rgba(0,212,255,0.1),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.login-page .auth-header {
  text-align: center;
  margin-bottom: 36px;
}

.login-page .auth-title {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #e8edf4 0%, #c0d0e8 50%, var(--blue-500) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-page .auth-title .adn-grad {
  background: var(--adn-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-page .auth-subtitle {
  font-size: 0.55rem;
  color: var(--blue-500);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 12px;
  opacity: 0.9;
}

.login-page .auth-subtitle-line {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue-500), transparent);
  margin: 16px auto 0;
  border-radius: 1px;
  animation: subtitlePulse 2s ease-in-out infinite;
}

.login-page .auth-subtitle-line.adn {
  width: 60px;
  background: linear-gradient(90deg, transparent, #0099CC, #30B880, transparent);
}
@keyframes subtitlePulse {
  0%, 100% { opacity: 0.3; transform: scaleX(0.8); }
  50% { opacity: 1; transform: scaleX(1.2); }
}

/* Login error box */
.login-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  border-left: 3px solid var(--danger);
  color: var(--danger);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: shakeX 0.4s ease;
}
@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.login-page .auth-footer {
  text-align: center;
  margin-top: 24px;
}
.login-page .auth-footer a {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  transition: color 0.2s;
}
.login-page .auth-footer a:hover {
  color: var(--blue-500);
  text-decoration: none;
}

/* Shared auth card (register / access-denied) */
.auth-card {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.90) 0%, rgba(18, 26, 42, 0.95) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 40px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}
.auth-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}
.auth-title .adn-grad {
  background: var(--adn-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-title .gold {
  color: var(--gold-500);
}
.auth-subtitle {
  font-size: 0.6rem;
  color: var(--blue-500);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 8px;
}
.auth-footer {
  text-align: center;
  margin-top: 20px;
}
.auth-footer a {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
}
.auth-footer a:hover {
  color: var(--gold-500);
  text-decoration: none;
}

/* ─── FORM ELEMENTS ─── */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-input,
.form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  outline: none;
  transition: 0.2s;
  font-family: var(--font-sans);
}

.form-input:focus,
.form-select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row .full-width {
  grid-column: 1 / -1;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: 0.25s;
  text-decoration: none;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--adn-gradient);
  color: white;
  font-weight: 700;
}
.btn-primary:hover {
  background: var(--adn-gradient-hover);
  box-shadow: 0 0 18px var(--blue-glow), 0 0 32px var(--green-glow);
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--gold-500);
  color: #000;
}
.btn-gold:hover {
  background: var(--gold-400);
  box-shadow: 0 0 16px var(--gold-glow);
  transform: translateY(-1px);
}

.btn-adn {
  background: var(--adn-gradient);
  color: #000;
  font-weight: 800;
}
.btn-adn:hover {
  background: var(--adn-gradient-hover);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3), 0 0 40px rgba(57, 255, 20, 0.15);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover {
  background: #059669;
  box-shadow: 0 0 16px var(--success-glow);
}

.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 0 16px var(--danger-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--blue-border);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.65rem;
}

.btn-block {
  width: 100%;
}

.payment-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
}

.depot-step {
  margin-top: 28px;
}

.depot-step-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.depot-montant-input {
  font-size: 2rem !important;
  text-align: center;
  font-weight: 800;
  padding: 18px !important;
  letter-spacing: 3px;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

.depot-choices {
  display: flex;
  gap: 12px;
}

.depot-choice {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  color: var(--text-secondary);
  position: relative;
  overflow: hidden;
}

.depot-choice::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.depot-choice:hover:not(:disabled)::before {
  opacity: 1;
}

.depot-choice:hover:not(:disabled) {
  border-color: var(--blue-border);
  background: rgba(0, 153, 204, 0.04);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.depot-choice.active {
  border-color: var(--blue-500);
  background: rgba(0, 153, 204, 0.06);
  color: var(--text-primary);
  box-shadow: 0 0 24px rgba(0, 153, 204, 0.12), inset 0 0 40px rgba(0, 153, 204, 0.03);
  transform: translateY(-1px);
}

.depot-choice:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

.depot-choice-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.25s ease;
}

.depot-choice.active .depot-choice-icon {
  background: linear-gradient(135deg, var(--blue-500), var(--green-teal));
  box-shadow: 0 4px 16px rgba(0, 153, 204, 0.25);
}

.depot-choice-logo {
  width: 30px;
  height: auto;
  filter: brightness(0.6);
  transition: filter 0.25s ease;
}

.depot-choice.active .depot-choice-logo {
  filter: brightness(1);
}

.depot-choice-icon svg {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.depot-choice.active .depot-choice-icon svg {
  color: #fff;
}

.depot-choice-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.depot-choice-sub {
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  text-align: center;
  line-height: 1.3;
}

.depot-choice.active .depot-choice-sub {
  color: var(--text-secondary);
}

.depot-confirm {
  font-size: 0.8rem !important;
  padding: 18px !important;
  letter-spacing: 2px;
  border-radius: 12px !important;
  background: linear-gradient(135deg, var(--blue-500), var(--green-teal)) !important;
  color: #fff !important;
  font-weight: 800 !important;
  border: none !important;
  box-shadow: 0 4px 20px rgba(0, 153, 204, 0.2) !important;
}

.depot-confirm:hover:not(:disabled) {
  box-shadow: 0 6px 28px rgba(0, 153, 204, 0.35) !important;
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* ─── CARDS / PANELS ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.card-body {
  padding: 20px;
}

.cyber-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm), var(--shadow-blue);
  transition: 0.2s;
}

.cyber-panel h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

/* ─── BALANCE CARD ─── */
.balance-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.balance-card:hover {
  box-shadow: var(--shadow-lg), 0 0 30px rgba(0,212,255,0.1);
  transform: translateY(-2px);
}
.balance-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
  animation: shimmer 6s ease-in-out infinite;
}

.balance-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.balance-value {
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--text-primary);
  margin-top: 4px;
}

.balance-value .currency {
  font-size: 1rem;
  color: var(--text-muted);
}

.balance-value-alt {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* ─── BANK CARD ─── */
.bank-card {
  background: linear-gradient(135deg, #0c1f3f 0%, #005f7a 40%, #007a5e 100%);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: white;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 212, 255, 0.08);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}
.bank-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.03) 50%, transparent 100%);
  background-size: 200% 200%;
  animation: cardSheen 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
.bank-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-lg), 0 12px 40px rgba(0,212,255,0.2), 0 0 60px rgba(57,255,20,0.06);
}

.bank-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-chip {
  width: 44px;
  height: 34px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
.card-chip::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 4px;
  right: 4px;
  height: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%);
  border-radius: 2px;
}

.card-status {
  text-align: right;
}

.card-status-label {
  font-size: 0.5rem;
  text-transform: uppercase;
  opacity: 0.7;
}

.card-status-value {
  font-size: 0.8rem;
  font-weight: 700;
}

.card-number {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  letter-spacing: 3px;
  word-spacing: 8px;
}

/* Logo ADN_pay incrusté en filigrane à l'arrière-plan de la carte */
.bank-card::after {
  content: '';
  position: absolute;
  right: -18px;
  bottom: -12px;
  width: 210px;
  height: 210px;
  background: url('/images/logo_adn_pay_blanc.png') no-repeat center center;
  background-size: contain;
  opacity: 0.10;
  pointer-events: none;
  z-index: 0;
}
/* Le contenu de la carte passe au-dessus du filigrane */
.bank-card > * {
  position: relative;
  z-index: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.card-footer-label {
  font-size: 0.5rem;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 2px;
}

.card-footer-value {
  font-size: 0.85rem;
  font-weight: 600;
}

.card-balance {
  font-size: 1.2rem;
  font-weight: 700;
}

/* ─── ACTION GRID (Home) ─── */
.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.action-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  transition: 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.action-btn:hover {
  border-color: var(--blue-border);
  background: var(--bg-hover);
  color: var(--text-primary);
  box-shadow: 0 0 12px var(--blue-glow);
}

.action-btn i {
  font-size: 1.3rem;
}

.action-btn .icon-gold { color: var(--gold-500); }
.action-btn .icon-green { color: var(--success); }
.action-btn .icon-blue { color: var(--blue-500); }

/* ─── TRANSACTION ITEM ─── */
.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: 0.2s;
}

.transaction-item:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}

.transaction-info .tx-type {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.transaction-info .tx-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.transaction-amount {
  font-size: 0.85rem;
  font-weight: 700;
}

.tx-positive { color: var(--success); }
.tx-negative { color: var(--danger); }

.tx-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.tx-icon-in {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tx-icon-out {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.tx-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-left: 8px;
  text-transform: uppercase;
}

.transaction-item .tx-date {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

/* ─── WARNING BOX ─── */
.warning-box {
  background: var(--bg-card);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.warning-box .highlight {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* ─── STATUS BADGES ─── */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-info { background: var(--info-bg); color: var(--info); border: 1px solid rgba(0, 212, 255, 0.3); }

/* ─── DATA TABLE ─── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.data-table thead th {
  padding: 10px 12px;
  text-align: left;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}

.data-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.data-table tbody tr:hover td {
  background: var(--bg-hover);
}

/* ─── SAVINGS POCKET CARD ─── */
.pocket-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: 0.25s;
  position: relative;
  overflow: hidden;
}

.pocket-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
}

.pocket-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--blue-border);
  box-shadow: var(--shadow-md);
}

.pocket-card.pocket-tuteur::before {
  background: var(--blue-500);
  box-shadow: 0 0 8px var(--blue-glow);
}

.pocket-card.pocket-standard::before {
  background: var(--gold-500);
  box-shadow: 0 0 8px var(--gold-glow);
}

.pocket-card.pocket-atteint {
  border-color: rgba(16, 185, 129, 0.2);
}

.pocket-card.pocket-atteint::before {
  background: var(--success);
  box-shadow: 0 0 8px var(--success-glow);
}

.pocket-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.pocket-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.pocket-amount {
  color: var(--success);
  font-weight: 700;
  font-size: 1rem;
}

.pocket-meta {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pocket-meta .locked {
  color: var(--danger);
}

.pocket-progress {
  margin-bottom: 12px;
}

.pocket-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.pocket-progress-row .pocket-pct {
  font-size: 0.6rem;
  color: var(--text-muted);
}

.pocket-remain {
  font-size: 0.55rem;
  color: var(--text-muted);
}

.pocket-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.pocket-inline-action {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--bg-tertiary, var(--bg-secondary));
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
}

.pocket-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pocket-badge.success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Poche alimentée automatiquement par l'arrondi des transactions */
.pocket-badge.auto {
  background: rgba(0, 153, 204, 0.12);
  color: var(--blue-500);
  border: 1px solid rgba(0, 153, 204, 0.3);
  margin-left: 8px;
  vertical-align: middle;
}

.epargne-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.epargne-summary .stat-card {
  flex: 1;
}

/* ─── CREDIT PAGE ─── */
.credit-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.credit-cat-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: 0.25s;
  color: var(--text-secondary);
  font-family: var(--font-sans);
}

.credit-cat-btn:hover {
  border-color: var(--blue-border);
  background: var(--bg-hover);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.credit-cat-btn.selected {
  border-color: var(--blue-500);
  background: var(--info-bg);
  color: var(--blue-500);
  box-shadow: 0 0 12px var(--blue-glow);
}

.credit-cat-btn .cat-icon {
  font-size: 1.4rem;
  display: block;
  margin-bottom: 6px;
}

.credit-cat-btn .cat-name {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
}

.credit-cat-btn .cat-rate {
  font-size: 0.6rem;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.credit-result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.credit-result-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  transition: 0.2s;
}

.credit-result-item:hover {
  border-color: var(--blue-border);
  box-shadow: var(--shadow-sm);
}

.credit-result-item .cri-label {
  font-size: 0.55rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.credit-result-item .cri-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.credit-result-item .cri-value.positive { color: var(--success); }
.credit-result-item .cri-value.negative { color: var(--danger); }

.credit-result-item .cri-sub {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.credit-score-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue-500);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 16px;
  transition: 0.2s;
}

.credit-score-card:hover {
  box-shadow: var(--shadow-sm);
}

.credit-score-card .score-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.credit-score-card .score-top .score-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.credit-score-card .score-top .score-points {
  font-size: 1.4rem;
  font-weight: 700;
}

.credit-score-card .score-details {
  font-size: 0.65rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.credit-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}

.credit-table-wrap .data-table {
  font-size: 0.7rem;
}

.credit-table-wrap .data-table thead th {
  background: var(--bg-input);
  padding: 8px 12px;
  font-size: 0.55rem;
}

.credit-table-wrap .data-table tbody td {
  padding: 8px 12px;
}

.credit-table-scroll {
  max-height: 240px;
  overflow-y: auto;
}

.credit-elig-banner {
  display: flex;
  gap: 16px;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.credit-elig-banner .elig-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--danger-bg);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.credit-elig-banner .elig-content {
  flex: 1;
}

.credit-elig-banner .elig-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--danger);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.elig-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.7rem;
}

.elig-list li {
  padding: 3px 0;
  color: var(--text-secondary);
}

.elig-list .pass { color: var(--success); }
.elig-list .fail { color: var(--danger); }
.elig-list .elig-neutral { color: var(--text-muted); }

/* ─── PAGE HEADER ─── */
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.page-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.page-header .page-header-badge {
  font-size: 0.6rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── STAT CARD ─── */
.stat-card {
  background: var(--info-bg);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0,212,255,0.15);
  border-color: var(--blue-500);
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-500), var(--success));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.stat-card:hover::after {
  opacity: 1;
}

.stat-card .stat-label {
  font-size: 0.55rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-card .stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.stat-card .stat-value.green { color: var(--success); }
.stat-card .stat-value.red { color: var(--danger); }

/* ─── PROGRESS BAR ─── */
.progress-track {
  background: rgba(255,255,255,0.05);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--blue-500);
  box-shadow: 0 0 8px var(--blue-glow);
  border-radius: 3px;
}

/* ─── ANNEAU DE PROGRESSION (poches d'épargne) ─── */
.pocket-main {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}
.pocket-ring {
  position: relative;
  width: 74px;
  height: 74px;
  flex: none;
}
.pocket-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.pocket-ring .ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 3;
}
.pocket-ring .ring-val {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.pocket-ring.done .ring-val {
  stroke: var(--success);
  filter: drop-shadow(0 0 5px rgba(57, 255, 20, 0.5));
}
.pocket-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, inherit);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
}
.pocket-ring-label span {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 1px;
  align-self: flex-start;
  margin-top: 6px;
}
.pocket-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pocket-details .pocket-amount {
  font-size: 1.05rem;
  font-weight: 700;
}
.pocket-target {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Mini-barre du résumé épargne (dashboard) — dégradé de marque */
.mini-progress {
  height: 9px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.mini-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0099CC, #30B880);
  box-shadow: 0 0 8px rgba(48, 184, 128, 0.4);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── UPLOAD CARD ─── */
.upload-card {
  background: var(--bg-input);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  transition: 0.2s;
}

.upload-card:hover {
  border-color: var(--blue-border);
}

.upload-card.has-file {
  background: var(--success-bg);
  border-color: var(--success);
  border-style: solid;
}

.upload-card .upload-icon {
  font-size: 1.6rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.upload-card.has-file .upload-icon {
  color: var(--success);
}

.upload-card label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 12px;
}

.upload-card.uploading {
  border-color: var(--blue-500);
  border-style: solid;
  animation: upload-pulse 1.2s ease-in-out infinite;
}

.upload-card.uploading .upload-icon {
  color: var(--blue-500);
}

.upload-spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border: 3px solid var(--border);
  border-top: 3px solid var(--blue-500);
  border-radius: 50%;
  animation: upload-spin 0.8s linear infinite;
}

@keyframes upload-spin {
  to { transform: rotate(360deg); }
}

@keyframes upload-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
  50% { box-shadow: 0 0 12px 2px rgba(0, 212, 255, 0.25); }
}

/* ─── SECTION HEADER ─── */
.section-title {
  font-size: 0.8rem;
  color: var(--blue-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 20px;
  font-weight: 700;
}

/* ─── CHECKBOX ─── */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-container input[type="checkbox"] {
  accent-color: var(--blue-500);
}

/* ─── TOAST NOTIFICATIONS ─── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  max-width: 400px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
  animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 320px;
}

.toast.toast-success { border-color: rgba(16, 185, 129, 0.3); box-shadow: var(--shadow-lg), 0 0 20px rgba(16, 185, 129, 0.08); }
.toast.toast-error { border-color: rgba(239, 68, 68, 0.3); box-shadow: var(--shadow-lg), 0 0 20px rgba(239, 68, 68, 0.08); }
.toast.toast-info { border-color: rgba(0, 212, 255, 0.3); box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 212, 255, 0.08); }

@keyframes toastIn {
  from { transform: translateX(120%) scale(0.9); opacity: 0; }
  to { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes toastBar {
  from { width: 100%; }
  to { width: 0%; }
}

.toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

.toast-success .toast-icon { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.toast-error .toast-icon { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.toast-info .toast-icon { background: rgba(0, 212, 255, 0.15); color: var(--blue-500); border: 1px solid rgba(0, 212, 255, 0.3); }

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-type {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
}

.toast-success .toast-type { color: var(--success); }
.toast-error .toast-type { color: var(--danger); }
.toast-info .toast-type { color: var(--blue-500); }

.toast-msg {
  font-size: 0.8rem;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-word;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0 0 8px;
  line-height: 1;
  flex-shrink: 0;
  transition: 0.15s;
}

.toast-close:hover { color: var(--text-primary); }

.toast-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  animation: toastBar linear forwards;
  border-radius: 0 0 0 6px;
}

.toast-success .toast-bar { color: var(--success); }
.toast-error .toast-bar { color: var(--danger); }
.toast-info .toast-bar { color: var(--blue-500); }

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 40px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ─── STATUS BANNER ─── */
.status-banner {
  padding: 20px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
}

.status-banner.pending {
  background: var(--warning-bg);
  border: 1px solid var(--warning);
  color: var(--warning);
}

.status-banner.error {
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  color: var(--danger);
}

/* ─── REVIEW VALUE (Admin KYC) ─── */
.review-value {
  background: var(--bg-input);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-primary);
  min-height: 38px;
  display: flex;
  align-items: center;
  word-break: break-word;
}

/* ─── ERROR PANEL ─── */
.error-panel {
  background: var(--danger-bg);
  padding: 20px;
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
}

.error-panel h5 {
  color: var(--danger);
  font-size: 0.8rem;
  margin: 0 0 10px;
}

/* ─── SECTION CARD (Profil) ─── */
.form-section {
  background: rgba(12, 21, 38, 0.5);
  padding: 24px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.form-section h6 {
  color: var(--blue-500);
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ─── AUTH LOADING ─── */
.auth-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-deepest);
}

.auth-loading p {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 3px;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deepest); }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── RESPONSIVE ─── */

/* === TABLETTE (768px - 1024px) === */
@media (max-width: 1024px) {
  .content-area { padding: 24px; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-grid .full-col { grid-column: 1; }
  .admin-header-bar { flex-direction: column; gap: 12px; }
  .admin-stats { width: 100%; justify-content: flex-end; }
  .top-bar { padding: 0 20px; }
  .balance-value { font-size: 2rem; }
  .bank-card { min-height: 180px; }
  .pocket-actions { flex-direction: column; }
  .credit-categories { grid-template-columns: 1fr; }
  .credit-result-grid { grid-template-columns: 1fr 1fr; }
  .epargne-summary { flex-direction: column; }
}

/* === MOBILE (< 768px) === */
@media (max-width: 768px) {
  /* Layout */
  .sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    z-index: 300;
    transition: left 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
  }

  .sidebar.sidebar-open {
    left: 0;
  }

  .sidebar-overlay {
    display: block;
  }

  .hamburger {
    display: flex;
  }

  .main-area {
    width: 100%;
  }

  /* Top bar */
  .top-bar {
    padding: 0 12px;
    height: 56px;
  }

  .server-status .status-label {
    display: none;
  }

  .user-badge .rank {
    display: none;
  }

  .user-badge .name {
    font-size: 0.75rem;
  }

  /* Menu notifications : ancré au viewport, plein largeur (évite le débordement gauche) */
  .notif-dropdown {
    position: fixed;
    top: 56px;
    right: 8px;
    left: 8px;
    width: auto;
    max-height: calc(100vh - 80px);
    margin-top: 0;
  }

  /* Content */
  .content-area {
    padding: 16px;
  }

  /* Typography */
  .admin-title {
    font-size: 0.9rem;
  }

  .cyber-panel {
    padding: 16px;
  }

  .cyber-panel h3 {
    font-size: 0.75rem;
  }

  .card-body {
    padding: 14px;
  }

  .card-head h2 {
    font-size: 0.65rem;
  }

  /* Balance */
  .balance-value {
    font-size: 1.8rem;
  }

  .balance-card {
    padding: 16px;
  }

  /* Bank card */
  .bank-card {
    min-height: 160px;
    padding: 18px;
    border-radius: var(--radius-md);
  }

  .card-number {
    font-size: 1rem;
  }

  .card-balance {
    font-size: 1rem;
  }

  /* Action grid */
  .action-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .action-btn {
    padding: 12px 8px;
    font-size: 0.65rem;
  }

  /* Forms */
  .credit-result-grid { grid-template-columns: 1fr; }
  .credit-categories { grid-template-columns: 1fr; }
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-input, .form-select {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .btn {
    padding: 8px 16px;
    font-size: 0.7rem;
  }

  /* Auth */
  .auth-wrapper {
    padding: 12px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .auth-title {
    font-size: 1.5rem;
  }

  .form-section {
    padding: 16px;
  }

  /* Grids */
  .form-grid {
    grid-template-columns: 1fr;
  }

  .upload-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Admin */
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-grid .full-col {
    grid-column: 1;
  }

  .admin-header-bar {
    flex-direction: column;
    gap: 10px;
  }

  .admin-stats {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-stat .value {
    font-size: 1rem;
  }

  .admin-table thead th,
  .admin-table tbody td {
    padding: 8px 10px;
    font-size: 0.7rem;
  }

  .action-cells {
    flex-direction: column;
    gap: 4px;
  }

  .admin-tabs {
    gap: 2px;
  }

  .admin-tab {
    padding: 8px 10px;
    font-size: 0.6rem;
  }

  .modal-card {
    margin: 12px;
  }

  /* Pocket cards */
  .pocket-card {
    padding: 12px;
  }

  .pocket-actions {
    flex-direction: column;
  }

  .pocket-actions .btn {
    width: 100%;
  }

  /* Stat cards */
  .stat-card .stat-value {
    font-size: 1rem;
  }

  /* Tables */
  .data-table {
    font-size: 0.7rem;
  }

  .data-table thead th,
  .data-table tbody td {
    padding: 8px;
  }

  /* Notifications */
  .toast-container {
    bottom: 12px;
    right: 12px;
    max-width: calc(100% - 24px);
    min-width: 0;
  }

  .toast {
    min-width: 0;
    padding: 12px 14px;
  }

  .notif-box {
    min-width: auto;
    padding: 10px 14px;
  }

  /* Logo area */
  .logo-area {
    padding: 24px 16px;
  }

  .logo-text {
    font-size: 1.1rem;
  }

  /* Footer links */
  .content-area a[href="/"] {
    font-size: 0.7rem !important;
  }

  /* Scrollable tables */
  .table-container {
    overflow-x: auto;
  }
}

/* === TRES PETITS ECRANS (< 400px) === */
@media (max-width: 400px) {
  .action-grid {
    grid-template-columns: 1fr;
  }

  .content-area {
    padding: 12px;
  }

  .balance-value {
    font-size: 1.5rem;
  }

  .bank-card {
    min-height: 140px;
    padding: 14px;
  }

  .card-number {
    font-size: 0.85rem;
    letter-spacing: 2px;
  }

  .auth-card {
    padding: 20px 16px;
  }

  .form-section {
    padding: 12px;
  }
}

/* ─── ADMIN PAGE ─── */
.admin-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.admin-grid .full-col {
  grid-column: 1 / -1;
}

.admin-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.admin-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--blue-500);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 0 12px var(--blue-glow);
}

.admin-status {
  font-size: 0.65rem;
  color: var(--success);
  font-weight: 700;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success-glow);
  animation: adminPulse 1.5s infinite;
}

@keyframes adminPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.admin-stats {
  display: flex;
  gap: 24px;
}

.admin-stat {
  text-align: right;
}

.admin-stat .label {
  font-size: 0.55rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.admin-stat .value {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--blue-500);
}

.admin-stat .value.gold {
  color: var(--gold-500);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 3px solid var(--blue-500);
}

.card-head i {
  font-size: 1.2rem;
  color: var(--blue-500);
}

.card-head h2 {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table thead th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}

.admin-table tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.admin-table tbody tr:hover td {
  background: var(--bg-hover);
}

.admin-table .user-meta {
  display: flex;
  flex-direction: column;
}

.admin-table .user-meta strong {
  color: var(--text-primary);
  font-size: 0.85rem;
}

.admin-table .user-meta small {
  color: var(--text-muted);
  font-size: 0.65rem;
}

.terminal-view {
  background: #000;
  border-radius: var(--radius-sm);
  padding: 16px;
  max-height: 220px;
  overflow-y: auto;
  font-family: var(--font-mono);
  border: 1px solid var(--border-subtle);
  font-size: 0.7rem;
}

.log-line {
  margin-bottom: 4px;
  line-height: 1.6;
}

.log-ts {
  color: var(--text-muted);
  margin-right: 8px;
}

.log-act {
  color: var(--blue-500);
  font-weight: 700;
}

.log-det {
  color: var(--success);
  opacity: 0.8;
}

.adn-loader {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 3px;
  font-size: 0.8rem;
}

.empty-notif {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 0.8rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

.doc-status {
  font-size: 1rem;
}

.doc-status i {
  margin-right: 4px;
}

.doc-status .bi-file-earmark-pdf-fill { color: var(--danger); }
.doc-status .bi-card-heading { color: var(--blue-500); }
.doc-status .bi-mortarboard-fill { color: var(--gold-500); }

.action-cells {
  display: flex;
  gap: 6px;
}

/* ─── ADMIN TABS ─── */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.admin-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: 0.2s;
  white-space: nowrap;
  font-family: var(--font-sans);
}

.admin-tab:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.admin-tab.active {
  color: var(--blue-500);
  border-bottom-color: var(--blue-500);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: white;
  font-size: 0.55rem;
  font-weight: 800;
}

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg), var(--shadow-blue);
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-card .card-head {
  padding: 20px;
  margin: 0;
}

.modal-card .card-body {
  padding: 0 20px 20px;
}

.log-sep {
  color: var(--text-muted);
}

/* ─── TOGGLE SWITCH ─── */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: 0.3s;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  bottom: 2px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: 0.3s;
}

.switch input:checked + .switch-slider {
  background: var(--blue-500);
  border-color: var(--blue-500);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
  background: white;
}

.setting-row .switch {
  flex-shrink: 0;
}

/* ─── SETTINGS ─── */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.setting-row strong {
  font-size: 0.8rem;
}

/* ─── PASSWORD STRENGTH ─── */
.password-strength {
  display: flex;
  align-items: center;
  gap: 8px;
}

.strength-bar {
  height: 4px;
  width: 80px;
  border-radius: 2px;
  background: var(--bg-input);
  transition: 0.3s;
}

.strength-bar.weak {
  background: var(--danger);
  box-shadow: 0 0 6px var(--danger-glow);
}

.strength-bar.medium {
  background: var(--warning);
  box-shadow: 0 0 6px var(--warning-bg);
}

.strength-bar.strong {
  background: var(--success);
  box-shadow: 0 0 6px var(--success-glow);
}

.strength-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── LEGAL PAGES ─── */
.legal-section {
  margin-bottom: 24px;
}

.legal-section h4 {
  font-size: 0.85rem;
  color: var(--blue-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-section p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 8px;
}

.legal-section ul {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}

.legal-section ul li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 3px 0 3px 16px;
  position: relative;
  line-height: 1.6;
}

.legal-section ul li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--blue-500);
  font-weight: 700;
}

.legal-section ul li strong {
  color: var(--text-primary);
}

/* ─── LEGAL FOOTER BAR ─── */
.legal-footer-bar {
  padding: 16px 32px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  transition: 0.2s;
}

.footer-links a:hover {
  color: var(--blue-500);
  text-decoration: none;
}

.footer-copy {
  color: var(--text-muted);
  opacity: 0.6;
}

@media (max-width: 768px) {
  .legal-footer-bar {
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    text-align: center;
  }

  .footer-links {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ─── THEME CLAIR (bleu ciel + beige) ─── */
[data-theme="light"] {
  --bg-deepest: #e8edf2;
  --bg-panel: #f0f4f8;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #e2e8f0;
  --bg-hover: #f1f5f9;

  --blue-500: #0099CC;
  --blue-600: #0088B3;
  --blue-700: #007099;
  --blue-glow: rgba(0, 153, 204, 0.15);
  --blue-border: rgba(0, 153, 204, 0.2);

  --green-teal: #30B880;
  --green-glow: rgba(48, 184, 128, 0.15);

  --adn-gradient: linear-gradient(135deg, #0099CC, #30B880);
  --adn-gradient-hover: linear-gradient(135deg, #0088B3, #28A070);

  --gold-400: #f59e0b;
  --gold-500: #d97706;
  --gold-glow: rgba(245, 158, 11, 0.15);

  --success: #16a34a;
  --success-bg: rgba(22, 163, 74, 0.08);
  --success-glow: rgba(22, 163, 74, 0.15);

  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.08);
  --danger-glow: rgba(220, 38, 38, 0.15);

  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.08);

  --info: #0099CC;
  --info-bg: rgba(0, 153, 204, 0.08);

  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --border: rgba(0, 153, 204, 0.12);
  --border-subtle: rgba(0, 153, 204, 0.06);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
  --shadow-blue: 0 0 25px rgba(0, 153, 204, 0.08);
  --shadow-gold: 0 0 25px rgba(245, 158, 11, 0.08);
}

[data-theme="light"] .bank-card {
  background: linear-gradient(135deg, #b3e5fc 0%, #80deea 50%, #a5d6a7 100%);
  color: #004d40;
}
[data-theme="light"] .auth-card {
  background: var(--bg-card);
}
[data-theme="light"] .login-page .auth-card {
  background: rgba(240, 244, 248, 0.75);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-color: rgba(0,184,212,0.15);
}

[data-theme="light"] .toast {
  background: rgba(240, 244, 248, 0.96);
  border-color: rgba(0, 184, 212, 0.15);
}

[data-theme="light"] .logo-text .adn-grad {
  background: var(--adn-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .nav-link-custom:hover {
  background: var(--bg-hover);
}

[data-theme="light"] .nav-link-custom.active {
  background: var(--info-bg);
}

[data-theme="light"] .sidebar {
  background: var(--bg-panel);
  border-right-color: var(--border);
}

[data-theme="light"] .top-bar {
  background: rgba(240, 244, 248, 0.9);
  border-bottom-color: var(--border);
}

[data-theme="light"] .admin-tab.active {
  color: var(--blue-600);
  border-bottom-color: var(--blue-600);
}

/* ═══════════════════════════════════════════════
   EMBELLISHMENTS — Login, Dashboard, Bank Card
   ═══════════════════════════════════════════════ */

/* ─── Login button loading spinner ─── */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  top: 50%;
  left: 50%;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mini chart bars — nicer shape + animation */
.mini-chart-bar {
  transition: opacity 0.3s ease;
}
.mini-chart-bar:hover {
  opacity: 1 !important;
}
.mini-chart-bar-in {
  border-radius: 4px 4px 0 0;
  animation: barGrow 0.6s ease-out forwards;
  transform-origin: bottom;
}
.mini-chart-bar-out {
  border-radius: 4px 4px 0 0;
  animation: barGrow 0.6s ease-out 0.1s forwards;
  transform-origin: bottom;
}
@keyframes barGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@keyframes cardSheen {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

/* Contactless icon next to chip */
.card-contactless {
  width: 24px;
  height: 24px;
  margin-left: 12px;
  opacity: 0.5;
  position: relative;
}
.card-contactless::before {
  content: '~';
  font-size: 1.4rem;
  font-weight: 700;
  color: currentColor; /* suit la couleur du design de carte */
  opacity: 0.6;
}

/* Card network badge area */
.card-network {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 2;
}
.card-network span {
  font-size: 0.55rem;
  color: currentColor; /* suit la couleur du design de carte */
  opacity: 0.4;
  letter-spacing: 1px;
  font-family: var(--font-mono);
}

/* Light theme adjustments for card */
[data-theme="light"] .bank-card:hover {
  box-shadow: var(--shadow-lg), 0 12px 40px rgba(0,184,212,0.15);
}
[data-theme="light"] .auth-card::before {
  background: linear-gradient(60deg, transparent, rgba(0,184,212,0.12), transparent, rgba(57,255,20,0.08), transparent);
  background-size: 300% 300%;
}

/* ─── Register success checkmark animation ─── */
.register-success .auth-card {
  animation: fadeInUp 0.3s ease-out;
}
.success-check {
  width: 64px;
  height: 64px;
  margin: 0 auto;
}
.checkmark-svg {
  width: 64px;
  height: 64px;
}
.checkmark-circle {
  stroke: var(--success);
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  fill: none;
  animation: strokeDraw 0.6s ease-in-out forwards;
}
.checkmark-check {
  stroke: var(--success);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: strokeDraw 0.4s 0.3s ease-in-out forwards;
}
@keyframes strokeDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Notifications page — clickable rows ─── */
.notif-clickable {
  transition: background 0.15s ease, border-color 0.15s ease;
}
.notif-clickable:hover {
  background: var(--hover-bg) !important;
  border-color: var(--blue-500) !important;
}
.notif-unread-bg {
  border-left: 3px solid var(--blue-500);
  background: rgba(0,0,0,0.1);
}

/* ─── Depot — waiting + validation ─── */
.depot-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
  animation: fadeIn 0.3s ease;
}
.depot-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,215,0,0.2);
  border-top-color: var(--gold-500);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.depot-loading-text {
  margin-top: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-500);
  letter-spacing: 2px;
}
.depot-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
  animation: fadeIn 0.4s ease;
}
.depot-success-text {
  margin-top: 16px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--success);
  letter-spacing: 2px;
}
.depot-success-sub {
  margin-top: 4px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gold-500);
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ─── Bank card disclaimer ─── */
.card-disclaimer {
  text-align: center;
  font-size: 0.55rem;
  color: currentColor; /* suit la couleur du design de carte */
  opacity: 0.5;
  margin-top: 4px;
  letter-spacing: 1px;
}

/* ─── Notification dropdown ─── */
.notif-wrapper {
  position: relative;
}
.notif-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: transparent;
}
.notif-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  max-height: 360px;
  overflow-y: auto;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 1000;
  animation: fadeIn 0.15s ease;
  margin-top: 8px;
}
.notif-dropdown-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.12s ease;
  border-bottom: 1px solid var(--border-color);
}
.notif-dropdown-item:last-child {
  border-bottom: none;
}
.notif-dropdown-item:hover {
  background: var(--hover-bg);
}
.notif-dd-icon {
  flex-shrink: 0;
  padding-top: 2px;
  font-size: 0.9rem;
}
.notif-dd-body {
  flex: 1;
  min-width: 0;
}
.notif-dd-cat {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
}
.notif-dd-msg {
  font-size: 0.75rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.notif-dd-date {
  font-size: 0.55rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.notif-dropdown-footer {
  text-align: center;
  padding: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--blue-500);
  cursor: pointer;
  letter-spacing: 1px;
  border-top: 1px solid var(--border-color);
  transition: background 0.12s ease;
}
.notif-dropdown-footer:hover {
  background: var(--hover-bg);
}
.notif-dropdown-empty {
  text-align: center;
  padding: 24px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ─── Card upgrade link ─── */
.card-status-upgrade {
  display: block;
  margin-top: 4px;
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--gold-500);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: opacity 0.15s ease;
}
.card-status-upgrade:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ─── PERSONNALISATION CARTE : bouton palette + galerie de designs ─── */
.card-palette-btn {
  width: 30px;
  height: 30px;
  margin-left: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit; /* suit la couleur du design de carte */
  font-size: 0.85rem;
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.card-palette-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Designs à fond pastel : filigrane blanc → silhouette sombre */
.bank-card-clair::after {
  filter: brightness(0);
  opacity: 0.06;
}

.carte-gallery-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1200;
}
.carte-gallery {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1201;
  width: min(560px, calc(100vw - 32px));
  max-height: 80vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-lg);
}
.carte-gallery-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.carte-gallery-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
}
.carte-gallery-close:hover {
  color: var(--text-primary);
}
.carte-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.carte-swatch {
  position: relative;
  aspect-ratio: 1.586; /* ratio carte bancaire */
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  padding: 8px;
  transition: transform 0.2s;
}
.carte-swatch:hover {
  transform: translateY(-2px);
}
.carte-swatch-active {
  outline: 2px solid var(--success);
  outline-offset: 2px;
}
.carte-swatch-nom {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: left;
}
.carte-swatch-check {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.85rem;
}
.carte-gallery-hint {
  margin-top: 12px;
  font-size: 0.65rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.carte-gallery-erreur {
  margin-top: 10px;
  font-size: 0.7rem;
  color: var(--danger);
}

/* ─── UX CLIQUABLE (dashboard) : stats, poches, transactions ─── */
.stat-card-clickable {
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.stat-card-clickable:hover {
  transform: translateY(-2px);
  border-color: var(--blue-500);
  box-shadow: 0 4px 14px rgba(0, 153, 204, 0.15);
}
.pocket-mini-clickable {
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}
.pocket-mini-clickable:hover {
  transform: translateY(-2px);
  border-color: var(--blue-500);
}
.tx-clickable {
  cursor: pointer;
}
.tx-clickable:hover {
  background: rgba(0, 153, 204, 0.06);
}
.tx-chevron {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.tx-chevron.open {
  transform: rotate(180deg);
}
.tx-detail {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: -4px 0 8px;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tx-detail > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.tx-detail span {
  color: var(--text-muted);
}
.tx-detail a {
  font-size: 0.7rem;
  color: var(--blue-500);
  text-align: right;
  text-decoration: none;
}
.tx-detail a:hover {
  text-decoration: underline;
}

/* ─── ÉTAT VIDE ENGAGEANT (épargne) ─── */
.epargne-empty {
  text-align: center;
  padding: 40px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0, 153, 204, 0.05), rgba(48, 184, 128, 0.05));
}
.epargne-empty-icon {
  font-size: 2.6rem;
  background: linear-gradient(135deg, #0099CC, #30B880);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}
.epargne-empty h5 {
  font-size: 0.95rem;
  margin-bottom: 8px;
}
.epargne-empty p {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto 16px;
}

/* ─── RECONNEXION BLAZOR ─── */
#components-reconnect-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}
.reconnect-content {
  background: var(--bg-card);
  border: 1px solid var(--blue-border);
  border-radius: 12px;
  padding: 32px 48px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.reconnect-content p {
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
.reconnect-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--blue-border);
  border-top-color: var(--blue-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
/* Blazor bascule ces classes sur #components-reconnect-modal selon l'état du
   circuit. La règle id+classe (spécificité > l'id seul) rend le modal visible. */
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
  display: flex;
}
.reconnect-lost { display: none; }
/* En échec/rejet : on masque le spinner + "reconnexion", on montre "connexion perdue". */
#components-reconnect-modal.components-reconnect-failed .reconnect-retrying,
#components-reconnect-modal.components-reconnect-rejected .reconnect-retrying,
#components-reconnect-modal.components-reconnect-failed .reconnect-spinner,
#components-reconnect-modal.components-reconnect-rejected .reconnect-spinner {
  display: none;
}
#components-reconnect-modal.components-reconnect-failed .reconnect-lost,
#components-reconnect-modal.components-reconnect-rejected .reconnect-lost {
  display: block;
}
