:root {
  color-scheme: light;

  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-soft: #fafbfc;
  --line: #e3e7ee;
  --line-strong: #d3dae5;

  --text: #111827;
  --soft: #475569;
  --muted: #7b8794;

  --nav: #12395c;
  --nav-hover: rgba(255,255,255,.07);
  --nav-active: rgba(255,255,255,.12);

  --blue: #1f5f99;
  --green: #16825d;
  --orange: #b96b16;
  --red: #b4232f;

  --radius: 6px;
  --shadow: 0 1px 2px rgba(15,23,42,.05);
}

html.dark {
  color-scheme: dark;

  --bg: #101722;
  --panel: #151f2d;
  --panel-soft: #192434;
  --line: #263244;
  --line-strong: #334155;

  --text: #f8fafc;
  --soft: #cbd5e1;
  --muted: #94a3b8;

  --nav: #0b1f36;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

/* Layout */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  background: var(--nav);
  color: #e8f0f9;
  z-index: 30;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,.08);
}

.sidebar.collapsed {
  width: 72px;
}

.main-content {
  margin-left: 248px;
  width: calc(100% - 248px);
  min-height: 100vh;
}

.sidebar.collapsed ~ .main-content {
  margin-left: 72px;
  width: calc(100% - 72px);
}

.content-frame {
  padding: 22px 24px;
  max-width: 1680px;
  margin: 0 auto;
}

/* Sidebar */

.sidebar-header {
  height: 64px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: var(--nav);
  font-weight: 800;
  font-size: 13px;
}

.brand-text {
  font-size: 14px;
  font-weight: 750;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-label {
  display: none;
}

.sidebar-nav {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  height: 36px;
  padding: 0 10px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(232,240,249,.72);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 620;
}

.nav-item:hover {
  color: white;
  background: var(--nav-hover);
}

.nav-item.active {
  color: white;
  background: var(--nav-active);
}

.nav-item.active::before {
  content: "";
  width: 2px;
  align-self: stretch;
  margin: 8px 0;
  background: #93c5fd;
  border-radius: 2px;
}

.nav-icon {
  width: 16px;
  text-align: center;
  opacity: .9;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px;
}

.mini-status {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,.72);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

.pulse-dot.connected {
  background: var(--green);
}

/* Topbar */

.topbar {
  height: 62px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(246,247,249,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

html.dark .topbar {
  background: rgba(16,23,34,.92);
}

.page-title h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 760;
}

.page-title span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box {
  width: 260px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
}

.select-control,
.icon-button,
.btn-ghost,
.btn-primary,
.profile-menu {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  padding: 0 10px;
  box-shadow: none;
}

.icon-button {
  width: 34px;
  padding: 0;
  display: grid;
  place-items: center;
}

.btn-primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
  font-weight: 700;
}

.profile-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-menu a {
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  background: #e8eef5;
  color: #12395c;
  font-weight: 800;
  font-size: 12px;
}

/* Grids */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.two-columns {
  grid-template-columns: 1.4fr 1fr;
}

.layout-with-side {
  display: grid;
  grid-template-columns: minmax(0,1fr) 340px;
  gap: 16px;
}

.right-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Panels */

.kpi-card,
.panel,
.side-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 15px;
  overflow: hidden;
}

.kpi-card::before,
.panel::before,
.side-panel::before {
  display: none !important;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 740;
}

.panel-meta {
  color: var(--muted);
  font-size: 12px;
}

.live-badge {
  border: 1px solid #bbf7d0;
  background: #ecfdf5;
  color: #047857;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 800;
}

/* KPI */

.kpi-card {
  min-height: 118px;
}

.kpi-label {
  font-size: 10px;
  line-height: 1.2;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 760;
}

.kpi-value {
  margin-top: 9px;
  font-size: 24px;
  line-height: 1;
  font-weight: 780;
  letter-spacing: -.035em;
}

.kpi-trend {
  display: inline-flex;
  margin-top: 8px;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 650;
  background: #ecfdf5;
  color: var(--green);
}

.kpi-trend.warning {
  background: #fff7ed;
  color: var(--orange);
}

.kpi-trend.danger {
  background: #fef2f2;
  color: var(--red);
}

.sparkline {
  height: 24px;
  margin-top: 9px;
}

/* Tables */

