/* Design inspiré : palette sombre + accent or, Poppins, cartes glass */
:root {
  --bg: #0B0B0F;
  --bg2: #12121A;
  --gold: #F5C451;
  --goldSoft: #FFF0C9;
  --accent: var(--gold);
  --accent2: var(--goldSoft);
  --card: rgba(255,255,255,0.06);
  --glass: rgba(255,255,255,0.12);
  --border: rgba(255,255,255,0.12);
  --text: #F3F4F6;
  --muted: #B3B7C0;
  --success: #4dff88;
  --error: #ff6a6a;
  --pos-color: var(--success);
  --neg-color: var(--error);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  background-image:
    radial-gradient(70vw 35vh at 90% 5%, rgba(245,196,81,0.06) 0%, transparent 55%),
    radial-gradient(60vw 30vh at 10% 20%, rgba(255,240,201,0.05) 0%, transparent 50%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--goldSoft); }

/* ——— Layout global ——— */
body { display: flex; flex-direction: row; align-items: stretch; }

.layout-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ——— Sidebar ——— */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.25s ease;
  z-index: 200;
}
body.sidebar-collapsed .sidebar { width: 60px; }

.sidebar-header {
  padding: 1.1rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-brand:hover { color: var(--gold); }
.sidebar-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
}
.sidebar-brand-text {
  transition: opacity 0.2s, max-width 0.25s;
  max-width: 160px;
  overflow: hidden;
}
body.sidebar-collapsed .sidebar-brand-text { opacity: 0; max-width: 0; }
body.sidebar-collapsed .sidebar-logo-img { width: 32px; height: 32px; }
body.sidebar-collapsed .sidebar-label { opacity: 0; max-width: 0; overflow: hidden; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem 0;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.sidebar-section {
  padding: 0.6rem 1rem 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(179,183,192,0.5);
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.2s;
}
body.sidebar-collapsed .sidebar-section { opacity: 0; }

/* ── Sous-menus dépliants Admin ────────────────────────────────────────────── */
.sidebar-accordion { overflow: hidden; }

.sidebar-subsection {
  padding: 0.45rem 0.85rem 0.45rem 1rem;
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(179,183,192,0.45);
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.2s, color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  border-radius: 7px;
  margin: 0 0.5rem;
  user-select: none;
}
.sidebar-subsection:hover {
  color: rgba(179,183,192,0.75);
  background: rgba(255,255,255,0.03);
}
.sidebar-subsection::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 1px;
  background: rgba(179,183,192,0.25);
  flex-shrink: 0;
}
.sidebar-subsection .ss-arrow {
  margin-left: auto;
  width: 12px;
  height: 12px;
  opacity: 0.4;
  transition: transform 0.2s, opacity 0.2s;
  flex-shrink: 0;
}
.sidebar-subsection.is-open .ss-arrow { transform: rotate(180deg); opacity: 0.7; }
.sidebar-subsection.is-open { color: rgba(179,183,192,0.7); }

.sidebar-accordion-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
}
.sidebar-accordion-body.is-open { max-height: 600px; }

body.sidebar-collapsed .sidebar-subsection { opacity: 0; pointer-events: none; }
body.sidebar-collapsed .sidebar-accordion-body { max-height: 0 !important; }
.sidebar-link.sidebar-sublink { padding-left: 1.75rem; }
body.sidebar-collapsed .sidebar-link.sidebar-sublink { padding-left: 0; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  margin: 0.1rem 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  white-space: nowrap;
  overflow: hidden;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
  background: none;
  font-family: inherit;
  width: calc(100% - 1rem);
  text-align: left;
}
.sidebar-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.sidebar-link.active { color: var(--gold); background: rgba(245,196,81,0.1); }

.cs-nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: rgba(250,190,30,.18);
  border: 1px solid rgba(250,190,30,.35);
  color: var(--gold);
  font-size: 0.64rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0;
  transition: opacity .2s;
}
body.sidebar-collapsed .cs-nav-badge { display: none; }
body.agent-sidebar-collapsed .cs-nav-badge { display: none; }

/* ─── Tooltips métier ──────────────────────────────────────────── */
.tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.13);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  cursor: help;
  position: relative;
  vertical-align: middle;
  margin-left: 3px;
  flex-shrink: 0;
  line-height: 1;
  transition: background .15s, color .15s;
}
.tip:hover { background: rgba(250,190,30,.15); color: var(--gold); border-color: rgba(250,190,30,.3); }
.tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.82);
  font-size: 0.73rem;
  font-weight: 400;
  line-height: 1.5;
  white-space: normal;
  width: 220px;
  padding: .55rem .7rem;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 9999;
  text-align: left;
}
.tip::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(255,255,255,.12);
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 9999;
}
.tip:hover::after, .tip:hover::before { opacity: 1; }
/* Tooltip vers le bas si en haut de page */
.tip.tip-down::after { bottom: auto; top: calc(100% + 7px); }
.tip.tip-down::before { bottom: auto; top: calc(100% + 2px); border-top-color: transparent; border-bottom-color: rgba(255,255,255,.12); }

.sidebar-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.sidebar-label {
  transition: opacity 0.2s, max-width 0.25s;
  max-width: 160px;
  overflow: hidden;
}

.sidebar-footer {
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  margin: 0.1rem 0.5rem;
  width: calc(100% - 1rem);
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  font-family: inherit;
  white-space: nowrap;
  overflow: hidden;
  transition: color 0.2s, background 0.2s;
}
.sidebar-collapse-btn:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.sidebar-collapse-btn .sidebar-icon { transition: transform 0.25s ease; }
body.sidebar-collapsed .sidebar-collapse-btn .sidebar-icon { transform: rotate(180deg); }

/* Backdrop mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 199;
}
.sidebar-backdrop.is-open { display: block; }
body.sidebar-open { overflow: hidden; }

/* ——— Topbar ——— */
.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  height: 52px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}
.topbar-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  border-radius: 8px;
  padding: 0;
  flex-shrink: 0;
}
.topbar-menu-btn svg { width: 20px; height: 20px; }
.topbar-menu-btn:hover { background: rgba(255,255,255,0.06); }
.topbar-title { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.topbar-logout {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; font-weight: 500; color: var(--muted);
  text-decoration: none; padding: 0.35rem 0.75rem;
  border: 1px solid var(--border); border-radius: 8px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.topbar-logout svg { width: 14px; height: 14px; flex-shrink: 0; }
.topbar-logout:hover { color: #f87171; border-color: rgba(248,113,113,0.4); background: rgba(248,113,113,0.07); }
.topbar-user {
  font-size: 0.8rem;
  color: var(--muted);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.3rem 0.7rem;
}

/* ——— Main ——— */
.main { padding: 1.5rem; max-width: 1200px; margin: 0 auto; min-width: 0; width: 100%; }

/* ——— Responsive ——— */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 1000;
    width: 220px !important;
  }
  .sidebar.is-open { transform: translateX(0); }
  body.sidebar-collapsed .sidebar-brand-text,
  body.sidebar-collapsed .sidebar-label { opacity: 1; max-width: 160px; overflow: visible; }
  .topbar-menu-btn { display: flex; }
}
.page-bonus .main { max-width: 1600px; padding: 1.5rem 2rem; }
.main h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 1rem 0;
}
.muted { color: var(--muted); font-size: 0.9rem; }

/* ——— Flash ——— */
.flash { margin-bottom: 1rem; }
.flash-error {
  color: var(--neg-color);
  padding: 0.6rem 1rem;
  background: rgba(255,106,106,0.12);
  border: 1px solid rgba(255,106,106,0.3);
  border-radius: 12px;
  font-size: 0.9rem;
}
.flash-success {
  color: var(--pos-color);
  padding: 0.6rem 1rem;
  background: rgba(77,255,136,0.12);
  border: 1px solid rgba(77,255,136,0.3);
  border-radius: 12px;
  font-size: 0.9rem;
}

/* ——— Card ——— */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
}
.card h2 { margin: 0 0 1rem 0; font-size: 1.1rem; color: var(--muted); font-weight: 600; }

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid rgba(245,196,81,0.25);
  cursor: pointer;
  transition: transform 0.06s ease, filter 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  background: var(--bg2);
  color: var(--text);
  text-decoration: none;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(0.98); }
.btn-secondary {
  background: rgba(255,255,255,0.06);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: rgba(245,196,81,0.3); }
