/* ============================================================
   NOVIABOT — SETTINGS PAGE
   Architecture : Base → Layout → Sidebar → Main → KPI → Graphs
   → Stats → Revenue → Tabs/Account → Modals → Responsive
============================================================ */

/* Tableau de bord : jeux + graphiques masqués jusqu’à la réponse API (KPI restent visibles). */
.settings-page .tab-panel[data-tab="general"].tab-panel--dashboard-pending .home-games-wrap,
.settings-page .tab-panel[data-tab="general"].tab-panel--dashboard-pending .graphs-grid {
  visibility: hidden;
}
.settings-page .tab-panel[data-tab="general"] .dashboard-async-hint {
  display: none;
  align-items: center;
  gap: 0.65rem;
  margin: 0.25rem 0 1rem;
  font-size: 0.9rem;
  color: rgba(232, 234, 255, 0.72);
}
.settings-page .tab-panel[data-tab="general"].tab-panel--dashboard-pending .dashboard-async-hint {
  display: flex;
}
.dashboard-async-hint__spin {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(232, 234, 255, 0.22);
  border-top-color: rgba(24, 231, 255, 0.9);
  border-radius: 50%;
  animation: novia-dash-spin 0.65s linear infinite;
}
@keyframes novia-dash-spin {
  to {
    transform: rotate(360deg);
  }
}
.home-games-wrap {
  /* Même rythme vertical que `.kpis-grid` (2.5rem) */
  margin-bottom: 2.5rem;
  min-height: 13rem;
}
/* Panneau jeux : largeur réelle (évite grille coincée sur une colonne / carte flottante) */
.home-games-panel,
.home-games-root {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.home-games-root--pending {
  min-height: 3rem;
}
/* Accueil Paramètres : réserve la hauteur des cartes jeux avant l’API → moins de « sauts » (CLS). */
.settings-page.settings-home-lite .home-games-root.home-games-root--pending {
  min-height: clamp(17rem, 36vh, 30rem);
}
.home-games-pending-msg {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(232, 234, 255, 0.75);
}
.home-games-empty {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(232, 234, 255, 0.82);
}

/* En-tête « Jeux & catégories » : même hiérarchie visuelle que les titres KPI (lisible, peu de texte). */
.home-games-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 1rem;
  margin-bottom: 0.85rem;
}
.home-games-head-text {
  min-width: 0;
}
.home-games-title {
  margin: 0;
  font-size: clamp(1.22rem, 1.05rem + 0.55vw, 1.52rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #f4f6ff;
}
.home-games-cta {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(24, 231, 255, 0.96);
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(24, 231, 255, 0.32);
  background: rgba(24, 231, 255, 0.06);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.home-games-cta:hover {
  border-color: rgba(24, 231, 255, 0.55);
  background: rgba(24, 231, 255, 0.11);
  transform: translateY(-1px);
}

/* ================== BASE ================== */
.settings-page {
  background: #23134d;
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
  color: #e8eaff;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(185, 120, 247, 0.45) rgba(15, 11, 30, 0.55);
}

.settings-page *::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.settings-page *::-webkit-scrollbar-track {
  background: rgba(15, 11, 30, 0.55);
  border-radius: 8px;
}
.settings-page *::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(185, 120, 247, 0.55), rgba(24, 231, 255, 0.28));
  border-radius: 8px;
  border: 2px solid rgba(15, 11, 30, 0.35);
}
.settings-page *::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(185, 120, 247, 0.72), rgba(24, 231, 255, 0.42));
}

/* ================== LAYOUT ================== */
.settings-wrapper {
  width: 100%;
  flex: 1;
  padding: 1.5rem 2rem 0;
  display: grid;
  grid-template-columns: minmax(260px, 300px) 1fr;
  gap: 2rem;
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 1800px;
  align-items: start;
}

/* ================== SIDEBAR ================== */
.settings-page .sidebar {
  background: linear-gradient(145deg, rgba(24,231,255,0.05), rgba(185,120,247,0.07)) !important;
  border-radius: 0 18px 18px 0;
  border: 1px solid rgba(24,231,255,0.12) !important;
  border-left: none !important;
  box-shadow: 0 0 28px rgba(24,231,255,0.08), 0 0 48px rgba(185,120,247,0.04);
  padding: 1.5rem 0;
  backdrop-filter: blur(8px);
  height: fit-content;
  min-height: calc(100vh - 100px);
  position: sticky;
  top: 20px;
  transition: box-shadow 0.25s ease;
  box-sizing: border-box;
  width: 100%;
}

.settings-page .sidebar:hover {
  box-shadow: 0 0 32px rgba(24,231,255,0.1), 0 0 56px rgba(185,120,247,0.06);
}

/* --- Profil --- */
.profile-section {
  padding: 1.2rem 1.8rem 1.4rem;
  border-bottom: 1px solid rgba(24,231,255,0.1);
  margin-bottom: 1.2rem;
  text-align: center;
}


.pp-zone {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 0 auto 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(24,231,255,0.4);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 20px rgba(24,231,255,0.12), 0 0 24px rgba(185,120,247,0.06);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}

.pp-zone:hover {
  border-color: rgba(24,231,255,0.6);
  box-shadow: 0 0 28px rgba(24,231,255,0.18), 0 0 36px rgba(185,120,247,0.08);
}

/* Photo réelle */
.pp-zone img,
.pp-zone img.pp-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  transform: translate(var(--pp-x, 0px), var(--pp-y, 0px)) scale(var(--pp-s, 1));
  transform-origin: center center;
  transition: transform 0.08s ease-out;
  pointer-events: none;
}

.pp-zone.empty {
  border: 2px solid rgba(24,231,255,0.45);
  background: rgba(24,231,255,0.05);
}

/* + CENTRÉ PROPRE */
.pp-zone.empty::after {
  content: "+";
  position: absolute;
  font-size: 4rem;
  font-weight: 900;
  color: #18e7ff;
  text-shadow: 0 0 18px rgba(24,231,255,0.55);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Aucun rond supplémentaire */
.pp-zone.empty::before {
  display: none !important;
}

/* ===================== Nom / Followers / Plan ===================== */
.pp-name {
  font-size: 1.6rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pp-followers {
  font-size: 1.3rem;
  font-weight: 500;
  text-align: center;
  opacity: 0.9;
  margin-bottom: 0.15rem;
  line-height: 1.25;
}

.pp-subs {
  font-size: 1.15rem;
  font-weight: 500;
  text-align: center;
  opacity: 0.82;
  margin-bottom: 0.9rem;
  line-height: 1.25;
}

.pp-subs[hidden] {
  display: none !important;
}

.clean-plan {
  background: none !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0.4rem 0;
  text-align: center;
  transition: color 0.2s;
}

.clean-plan:hover {
  color: #5eb4ff !important;
  text-shadow: none;
}

/* --- Menu --- */
/* Annuler le nav { display: flex } global : garder le menu en colonne dans la sidebar */
.settings-page .sidebar .menu,
.settings-page .sidebar nav.menu {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-left: 0;
  gap: 0;
}

.menu-section {
  margin-bottom: 1.2rem;
}

.menu-title {
  color: rgba(24,231,255,0.9);
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 800;
  padding: 0.5rem 1.8rem 0.35rem;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.menu-item {
  padding: 0.7rem 1.8rem;
  color: rgba(232,234,255,0.9);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  border-left: 3px solid transparent;
  border-radius: 0 10px 10px 0;
  margin-right: 0.5rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Liens sidebar (settings-home) : les <a> sont inline par défaut → chevauchement sans display:block */
.settings-page .sidebar a.menu-item {
  display: block;
  text-decoration: none;
  color: inherit;
}

.menu-item:hover {
  background: rgba(24,231,255,0.06);
  color: #18e7ff;
}

.menu-item.active {
  background: rgba(24,231,255,0.08);
  border-left-color: rgba(24,231,255,0.7);
  color: #18e7ff;
  font-weight: 700;
}

/* --- Sous-menus --- */
.submenu {
  display: none;
  padding-bottom: 0.4rem;
}

.menu-item.toggle.open + .submenu {
  display: block;
}

.submenu a {
  display: block;
  padding: 0.5rem 2.8rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(213,216,255,0.85);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.submenu a:hover {
  color: #18e7ff;
  padding-left: 3rem;
}

/* ================== CONTENU PRINCIPAL ================== */
.settings-main {
  padding: 1.5rem 0 2rem;
  min-height: 100%;
  display: block;
}

.settings-title {
  font-size: 1.9rem;
  font-weight: 900;
  margin-bottom: 2rem;
  color: #ffffff;
}

/* ================== KPI CARDS ================== */
.kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  isolation: isolate;
}

.kpi-card {
  background: linear-gradient(145deg, rgba(24,231,255,0.04), rgba(185,120,247,0.05));
  border-radius: 14px;
  border: 1px solid rgba(24,231,255,0.12);
  padding: 1.05rem 1.15rem;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  overflow: hidden;
  z-index: 1;
  cursor: pointer;
}

/* Revenus déverrouillé : le pied doit rester dans la carte (plus besoin d’overflow:visible si le pied est align-self:stretch). */
.kpi-card.kpi-revenue:not(.locked) {
  overflow: hidden;
}

/* Grille KPI du haut : tout le contenu centré (les cartes jeux utilisent .hg-* uniquement). */
.kpis-grid > .kpi-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 8.75rem;
}

.kpis-grid > .kpi-card .kpi-header {
  justify-content: center;
  width: 100%;
  flex-shrink: 0;
  margin-bottom: 0.35rem;
}

/* Carte revenus : pied masquer + période (uniquement carte déverrouillée — voir .locked) */
.kpi-revenue-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
  width: 100%;
  max-width: 100%;
  align-self: stretch;
  box-sizing: border-box;
  margin-top: auto;
  padding-top: 0.55rem;
}

.kpi-revenue.locked .kpi-revenue-footer {
  display: none !important;
}

.kpi-revenue-footer .kpi-revenue-period-wrap {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

/* Toujours au-dessus d’un éventuel calque / pseudo-couche sous la carte */
.kpi-revenue:not(.locked) .kpi-revenue-footer {
  position: relative;
  z-index: 3;
}

/* Texte pur : blanc, cyan au survol, sans cadre ni fond */
.kpi-revenue-relock-btn {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1.35;
  max-width: none;
  cursor: pointer;
  transition: color 0.18s ease;
}

.kpi-revenue-relock-btn:hover,
.kpi-revenue-relock-btn:focus-visible {
  color: #18e7ff;
  background: none !important;
  box-shadow: none !important;
}

.kpi-revenue-relock-btn:focus {
  outline: none;
}

/* Annule modals.css : .novia-text-btn a width:100% + padding — sinon « Masquer » pousse la période hors carte */
#kpiRevenueCard .kpi-revenue-relock-btn.novia-text-btn {
  width: auto !important;
  padding: 0 !important;
  text-align: center;
  font-size: 0.82rem;
  text-shadow: none;
}

#kpiRevenueCard .kpi-revenue-relock-btn.novia-text-btn:hover {
  text-shadow: none;
}
#kpiRevenueCard #kpi-revenue-period.kpi-footer-select,
#kpiRevenueCard select.kpi-revenue-period-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent !important;
  border: 0 !important;
  margin: 0;
  cursor: pointer;
  text-align: center;
  text-align-last: center;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0;
  border-radius: 0;
  min-width: 0;
  max-width: 100%;
  width: auto;
  line-height: 1.35;
  box-shadow: none !important;
  transition: color 0.18s ease;
}

