/* GoMySeo — Design System v3 — Light Theme */
/* Ambiance : Linear / Vercel / Raycast — outil pro, épuré, agences */

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

:root {
  /* ── Backgrounds ── */
  --bg-primary:   #F7F7F5;   /* fond principal — blanc cassé légèrement chaud */
  --bg-secondary: #F0F0ED;   /* sidebar, panels — légèrement plus sombre */
  --bg-card:      #FFFFFF;   /* cards — blanc pur */
  --bg-hover:     #F3F4F6;   /* hover states */
  --bg-elevated:  #FFFFFF;   /* inputs, éléments surélevés */

  /* ── Borders ── */
  --border:        #E5E7EB;
  --border-light:  #EBEBEB;
  --border-subtle: rgba(0,0,0,0.04);

  /* ── Texte ── */
  --text-primary:   #111827;   /* quasi-noir, lecture confortable */
  --text-secondary: #6B7280;   /* gris moyen, très lisible */
  --text-muted:     #9CA3AF;   /* gris clair, sous-titres */

  /* ── Accent navy — couleur principale, sobre et pro ── */
  --accent:        #1A1F5E;
  --accent-hover:  #151A52;
  --accent-glow:   rgba(26,31,94,0.08);
  --accent-subtle: rgba(26,31,94,0.06);

  /* ── Status sémantiques ── */
  --success: #16A34A;
  --warning: #D97706;
  --danger:  #DC2626;
  --info:    #2563EB;

  /* ── Gradients ── */
  --gradient-brand:  linear-gradient(135deg, #1A1F5E 0%, #2D3480 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(26,31,94,0.06) 0%, rgba(37,99,235,0.04) 100%);
  --gradient-card:   linear-gradient(160deg, rgba(0,0,0,0.01) 0%, rgba(0,0,0,0) 100%);

  /* ── Shadow ── */
  --shadow:        0 4px 24px rgba(0,0,0,0.08);
  --shadow-sm:     0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:     0 8px 32px rgba(0,0,0,0.1);
  --shadow-accent: 0 4px 16px rgba(26,31,94,0.2);

  /* ── Layout ── */
  --sidebar-width: 252px;
  --navbar-height: 62px;

  /* ── Shape ── */
  --radius:    10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  /* ── Motion ── */
  --transition:      all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; display: block; }
input, textarea, select, button { font-family: inherit; }

/* Focus clavier visible — accessibilité */
:where(a, button, [role="button"], [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Scrollbar : masquée globalement ── */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }

/* ─── LAYOUT ─── */
.app-wrapper { display: flex; min-height: 100vh; }

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width 0.22s cubic-bezier(0.4,0,0.2,1), transform 0.3s cubic-bezier(0.4,0,0.2,1);
  will-change: width;
}

.sidebar-logo {
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--navbar-height);
}

.sidebar-logo .logo-mark {
  height: 40px;
  width: auto;
  flex-shrink: 0;
  background: none;
  border-radius: 0;
  display: block;
}

.sidebar-logo .logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.4px;
}

.sidebar-logo .logo-text span { color: #f97316; }

.sidebar-nav {
  flex: 1;
  padding: 16px 10px;
  overflow-y: auto;
}

.nav-section { margin-bottom: 24px; }

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 10px;
  margin-bottom: 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
}

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

.nav-item.active {
  background: var(--bg-card);
  color: var(--accent);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.nav-item i { width: 16px; text-align: center; font-size: 13px; }

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 100px;
  min-width: 16px;
  text-align: center;
}

.nav-badge.info    { background: var(--info); }
.nav-badge.success { background: var(--success); }

/* ── Sidebar Dropdown Nav ── */
.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  width: 100%;
}

.nav-dropdown-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-dropdown-toggle.open  { color: var(--text-primary); }
.nav-dropdown-toggle .dd-icon { margin-left: auto; font-size: 10px; transition: transform 0.2s; color: var(--text-muted); }
.nav-dropdown-toggle.open .dd-icon { transform: rotate(90deg); }
.nav-dropdown-toggle.has-active { color: var(--accent); background: var(--accent-subtle); }
.nav-dropdown-toggle.has-active .dd-icon { color: var(--accent); }

.nav-submenu {
  margin-top: 2px;
  margin-left: 16px;
  border-left: 2px solid var(--border);
  padding-left: 8px;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s cubic-bezier(0.4,0,0.2,1);
}

.nav-submenu.open { max-height: 600px; }

.nav-subitem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.nav-subitem:hover { background: var(--bg-hover); color: var(--text-primary); }

