/*
 * SAFA Vols 1.8.0 — interface institutionnelle unifiée et verrouillée
 * Toutes les règles sont confinées aux conteneurs publics du plugin.
 */

:is(.safa-flights-widget, .safa-search-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap, .safa-flight-single) {
  --safa-ui-navy: #0a335b;
  --safa-ui-navy-deep: #072847;
  --safa-ui-blue: #0879b8;
  --safa-ui-sky: #51b9e8;
  --safa-ui-yellow: #fcd116;
  --safa-ui-red: #ef2b2d;
  --safa-ui-green: #009e49;
  --safa-ui-ink: #17324d;
  --safa-ui-muted: #65788b;
  --safa-ui-border: #dfe8f0;
  --safa-ui-surface: #f5f8fb;
  --safa-ui-shadow: 0 18px 55px rgba(10, 51, 91, 0.11);
  width: 100%;
  color: var(--safa-ui-ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  box-sizing: border-box;
}

:is(.safa-flights-widget, .safa-search-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap, .safa-flight-single) *,
:is(.safa-flights-widget, .safa-search-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap, .safa-flight-single) *::before,
:is(.safa-flights-widget, .safa-search-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap, .safa-flight-single) *::after {
  box-sizing: border-box;
}

:is(.safa-flights-widget, .safa-search-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap, .safa-flight-single) :is(button, input, select) {
  font: inherit;
}

:is(.safa-flights-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap, .safa-flight-single) {
  overflow: hidden;
  border: 1px solid var(--safa-ui-border);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--safa-ui-shadow);
}

/* Bandeau commun avec le motif d'ailes SAFA */
:is(.safa-flights-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap) .safa-module-hero,
.safa-flight-single .safa-flight-single-hero {
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  padding: 42px clamp(26px, 5vw, 68px);
  background: linear-gradient(112deg, #0876ad 0%, #0b5f91 46%, #0a335b 100%);
  color: #fff;
}

:is(.safa-flights-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap) .safa-module-hero::after,
.safa-flight-single .safa-flight-single-hero::after {
  content: none !important;
  display: none !important;
}

:is(.safa-flights-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap, .safa-flight-single) .safa-module-hero__motif {
  position: absolute;
  z-index: 0;
  inset: 0 0 0 auto;
  width: min(60%, 840px);
  background: var(--safa-ui-navy) url("../images/motif-ailes.png") center right / cover no-repeat;
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.16) 16%, #000 46%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.16) 16%, #000 46%);
  pointer-events: none;
}

:is(.safa-flights-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap) .safa-module-hero__content,
.safa-flight-single .safa-flight-single-hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, 72%);
}

:is(.safa-flights-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap) .safa-module-hero :is(h2, .safa-map-title, .safa-schedule-title, .safa-stats-title) {
  margin: 7px 0 12px;
  color: #fff;
  font: 780 clamp(32px, 4vw, 54px) / 1.08 Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: -0.035em;
}

:is(.safa-flights-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap) .safa-module-hero :is(h2, .safa-map-title, .safa-schedule-title, .safa-stats-title) em {
  color: inherit;
  font-style: normal;
}

:is(.safa-flights-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap) .safa-module-hero :is(p, .safa-map-desc, .safa-schedule-desc, .safa-stats-desc) {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(14px, 1.3vw, 18px);
  line-height: 1.6;
}

:is(.safa-flights-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap) .safa-module-hero :is(.safa-module-hero__eyebrow, .safa-map-eyebrow, .safa-schedule-eyebrow, .safa-stats-eyebrow) {
  display: block;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.safa-flights-widget .safa-module-hero__live,
:is(.safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap) .safa-demo-badge {
  position: relative;
  z-index: 2;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(5, 35, 61, 0.38);
  color: #fff;
  font-size: 11px;
  font-weight: 720;
  box-shadow: none;
  backdrop-filter: blur(7px);
}

.safa-flights-widget .safa-module-hero__live span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5ee58e;
  box-shadow: 0 0 0 5px rgba(94, 229, 142, 0.14);
}

:is(.safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap) .safa-data-notice {
  margin: 20px clamp(18px, 3.2vw, 42px) 0;
  border: 1px solid #ecd675;
  border-left: 4px solid var(--safa-ui-yellow);
  border-radius: 12px;
  padding: 13px 15px;
  background: #fffbed;
  color: var(--safa-ui-muted);
  font-size: 11px;
  line-height: 1.5;
}

/* Vols en direct */
.safa-flights-widget .safa-flights-hero::after {
  display: none !important;
}