.data-table {
  overflow: auto;
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table th {
  text-align: left;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.data-table td,
.data-table th {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
}

.data-table tr:hover td {
  background: var(--panel-soft);
}

.badge {
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 10.5px;
  font-weight: 750;
}

.badge.ok {
  background: #ecfdf5;
  color: var(--green);
}

.badge.ko {
  background: #fef2f2;
  color: var(--red);
}

/* Lists */

.alert-list,
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert-item,
.timeline-item {
  display: flex;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.alert-severity {
  width: 3px;
  border-radius: 2px;
  background: var(--orange);
}

.alert-severity.critical {
  background: var(--red);
}

.timeline-icon {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  background: #e8eef5;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  font-size: 12.5px;
}

/* Map */

.geo-map,
.ark-world-map {
  height: 500px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.jvm-container {
  background: transparent !important;
}

.jvm-tooltip {
  background: var(--panel) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  border-radius: 4px !important;
  box-shadow: 0 8px 22px rgba(15,23,42,.12) !important;
  padding: 7px 9px !important;
  font-family: inherit !important;
  font-size: 11px !important;
}

/* Auth */

.auth-shell {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-layout {
  width: min(1040px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: .95fr 1fr;
  border: 1px solid var(--line);
  background: var(--panel);
}

.auth-side {
  background: #123a5d;
  color: #ffffff;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #ffffff;
  text-decoration: none;
}

.auth-logo-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #123a5d;
  font-weight: 900;
  font-size: 13px;
}

.auth-logo strong {
  display: block;
  font-size: 14px;
}

.auth-logo small {
  display: block;
  margin-top: 2px;
  color: rgba(255,255,255,.68);
  font-size: 11px;
}

.auth-side-content {
  max-width: 420px;
}

.auth-eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .13em;
}

.auth-side .auth-eyebrow {
  color: rgba(255,255,255,.64);
}

.auth-side h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -.045em;
}

.auth-side p:last-child {
  margin: 16px 0 0;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  line-height: 1.6;
}

.auth-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: 42px;
}

.auth-lang {
  position: absolute;
  top: 18px;
  right: 18px;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  padding: 0 9px;
}

.auth-lang i {
  color: var(--muted);
  font-size: 12px;
}

.auth-lang select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
}

.auth-card-clean {
  width: min(380px, 100%);
}

.auth-card-head {
  margin-bottom: 22px;
}

.auth-card-head h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -.04em;
}

.auth-card-head span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.auth-form-clean {
  display: grid;
  gap: 15px;
}

.auth-form-clean label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 750;
}

.auth-input {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  padding: 0 11px;
}

.auth-input:focus-within {
  border-color: var(--blue);
  background: var(--panel);
}

.auth-input i {
  color: var(--muted);
  font-size: 12px;
}

.auth-input input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.auth-submit {
  height: 40px;
  margin-top: 4px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-submit:hover {
  background: #164f7c;
}

@media (max-width: 820px) {
  .auth-shell {
    padding: 16px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-side {
    min-height: 260px;
    padding: 26px;
  }

  .auth-side h1 {
    font-size: 24px;
  }

  .auth-panel {
    padding: 70px 24px 28px;
  }
}

@media (max-width: 520px) {
  .auth-side {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    padding: 76px 18px 24px;
  }

  .auth-lang {
    left: 18px;
    right: 18px;
    justify-content: center;
  }

  .auth-card-head h2 {
    font-size: 24px;
  }
}

/* States */

.flash-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
}

.flash {
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 13px;
}

.flash.error {
  background: #fef2f2;
  color: #b4232f;
}

.flash.success {
  background: #ecfdf5;
  color: #16825d;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 10px 12px;
  min-width: 210px;
}

.skeleton {
  background: #edf1f6;
  border-radius: 4px;
}

.desktop-only {
  display: grid;
}

.mobile-only {
  display: none;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.42);
  z-index: 25;
}

/* Responsive */

@media (max-width: 1380px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }

  .layout-with-side {
    grid-template-columns: 1fr;
  }

  .right-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 980px) {
  .sidebar {
    transform: translateX(-105%);
    width: 248px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar.collapsed {
    width: 248px;
  }

  .sidebar.collapsed .brand-text,
  .sidebar.collapsed .nav-label {
    display: inline;
  }

  .main-content,
  .sidebar.collapsed ~ .main-content {
    margin-left: 0;
    width: 100%;
  }

  .mobile-only {
    display: grid;
  }

  .desktop-only {
    display: none;
  }

  .search-box {
    display: none;
  }

  .profile-menu a {
    display: none;
  }

  .content-frame {
    padding: 16px;
  }

  .two-columns,
  .right-rail {
    grid-template-columns: 1fr;
  }

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

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

  .topbar {
    height: auto;
    min-height: 66px;
    align-items: flex-start;
    padding: 12px;
  }

  .page-title h1 {
    font-size: 16px;
  }

  .select-control {
    max-width: 112px;
  }

  .geo-map,
  .ark-world-map {
    height: 360px;
  }
}

/* =========================================================
   SHARP PREMIUM RESET
   Suppression rendu grossier / arrondis / gros espaces
   ========================================================= */

:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --panel-soft: #fafbfc;
  --line: #dfe5ee;
  --line-strong: #cfd8e5;
  --text: #101828;
  --soft: #344054;
  --muted: #667085;
  --nav: #123a5d;
  --blue: #1b5f93;
  --green: #11845b;
  --orange: #a15c12;
  --red: #b42318;
  --radius: 2px;
  --shadow: none;
}

/* général plus dense */
body {
  background: var(--bg);
  font-size: 13px;
  line-height: 1.38;
}

/* sidebar plus fine */
.sidebar {
  width: 232px;
  background: #123a5d;
  box-shadow: none;
}

.sidebar.collapsed {
  width: 68px;
}

.main-content {
  margin-left: 232px;
  width: calc(100% - 232px);
}

