/* ── Overrides & custom components on top of Tabler ─────────────────────── */

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: linear-gradient(145deg, #e4ecfb 0%, #e8eff8 30%, #e3f3ec 65%, #eaeff8 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.011em;
}

/* ── Blobs background ────────────────────────────────────────────────────── */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
  pointer-events: none;
  z-index: 0;
}

/* Blob marine — haut gauche */
body::before {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, #1e3a5f, #2563eb);
  top: -150px;
  left: -150px;
}

/* Blob vert — bas droite */
body::after {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #16a34a, #059669);
  bottom: -100px;
  right: -100px;
}

/* Troisième blob marine clair — centre droite */
.blob-extra {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .22;
  pointer-events: none;
  z-index: 0;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #1e3a5f, #16a34a);
  top: 40%;
  right: 10%;
}

/* S'assurer que le contenu passe au-dessus des blobs */
.page-wrapper { position: relative; z-index: 1; }
/* Navbar toujours au-dessus du contenu de page (incl. overlay focus-globe-mode z52),
   mais sous les modals (1060) et toasts (9999) */
.navbar { position: relative; z-index: 60; }

/* ── Canvas réseau de particules global ──────────────────────────────────── */
#network-bg-global {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
/* Masqué sur Focus (mode normal et mode globe fullscreen) */
body.page-focus-active #network-bg-global,
body.focus-globe-mode  #network-bg-global { opacity: 0; }
/* Sur Dashboard, les matrix-card latérales sont supprimées — le canvas global couvre tout */

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
  background: rgba(255,255,255,.58);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid rgba(30,58,95,.08);
  box-shadow:
    0 1px 3px rgba(30,58,95,.05),
    0 4px 20px rgba(30,58,95,.07);
  padding: 0;
  height: 68px;
}

/* Ligne dégradé marine→vert en bas */
.navbar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #1e3a5f 0%, #2563eb 50%, #16a34a 100%);
  opacity: .8;
}

.navbar-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 4px;
}

.navbar-brand { display: flex; align-items: center; flex-shrink: 0; }

.navbar-logo {
  height: 56px;
  width: auto;
  object-fit: contain;
}

/* Séparateur vertical */
.navbar-divider {
  width: 1px;
  height: 32px;
  background: #e2e8f0;
  margin: 0 12px;
  flex-shrink: 0;
}

/* Nav links */
.navbar .navbar-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.navbar .navbar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.navbar .navbar-nav .nav-link i { font-size: 16px; transition: color .18s ease; }

.navbar .navbar-nav .nav-link:hover {
  background: rgba(30, 58, 95, 0.05);
  color: #334155;
  transform: translateY(-1px);
}

.navbar .navbar-nav .nav-link.active {
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  color: #fff;
  box-shadow:
    0 2px 8px rgba(30, 58, 95, 0.25),
    0 4px 16px rgba(37, 99, 235, 0.15);
}

