/* ==========================================================================
   PulseZ — Design tokens
   ========================================================================== */
:root {
  /* Couleurs de fond */
  --bg: #0D0B18;
  --bg-glow-1: #1B1440;
  --bg-glow-2: #0F1F3A;
  --bg-elevated: #18142B;
  --bg-card: #1E1935;
  --bg-card-hover: #251F40;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);

  /* Texte */
  --text: #F4F2FC;
  --text-muted: #9C96BC;
  --text-dim: #6C6690;

  /* Marque */
  --brand: #7C5CFC;
  --brand-soft: #A78BFA;
  --brand-glow: rgba(124, 92, 252, 0.45);

  /* Catégories du Balance Ring */
  --study: #45E0C4;
  --study-glow: rgba(69, 224, 196, 0.4);
  --social: #FF6FA0;
  --social-glow: rgba(255, 111, 160, 0.4);
  --entertainment: #FFB454;
  --entertainment-glow: rgba(255, 180, 84, 0.4);
  --other: #9D8CFF;
  --other-glow: rgba(157, 140, 255, 0.4);

  --danger: #FF6B6B;
  --success: #45E0C4;

  /* Rayons */
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  /* Typo */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Cadre app */
  --frame-width: 430px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background:
    radial-gradient(circle at 18% 8%, var(--bg-glow-1) 0%, transparent 45%),
    radial-gradient(circle at 85% 20%, var(--bg-glow-2) 0%, transparent 40%),
    var(--bg);
  min-height: 100vh;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

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

/* ==========================================================================
   Cadre "app" — mobile-first, centré sur desktop
   ========================================================================== */
.app-frame {
  width: 100%;
  max-width: var(--frame-width);
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 96px;
}

@media (min-width: 540px) {
  .app-frame {
    min-height: calc(100vh - 48px);
    margin: 24px 0;
    border-radius: 40px;
    border: 1px solid var(--border-strong);
    box-shadow: 0 40px 100px -20px rgba(0,0,0,0.6), 0 0 0 8px rgba(255,255,255,0.02);
    overflow: hidden;
  }
}

/* ==========================================================================
   Header
   ========================================================================== */
.app-header {
  padding: 28px 24px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header .greeting-eyebrow {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 4px;
  font-weight: 600;
}

.app-header h1 {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--brand), #4B3AC2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 16px var(--brand-glow);
}

.avatar.sm { width: 34px; height: 34px; font-size: 12px; }

/* ==========================================================================
   Contenu
   ========================================================================== */
.app-content {
  padding: 8px 24px 24px;
  flex: 1;
}

.section-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 32px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title .see-all {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-soft);
}

/* ==========================================================================
   Cartes génériques
   ========================================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quick-action {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.quick-action:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.quick-action .qa-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-action .qa-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
}

.quick-action .qa-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   Balance Ring (élément signature)
   ========================================================================== */
.ring-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto 4px;
  width: 240px;
  height: 240px;
}

.ring-wrap svg { width: 100%; height: 100%; overflow: visible; }

.ring-glow-defs { position: absolute; width: 0; height: 0; }

.ring-segment {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.65, 0, 0.35, 1);
}

.ring-track {
  fill: none;
  stroke: rgba(255,255,255,0.05);
}

.ring-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ring-center .ring-total {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.ring-center .ring-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 6px var(--pulse-color, var(--brand-glow))); }
  50% { filter: drop-shadow(0 0 16px var(--pulse-color, var(--brand-glow))); }
}

.ring-pulse {
  animation: pulse-glow 3.2s ease-in-out infinite;
}

/* Légende du ring */
.ring-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease;
}

.legend-row:hover { border-color: var(--border-strong); }

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}

.legend-value {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.legend-bar-track {
  width: 100%;
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-pill);
  margin-top: 8px;
  overflow: hidden;
}

.legend-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 1s cubic-bezier(0.65, 0, 0.35, 1);
}

.legend-row-inner { flex: 1; display: flex; flex-direction: column; }
.legend-row-top { display: flex; align-items: center; justify-content: space-between; }

/* ==========================================================================
   Insight banner
   ========================================================================== */
.insight-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(124,92,252,0.14), rgba(69,224,196,0.08));
  border: 1px solid rgba(124,92,252,0.25);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 24px;
}

.insight-banner .insight-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.insight-banner p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.insight-banner strong { color: var(--text); font-weight: 600; }

/* ==========================================================================
   Bottom nav
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--frame-width);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 12px calc(14px + env(safe-area-inset-bottom));
  background: rgba(24, 20, 43, 0.85);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 50;
}

@media (min-width: 540px) {
  .bottom-nav { position: absolute; }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  transition: color 0.15s ease, background 0.15s ease;
  cursor: pointer;
  background: none;
  border: none;
}

.nav-items { display: contents; }

.sidebar-brand, .sidebar-user { display: none; }

.nav-item svg { width: 22px; height: 22px; }

.nav-item.active { color: var(--brand-soft); }
.nav-item:hover { color: var(--text); }
.nav-item.active:hover { color: var(--brand-soft); }

/* ==========================================================================
   Focus Mode
   ========================================================================== */