.sidebar.collapsed ~ .main-content {
  margin-left: 68px;
  width: calc(100% - 68px);
}

.sidebar-header {
  height: 56px;
  padding: 0 12px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 2px;
  font-size: 12px;
}

.brand-text {
  font-size: 13px;
  font-weight: 720;
}

.sidebar-nav {
  padding: 8px;
  gap: 1px;
}

.nav-item {
  height: 32px;
  padding: 0 9px;
  border-radius: 2px;
  gap: 9px;
  font-size: 12px;
  font-weight: 580;
}

.nav-item:hover {
  background: rgba(255,255,255,.055);
}

.nav-item.active {
  background: rgba(255,255,255,.095);
}

.nav-item.active::before {
  width: 2px;
  margin: 7px 0;
}

.nav-icon {
  width: 15px;
  font-size: 11px;
  text-align: center;
  opacity: .82;
}

.topbar {
  height: 66px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
}

.page-title h1 {
  font-size: 16px;
  font-weight: 720;
}

.page-title span {
  font-size: 11px;
}

.search-box,
.select-control,
.icon-button,
.btn-ghost,
.btn-primary,
.profile-menu {
  height: 32px;
  border-radius: 2px;
  box-shadow: none;
}

.search-box {
  width: 240px;
}

.icon-button {
  width: 32px;
}

.avatar {
  width: 22px;
  height: 22px;
  border-radius: 2px;
}

/* contenu moins espacé */
.content-frame {
  padding: 20px 22px;
}

.dashboard-grid {
  gap: 14px;
  margin-bottom: 14px;
}

.two-columns {
  grid-template-columns: 1.25fr .95fr;
}

.layout-with-side {
  gap: 14px;
}

.kpi-card,
.panel,
.side-panel,
.card-premium,
.card-inner,
.premium-card,
.premium-card-soft {
  background: var(--panel) !important;
  border: 1px solid var(--line) !important;
  border-radius: 2px !important;
  box-shadow: none !important;
  padding: 14px !important;
  overflow: hidden;
}

.kpi-card::before,
.panel::before,
.side-panel::before,
.card-premium::before {
  display: none !important;
}

.panel-head {
  margin-bottom: 10px;
}

.panel-head h2,
.section-title {
  font-size: 13px !important;
  font-weight: 720 !important;
  letter-spacing: 0 !important;
}

/* évite les grands blocs vides énormes */
.panel canvas {
  max-height: 260px;
}

#actionsChart {
  height: 240px !important;
}

#eventsTable {
  min-height: 0;
}

/* kpi plus finance */
.kpi-grid {
  gap: 10px;
  margin-bottom: 14px;
}

.kpi-card {
  min-height: 104px;
}

.kpi-label {
  font-size: 9px;
  letter-spacing: .08em;
  font-weight: 720;
}

.kpi-value {
  font-size: 22px;
  margin-top: 8px;
  font-weight: 740;
}

.kpi-trend {
  margin-top: 7px;
  padding: 2px 5px;
  border-radius: 2px;
  font-size: 10px;
}

button,
.btn-primary,
.btn-ghost,
.icon-button,
.select-control,
.profile-menu,
.pill-soft,
.pill-live,
.live-badge,
.badge {
  border-radius: 2px !important;
}

.pill-soft,
.pill-live {
  padding: 3px 6px !important;
  font-size: 10px !important;
  font-weight: 650 !important;
}

/* listes plus sobres */
.alert-item,
.timeline-item,
.activity-item {
  border-radius: 2px !important;
  padding: 8px !important;
  background: var(--panel-soft) !important;
}

.timeline-icon,
.activity-icon,
.alert-icon {
  width: 24px !important;
  height: 24px !important;
  border-radius: 2px !important;
  font-size: 10px !important;
}

/* empty states moins énormes */
.empty-state {
  padding: 14px !important;
  border-radius: 2px !important;
  font-size: 12px !important;
}

/* tables clean */
.data-table table {
  font-size: 12px;
}

.data-table th {
  font-size: 9px;
}

.data-table td,
.data-table th {
  padding: 8px 9px;
}

/* carte */
.geo-map,
.ark-world-map {
  border-radius: 2px !important;
  border: 1px solid var(--line) !important;
  background: #fbfcfd !important;
}

/* supprime effets Tailwind restants */
.rounded,
.rounded-md,
.rounded-lg,
.rounded-xl,
.rounded-2xl,
.rounded-3xl,
.rounded-full {
  border-radius: 2px !important;
}

.shadow,
.shadow-md,
.shadow-lg,
.shadow-xl,
.shadow-2xl {
  box-shadow: none !important;
}

.bg-gradient-to-r,
.bg-gradient-to-l,
.bg-gradient-to-b,
.bg-gradient-to-t,
[class*="from-"],
[class*="to-"],
[class*="via-"] {
  background-image: none !important;
}

.p-4 {
  padding: 14px !important;
}

.mb-4 {
  margin-bottom: 10px !important;
}

.space-y-3 > * + * {
  margin-top: 8px !important;
}

.flex {
  min-width: 0;
}


