/* Thème clair ADT (Aéroport de Tahiti) : bleu ciel du logo #5B9BD5, bleu océan #234B85 pour les textes et titres.
   Les noms de variables --aeria* sont hérités du fork Abidjan (marque principale) ; seules leurs valeurs changent. */
:root {
  --aeria: #234B85; --aeria-2: #3462A3; --aeria-soft: #e8eef7;
  --aeria-orange: #5B8FD0; --aeria-green: #7FA8DC; --aeria-green-dark: #3f7a33; --aeria-green-soft: #eaf2fb;
  --aeria-red: var(--aeria-orange);
  --egis: #8cb31c; --egis-dark: #5d7d0c; --egis-soft: #f1f7e1;
  --bg: #f2f4f8; --panel: #ffffff; --panel2: #f7f8fb; --line: #e1e5ee; --line2: #eef1f6; --text: #1a2340; --muted: #66708a;
  --accent: var(--aeria);
  /* --late reste rouge : c'est une alerte (retard), pas une couleur de marque */
  --arr: #5E9A4A; --dep: #234B85; --ind: #8a93a8; --late: #c8321e; --early: #5E9A4A;
  --shadow: 0 1px 2px rgba(26, 33, 66, 0.06), 0 1px 6px rgba(26, 33, 66, 0.05);
  --side: 176px; --top: 56px; --foot: 24px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 13px/1.35 "Segoe UI", system-ui, -apple-system, sans-serif; overflow: hidden; }
body { display: grid; grid-template: var(--top) 1fr var(--foot) / var(--side) 1fr; grid-template-areas: "top top" "side main" "foot foot"; }

/* ---------- En-tête ---------- */
#top { grid-area: top; position: relative; display: flex; align-items: center; gap: 16px; padding: 0 14px 3px 10px; background: #fff; min-width: 0; z-index: 3000;
  box-shadow: 0 2px 8px rgba(26, 33, 66, 0.08); }