#kpiRevenueCard #kpi-revenue-period::-ms-expand {
  display: none;
}

#kpiRevenueCard #kpi-revenue-period:hover {
  color: #18e7ff;
  background: transparent !important;
}

#kpiRevenueCard #kpi-revenue-period:focus {
  outline: none;
  box-shadow: none !important;
}

#kpiRevenueCard #kpi-revenue-period:focus-visible {
  outline: none;
}

#kpiRevenueCard #kpi-revenue-period option {
  background: #0c1222;
  color: #e8eaff;
}

.kpis-grid > .kpi-card .kpi-left {
  justify-content: center;
}

/* Valeur principale centrée H+V entre le titre et le pied (CTA ou bloc spam). */
.kpis-grid > .kpi-card .kpi-value {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  margin-bottom: 0;
  text-align: center;
}

.kpis-grid > .kpi-card .kpi-trend:not([hidden]) {
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.kpis-grid > .kpi-card .kpi-spam-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
}

.kpis-grid > .kpi-card .kpi-footer-select {
  margin: 0 auto;
}

/* Carte spam uniquement : pas de libellé « Période », texte = option (défaut 7 j au HTML), clic = liste native. */
#kpiSpam .kpi-spam-period-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-shrink: 0;
  padding: 0.1rem 0 0.35rem;
}

#kpiSpam #kpi-spam-range.kpi-footer-select,
#kpiSpam select.kpi-spam-period-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: 0;
  margin: 0 auto;
  cursor: pointer;
  text-align: center;
  text-align-last: center;
  color: rgba(232, 234, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.28rem 0.75rem;
  border-radius: 10px;
  max-width: 100%;
  line-height: 1.35;
}

#kpiSpam #kpi-spam-range::-ms-expand {
  display: none;
}

#kpiSpam #kpi-spam-range:hover {
  color: #18e7ff;
  background: rgba(24, 231, 255, 0.1);
}

#kpiSpam #kpi-spam-range:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(24, 231, 255, 0.35);
}

#kpiSpam #kpi-spam-range option {
  background: #0c1222;
  color: #e8eaff;
}

.kpis-grid > .kpi-card .kpi-card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  margin-top: auto;
  padding-top: 0.55rem;
}

.kpis-grid > .kpi-card .kpi-card-cta-label,
.revenue-card .kpi-card-cta-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.35;
}

.kpis-grid > .kpi-card .kpi-card-cta-chev,
.revenue-card .kpi-card-cta-chev {
  display: none;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(24, 231, 255, 0.26);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.kpi-card::before {
  content: "";
  position: absolute;
  height: 1px;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(24, 231, 255, 0.2);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.kpi-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.kpi-ico {
  flex-shrink: 0;
  display: inline-flex;
  width: 1.5rem;
  height: 1.5rem;
  color: rgba(24, 231, 255, 0.9);
}

.kpi-ico svg {
  width: 100%;
  height: 100%;
  display: block;
}

.kpi-ico svg * {
  stroke: currentColor;
  fill: none;
}

.kpi-icon {
  font-size: 1.6rem;
}

.kpi-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #18e7ff;
  margin-bottom: 0.35rem;
}

.kpis-grid > .kpi-card .kpi-revenue-value-stack {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  gap: 0.15rem;
}

.kpis-grid > .kpi-card .kpi-revenue-eur.kpi-value {
  margin-bottom: 0;
  font-size: 1.42rem;
  font-weight: 800;
  line-height: 1.15;
}

.kpi-revenue-bits-sub {
  font-size: 0.58rem;
  font-weight: 600;
  color: rgba(232, 234, 255, 0.55);
  letter-spacing: 0.02em;
  line-height: 1.35;
  max-width: 100%;
  padding: 0 0.15rem;
  text-align: center;
  word-break: break-word;
}

.kpi-trend {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.kpi-trend.up {
  background: rgba(0,255,136,0.15);
  color: #00ff88;
}

.kpi-trend.down {
  background: rgba(255,72,125,0.15);
  color: #ff487d;
}

/* ================== GRAPHIQUES ================== */
.graphs-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}

/* --- Graph cards (hover : lueur douce, pas de contour) --- */
.settings-page .graph-card {
  background: linear-gradient(145deg, rgba(24,231,255,0.05), rgba(185,120,247,0.07)) !important;
  border-radius: 20px;
  border: 1px solid rgba(24,231,255,0.18) !important;
  padding: 1.8rem;
  box-shadow: 0 0 25px rgba(24,231,255,0.12);
  transition: 0.25s;
  position: relative;
  overflow: hidden;
}

.graph-card:hover {
  box-shadow: 0 8px 36px rgba(24,231,255,0.1), 0 0 48px rgba(185,120,247,0.05);
}

.graph-card.full { grid-column: span 12; }
.graph-card.half { grid-column: span 6; }
.graph-card.third { grid-column: span 4; }

.graph-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Radar « Croissance multi-métriques » : en-tête clair, badge période (plus de faux <select>) */
.growth-radar__header {
  align-items: flex-start;
}

.growth-radar__header .graph-header-text {
  flex: 1;
  min-width: 0;
}

.graph-card-kpi-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.graph-card-kpi-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.revenue-graph-kpi-head,
.revenue-graph-header .graph-card-kpi-head {
  justify-content: center;
}

.growth-radar__desc {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(232, 234, 255, 0.72);
  max-width: 52ch;
}

.growth-radar__raw-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(232, 234, 255, 0.48);
  margin-bottom: 0.45rem;
}

.growth-radar__aside {
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.growth-radar-period-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.growth-radar-card #growth-radar-period.growth-radar-period-select,
.growth-radar-card select.growth-radar-period-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  margin: 0;
  cursor: pointer;
  text-align: center;
  text-align-last: center;
  color: rgba(232, 234, 255, 0.92);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  line-height: 1.35;
  background: rgba(12, 18, 34, 0.55);
  border: 1px solid rgba(185, 120, 247, 0.28);
  white-space: nowrap;
  max-width: 100%;
}

.growth-radar-card #growth-radar-period::-ms-expand {
  display: none;
}

.growth-radar-card #growth-radar-period:hover:not(:disabled) {
  color: #18e7ff;
  border-color: rgba(24, 231, 255, 0.35);
  background: rgba(24, 231, 255, 0.08);
}

.growth-radar-card #growth-radar-period:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(24, 231, 255, 0.35);
}

.growth-radar-card #growth-radar-period:disabled {
  opacity: 0.55;
  cursor: wait;
}

.growth-radar-card #growth-radar-period option {
  background: #0c1222;
  color: #e8eaff;
}

.growth-radar__badge {
  display: inline-block;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(232, 234, 255, 0.9);
  background: rgba(12, 18, 34, 0.55);
  border: 1px solid rgba(185, 120, 247, 0.28);
  white-space: nowrap;
}

.graph-canvas-wrapper--radar {
  min-height: 260px;
}

@media (min-width: 900px) {
  .graph-canvas-wrapper--radar {
    min-height: 268px;
  }
}

.growth-radar__raw {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(185, 120, 247, 0.16);
}

.growth-radar__raw-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem 0.65rem;
}

@media (max-width: 720px) {
  .growth-radar__raw-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.growth-radar__raw-cell {
  margin: 0;
  padding: 0.45rem 0.5rem;
  border-radius: 10px;
  background: rgba(12, 18, 34, 0.45);
  border: 1px solid rgba(24, 231, 255, 0.1);
}

.growth-radar__raw-cell dt {
  font-size: 0.66rem;
  line-height: 1.35;
  color: rgba(232, 234, 255, 0.55);
  font-weight: 600;
}

.growth-radar__raw-cell dd {
  margin: 0.2rem 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #e8eaff;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.growth-radar__footnote {
  margin: 0.75rem 0 0;
  font-size: 0.74rem;
  line-height: 1.52;
  color: rgba(232, 234, 255, 0.58);
  max-width: 100%;
}

.graph-panel-desc--tight {
  margin-top: 0.35rem !important;
  margin-bottom: 0.65rem !important;
  font-size: 0.78rem !important;
  line-height: 1.42 !important;
  max-width: 100% !important;
}

.graph-canvas-wrapper--peak24 {
  position: relative;
  height: 240px;
  min-height: 200px;
  max-height: 280px;
  overflow: hidden;
}

.graph-card[data-chart-explore='heatmap'] .graph-canvas-wrapper--peak24 > canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Custom select — base (évite que la liste pousse la mise en page). */
[data-nb-custom-select] {
  position: relative;
}

[data-nb-custom-select] .nb-custom-select__list[hidden] {
  display: none !important;
}

.graph-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-revenue-relock {
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
  white-space: nowrap;
}

.graph-header--stack {
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 1.55rem;
  overflow: visible;
}

/* Liste fuseau : ne pas clipper le volet (les .graph-card ont overflow:hidden). */
.settings-page .graph-card[data-chart-explore='heatmap'] {
  overflow: visible;
}

.peak-hour-tz-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: -0.2rem 0 0.35rem;
  position: relative;
  z-index: 8;
}

.peak-hour-tz-lbl {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(196, 181, 253, 0.88);
  white-space: nowrap;
}

.peak-hour-tz-row .peak-hour-tz-nb {
  flex: 1 1 200px;
  min-width: 0;
  max-width: 100%;
  position: relative;
}

.peak-hour-tz-row .peak-hour-tz-nb.is-open {
  z-index: 50;
}

.peak-hour-tz-row .nb-custom-select__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  text-align: left;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(185, 120, 247, 0.42) !important;
  background: linear-gradient(165deg, rgba(18, 26, 48, 0.98), rgba(12, 18, 34, 0.96)) !important;
  color: #e8eaff !important;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 1px 0 rgba(24, 231, 255, 0.08);
}