.panel canvas {
  display: block;
  width: 100% !important;
  height: 280px !important;
}

.kpi-card canvas.sparkline {
  height: 24px !important;
}

#actionsChart,
#trafficChart,
#performanceChart,
#searchChart,
#availabilityChart,
#sourcesChart,
#countriesChart {
  min-height: 260px;
}

.kpi-card {
  overflow: hidden;
}

.kpi-card .sparkline {
  display: block;
  width: 100% !important;
  height: 34px !important;
  margin-top: 8px;
}


.date-filter {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-filter input,
.date-filter button {
  height: 32px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 2px;
  padding: 0 8px;
  font-size: 12px;
}

.date-filter button {
  cursor: pointer;
  font-weight: 650;
}

.reports-page {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
}

.reports-sidebar {
  align-self: start;
  position: sticky;
  top: 76px;
}

.report-generate-btn {
  width: 100%;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.report-list {
  display: grid;
  gap: 8px;
}

.report-list-item {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  text-decoration: none;
  border-left: 3px solid transparent;
}

.report-list-item:hover,
.report-list-item.active {
  background: var(--panel);
  border-left-color: var(--blue);
}

.report-list-item strong {
  font-size: 12.5px;
  line-height: 1.25;
}

.report-list-item span,
.report-list-item small {
  font-size: 11px;
  color: var(--muted);
}

.report-workspace {
  min-width: 0;
}

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

.report-toolbar h2 {
  margin: 3px 0 0;
  font-size: 16px;
}

.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  font-weight: 760;
}

.report-toolbar-actions {
  display: flex;
  gap: 8px;
}

.report-paper {
  max-width: 980px;
  margin: 0 auto;
  background: #ffffff;
  color: #111827;
  border: 1px solid #dfe5ee;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
}

.report-cover {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  padding: 34px 38px 28px;
  border-bottom: 1px solid #e5eaf1;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.report-brand {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #1b5f93;
  margin-bottom: 14px;
}

.report-title-input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.04em;
  color: #111827;
}

.report-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  align-content: start;
  padding: 14px;
  border: 1px solid #e5eaf1;
  background: #ffffff;
}

.report-meta span {
  margin-top: 8px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .11em;
  color: #667085;
  font-weight: 800;
}

.report-meta span:first-child {
  margin-top: 0;
}

.report-meta strong {
  font-size: 12px;
  color: #111827;
}

.report-section {
  padding: 28px 38px;
  border-bottom: 1px solid #e5eaf1;
}

.report-section:last-child {
  border-bottom: 0;
}

.report-section-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}

.report-section-head span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: #edf4fb;
  color: #1b5f93;
  font-size: 11px;
  font-weight: 800;
}

.report-section-head h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -.02em;
}

.report-section textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid transparent;
  background: #fbfcfe;
  color: #111827;
  padding: 14px 16px;
  font: 500 13.5px/1.65 Inter, system-ui, sans-serif;
  resize: vertical;
  outline: none;
}

.report-section textarea:focus {
  border-color: #9db8d3;
  background: #ffffff;
}

.report-section.executive textarea {
  font-size: 14px;
  font-weight: 650;
  background: #f7fafc;
}

.report-section.recommendations textarea {
  border-left: 3px solid #1b5f93;
}

.report-section.notes textarea {
  background: #fffdf5;
}

.report-empty-premium {
  min-height: 360px;
  display: grid;
  place-items: center;
  text-align: center;
  align-content: center;
  gap: 10px;
}

.report-empty-premium i {
  font-size: 34px;
  color: var(--blue);
}

.report-empty-premium h2 {
  margin: 0;
}

.report-empty-premium p {
  margin: 0;
  color: var(--muted);
}

@media print {
  body {
    background: #ffffff !important;
  }

  .sidebar,
  .topbar,
  .reports-sidebar,
  .report-toolbar,
  .toast-region {
    display: none !important;
  }

  .main-content {
    margin: 0 !important;
    width: 100% !important;
  }

  .content-frame {
    padding: 0 !important;
  }

  .reports-page {
    display: block !important;
  }

  .report-paper {
    max-width: none;
    width: 100%;
    border: 0;
    box-shadow: none;
  }

  .report-section textarea,
  .report-title-input {
    border: 0 !important;
    background: transparent !important;
    resize: none;
  }
}

@media (max-width: 980px) {
  .reports-page {
    grid-template-columns: 1fr;
  }

  .reports-sidebar {
    position: static;
  }

  .report-cover {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .report-section {
    padding: 22px 24px;
  }

  .report-title-input {
    font-size: 23px;
  }
}

.time-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
}

.time-preset,
.datetime-control,
.filter-button {
  height: 32px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 2px;
  padding: 0 8px;
  font-size: 12px;
  outline: none;
}

.time-preset {
  width: 150px;
}

.datetime-control {
  width: 132px;
}

.filter-button {
  width: 32px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.date-separator {
  color: var(--muted);
  font-size: 12px;
}

.flatpickr-calendar {
  border-radius: 4px !important;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.16) !important;
  border: 1px solid var(--line) !important;
  font-family: Inter, system-ui, sans-serif !important;
}