.btn-danger { background: rgba(255,106,106,0.2); border-color: rgba(255,106,106,0.4); color: #ff8a8e; }
.btn-danger:hover { background: var(--error); color: #fff; border-color: var(--error); }
.btn-discord {
  background: #5865f2;
  border-color: #4752c4;
  color: #fff;
  text-decoration: none;
  min-height: 44px;
  padding: 0.6rem 1.2rem;
}
.btn-discord:hover { background: #4752c4; color: #fff; filter: brightness(1.08); }
.login-divider { text-align: center; margin: 1rem 0; color: var(--muted); font-size: 0.9rem; }

/* ——— Forms & inputs ——— */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.form-group input,
.input {
  width: 100%;
  max-width: 280px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.form-group input::placeholder,
.input::placeholder { color: rgba(243,244,246,0.5); }
.form-group input:focus,
.input:focus {
  border-color: rgba(245,196,81,0.5);
  box-shadow: 0 0 0 2px rgba(245,196,81,0.2);
  background: rgba(255,255,255,0.075);
}

/* ——— Tables ——— */
.table-scroll-hint {
  display: none;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 0.5rem 0;
  text-align: center;
}
@media (max-width: 768px) {
  .table-scroll-hint { display: block; }
}
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
  overflow: hidden;
}
.table-wrap table { width: 100%; min-width: 600px; border-collapse: collapse; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.7rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; background: rgba(0,0,0,0.2); }
tr:hover { background: rgba(255,255,255,0.02); }

.evolution-pct-pos { color: var(--pos-color); font-weight: 600; }
.evolution-pct-neg { color: var(--neg-color); font-weight: 600; }

/* ——— Page Évolution ——— */
.evol-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.evol-title { font-size: 1.5rem; font-weight: 700; color: var(--text); margin: 0; letter-spacing: -0.02em; }
.evol-header-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.evol-meta-chip {
  font-size: 0.75rem; color: var(--muted);
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.2rem 0.6rem; max-width: 220px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.evol-meta-chip-n { color: var(--gold); border-color: rgba(245,196,81,0.3); background: rgba(245,196,81,0.05); }
.evol-meta-sep { color: var(--muted); font-size: 0.8rem; }

/* Stats résumé créateurs */
.evol-stats-row {
  display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.evol-stat-chip {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.9rem; border-radius: 10px;
  background: var(--card); border: 1px solid var(--border);
}
.evol-stat-chip svg { width: 13px; height: 13px; flex-shrink: 0; }
.evol-stat-val { font-size: 1rem; font-weight: 700; color: var(--text); }
.evol-stat-lbl { font-size: 0.72rem; color: var(--muted); }
.evol-stat-new { border-color: rgba(77,255,136,0.3); }
.evol-stat-new svg, .evol-stat-new .evol-stat-val { color: var(--pos-color); }
.evol-stat-churned { border-color: rgba(255,106,106,0.3); }
.evol-stat-churned svg, .evol-stat-churned .evol-stat-val { color: var(--neg-color); }
.evol-stat-up .evol-stat-val, .evol-stat-up svg { color: var(--pos-color); }
.evol-stat-down .evol-stat-val, .evol-stat-down svg { color: var(--neg-color); }

/* Tabs */
.evol-tabs {
  display: flex; gap: 0.25rem; margin-bottom: 1.25rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 0.3rem;
  width: fit-content;
}
.evol-tab {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1.1rem; border-radius: 9px;
  font-size: 0.85rem; font-weight: 600; color: var(--muted);
  background: none; border: none; cursor: pointer; font-family: inherit;
  transition: color 0.2s, background 0.2s;
}
.evol-tab svg { width: 15px; height: 15px; }
.evol-tab:hover { color: var(--text); }
.evol-tab.is-active { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.evol-tab-count {
  font-size: 0.7rem; font-weight: 700; padding: 0.1rem 0.4rem;
  background: rgba(255,255,255,0.08); border-radius: 4px; color: var(--muted);
}

/* Panel */
.evol-panel { display: none; }
.evol-panel.is-active { display: block; }

/* Toolbar */
.evol-toolbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.evol-search-wrap {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 0.4rem 0.75rem;
  flex: 1; max-width: 300px;
}
.evol-search-wrap svg { width: 15px; height: 15px; color: var(--muted); flex-shrink: 0; }
.evol-search {
  background: none; border: none; color: var(--text); font-family: inherit;
  font-size: 0.85rem; width: 100%; outline: none;
}
.evol-search::placeholder { color: var(--muted); }
.evol-filters { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.evol-filter {
  padding: 0.3rem 0.75rem; border-radius: 20px; font-size: 0.78rem; font-weight: 600;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.evol-filter:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.evol-filter.is-active { background: rgba(245,196,81,0.12); color: var(--gold); border-color: rgba(245,196,81,0.3); }

/* Table */
.evol-table-wrap { background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: auto; }
.evol-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.evol-table thead th {
  padding: 0.65rem 0.9rem; text-align: left; font-size: 0.71rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted);
  border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--bg2);
}
.evol-th-num, .evol-td-num, .evol-td-pct, .evol-th-pct { text-align: right; white-space: nowrap; }
.evol-th-rank, .evol-td-rank { text-align: center; width: 2.5rem; }
.evol-th-tag, .evol-td-tag { text-align: center; width: 3rem; padding-left: 0.25rem; padding-right: 0.25rem; }
.evol-th-name { min-width: 130px; }
.evol-table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.04); transition: background 0.15s; }
.evol-table tbody tr:last-child { border-bottom: none; }
.evol-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.evol-table td { padding: 0.6rem 0.9rem; color: var(--text); }
.evol-td-rank { color: var(--muted); font-size: 0.75rem; }
.evol-td-name { font-weight: 600; }
.evol-td-num { font-variant-numeric: tabular-nums; color: var(--muted); }
.evol-td-pct { font-weight: 700; font-variant-numeric: tabular-nums; }
.evol-pos, .evol-table td.evol-pos { color: var(--pos-color); }
.evol-neg, .evol-table td.evol-neg { color: var(--neg-color); }

/* Badges validés */
.val-badge {
  display: inline-block; padding: 0.2rem 0.65rem; border-radius: 6px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em; white-space: nowrap;
}
.val-badge-ok   { background: rgba(74,222,128,0.15); color: #4ade80; border: 1px solid rgba(74,222,128,0.3); }
.val-badge-wait { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }

/* Badges tag */
.evol-badge {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.evol-badge-new { background: rgba(77,255,136,0.12); color: var(--pos-color); border: 1px solid rgba(77,255,136,0.25); }
.evol-badge-churned { background: rgba(255,106,106,0.12); color: var(--neg-color); border: 1px solid rgba(255,106,106,0.25); }
.evol-badge-up { background: rgba(77,255,136,0.08); color: var(--pos-color); }
.evol-badge-down { background: rgba(255,106,106,0.08); color: var(--neg-color); }
.evol-badge-stable { color: var(--muted); }

/* Agent name */
.evol-agent-name { display: block; font-weight: 600; color: var(--text); }
.evol-agent-email { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 0.1rem; }

.settings-tiers-table { margin-top: 0.5rem; max-width: 560px; }
.settings-tiers-table th, .settings-tiers-table td { padding: 0.5rem 0.6rem; }
.settings-tiers-table .input-narrow { width: 4.5rem; padding: 0.4rem 0.5rem; font-size: 0.9rem; border-radius: 8px; border: 1px solid var(--border); background: rgba(255,255,255,0.06); color: var(--text); }

/* ══════════════════════════════════════════
   SETTINGS PAGE
   ══════════════════════════════════════════ */

/* Tabs */
.settings-tabs { display: flex; gap: 0.4rem; margin-bottom: 1.5rem; background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 0.35rem; }
.settings-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.65rem 1rem; border-radius: 10px; font-size: 0.83rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: all 0.18s; border: 1px solid transparent; background: none; font-family: inherit; }
.settings-tab.is-active { background: rgba(245,196,81,0.11); color: var(--gold); border-color: rgba(245,196,81,0.28); }
.settings-tab:not(.is-active):hover { background: rgba(255,255,255,0.05); color: var(--text); }
.settings-tab-icon { font-size: 1rem; }
.settings-pane { display: none; }
.settings-pane.is-active { display: block; }

/* Pane wrapper */
.settings-panel { background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; backdrop-filter: blur(10px); }

/* Section blocks inside a panel */
.settings-block { padding: 1.5rem 1.75rem; }
.settings-block + .settings-block { border-top: 1px solid var(--border); }
.settings-block-head { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.5rem; }
.settings-block-title { font-size: 0.72rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.09em; margin: 0; }
.settings-block-badge { font-size: 0.67rem; font-weight: 600; color: var(--muted); background: rgba(255,255,255,0.07); border: 1px solid var(--border); border-radius: 20px; padding: 0.1rem 0.55rem; }
.settings-block-desc { font-size: 0.78rem; color: var(--muted); margin: 0 0 1.25rem; line-height: 1.6; }

/* KPI eligibility cards */
.settings-kpi-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.settings-kpi-card { background: linear-gradient(135deg, rgba(245,196,81,0.07) 0%, rgba(255,255,255,0.02) 100%); border: 1px solid rgba(245,196,81,0.22); border-radius: 14px; padding: 1.1rem 1.25rem 1rem; transition: border-color 0.2s, background 0.2s; }
.settings-kpi-card:focus-within { border-color: rgba(245,196,81,0.55); background: linear-gradient(135deg, rgba(245,196,81,0.1) 0%, rgba(255,255,255,0.03) 100%); }
.settings-kpi-top { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; }
.settings-kpi-ico { width: 30px; height: 30px; border-radius: 8px; background: rgba(245,196,81,0.15); border: 1px solid rgba(245,196,81,0.3); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0; }
.settings-kpi-lbl { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.settings-kpi-field { position: relative; }
.settings-kpi-input { width: 100%; box-sizing: border-box; padding: 0.6rem 2.4rem 0.6rem 0.85rem; background: rgba(0,0,0,0.25); border: 1px solid rgba(245,196,81,0.3); border-radius: 10px; font-size: 1.45rem; font-weight: 800; color: var(--gold); font-family: inherit; letter-spacing: -0.02em; transition: border-color 0.15s, box-shadow 0.15s; }
.settings-kpi-input:focus { outline: none; border-color: rgba(245,196,81,0.7); box-shadow: 0 0 0 3px rgba(245,196,81,0.1); }
.settings-kpi-unit { position: absolute; right: 0.85rem; top: 50%; transform: translateY(-50%); font-size: 0.85rem; font-weight: 700; color: rgba(245,196,81,0.65); pointer-events: none; }
.settings-kpi-hint { font-size: 0.72rem; color: var(--muted); margin-top: 0.4rem; }

/* Tier table */
.settings-tier-table { width: 100%; border-collapse: separate; border-spacing: 0 2px; max-width: 580px; }
.settings-tier-table thead th { font-size: 0.67rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; padding: 0 0.65rem 0.55rem; text-align: left; border-bottom: 1px solid var(--border); }
.settings-tier-table thead th:first-child { width: 44px; }
.settings-tier-table tbody td { background: rgba(255,255,255,0.025); padding: 0.32rem 0.65rem; transition: background 0.12s; }
.settings-tier-table tbody td:first-child { border-radius: 8px 0 0 8px; }
.settings-tier-table tbody td:last-child { border-radius: 0 8px 8px 0; }
.settings-tier-table tbody tr:hover td { background: rgba(255,255,255,0.055); }
.settings-tier-num { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,0.08); font-size: 0.7rem; font-weight: 700; color: var(--muted); }
.settings-tier-input { width: 5.2rem; padding: 0.35rem 0.5rem; font-size: 0.88rem; border-radius: 7px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: var(--text); font-family: inherit; transition: border-color 0.15s, background 0.15s; }
.settings-tier-input:focus { outline: none; border-color: rgba(245,196,81,0.5); background: rgba(245,196,81,0.05); }

/* Agent settings grid */
.settings-agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 0.25rem 1.25rem; }

/* ——— Agents noms page ——— */
.anoms-list { display: flex; flex-direction: column; gap: 0.4rem; }
.anoms-row { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; background: var(--card); border: 1px solid var(--border); border-radius: 12px; transition: border-color 0.15s, background 0.15s; }
.anoms-row:hover { border-color: rgba(245,196,81,0.2); background: rgba(255,255,255,0.05); }
.anoms-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(245,196,81,0.12); border: 1px solid rgba(245,196,81,0.25); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 700; color: var(--gold); flex-shrink: 0; }
.anoms-info { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; flex: 1; }
.anoms-email { font-size: 0.82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anoms-current-name { font-size: 0.78rem; color: var(--accent); font-weight: 600; }
.anoms-edit { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.anoms-input { padding: 0.42rem 0.75rem; border-radius: 8px; border: 1px solid var(--border); background: rgba(255,255,255,0.05); color: var(--text); font-family: inherit; font-size: 0.88rem; width: 200px; transition: border-color 0.15s, background 0.15s; }
.anoms-input:focus { outline: none; border-color: rgba(245,196,81,0.5); background: rgba(245,196,81,0.04); }
.anoms-input.is-changed { border-color: rgba(245,196,81,0.45); }
.anoms-save-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: rgba(255,255,255,0.06); color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.15s; flex-shrink: 0; }
.anoms-save-btn:hover, .anoms-save-btn.is-changed { border-color: rgba(245,196,81,0.5); background: rgba(245,196,81,0.1); color: var(--gold); }
.anoms-save-btn.is-saving { opacity: 0.5; cursor: default; }

/* Toast */
.anoms-toast { position: fixed; bottom: 1.5rem; right: 1.5rem; padding: 0.65rem 1.1rem; border-radius: 10px; font-size: 0.85rem; font-weight: 600; pointer-events: none; opacity: 0; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s; z-index: 999; }
.anoms-toast.is-visible { opacity: 1; transform: translateY(0); }
.anoms-toast.is-ok  { background: rgba(74,222,128,0.15); border: 1px solid rgba(74,222,128,0.3); color: #4ade80; }
.anoms-toast.is-err { background: rgba(248,113,113,0.15); border: 1px solid rgba(248,113,113,0.3); color: #f87171; }

/* Agent account status badges */
.anoms-account-status { display: flex; align-items: center; gap: 0.5rem; margin-right: 0.5rem; flex-shrink: 0; }
.anoms-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.25rem 0.6rem; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600; white-space: nowrap;
}
.anoms-badge-ok   { background: rgba(77,255,136,0.1); border: 1px solid rgba(77,255,136,0.25); color: var(--success); }
.anoms-badge-warn { background: rgba(245,196,81,0.1); border: 1px solid rgba(245,196,81,0.25); color: var(--gold); }
.anoms-badge-none { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); color: var(--muted); }
.agent-badge-ko   { background: rgba(255,106,106,0.1); border: 1px solid rgba(255,106,106,0.25); color: var(--error); }
.anoms-reset-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.22rem 0.55rem; border-radius: 8px; border: 1px solid rgba(255,255,255,0.12);
  background: transparent; color: var(--muted); font-size: 0.72rem; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.anoms-reset-btn:hover { border-color: rgba(245,196,81,0.4); color: var(--gold); background: rgba(245,196,81,0.06); }

/* Agent page layout — avec sidebar comme admin */
body.agent-page { display: flex; flex-direction: row; align-items: stretch; min-height: 100vh; }
body.agent-page .layout-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

/* Agent sidebar footer user block */
.agent-sidebar-user {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.75rem 1rem; margin-bottom: 0.25rem;
  background: rgba(255,255,255,0.03); border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.07);
}
.agent-sidebar-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold) 0%, #e8a800 100%);
  color: #0B0B0F; font-size: 0.85rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.agent-sidebar-info { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.agent-sidebar-name { font-size: 0.8rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-sidebar-email { font-size: 0.7rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-link-logout { color: var(--error) !important; opacity: 0.8; }
.sidebar-link-logout:hover { opacity: 1; background: rgba(255,106,106,0.08) !important; }

/* ─── Indicateur données topbar agent ──────────────────────────── */
.topbar-data-indicator {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.85rem 0.35rem 0.6rem;
  border-radius: 99px;
  border: 1px solid;
  cursor: default;
  margin-left: auto;
  transition: background 0.2s;
}
.topbar-data-indicator.is-fresh {
  background: rgba(74,222,128,0.06);
  border-color: rgba(74,222,128,0.18);
}
.topbar-data-indicator.is-stale {
  background: rgba(245,158,11,0.06);
  border-color: rgba(245,158,11,0.2);
}
.topbar-data-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.is-fresh .topbar-data-dot {
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74,222,128,0.7);
  animation: dot-pulse 2.5s ease-in-out infinite;
}
.is-stale .topbar-data-dot {
  background: #f59e0b;
  box-shadow: 0 0 5px rgba(245,158,11,0.5);
}
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(74,222,128,0.7); }
  50%       { box-shadow: 0 0 12px rgba(74,222,128,0.9); }
}
.topbar-data-tag {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
}
.is-fresh .topbar-data-tag { background: rgba(74,222,128,0.15); color: #4ade80; }
.is-stale .topbar-data-tag { background: rgba(245,158,11,0.15); color: #f59e0b; }
.topbar-data-period {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
}
.topbar-data-sep {
  font-size: 0.65rem;
  color: var(--muted);
  opacity: 0.5;
}
.topbar-data-time {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 500;
}
@media (max-width: 520px) {
  .topbar-data-indicator { display: none; }
}

/* ─── Agent sidebar collapsed ──────────────────────────────────── */
body.agent-sidebar-collapsed .agent-sidebar { width: 60px; }
body.agent-sidebar-collapsed .agent-sidebar .sidebar-brand-text { opacity: 0; max-width: 0; }
body.agent-sidebar-collapsed .agent-sidebar .sidebar-logo-img { width: 32px; height: 32px; }
body.agent-sidebar-collapsed .agent-sidebar .sidebar-label { opacity: 0; max-width: 0; overflow: hidden; }
body.agent-sidebar-collapsed .agent-sidebar .sidebar-section { opacity: 0; }
body.agent-sidebar-collapsed .agent-sidebar .agent-sidebar-info { opacity: 0; max-width: 0; overflow: hidden; }
body.agent-sidebar-collapsed .agent-sidebar .sidebar-collapse-btn .sidebar-icon { transform: rotate(180deg); }
@media (max-width: 768px) {
  body.agent-sidebar-collapsed .agent-sidebar .sidebar-brand-text,
  body.agent-sidebar-collapsed .agent-sidebar .sidebar-label { opacity: 1; max-width: 160px; }
}

/* ─── Cloche notifications — état avec notifs ─────────────────── */
.notif-bell-btn.has-notif {
  background: rgba(245,196,81,0.1);
  border-color: rgba(245,196,81,0.35);
  color: var(--gold);
  animation: bell-pulse 2.5s ease-in-out infinite;
}
.notif-bell-btn.has-notif svg { filter: drop-shadow(0 0 5px rgba(245,196,81,0.6)); }
@keyframes bell-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,196,81,0.3); }
  50%       { box-shadow: 0 0 0 6px rgba(245,196,81,0); }
}
.notif-badge {
  animation: notif-pop 0.4s cubic-bezier(0.34,1.56,0.64,1);
  font-size: 0.62rem;
  min-width: 18px;
  height: 18px;
  top: -5px; right: -5px;
}
@keyframes badge-ping {
  0%   { transform: scale(1); opacity: 1; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* Agent KPI grid */
.agent-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.agent-kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.agent-kpi-label { font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.agent-kpi-val { font-size: 1.6rem; font-weight: 700; line-height: 1.1; color: var(--text); }
.agent-kpi-sub { font-size: 0.75rem; color: var(--muted); }

/* Agent sections */
.agent-section { padding: 0; overflow: hidden; }
.agent-section-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
  padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--border);
}
.agent-section-title { margin: 0; font-size: 0.95rem; font-weight: 700; }

/* ——— Agent creators cards ——— */
.ac-legend {
  display: flex; align-items: center; gap: 0;
  padding: 0 1.25rem 0.6rem;
}
.ac-legend-group {
  flex: 1; display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
}
.ac-legend-prev { color: var(--muted); }
.ac-legend-arr  { color: rgba(255,255,255,0.2); }
.ac-legend-curr { color: var(--gold); }

.ac-list { display: flex; flex-direction: column; gap: 0.6rem; }
.ac-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: border-color 0.15s;
}
.ac-card:hover { border-color: rgba(245,196,81,0.22); }