.peak-hour-tz-row .nb-custom-select__trigger:hover {
  border-color: rgba(24, 231, 255, 0.52) !important;
  color: #fff !important;
  background: linear-gradient(165deg, rgba(22, 32, 56, 0.99), rgba(14, 20, 38, 0.98)) !important;
}

.peak-hour-tz-row .nb-custom-select__trigger:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(24, 231, 255, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.peak-hour-tz-row .peak-hour-tz-nb .nb-custom-select__list:not([hidden]) {
  display: block;
}

.peak-hour-tz-row .nb-custom-select__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  margin: 0;
  padding: 0.3rem 0;
  border-radius: 12px;
  border: 1px solid rgba(24, 231, 255, 0.24);
  background: #0f1629;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(185, 120, 247, 0.14);
  max-height: 260px;
  overflow-y: auto;
  z-index: 60;
}

.peak-hour-tz-row .nb-custom-select__list li {
  margin: 0;
  padding: 0;
}

.peak-hour-tz-row .nb-custom-select__list button {
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(232, 234, 255, 0.95) !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer;
}

.peak-hour-tz-row .nb-custom-select__list button:hover,
.peak-hour-tz-row .nb-custom-select__list button:focus-visible {
  background: rgba(24, 231, 255, 0.12);
  color: #fff;
}

.peak-hour-tz-row .nb-custom-select__chev {
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(196, 181, 253, 0.78);
}

/* Top pays : barres = drapeaux SVG (plugin Chart.js) + panneau « verre » autour du canvas. */
.graph-card[data-chart-explore='countries'] {
  overflow: visible;
}

.graph-card[data-chart-explore='countries'] .graph-canvas-wrapper {
  display: block;
  padding: 0.55rem 0.65rem 0.65rem;
  border-radius: 18px;
  border: 1px solid rgba(185, 120, 247, 0.32);
  background: linear-gradient(155deg, rgba(36, 17, 77, 0.42), rgba(14, 10, 32, 0.38));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 10px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  height: auto !important;
  min-height: 300px;
  contain: none !important;
}

.graph-card[data-chart-explore='countries'] .graph-canvas-wrapper > canvas {
  display: block;
  width: 100% !important;
  height: 268px !important;
  max-height: 320px;
}

.chart-explorer-canvas-wrap {
  border-radius: 14px;
}

.countries-flag-img {
  display: block;
  width: 32px;
  height: auto;
  max-height: 22px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.countries-flag-code {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(226, 232, 255, 0.92);
}

.countries-flag-code--solo {
  font-size: clamp(0.75rem, 2.2vw, 0.95rem);
  padding: 0.15rem 0;
}

.graph-header-text .graph-title {
  margin: 0;
}

.graph-panel-desc {
  margin: 0.5rem 0 1.15rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(232, 234, 255, 0.74);
  max-width: 100%;
  white-space: normal;
  overflow-x: visible;
  overflow-y: visible;
  padding-bottom: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(185, 120, 247, 0.45) rgba(15, 11, 30, 0.35);
  -webkit-overflow-scrolling: touch;
}

.graph-panel-desc::-webkit-scrollbar {
  height: 5px;
}

.graph-panel-desc::-webkit-scrollbar-thumb {
  background: rgba(185, 120, 247, 0.45);
  border-radius: 4px;
}

.graph-range-hint {
  margin: 0 0 1rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: rgba(232, 234, 255, 0.68);
}

/* —— Vue combinée #20 (modale sous les jeux) —— */
.dash-overview20-shell {
  margin-bottom: 1.35rem;
}

.dash-overview20-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.dash-overview20-title {
  margin: 0;
  font-size: clamp(1.05rem, 0.92rem + 0.45vw, 1.28rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f4f6ff;
}

.dash-overview20-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  vertical-align: middle;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.dash-overview20-open {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(24, 231, 255, 0.96);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(24, 231, 255, 0.32);
  background: rgba(24, 231, 255, 0.06);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.dash-overview20-open:hover {
  border-color: rgba(24, 231, 255, 0.55);
  background: rgba(24, 231, 255, 0.11);
  transform: translateY(-1px);
}

.dash-overview20-hint {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(232, 234, 255, 0.78);
  max-width: 42rem;
}

#dashOverview20Modal .modal__panel {
  width: min(1040px, 96vw);
  max-width: 96vw;
}

.dash-o20-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  margin: 0.5rem 0 1rem;
}

.dash-o20-legend__lbl {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(232, 234, 255, 0.62);
  margin-right: 0.15rem;
}

.dash-o20-legend__lbl--lines {
  margin-left: 0.35rem;
}

.dash-o20-btn {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  color: rgba(232, 234, 255, 0.88);
  border: 1px solid rgba(185, 120, 247, 0.28);
  background: rgba(15, 11, 30, 0.45);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.dash-o20-btn:hover {
  border-color: rgba(24, 231, 255, 0.35);
  color: #fff;
}

.dash-o20-btn.is-active {
  border-color: rgba(24, 231, 255, 0.55);
  background: rgba(24, 231, 255, 0.1);
  color: #e8eaff;
}

.dash-o20-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem 0.75rem;
  margin: 0.35rem 0 0.5rem;
}

.dash-o20-kpi {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(185, 120, 247, 0.2);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
}

.dash-o20-kpi-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(232, 234, 255, 0.62);
  margin-bottom: 0.28rem;
}

.dash-o20-kpi-val {
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.dash-o20-kpi-val--purple {
  color: #c4b5fd;
}

.dash-o20-kpi-val--cyan {
  color: #22d3ee;
}

.dash-o20-kpi-val--pink {
  color: #fb7185;
}

.dash-o20-kpi-val--green {
  color: #4ade80;
}

.dash-o20-kpi-val--gold {
  color: #fcd34d;
}

.dash-o20-kpi-foot {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  line-height: 1.35;
  color: rgba(232, 234, 255, 0.48);
  min-height: 0;
}

.dash-o20-canvas-wrap {
  position: relative;
  height: min(420px, 52vh);
  min-height: 220px;
  margin-top: 0.25rem;
}

.dash-o20-foot {
  margin-top: 0.65rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(232, 234, 255, 0.52);
}

/* Modale détail jour — alignée sur les autres modales (.modal__panel) */
.stream-day-detail-modal {
  z-index: 4200;
}

.stream-day-detail-modal .stream-day-modal__panel--showcase {
  position: relative;
  width: min(900px, 96vw);
  max-width: min(900px, 96vw);
  max-height: calc(100dvh - 7vh);
  overflow: auto;
  padding: 2rem 2.15rem 1.65rem;
}


.stream-day-modal__title {
  margin: 0 52px 0.5rem 0;
  font-size: clamp(1.35rem, 3.4vw, 1.58rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #e8eaff;
  line-height: 1.2;
}

.stream-day-modal__sub {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(232, 234, 255, 0.78);
  max-width: 52ch;
}

.sdm-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem 0.85rem;
  margin-bottom: 1rem;
}

@media (max-width: 560px) {
  .sdm-kpi-row {
    grid-template-columns: 1fr;
  }
}

.sdm-kpi {
  padding: 0.85rem 1rem;
  min-height: 4.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(185, 120, 247, 0.2);
  border-radius: 10px;
}

.sdm-kpi-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(232, 234, 255, 0.62);
  margin-bottom: 0.32rem;
}

.sdm-kpi-value {
  font-size: 1.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.sdm-kpi-value--purple {
  color: #c4b5fd;
}

.sdm-kpi-value--pink {
  color: #fb7185;
}

.sdm-kpi-value--cyan {
  color: #22d3ee;
}

.sdm-viewer-note {
  margin: 0 0 1.25rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: rgba(232, 234, 255, 0.68);
  padding: 0.6rem 0.75rem;
  background: rgba(15, 11, 30, 0.45);
  border-radius: 8px;
  border-left: 3px solid rgba(24, 231, 255, 0.35);
}

.sdm-hm-block {
  margin-top: 0.25rem;
}

.sdm-hm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 0.65rem;
}

.sdm-hm-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f4f6ff;
  letter-spacing: -0.02em;
}

.sdm-heatmap-root {
  --sdm-cols: 5;
  display: grid;
  grid-template-columns: minmax(3.25rem, 4rem) repeat(var(--sdm-cols), minmax(2.5rem, 1fr));
  gap: 10px 12px;
  padding: 0.35rem 0 0.25rem;
}

.sdm-hm-corner {
  min-height: 28px;
}

.sdm-hm-colhead {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(232, 234, 255, 0.55);
  letter-spacing: 0.06em;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2px;
}