.flatpickr-day.selected {
  background: var(--blue) !important;
  border-color: var(--blue) !important;
}

.kpi-card {
  min-height: 96px !important;
}

/*
.kpi-card canvas,
.kpi-card .sparkline {
  display: none !important;
}
*/

.kpi-value small {
  font-size: 16px;
  color: var(--muted);
  font-weight: 650;
}

.topbar {
  display: grid !important;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  gap: 14px;
}

.page-title {
  min-width: 190px;
  overflow: visible;
}

.page-title h1 {
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
}

.topbar-actions {
  min-width: 0;
  justify-content: flex-end;
  overflow: hidden;
}

.search-box {
  width: 220px;
}

.time-preset {
  width: 145px;
}

.datetime-control {
  width: 120px;
}

.sidebar-header {
  position: relative;
  height: 58px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  min-width: 0;
}

.sidebar-toggle {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.86);
  border-radius: 4px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}

.sidebar-toggle:hover {
  background: rgba(255,255,255,.14);
  color: #fff;
}

.sidebar-toggle i {
  font-size: 11px;
  transition: transform .18s ease;
}

.sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 0;
}

.sidebar.collapsed .brand {
  justify-content: center;
}

.sidebar.collapsed .brand-mark {
  margin: 0;
}

.sidebar.collapsed .sidebar-toggle {
  position: absolute;
  right: -13px;
  top: 15px;
  width: 26px;
  height: 26px;
  background: #ffffff;
  color: #123a5d;
  border: 1px solid #dfe5ee;
  box-shadow: 0 4px 12px rgba(15,23,42,.12);
  z-index: 40;
}

.sidebar.collapsed .sidebar-toggle i {
  transform: rotate(180deg);
}

.sidebar.collapsed .sidebar-nav {
  align-items: center;
}

.sidebar.collapsed .nav-item {
  width: 38px;
  justify-content: center;
  padding: 0;
}

.sidebar.collapsed .nav-icon {
  width: auto;
}

.sidebar.collapsed .sidebar-footer {
  display: flex;
  justify-content: center;
}

.sidebar.collapsed .mini-status {
  justify-content: center;
}

.install-pwa-btn {
  width: 34px;
  padding: 0 !important;
  display: grid;
  place-items: center;
}

/* =========================================================
   RESPONSIVE FINAL OVERRIDE
   Doit rester tout en bas du fichier.
   ========================================================= */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.main-content,
.content-frame,
.topbar,
.topbar-actions,
.dashboard-grid,
.layout-with-side,
.kpi-grid,
.panel,
.side-panel {
  min-width: 0;
}