.safa-flights-widget .safa-controls {
  position: relative;
  z-index: 2;
  clear: both;
  margin: 32px clamp(18px, 3.2vw, 42px) 0 !important;
  border: 1px solid var(--safa-ui-border);
  border-radius: 18px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(10, 51, 91, 0.13);
  transform: none !important;
}

.safa-flights-widget .safa-airport-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
  border: 0;
  padding: 0;
  background: transparent;
}

.safa-flights-widget .safa-airport-tab {
  min-width: 0;
  min-height: 76px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--safa-ui-border);
  border-radius: 13px;
  padding: 12px 14px;
  background: #f8fbfd;
  color: var(--safa-ui-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.safa-flights-widget .safa-airport-tab:hover {
  border-color: #a9d4e8;
  transform: translateY(-2px);
}

.safa-flights-widget .safa-airport-tab.active {
  border-color: var(--safa-ui-navy);
  background: var(--safa-ui-navy);
  color: #fff;
  box-shadow: 0 10px 24px rgba(10, 51, 91, 0.18);
}

.safa-flights-widget .safa-airport-code {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  background: #e5f3fa;
  color: var(--safa-ui-navy);
  font-size: 13px;
  font-weight: 850;
}

.safa-flights-widget .safa-airport-tab.active .safa-airport-code {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.safa-flights-widget .safa-airport-name,
.safa-flights-widget .safa-airport-sub {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.safa-flights-widget .safa-airport-name { font-size: 12px; font-weight: 760; }
.safa-flights-widget .safa-airport-sub { margin-top: 3px; color: var(--safa-ui-muted); font-size: 10px; }
.safa-flights-widget .safa-airport-tab.active .safa-airport-sub { color: rgba(255, 255, 255, 0.64); }

.safa-flights-widget .safa-airport-badge {
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--safa-ui-yellow);
  color: var(--safa-ui-navy);
  font-size: 9px;
  font-weight: 800;
}

.safa-flights-widget .safa-filter-row {
  display: grid;
  grid-template-columns: auto minmax(230px, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0;
  border: 0;
  padding: 0;
}

.safa-flights-widget .safa-direction-tabs { display: flex; gap: 6px; }

.safa-flights-widget .safa-dir-tab {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--safa-ui-border);
  border-radius: 11px;
  padding: 9px 15px;
  background: #f5f8fb;
  color: var(--safa-ui-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
}

.safa-flights-widget .safa-dir-tab svg { width: 16px; height: 16px; }
.safa-flights-widget .safa-dir-tab.active { border-color: var(--safa-ui-blue); background: #e7f5fb; color: var(--safa-ui-navy); }

.safa-flights-widget .safa-search-box {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--safa-ui-border);
  border-radius: 11px;
  padding: 0 14px;
  background: #fff;
}

.safa-flights-widget .safa-search-box:focus-within { border-color: var(--safa-ui-sky); box-shadow: 0 0 0 3px rgba(81, 185, 232, .16); }
.safa-flights-widget .safa-search-box svg { flex: 0 0 17px; width: 17px; height: 17px; color: #7890a5; }
.safa-flights-widget .safa-search-box .safa-search-input { width: 100%; min-height: 44px; border: 0; outline: 0; padding: 0; background: transparent; box-shadow: none; color: var(--safa-ui-ink); font-size: 12px; }

.safa-flights-widget .safa-live-indicator { min-width: 152px; display: flex; align-items: center; gap: 9px; color: var(--safa-ui-muted); }
.safa-flights-widget .safa-live-dot { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--safa-ui-green); box-shadow: 0 0 0 5px rgba(0, 158, 73, .1); }
.safa-flights-widget .safa-live-text { display: grid; gap: 2px; font-size: 9px; line-height: 1.25; }
.safa-flights-widget .safa-live-text strong { color: var(--safa-ui-ink); font-size: 10px; }

.safa-flights-widget .safa-filter-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  border-top: 1px solid var(--safa-ui-border);
  padding-top: 14px;
}

.safa-flights-widget .safa-filter-status {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--safa-ui-border);
  border-radius: 999px;
  padding: 6px 11px;
  background: #fff;
  color: var(--safa-ui-muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 690;
}

.safa-flights-widget .safa-filter-status.active { border-color: var(--safa-ui-navy); background: var(--safa-ui-navy); color: #fff; }

.safa-flights-widget .safa-flights-section { padding: 30px clamp(18px, 3.2vw, 42px) 38px; background: #f7fafc; }
.safa-flights-widget .safa-flights-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 0 0 12px; }
.safa-flights-widget .safa-flights-count { color: var(--safa-ui-muted); font-size: 11px; }
.safa-flights-widget .safa-count-value { color: var(--safa-ui-navy); font-size: 22px; }
.safa-flights-widget .safa-refresh-info { color: var(--safa-ui-muted); font-size: 10px; }

.safa-flights-widget .safa-flights-table {
  overflow: hidden;
  border: 1px solid var(--safa-ui-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(10, 51, 91, .07);
}

.safa-flights-widget .safa-table-head,
.safa-flights-widget .safa-flight-row {
  display: grid;
  grid-template-columns: 1.45fr 1.25fr .8fr .8fr .9fr .55fr;
  align-items: center;
  gap: 12px;
}

.safa-flights-widget .safa-table-head {
  min-height: 45px;
  padding: 0 18px;
  background: #edf4f8;
  color: #6f8396;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.safa-flights-widget .safa-flight-row {
  min-height: 82px;
  border-top: 1px solid #edf2f6;
  padding: 12px 18px;
  background: #fff;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.safa-flights-widget .safa-flight-row:hover,
.safa-flights-widget .safa-flight-row:focus-visible { position: relative; z-index: 2; outline: 0; background: #f6fbfd; box-shadow: inset 4px 0 0 var(--safa-ui-sky); }
.safa-flights-widget .safa-cell-airline { min-width: 0; display: flex; align-items: center; gap: 10px; }
.safa-flights-widget .safa-airline-logo { flex: 0 0 39px; width: 39px; height: 39px; border: 1px solid var(--safa-ui-border); border-radius: 10px; padding: 5px; background: #fff; }
.safa-flights-widget .safa-airline-name,
.safa-flights-widget .safa-route-city { overflow: hidden; color: var(--safa-ui-ink); font-size: 11px; font-weight: 740; text-overflow: ellipsis; white-space: nowrap; }
.safa-flights-widget .safa-airline-flight,
.safa-flights-widget .safa-route-iata,
.safa-flights-widget .safa-cell-time-label,
.safa-flights-widget .safa-meta-label { margin-top: 3px; color: var(--safa-ui-muted); font-size: 9px; }
.safa-flights-widget .safa-cell-time,
.safa-flights-widget .safa-meta-value { color: var(--safa-ui-navy); font-size: 12px; font-weight: 760; }
.safa-flights-widget .safa-cell-time.late { color: #cf4e20; }
.safa-flights-widget .safa-status-badge { display: inline-flex; width: fit-content; border-radius: 999px; padding: 6px 9px; font-size: 9px; font-weight: 760; }
.safa-flights-widget .safa-empty-state { min-height: 300px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 30px; color: var(--safa-ui-muted); text-align: center; }
.safa-flights-widget .safa-empty-state svg { width: 42px; height: 42px; color: var(--safa-ui-sky); }
.safa-flights-widget .safa-empty-state h3 { margin: 8px 0 0; color: var(--safa-ui-navy); font: 760 18px/1.2 Inter, sans-serif; }
.safa-flights-widget .safa-empty-state p { margin: 0; font-size: 12px; }
.safa-flights-widget .safa-load-more-wrap {
  width: 100%;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 22px 18px;
  border-top: 1px solid var(--safa-ui-border);
  text-align: center;
}
.safa-flights-widget .safa-load-more-counter { display: inline-flex; align-items: baseline; justify-content: center; gap: 5px; margin: 0; }
.safa-flights-widget .safa-load-more-btn { min-height: 40px; border: 0; border-radius: 10px; padding: 9px 16px; background: var(--safa-ui-navy); color: #fff; cursor: pointer; font-size: 11px; font-weight: 720; }

/* Recherche seule : conserve son rôle dans le slider, sans bandeau supplémentaire */
.safa-search-widget {
  overflow: hidden;
  border: 1px solid rgba(10, 51, 91, .14);
  border-radius: 18px;
  padding: 17px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 16px 45px rgba(7, 40, 71, .16);
  backdrop-filter: blur(12px);
}

.safa-search-widget .safa-search-airport-tab { border-radius: 12px; }
.safa-search-widget .safa-search-airport-tab.active { box-shadow: inset 0 0 0 2px rgba(81, 185, 232, .5); }
.safa-search-widget .safa-search-dir-btn,
.safa-search-widget .safa-search-input-wrap,
.safa-search-widget .safa-search-submit { border-radius: 11px; }
.safa-search-widget .safa-search-submit { background: var(--safa-ui-navy); }
.safa-search-widget .safa-search-submit:hover { background: var(--safa-ui-blue); }

/* Carte des destinations */
.safa-destinations-map-wrap .safa-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, .7fr);
  gap: 0;
  height: var(--safa-map-height, 600px);
  min-height: 0;
  max-height: var(--safa-map-height, 600px) !important;
  overflow: hidden;
  background: #f7fafc;
}

.safa-destinations-map-wrap .safa-map-canvas { width: 100%; height: 100% !important; min-width: 0; min-height: 0; border: 0; background: #eaf2f7; }
.safa-destinations-map-wrap .safa-map-runtime-error { height: 100%; display: grid; place-items: center; padding: 24px; color: var(--safa-ui-muted); font-size: 12px; text-align: center; }
.safa-destinations-map-wrap .safa-map-sidebar { min-width: 0; min-height: 0; height: 100% !important; max-height: var(--safa-map-height, 600px) !important; display: flex; flex-direction: column; overflow: hidden !important; border-left: 1px solid var(--safa-ui-border); background: #fff; }
.safa-destinations-map-wrap .safa-map-sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 20px 12px; }
.safa-destinations-map-wrap .safa-map-sidebar-head h3 { margin: 0; color: var(--safa-ui-navy); font: 760 16px/1.25 Inter, sans-serif; }
.safa-destinations-map-wrap .safa-map-count { display: grid; min-width: 30px; height: 30px; place-items: center; border-radius: 9px; background: #e7f4fa; color: var(--safa-ui-navy); font-size: 11px; font-weight: 800; }
.safa-destinations-map-wrap .safa-map-search { position: relative; display: flex; align-items: center; margin: 0 20px 13px; }
.safa-destinations-map-wrap .safa-map-search svg { position: absolute; left: 13px; color: #7c90a3; }
.safa-destinations-map-wrap .safa-map-search-input { width: 100%; min-height: 43px; border: 1px solid var(--safa-ui-border); border-radius: 11px; outline: 0; padding: 0 12px 0 39px; background: #f8fbfd; color: var(--safa-ui-ink); font-size: 11px; }
.safa-destinations-map-wrap .safa-map-search-input:focus { border-color: var(--safa-ui-sky); box-shadow: 0 0 0 3px rgba(81, 185, 232, .15); }
.safa-destinations-map-wrap .safa-map-destinations-list { flex: 1 1 0; min-height: 0; max-height: 100%; overflow-x: hidden !important; overflow-y: auto !important; overscroll-behavior: contain; margin: 0; padding: 0 10px 14px; list-style: none; scrollbar-width: thin; scrollbar-color: #b8cad7 transparent; }
.safa-destinations-map-wrap .safa-map-destinations-list::-webkit-scrollbar { width: 7px; }
.safa-destinations-map-wrap .safa-map-destinations-list::-webkit-scrollbar-thumb { border-radius: 10px; background: #b8cad7; }
.safa-destinations-map-wrap .safa-map-dest-item { display: grid; grid-template-columns: 43px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid transparent; border-bottom-color: #edf2f6; border-radius: 11px; padding: 11px 10px; cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.safa-destinations-map-wrap .safa-map-dest-item:hover { border-color: #c9e3ef; background: #f2f9fc; }
.safa-destinations-map-wrap .safa-map-dest-code { display: grid; height: 38px; place-items: center; border-radius: 9px; background: var(--safa-ui-navy); color: #fff; font-size: 11px; font-weight: 820; }
.safa-destinations-map-wrap .safa-map-dest-city { color: var(--safa-ui-ink); font-size: 11px; font-weight: 740; }
.safa-destinations-map-wrap .safa-map-dest-country,
.safa-destinations-map-wrap .safa-map-dest-airline-name { margin-top: 3px; color: var(--safa-ui-muted); font-size: 9px; }
.safa-destinations-map-wrap .safa-map-dest-airline { text-align: right; }
.safa-destinations-map-wrap .safa-map-dest-freq { display: block; margin-top: 4px; color: var(--safa-ui-blue); font-size: 9px; font-weight: 800; }
.safa-destinations-map-wrap .leaflet-control-zoom { overflow: hidden; border: 0 !important; border-radius: 11px !important; box-shadow: 0 8px 24px rgba(10, 51, 91, .16) !important; }

/* Programme */
.safa-schedule-wrap .safa-schedule-days-nav {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(128px, 1fr);
  gap: 8px;
  overflow-x: auto;
  margin: 0;
  padding: 24px clamp(18px, 3.2vw, 42px) 16px;
  background: #f7fafc;
  scrollbar-width: thin;
}

.safa-schedule-wrap .safa-schedule-day-tab {
  min-height: 78px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 1px solid var(--safa-ui-border);
  border-radius: 13px;
  padding: 10px;
  background: #fff;
  color: var(--safa-ui-muted);
  cursor: pointer;
}

.safa-schedule-wrap .safa-schedule-day-tab.active { border-color: var(--safa-ui-navy); background: var(--safa-ui-navy); color: #fff; box-shadow: 0 9px 22px rgba(10, 51, 91, .18); }
.safa-schedule-wrap .safa-schedule-day-name { font-size: 10px; font-weight: 780; text-transform: uppercase; }
.safa-schedule-wrap .safa-schedule-day-date { font-size: 17px; font-weight: 820; }
.safa-schedule-wrap .safa-schedule-day-count { color: inherit; font-size: 9px; opacity: .7; }
.safa-schedule-wrap .safa-schedule-content { padding: 0 clamp(18px, 3.2vw, 42px) 38px; background: #f7fafc; }
.safa-schedule-wrap .safa-schedule-day-panel { display: none; gap: 10px; }
.safa-schedule-wrap .safa-schedule-day-panel.active { display: grid; }
.safa-schedule-wrap .safa-schedule-flight-card { display: grid; grid-template-columns: 1.15fr 1.25fr .9fr .62fr; align-items: center; gap: 18px; min-height: 108px; border: 1px solid var(--safa-ui-border); border-radius: 15px; padding: 17px 19px; background: #fff; box-shadow: 0 7px 20px rgba(10, 51, 91, .06); transition: transform .18s ease, box-shadow .18s ease; }
.safa-schedule-wrap .safa-schedule-flight-card:hover { transform: translateY(-2px); box-shadow: 0 13px 28px rgba(10, 51, 91, .1); }
.safa-schedule-wrap .safa-schedule-flight-airline { min-width: 0; display: flex; align-items: center; gap: 10px; }
.safa-schedule-wrap .safa-airline-logo { flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid var(--safa-ui-border); border-radius: 10px; padding: 5px; }
.safa-schedule-wrap .safa-schedule-flight-code,
.safa-schedule-wrap .safa-schedule-dest-city,
.safa-schedule-wrap .safa-schedule-aircraft-value { color: var(--safa-ui-ink); font-size: 11px; font-weight: 760; }
.safa-schedule-wrap .safa-schedule-flight-airline-name,
.safa-schedule-wrap .safa-schedule-dest-country,
.safa-schedule-wrap .safa-schedule-aircraft-label { margin-top: 3px; color: var(--safa-ui-muted); font-size: 9px; }
.safa-schedule-wrap .safa-schedule-flight-route { display: grid; grid-template-columns: 1fr minmax(56px, .7fr) 1fr; align-items: center; gap: 8px; }
.safa-schedule-wrap .safa-schedule-route-point { text-align: center; }
.safa-schedule-wrap .safa-schedule-route-time { color: var(--safa-ui-navy); font-size: 18px; font-weight: 820; }
.safa-schedule-wrap .safa-schedule-route-code { margin-top: 3px; color: var(--safa-ui-muted); font-size: 9px; font-weight: 760; }
.safa-schedule-wrap .safa-schedule-route-line { position: relative; height: 2px; background: #bfd3df; }
.safa-schedule-wrap .safa-schedule-route-duration { position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%); color: var(--safa-ui-muted); font-size: 8px; white-space: nowrap; }

/* Statistiques — autonome, sans bibliothèque externe */
.safa-stats-wrap .safa-stats-kpi-grid { position: relative; z-index: 1; clear: both; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 34px clamp(18px, 3.2vw, 42px) 24px !important; transform: none !important; }
.safa-stats-wrap .safa-stats-kpi { min-height: 126px; display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--safa-ui-border); border-radius: 16px; padding: 18px; background: #fff; box-shadow: 0 12px 28px rgba(10, 51, 91, .1); }
.safa-stats-wrap .safa-stats-kpi--primary { border-color: transparent; background: linear-gradient(138deg, var(--safa-ui-navy), #0b6b9f); color: #fff; }
.safa-stats-wrap .safa-stats-kpi-label { color: var(--safa-ui-muted); font-size: 9px; font-weight: 780; letter-spacing: .06em; text-transform: uppercase; }
.safa-stats-wrap .safa-stats-kpi--primary .safa-stats-kpi-label,
.safa-stats-wrap .safa-stats-kpi--primary .safa-stats-kpi-sub { color: rgba(255, 255, 255, .68); }
.safa-stats-wrap .safa-stats-kpi-value { margin-top: 8px; color: var(--safa-ui-navy); font-size: 31px; font-weight: 850; line-height: 1; letter-spacing: -.04em; }
.safa-stats-wrap .safa-stats-kpi--primary .safa-stats-kpi-value { color: #fff; }
.safa-stats-wrap .safa-stats-kpi-value span { margin-left: 3px; font-size: 14px; font-weight: 760; letter-spacing: 0; }
.safa-stats-wrap .safa-stats-kpi-sub { margin-top: 7px; color: var(--safa-ui-muted); font-size: 9px; }
.safa-stats-wrap .safa-stats-charts,
.safa-stats-wrap .safa-stats-tables-grid { padding-inline: clamp(18px, 3.2vw, 42px); }
.safa-stats-wrap .safa-stats-charts { margin-bottom: 16px; }
.safa-stats-wrap .safa-stats-chart-card,
.safa-stats-wrap .safa-stats-table-card { overflow: hidden; border: 1px solid var(--safa-ui-border); border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(10, 51, 91, .06); }
.safa-stats-wrap .safa-stats-chart-head,
.safa-stats-wrap .safa-stats-table-head { padding: 18px 20px 13px; border-bottom: 1px solid #edf2f6; }
.safa-stats-wrap :is(.safa-stats-chart-head, .safa-stats-table-head) h3 { margin: 0; color: var(--safa-ui-navy); font: 770 14px/1.3 Inter, sans-serif; }
.safa-stats-wrap :is(.safa-stats-chart-head, .safa-stats-table-head) > span { display: block; margin-top: 4px; color: var(--safa-ui-muted); font-size: 9px; }
.safa-stats-wrap .safa-stats-chart-body { height: 318px; padding: 12px 16px 14px; }
.safa-stats-wrap .safa-stats-trend { position: relative; width: 100%; height: 100%; }
.safa-stats-wrap .safa-stats-trend svg { display: block; width: 100%; height: calc(100% - 25px); overflow: visible; }
.safa-stats-wrap .safa-stats-gridline { stroke: #e8eff4; stroke-width: 1; }
.safa-stats-wrap .safa-stats-axis-label { fill: #7a8ea0; font: 9px Inter, sans-serif; }
.safa-stats-wrap .safa-stats-bar { fill: #5bb8de; opacity: .8; }
.safa-stats-wrap .safa-stats-area { pointer-events: none; }
.safa-stats-wrap .safa-stats-line { fill: none; stroke: var(--safa-ui-yellow); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 3px 3px rgba(144, 111, 0, .15)); }
.safa-stats-wrap .safa-stats-dot { fill: #fff; stroke: #d9ad00; stroke-width: 2; }
.safa-stats-wrap .safa-stats-legend { display: flex; justify-content: flex-end; gap: 18px; height: 25px; padding-right: 8px; color: var(--safa-ui-muted); font-size: 9px; }
.safa-stats-wrap .safa-stats-legend span { display: inline-flex; align-items: center; gap: 6px; }
.safa-stats-wrap .safa-stats-legend span::before { content: ""; width: 13px; height: 7px; border-radius: 3px; background: #5bb8de; }
.safa-stats-wrap .safa-stats-legend .safa-stats-legend__line::before { height: 3px; background: var(--safa-ui-yellow); }
.safa-stats-wrap .safa-stats-tables-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 16px; padding-bottom: 38px; }
.safa-stats-wrap .safa-stats-table-card { height: 100%; }
.safa-stats-wrap .safa-stats-airline-row,
.safa-stats-wrap .safa-stats-route-row { display: grid; align-items: center; gap: 10px; min-height: 65px; border-top: 1px solid #edf2f6; padding: 10px 15px; }
.safa-stats-wrap .safa-stats-airline-row { grid-template-columns: 23px 35px minmax(0, 1fr) minmax(70px, .45fr); }
.safa-stats-wrap .safa-stats-route-row { grid-template-columns: 23px minmax(0, 1fr) auto; }
.safa-stats-wrap .safa-stats-airline-row:first-child,
.safa-stats-wrap .safa-stats-route-row:first-child { border-top: 0; }
.safa-stats-wrap :is(.safa-stats-airline-rank, .safa-stats-route-rank) { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 7px; background: #eef5f9; color: var(--safa-ui-navy); font-size: 9px; font-weight: 820; }
.safa-stats-wrap .safa-stats-airline-row.top .safa-stats-airline-rank { background: var(--safa-ui-yellow); }
.safa-stats-wrap .safa-airline-logo--sm { width: 35px; height: 35px; border: 1px solid var(--safa-ui-border); border-radius: 9px; padding: 4px; }
.safa-stats-wrap :is(.safa-stats-airline-name, .safa-stats-route-city) { color: var(--safa-ui-ink); font-size: 10px; font-weight: 750; }
.safa-stats-wrap :is(.safa-stats-airline-vols, .safa-stats-route-country) { margin-top: 3px; color: var(--safa-ui-muted); font-size: 8px; }
.safa-stats-wrap .safa-stats-airline-score,
.safa-stats-wrap .safa-stats-route-freq { text-align: right; }
.safa-stats-wrap .safa-stats-airline-percent,
.safa-stats-wrap .safa-stats-route-freq-value { color: var(--safa-ui-navy); font-size: 12px; font-weight: 820; }
.safa-stats-wrap .safa-stats-airline-bar { width: 100%; height: 4px; overflow: hidden; margin-top: 5px; border-radius: 4px; background: #e8eff4; }
.safa-stats-wrap .safa-stats-airline-bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--safa-ui-sky), var(--safa-ui-blue)); }
.safa-stats-wrap .safa-stats-route-freq-label { color: var(--safa-ui-muted); font-size: 8px; }

/* Fiche d'un vol */
.safa-flight-single .safa-flight-single-hero { min-height: 190px; }
.safa-flight-single .safa-flight-single-airline { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; }
.safa-flight-single .safa-airline-logo--xl { width: 62px; height: 62px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 14px; padding: 7px; background: #fff; }
.safa-flight-single .safa-flight-single-airline-name { color: rgba(255, 255, 255, .76); font-size: 12px; font-weight: 650; }
.safa-flight-single .safa-flight-single-code { margin-top: 4px; color: #fff; font-size: clamp(25px, 4vw, 40px); font-weight: 830; letter-spacing: -.035em; }
.safa-flight-single .safa-status-badge--xl { position: relative; z-index: 2; border: 1px solid rgba(255, 255, 255, .28); background: rgba(5, 35, 61, .38); color: #fff; backdrop-filter: blur(7px); }
.safa-flight-single .safa-flight-single-route { display: grid; grid-template-columns: 1fr minmax(110px, .7fr) 1fr; align-items: center; gap: 18px; margin: 0; padding: 34px clamp(24px, 5vw, 68px); background: #f6f9fb; }
.safa-flight-single .safa-flight-single-route-point { text-align: center; }
.safa-flight-single .safa-flight-single-route-code { color: var(--safa-ui-navy); font-size: clamp(28px, 5vw, 48px); font-weight: 850; letter-spacing: -.04em; }
.safa-flight-single .safa-flight-single-route-city { color: var(--safa-ui-muted); font-size: 11px; }
.safa-flight-single .safa-flight-single-route-time { margin-top: 9px; color: var(--safa-ui-ink); font-size: 18px; font-weight: 780; }
.safa-flight-single .safa-flight-single-route-label { margin-top: 3px; color: var(--safa-ui-muted); font-size: 9px; }
.safa-flight-single .safa-flight-single-route-connector { color: var(--safa-ui-sky); }
.safa-flight-single .safa-flight-single-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(240px, .6fr); align-items: stretch; gap: 16px; padding: 26px clamp(18px, 3.2vw, 42px); }
.safa-flight-single :is(.safa-flight-single-infos, .safa-flight-single-share) { border: 1px solid var(--safa-ui-border); border-radius: 15px; padding: 20px; background: #fff; box-shadow: 0 7px 22px rgba(10, 51, 91, .06); }
.safa-flight-single :is(.safa-flight-single-infos, .safa-flight-single-share) h3 { margin: 0 0 16px; color: var(--safa-ui-navy); font: 760 15px/1.3 Inter, sans-serif; }
.safa-flight-single .safa-flight-single-info-row { display: grid; grid-template-columns: 1fr auto; gap: 20px; border-top: 1px solid #edf2f6; padding: 12px 0; }
.safa-flight-single .safa-flight-single-qr { display: grid; min-height: 150px; place-items: center; }
.safa-flight-single .safa-flight-single-btn { border-radius: 9px; }
.safa-flight-single .safa-flight-single-footer { border-top: 1px solid var(--safa-ui-border); padding: 15px clamp(18px, 3.2vw, 42px); background: #f7fafc; color: var(--safa-ui-muted); font-size: 9px; }

@media (max-width: 980px) {
  .safa-flights-widget .safa-filter-row { grid-template-columns: auto minmax(180px, 1fr); }
  .safa-flights-widget .safa-live-indicator { grid-column: 1 / -1; }
  .safa-destinations-map-wrap .safa-map-layout { grid-template-columns: 1fr; }
  .safa-destinations-map-wrap .safa-map-layout { height: auto; max-height: none; overflow: visible; }
  .safa-destinations-map-wrap .safa-map-sidebar { height: 420px !important; max-height: 420px !important; border-top: 1px solid var(--safa-ui-border); border-left: 0; }
  .safa-schedule-wrap .safa-schedule-flight-card { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  :is(.safa-flights-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap, .safa-flight-single) { border-radius: 17px; }

  :is(.safa-flights-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap) .safa-module-hero,
  .safa-flight-single .safa-flight-single-hero { min-height: 224px; align-items: flex-end; padding: 34px 22px 38px; }

  :is(.safa-flights-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap, .safa-flight-single) .safa-module-hero__motif { width: 82%; opacity: .66; }
  :is(.safa-flights-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap) .safa-module-hero__content,
  .safa-flight-single .safa-flight-single-hero-content { width: 100%; }
  :is(.safa-flights-widget, .safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap) .safa-module-hero :is(h2, .safa-map-title, .safa-schedule-title, .safa-stats-title) { max-width: 330px; font-size: 34px; }
  .safa-flights-widget .safa-module-hero__live,
  :is(.safa-destinations-map-wrap, .safa-schedule-wrap, .safa-stats-wrap) .safa-demo-badge { position: absolute; z-index: 4; top: 18px; left: 20px; }

  .safa-flights-widget .safa-controls { margin: 18px 10px 0 !important; border-radius: 14px; padding: 13px; }
  .safa-flights-widget .safa-airport-tabs { grid-template-columns: 1fr; gap: 7px; }
  .safa-flights-widget .safa-airport-tab { min-height: 64px; }
  .safa-flights-widget .safa-filter-row { grid-template-columns: 1fr; }
  .safa-flights-widget .safa-direction-tabs { display: grid; grid-template-columns: repeat(2, 1fr); }
  .safa-flights-widget .safa-live-indicator { grid-column: auto; padding: 7px 3px; }
  .safa-flights-widget .safa-flights-section { padding: 24px 10px 24px; }
  .safa-flights-widget .safa-table-head,
  .safa-flights-widget .safa-flights-list { display: none; }
  .safa-flights-widget .safa-mobile-cards { display: grid; gap: 9px; }
  .safa-flights-widget .safa-mobile-card { overflow: hidden; border: 1px solid var(--safa-ui-border); border-radius: 14px; background: #fff; box-shadow: 0 7px 20px rgba(10, 51, 91, .07); }
  .safa-flights-widget :is(.safa-mobile-card-head, .safa-mobile-card-body, .safa-mobile-card-foot) { padding: 13px; }
  .safa-flights-widget .safa-mobile-card-head { border-bottom: 1px solid #edf2f6; }
  .safa-flights-widget .safa-mobile-card-foot { border-top: 1px solid #edf2f6; background: #f8fbfd; }

  .safa-search-widget { border-radius: 14px; padding: 12px; }

  .safa-destinations-map-wrap .safa-map-layout { min-height: 0; }
  .safa-destinations-map-wrap .safa-map-canvas { height: 420px !important; }

  .safa-schedule-wrap .safa-schedule-days-nav { padding: 17px 10px 12px; }
  .safa-schedule-wrap .safa-schedule-content { padding: 0 10px 24px; }
  .safa-schedule-wrap .safa-schedule-flight-card { grid-template-columns: 1fr; gap: 13px; padding: 15px; }
  .safa-schedule-wrap .safa-schedule-flight-route { order: -1; }

  .safa-stats-wrap .safa-stats-kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 20px 10px 18px !important; }
  .safa-stats-wrap .safa-stats-kpi { min-height: 106px; border-radius: 13px; padding: 14px; }
  .safa-stats-wrap .safa-stats-kpi-value { font-size: 25px; }
  .safa-stats-wrap .safa-stats-charts,
  .safa-stats-wrap .safa-stats-tables-grid { padding-inline: 10px; }
  .safa-stats-wrap .safa-stats-chart-body { height: 260px; padding-inline: 6px; }
  .safa-stats-wrap .safa-stats-tables-grid { grid-template-columns: 1fr; padding-bottom: 24px; }
  .safa-stats-wrap .safa-stats-airline-row { grid-template-columns: 23px 32px minmax(0, 1fr) 64px; padding-inline: 10px; }

  .safa-flight-single .safa-flight-single-hero { min-height: 190px; align-items: center; }
  .safa-flight-single .safa-flight-single-route { grid-template-columns: 1fr 54px 1fr; gap: 7px; padding: 25px 13px; }
  .safa-flight-single .safa-flight-single-route-code { font-size: 31px; }
  .safa-flight-single .safa-flight-single-grid { grid-template-columns: 1fr; padding: 17px 10px; }

  .safa-flights-widget .safa-load-more-wrap { flex-direction: column; gap: 11px; }
}

@media (max-width: 380px) {
  .safa-stats-wrap .safa-stats-airline-row { grid-template-columns: 22px minmax(0, 1fr) 58px; }
  .safa-stats-wrap .safa-airline-logo--sm { display: none; }
  .safa-flights-widget .safa-filter-status { padding-inline: 8px; }
}