.nav-subitem.active {
  background: var(--bg-card);
  color: var(--accent);
  font-weight: 600;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.nav-subitem.active::before {
  content: '';
  position: absolute;
  left: -10px; top: 50%;
  transform: translateY(-50%);
  width: 2px; height: 14px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-subitem i { width: 14px; text-align: center; font-size: 11px; }

/* ── Sidebar footer ── */
.sidebar-footer {
  padding: 10px 8px;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-user:hover { background: var(--bg-hover); }

.sidebar-user .avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  color: white;
  flex-shrink: 0;
}

.sidebar-user .user-info  { flex: 1; min-width: 0; }
.sidebar-user .user-name  { font-size: 12.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .user-plan  { font-size: 10.5px; color: var(--text-muted); }

/* ─── SIDEBAR — fond foncé ─── */
.sidebar { background: linear-gradient(180deg, #16183f 0%, #12143a 100%); border-right: 1px solid rgba(255,255,255,0.08); }
.sidebar-logo { border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-logo .logo-text { color: #FFFFFF; }
.sidebar .nav-section-label { color: rgba(255,255,255,0.4); }
.sidebar .nav-item,
.sidebar .nav-dropdown-toggle,
.sidebar .nav-subitem { color: rgba(255,255,255,0.7); }
.sidebar .nav-item i,
.sidebar .nav-dropdown-toggle i,
.sidebar .nav-subitem i { color: rgba(255,255,255,0.55); }
.sidebar .nav-item:hover,
.sidebar .nav-dropdown-toggle:hover,
.sidebar .nav-subitem:hover { background: rgba(255,255,255,0.07); color: #FFFFFF; }
.sidebar .nav-dropdown-toggle.open { color: #FFFFFF; }
.sidebar .nav-dropdown-toggle .dd-icon { color: rgba(255,255,255,0.4); }
.sidebar .nav-item.active,
.sidebar .nav-subitem.active {
  background: rgba(255,255,255,0.1);
  color: #FFFFFF;
  border-color: rgba(255,255,255,0.12);
  box-shadow: none;
}
.sidebar .nav-item.active::before,
.sidebar .nav-subitem.active::before { background: #f97316; }
.sidebar .nav-dropdown-toggle.has-active { background: rgba(249,115,22,0.14); color: #f97316; }
.sidebar .nav-dropdown-toggle.has-active .dd-icon,
.sidebar .nav-dropdown-toggle.has-active i { color: #f97316; }
.sidebar .nav-submenu { border-left: 2px solid rgba(255,255,255,0.12); }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-user:hover { background: rgba(255,255,255,0.07); }
.sidebar-user .user-name { color: #FFFFFF; }
.sidebar-user .user-plan { color: rgba(255,255,255,0.45); }

/* ─── MAIN CONTENT ─── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  max-width: calc(100vw - var(--sidebar-width));
  overflow-x: clip;
  transition: margin-left 0.22s cubic-bezier(0.4,0,0.2,1), max-width 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ─── NAVBAR ─── */
.top-navbar {
  height: var(--navbar-height);
  background: rgba(247,247,245,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  letter-spacing: -0.2px;
}

.navbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 13px;
  width: 240px;
  transition: var(--transition);
}

.navbar-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.navbar-search i { color: var(--text-muted); font-size: 12px; }
.navbar-search input { background: none; border: none; outline: none; color: var(--text-primary); font-size: 13px; width: 100%; }
.navbar-search input::placeholder { color: var(--text-muted); }

.navbar-actions { display: flex; align-items: center; gap: 6px; }

.navbar-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.navbar-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: #D1D5DB;
}

.notif-dot {
  position: absolute;
  top: 5px; right: 5px;
  width: 6px; height: 6px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid var(--bg-primary);
}

/* ─── PAGE CONTENT ─── */
.page-content {
  padding: 26px 28px;
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
}

.page-header { margin-bottom: 30px; }

.page-header h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.6px;
  line-height: 1.25;
}

.page-header p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-secondary);
}

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

.card:hover { border-color: #D6DAE1; box-shadow: var(--shadow); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title    { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.card-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ─── STAT CARDS ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: #D6DAE1;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.stat-card:hover::after { opacity: 1; }

.stat-card.orange::after { background: linear-gradient(90deg,#f97316,#fb923c); }
.stat-card.blue::after   { background: linear-gradient(90deg,var(--accent),#4F5BD5); }
.stat-card.green::after  { background: linear-gradient(90deg,#16A34A,#4ade80); }
.stat-card.purple::after { background: linear-gradient(90deg,#7c3aed,#a78bfa); }

.stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  margin-bottom: 14px;
}

.stat-icon.orange { background: rgba(249,115,22,0.1);  color: #EA580C; }
.stat-icon.blue   { background: rgba(26,31,94,0.08);   color: var(--accent); }
.stat-icon.green  { background: rgba(22,163,74,0.1);   color: var(--success); }
.stat-icon.purple { background: rgba(124,58,237,0.1);  color: #7c3aed; }
.stat-icon.red    { background: rgba(220,38,38,0.08);  color: var(--danger); }
.stat-icon.yellow { background: rgba(217,119,6,0.1);   color: var(--warning); }

.stat-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1.2px;
  line-height: 1;
  margin-bottom: 5px;
  font-variant-numeric: tabular-nums;
}

.stat-label { font-size: 12.5px; color: var(--text-secondary); }

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 100px;
  margin-top: 8px;
}

.stat-change.up   { background: rgba(22,163,74,0.1);  color: var(--success); }
.stat-change.down { background: rgba(220,38,38,0.08); color: var(--danger); }

/* ─── GRID LAYOUTS ─── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 17px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(180deg, #232968 0%, var(--accent) 100%);
  color: white;
  border-color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 1px 3px rgba(26,31,94,0.2);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(26,31,94,0.28), 0 1px 3px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); box-shadow: none; }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: #B8BEC8;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 1px 0 rgba(0,0,0,0.03);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: #B8BEC8;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.09), 0 1px 2px rgba(0,0,0,0.06);
}

.btn-secondary:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

/* btn-outline : fond blanc, contour accent */
.btn-outline {
  background: var(--bg-card);
  color: var(--accent);
  border-color: var(--accent);
  border-width: 1.5px;
}

.btn-outline:hover {
  background: var(--accent-subtle);
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}

.btn-outline:active { transform: translateY(0); box-shadow: none; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Hauteur fixe garantit que btn-sm et btn-icon sont identiques */
.btn-sm { padding: 0 13px; font-size: 12.5px; height: 34px; }
.btn-lg { padding: 11px 22px; font-size: 14px; }
/* Bouton icône seul — même hauteur que btn-sm */
.btn-icon { width: 34px; height: 34px; padding: 0; justify-content: center; flex-shrink: 0; }

/* ─── POINTER-EVENTS FIX — prevent icon/text children from intercepting button clicks ─── */
button > *, a > *, [role="button"] > * { pointer-events: none; }

/* ─── FLASH MESSAGES ─── */
.flash-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
}
.flash-success { background: rgba(22,163,74,0.08);  border: 1px solid rgba(22,163,74,0.25);  color: #15803D; }
.flash-error   { background: rgba(220,38,38,0.06);  border: 1px solid rgba(220,38,38,0.2);   color: #B91C1C; }
.flash-warning { background: rgba(217,119,6,0.08);  border: 1px solid rgba(217,119,6,0.2);   color: #92400E; }
.flash-info    { background: rgba(37,99,235,0.06);  border: 1px solid rgba(37,99,235,0.2);   color: #1D4ED8; }

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

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 13.5px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

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

.form-input::placeholder { color: var(--text-muted); }
select.form-input { cursor: pointer; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* ─── TABLES ─── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

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

thead th {
  background: var(--bg-primary);
  padding: 12px 18px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #FAFAF9; }

tbody td {
  padding: 13px 18px;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-card);
  font-variant-numeric: tabular-nums;
}

/* ─── BADGES ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.badge-success { background: rgba(22,163,74,0.1);  color: #15803D; }
.badge-warning { background: rgba(217,119,6,0.1);  color: #92400E; }
.badge-danger  { background: rgba(220,38,38,0.08); color: #B91C1C; }
.badge-info    { background: rgba(37,99,235,0.08); color: var(--info); }
.badge-orange  { background: rgba(249,115,22,0.1); color: #EA580C; }
.badge-purple  { background: rgba(124,58,237,0.1); color: #7c3aed; }
.badge-neutral { background: #F3F4F6;              color: var(--text-secondary); border: 1px solid var(--border); }

/* ─── PROGRESS ─── */
.progress-bar {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), #4F5BD5);
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

.progress-fill.success { background: linear-gradient(90deg, #16A34A, #4ade80); }
.progress-fill.warning { background: linear-gradient(90deg, #D97706, #FBBF24); }
.progress-fill.danger  { background: linear-gradient(90deg, #DC2626, #F87171); }
.progress-fill.info    { background: linear-gradient(90deg, var(--info), #60A5FA); }

/* ─── SCORE CIRCLE ─── */
.score-circle {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  position: relative;
  font-variant-numeric: tabular-nums;
}

.score-circle.good    { background: rgba(22,163,74,0.08);  color: var(--success); border: 3px solid rgba(22,163,74,0.25); }
.score-circle.average { background: rgba(217,119,6,0.08);  color: var(--warning); border: 3px solid rgba(217,119,6,0.25); }
.score-circle.bad     { background: rgba(220,38,38,0.06);  color: var(--danger);  border: 3px solid rgba(220,38,38,0.2); }

/* ─── ALERTS ─── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
}

.alert-success { background: rgba(22,163,74,0.06);  border: 1px solid rgba(22,163,74,0.2);  color: #15803D; }
.alert-error   { background: rgba(220,38,38,0.05);  border: 1px solid rgba(220,38,38,0.18); color: #B91C1C; }
.alert-warning { background: rgba(217,119,6,0.06);  border: 1px solid rgba(217,119,6,0.2);  color: #92400E; }
.alert-info    { background: rgba(37,99,235,0.05);  border: 1px solid rgba(37,99,235,0.18); color: #1D4ED8; }

/* ─── TABS ─── */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  width: fit-content;
  margin-bottom: 24px;
}

.tab {
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.tab:hover:not(.active) { color: var(--text-primary); }

/* ─── SKELETON ─── */
.skeleton {
  background: linear-gradient(90deg, #F1F2F4 25%, #E8EAED 50%, #F1F2F4 75%);
  background-size: 200% 100%;
  animation: skeleton 1.6s infinite;
  border-radius: 8px;
}

@keyframes skeleton {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── DROPDOWN ─── */
.dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  min-width: 190px;
  box-shadow: var(--shadow-md);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 0.15s, transform 0.15s;
}

.dropdown-menu.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.dropdown-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.dropdown-item.danger:hover { background: rgba(220,38,38,0.06); color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ─── NOTIFICATION PANEL ─── */
.notif-panel {
  position: fixed;
  top: var(--navbar-height); right: 0;
  width: 360px;
  height: calc(100vh - var(--navbar-height));
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(0,0,0,0.07);
  z-index: 150;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.notif-panel.open { transform: translateX(0); }

.notif-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.notif-item:hover { background: var(--bg-hover); border-color: var(--border); }
.notif-item:hover .notif-delete-btn { opacity: 1 !important; }
.notif-item.unread { border-color: rgba(234,88,12,0.3); }
.notif-item.unread .notif-title::after {
  content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 7px;
  border-radius: 50%; background: var(--accent); vertical-align: middle;
}
.notif-delete-btn { opacity: 0; transition: opacity 0.15s; }

.notif-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.notif-body { flex: 1; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.notif-msg   { font-size: 12px; color: var(--text-secondary); margin-top: 3px; line-height: 1.5; }
.notif-time  { font-size: 11px; color: var(--text-muted); margin-top: 5px; }

/* ─── État vide — illustration + CTA ─── */
.notif-empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  text-align: center; padding: 32px 28px 32px; gap: 4px;
}
.notif-empty-illustration { width: 220px; height: auto; margin-bottom: 8px; }
.notif-empty-title { font-size: 15px; font-weight: 700; color: var(--text-primary); font-family: 'Inter', 'DM Sans', sans-serif; }
.notif-empty-sub { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin-top: 4px; max-width: 240px; }
.notif-empty-cta {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 20px; padding: 10px 20px;
  background: var(--accent); color: #fff;
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 13.5px; font-weight: 500;
  border-radius: 10px; text-decoration: none;
  transition: var(--transition);
}
.notif-empty-cta:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,0.45);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-md);
  transform: scale(0.97) translateY(8px);
  transition: transform 0.2s cubic-bezier(0.4,0,0.2,1);
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title { font-size: 17px; font-weight: 700; }
.modal-close { cursor: pointer; color: var(--text-muted); padding: 4px; border-radius: 4px; transition: var(--transition); }
.modal-close:hover { color: var(--text-primary); background: var(--bg-hover); }

/* ─── TOOLTIPS ─── */
[data-tooltip] { position: relative; }

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: white;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 9px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 9000;
  box-shadow: var(--shadow-sm);
}

[data-tooltip]:hover::after { opacity: 1; }

/* ─── CHART ─── */
.chart-container { position: relative; width: 100%; }

/* ─── EMPTY STATES ─── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  text-align: center;
}

.empty-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.empty-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.empty-text  { font-size: 13.5px; color: var(--text-secondary); margin-bottom: 20px; }

/* ─── SPINNER ─── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ─── GLASS ─── */
.glass {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.9);
}

/* ─── DIVIDER ─── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ─── LANDING ─── */
.landing-body { background: var(--bg-primary); overflow-x: hidden; }

.landing-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(247,247,245,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 48px;
  gap: 40px;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  flex: 1;
}

.landing-nav-link {
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.landing-nav-link:hover { color: var(--text-primary); }

.landing-nav-actions { display: flex; align-items: center; gap: 12px; }

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 20%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(26,31,94,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-subtle);
  border: 1px solid rgba(26,31,94,0.15);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  color: var(--text-primary);
  max-width: 880px;
  margin-bottom: 20px;
}

.hero-title .highlight {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 64px;
  padding: 18px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.hero-stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
}

.hero-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.hero-divider    { width: 1px; height: 36px; background: var(--border); }

.section {
  padding: 96px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 14px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
  margin-top: 52px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: var(--transition-slow);
  box-shadow: var(--shadow-sm);
}

.feature-card:hover {
  border-color: #D1D5DB;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  margin-bottom: 14px;
  background: var(--accent-subtle);
  color: var(--accent);
}

.feature-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.feature-desc  { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin-top: 52px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-md);
}

.pricing-popular {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-brand);
  color: white;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 100px;
  white-space: nowrap;
}

.pricing-plan  { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.pricing-price { font-size: 38px; font-weight: 800; color: var(--text-primary); letter-spacing: -2px; line-height: 1; }
.pricing-price span { font-size: 15px; color: var(--text-muted); font-weight: 400; }
.pricing-desc  { font-size: 13px; color: var(--text-muted); margin: 8px 0 22px; }

.pricing-features { list-style: none; margin-bottom: 26px; }
.pricing-features li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.pricing-features li:last-child { border-bottom: none; }
.pricing-features li i { color: var(--success); font-size: 11px; width: 14px; }

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
  margin-top: 52px;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.testimonial-stars  { color: #F59E0B; font-size: 12px; margin-bottom: 14px; }
.testimonial-text   { font-size: 13.5px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px; }
.testimonial-author { display: flex; align-items: center; gap: 10px; }
.testimonial-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gradient-brand); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: white; }
.testimonial-name   { font-size: 13px; font-weight: 600; }
.testimonial-role   { font-size: 11px; color: var(--text-muted); }

/* FAQ */
.faq-list { max-width: 700px; margin: 44px auto 0; }

.faq-item { border-bottom: 1px solid var(--border); }

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition);
  gap: 16px;
}

.faq-question:hover { color: var(--accent); }

.faq-answer {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-bottom: 18px;
  display: none;
}

.faq-answer.open { display: block; }
.faq-icon { transition: transform 0.2s; color: var(--text-muted); flex-shrink: 0; }
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--accent); }

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 60px 48px 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo       { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-logo-mark  { width: 30px; height: 30px; background: var(--gradient-brand); border-radius: 7px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: white; }
.footer-logo-text  { font-size: 17px; font-weight: 700; }
.footer-logo-text span { color: #f97316; }
.footer-tagline    { font-size: 13px; color: var(--text-secondary); line-height: 1.6; max-width: 280px; }

.footer-col-title  { font-size: 12.5px; font-weight: 700; color: var(--text-primary); margin-bottom: 14px; }
.footer-link       { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; transition: var(--transition); }
.footer-link:hover { color: var(--text-primary); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  margin-top: 44px;
  border-top: 1px solid var(--border);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ─── AUTH ─── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  padding: 24px;
  position: relative;
}

.auth-wrapper::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(26,31,94,0.03) 0%, transparent 70%);
  pointer-events: none;
}

.auth-box {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-md);
}

.auth-logo     { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; justify-content: center; }
.auth-title    { font-size: 21px; font-weight: 700; text-align: center; margin-bottom: 6px; }
.auth-subtitle { font-size: 13.5px; color: var(--text-muted); text-align: center; margin-bottom: 26px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-footer-text { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 20px; }
.auth-footer-text a { color: var(--accent); font-weight: 600; }

/* ─── SEO PAGE ─── */
.seo-score-panel {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}

.seo-issue-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}

.seo-issue-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

/* ─── HUB ADMIN CARDS ─── */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-primary);
  display: block;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.hub-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.hub-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #D1D5DB;
}

.hub-card:hover::before { transform: scaleX(1); }

.hub-card.blue::before   { background: linear-gradient(90deg, var(--accent), #4F5BD5); }
.hub-card.blue:hover     { border-color: rgba(26,31,94,0.2); }
.hub-card.red::before    { background: linear-gradient(90deg, #DC2626, #F87171); }
.hub-card.red:hover      { border-color: rgba(220,38,38,0.2); }
.hub-card.green::before  { background: linear-gradient(90deg, #16A34A, #4ade80); }
.hub-card.green:hover    { border-color: rgba(22,163,74,0.2); }
.hub-card.purple::before { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.hub-card.purple:hover   { border-color: rgba(124,58,237,0.2); }
.hub-card.yellow::before { background: linear-gradient(90deg, #D97706, #FBBF24); }
.hub-card.yellow:hover   { border-color: rgba(217,119,6,0.2); }
.hub-card.pink::before   { background: linear-gradient(90deg, #EC4899, #F9A8D4); }
.hub-card.pink:hover     { border-color: rgba(236,72,153,0.2); }

.hub-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.hub-title { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.hub-desc  { font-size: 12px; color: var(--text-secondary); }

.hub-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ─── USAGE BARS (admin-members) ── */
.feat-usage   { display:flex; flex-direction:column; gap:3px; min-width:160px; }
.feat-row     { display:flex; align-items:center; gap:6px; }
.feat-lbl     { font-size:9.5px; font-weight:600; color:var(--text-muted); width:36px; flex-shrink:0; text-transform:uppercase; letter-spacing:0.04em; }
.feat-bar-wrap{ width:44px; height:4px; background:var(--border); border-radius:2px; flex-shrink:0; overflow:hidden; }
.feat-bar     { height:100%; border-radius:2px; transition:width 0.3s; }
.feat-val     { font-size:10px; font-weight:600; color:var(--text-secondary); min-width:28px; text-align:right; }

/* ─── UTILITIES ─── */
.text-accent    { color: var(--accent); }
.text-success   { color: var(--success); }
.text-danger    { color: var(--danger); }
.text-warning   { color: var(--warning); }
.text-muted     { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.fw-700 { font-weight: 700; }
.fw-600 { font-weight: 600; }
.font-mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; }

.d-flex { display: flex; }
.align-center    { align-items: center; }
.justify-between { justify-content: space-between; }

.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }

.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* ─── COLLAPSIBLE SIDEBAR ─── */

/* Collapsed: sidebar rétrécie à 64px */
body.sidebar-collapsed .sidebar {
  width: 64px;
}
body.sidebar-collapsed .main-content {
  margin-left: 64px;
  max-width: calc(100vw - 64px);
}

/* Peek: survol sur sidebar rétrécie → elle s'élargit en overlay */
body.sidebar-collapsed.sidebar-peeking .sidebar {
  width: var(--sidebar-width);
  box-shadow: 8px 0 40px rgba(0,0,0,0.22);
  z-index: 200;
  overflow-x: visible;
}
/* Le contenu principal ne bouge PAS pendant le peek */

/* ── Masquer textes en mode rétréci (pas pendant le peek) ── */
body.sidebar-collapsed:not(.sidebar-peeking) .nav-label         { display: none; }
body.sidebar-collapsed:not(.sidebar-peeking) .nav-section-label { display: none; }
body.sidebar-collapsed:not(.sidebar-peeking) .dd-icon           { display: none; }
body.sidebar-collapsed:not(.sidebar-peeking) .nav-submenu       { display: none !important; }

/* Padding de la nav réduit + sections sans marge */
body.sidebar-collapsed:not(.sidebar-peeking) .sidebar-nav  { padding: 10px 6px; }
body.sidebar-collapsed:not(.sidebar-peeking) .nav-section  { margin-bottom: 0; }

/* Séparateur subtil entre sections en mode rétréci */
body.sidebar-collapsed:not(.sidebar-peeking) .nav-section + .nav-section {
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 6px;
  padding-top: 6px;
}

/* Nav items : centrés, plus hauts, pas de barre active */
/* !important indispensable pour écraser les style="" inline (ex: support justify-content:space-between) */
body.sidebar-collapsed:not(.sidebar-peeking) .nav-item,
body.sidebar-collapsed:not(.sidebar-peeking) .nav-dropdown-toggle {
  justify-content: center !important;
  padding: 13px 0 !important;
  gap: 0 !important;
  width: 100%;
  border-radius: 10px;
}
body.sidebar-collapsed:not(.sidebar-peeking) .nav-item.active::before { display: none; }
/* Centrer aussi le span wrapper interne (ex: lien support) */
body.sidebar-collapsed:not(.sidebar-peeking) .nav-item > span { margin: 0; }

/* Icônes plus grandes — !important pour surcharger les style="" inline */
body.sidebar-collapsed:not(.sidebar-peeking) .sidebar .nav-item i,
body.sidebar-collapsed:not(.sidebar-peeking) .sidebar .nav-dropdown-toggle i:not(.dd-icon) {
  font-size: 18px !important;
  width: 20px !important;
  text-align: center !important;
}

/* Logo centré + réduit en mode rétréci */
body.sidebar-collapsed:not(.sidebar-peeking) .sidebar-logo {
  justify-content: center;
  padding: 10px 0;
  gap: 0;
}
body.sidebar-collapsed:not(.sidebar-peeking) .sidebar-logo .logo-mark { height: 30px; }
body.sidebar-collapsed:not(.sidebar-peeking) .logo-text { display: none; }

/* Footer centré */
body.sidebar-collapsed:not(.sidebar-peeking) .sidebar-user { justify-content: center; padding: 10px 0; gap: 0; }
body.sidebar-collapsed:not(.sidebar-peeking) .user-info    { display: none; }
body.sidebar-collapsed:not(.sidebar-peeking) .sidebar-user i.fa-ellipsis-vertical { display: none; }

/* ── Bouton toggle (cercle flottant sur le bord droit de la sidebar) ── */
.sidebar-collapse-btn {
  position: fixed;
  left: calc(var(--sidebar-width) - 13px);
  top: 18px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0f1133;
  border: 2px solid rgba(249,115,22,0.7);
  color: #f97316;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  z-index: 202;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  transition: left 0.22s cubic-bezier(0.4,0,0.2,1), background 0.15s, border-color 0.15s, box-shadow 0.15s;
  padding: 0;
  line-height: 1;
  will-change: left;
}
.sidebar-collapse-btn:hover {
  background: #1a1f5e;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.2), 0 2px 12px rgba(0,0,0,0.4);
  color: #f97316;
}
.sidebar-collapse-btn i {
  transition: transform 0.22s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
}
/* En mode rétréci → bouton se déplace à gauche */
body.sidebar-collapsed .sidebar-collapse-btn {
  left: calc(64px - 13px);
}
/* Icône tourne de 180° pour pointer vers la droite */
body.sidebar-collapsed .sidebar-collapse-btn i {
  transform: rotate(180deg);
}
/* En peek → bouton revient à droite comme expanded */
body.sidebar-collapsed.sidebar-peeking .sidebar-collapse-btn {
  left: calc(var(--sidebar-width) - 13px);
}

/* ── Neutraliser le tooltip global dans la sidebar (mode étendu) ── */
/* Le tooltip global positionne ::after EN HAUT de l'élément — on le désactive dans la sidebar */
.sidebar .nav-item[data-tooltip]:hover::after,
.sidebar .nav-dropdown-toggle[data-tooltip]:hover::after {
  opacity: 0 !important;
  pointer-events: none;
}

/* ── Tooltip latéral personnalisé : visible seulement en mode rétréci (non-peek) ── */
body.sidebar-collapsed:not(.sidebar-peeking) .sidebar .nav-item,
body.sidebar-collapsed:not(.sidebar-peeking) .sidebar .nav-dropdown-toggle {
  position: relative;
}
body.sidebar-collapsed:not(.sidebar-peeking) .sidebar .nav-item[data-tooltip]:hover::after,
body.sidebar-collapsed:not(.sidebar-peeking) .sidebar .nav-dropdown-toggle[data-tooltip]:hover::after {
  opacity: 1 !important;
  bottom: auto !important;
  left: calc(100% + 12px) !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: #1e2040 !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 5px 10px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  z-index: 300 !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3) !important;
}

@media (max-width: 900px) {
  .sidebar-collapse-btn { display: none !important; }
  body.sidebar-collapsed .sidebar  { width: var(--sidebar-width); }
  body.sidebar-collapsed .main-content { margin-left: 0; max-width: 100vw; }
}

/* ─── MOBILE SIDEBAR ─── */
.sidebar-toggle {
  display: none;
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,0.35);
  z-index: 90;
}

/* ─────────────────────────────────────────────────────
   RESPONSIVE — GoMySeo Design System
   Breakpoints : 1200 / 1024 / 900 / 768 / 480
   ───────────────────────────────────────────────────── */

/* ── 1200px ── */
@media (max-width: 1200px) {
  .page-content { padding: 24px 24px; }
  .landing-nav  { padding: 0 32px; }
  .footer       { padding: 52px 32px 28px; }
  .section      { padding: 80px 24px; }
}

/* ── 1024px : tablette paysage ── */
@media (max-width: 1024px) {
  .grid-3        { grid-template-columns: 1fr 1fr; }
  .grid-4        { grid-template-columns: 1fr 1fr; }
  .stats-grid    { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .footer-grid   { grid-template-columns: 1fr 1fr; gap: 32px; }
  .hero-stats    { gap: 24px; padding: 14px 24px; }
  .page-content  { padding: 20px 20px; }
  .landing-nav   { padding: 0 28px; gap: 24px; }
  .section       { padding: 72px 24px; }
}

/* ── 900px : sidebar hors-écran, tablette portrait ── */
@media (max-width: 900px) {
  /* Sidebar */
  .sidebar                  { transform: translateX(-100%); }
  .sidebar.open             { transform: translateX(0); }
  .sidebar-overlay.active   { display: block; }
  .sidebar-toggle           { display: flex; }
  .main-content             { margin-left: 0; max-width: 100vw; }

  /* Layout */
  .page-content { padding: 16px 16px; }
  .top-navbar   { padding: 0 16px; }

  /* Navbar : masquer la recherche */
  .navbar-search { display: none; }

  /* Landing */
  .landing-nav       { padding: 0 20px; gap: 12px; }
  .landing-nav-links { display: none; }
  .hero              { padding: 96px 20px 56px; }
  .hero-stats        { gap: 18px; padding: 14px 20px; flex-wrap: wrap; }
  .hero-divider      { display: none; }
  .section           { padding: 64px 20px; }
}

/* ── 768px : mobile ── */
@media (max-width: 768px) {
  /* Sidebar */
  .sidebar                  { transform: translateX(-100%); }
  .sidebar.open             { transform: translateX(0); }
  .sidebar-overlay.active   { display: block; }
  .sidebar-toggle           { display: flex; }
  .main-content             { margin-left: 0; }

  /* Layout */
  .page-content  { padding: 14px 14px; }
  .top-navbar    { padding: 0 14px; }
  .navbar-search { display: none; }
  .navbar-title  { font-size: 13px; }

  /* Typographie — scaling doux, pas de !important brute */
  .page-header h1 { font-size: clamp(16px, 4.5vw, 22px); }
  .stat-value     { font-size: 24px; letter-spacing: -1px; }

  /* Grilles */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-grid                { grid-template-columns: 1fr 1fr; }

  /* Cards */
  .card      { padding: 14px 16px; }
  .stat-card { padding: 14px 16px; }

  /* Tabs — scrollables horizontalement */
  .tabs {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; }

  /* Tables — défilement horizontal */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-wrapper table { min-width: 520px; }

  /* Modals — slide up depuis le bas sur mobile */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    max-width: 100%;
    width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 24px 20px 32px;
    margin: 0;
  }

  /* Notification panel */
  .notif-panel { width: 100%; }

  /* Dropdowns — éviter débordement */
  .dropdown-menu { right: 0; left: auto; min-width: 200px; }

  /* Auth */
  .auth-box { padding: 24px 20px; }

  /* Landing */
  .hero              { padding: 80px 18px 48px; }
  .hero-subtitle     { font-size: 15px; }
  .hero-stats        { flex-wrap: wrap; gap: 12px; }
  .hero-divider      { display: none; }
  .hero-title        { letter-spacing: -1px; }
  .landing-nav       { padding: 0 16px; gap: 10px; }
  .landing-nav-links { display: none; }
  .footer-grid       { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom     { flex-direction: column; gap: 10px; text-align: center; }
  .footer            { padding: 44px 20px 24px; }
  .pricing-grid      { grid-template-columns: 1fr; max-width: 380px; margin-left: auto; margin-right: auto; }
  .section           { padding: 56px 18px; }
  .section-title     { letter-spacing: -1px; }
}

/* ── 480px : très petit mobile ── */
@media (max-width: 480px) {
  /* Layout */
  .page-content { padding: 12px 12px; }

  /* Grilles */
  .stats-grid { grid-template-columns: 1fr; }

  /* Hero actions empilées */
  .hero-actions      { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Boutons */
  .btn-sm { padding: 6px 10px; font-size: 12px; }

  /* Cards encore plus compactes */
  .stat-value { font-size: 22px; }
  .card       { padding: 12px 14px; }

  /* Auth */
  .auth-box { padding: 20px 16px; }

  /* Section */
  .section { padding: 48px 16px; }
  .footer  { padding: 36px 16px 24px; }

  /* Table encore plus compacte */
  tbody td, thead th { padding: 10px 12px; font-size: 12px; }
}

/* ═══════════════════════════════════════════════════════════════
   BLOCS VERROUILLÉS — lock-strip (crédits requis)
═══════════════════════════════════════════════════════════════ */
.trial-gate-block {
  border-radius: var(--radius);
  border: 1.5px solid rgba(249,115,22,0.16);
  background: var(--bg-card);
  margin: 4px 0;
  overflow: hidden;
}
.trial-gate-blur {
  filter: blur(4px);
  opacity: 0.38;
  pointer-events: none;
  user-select: none;
  padding: 16px;
}
/* Bandeau horizontal verrouillé */
.lock-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(249,115,22,0.07), rgba(234,88,12,0.11));
  border-radius: 10px;
  border: 1px solid rgba(249,115,22,0.2);
  margin: 6px 0 2px;
}
.trial-gate-block .lock-strip {
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-top: 1px solid rgba(249,115,22,0.16);
  margin: 0;
}
.lock-strip-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ea580c);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
}
.lock-strip-body { flex: 1; min-width: 0; }
.lock-strip-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 2px;
  line-height: 1.3;
}
.lock-strip-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}
.lock-strip-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff !important;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(249,115,22,0.25);
  transition: opacity 0.15s, transform 0.1s;
  border: none;
  cursor: pointer;
}
.lock-strip-btn:hover { opacity: 0.9; transform: translateY(-1px); }
body.app-dark .lock-strip {
  background: linear-gradient(135deg, rgba(249,115,22,0.09), rgba(234,88,12,0.14));
}

/* ═══════════════════════════════════════════════════════════════════════════
   GOMYSEO APP — DESIGN v5 « Flat Pro »
   Scopé sur body.app-body : uniquement les pages connectées (dashboard, outils,
   profil, support…). La landing (index/blog/contact) garde le design d'origine.

   Direction : outil professionnel type SE Ranking / Semrush —
   surfaces plates, bordures fines, sidebar claire, orange = couleur de marque,
   typographie Inter, rayons courts, aucun effet gadget.
   Seules les propriétés esthétiques sont surchargées ; les propriétés gérées
   par les media queries (paddings, tailles, layout) ne sont PAS redéfinies ici.
   ═══════════════════════════════════════════════════════════════════════════ */

body.app-body {
  /* ── Tokens redéfinis pour l'app ── */
  --bg-primary:   #F6F7F8;
  --bg-secondary: #F1F2F4;
  --bg-card:      #FFFFFF;
  --bg-hover:     #F3F4F6;
  --bg-elevated:  #FFFFFF;

  --border:        #E4E6EA;
  --border-light:  #EEEFF2;
  --border-subtle: rgba(20,23,29,0.05);

  --text-primary:   #1C2128;
  --text-secondary: #566070;
  --text-muted:     #8A93A0;

  /* Orange du logo = couleur de marque de l'app */
  --accent:        #EA580C;
  --accent-hover:  #CE4E0A;
  --accent-glow:   rgba(234,88,12,0.14);
  --accent-subtle: rgba(234,88,12,0.07);

  --success: #15803D;
  --warning: #B45309;
  --danger:  #B91C1C;
  --info:    #1D4ED8;

  --gradient-brand:  linear-gradient(135deg, #262B34 0%, #14171D 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(234,88,12,0.05) 0%, rgba(234,88,12,0.02) 100%);

  --shadow-sm: 0 1px 2px rgba(23,26,31,0.05);
  --shadow:    0 1px 2px rgba(23,26,31,0.04), 0 3px 10px rgba(23,26,31,0.05);
  --shadow-md: 0 2px 8px rgba(23,26,31,0.06), 0 10px 32px rgba(23,26,31,0.12);
  --shadow-accent: 0 2px 10px rgba(234,88,12,0.22);

  --radius:    8px;
  --radius-sm: 6px;
  --radius-lg: 10px;
  --radius-xl: 12px;

  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: -0.008em;
}

/* ── Typographie ── */
body.app-body .page-header h1 { font-weight: 800; letter-spacing: -0.7px; }
body.app-body .page-header p  { color: var(--text-secondary); }
body.app-body .navbar-title   { font-weight: 700; letter-spacing: -0.2px; }

/* ─── SIDEBAR — claire, hairline, accent orange ─── */
body.app-body .sidebar {
  background: #FFFFFF;
  border-right: 1px solid var(--border);
}
body.app-body .sidebar-logo { border-bottom: 1px solid var(--border-light); }
body.app-body .sidebar-logo .logo-text { color: var(--text-primary); }
body.app-body .sidebar .nav-section-label { color: #9AA3AF; }

body.app-body .sidebar .nav-item,
body.app-body .sidebar .nav-dropdown-toggle,
body.app-body .sidebar .nav-subitem { color: #4A5361; }
body.app-body .sidebar .nav-item i,
body.app-body .sidebar .nav-dropdown-toggle i,
body.app-body .sidebar .nav-subitem i { color: #7A8493; }

body.app-body .sidebar .nav-item:hover,
body.app-body .sidebar .nav-dropdown-toggle:hover,
body.app-body .sidebar .nav-subitem:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
body.app-body .sidebar .nav-item:hover i,
body.app-body .sidebar .nav-dropdown-toggle:hover i,
body.app-body .sidebar .nav-subitem:hover i { color: var(--text-secondary); }

body.app-body .sidebar .nav-dropdown-toggle.open { color: var(--text-primary); }
body.app-body .sidebar .nav-dropdown-toggle .dd-icon { color: #B0B7C0; }

body.app-body .sidebar .nav-item.active,
body.app-body .sidebar .nav-subitem.active {
  background: rgba(234,88,12,0.07);
  color: #C2410C;
  border-color: transparent;
  box-shadow: none;
  font-weight: 600;
}
body.app-body .sidebar .nav-item.active i,
body.app-body .sidebar .nav-subitem.active i { color: #EA580C; }
body.app-body .sidebar .nav-item.active::before,
body.app-body .sidebar .nav-subitem.active::before { background: #EA580C; }

body.app-body .sidebar .nav-dropdown-toggle.has-active {
  background: rgba(234,88,12,0.07);
  color: #C2410C;
}
body.app-body .sidebar .nav-dropdown-toggle.has-active i,
body.app-body .sidebar .nav-dropdown-toggle.has-active .dd-icon { color: #EA580C; }

body.app-body .sidebar .nav-submenu { border-left: 2px solid var(--border-light); }
body.app-body .sidebar-footer { border-top: 1px solid var(--border-light); }
body.app-body .sidebar-user:hover { background: var(--bg-hover); }
body.app-body .sidebar-user .user-name { color: var(--text-primary); }
body.app-body .sidebar-user .user-plan { color: var(--text-muted); }

/* Mode rétréci : séparateurs clairs */
body.app-body.sidebar-collapsed:not(.sidebar-peeking) .nav-section + .nav-section {
  border-top: 1px solid var(--border-light);
}
/* Peek : ombre douce côté clair */
body.app-body.sidebar-collapsed.sidebar-peeking .sidebar {
  box-shadow: 8px 0 32px rgba(23,26,31,0.10);
}

/* Bouton collapse : pastille claire */
body.app-body .sidebar-collapse-btn {
  background: #FFFFFF;
  border: 1px solid #D5D9DE;
  color: #566070;
  box-shadow: 0 1px 4px rgba(23,26,31,0.10);
}
body.app-body .sidebar-collapse-btn:hover {
  background: #FFFFFF;
  border-color: #EA580C;
  color: #EA580C;
  box-shadow: 0 0 0 3px rgba(234,88,12,0.12);
}

/* ─── NAVBAR — barre d'outils blanche ─── */
body.app-body .top-navbar {
  background: #FFFFFF;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid var(--border);
}
body.app-body .navbar-btn {
  border: 1px solid #E0E3E7;
  color: #566070;
}
body.app-body .navbar-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: #CDD2D8;
}
body.app-body .navbar-search { border-color: #E0E3E7; }
body.app-body .navbar-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
body.app-body .notif-dot { border-color: #FFFFFF; }

/* ─── CARDS — effet bouton 3D : contour bas plus clair + ombre portée ─── */
body.app-body .card {
  border-color: var(--border);
  border-bottom: 3px solid rgba(255,255,255,0.12);
  box-shadow: 0 2px 6px rgba(0,0,0,0.22);
}
body.app-body .card:hover { border-color: #D5D9DE; border-bottom-color: rgba(255,255,255,0.2); box-shadow: 0 2px 6px rgba(0,0,0,0.22); }

body.app-body .stat-card {
  border-color: var(--border);
  border-bottom: 3px solid rgba(255,255,255,0.12);
  box-shadow: 0 2px 6px rgba(0,0,0,0.22);
}
body.app-body .stat-card:hover {
  transform: none;
  border-color: #CDD2D8;
  border-bottom-color: rgba(255,255,255,0.2);
  box-shadow: 0 2px 6px rgba(0,0,0,0.22);
}
body.app-body .stat-card::after { display: none; } /* plus de barres dégradées */
body.app-body .stat-icon { border-radius: 8px; }
body.app-body .stat-value { letter-spacing: -1px; }

body.app-body .hub-card {
  border-bottom: 3px solid rgba(255,255,255,0.12);
  box-shadow: 0 2px 6px rgba(0,0,0,0.22);
}
body.app-body .hub-card:hover { transform: none; border-bottom-color: rgba(255,255,255,0.2); box-shadow: 0 2px 6px rgba(0,0,0,0.22); }

/* ─── BOUTONS — plats, orange marque ─── */
body.app-body .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}
body.app-body .btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}
body.app-body .btn-primary:active { transform: none; box-shadow: none; }

body.app-body .btn-secondary {
  border-color: #D5D9DE;
  box-shadow: none;
}
body.app-body .btn-secondary:hover {
  transform: none;
  box-shadow: none;
  background: var(--bg-hover);
  border-color: #C4CAD1;
}
body.app-body .btn-secondary:active { transform: none; }

body.app-body .btn-outline {
  color: #C2410C;
  border-color: #EA580C;
  border-width: 1px;
}
body.app-body .btn-outline:hover {
  background: rgba(234,88,12,0.06);
  transform: none;
  box-shadow: none;
}

/* ─── FORMULAIRES ─── */
body.app-body .form-input {
  border-color: #DDE0E5;
  box-shadow: none;
}
body.app-body .form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ─── TABLEAUX ─── */
body.app-body .table-wrapper { box-shadow: none; }
body.app-body thead th { background: #FAFBFB; }
body.app-body tbody tr:hover { background: #FAFAFA; }

/* ─── BADGES — rectangles discrets ─── */
body.app-body .badge { border-radius: 5px; }
body.app-body .badge-orange { background: rgba(234,88,12,0.10); color: #C2410C; }

/* ─── PROGRESS — remplissages unis ─── */
body.app-body .progress-fill { background: var(--accent); }
body.app-body .progress-fill.success { background: var(--success); }
body.app-body .progress-fill.warning { background: #D97706; }
body.app-body .progress-fill.danger  { background: #DC2626; }
body.app-body .progress-fill.info    { background: var(--info); }

/* ─── TABS ─── */
body.app-body .tabs { background: var(--bg-secondary); border-color: var(--border-light); }
body.app-body .tab { border-radius: 5px; }
body.app-body .tab.active { box-shadow: 0 1px 2px rgba(23,26,31,0.08); }

/* ─── SURFACES FLOTTANTES — seules à porter une ombre ─── */
body.app-body .dropdown-menu,
body.app-body .notif-panel,
body.app-body .modal {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
}

/* ─── SKELETON ─── */
body.app-body .skeleton {
  background: linear-gradient(90deg, #EFF1F3 25%, #E7EAED 50%, #EFF1F3 75%);
  background-size: 200% 100%;
  border-radius: 6px;
}

/* ─── DIVERS ─── */
body.app-body .spinner { border-color: #E7EAED; border-top-color: var(--accent); }
body.app-body .empty-icon { background: var(--bg-secondary); border-color: var(--border-light); }
body.app-body .flash-message, body.app-body .alert { border-radius: var(--radius-sm); }

/* ═══════════════════════════════════════════════════════════════════════════
   SHELL v5 — TOPBAR pleine largeur + sidebar sous la barre
   ═══════════════════════════════════════════════════════════════════════════ */
body.app-body { --navbar-height: 56px; }
body.app-body .app-wrapper { padding-top: 56px; }

body.app-body .app-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: #15181E;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  z-index: 400;
}

body.app-body .tb-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
body.app-body .tb-logo img { height: 28px; width: auto; display: block; }
body.app-body .tb-logo-text {
  font-size: 15px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.3px;
}
body.app-body .tb-logo-text span { color: #F97316; }

body.app-body .tb-sep {
  width: 1px; height: 22px;
  background: rgba(255,255,255,0.14);
  flex-shrink: 0;
}

body.app-body .tb-page {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.app-body .tb-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Boutons de la topbar : variante sombre — tous alignés à la même hauteur pour un rendu propre en rangée */
body.app-body .app-topbar .navbar-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.78);
  width: 40px; height: 40px;
  font-size: 15px;
}
body.app-body .app-topbar .navbar-btn:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.28);
  color: #FFFFFF;
}
body.app-body .app-topbar .notif-dot { border-color: #15181E; }

/* Pastille crédits — fond plein, jamais transparent */
body.app-body .tb-credits {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: #EA580C;
  border: 1px solid #EA580C;
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: var(--transition);
  font-variant-numeric: tabular-nums;
}
body.app-body .tb-credits:hover { background: #FF7A24; border-color: #FF7A24; color: #FFFFFF; }

/* Sélecteur de langue — même hauteur que les boutons */
body.app-body .dash-lang-switch { height: 40px; padding: 3px; border-color: rgba(255,255,255,0.16); background: transparent; }
body.app-body .dash-lang-switch .lang-switch-opt { padding: 0 12px; height: 100%; font-size: 12.5px; color: rgba(255,255,255,0.7); }
body.app-body .dash-lang-switch .lang-switch-opt:hover { color: #FFFFFF; }
body.app-body .dash-lang-switch .lang-switch-opt.active { background: rgba(255,255,255,0.12); color: #FFFFFF; box-shadow: none; }

/* Hamburger mobile dans la topbar */
body.app-body .app-topbar .sidebar-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.85);
}

/* Sidebar sous la topbar */
body.app-body .sidebar {
  top: 56px;
  height: calc(100vh - 56px);
}
body.app-body .sidebar-nav { padding-top: 18px; }
body.app-body .sidebar-collapse-btn { top: 70px; }

/* Le menu déroulant avatar s'ouvre sous la topbar */
body.app-body .app-topbar .dropdown-menu { top: calc(100% + 10px); }

/* Mobile : topbar compacte */
@media (max-width: 768px) {
  body.app-body .app-topbar { padding: 0 12px; gap: 10px; }
  body.app-body .tb-page { display: none; }
  body.app-body .tb-sep { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMPOSANTS v5 — vocabulaire partagé par toutes les pages de l'app
   (mêmes patterns que le dashboard : panneaux plats, KPI segmentés,
    tableaux de données, chips — à utiliser dans les refontes page par page)
   ═══════════════════════════════════════════════════════════════════════════ */

body.app-body .v5-eyebrow { font-size:11px; font-weight:700; letter-spacing:0.1em; text-transform:uppercase; color:var(--text-muted); margin-bottom:5px; }

body.app-body .v5-toolbar { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:14px; margin-bottom:22px; }
body.app-body .v5-title { font-size:22px; font-weight:800; letter-spacing:-0.5px; line-height:1.2; }

/* Panneau */
body.app-body .v5-panel { background:var(--bg-card); border:1px solid var(--border); border-bottom:3px solid rgba(255,255,255,0.12); border-radius:var(--radius); box-shadow:0 2px 6px rgba(0,0,0,0.22); overflow:hidden; display:flex; flex-direction:column; }
body.app-body .v5-panel-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:13px 18px; border-bottom:1px solid var(--border-light); }
body.app-body .v5-panel-title { font-size:13px; font-weight:700; letter-spacing:-0.1px; }
body.app-body .v5-panel-link { font-size:12px; font-weight:600; color:var(--accent); white-space:nowrap; }
body.app-body .v5-panel-link:hover { text-decoration:underline; }

/* Bandeau KPI segmenté */
body.app-body .v5-kpis { display:grid; grid-template-columns:repeat(4,1fr); background:var(--bg-card); border:1px solid var(--border); border-bottom:3px solid rgba(255,255,255,0.12); border-radius:var(--radius); box-shadow:0 2px 6px rgba(0,0,0,0.22); overflow:hidden; margin-bottom:20px; }
@media(max-width:820px){ body.app-body .v5-kpis{ grid-template-columns:repeat(2,1fr); } }
body.app-body .v5-kpi { padding:18px 22px; border-right:1px solid var(--border-light); }
body.app-body .v5-kpi:last-child { border-right:0; }
@media(max-width:820px){ body.app-body .v5-kpi:nth-child(2){ border-right:0; } body.app-body .v5-kpi:nth-child(-n+2){ border-bottom:1px solid var(--border-light); } }
body.app-body .v5-kpi-lbl { font-size:10.5px; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; color:var(--text-muted); margin-bottom:8px; }
body.app-body .v5-kpi-val { font-size:26px; font-weight:800; letter-spacing:-0.8px; line-height:1; font-variant-numeric:tabular-nums; }
body.app-body .v5-kpi-sub { font-size:11.5px; color:var(--text-muted); margin-top:6px; }

/* Tableau de données */
body.app-body .v5-table { width:100%; border-collapse:collapse; font-size:13px; }
body.app-body .v5-table th { text-align:left; padding:10px 18px; font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.07em; color:var(--text-muted); background:var(--bg-primary); border-bottom:1px solid var(--border); white-space:nowrap; }
body.app-body .v5-table td { padding:11px 18px; border-bottom:1px solid var(--border-light); vertical-align:middle; font-variant-numeric:tabular-nums; }
body.app-body .v5-table tbody tr:last-child td { border-bottom:0; }
body.app-body .v5-table tbody tr { transition:var(--transition); }
body.app-body .v5-table tbody tr:hover td { background:var(--bg-hover); }
body.app-body .v5-table tbody tr[onclick], body.app-body .v5-table tbody tr.clickable { cursor:pointer; }

/* Chips & tags */
body.app-body .v5-chip {
  display:inline-flex; align-items:center; gap:6px; padding:5px 11px;
  border:1px solid var(--border); border-radius:5px; background:var(--bg-primary);
  font-size:12px; font-weight:600; color:var(--text-secondary); transition:var(--transition);
}
body.app-body .v5-chip:hover { border-color:#C4CAD1; color:var(--text-primary); }
body.app-body .v5-chip.active { background:rgba(234,88,12,0.07); border-color:rgba(234,88,12,0.35); color:#C2410C; }
body.app-body .v5-tag { display:inline-block; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:0.06em; padding:3px 8px; border-radius:4px; }
body.app-body .v5-score { display:inline-block; min-width:38px; text-align:center; font-size:12px; font-weight:800; padding:3px 8px; border-radius:4px; font-variant-numeric:tabular-nums; }
body.app-body .v5-score.good { background:rgba(21,128,61,0.1);  color:#15803D; }
body.app-body .v5-score.mid  { background:rgba(180,83,9,0.1);   color:#B45309; }
body.app-body .v5-score.bad  { background:rgba(185,28,28,0.09); color:#B91C1C; }

/* Rangée de stats internes à un panneau */
body.app-body .v5-statrow { display:grid; grid-template-columns:repeat(4,1fr); border-bottom:1px solid var(--border-light); }
body.app-body .v5-statcell { padding:14px 18px; border-right:1px solid var(--border-light); }
body.app-body .v5-statcell:last-child { border-right:0; }
body.app-body .v5-statcell .v { font-size:19px; font-weight:800; letter-spacing:-0.5px; line-height:1; font-variant-numeric:tabular-nums; }
body.app-body .v5-statcell .l { font-size:10.5px; color:var(--text-muted); font-weight:600; margin-top:4px; text-transform:uppercase; letter-spacing:0.05em; }

/* ═══════════════════════════════════════════════════════════════════════════
   DARK v6 — thème sombre complet de l'app, par-dessus v5 Flat Pro.
   Même règle de cascade que v5 : uniquement couleurs/bordures/rayons/ombres,
   jamais les propriétés gérées par les media queries (paddings, tailles, layout).
   ═══════════════════════════════════════════════════════════════════════════ */
body.app-body {
  --bg-primary:   #0D0F13;
  --bg-secondary: #15181E;
  --bg-card:      #1A1D24;
  --bg-hover:     #21252D;
  --bg-elevated:  #1F2229;

  --border:        #2A2E38;
  --border-light:  #23262E;
  --border-subtle: rgba(255,255,255,0.05);

  --text-primary:   #F3F4F6;
  --text-secondary: #A0A8B4;
  --text-muted:     #6B7280;

  --accent:        #EA580C;
  --accent-hover:  #FF7A24;
  --accent-glow:   rgba(234,88,12,0.22);
  --accent-subtle: rgba(234,88,12,0.14);

  --success: #22C55E;
  --warning: #F59E0B;
  --danger:  #EF4444;
  --info:    #60A5FA;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow:    0 1px 3px rgba(0,0,0,0.35), 0 4px 14px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4), 0 12px 32px rgba(0,0,0,0.3);
  --shadow-accent: 0 2px 14px rgba(234,88,12,0.4);

  color-scheme: dark;
}

/* ─── Sidebar — reprend la teinte noire déjà utilisée par la topbar ─── */
body.app-body .sidebar { background: #14171D; border-right-color: rgba(255,255,255,0.07); }
body.app-body .sidebar-logo { border-bottom-color: rgba(255,255,255,0.08); }
body.app-body .sidebar-logo .logo-text { color: #FFFFFF; }
body.app-body .sidebar .nav-section-label { color: #5B6472; }

/* Texte/icônes agrandis, en blanc plein, alignement propre — repère visuel copié sur Whop */
body.app-body { --sidebar-width: 272px; }
body.app-body .sidebar .nav-item,
body.app-body .sidebar .nav-dropdown-toggle { padding-top: 13px; padding-bottom: 13px; gap: 14px; align-items: center; }
body.app-body .sidebar .nav-item,
body.app-body .sidebar .nav-dropdown-toggle,
body.app-body .sidebar .nav-subitem { color: #FFFFFF; font-size: 15px; font-weight: 500; line-height: 1.3; }

/* Icônes : même taille partout (item, dropdown, sous-item), glyphe centré au texte */
body.app-body .sidebar .nav-item i,
body.app-body .sidebar .nav-dropdown-toggle i,
body.app-body .sidebar .nav-subitem i {
  color: #FFFFFF; font-size: 17px; line-height: 1;
  width: 19px; text-align: center; flex-shrink: 0;
}
body.app-body .sidebar .nav-subitem { font-size: 14px; gap: 12px; align-items: center; padding-top: 9px; padding-bottom: 9px; }
body.app-body .sidebar .nav-submenu { margin-top: 4px; margin-bottom: 6px; }
body.app-body .sidebar .nav-dropdown-toggle .dd-icon { font-size: 14px; line-height: 1; }

body.app-body .sidebar .nav-item:hover,
body.app-body .sidebar .nav-dropdown-toggle:hover,
body.app-body .sidebar .nav-subitem:hover { background: rgba(255,255,255,0.06); color: #FFFFFF; }
body.app-body .sidebar .nav-item:hover i,
body.app-body .sidebar .nav-dropdown-toggle:hover i,
body.app-body .sidebar .nav-subitem:hover i { color: #FFFFFF; }
body.app-body .sidebar .nav-dropdown-toggle.open { color: #FFFFFF; }
body.app-body .sidebar .nav-dropdown-toggle .dd-icon { color: #FFFFFF; }

/* État actif/sélectionné — pastille grise pleine, jamais orange (comme Whop), sans gras excessif */
body.app-body .sidebar .nav-item.active,
body.app-body .sidebar .nav-subitem.active {
  background: rgba(255,255,255,0.14); color: #FFFFFF; font-weight: 600;
}
body.app-body .sidebar .nav-item.active i,
body.app-body .sidebar .nav-subitem.active i { color: #FFFFFF; }
body.app-body .sidebar .nav-item.active::before,
body.app-body .sidebar .nav-subitem.active::before { display: none; }
body.app-body .sidebar .nav-dropdown-toggle.has-active { background: rgba(255,255,255,0.14); color: #FFFFFF; font-weight: 600; }
body.app-body .sidebar .nav-dropdown-toggle.has-active i,
body.app-body .sidebar .nav-dropdown-toggle.has-active .dd-icon { color: #FFFFFF; }

body.app-body .sidebar .nav-submenu { border-left-color: rgba(255,255,255,0.08); }
body.app-body .sidebar-footer { border-top-color: rgba(255,255,255,0.08); }

/* ─── Logo topbar — agrandi et intégralement blanc ─── */
body.app-body .tb-logo img { height: 34px; }
body.app-body .tb-logo-text { font-size: 18px; color: #FFFFFF; }
body.app-body .tb-logo-text span { color: #FFFFFF; }
body.app-body .sidebar-user:hover { background: rgba(255,255,255,0.05); }
body.app-body .sidebar-user .user-name { color: #FFFFFF; }
body.app-body .sidebar-user .user-plan { color: rgba(255,255,255,0.4); }
body.app-body.sidebar-collapsed:not(.sidebar-peeking) .nav-section + .nav-section { border-top-color: rgba(255,255,255,0.08); }

body.app-body .sidebar-collapse-btn { background: #1A1D24; border-color: #2A2E38; color: #A0A8B4; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
body.app-body .sidebar-collapse-btn:hover { background: #1A1D24; border-color: #EA580C; color: #EA580C; }
body.app-body .notif-dot { border-color: #1A1D24; }
body.app-body .app-topbar .notif-dot { border-color: #15181E; }

/* ─── Tableaux / badges / scores — tons éclaircis pour rester lisibles sur fond sombre ─── */
body.app-body tbody tr:hover { background: var(--bg-hover); }
body.app-body .badge-success { background: rgba(34,197,94,0.16);   color: #4ADE80; }
body.app-body .badge-warning { background: rgba(245,158,11,0.16);  color: #FBBF24; }
body.app-body .badge-danger  { background: rgba(239,68,68,0.16);   color: #F87171; }
body.app-body .badge-info    { background: rgba(96,165,250,0.16);  color: #93C5FD; }
body.app-body .badge-orange  { background: rgba(249,115,22,0.18);  color: #FB923C; }
body.app-body .badge-purple  { background: rgba(167,139,250,0.18); color: #C4B5FD; }
body.app-body .badge-neutral { background: #21252D; color: var(--text-secondary); border-color: var(--border); }

body.app-body .v5-score.good { background: rgba(34,197,94,0.16);  color: #4ADE80; }
body.app-body .v5-score.mid  { background: rgba(245,158,11,0.16); color: #FBBF24; }
body.app-body .v5-score.bad  { background: rgba(239,68,68,0.16);  color: #F87171; }

/* ─── Icône "i" d'information — badge unique réutilisé partout dans l'app (tooltips et
   bandeaux) pour une apparence cohérente sur tout le site ─── */
.gm-info-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  background: #fff; color: #0B0E14; border: 1px solid rgba(0,0,0,0.12);
  font-size: 10.5px; font-weight: 800; font-style: italic; font-family: Georgia, serif;
  line-height: 1; cursor: help; vertical-align: middle;
}
body.app-body .v5-chip.active { background: rgba(234,88,12,0.16); border-color: rgba(234,88,12,0.4); color: #FB923C; }