.sdm-hm-rowhead {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(232, 234, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
}

.sdm-hm-cell {
  min-height: 52px;
  height: 52px;
  border: none;
  border-radius: 10px;
  color: #e8eaff;
  font-size: 1.02rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.sdm-hm-cell:hover {
  transform: scale(1.03);
  filter: brightness(1.05);
  z-index: 1;
}

.sdm-hm-cell__n {
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.sdm-hm-cell.is-selected {
  box-shadow: 0 0 0 2px rgba(24, 231, 255, 0.85);
  z-index: 2;
}

.sdm-hm-cell--void {
  min-height: 52px;
  height: 52px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px dashed rgba(185, 120, 247, 0.15);
  pointer-events: none;
}

.sdm-hm-scale {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sdm-hm-scale__lbl {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(232, 234, 255, 0.55);
}

.sdm-hm-legend-hint {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(232, 234, 255, 0.62);
  max-width: 56ch;
}

.sdm-hm-scale__swatches {
  display: flex;
  gap: 7px;
  align-items: center;
}

.sdm-hm-swatch {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.sdm-hm-swatch--heat1 {
  background: rgba(24, 231, 255, 0.1);
}

.sdm-hm-swatch--heat2 {
  background: rgba(24, 231, 255, 0.2);
}

.sdm-hm-swatch--heat3 {
  background: linear-gradient(135deg, rgba(24, 231, 255, 0.14), rgba(185, 120, 247, 0.2));
}

.sdm-hm-swatch--heat4 {
  background: rgba(185, 120, 247, 0.32);
}

.sdm-hm-swatch--heat5 {
  background: rgba(185, 120, 247, 0.48);
  box-shadow:
    0 0 0 1px rgba(24, 231, 255, 0.25) inset,
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.sdm-hm-cell--heat0 {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(24, 231, 255, 0.1);
  color: rgba(232, 234, 255, 0.42);
}

.sdm-hm-cell--heat0 .sdm-hm-cell__n {
  text-shadow: none;
}

.sdm-hm-cell--heat1 {
  background: rgba(24, 231, 255, 0.1) !important;
  border: 1px solid rgba(24, 231, 255, 0.18);
}

.sdm-hm-cell--heat2 {
  background: rgba(24, 231, 255, 0.2) !important;
  border: 1px solid rgba(24, 231, 255, 0.28);
}

.sdm-hm-cell--heat3 {
  background: linear-gradient(145deg, rgba(24, 231, 255, 0.12), rgba(185, 120, 247, 0.22)) !important;
  border: 1px solid rgba(185, 120, 247, 0.28);
}

.sdm-hm-cell--heat4 {
  background: rgba(185, 120, 247, 0.32) !important;
  border: 1px solid rgba(185, 120, 247, 0.42);
}

.sdm-hm-cell--heat5 {
  background: rgba(185, 120, 247, 0.48) !important;
  border: 1px solid rgba(24, 231, 255, 0.38);
  box-shadow: 0 0 0 1px rgba(24, 231, 255, 0.12) inset;
}

@media (max-width: 520px) {
  .stream-day-detail-modal .stream-day-modal__panel--showcase {
    padding: 1.35rem 1.1rem 1.25rem;
    width: min(100%, 96vw);
    max-width: min(100%, 96vw);
    border-radius: 16px;
  }

  .sdm-hm-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .sdm-heatmap-root {
    gap: 8px;
    grid-template-columns: minmax(2.75rem, 3.25rem) repeat(var(--sdm-cols), minmax(0, 1fr));
  }

  .sdm-hm-cell,
  .sdm-hm-cell--void {
    min-height: 44px;
    height: 44px;
    font-size: 0.95rem;
  }
}

.main-chart-roll-year {
  margin: 0 0 1rem;
}

.main-chart-period-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.35rem;
}

.main-chart-period-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.main-chart-period-field .main-chart-roll-year__sel {
  min-width: 10.5rem;
}

.main-chart-roll-year__lbl {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(232, 234, 255, 0.82);
}

.main-chart-roll-year__sel {
  min-width: 12rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(185, 120, 247, 0.28);
  border-radius: 8px;
  color: #e8eaff;
  padding: 6px 28px 6px 10px;
  font-size: 0.84rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a78bfa' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
}

.main-chart-roll-year__sel option {
  background: #1a1030;
  color: #fff;
}

.graph-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.graph-title--main-dash {
  font-size: clamp(1.12rem, 1rem + 0.5vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.graph-header-text .graph-title--main-dash + .graph-panel-desc {
  font-size: 0.93rem;
  line-height: 1.5;
  color: rgba(232, 234, 255, 0.82);
}

.graph-controls {
  display: flex;
  gap: 0.75rem;
}
.graph-controls select {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(185,120,247,0.25);
  border-radius: 8px;
  color: #e8eaff;
  padding: 5px 28px 5px 10px;
  font-size: 0.82rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a78bfa' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
}
.graph-controls select option {
  background: #1a1030;
  color: #fff;
}

.graph-canvas-wrapper {
  width: 100%;
  height: 320px;
  min-height: 320px;
  position: relative;
  contain: layout style;
}

.graph-card.full .graph-canvas-wrapper {
  height: 360px;
  min-height: 360px;
  margin-top: 1.1rem;
}

.graph-canvas-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ================== STAT CARDS ================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.settings-page .stat-card {
  background: linear-gradient(145deg, rgba(24,231,255,0.05), rgba(185,120,247,0.07)) !important;
  border-radius: 20px;
  border: 1px solid rgba(24,231,255,0.18) !important;
  padding: 1.8rem;
  box-shadow: 0 0 22px rgba(24,231,255,0.12);
  transition: box-shadow 0.25s ease;
}

.settings-page .stat-card:hover {
  box-shadow: 0 8px 36px rgba(24,231,255,0.1), 0 0 48px rgba(185,120,247,0.05);
}

.stat-item {
  background: rgba(42, 28, 80, 0.45);
  padding: 0.8rem 1rem;
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: space-between;
  border-radius: 12px;
  transition: 0.2s;
}

.stat-item:hover {
  background: rgba(24,231,255,0.12);
  transform: translateX(3px);
}

.stat-item-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: #18e7ff;
}

/* ================== RESPONSIVE ================== */
@media (max-width: 1400px) {
  .graph-card.half,
  .graph-card.third {
    grid-column: span 12;
  }
  .settings-wrapper {
    grid-template-columns: minmax(260px, 280px) 1fr;
  }
}

@media (max-width: 900px) {
  .settings-wrapper {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
  .sidebar {
    height: auto;
    position: relative;
    border-radius: 14px;
    border-left: 1px solid rgba(145, 70, 255, 0.18);
  }
}

/* ========================= PROTECTION REVENUS (DONUT) ========================= */
.revenue-card.locked .graph-header,
.revenue-card.locked .graph-canvas-wrapper,
.revenue-card.locked .revenue-graph-hints {
  filter: blur(12px);
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
}

.revenue-card.locked .revenue-graph-hints {
  display: none !important;
}

.revenue-card .revenue-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 20px;
  border: none;
  z-index: 10;
  pointer-events: auto;
  cursor: pointer;
}

.revenue-card:not(.locked) .revenue-overlay {
  display: none;
}

.revenue-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
}

.revenue-card.locked {
  cursor: pointer;
}

.revenue-graph-header {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

.revenue-graph-kpi-left {
  justify-content: center;
}

.revenue-card .kpi-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Donut : carré large, remplit la carte (sans boucle resize). */
.graph-canvas-wrapper--revenue {
  position: relative;
  flex: 1 1 auto;
  width: min(100%, 30rem);
  max-width: 100%;
  aspect-ratio: 1;
  min-height: 17.5rem;
  max-height: min(30rem, 58vh);
  margin: 0 auto;
  overflow: hidden;
  align-self: center;
}

.graph-canvas-wrapper--revenue canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

@media (min-width: 900px) {
  .graph-canvas-wrapper--revenue {
    width: min(100%, 32rem);
    max-height: min(32rem, 62vh);
  }
}

/* Même DA que la KPI revenus du haut */
.revenue-card .kpi-card-cta {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  margin-top: 0;
  padding-top: 0.55rem;
  flex-shrink: 0;
}

.revenue-card:not(.locked) .kpi-card-cta--revenue-detail {
  display: flex;
}

.revenue-card.locked .kpi-card-cta--revenue-detail {
  display: none !important;
}

.revenue-card.locked .kpi-revenue-footer,
.revenue-card.locked .revenue-graph-footer {
  display: none !important;
}

.revenue-card:not(.locked) .kpi-revenue-footer,
.revenue-card:not(.locked) .revenue-graph-footer {
  display: flex;
  margin-top: auto;
  align-self: stretch;
  padding-top: 0.55rem;
}

.revenue-graph-hints {
  width: 100%;
  margin: 0;
  padding: 0 0.75rem 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  color: rgba(232, 234, 255, 0.58);
  flex-shrink: 0;
}

.rev-modal-shell--pending {
  min-height: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rev-modal-loading {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(232, 234, 255, 0.78);
}

#revenueCard .kpi-revenue-relock-btn.novia-text-btn {
  width: auto !important;
  padding: 0 !important;
  text-align: center;
  font-size: 0.82rem;
  text-shadow: none;
}

#revenueCard .kpi-revenue-relock-btn.novia-text-btn:hover {
  text-shadow: none;
}

#revenueCard #revenue-graph-period.kpi-footer-select,
#revenueCard select.kpi-revenue-period-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent !important;
  border: 0 !important;
  margin: 0;
  cursor: pointer;
  text-align: center;
  text-align-last: center;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0;
  border-radius: 0;
  min-width: 0;
  max-width: 100%;
  width: auto;
  line-height: 1.35;
  box-shadow: none !important;
  transition: color 0.18s ease;
}

#revenueCard #revenue-graph-period::-ms-expand {
  display: none;
}

#revenueCard #revenue-graph-period:hover {
  color: #18e7ff;
  background: transparent !important;
}

#revenueCard #revenue-graph-period:focus,
#revenueCard #revenue-graph-period:focus-visible {
  outline: none;
  box-shadow: none !important;
}

#revenueCard #revenue-graph-period option {
  background: #0c1222;
  color: #e8eaff;
}

/* ================== MODAL REVENUS ================== */
.revenue-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 9999;
}

.revenue-modal.open {
  display: flex;
}

.revenue-modal-box {
  background: #10072c;
  padding: 2rem;
  width: 420px;
  max-width: 92vw;
  border-radius: 16px;
  border: 1px solid #18e7ff55;
  text-align: center;
  box-shadow: 0 0 35px rgba(24,231,255,0.4);
}

.revenue-modal-box .rev-title {
  color: #18e7ff;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.revenue-modal-box .rev-desc {
  font-size: 0.95rem;
  color: #d5d8ff;
  margin-bottom: 1.5rem;
}

.rev-input {
  width: 100%;
  padding: 12px;
  background: #0a031d;
  border: 1px solid #b978f7aa;
  border-radius: 10px;
  color: white;
  margin-bottom: 1.4rem;
  font-size: 0.95rem;
}

.rev-input::placeholder {
  color: #7d7bb2;
}

.rev-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.2rem;
}

.rev-btn {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-weight: 900;
  cursor: pointer;
  font-size: 0.95rem;
}

.rev-btn.cancel {
  background: #3c1b7a;
  color: #fff;
}