/* liseré tricolore repris du logo AERIA : marine, orange, vert */
#top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--aeria) 0 62%, var(--aeria-orange) 62% 81%, var(--aeria-green) 81% 100%); }
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; flex: none; height: 100%; }
/* nouveau logo AERIA (symbole + texte, PNG détouré sur fond transparent) */
.logo-aeria { display: inline-flex; align-items: center; height: 46px; }
.logo-aeria img { height: 100%; width: auto; display: block; }
.by-egis { display: inline-flex; align-items: flex-end; gap: 5px; height: 42px; padding: 0 0 4px 12px; border-left: 1px solid var(--line); }
.by-egis span { font-size: 11px; font-style: italic; font-weight: 600; color: var(--muted); line-height: 1; padding-bottom: 3px; }
.by-egis img { height: 20px; width: auto; display: block; mix-blend-mode: multiply; }
.brand-text { padding-left: 12px; border-left: 1px solid var(--line); line-height: 1.2; }
.brand-text b { display: block; font-size: 13px; letter-spacing: 0.4px; color: var(--aeria); }
.brand-text small { display: block; color: var(--muted); font-size: 10.5px; }
@media (max-width: 1350px) { .brand-text { display: none; } }
#tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; min-width: 0; align-self: stretch; align-items: center; }
#tabs a { position: relative; color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 6px; white-space: nowrap; font-size: 12.5px; font-weight: 500; }
#tabs a:hover { background: var(--aeria-soft); color: var(--aeria); }
#tabs a.on { background: var(--aeria); color: #fff; font-weight: 600; box-shadow: inset 0 -3px 0 var(--aeria-red); }
.side-toggle { background: #fff; border: 1px solid var(--line); color: var(--aeria); border-radius: 6px; width: 28px; height: 28px; cursor: pointer; flex: none; font-weight: 700; }
.logout { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 8px; color: var(--aeria); text-decoration: none; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; background: #fff; }
.logout .who { color: var(--muted); font-weight: 500; padding-right: 8px; border-right: 1px solid var(--line); }
.logout:hover { border-color: var(--aeria-red); color: var(--aeria-red); }
.side-toggle:hover { border-color: var(--aeria); background: var(--aeria-soft); }

/* ---------- Colonne des filtres ---------- */
#side { grid-area: side; position: relative; isolation: isolate; overflow-y: auto; padding: 8px 6px; display: flex; flex-direction: column; gap: 6px; background: #fff; border-right: 1px solid var(--line); }
#side .panel { box-shadow: none; background: rgba(255, 255, 255, 0.82); }
/* Filigrane : le récepteur ADS-B (feeder) en dessin au crayon, encre marine AERIA, très atténué, sous les filtres */
#side::after { content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: min(62%, 330px); pointer-events: none;
  background: url("img/feeder-sketch.png") center bottom / contain no-repeat; opacity: 0.13;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 35%); mask-image: linear-gradient(to bottom, transparent 0, #000 35%); }
body.side-collapsed { grid-template-columns: 0 1fr; }
body.side-collapsed #side { display: none; }
/* isolation : les z-index internes de Leaflet (jusqu'à 1000) restent confinés à la zone principale ;
   l'en-tête (z-index 3000) et son menu « Plus » passent donc toujours devant les cartes */
#main { grid-area: main; position: relative; z-index: 0; isolation: isolate; overflow-x: hidden; overflow-y: auto; scroll-behavior: smooth; overscroll-behavior: contain; }
#side { z-index: 1; }

/* ---------- Pied de page ---------- */
#foot { grid-area: foot; display: flex; gap: 20px; justify-content: space-between; align-items: center; padding: 0 12px; color: #dfe3f5; font-size: 11px; background: var(--aeria); }
#foot > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#foot { overflow: hidden; }
@media (max-width: 1100px) { #foot #meta { display: none; } }
#foot #pbi::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--aeria-orange); margin-right: 7px; vertical-align: 0; }

/* ---------- Panneaux ---------- */
.page { position: relative; height: 100%; display: grid; gap: 7px; padding: 7px; }
/* pages défilantes : premier écran = carte (hauteur --ph), tableaux allongés en dessous ; ascenseur vertical de la zone principale */
.page.scroll { height: auto; min-height: 100%; padding-bottom: 14px; }
.page.scroll .table .table-wrap { min-height: 120px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; box-shadow: var(--shadow); }
.panel-title { display: flex; align-items: center; gap: 6px; padding: 4px 8px; font-weight: 600; font-size: 11.5px; color: var(--aeria); border-bottom: 1px solid var(--line2); background: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-title::before { content: ""; flex: none; width: 3px; height: 11px; border-radius: 2px; background: var(--aeria-red); }
.panel-info { margin-left: auto; font-weight: 400; color: var(--muted); font-size: 11px; }
.panel-body { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.kpi { padding: 4px 10px; justify-content: center; border-top: 3px solid var(--aeria); }
.kpi-label { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value { font-size: 21px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--aeria); }
.kpi-sub { color: var(--muted); font-size: 11px; }
.kpi.arr { border-top-color: var(--aeria-green); } .kpi.arr .kpi-value { color: var(--arr); }
.kpi.dep { border-top-color: var(--aeria-red); } .kpi.dep .kpi-value { color: var(--dep); }
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; min-height: 0; }
#side .kpi .kpi-value { font-size: 16px; } #side .kpi { padding: 3px 7px; border-top-width: 2px; } #side .kpi-sub { display: none; }
/* Compteurs de la colonne de gauche : une ligne chacun, libellé à gauche, valeur à droite (rien de tronqué) */
.kpi-pair { display: grid; grid-template-columns: 1fr; gap: 4px; }
#side .kpi { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 6px; padding: 4px 8px; }
#side .kpi .kpi-label { white-space: normal; overflow: visible; }
#side .kpi .kpi-value { flex: none; }
/* Cartes KPI : les éléments ne se compriment jamais les uns sur les autres */
.kpi > * { flex: none; }
.kpi-label { line-height: 1.25; }
.kpi.mini { padding: 5px 10px; gap: 2px; }
.kpi.mini .kpi-label { white-space: normal; overflow: visible; }
.kpi.mini .kpi-value { font-size: 19px; line-height: 1.1; }
.kpi.mini .kpi-sub { display: none; }

/* ---------- Filtres ---------- */
input, select { font: inherit; color: var(--text); }
.slicer-search { margin: 3px 4px 1px; padding: 2px 6px; font-size: 11.5px; background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; }
.slicer-search:focus, .textfilter input:focus, .range input:focus { outline: none; border-color: var(--aeria-2); box-shadow: 0 0 0 2px var(--aeria-soft); background: #fff; }
.slicer-list { overflow-y: auto; flex: 1; padding: 1px 3px 3px; }
.slicer-item { display: flex; justify-content: space-between; gap: 6px; padding: 1px 5px; border-radius: 3px; cursor: pointer; font-size: 11.5px; line-height: 1.35; }
.slicer-item:hover { background: var(--aeria-soft); }
.slicer-item.on { background: var(--aeria); color: #fff; } .slicer-item.on .slicer-count { color: #cdd3f0; }
.slicer-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slicer-count { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 10.5px; }
.slicer-clear { margin-left: auto; display: none; background: none; border: 0; color: var(--aeria-red); cursor: pointer; font-weight: 700; }
.slicer-clear.show { display: inline; }
.textfilter input, .range input, select { padding: 6px 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; }
.textfilter .panel-body { padding: 3px 5px; } .textfilter input { width: 100%; padding: 3px 6px; font-size: 12px; }
.range { display: flex; align-items: center; gap: 4px; padding: 3px 5px; } .range input[type=number] { width: 0; flex: 1; padding: 2px 4px; font-size: 12px; }
.range input[type=checkbox], .chk input { accent-color: var(--aeria); }
.alt { padding: 2px 2px 4px; }
.chk { display: flex; align-items: center; gap: 6px; padding: 3px 8px; cursor: pointer; }
.day-list { padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.chip { background: #fff; border: 1px solid var(--line); color: var(--muted); border-radius: 4px; padding: 2px 4px; font: inherit; font-size: 11px; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--aeria-2); color: var(--aeria); } .chip.on { background: var(--aeria); border-color: var(--aeria); color: #fff; }
.row { display: flex; gap: 4px; padding: 2px 5px; flex-wrap: wrap; align-items: center; }
.btn { background: #fff; border: 1px solid var(--line); color: var(--aeria); border-radius: 5px; padding: 6px 10px; cursor: pointer; font: inherit; font-weight: 600; }
.btn:hover { border-color: var(--aeria); background: var(--aeria-soft); } .btn.sm { padding: 1px 6px; font-size: 11px; }
.hint { color: var(--muted); font-size: 11px; margin: 4px 8px; }
.no-alt-note { display: none; color: var(--aeria-red); }
body.no-alt .no-alt-note { display: block; }
body.no-alt .alt .range, body.no-alt .alt .row, body.no-alt .alt .chk { opacity: 0.4; pointer-events: none; }
input[type=range] { margin: 4px 8px; accent-color: var(--aeria); }

/* ---------- Tableaux ---------- */
.table-wrap { overflow: auto; flex: 1; }
table { border-collapse: collapse; width: 100%; font-size: 12px; font-variant-numeric: tabular-nums; }
th { position: sticky; top: 0; background: var(--aeria-soft); text-align: left; padding: 3px 6px; font-weight: 600; color: var(--aeria); cursor: pointer; white-space: nowrap; border-bottom: 1px solid #d5dbef; z-index: 1; }
td { padding: 2px 6px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
tbody tr:nth-child(even) td { background: #fafbfd; }
th.num, td.num { text-align: right; }
tr.clickable { cursor: pointer; } tbody tr:hover td { background: var(--aeria-soft); } tr.on td, tbody tr.on:nth-child(even) td { background: var(--aeria); color: #fff; }
.badge { padding: 1px 7px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.badge.arr { background: var(--aeria-green-soft); color: var(--arr); } .badge.dep { background: var(--aeria-soft); color: var(--dep); } .badge.ind { background: #eef0f4; color: var(--ind); }
.late { color: var(--late); font-weight: 600; } .early { color: var(--early); }

/* ---------- Graphiques et cartes ---------- */
.chart-box { position: absolute; inset: 4px; }
.map-box { position: absolute; inset: 0; background: #dfe4ec; }
.pt-canvas { position: absolute; inset: 0; z-index: 450; pointer-events: none; }
.map-tip { position: absolute; z-index: 1000; display: none; pointer-events: none; background: #fff; color: var(--text); border: 1px solid var(--line); border-top: 3px solid var(--aeria); border-radius: 6px; padding: 6px 9px; font-size: 12px; min-width: 170px; box-shadow: 0 6px 18px rgba(26, 33, 66, 0.18); }
.map-tip strong { color: var(--aeria); }
.map-tip div { display: flex; justify-content: space-between; gap: 12px; } .map-tip span { color: var(--muted); }
.map-legend { position: absolute; z-index: 800; left: 8px; bottom: 22px; background: rgba(255, 255, 255, 0.94); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; font-size: 11px; display: none; min-width: 160px; box-shadow: 0 4px 12px rgba(26, 33, 66, 0.15); }
.map-legend b { color: var(--aeria); }
.map-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.map-legend .grad { height: 8px; border-radius: 3px; margin: 4px 0 2px; } .map-legend .grad-l { display: flex; justify-content: space-between; color: var(--muted); }
.map-legend .sub { color: var(--muted); margin-top: 3px; }
.pk-label { color: #ffd166; font-size: 10px; font-weight: 700; text-align: center; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.leaflet-container { font: inherit; }
.leaflet-bar a, .leaflet-control-layers { color: var(--aeria) !important; }
.clock { font-size: 28px; font-weight: 700; padding: 8px; font-variant-numeric: tabular-nums; color: var(--aeria); }
.panel label { display: flex; flex-direction: column; gap: 4px; padding: 6px 8px; color: var(--muted); }
.panel label.chk { flex-direction: row; color: var(--text); }

/* ---------- Écran de chargement ---------- */
#loading { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; background: #fff; z-index: 5000; color: var(--muted); }
#loading::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(90deg, var(--aeria) 0 62%, var(--aeria-orange) 62% 81%, var(--aeria-green) 81% 100%); }
.loading-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.logo-aeria.lg { height: 110px; }
.by-egis.lg { height: 34px; border-left: 0; padding: 0; align-items: center; gap: 8px; }
.by-egis.lg span { font-size: 14px; padding: 0; } .by-egis.lg img { height: 30px; }
.loading-title { color: var(--aeria); font-weight: 600; letter-spacing: 0.6px; font-size: 13px; text-transform: uppercase; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--aeria-soft); border-top-color: var(--aeria); border-right-color: var(--aeria-orange); border-bottom-color: var(--aeria-green); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* ---------- Ascenseurs : fins, discrets au repos, marine au survol ---------- */
* { scrollbar-width: thin; scrollbar-color: #c5cce0 transparent; }
*:hover { scrollbar-color: #8a97b4 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cdd3e3; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; min-height: 28px; }
::-webkit-scrollbar-thumb:hover { background-color: #8a97b4; }
::-webkit-scrollbar-thumb:active { background-color: var(--aeria); }
::-webkit-scrollbar-corner { background: transparent; }

/* ---------- Titres de panneaux ---------- */
/* Titres de panneaux : jamais tronqués. Le titre passe à la ligne si besoin ; compteur, « +N col. » et CSV
   descendent sur une seconde ligne (alignés à droite) quand la place manque. */
.panel-title { flex-wrap: wrap; white-space: normal; row-gap: 2px; overflow: visible; text-overflow: clip; }
.panel-title .title-text { overflow: visible; text-overflow: clip; min-width: 0; flex: 0 1 auto; white-space: normal; line-height: 1.25; }
.panel-title .panel-info { white-space: nowrap; flex: none; }

/* ---------- Listes de filtres ---------- */
.slicer .panel-title { padding-right: 4px; }
.slicer.active { border-color: #c6cede; box-shadow: 0 0 0 1px var(--aeria-soft), var(--shadow); }
.slicer.active .panel-title::before { background: var(--aeria); }
.sel-badge { margin-left: auto; font-size: 10.5px; font-weight: 600; color: #fff; background: var(--aeria); border-radius: 9px; padding: 0 6px; line-height: 16px; }
.sel-badge:empty { display: none; }
.slicer-clear { margin-left: 4px; display: none; background: none; border: 0; color: var(--aeria-red); cursor: pointer; font: inherit; font-size: 10.5px; font-weight: 600; padding: 0 2px; }
.slicer-clear:hover { text-decoration: underline; }
.slicer-clear.show { display: inline; }
.slicer-search { margin: 4px 5px 2px; padding: 3px 7px 3px 24px; font-size: 11.5px; background: var(--panel2) no-repeat 7px 50% / 12px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2367718b' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E"); }
.slicer-list { overflow-y: auto; flex: 1; padding: 2px 3px 4px; overscroll-behavior: contain;
  /* ombres de défilement : indiquent qu'il reste du contenu au-dessus / au-dessous */
  background: linear-gradient(#fff 30%, rgba(255,255,255,0)) top / 100% 18px no-repeat local,
    linear-gradient(rgba(255,255,255,0), #fff 70%) bottom / 100% 18px no-repeat local,
    radial-gradient(farthest-side at 50% 0, rgba(26,33,66,.14), transparent) top / 100% 7px no-repeat scroll,
    radial-gradient(farthest-side at 50% 100%, rgba(26,33,66,.14), transparent) bottom / 100% 7px no-repeat scroll; }
.slicer-item { position: relative; display: flex; align-items: center; gap: 6px; padding: 2px 5px 3px; border-radius: 4px; cursor: pointer; font-size: 11.5px; line-height: 1.3; outline: none; }
.slicer-item:hover, .slicer-item:focus-visible { background: var(--aeria-soft); }
.slicer-item:focus-visible { box-shadow: inset 0 0 0 1px var(--aeria-2); }
.slicer-item.on { background: var(--aeria-soft); color: var(--aeria); font-weight: 600; }
.slicer-item.on .slicer-count { color: var(--aeria); }
.slicer-item.empty .slicer-label { opacity: .55; font-style: italic; }
.chk-box { flex: none; width: 12px; height: 12px; border: 1.5px solid #aeb6cc; border-radius: 3px; background: #fff; }
.slicer-item.on .chk-box { border-color: var(--aeria); background: var(--aeria) no-repeat center / 9px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2.2'%3E%3Cpath d='m2 6.5 2.6 2.6L10 3.5'/%3E%3C/svg%3E"); }
/* libellés des listes : passage à la ligne au lieu d'être coupés */
.slicer-label { flex: 1; min-width: 0; overflow: visible; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.slicer-item { align-items: flex-start; }
.slicer-item .chk-box { margin-top: 1px; }
.slicer-foot { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; line-height: 1.3; }
.slicer-label mark { background: #fff1b8; color: inherit; border-radius: 2px; padding: 0 1px; }
.slicer-count { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 10.5px; }
.slicer-bar { position: absolute; left: 23px; bottom: 1px; height: 2px; max-width: calc(100% - 28px); border-radius: 2px; background: #c7cfdc; pointer-events: none; }
.slicer-item.on .slicer-bar { background: var(--aeria-red); }
.slicer-empty { padding: 10px 8px; color: var(--muted); font-size: 11.5px; font-style: italic; text-align: center; }
.slicer-foot { flex: none; padding: 2px 8px 3px; border-top: 1px solid var(--line2); color: var(--muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.textfilter.active { border-color: #c6cede; } .textfilter.active input { border-color: var(--aeria-2); background: #fff; }
.textfilter.active .panel-title::before { background: var(--aeria); }

/* ---------- Tableaux ---------- */
.table .panel-title { padding-right: 5px; }
.table .panel-info { margin-left: auto; font-variant-numeric: tabular-nums; }
.tbl-btn { flex: none; border: 1px solid var(--line); background: #fff; color: var(--aeria); border-radius: 4px; font: inherit; font-size: 10.5px; font-weight: 600; padding: 0 6px; line-height: 16px; cursor: pointer; }
.tbl-btn:hover { border-color: var(--aeria); background: var(--aeria-soft); }
.table-wrap { overflow: auto; flex: 1; overscroll-behavior: contain; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12px; font-variant-numeric: tabular-nums; }
th { position: sticky; top: 0; z-index: 2; background: #edf0f6; color: var(--aeria); text-align: left; padding: 4px 7px; font-weight: 600; font-size: 11.5px; white-space: nowrap; cursor: pointer; user-select: none;
  border-bottom: 1px solid #cbd2e1; border-right: 1px solid #e2e6f3; }
th:last-child { border-right: 0; }
th:hover { background: #e2e7f0; }
th .sort-ind { margin-left: 4px; font-size: 9px; color: #aab3cc; }
th.sorted { background: #dfe4ef; box-shadow: inset 0 -2px 0 var(--aeria-red); }
th.sorted .sort-ind { color: var(--aeria-red); }
th.num .th-label { float: none; }
td { padding: 2px 7px; border-bottom: 1px solid var(--line2); border-right: 1px solid #f1f3f8; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
td:last-child { border-right: 0; }
td.wrap { white-space: normal; }
td.nil { color: #b3bacb; text-align: center; }
th.num, td.num { text-align: right; }
th.rn, td.rn { position: sticky; left: 0; z-index: 1; width: 1%; text-align: right; color: #9aa3b8; font-size: 10.5px; background: #fafbfd; border-right: 1px solid #e2e6f3; padding: 2px 6px; }
th.rn { z-index: 3; background: #edf0f6; cursor: default; color: var(--muted); }
tbody tr:nth-child(even) td { background: #fafbfd; }
tbody tr:nth-child(even) td.rn { background: #f5f6fa; }
tbody tr:hover td { background: var(--aeria-soft); }
tr.on td, tbody tr.on:nth-child(even) td { background: var(--aeria); color: #fff; }
tr.on td.nil { color: #c9cff0; }
tr.empty-row td { text-align: center; color: var(--muted); font-style: italic; padding: 14px; background: #fff !important; }
.tbl-pager { flex: none; display: flex; align-items: center; justify-content: center; gap: 3px; padding: 3px 6px; border-top: 1px solid var(--line2); background: #fafbfd; font-size: 11px; color: var(--muted); }
.pg-btn { border: 1px solid var(--line); background: #fff; color: var(--aeria); border-radius: 4px; width: 22px; height: 20px; line-height: 16px; cursor: pointer; font: inherit; font-weight: 700; }
.pg-btn:hover:not(:disabled) { border-color: var(--aeria); background: var(--aeria-soft); }
.pg-btn:disabled { opacity: .35; cursor: default; }
.pg-info { padding: 0 8px; font-variant-numeric: tabular-nums; }

/* ---------- Aucun ascenseur horizontal ---------- */
html, body, .page, .panel, .panel-body, .table-wrap, .slicer-list, #side { overflow-x: hidden; }
table.fit { table-layout: fixed; width: 100%; }
table.fit th, table.fit td { max-width: none; overflow: hidden; text-overflow: ellipsis; }
/* En-têtes sur deux lignes au plus (coupure aux espaces) : libellé complet, jamais tronqué.
   Cellules : largeur mesurée ; si une valeur dépasse malgré tout, elle passe à la ligne au lieu d'être coupée. */
table.fit th { padding: 3px 5px; white-space: normal; line-height: 1.2; vertical-align: bottom; text-overflow: clip; }
table.fit th .th-label { display: inline; overflow-wrap: normal; word-break: keep-all; }
table.fit th .sort-ind { white-space: nowrap; }
table.fit td { padding: 2px 5px; font-size: 11.5px; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; line-height: 1.3; }
.hid-cols { flex: none; font-size: 10.5px; font-weight: 600; color: var(--aeria-red); cursor: help; }
.hid-cols:empty { display: none; }
#tabs { flex: 1 1 auto; overflow: hidden; scrollbar-width: none; }
#tabs::-webkit-scrollbar { display: none; }
.tabs-more { position: relative; flex: none; }
.tabs-more-btn { border: 1px solid var(--line); background: #fff; color: var(--aeria); border-radius: 6px; padding: 5px 10px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tabs-more-btn:hover, .tabs-more.open .tabs-more-btn { border-color: var(--aeria); background: var(--aeria-soft); }
.tabs-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 3001; min-width: 230px; max-height: calc(100vh - 80px); overflow-y: auto; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--aeria);
  border-radius: 8px; box-shadow: 0 10px 28px rgba(26,33,66,.18); padding: 4px; }
.tabs-more.open .tabs-menu { display: block; }
.tabs-menu a { display: block; padding: 6px 10px; border-radius: 5px; color: var(--text); text-decoration: none; font-size: 12.5px; white-space: nowrap; }
.tabs-menu a:hover { background: var(--aeria-soft); color: var(--aeria); }
.tabs-menu a.on { background: var(--aeria); color: #fff; }

/* ---------- Page Retards ADS-B / AODB ---------- */
.mat-box { padding: 8px 8px 2px; }
table.mat { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 12px; }
table.mat th { position: static; background: none; border: 0; color: var(--aeria); font-weight: 600; padding: 2px 4px; cursor: default; box-shadow: none; }
table.mat td.mat-cell { padding: 8px 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; text-align: center; white-space: nowrap; }
table.mat td.mat-cell b { font-size: 18px; color: var(--aeria); }
table.mat td.mat-cell span { color: var(--muted); font-size: 11px; }
table.mat td.mat-cell.diag { background: var(--aeria-green-soft); border-color: #cfdcb8; }
table.mat td.mat-cell:not(.diag) b { color: var(--aeria-red); }
table.mat td.mat-cell:hover { border-color: var(--aeria); }
table.mat td.mat-cell.fon { box-shadow: inset 0 0 0 2px var(--aeria-red); }
.defs { margin: 4px 10px 8px; font-size: 11px; color: var(--muted); display: grid; grid-template-columns: max-content 1fr; gap: 3px 8px; overflow-y: auto; }
.defs dt { font-weight: 600; color: var(--aeria); } .defs dd { margin: 0; }
.badge.late-b { background: #fdecea; color: #a32010; }
/* sélecteur Bloc / Piste */
.seg { display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg-btn { border: 0; background: #fff; color: var(--aeria); font: inherit; font-size: 11.5px; font-weight: 600; padding: 2px 9px; cursor: pointer; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn:hover { background: var(--aeria-soft); }
.seg-btn.on { background: var(--aeria); color: #fff; box-shadow: inset 0 -2px 0 var(--aeria-red); }
.nil-txt { color: #b3bacb; }

/* ---------- Données sélectionnables ---------- */
td.fcell { cursor: pointer; color: var(--aeria); text-decoration: underline dotted #b7c0d2; text-underline-offset: 3px; }
td.fcell:hover { text-decoration-color: var(--aeria-red); color: var(--aeria-red); }
td.fcell.fon { font-weight: 700; color: var(--aeria-red); text-decoration: underline solid var(--aeria-red); }
tr.on td.fcell, tr.on td.fcell.fon { color: #fff; text-decoration-color: rgba(255,255,255,.6); }
td.fcell .badge { cursor: pointer; }
.map-box.pickable { cursor: crosshair; }
.map-tip .tip-hint { display: block; margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line2); color: var(--aeria-red); font-size: 11px; }
.chart-box canvas { cursor: default; }

/* ---------- Bandeau des filtres actifs ---------- */
#active-filters { display: none; position: absolute; left: 7px; right: 7px; top: 4px; height: 22px; z-index: 20; align-items: center; gap: 5px; flex-wrap: nowrap; overflow: hidden; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); }
#active-filters::-webkit-scrollbar { display: none; }
#active-filters > * { flex: none; }
body.has-filters #active-filters { display: flex; }
body.has-filters .page { padding-top: 37px; }
.af-notice { font-size: 11px; color: #7a4a00; background: #fff4dc; border: 1px solid #f0c56b; border-radius: 6px; padding: 2px 8px; flex-basis: 100%; }
.af-label { font-size: 11px; font-weight: 600; color: var(--aeria); margin-right: 2px; }
.af-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 320px; background: #fff; border: 1px solid #c6cede; border-radius: 12px; padding: 1px 4px 1px 9px; font-size: 11px; box-shadow: var(--shadow); }
.af-chip b { color: var(--aeria); font-weight: 600; }
.af-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-chip button { border: 0; background: var(--aeria-soft); color: var(--aeria); width: 16px; height: 16px; border-radius: 50%; cursor: pointer; font-size: 11px; line-height: 16px; padding: 0; }
.af-chip button:hover { background: var(--aeria-red); color: #fff; }
.af-chip.global { border-color: #d6e2c2; } .af-chip.global b { color: var(--aeria-green-dark); }
.af-reset { border: 0; background: none; color: var(--aeria-red); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; padding: 0 4px; }
.af-reset:hover { text-decoration: underline; }

/* Ascenseur vertical de la page : plus large et toujours visible quand la page dépasse l'écran */
#main::-webkit-scrollbar { width: 12px; }
#main::-webkit-scrollbar-thumb { background-color: #b7c0d2; border-width: 3px; }
#main::-webkit-scrollbar-thumb:hover { background-color: var(--aeria-2); }
#main { scrollbar-width: auto; scrollbar-color: #b7c0d2 transparent; }