/* Identité */
.ac-identity {
  display: flex; align-items: center; gap: 0.75rem;
  width: 200px; flex-shrink: 0;
}
.ac-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(245,196,81,0.2), rgba(245,196,81,0.07));
  border: 1px solid rgba(245,196,81,0.18);
  color: var(--gold); font-size: 0.9rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.ac-name { font-size: 0.88rem; font-weight: 700; color: var(--text); line-height: 1.2; margin-bottom: 0.2rem; }
.ac-bonus-chip {
  display: inline-flex; align-items: center;
  font-size: 0.65rem; font-weight: 600; padding: 0.1rem 0.45rem;
  border-radius: 20px; white-space: nowrap;
}
.ac-bonus-ok   { background: rgba(77,255,136,0.1); border: 1px solid rgba(77,255,136,0.25); color: var(--success); }
.ac-bonus-ko   { background: rgba(255,106,106,0.1); border: 1px solid rgba(255,106,106,0.25); color: var(--error); }
.ac-bonus-wait { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--muted); }

/* Métriques */
.ac-metrics {
  flex: 1; display: flex; gap: 0; min-width: 0;
}
.ac-metric {
  flex: 1; display: flex; align-items: center; gap: 0.6rem;
  padding: 0 1rem; border-left: 1px solid var(--border);
}
.ac-metric:first-child { border-left: none; padding-left: 0; }
.ac-metric-icon { flex-shrink: 0; opacity: 0.35; }
.ac-metric-icon svg { width: 14px; height: 14px; display: block; }
.ac-metric-body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.ac-metric-label { font-size: 0.68rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.ac-metric-vals { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.ac-metric-prev { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ac-metric-arrow { width: 11px; height: 11px; opacity: 0.3; flex-shrink: 0; }
.ac-metric-curr { font-size: 0.95rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ac-metric-diff { font-size: 0.72rem; font-weight: 600; font-variant-numeric: tabular-nums; opacity: 0.85; }

/* ——— Agent graduation cards ——— */
.gcard-list { display: flex; flex-direction: column; gap: 0.65rem; }
.gcard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.25rem 0.75rem;
  transition: border-color 0.15s;
}
.gcard:hover { border-color: rgba(255,255,255,0.18); }
.gcard[data-gf="mature"]  { border-left: 3px solid rgba(77,255,136,0.4); }
.gcard[data-gf="encours"] { border-left: 3px solid rgba(245,196,81,0.3); }

.gcard-main {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 0.85rem;
}
.gcard-identity {
  display: flex; align-items: center; gap: 0.7rem;
  flex: 1; min-width: 0;
}
.gcard-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid; font-size: 0.9rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.gcard-name  { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.gcard-joined{ font-size: 0.72rem; color: var(--muted); margin-top: 0.1rem; }

.gcard-status { flex-shrink: 0; }
.gcard-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.28rem 0.7rem; border-radius: 20px;
  font-size: 0.75rem; font-weight: 700; white-space: nowrap;
}
.gcard-badge-ok   { background: rgba(77,255,136,0.12); border: 1px solid rgba(77,255,136,0.3); color: var(--success); }
.gcard-badge-warn { background: rgba(245,196,81,0.1);  border: 1px solid rgba(245,196,81,0.3); color: var(--gold); }
.gcard-badge-none { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--muted); }

.gcard-stats {
  display: flex; gap: 1rem; flex-shrink: 0;
}
.gcard-stat {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.85rem; font-weight: 600; color: var(--text);
}
.gcard-stat svg { opacity: 0.4; flex-shrink: 0; }

.gcard-diamonds {
  display: flex; flex-direction: column; align-items: flex-end;
  flex-shrink: 0; text-align: right;
}

.gcard-progress {
  display: flex; align-items: center; gap: 0.75rem;
}
.gcard-prog-track {
  flex: 1; height: 5px; background: rgba(255,255,255,0.07);
  border-radius: 3px; overflow: hidden;
}
.gcard-prog-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.gcard-prog-label { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.gcard-prog-pct { font-size: 0.72rem; font-weight: 700; white-space: nowrap; min-width: 32px; text-align: right; }

/* Agent dashboard expand row */
.agent-expand-row td { padding: 0; }
.agent-expand-inner {
  display: flex; gap: 1.5rem; padding: 0.85rem 1.5rem;
  background: rgba(255,255,255,0.02); border-top: 1px solid rgba(255,255,255,0.06);
}
.agent-expand-block { flex: 1; }
.agent-expand-label { font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; display: block; margin-bottom: 0.5rem; }
.agent-expand-stats { display: flex; gap: 1.25rem; }
.agent-expand-stat { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--text); opacity: 0.85; }
.agent-expand-stat svg { opacity: 0.5; flex-shrink: 0; }

/* Save row */
.settings-save-row { padding: 1rem 1.75rem 1.25rem; display: flex; justify-content: flex-end; border-top: 1px solid var(--border); background: rgba(255,255,255,0.01); }
.settings-btn-save { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.5rem; border-radius: 10px; font-size: 0.85rem; font-weight: 700; font-family: inherit; cursor: pointer; transition: all 0.18s; border: 1px solid rgba(245,196,81,0.4); background: rgba(245,196,81,0.1); color: var(--gold); letter-spacing: 0.01em; }
.settings-btn-save:hover { background: rgba(245,196,81,0.18); border-color: rgba(245,196,81,0.65); box-shadow: 0 0 14px rgba(245,196,81,0.12); }

/* ——— Drop zone, login, pct (global) ——— */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
  margin-bottom: 1rem;
}
.drop-zone.dragover { border-color: rgba(245,196,81,0.5); background: rgba(245,196,81,0.06); }
.drop-zone input[type="file"] { display: none; }
.drop-zone .hint { color: var(--muted); font-size: 0.9rem; margin-top: 0.5rem; }

.login-box { max-width: 360px; margin: 3rem auto; }
.login-box h1 { margin-bottom: 1.5rem; font-size: 1.5rem; font-weight: 700; }

/* ══════════════════════════════════════════
   Login page — split layout premium
   ══════════════════════════════════════════ */
body.login-page { background: #080810; }
body.login-page .layout-wrap { min-height: 100vh; display: flex; flex-direction: column; }
body.login-page .main { flex: 1; display: flex; align-items: stretch; padding: 0; max-width: 100%; }

/* ─ Wrapper split ─ */
.lp-wrap { display: flex; width: 100%; min-height: 100vh; }

/* ─ Hero gauche ─ */
.lp-hero {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #0a0a12 0%, #0d0d18 60%, #080810 100%);
  display: flex;
  align-items: center;
  padding: 3rem 3.5rem;
  min-width: 0;
}

/* ── Boutons de tri créateurs ── */
.ac-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.ac-sort-btn:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.ac-sort-btn.ac-sort-active { background: rgba(245,196,81,0.1); color: var(--gold); border-color: rgba(245,196,81,0.3); }

/* ── Creators list (admin) ── */
.cl-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.cl-filter:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.cl-filter-active { background: rgba(245,196,81,0.1) !important; color: var(--gold) !important; border-color: rgba(245,196,81,0.3) !important; }

/* ── Bulle info Points de vie ── */
.hp-info-btn {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  color: #0B0B0F;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  font-family: inherit;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(245,196,81,0.45);
  transition: transform 0.12s, box-shadow 0.15s;
}
.hp-info-btn:hover { transform: scale(1.15); box-shadow: 0 0 14px rgba(245,196,81,0.7); }
.hp-info-bubble {
  display: none;
  position: absolute;
  width: 290px;
  background: #16161f;
  border: 1px solid rgba(245,196,81,0.25);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  z-index: 9999;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(245,196,81,0.08);
}
.hp-info-bubble.open { display: block; animation: bubblePop 0.18s ease-out; }
@keyframes bubblePop {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
.hp-info-bubble p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.65;
  margin: 0 0 0.55rem;
}
.hp-info-bubble p:last-child { margin: 0; }
.hp-info-bubble p strong { color: var(--gold); font-weight: 700; }
.hp-info-arrow {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: #16161f;
  border-right: 1px solid rgba(245,196,81,0.25);
  border-bottom: 1px solid rgba(245,196,81,0.25);
}

/* Couronnes flottantes (login) */
#lp-crowns {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.lp-crown {
  position: absolute;
  pointer-events: none;
  animation: lp-float linear infinite;
  transform: rotate(var(--rot, 0deg));
  filter: none;
}
@keyframes lp-float {
  0%   { transform: rotate(var(--rot, 0deg)) translateY(0px)   translateX(0px); opacity: inherit; }
  25%  { transform: rotate(calc(var(--rot, 0deg) + 8deg))  translateY(-18px)  translateX(var(--drift, 20px)); }
  50%  { transform: rotate(var(--rot, 0deg)) translateY(-30px)  translateX(0px); }
  75%  { transform: rotate(calc(var(--rot, 0deg) - 8deg))  translateY(-18px)  translateX(calc(var(--drift, 20px) * -1)); }
  100% { transform: rotate(var(--rot, 0deg)) translateY(0px)   translateX(0px); }
}

/* Halo arrière-plan */
.lp-hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 65%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(245,196,81,0.055) 0%, transparent 65%);
  pointer-events: none;
}
.lp-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -5%;
  width: 40%;
  height: 45%;
  background: radial-gradient(ellipse at center, rgba(96,165,250,0.03) 0%, transparent 65%);
  pointer-events: none;
}

.lp-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
}

/* Badge pill */
.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245,196,81,0.1);
  border: 1px solid rgba(245,196,81,0.3);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.42rem 1rem;
  border-radius: 99px;
  margin-bottom: 2.25rem;
}

/* ── Animation Streamline shimmer ── */
.lp-sl-char {
  display: inline-block;
  animation: lp-shimmer 4s ease-in-out infinite;
  -webkit-text-fill-color: transparent;
  background: linear-gradient(90deg, #f5c451, #ffe57a, #f5a623);
  -webkit-background-clip: text;
  background-clip: text;
}
@keyframes lp-shimmer {
  0%, 100% { filter: drop-shadow(0 0 0px rgba(245,196,81,0)); }
  50%       { filter: drop-shadow(0 0 12px rgba(245,196,81,0.8)) drop-shadow(0 0 30px rgba(245,196,81,0.35)); }
}

/* Texte cyclique */
.lp-cycle-word {
  display: inline;
}
.lp-cursor {
  display: inline-block;
  color: var(--gold);
  font-weight: 300;
  animation: lp-blink 0.9s step-start infinite;
  margin-left: 2px;
}
@keyframes lp-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Titre massif */
.lp-title {
  font-size: 11rem;
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.05em;
  color: #fff;
  margin: 0 0 1.4rem;
}
.lp-title .lp-title-small {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  display: block;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 0.6rem;
}
.lp-title-accent {
  display: block;
  background: linear-gradient(90deg, #f5c451 0%, #ffe57a 45%, #f5a623 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 28px rgba(245,196,81,0.35));
  line-height: 1.0;
}

/* Sous-ligne */
.lp-tagline {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 1.5rem;
  letter-spacing: -0.02em;
}

/* Description */
.lp-desc {
  font-size: clamp(0.95rem, 1.4vw, 1.08rem);
  color: rgba(255,255,255,0.75);
  line-height: 1.75;
  margin: 0 0 2rem;
  max-width: 440px;
}

/* Features */
.lp-features {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 2.5rem;
}
.lp-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.82);
  font-weight: 500;
}
.lp-feature-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(245,196,81,0.5);
}

/* Stat cards */
.lp-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-top: 2.5rem;
}
.lp-scard {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 1.1rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: border-color 0.2s, background 0.2s;
}
.lp-scard:hover {
  background: rgba(245,196,81,0.05);
  border-color: rgba(245,196,81,0.25);
}
.lp-scard-icon {
  color: var(--gold);
  margin-bottom: 0.5rem;
  opacity: 0.85;
}
.lp-scard-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -0.04em;
  line-height: 1;
}
.lp-scard-plus {
  font-size: 1.2rem;
  font-weight: 800;
  margin-left: 1px;
}
.lp-scard-lbl {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
  margin-top: 0.2rem;
}

/* ─ Côté droit ─ */
.lp-form-side {
  width: clamp(340px, 35%, 460px);
  background: #0e0e18;
  border-left: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(2.5rem, 4vw, 4rem);
  position: relative;
}
/* Légère lueur dorée en haut */
.lp-form-side::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(245,196,81,0.5), transparent);
}