.rev-btn.confirm {
  background: linear-gradient(90deg, #18e7ff, #b978f7);
  color: #0a031d;
}

/* ============================================================
   PROTECTION REVENUS — KPI
============================================================ */
.kpi-revenue.locked .kpi-header,
.kpi-revenue.locked .kpi-value,
.kpi-revenue.locked .kpi-revenue-value-stack,
.kpi-revenue.locked .kpi-revenue-bits-sub {
  filter: blur(12px);
  opacity: 0.35;
  user-select: none;
  pointer-events: none;
}

.kpi-revenue .kpi-revenue-overlay {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  pointer-events: auto;
  z-index: 10;
  cursor: pointer;
}

.kpi-revenue:not(.locked) .kpi-revenue-overlay {
  display: none;
}

/* Une seule zone d’action quand c’est verrouillé (évite CTA + overlay redondants) */
.kpi-revenue.locked .kpi-card-cta--revenue-unlock {
  display: none !important;
}

/* Déverrouillé : pas de double CTA « revenus protégés » sous la carte */
.kpi-revenue:not(.locked) .kpi-card-cta--revenue-unlock {
  display: none !important;
}

.kpi-revenue.locked .kpi-card-cta--revenue-detail {
  display: none !important;
}

.kpi-revenue:not(.locked) .kpi-card-cta--revenue-detail {
  display: flex;
}

.kpi-revenue:not(.locked) .kpi-revenue-bits-sub {
  display: none !important;
}

/* Modale revenus — alignée modales site + cartes + courbe annuelle */
.chart-explorer-panel.chart-explorer-panel--revenue {
  width: min(580px, 94vw) !important;
  max-width: 580px;
  max-height: min(90vh, 680px);
  overflow: hidden;
}

.chart-explorer-panel--revenue .chart-explorer-head {
  margin-bottom: 0.75rem;
}

.chart-explorer-panel--revenue .modal__title {
  margin: 0 52px 0.25rem 0;
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: left;
  color: #e8eaff;
}

.chart-explorer-panel--revenue .chart-explorer-body {
  gap: 0;
  padding: 0;
}

.chart-explorer-revenue-detail {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.chart-explorer-revenue-detail[hidden] {
  display: none !important;
}

.chart-explorer-panel.chart-explorer-panel--growth .chart-explorer-canvas-wrap {
  flex-shrink: 0;
  overflow: hidden;
}

.chart-explorer-radar-slot {
  position: relative;
  width: 100%;
}

.chart-explorer-panel--growth .chart-explorer-radar-slot {
  width: min(100%, 400px);
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 1;
  max-height: min(380px, 38vh);
  overflow: hidden;
}

.chart-explorer-panel--growth .chart-explorer-radar-slot canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.chart-explorer-growth-detail[hidden] {
  display: none !important;
}

.chart-explorer-growth-detail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.chart-explorer-growth-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.chart-explorer-growth-period-field {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
}

.chart-explorer-growth-period-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(232, 234, 255, 0.55);
}

.chart-explorer-growth-period-select {
  font-size: 0.78rem;
}

.chart-explorer-growth-hint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(232, 234, 255, 0.62);
}

.chart-explorer-growth-raw {
  margin: 0;
}

.growth-explorer-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (max-width: 720px) {
  .growth-explorer-insights {
    grid-template-columns: 1fr;
  }
}

.growth-explorer-insight {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(12, 18, 34, 0.45);
  border: 1px solid rgba(24, 231, 255, 0.1);
}

.growth-explorer-insight__lbl {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(232, 234, 255, 0.52);
  margin-bottom: 0.25rem;
}

.growth-explorer-insight__val {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #e8eaff;
  line-height: 1.35;
}

.growth-explorer-insight__val.is-up {
  color: #4ade80;
}

.growth-explorer-insight__val.is-down {
  color: #fda4af;
}

.growth-explorer-insight__val.is-neutral {
  color: rgba(232, 234, 255, 0.78);
}

.growth-explorer-section {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.growth-explorer-section__title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(232, 234, 255, 0.72);
}

.growth-explorer-section__hint {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(232, 234, 255, 0.55);
}

.growth-explorer-messages-wrap {
  position: relative;
  min-height: 180px;
  height: 200px;
  max-height: 200px;
  overflow: hidden;
  border-radius: 12px;
  padding: 0.35rem 0.25rem 0.15rem;
  background: rgba(8, 11, 22, 0.35);
  border: 1px solid rgba(185, 120, 247, 0.12);
}

.growth-explorer-messages-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.growth-explorer-peak-context {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: rgba(232, 234, 255, 0.78);
}

.chart-explorer-panel.chart-explorer-panel--growth {
  width: min(720px, 96vw) !important;
  max-width: 720px;
  max-height: min(92vh, 900px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chart-explorer-panel--growth .chart-explorer-head {
  flex-shrink: 0;
}

.chart-explorer-panel--growth .chart-explorer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.chart-explorer-panel--growth .chart-explorer-canvas-wrap {
  flex-shrink: 0;
  overflow: hidden;
}

.chart-explorer-panel--growth .chart-explorer-canvas-wrap::before {
  content: 'Comparaison relative';
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(232, 234, 255, 0.72);
}

/* —— Modale heures de pointe (détail chat, pas duplicate carte) —— */
.chart-explorer-peak-detail[hidden] {
  display: none !important;
}

.chart-explorer-peak-detail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.chart-explorer-peak-hint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(232, 234, 255, 0.62);
}

.chart-explorer-peak-hint strong {
  color: rgba(24, 231, 255, 0.95);
  font-weight: 700;
}

.chart-explorer-peak-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}

.chart-explorer-peak-period-host .chart-explorer-field {
  margin: 0;
}

.chart-explorer-peak-tz-field {
  display: inline-flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  min-width: min(220px, 100%);
}

.chart-explorer-peak-tz-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(232, 234, 255, 0.55);
}

.chart-explorer-peak-insights {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .chart-explorer-peak-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.chart-explorer-peak-top__title {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(232, 234, 255, 0.72);
}

.chart-explorer-peak-top__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.chart-explorer-peak-top__list li {
  display: grid;
  grid-template-columns: 1.4rem 3.2rem 1fr auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  background: rgba(12, 18, 34, 0.45);
  border: 1px solid rgba(24, 231, 255, 0.08);
  font-size: 0.78rem;
}

.chart-explorer-peak-top__list li.is-empty {
  grid-template-columns: 1fr;
  color: rgba(232, 234, 255, 0.5);
  font-style: italic;
}

.chart-explorer-peak-top__list .peak-top-rank {
  font-weight: 800;
  color: rgba(24, 231, 255, 0.85);
}

.chart-explorer-peak-top__list .peak-top-hour {
  font-weight: 700;
  color: #e8eaff;
}

.chart-explorer-peak-top__list .peak-top-vol {
  color: rgba(196, 181, 253, 0.95);
}

.chart-explorer-peak-top__list .peak-top-pct {
  font-size: 0.72rem;
  color: rgba(232, 234, 255, 0.52);
}

.chart-explorer-peak-window {
  margin: 0;
  font-size: 0.72rem;
  color: rgba(232, 234, 255, 0.48);
}

.chart-explorer-panel.chart-explorer-panel--peak {
  width: min(680px, 96vw) !important;
  max-width: 680px;
}

.chart-explorer-panel--peak .chart-explorer-canvas-wrap {
  min-height: 220px;
}

.chart-explorer-panel--peak .chart-explorer-canvas-wrap::before {
  content: 'Répartition sur 24 h';
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(232, 234, 255, 0.72);
}

.rev-modal-shell {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: min(72vh, 560px);
  overflow-x: hidden;
  overflow-y: auto;
}

.rev-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 0.65rem;
}

.rev-metric-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 4.35rem;
  max-height: 4.35rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(24, 231, 255, 0.06), rgba(124, 58, 237, 0.04) 48%, rgba(0, 0, 0, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rev-metric-card:hover {
  border-color: rgba(24, 231, 255, 0.22);
  transform: translateY(-1px);
}

.rev-metric-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 12px 0 0 12px;
  opacity: 0.9;
}

.rev-metric-card--total::before {
  inset: 0 0 0 auto;
  border-radius: 0 12px 12px 0;
  background: linear-gradient(180deg, #18e7ff, #7c3aed);
}

.rev-metric-card--bits::before {
  background: #b978f7;
}

.rev-metric-card--subs::before {
  background: #18e7ff;
}

.rev-metric-card--mini {
  min-height: 3.5rem;
  padding: 0.55rem 0.65rem;
}

.rev-metric-card--mini::before {
  background: rgba(196, 181, 253, 0.55);
}

.rev-metric-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(232, 234, 255, 0.55);
}

.rev-metric-value {
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: #f3f5ff;
}

.rev-metric-card--total {
  background: linear-gradient(155deg, rgba(24, 231, 255, 0.12), rgba(124, 58, 237, 0.08));
  border-color: rgba(24, 231, 255, 0.22);
}

.rev-metric-card--total .rev-metric-value {
  font-size: 1.55rem;
  color: #18e7ff;
  text-shadow: 0 0 24px rgba(24, 231, 255, 0.35);
}

.rev-metric-card--bits .rev-metric-value {
  color: #d4b4ff;
}

.rev-metric-card--subs .rev-metric-value {
  color: #7ef0ff;
}

.rev-modal-context {
  margin: 0.35rem 0 0;
  min-height: 1.15rem;
  max-height: 1.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(196, 181, 253, 0.82);
}

.rev-modal-context[hidden] {
  display: block !important;
  visibility: hidden;
  min-height: 1.15rem;
  max-height: 1.15rem;
  margin: 0.35rem 0 0;
}