.focus-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 12px;
}

.timer-wrap {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 12px auto 8px;
}

.timer-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }

.timer-track {
  fill: none;
  stroke: rgba(255,255,255,0.05);
  stroke-width: 10;
}

.timer-progress {
  fill: none;
  stroke: url(#focusGradient);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.timer-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-display {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.timer-state {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
  text-align: center;
  padding: 0 20px;
}

.focus-controls {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  width: 100%;
}

.btn {
  border: none;
  border-radius: var(--radius-pill);
  padding: 15px 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #5B3FE0);
  color: white;
  flex: 1;
  box-shadow: 0 8px 24px -6px var(--brand-glow);
  white-space: nowrap;
}

.btn-primary:hover { box-shadow: 0 10px 28px -4px var(--brand-glow); }

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 100%;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.demo-toggle {
  margin-top: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 6px;
}

.demo-toggle.active { color: var(--brand-soft); }

.focus-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
}

.stat-card .stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.session-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.session-history-item:last-child { border-bottom: none; }

.session-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(69, 224, 196, 0.12);
  color: var(--study);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.session-history-item .sh-time { font-size: 13px; font-weight: 600; }
.session-history-item .sh-sub { font-size: 12px; color: var(--text-dim); }
.session-history-item .sh-info { flex: 1; }
.session-history-item .sh-credit {
  font-size: 12px;
  font-weight: 600;
  color: var(--study);
}

/* ==========================================================================
   Squad Challenge
   ========================================================================== */
.squad-header-card {
  background: linear-gradient(150deg, rgba(124,92,252,0.18), rgba(255,111,160,0.08));
  border: 1px solid rgba(124,92,252,0.25);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.squad-header-card .squad-week {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.squad-header-card h2 {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 6px 0 14px;
}

.squad-progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.squad-progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--study), var(--brand));
  transition: width 1s cubic-bezier(0.65, 0, 0.35, 1);
}

.squad-progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.squad-progress-labels strong { color: var(--text); }

.member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.member-row:last-child { border-bottom: none; }

.member-rank {
  width: 20px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  text-align: center;
  flex-shrink: 0;
}

.member-info { flex: 1; min-width: 0; }

.member-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.member-name {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.member-name .you-tag {
  font-size: 10px;
  background: var(--brand);
  color: white;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

.member-streak {
  font-size: 11px;
  color: var(--entertainment);
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 3px;
}

.member-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-pill);
  margin-top: 8px;
  overflow: hidden;
}

.member-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  transition: width 1s cubic-bezier(0.65, 0, 0.35, 1);
}

.nudge-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nudge-btn:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
  transform: scale(1.06);
}

.nudge-btn:disabled {
  opacity: 0.4;
  cursor: default;
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-dim);
  transform: none;
}

.nudge-inbox-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.nudge-inbox-item:last-child { border-bottom: none; }

.nudge-inbox-item .ni-text { font-size: 13px; line-height: 1.5; }
.nudge-inbox-item .ni-time { font-size: 11px; color: var(--text-dim); margin-top: 3px; }

/* ==========================================================================
   Toast
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 92px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 13px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.5);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 540px) {
  .toast { bottom: 24px; }
}

/* ==========================================================================
   Empty state
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-dim);
  font-size: 13px;
}

/* ==========================================================================
   Grilles de contenu — 1 colonne par défaut (mobile), réagencées en desktop
   via grid-template-areas plus bas dans la feuille de style.
   ========================================================================== */
.dash-grid, .focus-grid, .squad-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.ga-ring, .ga-legend, .ga-insight, .ga-quick,
.ga-timer, .ga-focusstats, .ga-history,
.ga-leaderboard, .ga-nudges {
  min-width: 0; /* évite les débordements de grille avec le texte long */
}

/* ==========================================================================
   Focus visible pour accessibilité clavier
   ========================================================================== */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brand-soft);
  outline-offset: 2px;
}

/* ==========================================================================
   Responsive — petits écrans (iPhone SE, petits Android, ~360px et moins)
   ========================================================================== */
@media (max-width: 380px) {
  .app-header { padding: 22px 18px 6px; }
  .app-content { padding: 8px 18px 24px; }

  .app-header h1 { font-size: 21px; }

  .ring-wrap { width: 208px; height: 208px; }

  .timer-wrap { width: 220px; height: 220px; }
  .timer-display { font-size: 42px; }

  .focus-controls { gap: 8px; }
  .btn-primary { font-size: 13px; padding: 14px 14px; }
  .btn-secondary { padding: 14px 16px; }

  .quick-actions { gap: 8px; }
  .quick-action { padding: 14px; }

  .focus-stats-row { gap: 8px; }
  .stat-card { padding: 14px 10px; }
  .stat-card .stat-value { font-size: 22px; }
}