/* Desktop compact */
@media (max-width: 1280px) {
  .topbar {
    grid-template-columns: minmax(170px, 230px) minmax(0, 1fr) !important;
    gap: 10px;
    padding: 0 14px;
  }

  .search-box {
    width: 180px !important;
  }

  .time-preset {
    width: 130px !important;
  }

  .datetime-control {
    width: 108px !important;
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .layout-with-side {
    grid-template-columns: 1fr !important;
  }

  .right-rail {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Tablet / mobile drawer */
@media (max-width: 980px) {
  .sidebar,
  .sidebar.collapsed {
    width: 248px !important;
    transform: translateX(-105%);
    transition: transform .2s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar.collapsed .brand-text,
  .sidebar.collapsed .nav-label {
    display: inline !important;
  }

  .sidebar.collapsed .nav-item {
    width: auto !important;
    justify-content: flex-start !important;
    padding: 0 10px !important;
  }

  .sidebar-toggle {
    display: none !important;
  }

  .main-content,
  .sidebar.collapsed ~ .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .mobile-only {
    display: grid !important;
  }

  .desktop-only {
    display: none !important;
  }

  .topbar {
    height: auto !important;
    min-height: 64px;
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
    grid-template-areas:
      "menu title"
      "actions actions";
    align-items: center;
    gap: 10px;
    padding: 10px 12px !important;
  }

  #mobileMenu {
    grid-area: menu;
  }

  .page-title {
    grid-area: title;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .page-title h1 {
    white-space: nowrap;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .page-title span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-actions {
    grid-area: actions;
    width: 100%;
    display: flex !important;
    flex-wrap: wrap;
    justify-content: flex-start !important;
    gap: 8px;
    overflow: visible !important;
  }

  .time-filter {
    order: 1;
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr 1fr auto;
    gap: 6px;
    height: auto !important;
  }

  .time-preset {
    grid-column: 1 / -1;
    width: 100% !important;
  }

  .datetime-control {
    width: 100% !important;
  }

  .date-separator {
    display: none;
  }

  .filter-button {
    width: 34px !important;
  }

  .search-box {
    order: 2;
    width: min(100%, 320px) !important;
    display: flex !important;
  }

  .select-control {
    order: 3;
    width: auto;
    max-width: 150px;
  }

  #themeToggle,
  #installPwa {
    order: 4;
  }

  .profile-menu {
    order: 5;
    margin-left: auto;
  }

  .profile-menu a {
    display: none;
  }

  .content-frame {
    padding: 14px !important;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .dashboard-grid,
  .two-columns,
  .layout-with-side,
  .right-rail {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .panel canvas {
    height: 240px !important;
  }

  .geo-map,
  .ark-world-map {
    height: 380px !important;
  }

  .data-table {
    width: 100%;
    overflow-x: auto;
  }

  .data-table table {
    min-width: 620px;
  }
}

/* Small mobile */
@media (max-width: 560px) {
  body {
    font-size: 12.5px;
  }

  .topbar {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    padding: 8px !important;
  }

  .page-title h1 {
    font-size: 15px !important;
  }

  .page-title span {
    font-size: 10.5px !important;
  }

  .topbar-actions {
    gap: 6px;
  }

  .search-box {
    width: 100% !important;
  }

  .select-control {
    max-width: 120px;
  }

  .kpi-grid {
    grid-template-columns: 1fr !important;
  }

  .kpi-card {
    min-height: 92px !important;
  }

  .kpi-value {
    font-size: 22px !important;
  }

  .panel,
  .side-panel,
  .kpi-card {
    padding: 12px !important;
  }

  .panel canvas {
    height: 220px !important;
  }

  .geo-map,
  .ark-world-map {
    height: 320px !important;
  }

  .content-frame {
    padding: 10px !important;
  }
}

.report-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 28px 38px;
  border-bottom: 1px solid #e5eaf1;
  background: #f8fafc;
}

.report-chart-card {
  background: #ffffff;
  border: 1px solid #e5eaf1;
  padding: 14px;
}

.report-chart-wide {
  grid-column: 1 / -1;
}

.report-svg-chart {
  width: 100%;
  height: auto;
  display: block;
}

@media print {
  .report-charts-grid {
    background: #ffffff !important;
    padding: 20px 0;
  }

  .report-chart-card {
    break-inside: avoid;
  }
}

@media (max-width: 980px) {
  .report-charts-grid {
    grid-template-columns: 1fr;
    padding: 22px 24px;
  }
}

.report-client-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  text-decoration: none;
}

.domain-page {
  display: grid;
  gap: 14px;
}

.domain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.domain-wide {
  grid-column: 1 / -1;
}

.domain-table {
  max-height: 460px;
  overflow: auto;
}

.domain-table table {
  min-width: 900px;
}

.domain-table th {
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
}

.domain-table td {
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 980px) {
  .domain-grid {
    grid-template-columns: 1fr;
  }

  .domain-wide {
    grid-column: auto;
  }
}

.report-generate-btn.is-loading {
  pointer-events: none;
  opacity: .82;
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: btnSpin .7s linear infinite;
}

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

.performance-preview-panel {
  margin-bottom: 14px;
}


.preview-device-grid {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(220px, .45fr);
  gap: 16px;
  align-items: start;
}

.device-preview-card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 14px;
}

.device-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.device-preview-head strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.device-preview-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.device-preview-head small {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.device-frame {
  background: #ffffff;
  border: 1px solid var(--line);
  overflow: hidden;
  display: block;
}

.device-frame.desktop {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.device-frame.mobile {
  width: min(210px, 100%);
  margin: 0 auto;
  aspect-ratio: 390 / 844;
}

.device-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  background: #ffffff;
}

.device-empty-preview {
  height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
}

.device-preview-card.image-error .device-frame {
  display: none;
}

.device-preview-card.image-error::after {
  content: "Preview indisponible";
  height: 180px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 980px) {
  .preview-device-grid {
    grid-template-columns: 1fr;
  }

  .device-frame.mobile {
    width: min(240px, 100%);
  }
}

.doc-page {
  display: grid;
  gap: 14px;
}

.doc-hero h2 {
  margin: 3px 0 6px;
  font-size: 20px;
  letter-spacing: -.035em;
}

.doc-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 780px;
}

.doc-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
}

.doc-nav {
  position: sticky;
  top: 82px;
  align-self: start;
  display: grid;
  gap: 2px;
}

.doc-nav a {
  display: block;
  padding: 8px 9px;
  color: var(--soft);
  text-decoration: none;
  font-size: 12px;
  border-left: 2px solid transparent;
}

.doc-nav a:hover {
  background: var(--panel-soft);
  color: var(--text);
  border-left-color: var(--blue);
}

.doc-content {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.doc-section {
  scroll-margin-top: 92px;
}

.doc-section h2 {
  margin: 0 0 10px;
  font-size: 17px;
  letter-spacing: -.025em;
}

.doc-section p {
  margin: 0 0 10px;
  color: var(--soft);
  line-height: 1.65;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.doc-card {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  padding: 12px;
}

.doc-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 12.5px;
}

.doc-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 12px;
}

.doc-table th {
  text-align: left;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: var(--panel-soft);
}

.doc-table th,
.doc-table td {
  padding: 9px 10px;
  border: 1px solid var(--line);
  vertical-align: top;
}

.doc-table td:first-child {
  width: 220px;
  font-weight: 700;
  color: var(--text);
}

.doc-table td:last-child {
  color: var(--soft);
  line-height: 1.5;
}

@media (max-width: 980px) {
  .doc-layout {
    grid-template-columns: 1fr;
  }

  .doc-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 560px) {
  .doc-nav,
  .doc-grid {
    grid-template-columns: 1fr;
  }

  .doc-table {
    display: block;
    overflow-x: auto;
  }

  .doc-table table {
    min-width: 620px;
  }
}

.ads-page {
  display: grid;
  gap: 14px;
}

.ads-hero h2 {
  margin: 3px 0 6px;
  font-size: 20px;
  letter-spacing: -.035em;
}

.ads-hero p {
  margin: 0;
  color: var(--muted);
}

.ads-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 14px;
  align-items: start;
}

.ads-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ads-wide {
  grid-column: 1 / -1;
}

.ads-field {
  display: grid;
  gap: 6px;
}

.ads-field span,
.ads-preview > span {
  color: var(--soft);
  font-size: 11px;
  font-weight: 760;
}

.ads-field input,
.ads-field select,
.ads-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
  outline: none;
}