.rev-activity-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.rev-chart-section {
  padding: 0.5rem 0.55rem 0.5rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rev-month-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.rev-year-badge {
  flex: 0 0 auto;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #e8eaff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.rev-year-badge:hover,
.rev-year-badge:focus-visible {
  border-color: rgba(24, 231, 255, 0.35);
  outline: none;
}

.rev-year-badge.is-active {
  color: #0c1222;
  background: #18e7ff;
  border-color: #18e7ff;
}

.rev-month-pill {
  flex: 0 0 auto;
  min-width: 2.35rem;
  padding: 0.26rem 0.4rem;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  color: rgba(232, 234, 255, 0.62);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.rev-month-pill:hover,
.rev-month-pill:focus-visible {
  color: #e8eaff;
  border-color: rgba(24, 231, 255, 0.35);
  outline: none;
}

.rev-month-pill.is-active {
  color: #0c1222;
  background: #18e7ff;
  border-color: #18e7ff;
}

.rev-chart-wrap {
  position: relative;
  height: 168px;
  min-height: 168px;
  max-height: 168px;
  width: 100%;
}

.rev-chart-wrap--loading {
  opacity: 0.55;
}

.rev-chart-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 560px) {
  .rev-metrics-grid {
    grid-template-columns: 1fr;
  }

  .rev-activity-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============================================
   Bouton Revenus protégés — Style texte propre
============================================ */
.rev-lock-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: #ffffff;
  font-size: 1.0rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.18);
  transition: 0.18s ease;
  pointer-events: auto;
}

.rev-lock-btn:hover {
  color: #18e7ff;
  text-shadow: 0 0 14px rgba(24, 231, 255, 0.85);
  transform: translateY(-1px);
}

/* ================== MODAL REVENUS — BOUTONS TEXTE ================== */
.rev-text-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rev-text-btn:hover {
  color: #18e7ff;
  text-shadow: 0 0 6px rgba(24, 231, 255, 0.35);
}

.rev-text-btn.primary {
  font-weight: 800;
}

.rev-text-btn.primary:hover {
  color: #18e7ff;
  text-shadow: 0 0 8px rgba(24, 231, 255, 0.4);
}

/* ===================== SYSTEME DE TABS (OBLIGATOIRE) ===================== */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ================================================================================= */
/* =========================      MON COMPTE — FULL FINAL CSS     ================== */
/* ================================================================================= */

/* ================= MON COMPTE ================= */
.tab-panel[data-tab="account"] {
  padding: 32px 26px 40px !important;
}

/* Config : titre aligné avec le haut de la sidebar comme les autres onglets */
.tab-panel[data-tab="config"] {
  padding: 0 26px 40px !important;
}

.tab-panel.active[data-tab="account"],
.tab-panel.active[data-tab="config"] {
  display: block;
}

/* ========================= Container ========================= */
.account-container {
  max-width: 1450px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
  margin-bottom: 3rem;
}

/* Collé à la sidebar : titre et contenu alignés à gauche comme les autres onglets */
.tab-panel[data-tab="config"] .account-container,
.tab-panel[data-tab="account"] .account-container {
  margin-left: 0;
  margin-right: auto;
  max-width: 100%;
}

/* ================================================================================= */
/* =========================   TITRES CARTES — UNIFIÉS ============================== */
/* ================================================================================= */

.card-title {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: .4px;
  margin-bottom: 1.8rem;
  color: #ffffff;
  text-shadow: 0 0 6px rgba(24,231,255,0.15);
}

/* ================================================================================= */
/* =========================   CARTES NOVIABOT PREMIUM ============================== */
/* ================================================================================= */

.account-card {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 34px 38px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.account-card:hover {
  background: rgba(255,255,255,0.06);
  box-shadow: 0 6px 28px rgba(24,231,255,0.06);
}

/* ================================================================================= */
/* ==========================   LIGNES STRUCTURÉES ================================= */
/* ================================================================================= */

.account-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  transition: background 0.18s ease;
}

.account-line:nth-child(even) {
  background: rgba(255,255,255,0.02);
}

.account-line:hover {
  background: rgba(24,231,255,0.05);
}

.account-line:last-child {
  border-bottom: none;
}

/* Label */
.line-label {
  font-size: 1.28rem;
  font-weight: 700;
  color: #eef1ff;
  letter-spacing: 0.2px;
}

/* Zone droite valeur + bouton */
.line-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.line-value {
  font-size: 1.18rem;
  font-weight: 900;
  color: #cfd1ff;
}

/* ================================================================================= */
/* =============================   BADGES PREMIUM ================================== */
/* ================================================================================= */

.status-badge {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 900;
  text-transform: none;
  box-shadow: 0 0 8px rgba(0,0,0,0.25);
}

.status-badge.ok {
  background: rgba(0,255,150,0.16);
  color: #2bffb6;
}

.status-badge.warn {
  background: rgba(255,200,0,0.20);
  color: #ffd966;
}

.status-badge.danger {
  background: rgba(255,72,125,0.22);
  color: #ff5f8e;
}

.status-badge.neutral {
  background: rgba(150,150,200,0.20);
  color: #d6d8f0;
}

.status-badge.small {
  padding: 5px 12px;
  font-size: 0.95rem;
}

/* ================================================================================= */
/* ===========================   BOUTONS PREMIUM =================================== */
/* ================================================================================= */

.line-btn,
.account-btn,
.reset-btn,
.text-btn {
  background: rgba(24,231,255,0.12);
  border: 1px solid rgba(24,231,255,0.35);
  padding: 7px 20px;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  color: #ffffff;
  transition: 0.22s ease;
  box-shadow: 0 0 10px rgba(24,231,255,0.18);
}

.line-btn:hover,
.account-btn:hover,
.reset-btn:hover,
.text-btn:hover {
  background: rgba(24,231,255,0.28);
  border-color: #18e7ff;
  box-shadow: 0 0 14px rgba(24,231,255,0.35);
}

/* Bouton danger */
.line-btn.danger,
.account-btn.danger,
.text-btn.danger {
  background: rgba(255,72,125,0.12);
  border-color: rgba(255,72,125,0.35);
  box-shadow: 0 0 10px rgba(255,72,125,0.18);
}

.line-btn.danger:hover,
.account-btn.danger:hover,
.text-btn.danger:hover {
  background: rgba(255,72,125,0.28);
  border-color: #ff487d;
  box-shadow: 0 0 14px rgba(255,72,125,0.35);
}

/* ================================================================================= */
/* ===========================  RÉINITIALISATIONS  ================================= */
/* ================================================================================= */

.reset-btn {
  width: fit-content;
  margin-left: auto;
}

/* ================================================================================= */
/* ===========================  ZONE DANGEREUSE  =================================== */
/* ================================================================================= */

.danger-zone {
  padding: 2.2rem;
  border-radius: 18px;
  background: rgba(255,20,70,0.08);
  border: 1px solid rgba(255,70,120,0.35);
  box-shadow: 0 0 12px rgba(255,20,70,0.25);
}

.danger-title {
  font-size: 1.9rem;
  font-weight: 900;
  margin-bottom: 0.8rem;
  color: #ff487d;
  text-shadow: 0 0 10px rgba(255,70,120,0.30);
}

.danger-desc {
  font-size: 1.15rem;
  opacity: .9;
  margin-bottom: 1.4rem;
  color: #ffd9e4;
}

.danger-btn {
  background: rgba(255,72,125,0.15);
  border: 1px solid rgba(255,72,125,0.35);
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 1.35rem;
  font-weight: 900;
  color: #ff5f8e;
  cursor: pointer;
  transition: 0.2s ease;
}

.danger-btn:hover {
  background: rgba(255,72,125,0.28);
  border-color: #ff487d;
  color: #ff7aa8;
  box-shadow: 0 0 18px rgba(255,70,120,0.45);
}

/* ============================================================ */
/*                  MODALE REVENUS — VERSION FINALE             */
/* ============================================================ */

#revenueModal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}

#revenueModal[aria-hidden="false"] {
  display: flex;
}

#revenueModal .modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

/* Panel harmonisé au style BETA / CONTACT / STARTER */
#revenueModal .revenue-panel {
  width: min(540px, 94vw);
  padding: 36px 42px;
  background: rgba(20, 10, 40, 0.8);
  border: 2px solid rgba(145, 70, 255, 0.4);
  border-radius: 22px;
  box-shadow: 0 0 32px rgba(145, 70, 255, 0.4);
  backdrop-filter: blur(18px);
  text-align: center;
  color: #fff;
  position: relative;
  margin: 0 auto;
  animation: modalFadeIn 0.2s ease-out;
}

/* Close — même taille que setup, grande croix, effet rotation au survol */
#revenueModal .modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 48px;
  height: 48px;
  font-size: 30px;
  line-height: 1;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.25s ease;
}

#revenueModal .modal__close:hover {
  background: rgba(255, 72, 125, 0.2);
  border-color: #ff487d;
  color: #ff487d;
  transform: rotate(90deg) scale(1.08);
}

/* Title */
#revenueModal .modal__title {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 16px;
  color: #fff;
  text-shadow: 0 0 12px rgba(24, 231, 255, 0.35);
}

/* Desc */
#revenueModal .modal__desc {
  font-size: 17px;
  color: #e8eaff;
  line-height: 1.55;
  margin-bottom: 24px;
}

/* Input */
#revenueModal .modal__input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(24, 231, 255, 0.35);
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  margin-bottom: 20px;
  outline: none;
  transition: all 0.2s ease;
}

#revenueModal .modal__input:focus {
  border-color: #18e7ff;
  box-shadow: 0 0 0 3px rgba(24, 231, 255, 0.2);
}

#revenueModal .modal__input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

#revenueModal .revenue-pin-hint {
  font-size: 15px;
  color: rgba(232, 234, 255, 0.88);
  margin-top: -8px;
  margin-bottom: 8px;
}

#revenueModal .revenue-pin-feedback {
  font-size: 15px;
  font-weight: 700;
  margin: 10px 0 4px;
  min-height: 1.2em;
}

#revenueModal .revenue-pin-feedback.is-error {
  color: #ff6b8a;
}

#revenueModal .revenue-pin-feedback.is-ok {
  color: #5dffc3;
}

#revenueModal .revenue-pin-extra-actions {
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Actions (harmonisées avec BETA, CONTACT, STARTER) */
#revenueModal .modal__actions {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 22px;
}

/* Boutons texte officiels NOVIABOT */
#revenueModal .novia-text-btn {
  background: none;
  border: none;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Hover identique aux autres modales (bleu) */
#revenueModal .novia-text-btn:hover {
  color: #18e7ff;
  text-shadow: 0 0 6px rgba(24, 231, 255, 0.35);
}

/* Bouton annuler */
#revenueModal .novia-text-btn.close-btn {
  opacity: .85;
}

#revenueModal .novia-text-btn.close-btn:hover {
  opacity: 1;
}

/* Animation */
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* ================== MODALE ÉDITION PHOTO PROFIL ================== */
#ppEditorModal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}

#ppEditorModal[aria-hidden="false"],
#ppEditorModal.open {
  display: flex;
}

#ppEditorModal .modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

#ppEditorModal .pp-editor-panel {
  width: min(520px, 96vw);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 28px 26px 22px;
  background: rgba(20, 10, 40, 0.92);
  border: 2px solid rgba(145, 70, 255, 0.4);
  border-radius: 22px;
  box-shadow: 0 0 32px rgba(145, 70, 255, 0.35);
  backdrop-filter: blur(18px);
  text-align: center;
  color: #fff;
  position: relative;
  margin: 0 auto;
  z-index: 1;
  animation: modalFadeIn 0.2s ease-out;
}

#ppEditorModal .modal__title {
  font-size: 1.35rem;
  font-weight: 900;
  margin: 0 0 0.5rem;
}

#ppEditorModal .pp-editor-hint {
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(232, 234, 255, 0.82);
  margin: 0 0 1rem;
}

#ppEditorModal .pp-editor-viewport {
  width: min(420px, 88vw);
  height: min(420px, 88vw);
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(24, 231, 255, 0.45);
  box-shadow: 0 0 24px rgba(24, 231, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  cursor: grab;
  touch-action: none;
  position: relative;
}

#ppEditorModal .pp-editor-viewport:active {
  cursor: grabbing;
}

#ppEditorModal .pp-editor-viewport--empty {
  cursor: default;
}

#ppEditorModal .pp-editor-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translate(var(--pp-x, 0px), var(--pp-y, 0px)) scale(var(--pp-s, 1));
  transform-origin: center center;
  pointer-events: none;
  user-select: none;
}