.lp-form-box { width: 100%; max-width: 380px; }

/* Logo */
.lp-form-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em;
  margin-bottom: 2.5rem;
}
.lp-form-logo-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(245,196,81,0.12);
  border: 1px solid rgba(245,196,81,0.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
}

/* Titre formulaire */
.lp-form-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  margin: 0 0 0.3rem;
}
.lp-form-sub {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.3);
  margin: 0 0 1.75rem;
}

/* Alertes */
.lp-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.81rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.lp-alert-err  { background: rgba(248,113,113,0.07); border: 1px solid rgba(248,113,113,0.18); color: #fca5a5; }
.lp-alert-warn { background: rgba(245,196,81,0.07);  border: 1px solid rgba(245,196,81,0.2);  color: var(--gold); }

/* Tabs */
.lp-tabs {
  display: flex;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 2rem;
  width: 100%;
  gap: 0;
}
.lp-tab {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 0.45rem;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.35);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.lp-tab:hover { color: rgba(255,255,255,0.65); }
.lp-tab-active { background: var(--gold); color: #0B0B0F; }
.lp-tab-active svg { stroke: #0B0B0F; }

/* Formulaire */
.lp-form { display: flex; flex-direction: column; gap: 1.1rem; }
.lp-field { display: flex; flex-direction: column; gap: 0.4rem; }
.lp-field span {
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.lp-field input {
  padding: 0.8rem 1rem;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 0.93rem;
  font-family: inherit;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  outline: none;
}
.lp-field input:focus {
  border-color: rgba(245,196,81,0.5);
  background: rgba(245,196,81,0.03);
  box-shadow: 0 0 0 3px rgba(245,196,81,0.08);
}
.lp-field input::placeholder { color: rgba(255,255,255,0.15); }

/* Bouton principal */
.lp-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.25rem;
  margin-top: 0.5rem;
  background: var(--gold);
  color: #0B0B0F;
  border: none;
  border-radius: 11px;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 20px rgba(245,196,81,0.25);
  transition: box-shadow 0.18s, transform 0.12s, opacity 0.15s;
}
.lp-btn-primary:hover { box-shadow: 0 6px 28px rgba(245,196,81,0.38); transform: translateY(-1px); }
.lp-btn-primary:active { transform: none; box-shadow: 0 2px 10px rgba(245,196,81,0.2); }

/* Email pill */
.lp-email-pill {
  display: flex; align-items: center; gap: 0.5rem;
  background: rgba(245,196,81,0.07);
  border: 1px solid rgba(245,196,81,0.2);
  color: var(--gold);
  font-size: 0.83rem; font-weight: 600;
  padding: 0.6rem 0.95rem;
  border-radius: 10px;
}

/* Lien retour */
.lp-back-link {
  display: block; text-align: center;
  font-size: 0.75rem; color: rgba(255,255,255,0.25);
  margin-top: 0.6rem; text-decoration: none;
  transition: color 0.15s;
}
.lp-back-link:hover { color: rgba(255,255,255,0.6); }

/* Hint */
.lp-hint {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.2);
  margin: 0.9rem 0 0;
  text-align: center;
  line-height: 1.5;
}

/* Footer */
.lp-form-footer {
  display: flex; align-items: center; gap: 0.55rem;
  justify-content: center;
  margin-top: 2.5rem;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.18);
  letter-spacing: 0.04em;
}

/* ─ Responsive mobile ─ */
@media (max-width: 820px) {
  .lp-wrap { flex-direction: column; }
  .lp-hero { padding: 3rem 1.5rem 2.5rem; }
  .lp-title { font-size: 3.5rem; }
  .lp-features { display: none; }
  .lp-stats { gap: 1.25rem; }
  .lp-form-side {
    width: 100%;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 2.5rem 1.5rem 3rem;
  }
  .lp-form-side::before { height: 2px; }
}
.btn-discord-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  width: 100%;
  max-width: 320px;
}
.btn-discord-icon { width: 24px; height: 24px; flex-shrink: 0; }