.ads-field input,
.ads-field select {
  height: 34px;
}

.ads-field textarea {
  resize: vertical;
}

.ads-field input:focus,
.ads-field select:focus,
.ads-field textarea:focus {
  border-color: var(--blue);
  background: var(--panel);
}

.ads-field small {
  color: var(--muted);
  font-size: 11px;
}

.ads-preview {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  padding: 11px;
  display: grid;
  gap: 8px;
}

.ads-preview code,
.ads-history-item code {
  display: block;
  word-break: break-all;
  white-space: normal;
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.5;
}

.ads-actions {
  display: flex;
  justify-content: flex-end;
}

.ads-history {
  display: grid;
  gap: 9px;
  max-height: 720px;
  overflow: auto;
}

.ads-history-item {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  padding: 11px;
  display: grid;
  gap: 8px;
}

.ads-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ads-history-head strong {
  font-size: 13px;
}

.ads-history-head span {
  padding: 3px 6px;
  background: #edf4fb;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.ads-history-item small {
  color: var(--muted);
  font-size: 11px;
}

.ads-history-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ads-history-actions span {
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 980px) {
  .ads-layout {
    grid-template-columns: 1fr;
  }

  .ads-form {
    grid-template-columns: 1fr;
  }

  .ads-wide {
    grid-column: auto;
  }
}

.ads-generator-panel {
  position: relative;
  overflow: hidden;
}

.ads-generator-panel::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), #38bdf8, var(--green));
}

.ads-generator-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.ads-generator-head h2 {
  margin: 3px 0 6px;
  font-size: 20px;
  letter-spacing: -.035em;
}

.ads-generator-head p {
  margin: 0;
  color: var(--muted);
  max-width: 620px;
}

.ads-domain-pill {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--soft);
  padding: 0 10px;
  font-size: 11px;
  white-space: nowrap;
}

.ads-domain-pill i {
  color: var(--blue);
}

.ads-form-premium {
  display: grid;
  gap: 14px;
}

.ads-form-section {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  padding: 14px;
}

.ads-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.ads-section-title span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: #edf4fb;
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
}

.ads-section-title strong {
  font-size: 13px;
}

.ads-platform-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.ads-platform-card {
  min-height: 78px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.ads-platform-card:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
}

.ads-platform-card.is-active {
  border-color: var(--blue);
  background: #edf4fb;
}

html.dark .ads-platform-card.is-active {
  background: #16263a;
}

.ads-platform-card i {
  color: var(--blue);
  font-size: 16px;
}

.ads-platform-card strong {
  font-size: 11.5px;
}

.ads-platform-card small {
  color: var(--muted);
  font-size: 10px;
}

.ads-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ads-field-full {
  grid-column: 1 / -1;
}

.ads-field-premium {
  display: grid;
  gap: 6px;
}

.ads-field-premium span {
  color: var(--soft);
  font-size: 11px;
  font-weight: 760;
}

.ads-field-premium input,
.ads-field-premium textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
  outline: none;
}

.ads-field-premium input {
  height: 36px;
}

.ads-field-premium textarea {
  resize: vertical;
}

.ads-field-premium input:focus,
.ads-field-premium textarea:focus {
  border-color: var(--blue);
  background: var(--panel);
}

.ads-field-premium small {
  color: var(--muted);
  font-size: 11px;
}

.ads-preview-premium {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  padding: 12px;
}

.ads-preview-premium span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ads-preview-premium code {
  color: var(--text);
  word-break: break-all;
  white-space: normal;
  font-size: 12px;
  line-height: 1.5;
}