.navbar .navbar-nav .nav-link.active i { color: #86efac; }

/* Côté droit */
.navbar-end { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-shrink: 0; }

/* ── SPA page toggling ───────────────────────────────────────────────────── */
.page         { display: none; }
.page.active  { display: block; }

/* ── Filters row ─────────────────────────────────────────────────────────── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.filters .form-control,
.filters .form-select { min-width: 140px; }

/* ── Badges (generated by app.js) — pill + dot indicator ────────────────── */
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px 3px 8px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.02em;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge:hover {
  transform: translateY(-1px);
}

.badge-ok   { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-ok::before { background: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.5); }

.badge-err  { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.badge-err::before { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.5); }

.badge-warn { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.badge-warn::before { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.5); }

.badge-none { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.badge-none::before { background: #94a3b8; }

.badge-med  { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.badge-med::before { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.5); }

/* ── Statut select in table ──────────────────────────────────────────────── */
.statut-select {
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(226,232,240,.6);
  color: #1a1a2e;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.statut-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.08);
  border-color: rgba(30,58,95,.3);
}

/* Status-specific colors */
.statut-select.statut-done      { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.statut-select.statut-encours   { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.statut-select.statut-entretien { background: #ede9fe; color: #5b21b6; border-color: #c4b5fd; }
.statut-select.statut-refus     { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.statut-select.statut-expire    { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.statut-select.statut-acandidater { background: #fef3c7; color: #92400e; border-color: #fcd34d; }

/* ── Pagination (custom buttons) ─────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.pagination button {
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(226,232,240,.5);
  color: #64748b;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  transition: all .15s ease;
}
.pagination button.active { background: var(--tblr-primary); border-color: var(--tblr-primary); color: #fff; font-weight: 600; }
.pagination button:hover:not(.active) { background: #f8fafc; color: #1e293b; }

/* ── Statuts chart bars ──────────────────────────────────────────────────── */
.statut-bar-row {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; padding: 5px 8px; margin: 0 -8px;
  border-radius: 8px; transition: background-color .12s ease;
}
.statut-bar-row:hover { background: rgba(248,250,252,.6); }
.statut-bar-label {
  width: 130px; text-align: right; color: #475569;
  font-size: 12px; font-weight: 500; flex-shrink: 0;
  display: flex; align-items: center; justify-content: flex-end; gap: 7px;
}
.statut-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.statut-bar-track {
  flex: 1; background: #f1f5f9; border-radius: 8px; height: 18px; overflow: hidden;
}
@keyframes barGrowW { from { width: 0; } }
.statut-bar-fill {
  height: 18px; border-radius: 8px; min-width: 5px;
  animation: barGrowW .6s cubic-bezier(.25,.8,.35,1) both;
}
.statut-bar-row:hover .statut-bar-fill { filter: brightness(1.08); }
.statut-bar-count {
  width: 32px; text-align: right; font-weight: 700; font-size: 13px;
  color: #1e293b; flex-shrink: 0; font-variant-numeric: tabular-nums;
}
.statut-bar-pct {
  width: 38px; text-align: right; font-size: 11px; font-weight: 600;
  color: #94a3b8; flex-shrink: 0; font-variant-numeric: tabular-nums;
}
body.theme-dark .statut-bar-row:hover { background: #1c2128; }
body.theme-dark .statut-bar-count { color: #e6edf3; }

/* ── Bluebox countdown badge ─────────────────────────────────────────────── */
.bb-countdown {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
  white-space: nowrap;
}
.bb-countdown.ok      { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.bb-countdown.warn    { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.bb-countdown.expired { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Pomodoro navbar widget ──────────────────────────────────────────────── */
.pomodoro { position: relative; flex-shrink: 0; }
.pomodoro-pill {
  display: flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px;
  background: rgba(255,255,255,.5);
  border: 1px solid rgba(226,232,240,.6);
  border-radius: 9px;
  color: #475569; font-size: 12.5px; font-weight: 600;
  font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
  touch-action: manipulation;
}
.pomodoro-pill:hover { background: #f1f5f9; border-color: #cbd5e1; color: #1e293b; }
.pomodoro-pill i { font-size: 16px; }
.pomodoro.running .pomodoro-pill { background: #fff7ed; border-color: #fdba74; color: #c2410c; }
.pomodoro.done .pomodoro-pill { animation: pomoFlash 1s ease-in-out infinite; }
@keyframes pomoFlash {
  0%, 100% { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
  50%      { background: #ef4444; border-color: #ef4444; color: #fff; }
}
.pomodoro-panel {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 232px; padding: 14px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15,23,42,.16);
  z-index: 1200; display: none;
}
.pomodoro.open .pomodoro-panel { display: block; animation: pomoPop .16s ease; }
@keyframes pomoPop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.pomodoro-panel-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11.5px; font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: .4px; margin-bottom: 10px;
}
.pomodoro-close { background: none; border: none; color: #94a3b8; cursor: pointer; padding: 2px; line-height: 1; font-size: 16px; }
.pomodoro-close:hover { color: #475569; }
.pomodoro-display {
  font-size: 38px; font-weight: 700; text-align: center; color: #0f172a;
  font-variant-numeric: tabular-nums; letter-spacing: 1px; margin-bottom: 12px;
}
.pomodoro-presets { display: flex; gap: 6px; margin-bottom: 12px; }
.pomodoro-preset {
  flex: 1; padding: 7px 0;
  border: 1px solid #e2e8f0; background: #f8fafc; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: #475569; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.pomodoro-preset:hover { border-color: #cbd5e1; }
.pomodoro-preset.active { background: linear-gradient(135deg, #ea580c, #f97316); border-color: #ea580c; color: #fff; }
.pomodoro-custom {
  width: 50px; flex: 0 0 50px; text-align: center;
  border: 1px solid #e2e8f0; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: #475569; -moz-appearance: textfield;
}
.pomodoro-custom::-webkit-outer-spin-button,
.pomodoro-custom::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pomodoro-controls { display: flex; gap: 8px; }
.pomodoro-controls .btn { flex: 1; }
.pomodoro-controls .pomo-reset { flex: 0 0 auto; }
@media (max-width: 768px) {
  .pomodoro-pill { height: 44px; }
  .pomodoro-panel { width: 240px; }
}

/* ── API key badges ──────────────────────────────────────────────────────── */
.key-badge { font-size: 12px; font-weight: 600; padding: 3px 12px; border-radius: 20px; }
.key-badge.ok      { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.key-badge.missing { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Nav link inline (in alerts) ─────────────────────────────────────────── */
.nav-link-inline { text-decoration: underline; cursor: pointer; }

/* ── Focus mode ──────────────────────────────────────────────────────────── */
.focus-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.focus-queue {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.focus-queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #64748b;
  border-bottom: 1px solid rgba(226,232,240,.6);
  background: rgba(240,244,255,.4);
}
.focus-queue-list { overflow-y: auto; padding: 6px; }
.focus-queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: 8px;
  padding: 9px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s;
}
.focus-queue-item:hover { background: #f1f5f9; }
.focus-queue-item.active { background: rgba(30,58,95,.08); box-shadow: inset 3px 0 0 var(--tblr-primary); }
.fq-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #cbd5e1; flex-shrink: 0;
}
.fq-dot-high { background: #ef4444; }
.fq-dot-mid  { background: #f59e0b; }
.fq-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.fq-company {
  font-size: 13px; font-weight: 600; color: #1e293b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fq-title {
  font-size: 11.5px; color: #94a3b8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fq-doc { font-size: 15px; color: #cbd5e1; flex-shrink: 0; }
.fq-doc-md { color: #f59e0b; }
.fq-doc-ok { color: #22c55e; }
body.theme-dark .focus-queue-header { background: #1c2128; border-bottom-color: #30363d; color: #8b949e; }
body.theme-dark .focus-queue-item:hover { background: #21262d; }
body.theme-dark .focus-queue-item.active { background: rgba(88,166,255,.1); box-shadow: inset 3px 0 0 #58a6ff; }
body.theme-dark .fq-company { color: #e6edf3; }

@media (max-width: 991px) {
  .focus-layout { grid-template-columns: 1fr; }
  .focus-queue { position: static; max-height: 220px; order: 2; }
}

.focus-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  background: rgba(240,244,255,.45);
}
.focus-num { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: #94a3b8; }
.focus-company { font-size: 22px !important; font-weight: 700 !important; letter-spacing: -.4px; }
.focus-company[contenteditable], .focus-title[contenteditable] {
  border-bottom: 1px dashed rgba(100,120,160,0.4);
  outline: none; border-radius: 2px; padding: 1px 4px; cursor: text; transition: background .15s;
}
.focus-company[contenteditable]:focus, .focus-title[contenteditable]:focus {
  background: rgba(30,58,95,0.08); border-bottom-color: #1e3a5f;
}
.focus-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex-shrink: 0; }

.focus-tabs {
  display: flex;
  border-bottom: 1px solid rgba(226,232,240,.6);
  background: rgba(255,255,255,.35);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.focus-tabs::-webkit-scrollbar { display: none; }
.focus-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #64748b;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: -1px;
  border-radius: 0;
  transition: color .12s;
}
.focus-tab:hover { color: #1e293b; background: none; }
.focus-tab.active { color: var(--tblr-primary); border-bottom-color: var(--tblr-primary); font-weight: 600; }

.focus-email-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  background: rgba(240,244,255,.4);
  border-bottom: 1px solid rgba(226,232,240,.6);
}

.focus-md-content {
  padding: 26px 28px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13.5px;
  line-height: 1.8;
  max-height: 55vh;
  overflow-y: auto;
  white-space: pre-wrap;
  color: #334155;
}

/* Rendu markdown mis en forme */
.focus-md-content.md-rendered { white-space: normal; max-width: 760px; }
.focus-md-content.md-rendered p { margin: 0 0 14px; }
.focus-md-content.md-rendered p:last-child { margin-bottom: 0; }
.focus-md-content.md-rendered h3 {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
  color: #1e3a5f; margin: 22px 0 10px; padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}
.focus-md-content.md-rendered h3:first-child { margin-top: 0; }
.focus-md-content.md-rendered h4 {
  font-size: 13px; font-weight: 600; color: #334155; margin: 16px 0 6px;
}
.focus-md-content.md-rendered strong { color: #1e293b; font-weight: 600; }
.focus-md-content.md-rendered ul { margin: 0 0 14px; padding-left: 22px; }
.focus-md-content.md-rendered li { margin-bottom: 5px; }
body.theme-dark .focus-md-content.md-rendered h3 { color: #58a6ff; border-bottom-color: #30363d; }
body.theme-dark .focus-md-content.md-rendered h4,
body.theme-dark .focus-md-content.md-rendered strong { color: #e6edf3; }

/* ── Focus — état sans .md ───────────────────────────────────────────────── */
.focus-no-md {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,.35);
  border-bottom: 1px solid rgba(226,232,240,.6);
}
.focus-generate-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Focus — fiche de poste manuelle ─────────────────────────────────────── */
#focus-jd-details { padding: 0 24px 18px; margin-top: 0 !important; }
#focus-jd-details summary { padding-top: 14px; }

/* ── Focus footer — actions principales ──────────────────────────────────── */
.focus-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  background: rgba(240,244,255,.4);
  border-top: 1px solid rgba(226,232,240,.6);
}
.focus-footer .btn { padding: 8px 20px; font-weight: 600; }
.btn-focus-done { box-shadow: 0 2px 8px rgba(34,197,94,.25); }
.kbd-inline {
  display: inline-block;
  margin-left: 8px;
  padding: 0 5px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 16px;
  border-radius: 4px;
  background: rgba(0,0,0,.12);
  font-family: inherit;
}
body.theme-dark .focus-footer { background: #1c2128; border-top-color: #30363d; }

/* ── Focus Pomodoro CTA ──────────────────────────────────────────────────── */
.focus-pomo {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px;
  border: 1px solid #fdba74; background: #fff7ed; color: #c2410c;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  font-variant-numeric: tabular-nums; letter-spacing: .2px;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
}
.focus-pomo:hover { background: #ffedd5; border-color: #fb923c; transform: translateY(-1px); }
.focus-pomo i { font-size: 15px; }
.focus-pomo.running { background: linear-gradient(135deg, #ea580c, #f97316); border-color: #ea580c; color: #fff; }
.focus-pomo.done { animation: pomoFlash 1s ease-in-out infinite; }

/* ── Row preview cursor ──────────────────────────────────────────────────── */
.offer-row-preview { cursor: pointer; }

/* ── Inline editable cells (company / title) ─────────────────────────────── */
.td-editable {
  cursor: text;
  border-bottom: 1px dashed transparent;
  outline: none;
  transition: border-color .15s, background .15s;
  border-radius: 2px;
  padding: 2px 4px;
}
.td-editable:hover { border-bottom-color: rgba(100,120,160,0.4); }
.td-editable:focus { background: rgba(30,58,95,0.06); border-bottom-color: #1e3a5f; }

/* ── Pending list ────────────────────────────────────────────────────────── */
.pending-list {
  background: rgba(248,250,252,.6);
  border: 1px solid rgba(226,232,240,.5);
  border-radius: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  font-size: 13px;
}
.pending-item { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; }
.pending-item:hover { background: #f1f5f9; }
.pending-item label { cursor: pointer; }
.pending-actions { display: flex; gap: 8px; }

/* ── Modal overlay (custom SPA modal) ───────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .42);
  z-index: 1060;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px) saturate(0.8);
  -webkit-backdrop-filter: blur(12px) saturate(0.8);
}
.modal-overlay .modal-dialog { margin: 0; width: 700px; max-width: 95vw; }

/* ── Cleanup modal — design spécifique ──────────────────────────────────── */
#cleanup-modal .modal-dialog {
  width: 660px;
  max-width: 95vw;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.06),
    0 24px 64px rgba(2,8,24,.55),
    0 8px 24px rgba(2,8,24,.35);
}

#cleanup-modal .modal-content {
  border: none;
  border-radius: 20px;
  overflow: hidden;
}

#cleanup-modal .modal-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #164e30 100%);
  border-bottom: none;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#cleanup-modal .modal-title {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.3px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

#cleanup-modal .modal-title i {
  font-size: 18px;
  opacity: .85;
  color: #4ade80;
}

#cleanup-modal #cleanup-modal-close {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 13px;
  transition: background .15s;
}
#cleanup-modal #cleanup-modal-close:hover {
  background: rgba(255,255,255,.22);
  color: #fff;
}

#cleanup-modal .cleanup-body {
  background: rgba(255,255,255,.6);
  padding: 8px 0 4px;
}
.modal-content-body {
  padding: 22px 24px;
  overflow-y: auto;
  max-height: 62vh;
  font-size: 13.5px;
  line-height: 1.8;
  white-space: pre-wrap;
  color: #334155;
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid rgba(226,232,240,.6);
  background: rgba(240,244,255,.4);
}
.modal-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #64748b;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: -1px;
  border-radius: 0;
}
.modal-tab:hover { color: #1e293b; background: none; }
.modal-tab.active { color: var(--tblr-primary); border-bottom-color: var(--tblr-primary); font-weight: 600; }

/* ── Log box (terminal dark) ─────────────────────────────────────────────── */
.log-box {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  overflow: hidden;
}
.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid #1e293b;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.log-header button {
  background: transparent;
  border: 1px solid #334155;
  color: #64748b;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
}
.log-header button:hover { background: #1e293b; color: #94a3b8; }
.log-box pre {
  font-family: 'Consolas', 'SF Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  padding: 14px 16px;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  color: #94a3b8;
  margin: 0;
}

/* ── Globe card ──────────────────────────────────────────────────────────── */
.globe-card {
  position: relative;
  background: #020c1b;
  border: 1px solid rgba(74,222,128,0.12);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(74,222,128,0.05),
    0 12px 60px rgba(2,8,24,0.60),
    0 4px 16px rgba(2,8,24,0.40),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Lueur verte subtile sur le bord supérieur */
.globe-card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(74,222,128,0.45), transparent);
  z-index: 20;
}

.globe-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  background: linear-gradient(180deg, rgba(2,10,24,0.90) 0%, transparent 100%);
  pointer-events: none;
}

.globe-footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 12px 20px 16px;
  background: linear-gradient(0deg, rgba(2,10,24,0.88) 0%, transparent 100%);
  pointer-events: none;
}

.globe-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.globe-stat-value {
  font-size: 17px;
  font-weight: 700;
  color: #4ade80;
  line-height: 1;
}

.globe-stat-label {
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.50);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.globe-stat-sep {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.10);
}

.globe-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(74,222,128,0.10);
  border: 1px solid rgba(74,222,128,0.28);
  color: #4ade80;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 15px;
  border-radius: 100px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Point clignotant dans le badge */
.globe-badge::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: #4ade80;
  border-radius: 50%;
  margin-right: 8px;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { opacity: 1; transform: scale(1);   }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

#globe-wrap {
  width: 100%;
  display: block;
  line-height: 0;
  aspect-ratio: 5/3;
  min-height: 240px;       /* garde-fou : la carte ne s'effondre pas si le canvas WebGL n'apparaît pas */
  max-height: 520px;
  overflow: hidden;
}

#globe-wrap canvas {
  display: block;
  width: 100% !important;
}

/* ── Tip du jour ─────────────────────────────────────────────────────────── */
.tip-card {
  background: rgba(255,255,255,.5);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(30,58,95,.08);
  border-radius: 16px;
  padding: 20px 28px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.5) inset,
    0 2px 8px rgba(15,23,42,.04),
    0 8px 32px rgba(15,23,42,.03);
  transition: box-shadow .25s ease, transform .25s ease;
}
.tip-card:hover {
  box-shadow:
    0 0 0 1px rgba(255,255,255,.5) inset,
    0 4px 12px rgba(15,23,42,.06),
    0 12px 40px rgba(15,23,42,.05);
}
.tip-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #1e3a5f, #2563eb);
  border-radius: 4px 0 0 4px;
}
.tip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.tip-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  border-radius: 10px;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}
.tip-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
}
.tip-category {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.tip-card > div { flex: 1; }
.tip-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #374151;
  transition: opacity .25s ease;
}
.tip-category {
  transition: opacity .25s ease;
}

/* ── Countdown rentrée ───────────────────────────────────────────────────── */
.countdown-card {
  background: rgba(255,255,255,.5);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(22,163,74,.1);
  border-radius: 16px;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.5) inset,
    0 2px 8px rgba(15,23,42,.04),
    0 8px 32px rgba(15,23,42,.03);
  transition: box-shadow .25s ease;
}
.countdown-card:hover {
  box-shadow:
    0 0 0 1px rgba(255,255,255,.5) inset,
    0 4px 12px rgba(15,23,42,.06),
    0 12px 40px rgba(15,23,42,.05);
}
.countdown-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #16a34a, #059669);
  border-radius: 4px 0 0 4px;
}
.countdown-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 160px;
}
.countdown-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #16a34a, #059669);
  border-radius: 12px;
  color: #fff;
  font-size: 20px;
  flex-shrink: 0;
}
.countdown-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
}
.countdown-date {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-top: 2px;
}
.countdown-center {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-shrink: 0;
}
.countdown-number {
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  color: #16a34a;
  letter-spacing: -2px;
}
.countdown-unit {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
}
.countdown-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.countdown-bar-wrap {
  width: 100%;
  height: 8px;
  background: #e8ecf0;
  border-radius: 8px;
  overflow: hidden;
}
.countdown-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #4ade80);
  border-radius: 8px;
  transition: width .6s ease;
}
.countdown-sub {
  font-size: 12px;
  color: #64748b;
}

/* dark */
body.theme-dark .countdown-card { background: #161b22; border-color: #30363d; }
body.theme-dark .countdown-date  { color: #c9d1d9; }
body.theme-dark .countdown-bar-wrap { background: #21262d; }
body.theme-dark .countdown-number { color: #4ade80; }

/* ── Streak ──────────────────────────────────────────────────────────────── */
.streak-card {
  background: rgba(255,255,255,.5);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(234,88,12,.1);
  border-radius: 16px;
  padding: 20px 28px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.5) inset,
    0 2px 8px rgba(15,23,42,.04),
    0 8px 32px rgba(15,23,42,.03);
  transition: box-shadow .25s ease;
  display: flex;
  align-items: center;
  gap: 28px;
  position: relative;
  overflow: hidden;
}
.streak-card:hover {
  box-shadow:
    0 0 0 1px rgba(255,255,255,.5) inset,
    0 4px 12px rgba(15,23,42,.06),
    0 12px 40px rgba(15,23,42,.05);
}
.streak-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #ea580c, #f97316);
  border-radius: 4px 0 0 4px;
}
.streak-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 160px;
}
.streak-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ea580c, #f97316);
  border-radius: 12px;
  color: #fff;
  font-size: 20px;
  flex-shrink: 0;
}
.streak-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
}
.streak-sub {
  font-size: 12px;
  color: #374151;
  margin-top: 2px;
}
.streak-center {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-shrink: 0;
}
.streak-number {
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  color: #ea580c;
  letter-spacing: -2px;
}
.streak-unit {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
}
.streak-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.streak-best-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.streak-trophy { color: #f59e0b; font-size: 16px; }
.streak-best-label { font-size: 12px; color: #64748b; }
.streak-best-val { font-size: 20px; font-weight: 700; color: #ea580c; }
.streak-best-unit { font-size: 12px; color: #64748b; }
.streak-total { font-size: 12px; color: #94a3b8; }

body.theme-dark .streak-card  { background: #161b22; border-color: #30363d; }
body.theme-dark .streak-sub   { color: #c9d1d9; }
body.theme-dark .streak-number, body.theme-dark .streak-best-val { color: #fb923c; }

/* ── Barre de progression objectif ───────────────────────────────────────── */
.progress-obj-card {
  background: rgba(255,255,255,.5);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(124,58,237,.1);
  border-radius: 16px;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.5) inset,
    0 2px 8px rgba(15,23,42,.04),
    0 8px 32px rgba(15,23,42,.03);
  transition: box-shadow .25s ease;
}
.progress-obj-card:hover {
  box-shadow:
    0 0 0 1px rgba(255,255,255,.5) inset,
    0 4px 12px rgba(15,23,42,.06),
    0 12px 40px rgba(15,23,42,.05);
}
.progress-obj-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #7c3aed, #a855f7);
  border-radius: 4px 0 0 4px;
}
.progress-obj-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 180px;
}
.progress-obj-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-radius: 12px;
  color: #fff;
  font-size: 20px;
  flex-shrink: 0;
}
.progress-obj-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
}
.progress-obj-count {
  font-size: 22px;
  font-weight: 800;
  color: #7c3aed;
  margin-top: 2px;
  letter-spacing: -0.5px;
}
.progress-obj-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.progress-obj-bar-wrap {
  width: 100%;
  height: 10px;
  background: #e8ecf0;
  border-radius: 8px;
  overflow: hidden;
}
.progress-obj-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  border-radius: 8px;
  transition: width .6s ease;
  min-width: 4px;
}
.progress-obj-sub {
  font-size: 12px;
  color: #64748b;
}

body.theme-dark .progress-obj-card  { background: #161b22; border-color: #30363d; }
body.theme-dark .progress-obj-count { color: #a78bfa; }
body.theme-dark .progress-obj-bar-wrap { background: #21262d; }

/* ── Bento grid — layout C ───────────────────────────────────────────────── */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
}
.bento-matrix-left,
.bento-matrix-right { min-height: 200px; }

.bento-center {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.bento-globe { margin: 0 !important; }

.bento-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.bento-kpis .countdown-card,
.bento-kpis .streak-card,
.bento-kpis .progress-obj-card {
  padding: 14px 16px;
  gap: 10px;
  flex-wrap: wrap;
}
.bento-kpis .countdown-left,
.bento-kpis .streak-left,
.bento-kpis .progress-obj-left { min-width: unset; gap: 8px; }
.bento-kpis .countdown-number,
.bento-kpis .streak-number { font-size: 30px; }

@media (max-width: 900px) {
  .bento-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-matrix-left, .bento-matrix-right { min-height: 100px; }
  .bento-kpis { grid-template-columns: 1fr; }
}

/* ── Matrix rain ─────────────────────────────────────────────────────────── */
.matrix-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid transparent;
  background: transparent;
  line-height: 0;
  height: 100%;
  position: relative;
}
.matrix-card canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

body.theme-dark .matrix-card { background: transparent; border-color: transparent; }

/* ── About section ───────────────────────────────────────────────────────── */
.about-section {
  background: rgba(255,255,255,.5);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(30,58,95,.08);
  border-radius: 18px;
  padding: 36px 40px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.5) inset,
    0 2px 8px rgba(15,23,42,.04),
    0 8px 32px rgba(15,23,42,.04);
}

.about-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid #f1f5f9;
}

.about-logo {
  height: 64px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.about-title {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 4px;
  letter-spacing: -.5px;
}

.about-subtitle {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
}

.about-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.about-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 0 12px;
}

.about-step-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0,0,0,.14), 0 0 0 4px rgba(255,255,255,0.18);
}

.about-step-icon i {
  font-size: 40px;
  color: #fff;
}

.about-step-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.about-step-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.65;
}

.about-step-arrow {
  display: flex;
  align-items: center;
  padding-top: 16px;
  color: #cbd5e1;
  font-size: 22px;
  flex-shrink: 0;
}

/* ── Guide d'utilisation ─────────────────────────────────────────────────── */
.guide-section {
  background: rgba(255,255,255,.5);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(30,58,95,.08);
  border-radius: 18px;
  padding: 36px 40px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.5) inset,
    0 2px 8px rgba(15,23,42,.04),
    0 8px 32px rgba(15,23,42,.04);
}

.guide-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.guide-section-header i {
  font-size: 24px;
  color: #2563eb;
}

.guide-section-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  letter-spacing: -0.3px;
}

.guide-accordion { display: flex; flex-direction: column; gap: 8px; }

.guide-item {
  border: 1px solid rgba(30,58,95,.06);
  border-radius: 13px;
  overflow: hidden;
  background: rgba(255,255,255,.5);
  transition: box-shadow .25s cubic-bezier(0.22, 1, 0.36, 1),
              transform .25s cubic-bezier(0.22, 1, 0.36, 1);
}
.guide-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(30,58,95,.06);
}

.guide-item[open] { box-shadow: 0 4px 20px rgba(30,58,95,.08); transform: none; background: rgba(255,255,255,.7); }

.guide-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  background: rgba(245,247,252,.5);
  user-select: none;
}

.guide-summary::-webkit-details-marker { display: none; }
.guide-item[open] .guide-summary { background: rgba(240,244,255,.5); border-bottom: 1px solid rgba(226,232,240,.6); }

.guide-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guide-icon i { font-size: 18px; color: #fff; }

.guide-summary-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.guide-chevron {
  font-size: 16px;
  color: #94a3b8;
  transition: transform .2s;
  flex-shrink: 0;
}

.guide-item[open] .guide-chevron { transform: rotate(180deg); }

.guide-body { padding: 20px 24px; }

.guide-steps-list { display: flex; flex-direction: column; gap: 14px; }

.guide-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  color: #475569;
  line-height: 1.65;
}

.guide-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1e3a5f;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.guide-step-item code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  color: #1e3a5f;
}

.guide-intro {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 4px 0 18px; padding: 12px 16px;
  background: linear-gradient(135deg, rgba(37,99,235,.06), rgba(22,163,74,.06));
  border: 1px solid #e2e8f0; border-radius: 12px;
  font-size: 13.5px; color: #475569; line-height: 1.6;
}
.guide-intro i { color: #2563eb; font-size: 18px; margin-top: 1px; flex-shrink: 0; }
.guide-intro b { color: #1e3a5f; font-weight: 600; }

.guide-tip {
  display: flex; align-items: flex-start; gap: 9px;
  margin-top: 4px; padding: 10px 13px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 9px;
  font-size: 12.5px; color: #92400e; line-height: 1.55;
}
.guide-tip i { color: #d97706; font-size: 15px; margin-top: 1px; flex-shrink: 0; }
.guide-tip strong { color: #78350f; }

/* ── btn-primary → navy custom ───────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, #1e3a5f, #264a73) !important;
  border-color: #1e3a5f !important;
  color: #fff !important;
  box-shadow: 0 1px 3px rgba(30,58,95,.2), 0 4px 12px rgba(30,58,95,.12);
}
.btn-primary:hover, .btn-primary:active, .btn-primary:focus {
  background: linear-gradient(135deg, #152d4a, #1e3a5f) !important;
  border-color: #152d4a !important;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(30,58,95,.25), 0 6px 18px rgba(30,58,95,.15);
}
.btn-outline-primary { color: #1e3a5f !important; border-color: #1e3a5f !important; background: transparent !important; }
.btn-outline-primary:hover, .btn-outline-primary:active { background-color: #1e3a5f !important; border-color: #1e3a5f !important; color: #fff !important; }

/* ── Page fade-in ────────────────────────────────────────────────────────── */
.page.active { animation: pageFadeIn .22s ease both; }
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Entrée Focus depuis zoom globe ─────────────────────────────────────── */
body.focus-zoom-enter #page-focus.active {
  animation: focusZoomEnter .52s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes focusZoomEnter {
  from { opacity: 0; transform: scale(0.96) translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ── Mode Globe Fullscreen — Focus en overlay ────────────────────────────── */

/* Bouton retour Dashboard en mode globe fullscreen */
#focus-back-btn {
  display: none;
  position: fixed;
  top: 86px; /* sous la navbar (68px), désormais visible en mode globe */
  left: 18px;
  z-index: 9990;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(2, 8, 24, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 10px;
  color: #4ade80;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s, border-color .18s;
}
#focus-back-btn:hover {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.5);
}
body.focus-globe-mode #focus-back-btn { display: flex; }

/* Globe card déplacée dans body — plein écran */
.globe-card-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 50 !important;
  border-radius: 0 !important;
  border: none !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  box-shadow: none !important;
  pointer-events: none;
  background: #020c1b;
}
.globe-card-fullscreen .globe-header,
.globe-card-fullscreen .globe-footer { display: none !important; }
.globe-card-fullscreen #globe-wrap {
  width: 100% !important;
  height: 100vh !important;
  max-height: none !important;
  aspect-ratio: unset !important;
}

/* page-wrapper passe AU-DESSUS du globe (stacking context fix) */
body.focus-globe-mode .page-wrapper {
  z-index: 52 !important;
  background: transparent !important;
}

/* Focus en overlay par-dessus le globe fullscreen */
body.focus-globe-mode #page-focus.active {
  position: fixed !important;
  inset: 0 !important;
  overflow-y: auto !important;
  background: transparent !important;
  animation: focusGlobeEnter .50s cubic-bezier(0.22, 1, 0.36, 1) both;
}
body.focus-globe-mode #page-focus.active .container-xl {
  max-width: 840px;
  margin: 96px auto 64px; /* dégage la navbar (68px) désormais visible */
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  border-radius: 20px;
  border: 1px solid rgba(30, 58, 95, 0.12);
  box-shadow: 0 8px 60px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.6);
  padding: 36px !important;
}

/* Dark mode */
body.theme-dark.focus-globe-mode #page-focus.active .container-xl {
  background: rgba(2, 8, 24, 0.78);
  backdrop-filter: blur(22px) saturate(0.65);
  -webkit-backdrop-filter: blur(22px) saturate(0.65);
  border: 1px solid rgba(74, 222, 128, 0.14);
  box-shadow: 0 8px 60px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.04);
}

@keyframes focusGlobeEnter {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* ── Toast notifications ─────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast-item {
  background: rgba(255,255,255,.65); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(30,58,95,.1); border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.4) inset,
    0 4px 12px rgba(15,23,42,.08),
    0 12px 32px rgba(15,23,42,.1);
  padding: 11px 16px 11px 14px; font-size: 13.5px; font-weight: 500; color: #1e293b;
  display: flex; align-items: center; gap: 10px;
  min-width: 200px; max-width: 320px; pointer-events: auto;
  animation: toastIn .22s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.toast-item.success { border-left: 4px solid #16a34a; }
.toast-item.error   { border-left: 4px solid #dc2626; }
.toast-item.info    { border-left: 4px solid #1e3a5f; }
.toast-item i { font-size: 15px; flex-shrink: 0; }
.toast-item.success i { color: #16a34a; }
.toast-item.error i   { color: #dc2626; }
.toast-item.info i    { color: #1e3a5f; }
@keyframes toastIn  { from { opacity:0; transform:translateX(14px); } to { opacity:1; transform:translateX(0); } }
@keyframes toastOut { from { opacity:1; max-height:80px; } to { opacity:0; max-height:0; padding-top:0; padding-bottom:0; margin:0; } }

/* Toast avec bouton d'action (Annuler) */
.toast-item.toast-action { padding-right: 8px; }
.toast-action-msg { flex: 1; }
.toast-action-btn {
  flex-shrink: 0; border: 0; cursor: pointer;
  background: rgba(30,58,95,.08); color: #1e3a5f;
  font-size: 12.5px; font-weight: 600; border-radius: 8px;
  padding: 5px 12px; transition: background-color .15s;
}
.toast-action-btn:hover { background: rgba(30,58,95,.16); }
body.theme-dark .toast-action-btn { background: rgba(88,166,255,.16); color: #58a6ff; }
body.theme-dark .toast-action-btn:hover { background: rgba(88,166,255,.28); }

/* ── Focus progress bar ──────────────────────────────────────────────────── */
.focus-progress-wrap {
  height: 5px; background: #e8ecf0; border-radius: 99px;
  overflow: hidden; margin-bottom: 14px;
}
.focus-progress-bar {
  height: 5px; background: linear-gradient(90deg, #1e3a5f, #16a34a);
  border-radius: 99px; transition: width .35s cubic-bezier(.4,0,.2,1);
}

/* ── Compteur candidatures du jour ───────────────────────────────────────── */
.focus-daily-count {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: #c2410c;
  background: rgba(249,115,22,.1); border: 1px solid rgba(249,115,22,.2);
  padding: 3px 10px; border-radius: 99px; white-space: nowrap;
}
.focus-daily-count i { font-size: 13px; color: #f97316; }
.focus-daily-count.bump { animation: dailyBump .3s cubic-bezier(.22,1,.36,1); }
@keyframes dailyBump { 0% { transform: scale(1); } 45% { transform: scale(1.18); } 100% { transform: scale(1); } }
body.theme-dark .focus-daily-count {
  color: #fdba74; background: rgba(249,115,22,.14); border-color: rgba(249,115,22,.28);
}
@media (prefers-reduced-motion: reduce) { .focus-daily-count.bump { animation: none; } }

/* ── Keyboard hint ───────────────────────────────────────────────────────── */
.focus-kbd-hint {
  font-size: 11.5px; color: #94a3b8;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.focus-kbd-hint kbd {
  background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 4px;
  padding: 1px 5px; font-size: 10.5px; font-family: inherit; color: #64748b;
}

/* ── Skeleton loader ─────────────────────────────────────────────────────── */
@keyframes shimmer { 0% { background-position:200% 0; } 100% { background-position:-200% 0; } }
.skeleton-cell {
  height: 12px; border-radius: 4px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%; animation: shimmer 1.3s ease infinite;
  display: inline-block;
}

/* ── Squelette de chargement du .md (onglet Focus) ───────────────────────── */
.focus-md-skeleton { display: flex; flex-direction: column; gap: 14px; padding: 4px 0; }
.focus-md-skeleton .skeleton-line {
  height: 13px; border-radius: 5px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%; animation: shimmer 1.3s ease infinite;
}
.focus-md-skeleton .w-40 { width: 40%; height: 18px; }
.focus-md-skeleton .w-60 { width: 60%; }
.focus-md-skeleton .w-80 { width: 80%; }
.focus-md-skeleton .w-90 { width: 90%; }
.focus-md-skeleton .w-95 { width: 95%; }
@media (prefers-reduced-motion: reduce) {
  .focus-md-skeleton .skeleton-line, .skeleton-cell { animation: none; }
}
body.theme-dark .focus-md-skeleton .skeleton-line {
  background: linear-gradient(90deg, #1c2128 25%, #30363d 50%, #1c2128 75%);
  background-size: 200% 100%;
}

/* ── Table empty state ───────────────────────────────────────────────────── */
.table-empty-row td { padding: 52px 24px; text-align: center; color: #94a3b8; }
.table-empty-row i  { font-size: 2rem; display: block; margin-bottom: 10px; }
.table-empty-row p  { margin: 0; font-size: 13.5px; }

/* ── Cleanup / Maintenance (modal) ───────────────────────────────────────── */

.cleanup-body {
  display: flex;
  flex-direction: column;
}

.cleanup-action {
  padding: 20px 28px;
  transition: background .12s;
}
.cleanup-action:hover { background: #fafbfc; }

.cleanup-action-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.cleanup-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.cleanup-action-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  line-height: 1.4;
}

.cleanup-action-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.65;
}

.cleanup-action-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-left: 56px;
}

.cleanup-divider {
  height: 1px;
  margin: 0 28px;
  background: #f1f5f9;
}

/* ── Theme toggle button (navbar) ────────────────────────────────────────── */
.theme-toggle-btn {
  background: rgba(255,255,255,.5);
  border: 1px solid rgba(226,232,240,.6);
  color: #64748b;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
  font-size: 18px;
  flex-shrink: 0;
  padding: 0;
  touch-action: manipulation;
}
@media (max-width: 768px) {
  .theme-toggle-btn {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}
.theme-toggle-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DARK THEME
   ═══════════════════════════════════════════════════════════════════════════ */

/* Transition douce sur les éléments principaux */
body,
.card, .navbar, .modal-content, .form-control, .form-select,
.focus-tabs, .focus-email-actions, .focus-card-header, .focus-no-md,
.pending-list, .about-section, .guide-section, .guide-summary, .toast-item {
  transition: background-color .22s, border-color .22s, color .22s, box-shadow .22s;
}

body.theme-dark {
  background: linear-gradient(135deg, #0d1117 0%, #0f1923 50%, #0d1117 100%);
  color: #e6edf3;

  /* Tabler CSS variables override */
  --tblr-body-bg:              #0d1117;
  --tblr-body-color:           #e6edf3;
  --tblr-card-bg:              #161b22;
  --tblr-card-cap-bg:          #1c2128;
  --tblr-border-color:         #30363d;
  --tblr-secondary-bg:         #1c2128;
  --tblr-secondary-color:      #8b949e;
  --tblr-muted:                #8b949e;
  --tblr-emphasis-color:       #e6edf3;
  --tblr-heading-color:        #e6edf3;
  --tblr-link-color:           #58a6ff;
  --tblr-link-hover-color:     #79c0ff;
  --tblr-table-bg:             transparent;
  --tblr-table-striped-bg:     rgba(255,255,255,0.02);
  --tblr-table-hover-bg:       rgba(255,255,255,0.04);
  --tblr-table-border-color:   #30363d;
  --tblr-input-bg:             #0d1117;
  --tblr-input-color:          #e6edf3;
  --tblr-input-border-color:   #30363d;
  --tblr-input-placeholder-color: #6e7681;
  --tblr-form-select-bg-img:   url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238b949e' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

/* Blobs — atténués en dark */
body.theme-dark::before { opacity: .10; }
body.theme-dark::after  { opacity: .08; }
body.theme-dark .blob-extra { opacity: .05; }

/* ── Navbar ─────────────────────────────────────────────────────────────── */
body.theme-dark .navbar {
  background: #161b22;
  border-bottom-color: #30363d;
  box-shadow: 0 2px 16px rgba(0,0,0,.4);
}
body.theme-dark .navbar-divider { background: #30363d; }
body.theme-dark .navbar .nav-link { color: #8b949e; }
body.theme-dark .navbar .nav-link:hover { background: #21262d; color: #e6edf3; }
body.theme-dark .theme-toggle-btn { background: rgba(255,255,255,.04); border-color: #30363d; color: #8b949e; }
body.theme-dark .theme-toggle-btn:hover { background: #21262d; color: #e6edf3; border-color: #484f58; }

/* ── Cards ──────────────────────────────────────────────────────────────── */
body.theme-dark .card {
  background: #161b22;
  border-color: #30363d;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
  color: #e6edf3;
}
body.theme-dark .card-header {
  background: #1c2128;
  border-bottom-color: #30363d;
  color: #e6edf3;
}
body.theme-dark .card-footer {
  background: #1c2128;
  border-top-color: #30363d;
}
body.theme-dark .card-title { color: #e6edf3; }
body.theme-dark .subheader  { color: #8b949e; }
body.theme-dark .avatar.bg-blue-lt { background: rgba(56,139,253,.15) !important; }
body.theme-dark .avatar.bg-green-lt { background: rgba(63,185,80,.12) !important; }
body.theme-dark .avatar.bg-yellow-lt { background: rgba(210,153,34,.12) !important; }
body.theme-dark .avatar.bg-red-lt { background: rgba(248,81,73,.12) !important; }
body.theme-dark .text-blue  { color: #58a6ff !important; }
body.theme-dark .text-green { color: #3fb950 !important; }
body.theme-dark .text-yellow { color: #d29922 !important; }
body.theme-dark .text-red   { color: #f85149 !important; }
body.theme-dark .text-muted, body.theme-dark .text-secondary { color: #8b949e !important; }
body.theme-dark h1, body.theme-dark h2, body.theme-dark h3,
body.theme-dark h4, body.theme-dark h5, body.theme-dark h6,
body.theme-dark .h1, body.theme-dark .page-title { color: #e6edf3; }

/* ── Tables ─────────────────────────────────────────────────────────────── */
body.theme-dark .table { color: #e6edf3; }
body.theme-dark .table thead th {
  background: #1c2128;
  color: #8b949e;
  border-bottom-color: #30363d;
}
body.theme-dark .table td,
body.theme-dark .table th { border-color: #21262d; }
body.theme-dark .table-hover tbody tr:hover td { background: rgba(255,255,255,.04); }
body.theme-dark .table-striped > tbody > tr:nth-of-type(odd) > td { background: rgba(255,255,255,.02); }
body.theme-dark .table-empty-row td { color: #6e7681; }
body.theme-dark .td-editable:hover { border-bottom-color: rgba(139,148,158,0.4); }
body.theme-dark .td-editable:focus { background: rgba(255,255,255,0.06); border-bottom-color: #58a6ff; }

/* ── Formulaires ────────────────────────────────────────────────────────── */
.form-control, .form-select {
  border-radius: 9px;
  border: 1px solid rgba(226,232,240,.7);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.form-control:focus, .form-select:focus {
  border-color: rgba(30,58,95,.3);
  box-shadow: 0 0 0 3px rgba(30,58,95,.08);
}
body.theme-dark .form-control,
body.theme-dark .form-select {
  background-color: #0d1117;
  border-color: #30363d;
  color: #e6edf3;
}
body.theme-dark .form-control::placeholder { color: #6e7681; }
body.theme-dark .form-control:focus,
body.theme-dark .form-select:focus {
  background-color: #0d1117;
  border-color: #58a6ff;
  color: #e6edf3;
  box-shadow: 0 0 0 2px rgba(88,166,255,.15);
}
body.theme-dark .form-label { color: #8b949e; }
body.theme-dark .statut-select {
  background: #0d1117;
  border-color: #30363d;
  color: #e6edf3;
}
body.theme-dark .statut-select:focus {
  box-shadow: 0 0 0 2px rgba(56, 139, 253, 0.3);
}
body.theme-dark .statut-select.statut-done      { background: rgba(63,185,80,.15); color: #3fb950; border-color: rgba(63,185,80,.3); }
body.theme-dark .statut-select.statut-encours   { background: rgba(56,139,253,.15); color: #58a6ff; border-color: rgba(56,139,253,.3); }
body.theme-dark .statut-select.statut-entretien { background: rgba(137,87,229,.15); color: #a371f7; border-color: rgba(137,87,229,.3); }
body.theme-dark .statut-select.statut-refus     { background: rgba(248,81,73,.15); color: #f85149; border-color: rgba(248,81,73,.3); }
body.theme-dark .statut-select.statut-expire    { background: #1c2128; color: #8b949e; border-color: #30363d; }
body.theme-dark .statut-select.statut-acandidater { background: rgba(210,153,34,.15); color: #d29922; border-color: rgba(210,153,34,.3); }

/* ── Badges ─────────────────────────────────────────────────────────────── */
body.theme-dark .badge-none  { background: #1c2128;             color: #8b949e;  border-color: #30363d; }
body.theme-dark .badge-none::before { background: #484f58; box-shadow: none; }
body.theme-dark .badge-ok    { background: rgba(63,185,80,.15); color: #3fb950;  border-color: rgba(63,185,80,.3); }
body.theme-dark .badge-ok::before { background: #3fb950; box-shadow: 0 0 6px rgba(63,185,80,.5); }
body.theme-dark .badge-err   { background: rgba(248,81,73,.15); color: #f85149;  border-color: rgba(248,81,73,.3); }
body.theme-dark .badge-err::before { background: #f85149; box-shadow: 0 0 6px rgba(248,81,73,.5); }
body.theme-dark .badge-warn  { background: rgba(210,153,34,.15);color: #d29922;  border-color: rgba(210,153,34,.3); }
body.theme-dark .badge-warn::before { background: #d29922; box-shadow: 0 0 6px rgba(210,153,34,.5); }
body.theme-dark .badge-med   { background: rgba(210,153,34,.15);color: #d29922;  border-color: rgba(210,153,34,.3); }
body.theme-dark .badge-med::before { background: #d29922; box-shadow: 0 0 6px rgba(210,153,34,.5); }
body.theme-dark .key-badge.ok      { background: rgba(63,185,80,.15); color: #3fb950; border-color: rgba(63,185,80,.3); }
body.theme-dark .key-badge.missing { background: rgba(248,81,73,.15); color: #f85149; border-color: rgba(248,81,73,.3); }
body.theme-dark .bb-countdown.ok      { background: rgba(63,185,80,.15); color: #3fb950; border-color: rgba(63,185,80,.3); }
body.theme-dark .bb-countdown.warn    { background: rgba(210,153,34,.15);color: #d29922; border-color: rgba(210,153,34,.3); }
body.theme-dark .bb-countdown.expired { background: rgba(248,81,73,.15); color: #f85149; border-color: rgba(248,81,73,.3); }
body.theme-dark .pomodoro-pill { background: rgba(255,255,255,.04); border-color: #30363d; color: #8b949e; }
body.theme-dark .pomodoro-pill:hover { background: #21262d; color: #e6edf3; border-color: #484f58; }
body.theme-dark .pomodoro.running .pomodoro-pill { background: rgba(234,88,12,.15); border-color: rgba(234,88,12,.4); color: #fb923c; }
body.theme-dark .pomodoro-panel { background: #161b22; border-color: #30363d; box-shadow: 0 12px 32px rgba(0,0,0,.5); }
body.theme-dark .pomodoro-panel-head { color: #8b949e; }
body.theme-dark .pomodoro-display { color: #e6edf3; }
body.theme-dark .pomodoro-preset { background: #1c2128; border-color: #30363d; color: #8b949e; }
body.theme-dark .pomodoro-preset:hover { border-color: #484f58; }
body.theme-dark .pomodoro-custom { background: #1c2128; border-color: #30363d; color: #e6edf3; }
body.theme-dark .pomodoro-close { color: #6e7681; }
body.theme-dark .pomodoro-close:hover { color: #e6edf3; }

/* ── Pagination ─────────────────────────────────────────────────────────── */
body.theme-dark .pagination button {
  background: #161b22;
  border-color: #30363d;
  color: #8b949e;
}
body.theme-dark .pagination button:hover:not(.active) { background: #21262d; color: #e6edf3; }

/* ── Barres statuts ─────────────────────────────────────────────────────── */
body.theme-dark .statut-bar-label { color: #8b949e; }
body.theme-dark .statut-bar-track { background: #21262d; }
body.theme-dark .statut-bar-count { color: #8b949e; }

/* ── Focus ──────────────────────────────────────────────────────────────── */
body.theme-dark .focus-card-header { background: #1c2128; }
body.theme-dark .focus-company     { color: #e6edf3 !important; }
body.theme-dark .focus-num         { color: #6e7681; }
body.theme-dark .focus-tabs        { background: #161b22; border-bottom-color: #30363d; }
body.theme-dark .focus-tab         { color: #8b949e; }
body.theme-dark .focus-tab:hover   { color: #e6edf3; }
body.theme-dark .focus-tab.active  { color: #58a6ff; border-bottom-color: #58a6ff; }
body.theme-dark .focus-email-actions { background: #1c2128; border-bottom-color: #30363d; }
body.theme-dark .focus-md-content  { color: #c9d1d9; }
body.theme-dark .focus-no-md       { background: #161b22; border-bottom-color: #30363d; }
body.theme-dark .focus-progress-wrap { background: #21262d; }
body.theme-dark .focus-pomo        { background: rgba(234,88,12,.12); border-color: rgba(234,88,12,.4); color: #fb923c; }
body.theme-dark .focus-pomo:hover  { background: rgba(234,88,12,.2); }
body.theme-dark .focus-pomo.running{ background: linear-gradient(135deg, #ea580c, #f97316); border-color: #ea580c; color: #fff; }
body.theme-dark .focus-kbd-hint    { color: #6e7681; }
body.theme-dark .focus-kbd-hint kbd {
  background: #1c2128;
  border-color: #30363d;
  color: #8b949e;
}

/* ── Pending ────────────────────────────────────────────────────────────── */
body.theme-dark .pending-list {
  background: #1c2128;
  border-color: #30363d;
  color: #e6edf3;
}
body.theme-dark .pending-item:hover { background: #21262d; }

/* ── Modals ─────────────────────────────────────────────────────────────── */
body.theme-dark .modal-overlay { background: rgba(0,0,0,.88); }
body.theme-dark .modal-content {
  background: #161b22;
  border-color: #30363d;
  color: #e6edf3;
}
body.theme-dark .modal-header { border-bottom-color: #30363d; }
body.theme-dark .modal-footer { border-top-color: #30363d; background: #1c2128; }
body.theme-dark .modal-tabs   { background: #1c2128; border-bottom-color: #30363d; }
body.theme-dark .modal-tab    { color: #8b949e; }
body.theme-dark .modal-tab:hover  { color: #e6edf3; }
body.theme-dark .modal-tab.active { color: #58a6ff; border-bottom-color: #58a6ff; }
body.theme-dark .modal-content-body { color: #c9d1d9; background: #161b22; }
body.theme-dark #cleanup-modal .cleanup-body  { background: #161b22; }
body.theme-dark .cleanup-action:hover         { background: #1c2128; }
body.theme-dark .cleanup-action-title         { color: #e6edf3; }
body.theme-dark .cleanup-action-desc          { color: #8b949e; }
body.theme-dark .cleanup-divider              { background: #30363d; }

/* ── Tip du jour dark ───────────────────────────────────────────────────── */
body.theme-dark .tip-card {
  background: #161b22;
  border-color: #30363d;
}
body.theme-dark .tip-text  { color: #c9d1d9; }
body.theme-dark .tip-label { color: #8b949e; }
body.theme-dark .tip-category {
  background: #1c2128;
  color: #60a5fa;
  border-color: #1d3a5f;
}

/* ── About / Guide ──────────────────────────────────────────────────────── */
body.theme-dark .about-section,
body.theme-dark .guide-section {
  background: #161b22;
  border-color: #30363d;
}
body.theme-dark .about-header    { border-bottom-color: #30363d; }
body.theme-dark .about-title {
  background: linear-gradient(135deg, #93c5fd, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.theme-dark .about-subtitle  { color: #8b949e; }
body.theme-dark .about-step-title { color: #e6edf3; }
body.theme-dark .about-step-desc  { color: #8b949e; }
body.theme-dark .about-step-arrow { color: #30363d; }
body.theme-dark .guide-item      { border-color: #30363d; }
body.theme-dark .guide-summary   { background: #1c2128; }
body.theme-dark .guide-item[open] .guide-summary { background: #21262d; border-bottom-color: #30363d; }
body.theme-dark .guide-section-header i  { color: #58a6ff; }
body.theme-dark .guide-section-header h3 { color: #e6edf3; }
body.theme-dark .guide-summary-title     { color: #e6edf3; }
body.theme-dark .guide-chevron           { color: #6e7681; }
body.theme-dark .guide-step-item         { color: #8b949e; }
body.theme-dark .guide-badge             { background: #1e3a5f; }
body.theme-dark .guide-step-item code {
  background: #1c2128;
  border-color: #30363d;
  color: #79c0ff;
}
body.theme-dark .guide-intro { background: linear-gradient(135deg, rgba(37,99,235,.1), rgba(22,163,74,.1)); border-color: #30363d; color: #8b949e; }
body.theme-dark .guide-intro i { color: #58a6ff; }
body.theme-dark .guide-intro b { color: #e6edf3; }
body.theme-dark .guide-tip { background: rgba(210,153,34,.1); border-color: rgba(210,153,34,.3); color: #d29922; }
body.theme-dark .guide-tip i { color: #d29922; }
body.theme-dark .guide-tip strong { color: #f0c674; }

/* ── Skeleton ───────────────────────────────────────────────────────────── */
body.theme-dark .skeleton-cell {
  background: linear-gradient(90deg, #21262d 25%, #30363d 50%, #21262d 75%);
  background-size: 200% 100%;
}

/* ── Toasts ─────────────────────────────────────────────────────────────── */
body.theme-dark .toast-item {
  background: #161b22;
  border-color: #30363d;
  color: #e6edf3;
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
}
body.theme-dark .toast-item.success i { color: #3fb950; }
body.theme-dark .toast-item.error i   { color: #f85149; }
body.theme-dark .toast-item.info i    { color: #58a6ff; }

/* ── Boutons ─────────────────────────────────────────────────────────────── */
body.theme-dark .btn-outline-secondary {
  color: #8b949e !important;
  border-color: #30363d !important;
}
body.theme-dark .btn-outline-secondary:hover {
  background: #21262d !important;
  color: #e6edf3 !important;
}

/* ── Page header ────────────────────────────────────────────────────────── */
body.theme-dark .page-header .page-title { color: #e6edf3; }

/* ── Responsive ──────────────────────────────────────────────────────────── */

/* Navbar responsive */
@media (max-width: 991px) {
  .navbar .navbar-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-shrink: 1;
    min-width: 0;
  }
  .navbar .navbar-nav::-webkit-scrollbar { display: none; }
  .navbar .navbar-nav .nav-link { padding: 6px 10px; }
  .navbar-logo { height: 44px; }
  .navbar-divider { margin: 0 8px; }
}

/* Mobile : icônes seules, labels masqués */
@media (max-width: 640px) {
  .navbar { height: 56px; }
  .navbar-logo { height: 36px; }
  .navbar-divider { margin: 0 6px; }
  .navbar .navbar-nav .nav-link span { display: none; }
  .navbar .navbar-nav .nav-link { padding: 7px 10px; }
  .navbar .navbar-nav .nav-link i { font-size: 18px; }
  .bb-countdown { font-size: 10.5px; padding: 3px 8px; }
}

@media (max-width: 768px) {
  /* About */
  .about-section { padding: 24px 20px; }
  .about-steps { flex-direction: column; align-items: stretch; gap: 8px; }
  .about-step { flex-direction: row; text-align: left; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
  .about-step:last-child { border-bottom: none; }
  .about-step-body { flex: 1; }
  .about-step-arrow { display: none; }

  /* Filters */
  .filters { flex-direction: column; align-items: stretch; }
  .filters .form-control,
  .filters .form-select { min-width: 0; width: 100%; }

  /* Focus */
  .focus-card-header { flex-direction: column; gap: 12px; }
  .focus-actions { width: 100%; }
  .focus-actions .btn { flex: 1 1 calc(50% - 4px); text-align: center; justify-content: center; }
  .focus-footer { flex-wrap: wrap; padding: 12px 16px; }
  .focus-footer .btn { flex: 1 1 calc(50% - 5px); justify-content: center; }
  .focus-footer .btn-focus-done { flex: 1 1 100%; order: -1; }
  .focus-company { font-size: 18px !important; }
  .focus-md-content { max-height: 45vh; font-size: 13px; padding: 16px 18px; }
  .focus-email-actions { padding: 10px 16px; gap: 8px; }
  .focus-tab { padding: 10px 14px; font-size: 12.5px; }

  /* Modal */
  .modal-overlay .modal-dialog { width: 95vw; }
  .modal-content-body { font-size: 13px; padding: 14px; max-height: 55vh; }
  .modal-tab { padding: 9px 14px; font-size: 12.5px; }

  /* Table : masquer colonnes secondaires */
  #offers-table th:nth-child(4), #offers-table td:nth-child(4),
  #offers-table th:nth-child(5), #offers-table td:nth-child(5),
  #offers-table th:nth-child(8), #offers-table td:nth-child(8) { display: none; }

  /* Pending actions */
  .pending-actions { flex-wrap: wrap; }

  /* Log */
  .log-box pre { font-size: 11px; max-height: 260px; }
}

@media (max-width: 480px) {
  .focus-actions .btn { flex: 1 1 100%; }

  #offers-table th:nth-child(3), #offers-table td:nth-child(3),
  #offers-table th:nth-child(6), #offers-table td:nth-child(6) { display: none; }

  .focus-tab { padding: 9px 12px; }
  .statut-bar-label { width: 80px; }
}

/* ── Onboarding stepper ───────────────────────────────────────────────────── */
.start-step {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.start-step-num {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  background: var(--tblr-border-color); color: var(--tblr-muted);
  transition: background .2s, color .2s;
}
.start-step-label {
  font-size: 13px; font-weight: 600; color: var(--tblr-muted);
  transition: color .2s;
}
.start-step.active .start-step-num  { background: var(--tblr-primary); color: #fff; }
.start-step.active .start-step-label { color: var(--tblr-primary); }
.start-step.done .start-step-num   { background: var(--tblr-success); color: #fff; }
.start-step.done .start-step-label  { color: var(--tblr-success); }
.start-step-sep {
  flex: 1; height: 2px; background: var(--tblr-border-color);
  min-width: 24px;
}

/* ── Articles ────────────────────────────────────────────────────────────── */
.article-body {
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}
.article-body h1, .article-body h2, .article-body h3 { margin-top: 1.4em; margin-bottom: .5em; }
.article-body h1:first-child, .article-body h2:first-child { margin-top: 0; }
.article-body pre {
  background: var(--tblr-bg-surface-secondary, #f1f5f9);
  border-radius: 6px;
  padding: 12px 14px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.article-body code {
  background: var(--tblr-bg-surface-secondary, #f1f5f9);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: .875em;
}
.article-body pre code { background: none; padding: 0; }
.article-body blockquote {
  border-left: 4px solid var(--tblr-primary, #2563eb);
  margin-left: 0;
  padding-left: 1rem;
  color: var(--tblr-muted, #64748b);
}
.article-body ul, .article-body ol { padding-left: 1.5rem; }
.article-body img { max-width: 100%; height: auto; }

/* ── Articles — Carte grille ─────────────────────────────────────────────── */
.article-grid-card {
  cursor: pointer;
  border: 1px solid var(--tblr-border-color);
  transition: transform .18s ease, box-shadow .18s ease;
}
.article-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.13);
}
.article-grid-thumb {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--tblr-border-radius) var(--tblr-border-radius) 0 0;
  position: relative;
  overflow: hidden;
}
.article-grid-thumb > i {
  font-size: 3.2rem;
  color: rgba(255,255,255,.5);
}
.article-grid-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity .15s;
}
.article-grid-card:hover .article-grid-actions { opacity: 1; }
.article-grid-actions .btn-icon {
  background: rgba(255,255,255,.2);
  color: #fff;
  border: none;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.article-grid-actions .btn-danger-icon { background: rgba(220,38,38,.5); }
.article-grid-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: .5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  flex-shrink: 0;
}

/* ── Articles — Vue détail ───────────────────────────────────────────────── */
.article-detail-hero {
  height: 180px;
  border-radius: var(--tblr-border-radius) var(--tblr-border-radius) 0 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   POLISH GLOBAL — typographie, micro-animations, ombres
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Typographie & espacements ───────────────────────────────────────────── */
.page-title {
  font-weight: 800;
  letter-spacing: -.5px;
  font-size: 1.55rem;
  color: #0f172a;
  line-height: 1.25;
}
.page-header { margin-bottom: 1.75rem; }
.card-title { letter-spacing: -.25px; font-weight: 650; }
.subheader { letter-spacing: .6px; font-size: 11px; font-weight: 600; color: #94a3b8; }
.form-label { font-weight: 600; font-size: 13px; color: #334155; }
.text-muted { line-height: 1.6; }
body.theme-dark .page-title { color: #e6edf3; }
body.theme-dark .form-label { color: #c9d1d9; }

/* ── Cartes : ombres multi-couches premium, inner glow ───────────────────── */
.card {
  border-radius: 14px;
  border: 1px solid rgba(30, 58, 95, .08);
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.45) inset,
    0 1px 2px rgba(15, 23, 42, .04),
    0 4px 16px rgba(15, 23, 42, .06),
    0 12px 40px rgba(15, 23, 42, .04);
  transition: box-shadow .25s ease, transform .25s ease;
}
.card:hover {
  box-shadow:
    0 0 0 1px rgba(255,255,255,.45) inset,
    0 1px 2px rgba(15, 23, 42, .05),
    0 8px 24px rgba(15, 23, 42, .08),
    0 16px 48px rgba(15, 23, 42, .05);
}
.card .card-header { border-radius: 14px 14px 0 0; }
body.theme-dark .card {
  border-color: #30363d;
  background: #161b22;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
}
body.theme-dark .card:hover {
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .3);
}

/* ── Boutons : transitions douces ────────────────────────────────────────── */
.btn {
  border-radius: 9px;
  font-weight: 550;
  transition: background-color .18s ease, border-color .18s ease,
              color .18s ease, box-shadow .18s ease, transform .15s ease;
}
.btn:not(:disabled):hover  { transform: translateY(-1px); }
.btn:not(:disabled):active { transform: translateY(0); transition-duration: .06s; }

/* ── Apparition des pages (fade + slide subtil) ──────────────────────────── */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.page.active > .page-body > .container-xl { animation: pageFadeIn .32s ease both; }

/* ── Apparition du contenu Focus au changement d'onglet ──────────────────── */
@keyframes contentFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}
.focus-md-content.fade-in { animation: contentFadeIn .22s ease both; }

/* ── Onglets Focus : underline animée ────────────────────────────────────── */
.focus-tab { transition: color .15s ease, border-bottom-color .2s ease; }

/* ── Tables : hover doux ─────────────────────────────────────────────────── */
.table { font-size: 13.5px; }
.table thead th {
  font-size: 11.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  border-bottom-width: 1px;
  border-bottom-color: rgba(30,58,95,.08);
  padding: 10px 12px;
}
.table tbody tr { transition: background-color .15s ease; }
.table tbody tr:hover td { background: rgba(30,58,95,.025); }
.table td { padding: 10px 12px; vertical-align: middle; border-color: rgba(226,232,240,.6); }

/* ── Dropdown : apparition douce ─────────────────────────────────────────── */
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.dropdown-menu.show { animation: dropdownIn .15s ease both; }

/* ── Accessibilité : réduire les animations si demandé ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  .page.active > .page-body > .container-xl,
  .focus-md-content.fade-in,
  .dropdown-menu.show { animation: none; }
  .btn, .card, .focus-tab, .table tbody tr { transition: none; }
}

/* ── Dashboard : greeting + prochaine action ─────────────────────────────── */
.dash-greeting-sub {
  margin: 4px 0 0;
  font-size: 14px;
  color: #64748b;
}
.next-action-card {
  background: rgba(255,255,255,.5);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(22,163,74,.1);
  border-radius: 16px;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.5) inset,
    0 2px 8px rgba(15,23,42,.04),
    0 8px 32px rgba(15,23,42,.03);
  transition: box-shadow .25s ease;
}
.next-action-card:hover {
  box-shadow:
    0 0 0 1px rgba(255,255,255,.5) inset,
    0 4px 12px rgba(15,23,42,.06),
    0 12px 40px rgba(15,23,42,.05);
}
.next-action-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #16a34a, #059669);
  border-radius: 4px 0 0 4px;
}
.next-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #16a34a, #059669);
  border-radius: 10px;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}
.next-action-body { flex: 1; min-width: 0; }
.next-action-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.next-action-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
}
.next-action-prio,
.next-action-state {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid transparent;
}
.next-action-prio.prio-haute   { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.next-action-prio.prio-moyenne { background: #fff7ed; color: #ea580c; border-color: #fed7aa; }
.next-action-state.state-ready { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
.next-action-state.state-md    { background: #fffbeb; color: #d97706; border-color: #fde68a; }
.next-action-state.state-todo  { background: #f8fafc; color: #64748b; border-color: #e2e8f0; }
.next-action-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.next-action-meta {
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
}
.next-action-btn { flex-shrink: 0; }
@media (max-width: 640px) {
  .next-action-card { flex-wrap: wrap; }
  .next-action-title { white-space: normal; }
  .next-action-btn { width: 100%; justify-content: center; }
}
body.theme-dark .dash-greeting-sub { color: #8b949e; }
body.theme-dark .next-action-card { background: #161b22; border-color: #30363d; }
body.theme-dark .next-action-title { color: #e6edf3; }

/* ── Dashboard : graphe activité hebdo ───────────────────────────────────── */
.activity-total {
  font-size: 12px;
  font-weight: 600;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 2px 10px;
  border-radius: 20px;
}
.activity-chart {
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: 160px;
}
.activity-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.activity-val {
  font-size: 11px;
  font-weight: 700;
  color: #16a34a;
  height: 14px;
  line-height: 14px;
}
.activity-bar-track {
  flex: 1;
  width: 100%;
  max-width: 28px;
  background: #f1f5f9;
  border-radius: 6px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
@keyframes barGrowH { from { height: 0; } }
.activity-bar {
  width: 100%;
  background: linear-gradient(180deg, #16a34a, #059669);
  border-radius: 6px 6px 0 0;
  animation: barGrowH .5s cubic-bezier(.25,.8,.35,1) both;
}
.activity-col { border-radius: 8px; transition: background-color .12s ease; cursor: default; }
.activity-col:hover { background: #f8fafc; }
.activity-col:hover .activity-bar { filter: brightness(1.1); }
.activity-col.weekend .activity-bar-track { background: #f8fafc; }
.activity-col.weekend .activity-day { font-style: italic; opacity: .75; }
.activity-col.today .activity-bar-track { background: #e0f2e9; box-shadow: inset 0 0 0 1px #bbf7d0; }
.activity-day {
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
}
.activity-col.today .activity-day { color: #16a34a; font-weight: 700; }
@media (max-width: 640px) {
  .activity-chart { height: 120px; gap: 3px; }
  .activity-col:nth-child(odd) .activity-day { visibility: hidden; }
}
body.theme-dark .activity-total { background: rgba(22,163,74,.12); border-color: rgba(22,163,74,.35); }
body.theme-dark .activity-bar-track { background: #1c2128; }
body.theme-dark .activity-col:hover { background: #1c2128; }
body.theme-dark .activity-col.weekend .activity-bar-track { background: #161b22; }
@media (prefers-reduced-motion: reduce) {
  .activity-bar, .statut-bar-fill { animation: none; }
}
body.theme-dark .activity-col.today .activity-bar-track { background: #16261c; box-shadow: inset 0 0 0 1px rgba(22,163,74,.4); }
body.theme-dark .activity-day { color: #8b949e; }

/* ══════════════════════════════════════════════════════════════════════════
   DESIGN OVERHAUL — Glassmorphism, animations, scroll-driven effects
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Glassmorphism Cards ────────────────────────────────────────────────── */
.card {
  background: rgba(255, 255, 255, 0.65) !important;
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  border-radius: 16px;
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.04),
    0 8px 32px rgba(30, 58, 95, 0.10),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
}
body.theme-dark .card {
  background: rgba(22, 27, 34, 0.60) !important;
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

/* Glassmorphism for special cards */
.countdown-card,
.streak-card,
.progress-obj-card,
.tip-card,
.next-action-card,
.about-section,
.guide-section {
  background: rgba(255, 255, 255, 0.60) !important;
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.04),
    0 12px 40px rgba(30, 58, 95, 0.10),
    0 1px 0 rgba(255, 255, 255, 0.6) inset;
}
body.theme-dark .countdown-card,
body.theme-dark .streak-card,
body.theme-dark .progress-obj-card,
body.theme-dark .tip-card,
body.theme-dark .next-action-card,
body.theme-dark .about-section,
body.theme-dark .guide-section {
  background: rgba(22, 27, 34, 0.55) !important;
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.25),
    0 12px 40px rgba(0, 0, 0, 0.30),
    0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

/* ── Enhanced Typography — Metrics & Numbers ───────────────────────────── */
.globe-stat-value {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1px;
  color: #4ade80;
  text-shadow: 0 0 24px rgba(74, 222, 128, 0.5), 0 0 48px rgba(74, 222, 128, 0.2);
}
.countdown-number {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -3px;
  background: linear-gradient(135deg, #16a34a, #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.streak-number {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -3px;
  background: linear-gradient(135deg, #ea580c, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.progress-obj-count {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -1px;
}
.page-title {
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: -0.8px;
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.theme-dark .page-title {
  background: linear-gradient(135deg, #93c5fd, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.card-title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.3px;
}
.dash-greeting-sub {
  font-size: 15px;
  color: #64748b;
  margin-top: 4px;
}

/* ── Stagger Fade-Up Animation ──────────────────────────────────────────── */
@keyframes fadeUpIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-item {
  opacity: 0;
  animation: fadeUpIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.stagger-item:nth-child(1) { animation-delay: 0ms; }
.stagger-item:nth-child(2) { animation-delay: 80ms; }
.stagger-item:nth-child(3) { animation-delay: 160ms; }
.stagger-item:nth-child(4) { animation-delay: 240ms; }
.stagger-item:nth-child(5) { animation-delay: 320ms; }
.stagger-item:nth-child(6) { animation-delay: 400ms; }
.stagger-item:nth-child(7) { animation-delay: 480ms; }
.stagger-item:nth-child(8) { animation-delay: 560ms; }

/* ── Scroll Reveal ──────────────────────────────────────────────────────── */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.scroll-reveal.reveal-delay-1 { transition-delay: 0.1s; }
.scroll-reveal.reveal-delay-2 { transition-delay: 0.2s; }
.scroll-reveal.reveal-delay-3 { transition-delay: 0.3s; }

/* ── Counter Animation ──────────────────────────────────────────────────── */
.counter-animated {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.counter-animated.counting {
  transform: scale(1.08);
}
.globe-stat-value.counter-animated:not(.counting) {
  text-shadow: 0 0 24px rgba(74, 222, 128, 0.5);
}

/* ── Enhanced Button Styles ─────────────────────────────────────────────── */
.btn {
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-primary {
  background: linear-gradient(135deg, #1e3a5f, #2563eb) !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.25);
}
.btn-success {
  background: linear-gradient(135deg, #16a34a, #059669) !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
}
.btn:not(:disabled):hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.20);
}
.btn:not(:disabled):active {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}
.btn-primary:not(:disabled):hover {
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.40) !important;
}
.btn-success:not(:disabled):hover {
  box-shadow: 0 6px 24px rgba(22, 163, 74, 0.40);
}
.btn-outline-danger:not(:disabled):hover {
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.2);
}
body.theme-dark .btn:not(:disabled):hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
body.theme-dark .btn-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
}
body.theme-dark .btn-success {
  background: linear-gradient(135deg, #16a34a, #22c55e) !important;
}

/* ── Pipeline SVG Animation ─────────────────────────────────────────────── */
.about-steps {
  position: relative;
}

.pipeline-svg {
  position: absolute;
  top: 28px;
  left: 0;
  width: 100%;
  height: 4px;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.pipeline-path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  /* Scroll-driven: transition controlled by JS */
}

.about-step {
  position: relative;
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.4s ease;
}

.about-step-icon {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s ease;
}

.about-step.step-lit .about-step-icon {
  transform: scale(1.2);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.18),
    0 0 42px var(--step-glow, rgba(37, 99, 235, 0.5)),
    0 0 80px var(--step-glow, rgba(37, 99, 235, 0.2));
}
.about-step.step-lit .about-step-title {
  font-weight: 700;
}

.about-step-arrow {
  z-index: 1;
}

/* Step glow colors */
.about-step:nth-child(1) { --step-glow: rgba(37, 99, 235, 0.4); }
.about-step:nth-child(3) { --step-glow: rgba(22, 163, 74, 0.4); }
.about-step:nth-child(5) { --step-glow: rgba(124, 58, 237, 0.4); }
.about-step:nth-child(7) { --step-glow: rgba(245, 158, 11, 0.4); }

/* ── Enhanced Card Hover ────────────────────────────────────────────────── */
.card {
  transition: box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.04),
    0 12px 40px rgba(30, 58, 95, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.6) inset;
}
body.theme-dark .card:hover {
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.25),
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

/* KPI cards hover — lift with colored shadow tint */
.countdown-card,
.streak-card,
.progress-obj-card,
.tip-card {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.countdown-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(22, 163, 74, 0.12), 0 4px 6px rgba(15, 23, 42, 0.04);
}
.streak-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(234, 88, 12, 0.12), 0 4px 6px rgba(15, 23, 42, 0.04);
}
.progress-obj-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.12), 0 4px 6px rgba(15, 23, 42, 0.04);
}
.tip-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(30, 58, 95, 0.12), 0 4px 6px rgba(15, 23, 42, 0.04);
}

/* Focus card hover */
.next-action-card {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.next-action-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.04),
    0 12px 40px rgba(30, 58, 95, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.5) inset;
}
body.theme-dark .next-action-card:hover {
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.25),
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

/* ── Globe Scroll Zoom Indicator ────────────────────────────────────────── */
.globe-scroll-hint {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.6;
  animation: scrollHintPulse 2s ease-in-out infinite;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.globe-scroll-hint.hidden {
  opacity: 0;
}
.globe-scroll-hint-text {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.globe-scroll-hint-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid rgba(74, 222, 128, 0.4);
  border-bottom: 2px solid rgba(74, 222, 128, 0.4);
  transform: rotate(45deg);
}

@keyframes scrollHintPulse {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 0.3; }
}

/* ── Enhanced Page Transitions ──────────────────────────────────────────── */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.page.active > .page-body > .container-xl {
  animation: pageFadeIn 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Globe Card Enhanced Shadow ─────────────────────────────────────────── */
.globe-card {
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.08),
    0 16px 70px rgba(2, 8, 24, 0.65),
    0 6px 20px rgba(2, 8, 24, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: box-shadow 0.4s ease;
}
.globe-card:hover {
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.15),
    0 20px 80px rgba(2, 8, 24, 0.7),
    0 8px 24px rgba(2, 8, 24, 0.5),
    0 0 40px rgba(74, 222, 128, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ── Focus Queue Enhanced ───────────────────────────────────────────────── */
.focus-queue {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
body.theme-dark .focus-queue {
  background: rgba(22, 27, 34, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Navbar Enhanced ────────────────────────────────────────────────────── */
.navbar {
  backdrop-filter: blur(24px) saturate(1.6) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.6) !important;
  background: rgba(255, 255, 255, 0.70) !important;
  border-bottom: none !important;
  box-shadow: 0 4px 30px rgba(30, 58, 95, 0.08), 0 1px 0 rgba(255,255,255,0.5) inset !important;
}
body.theme-dark .navbar {
  background: rgba(13, 17, 23, 0.75) !important;
  backdrop-filter: blur(24px) saturate(1.3) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.3) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255,255,255,0.03) inset !important;
}

/* ── Nav Link Active Glow ───────────────────────────────────────────────── */
.navbar .navbar-nav .nav-link.active {
  box-shadow: 0 2px 12px rgba(30, 58, 95, 0.25);
}

/* ── Log Box Enhanced ───────────────────────────────────────────────────── */
.log-box {
  box-shadow:
    0 4px 24px rgba(15, 23, 42, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* ── Article Grid Card Enhanced ─────────────────────────────────────────── */
.article-grid-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.article-grid-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow:
    0 16px 40px rgba(30, 58, 95, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.5) inset;
}
body.theme-dark .article-grid-card {
  background: rgba(22, 27, 34, 0.75);
}
body.theme-dark .article-grid-card:hover {
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

/* ── Reduced Motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .stagger-item { animation: none; opacity: 1; }
  .scroll-reveal { opacity: 1; transform: none; transition: none; }
  .pipeline-path { transition: none; stroke-dashoffset: 0 !important; }
  .about-step-icon { transition: none; }
  .about-step.step-lit .about-step-icon { transform: none; }
  .globe-scroll-hint { animation: none; }
  .counter-animated { transition: none; }
  .card, .countdown-card, .streak-card, .progress-obj-card,
  .tip-card, .next-action-card, .guide-item,
  .article-grid-card { transition: none; }
  .page.active > .page-body > .container-xl { animation: none; }
  .btn { transition: none; }
}

/* ════════════════════════════════════════════════════════════════════════════
   DASHBOARD FX OVERHAUL — effets premium (aurora, tilt 3D, conic glow, néon)
   GPU-only (transform/opacity). Garde prefers-reduced-motion en fin de bloc.
   ════════════════════════════════════════════════════════════════════════ */
@property --fx-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes fxSpin       { to { --fx-angle: 360deg; } }
@keyframes fxAurora {
  0%   { transform: translate3d(0,0,0) scale(1);      }
  50%  { transform: translate3d(2.5%,-2%,0) scale(1.12); }
  100% { transform: translate3d(-2%,2.5%,0) scale(1.06); }
}
@keyframes fxGradientText { to { background-position: 250% center; } }

/* ── 1. Aurora animée en fond du dashboard ──────────────────────────────── */
/* IMPORTANT : pas d'`isolation: isolate` ni de z-index négatif ici.
   Un contexte d'isolation sur un ancêtre du <canvas> WebGL force une couche
   de compositing séparée que le canvas ne peut pas peindre → globe blanc/absent.
   L'aurore est donc un calque `absolute` z-index:0 derrière `.page-body` (z-index:1),
   sans isolation. */
#page-dashboard.page.active { position: relative; }
#page-dashboard.page.active::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 46% at 14% 18%, rgba(37,99,235,.22), transparent 70%),
    radial-gradient(34% 42% at 86% 12%, rgba(22,163,74,.20), transparent 70%),
    radial-gradient(46% 52% at 78% 88%, rgba(124,58,237,.16), transparent 70%),
    radial-gradient(40% 40% at 30% 80%, rgba(6,182,212,.14), transparent 70%);
  filter: blur(48px) saturate(1.2);
  animation: fxAurora 20s ease-in-out infinite alternate;
}
#page-dashboard.page.active > .page-body { position: relative; z-index: 1; }
body.theme-dark #page-dashboard.page.active::before { filter: blur(56px) saturate(1.35); opacity: .85; }

/* ── 2. Titre dashboard en dégradé animé ────────────────────────────────── */
#dash-greeting {
  background: linear-gradient(90deg,#1e3a5f,#2563eb,#16a34a,#2563eb,#1e3a5f);
  background-size: 250% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: fxGradientText 6s linear infinite;
}
body.theme-dark #dash-greeting {
  background: linear-gradient(90deg,#58a6ff,#79c0ff,#56d364,#79c0ff,#58a6ff);
  background-size: 250% auto; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── 3. Cartes KPI : hover spectaculaire + glow coloré + shimmer ─────────── */
#page-dashboard .countdown-card,
#page-dashboard .streak-card,
#page-dashboard .progress-obj-card,
#page-dashboard .tip-card,
#page-dashboard .next-action-card {
  transition: box-shadow .35s cubic-bezier(.2,.7,.2,1),
              border-color .35s ease, transform .35s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
/* balayage shimmer diagonal au survol */
#page-dashboard .countdown-card::after,
#page-dashboard .streak-card::after,
#page-dashboard .progress-obj-card::after,
#page-dashboard .tip-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none; z-index: 3;
  background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.5) 50%, transparent 68%);
  transform: translateX(-130%); transition: transform .8s ease;
}
#page-dashboard .countdown-card:hover::after,
#page-dashboard .streak-card:hover::after,
#page-dashboard .progress-obj-card:hover::after,
#page-dashboard .tip-card:hover::after { transform: translateX(130%); }

/* glows colorés par carte */
#page-dashboard .countdown-card:hover {
  border-color: rgba(22,163,74,.45);
  box-shadow: 0 0 0 1px rgba(255,255,255,.5) inset, 0 18px 50px rgba(22,163,74,.22), 0 8px 22px rgba(15,23,42,.10);
}
#page-dashboard .streak-card:hover {
  border-color: rgba(234,88,12,.45);
  box-shadow: 0 0 0 1px rgba(255,255,255,.5) inset, 0 18px 50px rgba(234,88,12,.24), 0 8px 22px rgba(15,23,42,.10);
}
#page-dashboard .progress-obj-card:hover {
  border-color: rgba(37,99,235,.45);
  box-shadow: 0 0 0 1px rgba(255,255,255,.5) inset, 0 18px 50px rgba(37,99,235,.22), 0 8px 22px rgba(15,23,42,.10);
}
#page-dashboard .tip-card:hover {
  border-color: rgba(37,99,235,.4);
  box-shadow: 0 0 0 1px rgba(255,255,255,.5) inset, 0 18px 50px rgba(37,99,235,.20), 0 8px 22px rgba(15,23,42,.10);
}

/* icônes KPI qui réagissent */
#page-dashboard .countdown-icon, #page-dashboard .streak-icon,
#page-dashboard .progress-obj-icon, #page-dashboard .next-action-icon {
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
}
#page-dashboard .countdown-card:hover .countdown-icon,
#page-dashboard .streak-card:hover .streak-icon,
#page-dashboard .progress-obj-card:hover .progress-obj-icon,
#page-dashboard .next-action-card:hover .next-action-icon {
  transform: rotate(-8deg) scale(1.12);
}

/* glare 3D qui suit le curseur (injecté en JS) */
.fx-glare {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  z-index: 2; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,.4), transparent 42%);
}
.fx-tilting .fx-glare { opacity: 1; }

/* ── 4. Néon pulsé sur les chiffres clés ────────────────────────────────── */
@keyframes fxNeonOrange { 0%,100%{ text-shadow: 0 0 10px rgba(234,88,12,.35);} 50%{ text-shadow: 0 0 24px rgba(234,88,12,.75);} }
@keyframes fxNeonGreen  { 0%,100%{ text-shadow: 0 0 10px rgba(22,163,74,.30);} 50%{ text-shadow: 0 0 22px rgba(22,163,74,.65);} }
@keyframes fxNeonGlobe  { 0%,100%{ text-shadow: 0 0 8px rgba(74,222,128,.4);}  50%{ text-shadow: 0 0 18px rgba(74,222,128,.85);} }
.streak-number    { animation: fxNeonOrange 2.6s ease-in-out infinite; }
.countdown-number { animation: fxNeonGreen 3s ease-in-out infinite; }
.globe-stat-value { animation: fxNeonGlobe 3.4s ease-in-out infinite; }
.streak-icon { filter: drop-shadow(0 0 6px rgba(234,88,12,.5)); }

/* ── 5. Bordure conic qui tourne sur le hero CTA (garde @supports) ──────── */
/* L'astuce mask-composite n'affiche QUE le liseré. On la protège derrière
   @supports : si le navigateur ne gère pas mask-composite, aucun overlay
   n'est créé (sinon il recouvrirait toute la carte). */
@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  #page-dashboard .next-action-card { z-index: 0; }
  #page-dashboard .next-action-card::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
    background: conic-gradient(from var(--fx-angle), #16a34a, #2563eb, #7c3aed, #16a34a);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    pointer-events: none; z-index: 4; opacity: .55;
    animation: fxSpin 6s linear infinite;
  }
  #page-dashboard .next-action-card:hover::after { opacity: 1; }
}

/* ── 6. Globe : glow néon vert qui respire (sans overlay sur le canvas) ──── */
@keyframes fxGlobeBreath {
  0%,100% { box-shadow: 0 0 0 1px rgba(74,222,128,.05), 0 12px 60px rgba(2,8,24,.6), 0 4px 16px rgba(2,8,24,.4), 0 0 30px rgba(74,222,128,.04), inset 0 1px 0 rgba(255,255,255,.04); }
  50%     { box-shadow: 0 0 0 1px rgba(74,222,128,.12), 0 12px 60px rgba(2,8,24,.6), 0 4px 16px rgba(2,8,24,.4), 0 0 52px rgba(74,222,128,.20), inset 0 1px 0 rgba(255,255,255,.06); }
}
.globe-card { animation: fxGlobeBreath 5s ease-in-out infinite; }
/* IMPORTANT : `initStaggerCards()` (app.js) ajoute `.stagger-item` à .globe-card,
   qui met `opacity:0` puis fait apparaître la carte via `animation: fadeUpIn … forwards`.
   La règle .globe-card ci-dessus écrasait CETTE animation par fxGlobeBreath (qui ne
   touche pas l'opacité) → la carte restait bloquée à opacity:0 (globe « disparu »).
   On combine donc les deux animations quand .stagger-item est présent :
   d'abord le fade-in (forwards → reste à opacity:1), puis la respiration en boucle. */
.globe-card.stagger-item {
  animation: fadeUpIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards,
             fxGlobeBreath 5s ease-in-out 0.5s infinite;
}

/* ── Garde reduced-motion pour tous les nouveaux effets ─────────────────── */
@media (prefers-reduced-motion: reduce) {
  #page-dashboard.page.active::before,
  #dash-greeting, .streak-number, .countdown-number, .globe-stat-value,
  .globe-card, #page-dashboard .next-action-card::after { animation: none !important; }
  #dash-greeting { -webkit-text-fill-color: initial; color: #1e293b; }
  body.theme-dark #dash-greeting { color: #e6edf3; }
  .fx-glare { display: none; }
  #page-dashboard .countdown-card::after, #page-dashboard .streak-card::after,
  #page-dashboard .progress-obj-card::after, #page-dashboard .tip-card::after { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   REFONTE PREMIUM — overrides (2026-07, refonte design Tremplin)
   Direction Linear + Superhuman + Vercel. Voir DESIGN.md.
   Placé en fin de fichier : ces règles priment (cascade) sans supprimer
   l'existant. Objectif : calmer le "cockpit sci-fi" (fond pastel, blobs,
   canvas réseau, glassmorphism, dégradés multicolores) → sobriété premium.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --tp-accent:        #4f46e5;
  --tp-accent-hover:  #4338ca;
  --tp-accent-soft:   rgba(79,70,229,.10);
  --tp-accent-ring:   rgba(79,70,229,.35);
  --tp-bg:            #fbfbfc;
  --tp-surface:       #ffffff;
  --tp-border:        #e3e6ea;
  --tp-shadow-sm:     0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04);
  --tp-shadow-md:     0 4px 12px rgba(16,24,40,.08);
}

/* ── Fond app calme (remplace le dégradé pastel bleu/vert) ─────────────────── */
body {
  background: var(--tp-bg) !important;
  letter-spacing: -0.011em;
}
body.theme-dark { background: #0b0d10 !important; }

/* ── Anti scroll horizontal ────────────────────────────────────────────────────
   Des blobs décoratifs (body::before/::after, fixed, `right:-100px`) débordaient
   à droite et créaient un scroll horizontal parasite. `overflow-x: clip` sur la
   racine coupe ce débordement SANS créer de conteneur de scroll (préserve le
   `position: sticky` de la navbar, contrairement à overflow:hidden). */
html { overflow-x: clip !important; }
body { overflow-x: clip !important; max-width: 100vw !important; }
/* Ceinture + bretelles : on borne aussi les blobs pour qu'ils ne dépassent pas. */
body::before, body::after, .blob-extra { max-width: 100vw !important; }

/* ── Décor : blobs quasi invisibles, canvas réseau très discret ────────────── */
body::before, body::after { opacity: .05 !important; filter: blur(120px) !important; }
.blob-extra { opacity: .05 !important; filter: blur(120px) !important; }
#network-bg-global { opacity: .05 !important; }
body.theme-dark #network-bg-global { opacity: .08 !important; }

/* ── Navbar : verre allégé, soulignement mono-accent au lieu du multicolore ── */
.navbar {
  background: rgba(255,255,255,.82) !important;
  backdrop-filter: blur(10px) saturate(1.1) !important;
  -webkit-backdrop-filter: blur(10px) saturate(1.1) !important;
  border-bottom: 1px solid var(--tp-border) !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.04) !important;
}
body.theme-dark .navbar {
  background: rgba(19,21,25,.82) !important;
  border-bottom: 1px solid #23262d !important;
}
.navbar::after {
  background: var(--tp-accent) !important;
  height: 1px !important;
  opacity: .0 !important;   /* on retire la ligne dégradée marine→vert */
}

/* ── Glassmorphism généralisé : blur allégé, saturation neutralisée ────────── */
.card, .globe-stat, .countdown-card, .streak-card, .progress-obj-card,
.tip-card, .activity-card, .matrix-card, .next-action-card {
  backdrop-filter: blur(6px) saturate(1) !important;
  -webkit-backdrop-filter: blur(6px) saturate(1) !important;
}

/* ── Cartes : surface franche + bordure neutre + ombre douce ───────────────── */
.card {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  box-shadow: var(--tp-shadow-sm);
  border-radius: 14px;
}
body.theme-dark .card {
  background: #131519;
  border-color: #23262d;
  box-shadow: none;
}

/* ── Accessibilité : focus ring visible et cohérent (accent) ───────────────── */
a:focus-visible, button:focus-visible,
.btn:focus-visible, .nav-link:focus-visible,
.form-control:focus-visible, .form-select:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px var(--tp-accent-ring) !important;
  border-radius: 8px;
}

/* ── Globe : rétrogradé de "héros sci-fi" à décor secondaire ───────────────────
   Le brief demande de réduire le globe/élément visuel dominant sans le supprimer
   (DOM + globe.js + IDs gstat-* conservés pour app.js). On agit UNIQUEMENT en CSS :
   carte plus plate et plus petite, accents verts "NASA" réharmonisés vers le
   système neutre + accent indigo unique, ombre spectaculaire calmée. ───────── */
.globe-card {
  background: #0d1017 !important;                 /* moins "trou noir", plus proche du dark surface */
  border-color: rgba(255,255,255,.08) !important;
  border-radius: 14px !important;
  box-shadow: var(--tp-shadow-sm) !important;     /* fini l'ombre 60px dramatique */
}
body.theme-dark .globe-card { box-shadow: none !important; }
.globe-card::before { opacity: 0 !important; }    /* on retire la lueur verte de bord */
.globe-card::after  { display: none !important; } /* coupe un éventuel halo décoratif */

/* Globe : NE PAS toucher à la géométrie de #globe-wrap. Le rendu WebGL (globe.js)
   est calibré sur les dimensions natives de la carte pleine largeur ; toute
   contrainte d'aspect/hauteur/largeur casse le rendu (Terre délavée / tranche).
   Le calmage se fait donc uniquement sur le "chrome" (couleurs, ombre, animation),
   pas sur la taille du canvas. */

/* Accents verts → neutres calmes + accent indigo (un seul accent, cf. DESIGN.md) */
.globe-stat-value { color: #c7cbd4 !important; }  /* chiffres lisibles, non fluo */
.globe-badge {
  background: rgba(99,102,241,.14) !important;
  border-color: rgba(99,102,241,.34) !important;
  color: #c3c7ff !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}
.globe-badge::before { background: #818cf8 !important; animation-duration: 3.2s !important; }

/* Respiration "fxGlobeBreath" (scale en boucle) coupée — MAIS on conserve la
   révélation `fadeUpIn`, sinon la carte reste bloquée à opacity:0 (invisible) et
   le globe disparaît. On re-déclare donc l'animation avec fadeUpIn SEUL. */
.globe-card.stagger-item {
  animation: fadeUpIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

/* ── Prochaine meilleure action : élément le PLUS proéminent du dashboard ─────── */
#page-dashboard .next-action-card {
  border-color: var(--tp-accent) !important;
  box-shadow: 0 0 0 1px var(--tp-accent), var(--tp-shadow-md) !important;
}
body.theme-dark #page-dashboard .next-action-card {
  box-shadow: 0 0 0 1px var(--tp-accent) !important;
}
.next-action-card .next-action-label {
  color: var(--tp-accent) !important;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── Cartes cliquables : hover cohérent (bordure accentuée + légère élévation) ── */
.card--hover:hover, .offer-card:hover, .doc-card:hover, .article-card:hover {
  border-color: var(--tp-border) !important;
  box-shadow: var(--tp-shadow-md) !important;
  transition: box-shadow .2s cubic-bezier(.2,.6,.2,1), border-color .2s;
}

/* ── Motion sobre : coupe les décors animés en reduced-motion ──────────────── */
@media (prefers-reduced-motion: reduce) {
  #network-bg-global, body::before, body::after, .blob-extra { display: none !important; }
  .globe-badge::before { animation: none !important; }
  /* Pas d'animation, mais la carte DOIT rester visible (sinon globe masqué). */
  .globe-card, .globe-card.stagger-item { animation: none !important; opacity: 1 !important; }
}

/* ── Mobile : décor coupé (priorité à l'action) ─────────────────────────────── */
@media (max-width: 640px) {
  #network-bg-global, .blob-extra, body::before, body::after { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD 2.0 (2026-07) — dashboard SaaS propre, sans globe
   Décision (cf. mission design final) : le globe gère mal le rétrécissement,
   le dashboard ne doit plus en dépendre. Le globe N'EST PAS supprimé :
   - le DOM .globe-card reste (app.js le déréférence sans garde au clic Focus) ;
   - il sert toujours de fond plein écran à la page Focus
     (classe .globe-card-fullscreen, posée par app.js pendant le morph).
   Il est simplement masqué partout ailleurs.
   ═══════════════════════════════════════════════════════════════════════════ */
.globe-card:not(.globe-card-fullscreen) { display: none !important; }

/* Bento simplifié : une seule colonne, contenu pleine largeur */
.bento-grid { grid-template-columns: 1fr !important; }

/* KPIs (rentrée / régularité / objectif) : rangée de 3 cartes */
.bento-kpis { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 12px !important; }
@media (max-width: 1100px) { .bento-kpis { grid-template-columns: 1fr !important; } }

/* ── Tuiles de stats clés (.dash-stats) ────────────────────────────────────────
   IDs gstat-* et classes globe-stat-* conservés : app.js anime ces compteurs.
   On neutralise le style "néon spatial" hérité au profit de tuiles sobres. */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 991px) { .dash-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .dash-stats { grid-template-columns: 1fr; } }

.dash-stats .globe-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: var(--tp-surface) !important;
  border: 1px solid var(--tp-border) !important;
  border-radius: 14px !important;
  padding: 16px 18px !important;
  box-shadow: var(--tp-shadow-sm) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  min-width: 0;
}
body.theme-dark .dash-stats .globe-stat {
  background: #131519 !important;
  border-color: #23262d !important;
  box-shadow: none !important;
}
.dash-stats .globe-stat-value {
  color: #171a1f !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  font-variant-numeric: tabular-nums;
  animation: none !important;          /* coupe fxNeonGlobe */
  text-shadow: none !important;
}
body.theme-dark .dash-stats .globe-stat-value { color: #e6e8ec !important; }
.dash-stats .globe-stat-label {
  color: #7b8393 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-shadow: none !important;
}
body.theme-dark .dash-stats .globe-stat-label { color: #8a909b !important; }

/* ── Icônes des étapes & du guide : un seul accent (gradients multicolores
      retirés du HTML — cf. DESIGN.md « un seul accent ») ──────────────────── */
.about-step-icon, .guide-icon {
  background: var(--tp-accent-soft) !important;
}
.about-step-icon i, .guide-icon i { color: var(--tp-accent) !important; }
body.theme-dark .about-step-icon,
body.theme-dark .guide-icon { background: rgba(99,102,241,.16) !important; }
body.theme-dark .about-step-icon i,
body.theme-dark .guide-icon i { color: #a5b4fc !important; }

/* ── Boutons primaires : accent indigo unique, plat, motion discret ─────────
   (remplace le dégradé marine→bleu et le hover scale(1.02) trop démonstratif) */
.btn-primary {
  background: var(--tp-accent) !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.10) !important;
}
.btn-primary:not(:disabled):hover {
  background: var(--tp-accent-hover) !important;
  box-shadow: 0 4px 12px rgba(79,70,229,.28) !important;
}
body.theme-dark .btn-primary { background: #6366f1 !important; }
body.theme-dark .btn-primary:not(:disabled):hover { background: #575bee !important; }
.btn:not(:disabled):hover  { transform: translateY(-1px) !important; }
.btn:not(:disabled):active { transform: translateY(0) !important; }

/* ── Démarrage — wizard d'onboarding (2026-07-08) ──────────────────────────── */

/* Stepper : les étapes sont des boutons cliquables */
#start-stepper { overflow-x: auto; padding-bottom: 2px; }
#start-stepper .start-step {
  background: none; border: 0; padding: 4px 6px; border-radius: 8px;
  cursor: pointer;
}
#start-stepper .start-step:hover .start-step-label { color: var(--tblr-body-color); }
#start-stepper .start-step:focus-visible {
  outline: 2px solid var(--tp-accent); outline-offset: 2px;
}

/* Barre de progression */
.start-progress-wrap { display: flex; align-items: center; gap: 12px; }
.start-progress-label {
  font-size: 12px; font-weight: 600; color: var(--tblr-muted);
  white-space: nowrap;
}
.start-progress {
  flex: 1; height: 6px; border-radius: 3px;
  background: var(--tblr-border-color); overflow: hidden;
}
.start-progress-bar {
  height: 100%; border-radius: 3px; background: var(--tp-accent);
  transition: width .35s ease;
}
@media (prefers-reduced-motion: reduce) {
  .start-progress-bar { transition: none; }
}

/* Panneaux */
.start-panel { outline: none; }
.start-welcome-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; }
.start-welcome-list { padding-left: 20px; margin-bottom: 12px; }
.start-welcome-list li { margin-bottom: 6px; }

/* Champs optionnels repliés (étape Profil) */
.start-optional summary {
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--tblr-muted);
}
.start-optional summary:hover { color: var(--tblr-body-color); }
.start-optional summary:focus-visible {
  outline: 2px solid var(--tp-accent); outline-offset: 2px; border-radius: 4px;
}

/* Navigation bas de wizard */
.start-nav {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-top: 16px; border-top: 1px solid var(--tblr-border-color);
}
.start-nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.start-later-link {
  font-size: 13px; color: var(--tblr-muted); text-decoration: underline;
}
.start-later-link:hover { color: var(--tblr-body-color); }
.start-later-link:focus-visible {
  outline: 2px solid var(--tp-accent); outline-offset: 2px; border-radius: 4px;
}

/* Écran final */
.start-done-icon {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tp-accent); color: #fff; font-size: 26px;
}
.start-done-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.start-done-recap {
  list-style: none; padding: 0; margin: 0 auto 16px;
  max-width: 320px; text-align: left;
}
.start-done-recap li {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; font-size: 14px; font-weight: 500;
}
.start-done-recap li i { font-size: 18px; }
.start-done-recap li.ok i { color: var(--tblr-success); }
.start-done-recap li.todo { color: var(--tblr-muted); }

/* Bannière de reprise sur le tableau de bord */
.onboard-banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 20px; border-radius: 12px;
  border: 1px solid var(--tp-accent-soft, rgba(79,70,229,.25));
  background: var(--tp-accent-soft, rgba(79,70,229,.06));
}
.onboard-banner-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--tp-accent); color: #fff; font-size: 20px;
}
.onboard-banner-body { flex: 1; min-width: 200px; }
.onboard-banner-title { font-weight: 700; font-size: 15px; }
.onboard-banner-sub { font-size: 13px; color: var(--tblr-muted); }
body.theme-dark .onboard-banner {
  border-color: rgba(99,102,241,.35);
  background: rgba(99,102,241,.10);
}

/* Mobile */
@media (max-width: 576px) {
  #start-stepper .start-step:not(.active) .start-step-label { display: none; }
  .start-step-sep { min-width: 12px; }
  .start-nav-right { margin-left: 0; width: 100%; justify-content: space-between; }
  .onboard-banner .btn { width: 100%; }
}