.pct-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.pct-buttons a, .pct-buttons span { padding: 0.45rem 0.85rem; border-radius: 10px; font-size: 0.9rem; font-weight: 500; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.pct-buttons a {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid transparent;
}
.pct-buttons a:hover { background: rgba(245,196,81,0.15); border-color: rgba(245,196,81,0.25); }
.pct-buttons a.active { background: var(--gold); color: #0B0B0F; border-color: var(--gold); }

.upload-result { margin-top: 0.75rem; font-size: 0.9rem; }
.upload-result.ok { color: var(--pos-color); }
.upload-result.err { color: var(--neg-color); }

/* ——— Bonus page ——— */
.bonus-desc { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; max-width: 720px; line-height: 1.5; }

/* Carte contrôles bonus */
.bonus-ctrl-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.25rem 1.5rem; margin-bottom: 1.25rem;
  backdrop-filter: blur(10px); display: flex; flex-direction: column; gap: 0;
}
.bonus-ctrl-row {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.bonus-ctrl-row-actions { gap: 1.25rem; }
.bonus-ctrl-sep {
  border: none; border-top: 1px solid var(--border); margin: 1rem 0;
}
.bonus-ctrl-label {
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted); white-space: nowrap;
  display: block; margin-bottom: 0.45rem;
}
.bonus-ctrl-group { display: flex; flex-direction: column; }
.bonus-ctrl-group-grow { flex: 1 1 auto; min-width: 0; }
.bonus-ctrl-group .bonus-histoire-row { margin-top: 0; }

/* Barre d'info bonus */
.bonus-infobar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.bonus-infobar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.bonus-infobar-icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
  flex-shrink: 0;
}
.bonus-infobar-label {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
}
.bonus-infobar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.bonus-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.bonus-badge svg { width: 11px; height: 11px; flex-shrink: 0; }
.bonus-badge-blue { background: rgba(99,179,237,0.12); color: #63b3ed; border: 1px solid rgba(99,179,237,0.25); }
.bonus-badge-gold { background: rgba(245,196,81,0.12); color: var(--gold); border: 1px solid rgba(245,196,81,0.25); }
.bonus-badge-muted { background: rgba(255,255,255,0.05); color: var(--muted); border: 1px solid var(--border); }
.bonus-sync-hint { display: inline-block; margin-top: 0.35rem; font-size: 0.8rem; color: var(--gold); opacity: 0.9; }

.bonus-hero { margin-bottom: 1.5rem; }

/* Barre de stats bonus */
.bonus-stats-bar {
  display: flex; align-items: center; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 0 0.5rem;
  margin-bottom: 1.25rem; overflow: hidden;
}
.bonus-stat-item {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 0.9rem 1.25rem; gap: 0.2rem; flex: 1 1 auto; min-width: 0;
}
.bonus-stat-item.bonus-stat-main { flex: 1.4 1 auto; }
.bonus-stat-sep {
  width: 1px; height: 2.5rem; background: var(--border); flex-shrink: 0;
}
.bonus-stat-lbl {
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted); white-space: nowrap;
}
.bonus-stat-val {
  font-size: 1.05rem; font-weight: 700; color: var(--text); white-space: nowrap;
}
.bonus-stat-sub { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.bonus-stat-green  { color: #4ade80; }
.bonus-stat-gold   { color: var(--gold); }
.bonus-stat-red    { color: #f87171; }
.bonus-stat-orange { color: #fbbf24; }
.bonus-stat-purple { color: #c4b5fd; }
.bonus-hero-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.bonus-hero-pcts-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
.bonus-hero-pcts-wrap::-webkit-scrollbar { height: 5px; }
.bonus-hero-pcts-wrap::-webkit-scrollbar-track { background: rgba(255,255,255,0.06); border-radius: 3px; }
.bonus-hero-pcts-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
.bonus-hero-pcts {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.bonus-pct {
  flex-shrink: 0;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  background: rgba(0,0,0,0.4);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.15);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.bonus-pct:hover {
  background: rgba(245,196,81,0.15);
  border-color: rgba(245,196,81,0.35);
  color: var(--goldSoft);
}
.bonus-pct.is-active {
  background: var(--gold);
  color: #0B0B0F;
  border-color: var(--gold);
}

.bonus-hero-search {
  flex-shrink: 0;
  min-width: 160px;
  max-width: 200px;
}
.bonus-hero-search .bonus-hero-input {
  width: 100%;
  min-width: 0;
}
.bonus-hero-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.bonus-hero-input::placeholder { color: var(--muted); }
.bonus-hero-input:focus {
  outline: none;
  border-color: rgba(245,196,81,0.5);
  box-shadow: 0 0 0 2px rgba(245,196,81,0.2);
  background: rgba(255,255,255,0.075);
}

.bonus-hero-filters {
  flex: 1 1 auto;
  min-width: 0;
}
.bonus-hero-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.bonus-pill {
  flex-shrink: 0;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.bonus-pill:hover {
  background: rgba(0,0,0,0.5);
  border-color: rgba(245,196,81,0.35);
  color: var(--goldSoft);
}
.bonus-pill.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #0B0B0F;
}

.bonus-hero-histoire .bonus-add-histoire-form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
}
.bonus-hero-histoire .bonus-hero-label { margin-bottom: 0; }
.bonus-histoire-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.bonus-histoire-select {
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  font-size: 0.9rem;
  min-width: 130px;
}
.btn-histoire {
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  background: var(--gold);
  color: #0B0B0F;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 0.88rem;
  white-space: nowrap;
}

.bonus-hero-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}
@media (min-width: 900px) {
  .bonus-hero-summary {
    grid-template-columns: 1.15fr repeat(6, minmax(120px, 1fr));
    gap: 1rem 1.25rem;
  }
}
@media (max-width: 640px) {
  .bonus-hero-summary { grid-template-columns: 1fr; }
}
.bonus-hero-stat {
  padding: 1rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  backdrop-filter: blur(10px);
  min-height: 0;
}
.bonus-hero-stat-main {
  grid-column: span 1;
}
@media (min-width: 900px) {
  .bonus-hero-stat-main { grid-column: 1; }
}
.bonus-hero-stat-main .bonus-hero-stat-value {
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}
.bonus-hero-stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.bonus-hero-stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.bonus-hero-stat-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.1rem;
  line-height: 1.3;
}
.bonus-hero-stat-pieces { color: var(--gold); }
.bonus-hero-stat-envoye { border-color: rgba(77,255,136,0.35); background: rgba(77,255,136,0.06); }
.bonus-hero-stat-envoye .bonus-hero-stat-value { color: var(--pos-color); }
.bonus-hero-stat-non-envoye { border-color: rgba(255,106,106,0.3); background: rgba(255,106,106,0.06); }
.bonus-hero-stat-non-envoye .bonus-hero-stat-value { color: #ff8a8e; }
.bonus-hero-stat-economie { border-color: rgba(245,196,81,0.35); background: rgba(245,196,81,0.08); }
.bonus-hero-stat-economie .bonus-hero-stat-value { color: var(--gold); }
.bonus-hero-stat-pas-bonus { border-color: rgba(167,139,250,0.35); background: rgba(167,139,250,0.08); }
.bonus-hero-stat-pas-bonus .bonus-hero-stat-value { color: #c4b5fd; }
.bonus-hero-stat-debt { border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.1); }
.bonus-hero-stat-debt .bonus-hero-stat-value { color: #fbbf24; }
.bonus-hero-stat-to-send { border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.08); }
.bonus-hero-stat-to-send .bonus-hero-stat-value { color: #22c55e; }

.bonus-table-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  backdrop-filter: blur(10px);
}
.bonus-table-scroll { overflow-x: auto; }
.bonus-table { width: 100%; border-collapse: collapse; min-width: 900px; table-layout: fixed; }
.page-bonus .bonus-table { table-layout: auto; min-width: 0; }
.bonus-table thead { position: sticky; top: 0; z-index: 2; background: rgba(0,0,0,0.4); box-shadow: 0 1px 0 var(--border); }
.bonus-table th {
  padding: 0.75rem 0.85rem; font-size: 0.78rem; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em; text-align: left; white-space: nowrap;
}
.bonus-table td { padding: 0.6rem 0.85rem; font-size: 0.9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.bonus-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.bonus-table tbody tr.bonus-tr-valid:hover   { background: rgba(74,222,128,0.07); }
.bonus-table tbody tr.bonus-tr-invalid:hover { background: rgba(248,113,113,0.07); }
.bonus-table tbody tr.bonus-tr-envoye:hover  { background: rgba(34,197,94,0.22); }
.bonus-table tbody tr.bonus-tr-attente:hover { background: rgba(96,165,250,0.07); }
.bonus-table tbody tr.bonus-tr-non:hover     { background: rgba(167,139,250,0.07); }
.bonus-table tbody tr:last-child td { border-bottom: none; }

.bonus-th-creator { min-width: 120px; }
/* Agent bonus : fige la colonne créateur pour éviter le décalage */
.agent-page .bonus-table { table-layout: fixed; min-width: 700px; }
.agent-page .bonus-th-creator { width: 200px; }
.agent-page .bonus-td-creator {
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.agent-page .bonus-th-status { width: 110px; }
.agent-page .bonus-th-total, .agent-page .bonus-th-to-send,
.agent-page .bonus-th-num   { width: 100px; }
.bonus-th-num, .bonus-td-num { text-align: right; white-space: nowrap; }
.bonus-th-total, .bonus-td-total { text-align: right; font-weight: 700; color: var(--muted); }
.bonus-th-to-send, .bonus-td-to-send { text-align: right; background: rgba(245,196,81,0.12); color: var(--gold); font-weight: 700; }
.bonus-th-to-send { background: rgba(245,196,81,0.18); color: var(--gold) !important; }
.bonus-td-to-send { background: rgba(245,196,81,0.1); }
.bonus-td-debt .bonus-inline-input { max-width: 90px; }
.bonus-td-creator { font-weight: 600; }
.bonus-td-manque { color: var(--muted); font-size: 0.85rem; }

.bonus-inline-form { margin: 0; display: block; }
.bonus-inline-input {
  width: 100%; min-width: 0; padding: 0.4rem 0.5rem; border-radius: 8px; font-size: 0.85rem; font-family: inherit;
  border: 1px solid var(--border); background: rgba(255,255,255,0.06); color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.bonus-inline-input:focus {
  outline: none; border-color: rgba(245,196,81,0.5); box-shadow: 0 0 0 2px rgba(245,196,81,0.15);
}
.bonus-input-num { width: 5rem; text-align: right; }

.bonus-td-status { min-width: 140px; width: 140px; }
.page-bonus .bonus-td-status { width: auto; }
.bonus-status-form { display: block; margin: 0; }
.bonus-status-select {
  width: 100%;
  min-width: 120px;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 1.75rem;
}
.bonus-status-select:hover { border-color: rgba(245,196,81,0.4); }
.bonus-status-select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(245,196,81,0.2); }
.bonus-status-select:disabled { opacity: 0.7; cursor: wait; }
.bonus-status-btns { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.btn-status {
  padding: 0.35rem 0.6rem; border: none; border-radius: 8px; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: opacity 0.2s, filter 0.2s, box-shadow 0.2s;
}
.btn-status:hover { opacity: 0.95; filter: brightness(1.1); }
.btn-status.is-active { box-shadow: 0 0 0 2px rgba(255,255,255,0.5); }
.btn-pas-valide { background: rgba(255,106,106,0.25); color: #ff8a8e; }
.btn-pas-valide:hover { background: var(--error); color: #fff; }
.btn-pas-valide.is-active { background: var(--error); color: #fff; }
.btn-valide { background: rgba(134,239,172,0.35); color: #86efac; }
.btn-valide:hover { background: rgba(134,239,172,0.55); color: #0B0B0F; }
.btn-valide.is-active { background: rgba(134,239,172,0.6); color: #0B0B0F; }
.btn-envoye { background: rgba(22,101,52,0.5); color: #86efac; }
.btn-envoye:hover { background: rgba(22,101,52,0.75); color: #fff; }
.btn-envoye.is-active { background: #166534; color: #fff; }
.btn-attente { background: rgba(74,184,255,0.25); color: #7dd3fc; }
.btn-attente:hover { background: #4AB8FF; color: #0B0B0F; }
.btn-attente.is-active { background: #4AB8FF; color: #0B0B0F; }
.btn-pas-bonus { background: rgba(167,139,250,0.25); color: #c4b5fd; }
.btn-pas-bonus:hover { background: #a78bfa; color: #fff; }
.btn-pas-bonus.is-active { background: #a78bfa; color: #fff; }

.bonus-tr-valid   { border-left: 3px solid #4ade80; }
.bonus-tr-invalid { border-left: 3px solid #f87171; }

/* ——— Expand row ——— */
.bonus-row { transition: background 0.15s; }
.bonus-row-expanded { background: rgba(245,196,81,0.04) !important; }
.bonus-expand-row .bonus-expand-td { padding: 0; border-bottom: 1px solid var(--border); }
.bonus-expand-inner { display: flex; align-items: stretch; gap: 0; padding: 0.9rem 1.25rem; background: rgba(255,255,255,0.02); }
.bonus-expand-col { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.bonus-expand-label { font-size: 0.68rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
.bonus-expand-stats { display: flex; gap: 1rem; flex-wrap: wrap; }
.bonus-expand-stat { display: flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.75rem; border-radius: 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); }
.bonus-expand-stat.is-ok  { background: rgba(74,222,128,0.08); border-color: rgba(74,222,128,0.25); }
.bonus-expand-stat.is-ko  { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.25); }
.bonus-expand-stat.is-neutral { background: rgba(255,255,255,0.04); border-color: var(--border); }
.bonus-expand-icon { font-size: 0.85rem; }
.bonus-expand-val { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.bonus-expand-stat.is-ok  .bonus-expand-val { color: #4ade80; }
.bonus-expand-stat.is-ko  .bonus-expand-val { color: #f87171; }
.bonus-expand-req { font-size: 0.72rem; color: var(--muted); }
.bonus-expand-sep { width: 1px; background: var(--border); margin: 0 1.25rem; flex-shrink: 0; }
.bonus-tr-envoye   { border-left: 3px solid #22c55e; background: rgba(34,197,94,0.14); }
.bonus-tr-attente  { border-left: 3px solid #60a5fa; }
.bonus-tr-non      { border-left: 3px solid #a78bfa; }
.bonus-tr-virement { border-left: 3px solid #6366f1; background: rgba(99,102,241,0.07); }
.bonus-tr-valid:hover    { background: rgba(74,222,128,0.07); }
.bonus-tr-invalid:hover  { background: rgba(248,113,113,0.07); }
.bonus-tr-envoye:hover   { background: rgba(34,197,94,0.1); }
.bonus-tr-attente:hover  { background: rgba(96,165,250,0.07); }
.bonus-tr-non:hover      { background: rgba(167,139,250,0.07); }
.bonus-tr-virement:hover { background: rgba(99,102,241,0.11); }

/* Point de statut dans colonne créateur */
.bonus-status-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 0.5rem; flex-shrink: 0; vertical-align: middle;
}
.bonus-dot-validé       { background: #4ade80; box-shadow: 0 0 5px rgba(74,222,128,0.6); }
.bonus-dot-envoyé       { background: #22c55e; box-shadow: 0 0 5px rgba(34,197,94,0.6); }
.bonus-dot-en_attente   { background: #60a5fa; box-shadow: 0 0 5px rgba(96,165,250,0.5); }
.bonus-dot-pas_de_bonus { background: #a78bfa; box-shadow: 0 0 5px rgba(167,139,250,0.5); }
.bonus-dot-pas_validé   { background: #f87171; box-shadow: 0 0 5px rgba(248,113,113,0.5); }
.bonus-dot-virement     { background: #818cf8; box-shadow: 0 0 5px rgba(129,140,248,0.6); }

/* ——— Historique liste ——— */
.histo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.histo-card {
  position: relative;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; transition: border-color 0.2s, background 0.2s;
}
.histo-card:hover { border-color: rgba(245,196,81,0.4); background: rgba(255,255,255,0.07); }
.histo-card-link {
  display: block; padding: 1.25rem 1.25rem 1rem; text-decoration: none; color: inherit;
}
.histo-card-month {
  font-size: 1.15rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem;
}
.histo-card-date {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.78rem; color: var(--muted); margin-bottom: 0.75rem;
}
.histo-card-date svg { width: 12px; height: 12px; flex-shrink: 0; }
.histo-card-arrow {
  font-size: 0.8rem; font-weight: 600; color: var(--gold); opacity: 0.85;
}
.histo-card:hover .histo-card-arrow { opacity: 1; }
.histo-delete-form { margin: 0; }
.histo-delete-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 0.55rem; border: none; border-top: 1px solid var(--border);
  background: transparent; cursor: pointer; color: var(--muted); transition: background 0.15s, color 0.15s;
}
.histo-delete-btn svg { width: 14px; height: 14px; }
.histo-delete-btn:hover { background: rgba(248,113,113,0.1); color: #f87171; }

/* ——— Historique détail ——— */
.histo-back {
  font-size: 0.82rem; color: var(--muted); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.3rem; margin-bottom: 0.2rem;
  transition: color 0.15s;
}
.histo-back:hover { color: var(--text); }
.val-badge-nok      { background: rgba(248,113,113,0.12); color: #f87171;  border: 1px solid rgba(248,113,113,0.3); }
.val-badge-bonus    { background: rgba(167,139,250,0.12); color: #c4b5fd;  border: 1px solid rgba(167,139,250,0.3); }
.val-badge-virement { background: rgba(129,140,248,0.12); color: #818cf8;  border: 1px solid rgba(129,140,248,0.3); }

/* ——— Graduation ——— */
.grad-month-wrap {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.3rem 0.65rem; cursor: pointer; color: var(--muted);
}
.grad-month-input {
  background: transparent; border: none; color: var(--text); font-size: 0.83rem;
  font-family: inherit; cursor: pointer; outline: none; padding: 0;
}
.grad-month-input::-webkit-calendar-picker-indicator { filter: invert(0.6); cursor: pointer; }

.grad-mgr-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem; margin-bottom: 1.25rem;
}
.grad-mgr-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.35rem;
  transition: border-color 0.2s;
}
.grad-mgr-card:hover { border-color: rgba(245,196,81,0.3); }
.grad-mgr-name { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.grad-mgr-stats { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.grad-mgr-stats span { font-size: 0.72rem; color: var(--muted); }
.grad-mgr-rate { font-size: 1.1rem; font-weight: 700; margin-top: 0.15rem; }

.grad-prog-wrap { display: flex; align-items: center; gap: 0.6rem; min-width: 160px; }
.grad-prog-bar {
  flex: 1; height: 5px; background: rgba(255,255,255,0.08);
  border-radius: 3px; overflow: hidden;
}
.grad-prog-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.grad-prog-label { font-size: 0.75rem; white-space: nowrap; min-width: 80px; }

/* ——— Imports ——— */
.imports-desc { color: var(--muted); margin-bottom: 1.5rem; font-size: 0.95rem; max-width: 560px; }
/* ——— Import page ——— */
.import-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 720px) { .import-grid { grid-template-columns: 1fr; } }

/* Nouvelle carte import */
.icard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  transition: border-color 0.2s;
}
.icard:hover { border-color: rgba(255,255,255,0.14); }
.icard-top { padding: 1.1rem 1.25rem 0.9rem; }

/* Badge */
.icard-badge {
  font-size: 0.68rem; font-weight: 700; padding: 0.2rem 0.55rem;
  border-radius: 99px; white-space: nowrap; flex-shrink: 0;
}
.icard-badge-prev { background: rgba(245,196,81,0.1); color: var(--gold); border: 1px solid rgba(245,196,81,0.25); }
.icard-badge-curr { background: rgba(74,222,128,0.08); color: var(--success); border: 1px solid rgba(74,222,128,0.2); }

/* Badge période de la BDD */
.icard-period-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.03em;
  padding: 0.28rem 0.7rem; border-radius: 99px; margin-bottom: 0.45rem;
  background: rgba(245,196,81,0.1); color: var(--gold);
  border: 1px solid rgba(245,196,81,0.3);
}
.icard-period-badge-curr {
  background: rgba(74,222,128,0.08); color: var(--success);
  border: 1px solid rgba(74,222,128,0.25);
}

/* Zone de dépôt */
.icard-deposit { min-height: 2.2rem; }
.icard-empty {
  display: flex; align-items: center; gap: 0.4rem;
  color: var(--muted); font-size: 0.8rem; padding: 0.3rem 0;
}
.icard-file {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem;
  padding: 0.45rem 0.65rem; background: rgba(74,222,128,0.05);
  border: 1px solid rgba(74,222,128,0.18); border-radius: 10px;
  font-size: 0.82rem;
}
.icard-file-name { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.icard-file-meta { font-size: 0.72rem; color: var(--success); font-weight: 600; }
.icard-file-label { font-size: 0.72rem; color: var(--muted); }
.icard-del-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  margin-left: auto; background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2); color: #f87171;
  border-radius: 7px; padding: 0.22rem 0.55rem; font-size: 0.72rem;
  font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.icard-del-btn:hover { background: rgba(239,68,68,0.16); border-color: rgba(239,68,68,0.4); }

/* Drop zone */
.icard-dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1.4rem 1rem;
  background: rgba(255,255,255,0.02);
  border-top: 1px dashed rgba(255,255,255,0.1);
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.icard-dropzone:hover { background: rgba(245,196,81,0.03); border-color: rgba(245,196,81,0.25); }
.icard-dropzone.dragover { background: rgba(245,196,81,0.06); border-color: rgba(245,196,81,0.45); }
.icard-dropzone input[type="file"] { display: none; }
.icard-drop-text { font-size: 0.8rem; color: var(--muted); }

/* Input libellé */
.icard-label-input {
  width: 100%; max-width: 100%;
  padding: 0.5rem 0.9rem;
  border: none; border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03); color: var(--text);
  font-size: 0.82rem; font-family: inherit;
}
.icard-label-input:focus { outline: none; background: rgba(245,196,81,0.04); border-top-color: rgba(245,196,81,0.3); }
.icard-label-input::placeholder { color: rgba(255,255,255,0.22); }

/* Résultat upload */
.icard-result { min-height: 0; font-size: 0.8rem; padding: 0 1.25rem 0.6rem; margin-top: 0.25rem; }
.icard-result.ok  { color: var(--success); }
.icard-result.err { color: var(--neg-color); }

/* Preview table graduation */
.graduation-preview-table { width: 100%; font-size: 0.78rem; border-collapse: collapse; }
.graduation-preview-table th { color: var(--muted); font-weight: 600; text-align: left; padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--border); }
.graduation-preview-table td { padding: 0.3rem 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.04); }
.graduation-errors { font-size: 0.78rem; color: var(--neg-color); background: rgba(0,0,0,0.2); padding: 0.5rem 0.75rem; border-radius: 8px; white-space: pre-wrap; max-height: 100px; overflow-y: auto; }

/* Compatibilité anciennes classes */
.import-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.import-card-badge { font-size: 0.75rem; padding: 0.2rem 0.5rem; border-radius: 8px; background: rgba(245,196,81,0.15); color: var(--gold); font-weight: 600; }
.import-label-input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid rgba(255,255,255,0.14); border-radius: 12px; background: rgba(255,255,255,0.06); color: var(--text); font-size: 0.9rem; font-family: inherit; }
.import-label-input:focus { outline: none; border-color: rgba(245,196,81,0.5); }
.upload-result { margin-top: 0.75rem; font-size: 0.9rem; }
.upload-result.ok { color: var(--pos-color); }
.upload-result.err { color: var(--neg-color); }

/* ——— Dashboard ——— */
.page-dashboard .main { padding-bottom: 2rem; }
/* ——— Dashboard ——— */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}
.dash-header-left { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.dash-title { font-size: 1.5rem; font-weight: 700; color: var(--text); margin: 0; letter-spacing: -0.02em; }
.dash-header-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.dash-header-meta svg { width: 13px; height: 13px; }
.dash-badge-warn {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  background: rgba(245,196,81,0.15);
  color: var(--gold);
  border-radius: 4px;
  border: 1px solid rgba(245,196,81,0.3);
}
.dash-empty {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.dash-empty svg { width: 18px; height: 18px; flex-shrink: 0; }
.dash-empty a { color: var(--gold); }

/* KPI Cards */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.dash-kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  transition: transform 0.18s, border-color 0.18s;
}
.dash-kpi:hover { transform: translateY(-2px); }
.dash-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dash-kpi-icon svg { width: 18px; height: 18px; }
.dash-kpi-body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.dash-kpi-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.dash-kpi-value { font-size: 1.55rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.dash-kpi-unit { font-size: 1rem; font-weight: 600; }
.dash-kpi-sub { font-size: 0.75rem; color: var(--muted); }
.dash-kpi-pct { font-weight: 700; }
.dash-kpi-gold { border-color: rgba(245,196,81,0.3); background: rgba(245,196,81,0.04); }
.dash-kpi-gold .dash-kpi-icon { background: rgba(245,196,81,0.15); color: var(--gold); }
.dash-kpi-gold .dash-kpi-value { color: var(--gold); }
.dash-kpi-green .dash-kpi-icon { background: rgba(77,255,136,0.12); color: var(--pos-color); }
.dash-kpi-green .dash-kpi-value { color: var(--pos-color); }
.dash-kpi-green .dash-kpi-pct { color: var(--pos-color); }
.dash-kpi-purple .dash-kpi-icon { background: rgba(167,139,250,0.15); color: #a78bfa; }
.dash-kpi-purple .dash-kpi-value { color: #a78bfa; }
.dash-kpi-blue .dash-kpi-icon { background: rgba(99,179,237,0.12); color: #63b3ed; }
.dash-kpi-blue .dash-kpi-value { color: #63b3ed; }

/* Agents panels */
.dash-agents-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.dash-agents-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
}
.dash-agents-panel-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}
.dash-agents-panel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dash-dot-green { background: var(--pos-color); box-shadow: 0 0 6px var(--pos-color); }
.dash-dot-red { background: var(--neg-color); box-shadow: 0 0 6px var(--neg-color); }
.dash-dot-purple { background: #a78bfa; box-shadow: 0 0 6px #a78bfa; }
.dash-dot-muted { background: var(--muted); }
.dash-agents-panel-title { font-size: 0.85rem; font-weight: 600; color: var(--text); margin: 0; flex: 1; }
.dash-agents-panel-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dash-agents-list { list-style: none; margin: 0; padding: 0; }
.dash-agents-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dash-agents-item:last-child { border-bottom: none; }
.dash-agents-rank { font-size: 0.72rem; font-weight: 700; color: rgba(179,183,192,0.5); min-width: 1.8rem; }
.dash-agents-name { flex: 1; font-size: 0.85rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-agents-evol { font-size: 0.82rem; font-weight: 700; white-space: nowrap; text-align: right; }
.dash-agents-evol em { font-style: normal; font-weight: 400; font-size: 0.75rem; opacity: 0.7; margin-left: 0.2rem; }
.dash-evol-up { color: var(--pos-color); }
.dash-evol-down { color: var(--neg-color); }
.dash-evol-neutral { color: var(--muted); }
.dash-agents-empty { font-size: 0.8rem; color: var(--muted); margin: 0; padding: 0.5rem 0; }

/* Legacy compat */
.dashboard-alert { margin-bottom: 1rem; }
.dashboard-meta { margin-bottom: 1rem; }
.dashboard-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.dashboard-label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.dashboard-value { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.dashboard-pieces { color: var(--gold); }
.dashboard-paye { color: var(--success); }
.dashboard-inline-stats { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 1rem; }

/* ——— Historique ——— */
.historique-save-form { margin-bottom: 1.5rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; }
.historique-save-label { font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.historique-save-select { padding: 0.5rem 0.75rem; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 1rem; min-width: 180px; }
.historique-list { margin-top: 1rem; }
.historique-ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.historique-item { margin: 0; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.historique-link {
  flex: 1; min-width: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  text-decoration: none; color: var(--text); transition: border-color 0.2s, background 0.2s;
}
.historique-link:hover { border-color: rgba(245,196,81,0.4); background: rgba(255,255,255,0.08); }
.historique-delete-form { flex-shrink: 0; margin: 0; }
.historique-delete-form .btn { min-height: 36px; padding: 0.4rem 0.75rem; font-size: 0.85rem; }
.historique-label { font-weight: 600; font-size: 1.1rem; }
.historique-meta { font-size: 0.9rem; color: var(--muted); }
.historique-table-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  margin-top: 1rem; backdrop-filter: blur(10px);
}
.historique-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.historique-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.historique-table thead { background: rgba(0,0,0,0.4); }
.historique-table th {
  padding: 0.75rem 0.85rem; font-size: 0.78rem; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em; text-align: left;
}
.historique-table td { padding: 0.6rem 0.85rem; font-size: 0.9rem; border-bottom: 1px solid var(--border); }
.historique-table tbody tr:last-child td { border-bottom: none; }
.historique-th-creator { min-width: 120px; }
.historique-th-num, .historique-td-num { text-align: right; }
.historique-th-total, .historique-td-total { text-align: right; background: rgba(245,196,81,0.08); color: var(--gold); font-weight: 700; }
.historique-th-total { background: rgba(245,196,81,0.12); color: var(--gold) !important; }
.historique-td-creator { font-weight: 600; }
.historique-td-manque { color: var(--muted); font-size: 0.85rem; }
.historique-status-badge {
  display: inline-block; padding: 0.25rem 0.5rem; border-radius: 6px; font-size: 0.8rem; font-weight: 600;
}
.historique-row.bonus-tr-valid .historique-status-badge { background: rgba(134,239,172,0.4); color: #166534; }
.historique-row.bonus-tr-invalid .historique-status-badge { background: rgba(255,106,106,0.25); color: #ff8a8e; }
.historique-row.bonus-tr-envoye .historique-status-badge { background: rgba(22,101,52,0.5); color: #86efac; }
.historique-row.bonus-tr-attente .historique-status-badge { background: rgba(74,184,255,0.25); color: #7dd3fc; }
.historique-row.bonus-tr-non .historique-status-badge { background: rgba(167,139,250,0.25); color: #c4b5fd; }
.historique-empty { text-align: center; color: var(--muted); padding: 1.5rem !important; }

/* ——— Responsive / Mobile ——— */
@media (max-width: 768px) {
  .nav {
    flex-wrap: nowrap;
    padding: 0.6rem 1rem;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    z-index: 10000;
  }
  .nav-toggle { display: flex; }
  .nav-links-desktop { display: none; }
  .nav-drawer {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 85vw);
    max-width: 320px;
    background: var(--bg2);
    border-right: 1px solid var(--border);
    box-shadow: 4px 0 24px rgba(0,0,0,0.35);
    z-index: 100002;
    transform: translateX(-100%);
    transition: transform 0.25s ease-out;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-drawer.is-open {
    transform: translateX(0);
  }
  .nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--card);
  }
  .nav-drawer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
  }
  .nav-drawer-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
  }
  .nav-drawer-close:hover { background: rgba(255,255,255,0.1); }
  .nav-drawer-links {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    gap: 0.25rem;
  }
  .nav-drawer-links a {
    color: var(--muted);
    padding: 0.85rem 1rem;
    font-size: 1rem;
    min-height: 48px;
    display: flex;
    align-items: center;
    border-radius: 12px;
    transition: color 0.2s, background 0.2s;
  }
  .nav-drawer-links a:hover {
    color: var(--text);
    background: rgba(255,255,255,0.05);
  }
  .brand { font-size: 1.1rem; }

  .main { padding: 1rem; padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
  .page-bonus .main { padding: 1rem; padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
  .main h1 { font-size: 1.3rem; margin-bottom: 0.75rem; }

  .bonus-desc { font-size: 0.85rem; margin-bottom: 1rem; }
  .bonus-sync-hint { display: block; margin-top: 0.5rem; }

  .bonus-ctrl-card { padding: 1rem; }
  .bonus-ctrl-row-actions { flex-direction: column; align-items: stretch; gap: 1rem; }
  .bonus-hero-input { max-width: none; width: 100%; }
  .bonus-hero-pcts-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .bonus-hero-filter-pills { flex-wrap: wrap; }

  .bonus-hero-summary { gap: 1rem; }
  .bonus-hero-stat { padding: 0.85rem 1rem; }
  .bonus-hero-stat-value { font-size: 1.25rem; }
  .bonus-hero-stat-main .bonus-hero-stat-value { font-size: 1.4rem; }

  .bonus-table-card { margin-left: 0; margin-right: 0; }
  .bonus-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 0;
    border-radius: 12px;
  }
  .bonus-table { min-width: 780px; font-size: 0.85rem; }
  .bonus-table th, .bonus-table td { padding: 0.5rem 0.6rem; font-size: 0.82rem; }
  .bonus-td-status { min-width: 140px; }
  .bonus-status-select { min-width: 110px; }
  .bonus-status-btns {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
  }
  .bonus-status-form { display: block; margin: 0; }
  .bonus-status-form .btn-status {
    min-width: 4.2em;
    min-height: 44px;
    padding: 0.5rem 0.6rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }
  .bonus-inline-input { min-height: 44px; }
  .bonus-input-num { width: 4.5rem; }

  .table-wrap {
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-wrap table { min-width: 640px; font-size: 0.85rem; }
  .table-wrap th, .table-wrap td { padding: 0.55rem 0.65rem; white-space: nowrap; }
  .table-wrap td:first-child { white-space: normal; }

  .pct-buttons { flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
  .pct-buttons a, .pct-buttons span { min-height: 44px; padding: 0.5rem 0.75rem; font-size: 0.9rem; }

  .import-grid { grid-template-columns: 1fr; gap: 1rem; }
  .import-card { padding: 1rem; }
  .dashboard-stats { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .dashboard-value { font-size: 1.3rem; }
  .dashboard-inline-stats { gap: 1rem; }
  .dash-kpi-grid { grid-template-columns: 1fr 1fr; }
  .dash-agents-grid { grid-template-columns: 1fr; }
  .card { padding: 1rem; }
  .form-group input, .input { max-width: none; }
  .login-box { margin: 2rem 1rem; padding: 0 0.5rem; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .nav { padding: 0.5rem 0.75rem; }
  .brand { font-size: 1rem; }
  .nav-links a,
.nav-links-desktop a { padding: 0.65rem 1rem; font-size: 0.9rem; min-height: 48px; }

  .main { padding: 0.75rem; }
  .page-bonus .main { padding: 0.75rem; }
  .main h1 { font-size: 1.2rem; }

  .bonus-ctrl-card { padding: 0.75rem 1rem; }
  .bonus-pct { padding: 0.45rem 0.65rem; font-size: 0.82rem; min-height: 44px; }
  .bonus-pill { padding: 0.45rem 0.6rem; font-size: 0.8rem; min-height: 44px; }

  .bonus-hero-summary { grid-template-columns: 1fr; gap: 0.75rem; }
  .bonus-hero-stat { padding: 0.75rem; }
  .bonus-hero-stat-value { font-size: 1.2rem; }

  .bonus-table-card { margin-left: 0; margin-right: 0; }
  .bonus-table-scroll { margin: 0; padding: 0; }
  .bonus-table { min-width: 700px; }
  .bonus-table th { font-size: 0.75rem; padding: 0.45rem 0.5rem; }
  .bonus-table td { font-size: 0.8rem; padding: 0.45rem 0.5rem; }
  .bonus-td-status { min-width: 130px; }
  .bonus-status-select { padding: 0.5rem 0.55rem; font-size: 0.8rem; min-width: 100px; }

  .table-wrap { margin-left: 0; margin-right: 0; padding: 0; }
  .table-wrap table { min-width: 600px; font-size: 0.8rem; }
  .table-wrap th, .table-wrap td { padding: 0.5rem 0.55rem; }

  .dashboard-stats { grid-template-columns: 1fr; gap: 0.5rem; }
  .dashboard-value { font-size: 1.25rem; }
  .btn { min-height: 48px; padding: 0.6rem 1rem; font-size: 15px; }
  .drop-zone { padding: 1.25rem; }
  .flash-error, .flash-success { padding: 0.5rem 0.75rem; font-size: 0.85rem; }
}

/* ——— graduation créateur ——— */
.page-graduation .main { padding-bottom: 2rem; }
.graduation-hero {
  margin-bottom: 1.5rem;
  text-align: center;
  padding: 1.5rem 2rem;
  border: 1px solid rgba(245,196,81,0.3);
  background: rgba(245,196,81,0.06);
}
.graduation-hero-value { font-size: 2.5rem; font-weight: 700; color: var(--gold); line-height: 1.2; }
.graduation-hero-label { font-size: 1rem; font-weight: 600; color: var(--text); margin-top: 0.25rem; }
.graduation-hero-detail { font-size: 0.9rem; margin-top: 0.35rem; }
.graduation-section { margin-bottom: 1.5rem; }
.graduation-progress-cell { max-width: 180px; min-width: 120px; }
.graduation-progress-wrap { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.graduation-progress-bar { width: 100%; height: 10px; background: rgba(255,255,255,0.1); border-radius: 5px; overflow: hidden; flex-shrink: 0; }
.graduation-progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--pos-color)); border-radius: 5px; transition: width 0.2s ease; }
.graduation-progress-label { font-size: 0.75rem; color: var(--muted); word-break: break-word; overflow-wrap: break-word; max-width: 100%; }
.graduation-table td.graduation-missing { color: var(--neg-color); font-weight: 600; }
.graduation-subtitle { margin: 0 0 0.75rem 0; font-size: 1rem; color: var(--muted); font-weight: 600; }
.graduation-month-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.graduation-month-row .input { max-width: 180px; }
.graduation-import-desc { font-size: 0.9rem; margin-bottom: 0.75rem; }
.graduation-drop-wrap { margin-bottom: 1rem; }
.graduation-drop-zone { min-height: 120px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.graduation-drop-zone .drop-zone-text { font-size: 1rem; }
.graduation-import-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.graduation-import-actions .btn { margin: 0; }
.graduation-file-name { font-size: 0.9rem; margin-left: 0.25rem; }
.graduation-import-form .btn { margin-top: 0; }
.graduation-summary { margin-top: 0.75rem; }
.graduation-preview { margin-top: 1rem; overflow-x: auto; }
.graduation-preview-table { font-size: 0.85rem; width: 100%; border-collapse: collapse; }
.graduation-preview-table th, .graduation-preview-table td { padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--border); }
.graduation-errors { font-size: 0.8rem; color: var(--neg-color); background: rgba(0,0,0,0.2); padding: 0.5rem; border-radius: 8px; margin-top: 0.5rem; white-space: pre-wrap; max-height: 120px; overflow-y: auto; }
.graduation-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
.graduation-kpi-card { padding: 1rem; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); }
.graduation-kpi-card.graduation-kpi-rate { border-color: rgba(245,196,81,0.35); background: rgba(245,196,81,0.08); }
.graduation-kpi-label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.35rem; }
.graduation-kpi-value { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.graduation-kpi-rate .graduation-kpi-value { color: var(--gold); }
.graduation-by-manager { margin-top: 1.25rem; }
.graduation-by-manager-title { font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.75rem; }
.graduation-manager-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; }
.graduation-manager-card { background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 12px; padding: 0.85rem 1rem; }
.graduation-manager-card-name { font-weight: 600; color: var(--text); margin-bottom: 0.4rem; font-size: 0.95rem; }
.graduation-manager-card-stats { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; font-size: 0.85rem; color: var(--muted); }
.graduation-manager-card-stats span { display: inline-flex; align-items: center; gap: 0.25rem; }
.graduation-manager-card-rate { margin-top: 0.5rem; font-size: 1rem; font-weight: 700; color: var(--gold); }
.graduation-legend { margin: 0.75rem 0 0 0; font-size: 0.85rem; max-width: 720px; line-height: 1.4; }
.graduation-manager-list { margin: 0.35rem 0 0 0; padding-left: 1.25rem; font-size: 0.9rem; color: var(--muted); }
.graduation-filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1rem; }
.graduation-check { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.graduation-table { width: 100%; min-width: 900px; }
.graduation-table th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; }
.graduation-badge { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 8px; font-size: 0.75rem; font-weight: 600; }
.graduation-badge-mature { background: rgba(77,255,136,0.2); color: var(--pos-color); }
.graduation-badge-evaluated { background: rgba(77,255,136,0.25); color: var(--pos-color); }
.graduation-badge-gradue { background: rgba(77,255,136,0.25); color: var(--pos-color); }
.graduation-badge-non-gradue { background: rgba(255,106,106,0.2); color: var(--neg-color); }
.graduation-badge-none { background: rgba(255,255,255,0.08); color: var(--muted); }

/* Touch: zones cliquables plus grandes sur tactile */
@media (hover: none) and (pointer: coarse) {
  .nav-links a,
.nav-links-desktop a { min-height: 44px; display: inline-flex; align-items: center; }
  .bonus-pct { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .bonus-pill { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .btn-status { min-height: 44px; }
  .form-group input, .input { min-height: 48px; font-size: 16px; }
}

/* ─── Cloche notifications agent ─────────────────────────────── */
.notif-bell-btn {
  position: relative;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  color: var(--muted);
  padding: 0.42rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.notif-bell-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
}
.notif-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  border-radius: 10px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  border: 2px solid var(--bg);
  animation: notif-pop 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes notif-pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.notif-panel {
  position: fixed;
  top: 0; right: -420px;
  width: 400px;
  max-width: 96vw;
  height: 100vh;
  background: #12131a;
  border-left: 1px solid rgba(255,255,255,0.07);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -12px 0 40px rgba(0,0,0,0.5);
}
.notif-panel.open { right: 0; }

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  background: rgba(255,255,255,0.02);
}
.notif-panel-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.notif-panel-close {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  color: var(--muted);
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}
.notif-panel-close:hover { color: var(--text); background: rgba(255,255,255,0.1); }

.notif-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0 1rem;
}
.notif-panel-body::-webkit-scrollbar { width: 4px; }
.notif-panel-body::-webkit-scrollbar-track { background: transparent; }
.notif-panel-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.notif-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.notif-overlay.open { opacity: 1; pointer-events: auto; }

.notif-item {
  padding: 1rem 1.35rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}
.notif-item:hover { background: rgba(255,255,255,0.02); }
.notif-item-new {
  background: linear-gradient(135deg, rgba(245,196,81,0.06) 0%, transparent 55%);
  border-left: 2px solid rgba(245,196,81,0.5);
  padding-left: calc(1.35rem - 2px);
}

/* ─── Modale détail annonce agent ────────────────────────────── */
.notif-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.notif-modal-overlay.open { opacity: 1; pointer-events: auto; }

.notif-modal {
  position: fixed;
  top: 5vh; left: 5vw;
  width: 90vw;
  height: 90vh;
  background: #0f1016;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  z-index: 1301;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.22s cubic-bezier(0.34,1.15,0.64,1);
  transform: scale(0.97);
  box-shadow: 0 32px 100px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.05);
  overflow: hidden;
}
.notif-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.notif-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
  min-height: 0;
}
.notif-modal-body::-webkit-scrollbar { width: 5px; }
.notif-modal-body::-webkit-scrollbar-track { background: transparent; }
.notif-modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }

@media (max-width: 640px) {
  .notif-modal {
    top: 4vh; left: 2vw;
    width: 96vw;
    height: 92vh;
    border-radius: 14px;
  }
}

/* ─── Contenu HTML dans la modale notif ────── */
#notif-modal-msg img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin: 1rem auto;
  border: 1px solid rgba(255,255,255,0.08);
}
#notif-modal-msg strong { color: #fff; }
#notif-modal-msg em { color: rgba(255,255,255,0.75); }
#notif-modal-msg ul { padding-left: 1.4rem; margin: 0.5rem 0; }
#notif-modal-msg li { margin-bottom: 0.3rem; line-height: 1.6; }

/* ════════════════════════════════════════════
   MOBILE — Agent pages
   ════════════════════════════════════════════ */

/* Topbar: masquer le titre sur très petits écrans si trop serré */
@media (max-width: 480px) {
  .topbar-title { display: none; }
  .topbar { gap: 0.5rem; padding: 0 0.75rem; }
}

/* Main padding agent */
@media (max-width: 768px) {
  body.agent-page .main { padding: 0.85rem; }
}
@media (max-width: 480px) {
  body.agent-page .main { padding: 0.6rem; }
}

/* ── HP card: empiler cercle + texte verticalement sur mobile ── */
@media (max-width: 520px) {
  .agent-hp-body {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 1rem !important;
    text-align: center;
  }
  .agent-hp-body > div:last-child { width: 100%; }
}

/* ── Graduation card: réduire le grand chiffre et empiler ── */
@media (max-width: 580px) {
  .agent-grad-header {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }
  .agent-grad-header > div:last-child { align-items: flex-start !important; width: 100%; }
}
@media (max-width: 480px) {
  .agent-grad-header span[style*="3rem"] { font-size: 2.2rem !important; }
}

/* ── Diamants card: empiler cercle + colonnes verticalement ── */
@media (max-width: 600px) {
  .agent-diam-body {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 1rem !important;
  }
  .agent-diam-body > div:last-child {
    width: 100%;
    grid-template-columns: 1fr 1px 1fr !important;
  }
}
@media (max-width: 380px) {
  .agent-diam-body > div:last-child {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  .agent-diam-body > div:last-child > div:nth-child(2) { display: none; }
}

/* ── Agent overview cards KPI en bas ── */
@media (max-width: 600px) {
  body.agent-page .card[style*="display:grid"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ── Tableau creators-list ── */
@media (max-width: 640px) {
  .page-creators-list .cl-filter span { display: none; }
  .page-creators-list thead th:nth-child(3) { display: none; }
  .page-creators-list tbody td:nth-child(3) { display: none; }
}

/* ── Notif panel: bottom sheet sur mobile ── */
@media (max-width: 520px) {
  .notif-panel {
    width: 100vw !important;
    right: 0 !important;
    left: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    top: auto !important;
    bottom: -90vh !important;
    height: auto !important;
    max-height: 80vh !important;
    transition: bottom 0.3s cubic-bezier(0.4,0,0.2,1) !important;
  }
  .notif-panel.open {
    bottom: 0 !important;
    right: 0 !important;
  }
}

/* ── Agent bonus table scroll ── */
@media (max-width: 768px) {
  body.agent-page .bonus-table-scroll { -webkit-overflow-scrolling: touch; }
  body.agent-page .bonus-table { min-width: 600px; }
}

/* ══════════════════════════════════════════════════════
   HEADER PARTAGÉ — Mes créateurs & Graduation (agent)
   ══════════════════════════════════════════════════════ */

.ac-page-header { margin-bottom: 1.75rem; }

.ac-header-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.ac-header-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.ac-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.ac-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.9rem;
  flex: 1;
  max-width: 340px;
}
.ac-sort-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE MOBILE — Page "Mes créateurs" (agent)
   ══════════════════════════════════════════════════════ */

/* Header responsive */
@media (max-width: 600px) {
  .ac-header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  .ac-header-stats {
    gap: 0.5rem;
  }
  .ac-search-wrap {
    max-width: 100%;
    flex: 1;
  }
}

@media (max-width: 430px) {
  .ac-sort-wrap { gap: 0.3rem; }
  .ac-sort-btn { font-size: 0.72rem; padding: 0.32rem 0.65rem; }
}

/* Tablette étroite : on retire le header de légende */
@media (max-width: 760px) {
  .ac-legend { display: none; }
  .ac-card {
    flex-wrap: wrap;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
  }
  .ac-identity {
    width: 100%;
    flex: none;
  }
  .ac-metrics {
    width: 100%;
    flex: none;
    gap: 0;
  }
  .ac-metric { flex: 1; min-width: 0; }
}

/* Mobile : métriques en 2 colonnes */
@media (max-width: 520px) {
  .ac-card { padding: 0.8rem; gap: 0.7rem; }
  .ac-metrics { flex-wrap: wrap; gap: 0.5rem; }
  .ac-metric {
    flex: 0 0 calc(50% - 0.25rem);
    border-left: none !important;
    padding-left: 0 !important;
    background: rgba(255,255,255,0.025);
    border-radius: 8px;
    padding: 0.55rem 0.65rem !important;
  }
  .ac-metric-curr { font-size: 0.88rem; }
}

/* Très petit : tri buttons sur 2 lignes */
@media (max-width: 430px) {
  .ac-card { padding: 0.75rem; }
  .ac-metrics { gap: 0.4rem; }
  .ac-metric { flex: 0 0 calc(50% - 0.2rem); }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE MOBILE — Page "Graduation" (agent)
   ══════════════════════════════════════════════════════ */

/* Tablette : les KPI "span 2" passent en 1 colonne */
@media (max-width: 700px) {
  .agent-kpi-grid { grid-template-columns: 1fr 1fr; }
  .agent-kpi-card[style*="grid-column:span 2"],
  .agent-kpi-card[style*="grid-column: span 2"] {
    grid-column: span 2;
  }
}

/* Mobile : gcard-main en grille 2×2 propre */
@media (max-width: 640px) {
  .gcard { padding: 0.85rem 0.9rem 0.65rem; }
  .gcard-main {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 0.75rem;
    row-gap: 0.55rem;
    margin-bottom: 0.65rem;
  }
  /* Ligne 1 col 1 : identité (avatar + nom + date) */
  .gcard-identity {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    flex: none;
  }
  /* Ligne 1 col 2 : badge statut */
  .gcard-status {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    flex: none;
  }
  /* Ligne 2 col 1 : jours + heures live */
  .gcard-stats {
    grid-column: 1;
    grid-row: 2;
    flex: none;
    gap: 0.75rem;
    align-items: center;
  }
  /* Ligne 2 col 2 : diamants */
  .gcard-diamonds {
    grid-column: 2;
    grid-row: 2;
    flex: none;
    align-items: flex-end;
    text-align: right;
    align-self: center;
  }
}

/* Très petit mobile */
@media (max-width: 430px) {
  .gcard-name { font-size: 0.85rem; }
  .gcard-stat { font-size: 0.8rem; }
  .gcard-diamonds span:first-child { font-size: 0.92rem !important; }
  /* KPI graduation en 1 colonne */
  .agent-kpi-grid { grid-template-columns: 1fr; }
  .agent-kpi-card[style*="grid-column:span 2"],
  .agent-kpi-card[style*="grid-column: span 2"] {
    grid-column: span 1;
  }
}

/* ── Boutons de filtre creators-list sur mobile ── */
@media (max-width: 480px) {
  .cl-filter { padding: 0.28rem 0.6rem; font-size: 0.7rem; }
}

/* ── Login page: responsive déjà géré, renforcement ── */
@media (max-width: 500px) {
  .lp-cards { flex-direction: column !important; gap: 0.5rem !important; }
  .lp-scard { width: 100% !important; }
}

/* ══════════════════════════════════════════════════════════
   GESTION ADMINS — admin-accounts.ejs
   ══════════════════════════════════════════════════════════ */

/* Bouton header */
.btn-add-admin {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: var(--gold);
  color: #000;
  font-weight: 700;
  font-size: 0.82rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.18s;
}
.btn-add-admin:hover { opacity: 0.85; }

/* Panneau création */
.ga-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.25s;
  opacity: 0;
  margin-bottom: 0;
}
.ga-panel.ga-panel-open {
  max-height: 800px;
  opacity: 1;
  margin-bottom: 1.5rem;
}
.ga-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem 0.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 12px 12px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
}
.ga-panel-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: background 0.15s;
}
.ga-panel-close:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }

/* Formulaire */
.ga-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 0 12px 12px;
  padding: 1.25rem 1.25rem 1rem;
}
.ga-panel.ga-panel-open .ga-form { border-top: none; }
.ga-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-bottom: 1rem;
}
@media (max-width: 580px) { .ga-form-grid { grid-template-columns: 1fr; } }
.ga-field { display: flex; flex-direction: column; gap: 0.4rem; }
.ga-field label { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); }
.ga-req { color: var(--gold); }
.ga-field input[type="text"],
.ga-field input[type="password"] {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s;
}
.ga-field input:focus { border-color: var(--gold); }

/* Rôle */
.ga-role-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.ga-role-lbl { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); }
.ga-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-primary);
}
.ga-radio span { font-weight: 600; }
.ga-radio small { color: var(--text-muted); font-weight: 400; }

/* Permissions */
.ga-perms-section { margin-bottom: 1rem; }
.ga-perms-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.ga-perm-toggle { cursor: pointer; }
.ga-perm-toggle input { display: none; }
.ga-perm-box {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text-muted);
  transition: all 0.15s;
  user-select: none;
}
.ga-perm-toggle input:checked + .ga-perm-box {
  background: rgba(250,190,30,0.1);
  border-color: rgba(250,190,30,0.4);
  color: var(--gold);
  font-weight: 600;
}
.ga-perm-box:hover { border-color: rgba(250,190,30,0.45); color: var(--text-primary); }

/* Footer form */
.ga-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.ga-btn-submit {
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  background: var(--gold);
  color: #000;
  font-weight: 700;
  font-size: 0.83rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.ga-btn-submit:hover { opacity: 0.85; }
.ga-btn-cancel {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.83rem;
  cursor: pointer;
  transition: background 0.15s;
}
.ga-btn-cancel:hover { background: rgba(255,255,255,0.05); }

/* Liste comptes */
.ga-accounts-list { display: flex; flex-direction: column; gap: 0.75rem; }
.ga-account-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  transition: border-color 0.15s;
}
.ga-account-card:hover { border-color: rgba(250,190,30,0.25); }
.ga-card-disabled { opacity: 0.55; }
.ga-card-left { display: flex; align-items: flex-start; gap: 0.9rem; flex: 1; }
.ga-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  flex-shrink: 0;
}
.ga-avatar-gold {
  background: rgba(250,190,30,0.15);
  border-color: rgba(250,190,30,0.4);
  color: var(--gold);
}
.ga-card-info { flex: 1; min-width: 0; }
.ga-card-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.15rem;
}
.ga-card-username { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.ga-badge-grand {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 99px;
  background: rgba(250,190,30,0.15);
  border: 1px solid rgba(250,190,30,0.35);
  color: #f5c518;
}
.ga-badge-admin {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 99px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.35);
  color: #a5b4fc;
}
.ga-badge-disabled {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 99px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
}
.ga-card-perms { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ga-perm-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.67rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  border: 1px solid;
}
.ga-chip-on  { background: rgba(34,197,94,0.1);  border-color: rgba(34,197,94,0.3);  color: #4ade80; }
.ga-chip-off { background: rgba(239,68,68,0.07); border-color: rgba(239,68,68,0.2);  color: #f87171; }

/* Boutons actions */
.ga-card-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.ga-btn-edit, .ga-btn-toggle, .ga-btn-delete {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.38rem 0.75rem;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.15s;
}
.ga-btn-edit {
  background: rgba(255,255,255,0.04);
  border-color: var(--border);
  color: var(--text-secondary);
}
.ga-btn-edit:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); color: var(--text-primary); }
.ga-btn-revoke {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.25);
  color: #f87171;
}
.ga-btn-revoke:hover { background: rgba(239,68,68,0.15); }
.ga-btn-restore {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.25);
  color: #4ade80;
}
.ga-btn-restore:hover { background: rgba(34,197,94,0.15); }
.ga-btn-delete {
  background: none;
  border-color: rgba(239,68,68,0.2);
  color: rgba(248,113,113,0.6);
}
.ga-btn-delete:hover { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.4); color: #f87171; }

/* Modal */
.ga-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.ga-modal-overlay.ga-modal-open { display: flex; }
.ga-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.ga-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem 0.85rem;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.ga-modal .ga-form {
  border-radius: 0 0 14px 14px;
  border: none;
  padding: 1.25rem 1.25rem 1rem;
}

@media (max-width: 520px) {
  .ga-card-actions { flex-direction: column; align-items: flex-end; }
  .ga-account-card { flex-direction: column; }
}

/* ── Admin sidebar user card ── */
.admin-sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border-radius: 9px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.admin-sidebar-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(250,190,30,0.15);
  border: 1px solid rgba(250,190,30,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--gold);
  flex-shrink: 0;
}
.admin-sidebar-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  overflow: hidden;
}
.admin-sidebar-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-sidebar-role {
  font-size: 0.66rem;
  color: var(--text-muted);
  font-weight: 500;
}
.admin-sidebar-logout {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 0.2rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.admin-sidebar-logout:hover { color: #f87171; background: rgba(239,68,68,0.1); }
/* Collapsed sidebar: hide text */
.sidebar.collapsed .admin-sidebar-user { justify-content: center; padding: 0.5rem; }
.sidebar.collapsed .admin-sidebar-info { display: none; }
.sidebar.collapsed .admin-sidebar-logout { display: none; }

/* ── Permissions groupées ── */
.ga-perms-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}
.ga-perm-select-all {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 0.18rem 0.6rem;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}
.ga-perm-select-all:hover { border-color: var(--gold); color: var(--gold); }

.ga-perm-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.6rem;
}
.ga-perm-group-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}
.ga-perm-group-header:hover { background: rgba(255,255,255,0.04); }
.ga-group-toggle {
  position: relative;
  width: 30px;
  height: 17px;
  flex-shrink: 0;
}
.ga-group-toggle input { display: none; }
.ga-group-toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  transition: all 0.18s;
}
.ga-group-toggle input:checked ~ .ga-group-toggle-track {
  background: rgba(250,190,30,0.2);
  border-color: rgba(250,190,30,0.5);
}
.ga-group-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.18s;
}
.ga-group-toggle input:checked ~ .ga-group-toggle-thumb {
  left: 15px;
  background: var(--gold);
}
.ga-perm-group-name {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  flex: 1;
}
.ga-perm-group-count {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.1rem 0.45rem;
}
.ga-perm-group-count.has-active {
  background: rgba(250,190,30,0.1);
  border-color: rgba(250,190,30,0.3);
  color: var(--gold);
}
.ga-perm-group-body {
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Chip partial (quelques perms activées dans le groupe) */
.ga-chip-partial {
  background: rgba(250,190,30,0.07);
  border-color: rgba(250,190,30,0.2);
  color: rgba(245,197,24,0.7);
}

/* ═══════════════════════════════════════════════
   RESPONSIVE MOBILE — Login page
   ═══════════════════════════════════════════════ */

/* Tablette étroite / petits laptops */
@media (max-width: 820px) {
  /* Le inline style font-size:6.4rem est surchargé ici */
  .lp-title,
  .lp-title-accent,
  #lp-streamline { font-size: 3.2rem !important; }
  .lp-title .lp-title-small { font-size: 0.9rem !important; }
  .lp-tagline { font-size: 1.4rem; }
  .lp-cards { grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
  .lp-scard-num { font-size: 1.6rem; }
}

/* Mobile standard */
@media (max-width: 600px) {
  #lp-crowns { display: none; }
  .lp-hero { padding: 2rem 1.25rem 1.75rem; }
  .lp-badge { font-size: 0.65rem; padding: 0.35rem 0.75rem; margin-bottom: 1.25rem; }
  .lp-title,
  .lp-title-accent,
  #lp-streamline { font-size: 2.6rem !important; }
  .lp-title .lp-title-small { font-size: 0.8rem !important; margin-bottom: 0.35rem; }
  .lp-tagline { font-size: 1.15rem; margin-bottom: 1rem; }
  .lp-desc { font-size: 0.88rem; margin-bottom: 1.25rem; }
  .lp-features { gap: 0.45rem; margin-bottom: 1.5rem; }
  .lp-feature { font-size: 0.82rem; }
  .lp-cards { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 1.5rem; }
  .lp-scard { padding: 0.75rem 0.6rem; }
  .lp-scard-icon { display: none; }
  .lp-scard-num { font-size: 1.3rem; }
  .lp-scard-lbl { font-size: 0.65rem; }
  .lp-form-side { padding: 2rem 1.25rem 2.5rem; }
}

/* Très petit mobile (<= 430px) — hero masqué, formulaire seul */
@media (max-width: 430px) {
  #lp-crowns { display: none; }
  .lp-hero { display: none; }
  .lp-form-side {
    min-height: 100vh;
    padding: 3rem 1.5rem;
    justify-content: flex-start;
    padding-top: 4rem;
  }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE MOBILE — Gestion agents (anoms-row)
   ═══════════════════════════════════════════════ */

@media (max-width: 900px) {
  /* Réduire l'input nom */
  .anoms-input { width: 150px; }
  /* HP buttons plus compacts */
  .anoms-hp-btn { padding: 0.18rem 0.38rem; font-size: 0.62rem; }
}

@media (max-width: 720px) {
  .anoms-row {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.8rem;
  }
  /* Ligne 1 : avatar + info + statut */
  .anoms-avatar { flex-shrink: 0; }
  .anoms-info { flex: 1; min-width: 0; }
  .anoms-account-status {
    margin-right: 0;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  /* Ligne 2 : champ nom + save — pleine largeur */
  .anoms-edit {
    width: 100%;
    order: 3;
  }
  .anoms-input { width: 100%; flex: 1; }
  /* Ligne 3 : HP controls — pleine largeur */
  .anoms-hp-ctrl {
    width: 100%;
    order: 4;
    margin-left: 0;
    justify-content: flex-start;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .anoms-hp-btns { flex-wrap: wrap; gap: 0.3rem; }
  .anoms-hp-btn { padding: 0.25rem 0.55rem; font-size: 0.7rem; }
}

@media (max-width: 480px) {
  .anoms-row { padding: 0.7rem; gap: 0.5rem; }
  .anoms-account-status { order: 2; width: 100%; }
  .anoms-badge { font-size: 0.68rem; }
  .anoms-revoke-btn, .anoms-reset-btn { font-size: 0.68rem; padding: 0.22rem 0.45rem; }
}

/* ─── Mobile global améliorations ──────────────────────────────── */
@media (max-width: 640px) {
  /* Actions du jour - stack vertical */
  #actions-du-jour [style*="display:flex"] { flex-wrap: wrap; }

  /* Barre de progression estimation */
  .ep-progress-bar { height: 10px !important; }

  /* Tooltips : position vers le bas sur mobile pour éviter coupure */
  .tip::after { left: auto; right: 0; transform: none; width: 180px; }
  .tip::before { left: auto; right: 10px; }

  /* Vue d'ensemble : réduire padding cards */
  .card { padding: 1rem !important; }

  /* Overview actions row */
  #actions-du-jour .ht-actions { flex-direction: column; }
}

@media (max-width: 520px) {
  /* Header page */
  .evol-title { font-size: 1.3rem !important; }

  /* Timeline historique : fullwidth sur mobile */
  .ht-spine { width: 20px; }
  .ht-card { padding: .7rem .85rem; }
  .ht-month { font-size: .82rem; }
  .ht-amount { font-size: .95rem; }
  .ht-status-pill { font-size: .63rem; padding: .14rem .42rem; }

  /* Estimation barre */
  .ep-bar-row { flex-direction: column; gap: .3rem; align-items: flex-start !important; }

  /* Facture responsive */
  .fact-actions-btns { flex-direction: column; }
  .fact-btn-validate, .fact-btn-reject, .fact-btn-print {
    width: 100%; justify-content: center;
  }

  /* Tableau tiers : réduire */
  .tier-table th, .tier-table td { padding: .4rem .5rem; font-size: .73rem; }
}

/* Trio Estimation + widgets : 2fr 1fr 1fr → empilement sur mobile */
@media (max-width: 760px) {
  .ov-trio-grid { grid-template-columns: 1fr !important; }
}
@media (min-width: 761px) and (max-width: 960px) {
  .ov-trio-grid { grid-template-columns: 1fr 1fr !important; }
  .ov-trio-grid > .card:first-child { grid-column: 1 / -1; }
}

/* Touch : agrandir zones cliquables */
@media (hover: none) and (pointer: coarse) {
  .ht-btn { padding: .5rem 1rem; font-size: .8rem; }
  .hfact-btn { padding: .45rem .9rem; font-size: .78rem; }
  .tip { width: 20px; height: 20px; font-size: .7rem; }
  .ht-dot { width: 14px; height: 14px; }
  .cs-check-btn, .cs-undo-btn { min-height: 36px; }
}