#ppEditorModal .pp-editor-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.5rem;
  font-weight: 900;
  color: #18e7ff;
  text-shadow: 0 0 20px rgba(24, 231, 255, 0.45);
  pointer-events: none;
}

#ppEditorModal .pp-editor-toolbar {
  margin-bottom: 0.5rem;
}

#ppEditorModal .modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s;
}

#ppEditorModal .modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
}

#ppEditorModal .modal__actions {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 12px;
  flex-wrap: wrap;
}

#ppEditorModal .novia-text-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ================== CONFIGURATION PRINCIPALE ================== */
/* Grille 2 colonnes : gauche | droite (Commandes | Annonces, puis Notifications | Protections) */
.config-encarts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: start;
}

.config-page .config-encart {
  background: linear-gradient(145deg, rgba(27, 13, 68, 0.85), rgba(45, 25, 95, 0.9));
  border: 1px solid rgba(185, 120, 247, 0.3);
  border-radius: 20px;
  padding: 1.75rem 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(24, 231, 255, 0.08);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.config-page .config-encart:hover {
  border-color: rgba(24, 231, 255, 0.35);
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.35), 0 0 25px rgba(24, 231, 255, 0.12);
}

.config-encart-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.5rem;
}

.config-encart-desc {
  color: #cfd4ff;
  font-size: 0.95rem;
  margin: 0 0 1rem;
  opacity: 0.95;
}

/* Grille pour les sections repliables en dessous : gauche | droite */
.config-expandables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.config-page .config-expandables-grid .expandable-section {
  margin-bottom: 0;
}

/* Encart pleine largeur (ex. Emotes) */
.config-encart-full {
  grid-column: 1 / -1;
}

.config-page .config-encart.config-encart-full {
  margin-top: 0.5rem;
}

/* Section Emotes : préfixe Twitch */
.config-encart-emotes .config-emote-prefix-row {
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1rem;
}

.config-encart-emotes .config-emote-prefix-row label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #cfd4ff;
  margin: 0;
}

.config-encart-emotes .config-emote-prefix-input {
  width: 12rem;
  max-width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(185, 120, 247, 0.3);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  color: #e8eaff;
  font-size: 0.95rem;
}

.config-encart-emotes .config-emote-prefix-hint {
  font-size: 0.9rem;
  color: #8a94b0;
  flex: 1;
  min-width: 200px;
}

.config-encart-emotes .config-emote-prefix-hint strong {
  color: #18e7ff;
}

/* Message "côté humain" : le bot comprend le contexte sans obligatoirement des commandes */
.config-emotes-human-badge {
  font-size: 0.9rem;
  color: #a8b4e0;
  background: rgba(24, 231, 255, 0.08);
  border-left: 3px solid rgba(24, 231, 255, 0.5);
  padding: 0.6rem 0.9rem;
  margin: 0 0 1rem;
  border-radius: 0 8px 8px 0;
  line-height: 1.4;
}
.config-emotes-human-badge strong {
  color: #18e7ff;
}

/* Zone upload emotes : glisser-déposer + clic */
.emote-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 100px;
  margin-bottom: 1.25rem;
  padding: 1.25rem;
  border: 2px dashed rgba(24, 231, 255, 0.35);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.emote-upload-zone:hover,
.emote-upload-zone.dragover {
  border-color: rgba(24, 231, 255, 0.6);
  background: rgba(24, 231, 255, 0.06);
}
.emote-upload-plus {
  font-size: 2rem;
  font-weight: 700;
  color: #18e7ff;
  line-height: 1;
}
.emote-upload-text {
  font-size: 0.9rem;
  color: #8a94b0;
}
.emote-upload-hint {
  font-size: 0.8rem;
  color: #8a94b0;
  margin: -0.5rem 0 1rem;
}
.emote-code-only-hint {
  font-size: 0.8rem;
  color: #8a94b0;
  margin: 0.35rem 0 0;
}

/* Grille emotes (taille Twitch 28x28) */
.emote-grid-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #cfd4ff;
  margin: 1rem 0 0.75rem;
}
/* Liste emotes : hauteur limitée + scroll interne pour ne pas étirer le panneau droit */
.emote-list-scroll {
  max-height: 380px;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 0.5rem;
  padding-right: 0.25rem;
}
.emote-list-scroll::-webkit-scrollbar {
  width: 8px;
}
.emote-list-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.emote-list-scroll::-webkit-scrollbar-thumb {
  background: rgba(24, 231, 255, 0.35);
  border-radius: 4px;
}
.emote-list-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(24, 231, 255, 0.5);
}

.emote-grid-hint {
  font-size: 0.8rem;
  color: rgba(138, 148, 176, 0.95);
  margin: 0 0 0.75rem;
}

/* Suggestions emotes (ajout en un clic) */
.emote-suggestions-wrap {
  margin-bottom: 1rem;
}
.emote-suggestions-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(200, 210, 255, 0.95);
  margin: 0 0 0.5rem;
}
.emote-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.emote-suggestion-btn {
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(24, 231, 255, 0.95);
  background: rgba(24, 231, 255, 0.1);
  border: 1px solid rgba(24, 231, 255, 0.35);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.emote-suggestion-btn:hover {
  background: rgba(24, 231, 255, 0.2);
  border-color: rgba(24, 231, 255, 0.5);
  color: #fff;
}

.emote-actions-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #cfd4ff;
  margin-bottom: 0.5rem;
}
.emote-actions-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.emote-action-cb {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(220, 225, 255, 0.95);
  cursor: pointer;
}
.emote-action-cb input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

/* Déclencheurs (commandes chat) par emote */
.emote-triggers-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #cfd4ff;
  margin: 0 0 0.35rem;
}
.config-emote-triggers-input {
  width: 100%;
  max-width: 28rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(185, 120, 247, 0.3);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  color: #e8eaff;
  font-size: 0.95rem;
  box-sizing: border-box;
}
.config-emote-triggers-input::placeholder {
  color: #6a7090;
}
.emote-triggers-hint {
  font-size: 0.85rem;
  color: #8a94b0;
  margin: 0.35rem 0 0;
}

/* Grille emotes : style Twitch — grande vignette + nom + actions */
.config-encart-emotes .emote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.config-encart-emotes .emote-grid .config-command-item.emote-slot {
  flex-direction: column;
  align-items: center;
  padding: 0.75rem;
  margin: 0;
  min-width: 0;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  border: 1px solid rgba(24, 231, 255, 0.15);
}
.emote-slot-preview {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}
.emote-card-thumb {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}
.emote-card-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: rgba(24, 231, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #18e7ff;
  flex-shrink: 0;
}
.emote-card-thumb-loading {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  animation: emote-loading-pulse 1s ease-in-out infinite;
}
@keyframes emote-loading-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.emote-card-thumb-fallback {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: rgba(24, 231, 255, 0.2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #e8eaff;
  text-align: center;
  line-height: 1;
  padding: 4px;
  overflow: hidden;
}
.config-encart-emotes .emote-grid .config-command-item .trigger {
  min-width: 0;
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e8eaff;
}
.config-encart-emotes .emote-grid .config-command-item .response {
  display: none;
}
.config-encart-emotes .emote-grid .config-command-item .actions {
  margin-top: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
}
.config-encart-emotes .emote-grid .config-command-item .actions button {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
}
.emote-form-preview {
  width: 28px;
  height: 28px;
  margin: 0.25rem 0;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
}
.emote-form-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.emote-replace-btn { margin-top: 0.25rem; }

/* Formulaire emote : input file toujours invisible (déclenché par bouton) */
.config-encart-emotes .emote-file-input-hidden,
.config-emote-form input.emote-file-input-hidden {
  position: absolute !important;
  left: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}
.config-form-row-image.hidden {
  display: none !important;
}
.config-emote-form-subtitle {
  font-size: 0.9rem;
  color: rgba(200, 210, 255, 0.9);
  margin: 0 0 1rem;
  line-height: 1.45;
}
.config-emote-form .config-form-row:first-of-type {
  margin-top: 0;
}
.emote-form-image-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.emote-form-image-block .emote-form-preview {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(185, 120, 247, 0.25);
}
.emote-form-image-block .emote-form-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.emote-replace-btn-styled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(24, 231, 255, 0.95);
  background: rgba(24, 231, 255, 0.1);
  border: 1px solid rgba(24, 231, 255, 0.35);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.emote-replace-btn-styled:hover {
  background: rgba(24, 231, 255, 0.18);
  border-color: rgba(24, 231, 255, 0.5);
  color: #fff;
}

/* Encart Moment du stream (contexte live) */
.config-encart-moment .config-moment-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #18e7ff;
  background: rgba(24, 231, 255, 0.12);
  border: 1px solid rgba(24, 231, 255, 0.35);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  margin-bottom: 1rem;
}

.config-moment-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.config-moment-btn {
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #cfd4ff;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(185, 120, 247, 0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.config-moment-btn:hover {
  color: #fff;
  background: rgba(185, 120, 247, 0.2);
  border-color: rgba(185, 120, 247, 0.5);
}

.config-moment-btn.active {
  color: #fff;
  background: rgba(24, 231, 255, 0.2);
  border-color: rgba(24, 231, 255, 0.6);
  box-shadow: 0 0 12px rgba(24, 231, 255, 0.2);
}

.config-moment-current {
  font-size: 0.95rem;
  color: #8a94b0;
  margin: 0;
}

.config-moment-current strong {
  color: #18e7ff;
}

/* Encart Détection auto du ton : toggle désactiver */
.config-encart-auto-tone .config-auto-tone-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.config-encart-auto-tone .config-auto-tone-toggle-wrap {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.config-encart-auto-tone .config-auto-tone-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.config-encart-auto-tone .config-auto-tone-slider {
  width: 48px;
  height: 26px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(185, 120, 247, 0.4);
  border-radius: 26px;
  transition: background 0.25s, border-color 0.25s;
}

.config-encart-auto-tone .config-auto-tone-slider::after {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  margin: 2px 0 0 2px;
  background: #8a94b0;
  border-radius: 50%;
  transition: transform 0.25s, background 0.25s;
}

.config-encart-auto-tone .config-auto-tone-checkbox:checked + .config-auto-tone-slider {
  background: rgba(24, 231, 255, 0.2);
  border-color: rgba(24, 231, 255, 0.5);
}

.config-encart-auto-tone .config-auto-tone-checkbox:checked + .config-auto-tone-slider::after {
  transform: translateX(22px);
  background: #18e7ff;
}

.config-encart-auto-tone .config-auto-tone-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #cfd4ff;
}

.config-encart-auto-tone .config-auto-tone-hint {
  font-size: 0.9rem;
  color: #8a94b0;
  margin: 0;
}

