/* ==========================================================
   Thème MagIRC "discutbiz" — aligné sur la charte discut.biz
   Toutes les couleurs viennent des variables de css/site.css
   (chargé juste avant ce fichier) — clair ET sombre.
   AUCUN :root ici : ça écraserait le mode sombre défini par
   site.css [data-theme="dark"], vu que ce fichier charge après.
   ========================================================== */

/* Règle manquante dans style.css : le padding du topbar n'existe
   que dans le <style> critique inline de header.php (perf), jamais
   dans le fichier CSS complet. On la rajoute ici. */
.topbar { padding: 6px 0; }
.topbar .theme-btn { width: 24px !important; height: 24px !important; font-size: 11px !important; }

/* IMPORTANT : ne JAMAIS mettre overflow-x sur html/body — ça casse
   position:sticky (navbar + sous-nav) dans tous les navigateurs, car
   ça change le conteneur de référence du sticky. C'était le bug du
   "header qui ne descend pas" : la navbar restait bloquée en haut
   avec la topbar au lieu de la laisser défiler toute seule.
   Le débordement horizontal est géré localement sur div#main
   (overflow-x:auto, plus bas) à la place. */
body {
  font-size: 14px;
  line-height: 1.6;
}

img, td, th { border: 0; }
h1, h2, h3, h4, h5, h6 { color: var(--text); }

/* Le CSS du site ne définit pas .dm-open (bug latent, hover uniquement) */
.nav-drop-menu.dm-open { display: block !important; }

/* ── SOUS-NAV MAGIRC (Réseau/Serveurs/Canaux/Utilisateurs), sticky sous la vraie navbar du site ── */
/* Navbar/sous-nav rendues opaques : le site utilise un fond translucide +
   flou, dont la teinte finale dépend du contenu affiché derrière — ce qui
   donne un rendu différent entre le site et MagIRC (contenus différents
   sous la barre). Fond plein garantit une couleur identique dans les 2 cas. */
.navbar {
  background: var(--white) !important;
  backdrop-filter: none !important;
}
/* Sur le site, c'est .nav-links{margin-left:auto} qui pousse le burger à
   droite — mais cette marge disparaît avec .nav-links en display:none sur
   mobile. On ancre le burger directement pour un résultat garanti. */
.nav-burger { margin-left: auto; }

/* La hauteur réelle de .nav est 68px (pas 64px) : notre sous-nav doit
   coller exactement en dessous, sans chevauchement ni trou. */
div#header {
  width: 100%;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 68px;
  z-index: 190;
  box-sizing: border-box;
}
/* Même largeur de conteneur que .w du site (1160px / 28px de marge
   intérieure) : le contenu de MagIRC doit occuper la même largeur que
   le site, pas une colonne plus étroite. */
div#header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
  height: 52px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

div#menu { float: none; margin: 0 auto 0 0; padding: 0; }
div#menu ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
div#menu li { display: inline; margin: 0; padding: 0; }
div#menu a {
    float: none;
    height: auto;
    width: auto;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    text-shadow: none;
    border-radius: var(--r);
    transition: background .15s, color .15s;
}
div#menu a:hover { background: var(--bg); color: var(--blue); }
div#menu a.active { background: var(--blue-l); color: var(--blue); font-weight: 600; }
div#menu a i { font-size: 13px; opacity: .85; }

div#main {
    width: 100%;
    max-width: 1160px;
    margin: 24px auto;
    padding: 24px 28px;
    background-color: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--rl);
    min-height: 500px;
    box-sizing: border-box;
    box-shadow: var(--sh);
    overflow-x: auto;
}

div.ui-tabs-panel a, div.ui-tabs-panel a:visited { color: var(--blue); }
div.ui-tabs-panel a:hover, div.ui-tabs-panel a:active { color: var(--blue-d); text-decoration: none; }
div.ui-tabs { padding: 0; }
div.ui-tabs .ui-corner-all { border-radius: var(--r) var(--r) 0 0; }

/* ── Sélecteur de langue (dans la sous-nav MagIRC, pas dans le footer) ── */
#selectlocale { margin-right: 10px; }
#selectlocale select {
    background: var(--bg);
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 4px 6px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
}
footer .footer-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