@media (max-width: 340px) {
  .ring-wrap { width: 188px; height: 188px; }
  .timer-wrap { width: 200px; height: 200px; }
  .timer-display { font-size: 38px; }
  .ring-center .ring-total { font-size: 30px; }
}

/* ==========================================================================
   Responsive — grands écrans / desktop (fond ambiant derrière la carte)
   ========================================================================== */
@media (min-width: 900px) {
  body {
    background:
      radial-gradient(circle at 15% 15%, var(--bg-glow-1) 0%, transparent 38%),
      radial-gradient(circle at 88% 12%, var(--bg-glow-2) 0%, transparent 32%),
      radial-gradient(circle at 50% 100%, rgba(124,92,252,0.08) 0%, transparent 40%),
      var(--bg);
  }
}

/* Petites hauteurs (mode paysage mobile, fenêtres basses), uniquement tant
   qu'on est encore en mode "carte téléphone" (avant le vrai layout desktop). */
@media (max-height: 620px) and (min-width: 540px) and (max-width: 1023px) {
  .app-frame { margin: 0; border-radius: 0; min-height: 100vh; }
}

/* ==========================================================================
   VRAI LAYOUT DESKTOP (≥1024px) — barre latérale + tableau de bord large.
   En dessous de ce seuil, l'app garde son format "carte mobile" centrée ;
   au-dessus, elle devient une application web à part entière qui exploite
   la largeur de l'écran : navigation en sidebar fixe à gauche, contenu en
   grille multi-colonnes plutôt qu'empilé.
   ========================================================================== */
@media (min-width: 1024px) {
  body { justify-content: flex-start; }

  /* --- Sidebar (remplace la barre du bas) --- */
  .bottom-nav {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 272px;
    height: 100vh;
    max-width: none;
    transform: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    padding: 28px 16px 24px;
    background: var(--bg-elevated);
    border-top: none;
    border-right: 1px solid var(--border);
    backdrop-filter: none;
    z-index: 40;
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 30px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -0.01em;
    color: var(--text);
  }

  .brand-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--study), var(--brand));
    box-shadow: 0 0 12px var(--brand-glow);
    animation: pulse-glow 3.2s ease-in-out infinite;
  }

  .nav-items {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
  }

  .nav-item {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 13px;
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-body);
  }

  .nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }

  .nav-item:hover { background: var(--bg-card); color: var(--text); }

  .nav-item.active {
    background: rgba(124, 92, 252, 0.14);
    color: var(--brand-soft);
  }

  .sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 12px 4px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
  }

  /* --- Zone de contenu principale --- */
  .app-frame {
    margin: 0 0 0 272px;
    width: calc(100% - 272px);
    max-width: 1120px;
    min-height: 100vh;
    border-radius: 0;
    border: none;
    box-shadow: none;
    padding-bottom: 56px;
  }

  .app-header { padding: 44px 56px 12px; }
  .app-header h1 { font-size: 28px; }
  .app-content { padding: 12px 56px 40px; }

  /* --- Dashboard : anneau + légende côte à côte --- */
  .dash-grid {
    grid-template-columns: 380px 1fr;
    column-gap: 44px;
    row-gap: 28px;
    grid-template-areas:
      "ring    legend"
      "insight insight"
      "quick   quick";
    align-items: start;
  }
  .ga-ring { grid-area: ring; }
  .ga-legend { grid-area: legend; }
  .ga-insight { grid-area: insight; }
  .ga-quick { grid-area: quick; }

  .ga-ring {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 20px;
    display: flex;
    justify-content: center;
  }
  .ga-ring .ring-wrap { margin: 0; }

  .ga-legend { padding-top: 4px; }
  .ga-legend .ring-legend { margin-top: 0; }

  .ga-insight .insight-banner { margin-top: 0; }

  .ga-quick .section-title { margin-top: 0; }
  .ga-quick .quick-actions { grid-template-columns: 1fr 1fr; }
  .quick-action {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 18px;
  }
  .quick-action .qa-icon { margin: 0; flex-shrink: 0; }
  .quick-action .qa-title { font-size: 14px; }

  /* --- Focus Mode : minuteur + colonne stats/historique --- */
  .focus-grid {
    grid-template-columns: 340px 1fr;
    column-gap: 44px;
    grid-template-areas: "timer side";
    align-items: start;
  }
  .ga-timer { grid-area: timer; }
  .ga-side { grid-area: side; }

  .ga-timer {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
  }
  .focus-hero { margin-top: 0; }

  .ga-side .focus-stats-row { margin-top: 0; }
  .ga-side .ga-history { margin-top: 28px; }
  .ga-side .section-title { margin-top: 0; }

  /* --- Squad Challenge : classement + nudges côte à côte --- */
  .squad-grid {
    grid-template-columns: 1.4fr 1fr;
    column-gap: 44px;
    align-items: start;
    margin-top: 8px;
  }
  .ga-nudges .insight-banner { margin-top: 0; }

  /* --- Toast : centré sur la zone de contenu, pas sur la sidebar --- */
  .toast {
    left: calc(272px + (100% - 272px) / 2);
  }
}