@media (max-width: 900px) {
  .config-encarts-grid,
  .config-expandables-grid {
    grid-template-columns: 1fr;
  }
}

.config-placeholder-text {
  color: #8a94b0;
  font-size: 0.95rem;
  margin: 0;
}

.config-mod-info {
  color: #8a94b0;
  font-size: 0.9rem;
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  background: rgba(24, 231, 255, 0.06);
  border: 1px solid rgba(24, 231, 255, 0.15);
  border-radius: 10px;
}

.config-commands-toolbar {
  margin-bottom: 1.25rem;
}

.config-command-form {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: rgba(35, 19, 77, 0.5);
  border: 1px solid rgba(185, 120, 247, 0.2);
  border-radius: 14px;
}

.config-command-form.hidden {
  display: none !important;
}

.config-form-row {
  margin-bottom: 1rem;
}

.config-form-row label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #cfd4ff;
  margin-bottom: 0.4rem;
}

.config-form-row input,
.config-form-row textarea,
.config-form-row select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(185, 120, 247, 0.3);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: #e8eaff;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.config-form-row select,
.config-select-visible {
  cursor: pointer;
  appearance: none;
  background-color: #2d195f !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23d8dcff' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
  color: #e8eaff !important;
}

.config-form-row select option,
.config-select-visible option {
  background: #2d195f;
  color: #e8eaff;
  padding: 0.5rem;
}

.config-form-row textarea {
  min-height: 80px;
  resize: vertical;
}

.config-form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.config-command-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.config-command-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  margin-bottom: 0.5rem;
  background: rgba(35, 19, 77, 0.4);
  border: 1px solid rgba(185, 120, 247, 0.15);
  border-radius: 12px;
}

.config-command-item .trigger {
  font-weight: 800;
  color: #18e7ff;
  min-width: 100px;
}

.config-command-item .response {
  flex: 1;
  color: #d8dcff;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.config-command-item .actions {
  display: flex;
  gap: 0.5rem;
}

.config-command-item .actions button {
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(24, 231, 255, 0.15);
  color: #18e7ff;
}

.config-command-item .actions button.delete {
  background: rgba(255, 72, 125, 0.15);
  color: #ff487d;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EVENTS TWITCH
   ═══════════════════════════════════════════════════════════════════════════ */

.config-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* Sections expandables */
.expandable-section {
  background: rgba(35, 19, 77, 0.3);
  border: 1px solid rgba(185, 120, 247, 0.15);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.expandable-section .section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  background: rgba(35, 19, 77, 0.5);
  transition: background 0.2s ease;
}

.expandable-section .section-header:hover {
  background: rgba(35, 19, 77, 0.7);
}

.expandable-section .section-header .icon {
  font-size: 1.2rem;
}

.expandable-section .section-header span:nth-child(2) {
  flex: 1;
  font-weight: 600;
  color: #fff;
}

.expandable-section .section-header .arrow {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.expandable-section .section-content {
  display: none;
  padding: 1.25rem;
  border-top: 1px solid rgba(185, 120, 247, 0.1);
}

.expandable-section .section-content.expanded {
  display: block;
}

/* Variables hint */
.variables-hint {
  background: rgba(24, 231, 255, 0.08);
  border: 1px solid rgba(24, 231, 255, 0.2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.variables-hint strong {
  color: #18e7ff;
}

/* Event rows */
.event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.event-info {
  flex: 1;
}

.event-label {
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
}

.event-desc {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

.event-controls {
  display: flex;
  align-items: center;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

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

.toggle-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-switch .slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .slider {
  background: linear-gradient(135deg, #b978f7 0%, #18e7ff 100%);
}

.toggle-switch input:checked + .slider:before {
  transform: translateX(22px);
}

/* Event message textarea */
.event-message {
  width: 100%;
  min-height: 60px;
  padding: 0.85rem 1rem;
  background: rgba(35, 19, 77, 0.4);
  border: 1px solid rgba(185, 120, 247, 0.2);
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.event-message:focus {
  outline: none;
  border-color: #18e7ff;
  box-shadow: 0 0 0 3px rgba(24, 231, 255, 0.15);
}

.event-message::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
select.event-message option {
  background: #1a1030;
  color: #e8eaff;
}

/* Events actions */
.events-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(185, 120, 247, 0.15);
}

.events-actions .btn-primary,
.events-actions .btn-secondary {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.events-actions .btn-primary {
  background: linear-gradient(135deg, #b978f7 0%, #18e7ff 100%);
  border: none;
  color: #fff;
}

.events-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(185, 120, 247, 0.4);
}

.events-actions .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.events-actions .btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

.events-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Status message */
.status-message {
  text-align: center;
  margin-top: 1rem;
  padding: 0.5rem;
  font-size: 0.9rem;
  border-radius: 8px;
}

.status-message.success {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}

.status-message.error {
  color: #ff487d;
  background: rgba(255, 72, 125, 0.1);
}

.status-message.info {
  color: #18e7ff;
  background: rgba(24, 231, 255, 0.1);
}

.status-message.loading {
  color: rgba(255, 255, 255, 0.6);
}

/* ==================== GEAR & SETUP ==================== */
.gear-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.gear-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gear-item label {
  font-size: 0.8rem;
  color: #a78bfa;
  font-weight: 600;
}
.gear-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(185,120,247,0.25);
  border-radius: 8px;
  color: #fff;
  padding: 7px 10px;
  font-size: 0.85rem;
  transition: border-color 0.2s;
}
.gear-input:focus {
  border-color: #18e7ff;
  outline: none;
  box-shadow: 0 0 8px rgba(24,231,255,0.15);
}
.gear-input::placeholder {
  color: rgba(255,255,255,0.3);
}
/* Select/dropdown - même fond que les inputs */
select.gear-input,
.gear-input[type="select"],
.loadout-game-row select.gear-input {
  background: rgba(255,255,255,0.06);
  color: #fff;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a78bfa' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}
select.gear-input option {
  background: #1a1030;
  color: #fff;
}
select.gear-input option:hover,
select.gear-input option:checked {
  background: rgba(167,139,250,0.3);
}
.gear-item-wide {
  grid-column: 1 / -1;
}

/* Autocomplete loadout accessoires */
.loadout-autocomplete-wrap {
  position: relative;
}
.loadout-autocomplete-list {
  position: absolute;
  z-index: 100;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 180px;
  overflow-y: auto;
  background: #1a1030;
  border: 1px solid rgba(167,139,250,0.35);
  border-radius: 8px;
  margin-top: 2px;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.loadout-autocomplete-list.show {
  display: block;
}
.loadout-ac-item {
  padding: 6px 10px;
  font-size: 0.82rem;
  color: #e0e0ff;
  cursor: pointer;
  transition: background 0.15s;
}
.loadout-ac-item:hover,
.loadout-ac-item.active {
  background: rgba(167,139,250,0.2);
  color: #fff;
}
.loadout-ac-cat {
  padding: 4px 10px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #a78bfa;
  font-weight: 700;
  pointer-events: none;
}
.loadout-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.loadout-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(167,139,250,0.15);
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.78rem;
  color: #cfd4ff;
}
.loadout-tag-remove {
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  font-size: 0.7rem;
  margin-left: 2px;
}
.loadout-tag-remove:hover {
  color: #ff487d;
}

/* ==================== PROTECTIONS & BANTER ==================== */
.protection-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: #e0e0ff;
}
.protection-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #a78bfa;
  cursor: pointer;
}
.protection-separator {
  border-top: 1px solid rgba(185,120,247,0.2);
  margin: 16px 0;
}
.protection-subtitle {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
}
.banter-levels {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.banter-option {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(185,120,247,0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.banter-option:hover {
  border-color: rgba(24,231,255,0.3);
  background: rgba(255,255,255,0.06);
}
.banter-option input[type="radio"] {
  accent-color: #a78bfa;
  width: 16px;
  height: 16px;
}
.banter-option input[type="radio"]:checked ~ .banter-label {
  color: #18e7ff;
}
.banter-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  min-width: 80px;
}
.banter-desc {
  font-size: 0.78rem;
  color: #a0a0cc;
  flex: 1;
  min-width: 180px;
}

/* ==================== LOADOUTS / CLASSES ==================== */
.loadout-game-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.loadout-add-game-btn {
  white-space: nowrap;
  padding: 7px 14px !important;
  font-size: 0.8rem !important;
}
.loadout-form {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(167,139,250,0.25);
  border-radius: 12px;
  padding: 16px;
  margin-top: 10px;
}
.loadout-form.hidden { display: none; }
.loadout-form-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #18e7ff;
  margin: 0 0 10px;
}
.loadout-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.loadout-card {
  background: linear-gradient(135deg, rgba(167,139,250,0.08), rgba(24,231,255,0.05));
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.2s;
}
.loadout-card:hover {
  border-color: rgba(24,231,255,0.4);
}
.loadout-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.loadout-card-game {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #a78bfa;
  font-weight: 700;
}
.loadout-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.loadout-card-weapon {
  font-size: 0.9rem;
  color: #18e7ff;
  font-weight: 600;
}
.loadout-card-code {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  font-family: monospace;
  background: rgba(0,0,0,0.3);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}
.loadout-card-attachments {
  font-size: 0.8rem;
  color: #cfd4ff;
  margin-top: 4px;
}
.loadout-card-details {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-top: 3px;
}
.loadout-card-actions {
  display: flex;
  gap: 6px;
}
.loadout-card-actions button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.72rem;
  transition: all 0.2s;
}
.loadout-card-actions button:hover {
  border-color: #ff487d;
  color: #ff487d;
}
.loadout-card-actions button.edit-btn:hover {
  border-color: #18e7ff;
  color: #18e7ff;
}

/* Accueil paramètres léger : lien vers la page complète */
.settings-home-lite .settings-home-hint {
  margin: 1rem 0.35rem 0;
  padding: 0.65rem 0.75rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(232, 234, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}
.settings-home-lite .settings-home-hint a {
  color: rgba(126, 232, 255, 0.95);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Page accueil lite : grille 2 colonnes stable + menu scrollable + libellés lisibles */
.settings-home-lite .settings-wrapper {
  grid-template-columns: minmax(288px, 340px) minmax(0, 1fr);
  gap: 1.75rem;
}

.settings-home-lite .sidebar .menu {
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 0.35rem;
}

.settings-home-lite .sidebar .menu-item {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.35;
  font-size: 1rem;
}

.settings-home-lite .sidebar .submenu a {
  white-space: normal;
  line-height: 1.35;
  hyphens: auto;
}