div#errorbox {
    text-align: center;
    width: 500px;
    margin: 0 auto;
    padding-top: 200px;
}
div#loading { display: none; }
div.halfleft { width: 49%; float: left; }
div.halfright { width: 49%; float: right; }
div.choser { text-align: right; margin-bottom: 10px; }
div.motd {
    border: 1.5px solid var(--border);
    border-radius: var(--r);
    margin: 15px 0 0 0;
    padding: 10px 14px;
    height: 300px;
    overflow: scroll;
    background: var(--bg);
}
div.motd pre { font-family: ui-monospace, "Courier New", Courier, monospace; }
div.topic {
    border: 1.5px dashed var(--border);
    border-radius: var(--r);
    padding: 12px 14px;
    font-family: ui-monospace, "Courier New", Courier, monospace;
    background: var(--bg);
}
span.val { color: var(--blue); font-weight: 600; }
div.clear { clear: both; }
table.details { max-width: 100%; border-spacing: 0; }

/* ── Formulaire de connexion webchat embarqué (identique au site principal) ── */
div.fcard {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--rl);
    padding: 20px;
    margin: 12px 0 10px;
}
div.fcard-head {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
div.fcard-head h3 { font-size: .95rem; font-weight: 700; color: var(--text); margin: 0; }
div.ff { margin-bottom: 13px; }
div.ff label { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
div.fi-row { display: flex; gap: 8px; }
div.fi-row .ff { flex: 1; margin-bottom: 13px; }
input.fi, select.fi {
    width: 100%;
    padding: 10px 13px;
    border-radius: var(--r);
    border: 1.5px solid var(--border);
    background: var(--bg);
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    outline: none;
    box-sizing: border-box;
    transition: all .18s;
}
input.fi:focus { border-color: var(--blue); background: var(--white); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
div.ff label[for="mchat-kiwiirc"] { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 400; color: var(--muted); }
div.ff label[for="mchat-kiwiirc"] input { flex-shrink: 0; }

button.submit-btn {
    width: 100%;
    padding: 12px;
    border-radius: var(--r);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: var(--blue);
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .15s;
    box-shadow: 0 2px 8px rgba(37,99,235,.3);
}
button.submit-btn:hover { background: var(--blue-d); }

div.join-alt { font-size: 12.5px; color: var(--muted); }
div.join-alt a, div.join-alt a:visited { color: var(--muted); text-decoration: underline; }
div.join-alt a:hover { color: var(--blue); }

table.details th { text-align: left; vertical-align: top; color: var(--muted); font-weight: 600; font-size: 12.5px; }
table.details h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }

/* ── Bloc stats "Serveurs / Canaux / Utilisateurs / Opérateurs" ──
   Divs simples groupées dans l'ordre naturel du DOM : aucune dépendance
   à display:contents / order (peu fiable sur table/tr selon navigateurs). */
div.stats-quad {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 15px 0;
}
div.sq-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 12px 14px;
}
div.sq-head {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 8px;
}
div.sq-row { font-size: 13px; margin-bottom: 4px; }
div.sq-row.sq-end { margin-bottom: 0; }
span.sq-lbl { color: var(--muted); font-weight: 600; margin-right: 4px; }

/* Titre de section (h1, h3 hors table) */
#welcome h1 { font-size: 1.3rem; font-weight: 800; margin-bottom: 18px; }

/* ── Tableaux DataTables "Top 10" en mini-cards ── */
table.display, table.dataTable {
    border: 1.5px solid var(--border);
    border-radius: var(--rl);
    overflow: hidden;
    background: var(--white);
}
table.dataTable thead th {
    background: var(--bg);
    text-transform: uppercase;
    letter-spacing: .4px;
    font-size: 11px !important;
}
table.dataTable tbody tr { transition: background .15s; }
table.dataTable tbody tr.odd, table.dataTable tbody tr.odd td { background: var(--white) !important; }
table.dataTable tbody tr.even, table.dataTable tbody tr.even td { background: var(--bg) !important; }
table.dataTable tbody td { color: var(--text); border-color: var(--border) !important; }
table.clickable tbody tr.even:hover td,
table.clickable tbody tr.odd:hover td {
    background-color: var(--blue-l) !important;
}

/* jQuery-UI overrides */
.ui-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
    font-size: 14px !important;
}
.ui-widget .ui-widget {
    font-size: 14px !important;
}
.ui-widget input,
.ui-widget select,
.ui-widget textarea,
.ui-widget button {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
    font-size: 14px !important;
}
.ui-widget-header {
    background: var(--blue-l) !important;
    border: 1px solid var(--blue-b) !important;
    color: var(--blue) !important;
}
.ui-widget-content {
    border: 1.5px solid var(--border) !important;
    background: var(--white) !important;
    color: var(--text) !important;
}
.ui-widget-content a {
    color: var(--text) !important;
}
.ui-state-default, .ui-widget-content .ui-state-default {
    background: var(--bg) !important;
    border: 1px solid var(--border) !important;
    color: var(--muted) !important;
}
.ui-state-active, .ui-widget-content .ui-state-active,
.ui-state-hover, .ui-widget-content .ui-state-hover {
    background: var(--blue-l) !important;
    border: 1px solid var(--blue-b) !important;
    color: var(--blue) !important;
}
ul.ui-menu.ui-widget-content {
    border: 1.5px solid var(--border) !important;
    background: var(--white) !important;
    color: var(--text) !important;
    border-radius: var(--r) !important;
    box-shadow: var(--sh) !important;
}
ul.ui-menu.ui-widget-content a {
    color: var(--text) !important;
    text-decoration: none !important;
    border: 0 !important;
    padding: 0 !important;
}
ul.ui-menu .ui-menu-item {
    padding: 6px 1em 6px 0.4em;
}