.ads-copy-btn {
  min-width: 104px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ads-copy-btn:hover,
.ads-copy-btn.is-copied,
.btn-ghost.is-copied {
  background: var(--green) !important;
  border-color: var(--green) !important;
  color: #ffffff !important;
}

.ads-submit-btn {
  height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 1280px) {
  .ads-platform-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .ads-generator-head,
  .ads-preview-premium {
    grid-template-columns: 1fr;
    display: grid;
  }

  .ads-platform-grid,
  .ads-fields-grid {
    grid-template-columns: 1fr;
  }

  .ads-domain-pill {
    width: 100%;
    justify-content: center;
  }
}


/* Strict SVG flag language picker */
.ark-flag-select,
.ark-lang-select,
.flag-language-switcher,
.language-select-wrap,
.lang-switch {
  display: none !important;
}

.lang-picker {
  display: inline-block;
  width: 42px;
  height: 34px;
  position: relative;
}

.lang-picker-button {
  width: 42px;
  height: 34px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line, #d8e2ed);
  border-radius: 0;
  background: var(--surface, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
}

.lang-picker-button img,
.lang-picker-menu img {
  width: 24px;
  height: 16px;
  display: block;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

.lang-picker-menu {
  display: none;
  gap: 0;
  padding: 0;
  border: 1px solid var(--line, #d8e2ed);
  border-radius: 0;
  background: var(--surface, #fff);
  box-shadow: none;
  z-index: 2147483647;
}

.lang-picker-menu a {
  width: 42px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface, #fff);
  text-decoration: none;
}

.lang-picker-menu a:hover,
.lang-picker-menu a.active {
  background: var(--surface-2, #eef4fb);
}

.auth-lang.lang-picker {
  margin-bottom: 16px;
}


/* Login only: original-style flag dropdown, SVG only */
.auth-lang.login-flag-select {
  display: inline-block !important;
  position: relative !important;
  width: 42px !important;
  height: 34px !important;
  margin: 0 0 18px 0 !important;
  padding: 0 !important;
  z-index: 999999 !important;
}

.auth-lang.login-flag-select summary {
  list-style: none !important;
  width: 42px !important;
  height: 34px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid #d8e2ed !important;
  border-radius: 0 !important;
  background: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

.auth-lang.login-flag-select summary::-webkit-details-marker {
  display: none !important;
}

.auth-lang.login-flag-select img {
  width: 24px !important;
  height: 16px !important;
  display: block !important;
  object-fit: cover !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.login-flag-select-menu {
  display: none !important;
  position: absolute !important;
  top: 38px !important;
  left: 0 !important;
  width: 42px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid #d8e2ed !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  z-index: 999999 !important;
}

.auth-lang.login-flag-select[open] .login-flag-select-menu {
  display: block !important;
}

.login-flag-select-menu a {
  width: 42px !important;
  height: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #fff !important;
  text-decoration: none !important;
}

.login-flag-select-menu a:hover,
.login-flag-select-menu a.active {
  background: #eef4fb !important;
}



/* === ARKBI LOGO PATCH === */

/* ----------------------------------------------------------
   LOGIN
   ---------------------------------------------------------- */

.auth-logo.arkbi-auth-brand {
  position: relative;
  display: block;
  width: 180px;
  height: 50px;
  flex: 0 0 180px;
  overflow: hidden;
  padding: 0;
  margin: 0;
  background: #ffffff;
  border-radius: 2px;
}

.arkbi-login-logo {
  position: absolute;
  display: block;
  width: 220px;
  height: auto;
  max-width: none;
  left: -27px;
  top: -26px;
  margin: 0;
  padding: 0;
}


/* ----------------------------------------------------------
   SIDEBAR OUVERTE
   ---------------------------------------------------------- */

.brand.arkbi-brand {
  position: relative;
  display: block;
  width: 142px;
  height: 36px;
  min-width: 142px;
  flex: 0 0 142px;
  overflow: hidden;
  padding: 0;
  margin: 0;
  background: #ffffff;
  border-radius: 2px;
}

.arkbi-sidebar-logo {
  position: absolute;
  display: block;
  width: 178px;
  height: auto;
  max-width: none;
  left: -23px;
  top: -21px;
  margin: 0;
  padding: 0;
}


/* ----------------------------------------------------------
   SIDEBAR RÉDUITE
   Utilise le symbole ArkBI contenu dans la même image.
   ---------------------------------------------------------- */

.sidebar.collapsed .brand.arkbi-brand {
  width: 32px;
  height: 32px;
  min-width: 32px;
  flex: 0 0 32px;
  overflow: hidden;
}

.sidebar.collapsed .arkbi-sidebar-logo {
  width: 120px;
  max-width: none;
  left: -20px;
  top: -12px;
}

/* === ARKBI PNG TRANSPARENCY FIX === */

/*
   Le PNG ArkBI possède son propre canal alpha.
   Login + sidebar utilisent directement cette transparence.
*/

.auth-logo.arkbi-auth-brand,
.brand.arkbi-brand {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;

    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}


/* LOGIN */

.auth-logo.arkbi-auth-brand {
    overflow: hidden !important;
}

.auth-logo.arkbi-auth-brand .arkbi-login-logo,
.arkbi-login-logo {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}


/* SIDEBAR */

.brand.arkbi-brand {
    overflow: hidden !important;
}

.brand.arkbi-brand .arkbi-sidebar-logo,
.arkbi-sidebar-logo {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}


/* SIDEBAR RÉDUITE */

.sidebar.collapsed .brand.arkbi-brand {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* === END ARKBI PNG TRANSPARENCY FIX === */