/* DataTables overrides */
table.dataTable {
    border-collapse: collapse !important;
}
table.dataTable thead th {
    color: var(--muted) !important;
    font-weight: 600 !important;
    border-bottom: 1.5px solid var(--border) !important;
}
table.dataTable tbody th,
table.dataTable tbody td {
    padding: 8px 10px !important;
    border-bottom: 1px solid var(--border) !important;
}
.dataTables_wrapper .ui-toolbar {
    padding: 8px 0 !important;
    background: none !important;
    border: 0 !important;
}
table.dataTable tbody tr img { vertical-align: middle; }
table.clickable tbody tr { cursor: pointer; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */

/* Palier tablette, comme le site (.sl-grid, .art-grid, etc. passent
   à 2 colonnes à 900px avant de s'empiler à 720px) */
@media (max-width: 900px) {
    div.stats-quad { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    div#header-inner {
        height: auto;
        min-height: 56px;
        padding: 8px 16px;
        flex-wrap: wrap;
        justify-content: center;
    }
    img#logo { height: 26px; margin: 4px 0; }
    div#menu { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    div#menu ul { justify-content: center; }
    div#menu a { padding: 7px 10px; font-size: 12.5px; white-space: nowrap; }
    div#menu a i { font-size: 12px; }

    div#main { margin: 12px auto; padding: 16px; border-radius: var(--r); }

    /* Colonnes flottantes 49% (page canal, page serveur) : empilées en pleine largeur */
    div.halfleft, div.halfright {
        width: 100% !important;
        float: none !important;
        margin-bottom: 20px;
    }
    div.clear { display: none; }

    /* Pub AdSense 728px codée en dur dans layout.twig */
    div#main > div[style*="728px"] { width: 100% !important; overflow: hidden; }

    /* Graphiques Highcharts à largeur fixe → pleine largeur, empilés avec de l'air */
    #chart_line, #chart_status,
    #chart-clients, #chart-countries, #chart-history, #chart_activity {
        width: 100% !important;
        min-width: 0 !important;
        height: 220px !important;
    }
    table:has(#chart_line) tr,
    table:has(#chart_status) tr { display: flex; flex-direction: column; }
    table:has(#chart_line) td,
    table:has(#chart_status) td {
        display: block;
        width: 100% !important;
        padding: 0 0 24px 0 !important;
    }
    /* Highcharts : évite le chevauchement des labels de l'axe X en rotation */
    .highcharts-xaxis-labels text { font-size: 10px !important; }

    /* ── Tableau .details GÉNÉRIQUE (canal/serveur/utilisateur : Actuel/Pic/Modes en 1 seule colonne) ── */
    table.details:not(.top10-grid) tr,
    table.details:not(.top10-grid) th,
    table.details:not(.top10-grid) td {
        display: block;
        width: 100% !important;
    }
    table.details:not(.top10-grid) tr {
        border-bottom: 1px solid var(--border);
        padding-bottom: 8px;
        margin-bottom: 8px;
    }
    table.details:not(.top10-grid) tr:last-child { border-bottom: 0; }

    /* ── Bloc stats "Serveurs/Canaux/Utilisateurs/Opérateurs" : 1 colonne sur mobile ── */
    div.stats-quad { grid-template-columns: 1fr; gap: 10px; }

    /* ── Tableau "Top 10" (3 mini-tables côte à côte) : empilées avec marge entre chaque ── */
    table.top10-grid tr { display: flex; flex-direction: column; }
    table.top10-grid td, table.top10-grid th {
        display: block;
        width: 100% !important;
        padding: 0 0 20px 0 !important;
    }
    table.dataTable { width: 100% !important; }

    /* Onglets jQuery-UI (Statut/Pays/Clients/...) : scroll horizontal au lieu de déborder */
    div.ui-tabs { overflow: hidden; }
    ul.ui-tabs-nav {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    ul.ui-tabs-nav li { flex: 0 0 auto; float: none; }

    /* Formulaire de connexion : âge/sexe/ville empilés au lieu de côte à côte */
    div.fi-row { flex-direction: column; gap: 0; }
    div.fi-row .ff { flex: none; }
}

@media (max-width: 480px) {
    body { font-size: 13px; }
    div#menu a span { display: none; }
    div#menu a { padding: 9px 12px; }
    div#menu a i { font-size: 15px; }
}

/* ── Page Live (dashboard, cartes salons, classements, démographie) ── */
h1.lv-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 14px; }
h2.lv-h2 { font-size: 1.05rem; font-weight: 800; margin: 26px 0 12px; }
span.lv-big { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
p.lv-empty, li.lv-empty { color: var(--muted); font-size: 13px; }
p.lv-note { color: var(--muted); font-size: 12px; margin-top: 10px; }

div.lv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
div.lv-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color .15s, box-shadow .15s;
}
div.lv-card:hover { border-color: var(--blue); box-shadow: var(--sh); }
div.lv-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
a.lv-card-name { font-weight: 700; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.lv-card-name:hover { color: var(--blue); }
span.lv-card-n { font-size: 12px; font-weight: 700; color: var(--blue); background: var(--blue-l); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
div.lv-card-topic { font-size: 12.5px; color: var(--muted); line-height: 1.5; min-height: 3em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
a.lv-join {
    margin-top: auto;
    text-align: center;
    padding: 8px 12px;
    border-radius: var(--r);
    background: var(--blue);
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
a.lv-join:hover { background: var(--blue-d); }

div.lv-rank-bar { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
button.lv-tab {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
button.lv-tab.on { background: var(--blue-l); border-color: var(--blue-b); color: var(--blue); }
div.lv-rank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
div.lv-demo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
ol.lv-rank { list-style: none; margin: 0; padding: 0; }
ol.lv-rank li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
ol.lv-rank li:last-child { border-bottom: 0; }
ol.lv-rank a { color: var(--text); text-decoration: none; font-weight: 600; }
ol.lv-rank a:hover { color: var(--blue); }
ol.lv-rank li span:last-child { color: var(--muted); white-space: nowrap; }

@media (max-width: 900px) {
    div.lv-demo-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    div.lv-rank-grid { grid-template-columns: 1fr; }
    div.lv-cards { grid-template-columns: 1fr; }
}

/* ── Graphiques de la page Réseau ── */
div.stats-charts { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin: 16px 0; }
div.stats-chart-main, div.stats-chart-side { height: 175px; min-width: 0; }
@media (max-width: 720px) {
    div.stats-charts { grid-template-columns: 1fr; }
}

/* ── Highcharts : lisible en thème sombre (les couleurs sont posées en inline par la lib) ── */
[data-theme="dark"] .highcharts-container text,
[data-theme="dark"] .highcharts-container tspan { fill: var(--text2) !important; color: var(--text2) !important; }
[data-theme="dark"] .highcharts-container .highcharts-grid-line { stroke: var(--border) !important; }
[data-theme="dark"] .highcharts-container .highcharts-axis-line,
[data-theme="dark"] .highcharts-container .highcharts-tick { stroke: var(--border) !important; }
[data-theme="dark"] .highcharts-container .highcharts-tooltip-box { fill: var(--navy2) !important; stroke: var(--border) !important; }
[data-theme="dark"] .highcharts-container .highcharts-tooltip text,
[data-theme="dark"] .highcharts-container .highcharts-tooltip tspan { fill: var(--text) !important; }
[data-theme="dark"] .highcharts-container .highcharts-data-label-connector { stroke: var(--muted) !important; }
[data-theme="dark"] .highcharts-container .highcharts-point[stroke="#ffffff"],
[data-theme="dark"] .highcharts-container .highcharts-pie-series .highcharts-point { stroke: var(--white) !important; }
[data-theme="dark"] .highcharts-container .highcharts-navigator-mask-inside { fill: rgba(37,99,235,.2) !important; }
[data-theme="dark"] .highcharts-container .highcharts-button rect { fill: var(--navy2) !important; stroke: var(--border) !important; }

/* ── Contrôles DataTables / jQuery UI : lisibles en clair et en sombre ── */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label { color: var(--muted) !important; font-size: 13px; }
.dataTables_wrapper select,
.dataTables_wrapper input[type="search"],
.dataTables_wrapper input[type="text"] {
    background: var(--white) !important; color: var(--text) !important;
    border: 1.5px solid var(--border) !important; border-radius: var(--r);
    padding: 5px 9px; margin: 0 4px; outline: 0;
}
.dataTables_wrapper select:focus,
.dataTables_wrapper input[type="search"]:focus { border-color: var(--blue) !important; }
.dataTables_wrapper .dataTables_paginate { padding: 8px 0; }
.dataTables_wrapper .dataTables_paginate .paginate_button,
.dataTables_wrapper .fg-button {
    background: var(--white) !important; color: var(--text2) !important;
    border: 1px solid var(--border) !important; border-radius: 6px !important;
    padding: 4px 11px !important; margin: 0 2px !important; cursor: pointer; box-shadow: none !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
.dataTables_wrapper .fg-button:hover { background: var(--blue-l) !important; color: var(--blue) !important; border-color: var(--blue-b) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.ui-state-disabled.current,
.dataTables_wrapper .fg-button.ui-state-active { background: var(--blue) !important; color: #fff !important; border-color: var(--blue) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.ui-state-disabled { opacity: .45; cursor: default; }
.dataTables_wrapper .dataTables_empty { color: var(--muted) !important; padding: 18px 10px !important; }
.dataTables_wrapper .dataTables_processing { background: var(--white); color: var(--text); border: 1px solid var(--border); border-radius: var(--r); }
table.dataTable thead th .ui-icon { opacity: .6; }
[data-theme="dark"] .ui-icon, [data-theme="dark"] .ui-widget-content .ui-icon { filter: invert(1) brightness(1.1); }

/* Bouton de menu de salon (petit triangle) */
button.chanbutton.ui-button {
    background: var(--bg) !important; border: 1px solid var(--border) !important;
    border-radius: 6px !important; color: var(--muted) !important; padding: 0 !important;
}
button.chanbutton.ui-button:hover, button.chanbutton.ui-state-focus { background: var(--blue-l) !important; border-color: var(--blue-b) !important; }

/* Boutons radio / jQuery UI buttonset (périodes d'historique) */
.ui-button, .ui-button.ui-widget {
    background: var(--bg); color: var(--text2); border: 1px solid var(--border); border-radius: 6px;
}
.ui-button:hover, .ui-button.ui-state-active, .ui-checkboxradio-label.ui-state-active {
    background: var(--blue) !important; color: #fff !important; border-color: var(--blue) !important;
}

/* Onglets */
ul.ui-tabs-nav { background: var(--bg) !important; border: 0 !important; border-bottom: 1.5px solid var(--border) !important; border-radius: var(--r) var(--r) 0 0 !important; padding: 6px 8px 0 !important; }
ul.ui-tabs-nav li.ui-state-default { background: transparent !important; border: 0 !important; border-bottom: 2px solid transparent !important; }
ul.ui-tabs-nav li.ui-state-default a { color: var(--muted) !important; padding: 9px 14px; font-weight: 600; }
ul.ui-tabs-nav li.ui-tabs-active { border-bottom-color: var(--blue) !important; }
ul.ui-tabs-nav li.ui-tabs-active a, ul.ui-tabs-nav li.ui-state-default a:hover { color: var(--blue) !important; }
div.ui-tabs-panel { background: transparent !important; color: var(--text) !important; }

/* Formulaires / liens dans le contenu */
div#main label, div#main legend { color: var(--text2); }
div#main input[type="text"], div#main input[type="search"], div#main select, div#main textarea {
    background: var(--white); color: var(--text); border: 1.5px solid var(--border); border-radius: var(--r);
}
div#main h1, div#main h2, div#main h3 { color: var(--text); }
div#main td, div#main th { color: var(--text); }
div#main a { color: var(--blue); }
table.dataTable thead th { text-align: left; }
.highcharts-container, .highcharts-container text, .highcharts-container tspan { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, system-ui, sans-serif !important; }
.highcharts-container .highcharts-text-outline { fill: none !important; stroke: none !important; }
.highcharts-container .highcharts-legend-item text { font-weight: 600; }
table.dataTable tbody tr { background-color: var(--white); }
.dataTables_wrapper { overflow-x: auto; }
div.choser { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
div.choser label.ui-button { margin: 0 !important; padding: 5px 12px; cursor: pointer; }

/* ── Live : affluence, filtre, squelettes ── */
div.lv-flow-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 8px; }
div.lv-flow-grid .sq-block { min-width: 0; }
div.lv-tools { margin: 0 0 12px; }
input.lv-filter { width: 100%; padding: 9px 12px; font-size: 14px; background: var(--white); color: var(--text); border: 1.5px solid var(--border); border-radius: var(--r); outline: 0; box-sizing: border-box; }
input.lv-filter:focus { border-color: var(--blue); }
div.lv-skel { height: 128px; border-radius: var(--rl); border: 1.5px solid var(--border);
    background: linear-gradient(90deg, var(--bg) 25%, var(--blue-l) 50%, var(--bg) 75%); background-size: 200% 100%; animation: lv-shimmer 1.4s infinite linear; }
@keyframes lv-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { div.lv-skel { animation: none; } }
@media (max-width: 900px) { div.lv-flow-grid { grid-template-columns: 1fr; } }

/* ── Bannière d'annonce (annonce.json) ── */
div.announce { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 9px 16px; font-size: 13.5px; font-weight: 600; text-align: center; background: var(--blue-l); color: var(--blue); border-bottom: 1px solid var(--blue-b); }
div.announce.warn { background: var(--warn-bg); color: var(--warn-text); border-bottom-color: var(--warn-border); }
div.announce a { color: inherit; text-decoration: underline; }
div.announce button { background: none; border: 0; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }

/* ── Widget embarquable ── */
body.widget { margin: 0; padding: 12px; background: var(--white); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, system-ui, sans-serif; font-size: 14px; }
body.widget .wd-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
body.widget .wd-title { font-weight: 800; font-size: 15px; }
body.widget .wd-n { font-weight: 800; font-size: 20px; color: var(--blue); }
body.widget ul { list-style: none; margin: 0 0 10px; padding: 0; }
body.widget li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
body.widget li a { color: var(--text); text-decoration: none; font-weight: 600; }
body.widget li span { color: var(--muted); }
body.widget a.wd-join { display: block; text-align: center; background: var(--blue); color: #fff; text-decoration: none; font-weight: 700; padding: 9px; border-radius: var(--r); }
