/* ============================================================
   fpvlog — alpine airspace
   Light theme built on the world FPV happens in: sky, relief,
   aeronautical charts. Pale-sky background with topographic
   contour lines, white chart-panels, navy ink, sun orange.
   Type: Unbounded (display) + Outfit (body).
   ============================================================ */
:root {
  --sky-hi: #eaf3fa;
  --sky-lo: #f7fbfd;
  --paper: #ffffff;
  --ink: #14273b;
  --ink-soft: #47617a;
  --ink-faint: #8ba2b8;
  --hairline: #dce8f1;
  --orange: #ff6a00;
  --orange-deep: #e85a00;
  --blue: #1273e6;
  --green: #0da06f;
  --red: #e02d4b;
  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 10px 30px rgba(20, 39, 59, .08), 0 2px 6px rgba(20, 39, 59, .05);
  --shadow-lift: 0 18px 44px rgba(20, 39, 59, .13), 0 4px 10px rgba(20, 39, 59, .06);
  --display: "Unbounded", sans-serif;
  --body: "Outfit", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  color: var(--ink);
  font-family: var(--body); font-size: 15.5px; line-height: 1.6;
  min-height: 100vh;
  background:
    /* topographic contours — the alpine signature */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='560' viewBox='0 0 560 560'%3E%3Cg fill='none' stroke='%231273e6' stroke-opacity='.07' stroke-width='1.4'%3E%3Cpath d='M60 480c70-90 40-160 110-210s180-20 210-90 90-90 160-70'/%3E%3Cpath d='M20 520c90-110 60-190 140-245s200-25 235-105 100-100 175-80'/%3E%3Cpath d='M100 440c55-70 25-130 85-175s160-15 185-75 80-80 140-60'/%3E%3Cpath d='M140 400c40-55 15-105 65-140s135-10 155-60 65-65 115-50'/%3E%3Cpath d='M180 360c30-40 10-80 50-105s110-8 125-45 50-50 90-40'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(175deg, var(--sky-hi), var(--sky-lo) 55%);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2.5px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--orange); color: #fff; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px 90px; }

/* ---------------- nav ---------------- */
nav { display: flex; align-items: center; gap: 20px; padding: 28px 0 0; }
.brand { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -.3px; }
.brand em { font-style: normal; color: var(--orange); }
nav .spacer { flex: 1; }

/* ---------------- hero ---------------- */
.hero { padding: 64px 0 44px; }
.hero .kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--blue); margin-bottom: 18px;
}
.hero .kicker::before { content: ""; width: 30px; height: 2.5px; background: var(--blue); border-radius: 2px; }
.hero h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(34px, 5.6vw, 62px); line-height: 1.08; letter-spacing: -1px;
}
.hero h1 .accent {
  background: linear-gradient(100deg, var(--orange), #ffb056);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--ink-soft); max-width: 540px; margin-top: 20px; font-size: 17px; }
.hero .actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

/* ---------------- buttons ---------------- */
.btn {
  font-family: var(--body); font-weight: 700; font-size: 15px;
  background: var(--orange); color: #fff; border: 0; cursor: pointer;
  padding: 13px 28px; border-radius: 999px;
  transition: transform .15s, box-shadow .15s, background .15s;
  box-shadow: 0 8px 22px rgba(255, 106, 0, .30);
}
.btn:hover { background: var(--orange-deep); transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 106, 0, .38); }
.btn:active { transform: translateY(0); }
.btn.ghost {
  background: var(--paper); color: var(--ink);
  border: 1.5px solid var(--hairline); box-shadow: var(--shadow);
}
.btn.ghost:hover { border-color: var(--ink-faint); background: var(--paper); }
.btn.small { padding: 10px 20px; font-size: 14px; }

/* ---------------- stat cards ---------------- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 16px; margin: 10px 0 52px;
}
.stat {
  background: var(--paper); border-radius: var(--radius);
  padding: 22px 24px 18px; box-shadow: var(--shadow);
  border-top: 4px solid var(--hairline);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-top-color: var(--orange); }
.stat .k {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink-faint);
}
.stat .v {
  font-family: var(--display); font-weight: 700; font-size: 30px;
  letter-spacing: -.5px; line-height: 1.25; margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.stat .v small { font-family: var(--body); font-size: 14px; font-weight: 600; color: var(--ink-faint); }
.stat:first-child .v { color: var(--orange); }

/* ---------------- sections & cards ---------------- */
.section { margin-bottom: 52px; }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.section-head h2 {
  font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.4px;
}
.section-head .count { color: var(--ink-faint); font-weight: 600; font-size: 14px; }

.card {
  background: var(--paper); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.card .card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px; border-bottom: 1px solid var(--hairline);
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink-soft);
}
.card .card-head .right { margin-left: auto; color: var(--ink-faint);
  font-variant-numeric: tabular-nums; text-transform: none; letter-spacing: 0; font-weight: 500; }

/* ---------------- map ---------------- */
.map { height: 460px; }
.map.tall { height: 500px; }
.leaflet-container { background: #dfeaf2; font-family: var(--body); }
.leaflet-control-attribution { background: rgba(255,255,255,.85) !important; color: var(--ink-faint) !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: var(--ink-soft) !important; }
.leaflet-bar a { background: var(--paper) !important; color: var(--ink) !important; border-color: var(--hairline) !important; }
.leaflet-tooltip {
  background: var(--ink); color: #fff; border: 0;
  border-radius: 10px; font-family: var(--body); font-weight: 600; font-size: 13px;
  box-shadow: var(--shadow-lift); padding: 7px 13px;
}
.leaflet-tooltip::before { display: none; }

/* ---------------- flight list ---------------- */
.flights { display: flex; flex-direction: column; gap: 14px; }
.flight-row {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 22px; align-items: center;
  background: var(--paper); border-radius: var(--radius);
  padding: 20px 26px; cursor: pointer; box-shadow: var(--shadow);
  border-left: 5px solid transparent;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.flight-row:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-left-color: var(--orange); }
.flight-row .date { text-align: center; border-right: 1.5px solid var(--hairline); padding-right: 20px; }
.flight-row .date .d { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.1; }
.flight-row .date .m { font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--blue); margin-top: 3px; }
.flight-row .title { font-weight: 700; font-size: 18px; letter-spacing: -.2px; }
.flight-row .spot { color: var(--ink-soft); font-size: 14px; margin-top: 2px; }
.flight-row .spot::before { content: "◈ "; color: var(--blue); }
.flight-row .metrics { display: flex; gap: 30px; }
.flight-row .metric { text-align: right; min-width: 64px; }
.flight-row .metric .mv { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.flight-row .metric .mk { font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ink-faint); }
@media (max-width: 720px) {
  .flight-row { grid-template-columns: 76px 1fr; }
  .flight-row .metrics { grid-column: 1 / -1; justify-content: space-between; gap: 10px; }
}
.empty {
  background: var(--paper); border: 2px dashed var(--hairline); border-radius: var(--radius);
  padding: 60px 24px; text-align: center; color: var(--ink-soft);
}

/* ---------------- modal ---------------- */
dialog {
  background: var(--paper); color: var(--ink);
  border: 0; border-radius: var(--radius);
  padding: 32px; width: min(470px, 92vw); font-family: var(--body);
  box-shadow: 0 30px 90px rgba(20, 39, 59, .25);
  /* Le reset global (* { margin: 0 }) ecrase le "margin: auto" par defaut des
     <dialog>, qui se collaient donc en haut a gauche. On recentre a la main. */
  position: fixed; inset: 0; margin: auto;
  max-height: min(88vh, 900px); overflow-y: auto;
}
dialog::backdrop { background: rgba(20, 39, 59, .35); backdrop-filter: blur(5px); }
dialog h2 { font-family: var(--display); font-weight: 700; font-size: 20px; margin-bottom: 6px; }
dialog .sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 18px; }
dialog label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ink-soft); margin: 16px 0 6px; }
input, select {
  font: inherit; background: var(--sky-lo); color: var(--ink);
  border: 1.5px solid var(--hairline); border-radius: var(--radius-s);
  padding: 11px 14px; width: 100%; transition: border-color .15s, background .15s;
}
input:focus, select:focus { border-color: var(--orange); background: #fff; outline: none; }
input[type="file"] { padding: 9px; }
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 700; border: 0; border-radius: 999px;
  background: rgba(18, 115, 230, .12); color: var(--blue);
  padding: 8px 16px; margin-right: 12px; cursor: pointer;
}
dialog .row { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
.msg { font-size: 14px; font-weight: 600; margin-top: 12px; min-height: 20px; }
.msg.ok { color: var(--green); } .msg.err { color: var(--red); }

/* ================= flight detail ================= */
.flight-hero { padding: 48px 0 32px; }
.flight-hero .back { color: var(--ink-soft); font-size: 14px; font-weight: 600; }
.flight-hero .back:hover { color: var(--ink); }
.flight-hero h1 {
  font-family: var(--display); font-weight: 800; letter-spacing: -.8px;
  font-size: clamp(26px, 4.4vw, 44px); line-height: 1.12; margin-top: 16px;
}
.flight-hero .meta { color: var(--ink-soft); margin-top: 12px; font-size: 15px;
  display: flex; gap: 20px; flex-wrap: wrap; }
.flight-hero .meta b { color: var(--ink); font-weight: 700; }

/* live HUD */
.hud {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.hud .cell {
  background: var(--paper); border-radius: var(--radius);
  padding: 16px 20px 14px; box-shadow: var(--shadow);
  border-top: 4px solid var(--hairline);
}
.hud .k { font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink-faint); }
.hud .v { font-family: var(--display); font-weight: 700; font-size: 26px;
  letter-spacing: -.5px; font-variant-numeric: tabular-nums; line-height: 1.3; margin-top: 3px; }
.hud .v small { font-family: var(--body); font-size: 12px; font-weight: 600; color: var(--ink-faint); }
.hud .cell.primary { border-top-color: var(--orange); }
.hud .cell.primary .v { color: var(--orange); }

/* replay bar — floating pill */
.controls {
  display: flex; align-items: center; gap: 16px;
  background: var(--paper); border-radius: 999px;
  padding: 10px 14px 10px 10px; margin-bottom: 24px; flex-wrap: wrap;
  box-shadow: var(--shadow-lift);
  position: sticky; top: 14px; z-index: 500;
}
.controls .btn { padding: 10px 22px; }
.controls .time { font-weight: 800; font-variant-numeric: tabular-nums;
  min-width: 120px; font-size: 16px; }
.controls input[type=range] { flex: 1; accent-color: var(--orange); min-width: 150px; }
.controls select { width: auto; border-radius: 999px; padding: 8px 14px; background: var(--paper); }

.cols { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; margin-bottom: 24px; }
@media (max-width: 940px) { .cols { grid-template-columns: 1fr; } }
.vstack { display: flex; flex-direction: column; gap: 20px; }

video { display: block; width: 100%; background: #0b141d; }
.video-missing { padding: 46px 20px; text-align: center; color: var(--ink-faint);
  font-size: 14px; font-weight: 600; }

canvas.chart { display: block; width: 100%; height: 190px; cursor: crosshair; }
.legend { display: flex; gap: 20px; font-size: 13px; font-weight: 600; color: var(--ink-soft);
  padding: 12px 22px; border-top: 1px solid var(--hairline); }
.legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.legend .dot.alt { background: var(--orange); }
.legend .dot.spd { background: var(--blue); }

footer { color: var(--ink-faint); font-size: 13px; margin-top: 60px;
  border-top: 1.5px solid var(--hairline); padding-top: 20px; }

/* ---- layer control & popup (zones OFAC) ---- */
.leaflet-control-layers {
  background: var(--paper) !important; border: 0 !important;
  border-radius: var(--radius-s) !important; box-shadow: var(--shadow) !important;
  font-family: var(--body) !important; font-size: 13px; color: var(--ink);
  padding: 8px 12px !important;
}
.leaflet-control-layers label { font-weight: 600; }
.leaflet-popup-content-wrapper {
  background: var(--paper); color: var(--ink); border-radius: var(--radius-s);
  box-shadow: var(--shadow-lift); font-family: var(--body);
}
.leaflet-popup-tip { background: var(--paper); }

/* ---- carte plein écran ---- */
.leaflet-container.expanded {
  position: fixed !important; inset: 0 !important;
  width: 100vw !important; height: 100vh !important;
  z-index: 3000; border-radius: 0;
}
body.map-open { overflow: hidden; }
.expand-btn { font-size: 17px; line-height: 26px !important; }

.locate-btn { font-size: 18px; line-height: 26px !important; }

/* ---- légende de carte ---- */
.map-legend {
  background: var(--paper); border-radius: var(--radius-s);
  box-shadow: var(--shadow); padding: 10px 14px;
  font-family: var(--body); font-size: 12.5px; font-weight: 600;
  color: var(--ink-soft); line-height: 1.9;
}
.map-legend .row { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.map-legend .swatch { flex: none; }
.map-legend .swatch.line { width: 20px; height: 4px; border-radius: 2px; }
.map-legend .swatch.dot { width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(20,39,59,.15); }
.map-legend .swatch.area { width: 20px; height: 13px; border-radius: 3px; opacity: .5; }

/* ---- météo & vent ---- */
.weather-grid { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
@media (max-width: 940px) { .weather-grid { grid-template-columns: 1fr; } }
.wx-cards { display: grid; gap: 16px; }
.wx-cell {
  background: var(--paper); border-radius: var(--radius);
  padding: 18px 22px 16px; box-shadow: var(--shadow);
  border-top: 4px solid var(--hairline);
}
.wx-cell.primary { border-top-color: var(--orange); }
.wx-cell .k { font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink-faint); }
.wx-cell .v { font-family: var(--display); font-weight: 700; font-size: 27px;
  letter-spacing: -.5px; line-height: 1.3; margin-top: 5px;
  font-variant-numeric: tabular-nums; }
.wx-cell .v small { font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--ink-faint); }
.wx-cell .sub { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-top: 4px; }
.wx-cell .arrow { display: inline-block; font-family: var(--body); font-weight: 800; }
.wx-ok { color: var(--green); }
.wx-warn { color: #d98e00; }
.wx-bad { color: var(--red); }
.windy-frame { display: block; width: 100%; height: 480px; border: 0; }

/* ---- recherche de lieu sur la carte ---- */
.map-search { position: relative; width: 235px; }
.map-search input {
  width: 100%; font: 600 13.5px var(--body); color: var(--ink);
  background: var(--paper); border: 0; border-radius: var(--radius-s);
  padding: 10px 14px; box-shadow: var(--shadow-lift);
}
.map-search input::placeholder { color: var(--ink-faint); }
.map-search input:focus { outline: 2.5px solid var(--orange); outline-offset: 0; }
.map-search .results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--paper); border-radius: var(--radius-s);
  box-shadow: var(--shadow-lift); overflow: hidden; z-index: 1200;
}
.map-search .results button {
  display: block; width: 100%; text-align: left; border: 0; cursor: pointer;
  background: none; font: 600 13px var(--body); color: var(--ink);
  padding: 9px 13px;
}
.map-search .results button:hover { background: var(--sky-lo); color: var(--orange-deep); }
.map-search .results .empty-hit {
  padding: 9px 13px; font: 600 12.5px var(--body); color: var(--ink-faint);
}

/* ============ communauté ============ */
/* -- nav : état de connexion -- */
.nav-auth { display: flex; align-items: center; gap: 14px; }
.nav-auth .who { font-weight: 700; font-size: 14px; color: var(--ink); }
.nav-auth .admin-badge {
  font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: #fff; background: var(--orange); padding: 2px 7px; border-radius: 999px; margin-left: 4px;
}

/* -- onglets Mes vols / Communauté -- */
.view-tabs { display: inline-flex; gap: 4px; background: var(--paper);
  padding: 5px; border-radius: 999px; box-shadow: var(--shadow); }
.view-tab {
  font: 700 14px var(--body); color: var(--ink-soft);
  background: none; border: 0; cursor: pointer;
  padding: 8px 20px; border-radius: 999px; transition: background .15s, color .15s;
}
.view-tab:hover { color: var(--ink); }
.view-tab.active { background: var(--orange); color: #fff; }

.flight-row .by { color: var(--ink-faint); font-size: 13px; font-weight: 600; margin-top: 2px; }
.flight-row .by::before { content: "👤 "; }
.dialog-note { font-size: 13px; color: var(--ink-soft); margin-top: 16px;
  background: var(--sky-lo); border-radius: var(--radius-s); padding: 12px 14px; }
.dialog-note b { color: var(--ink); }

/* -- barre de visibilité (page vol) -- */
.visibility-bar {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  margin-top: 18px; padding: 14px 20px;
  background: var(--paper); border-radius: var(--radius);
  box-shadow: var(--shadow); border-left: 5px solid var(--ink-faint);
  transition: border-color .2s;
}
.visibility-bar.is-public { border-left-color: var(--green); }
.vis-toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.vis-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.vis-toggle .track {
  width: 46px; height: 26px; border-radius: 999px; background: var(--hairline);
  position: relative; transition: background .2s; flex: none;
}
.vis-toggle .track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(20,39,59,.3); transition: transform .2s;
}
.vis-toggle input:checked + .track { background: var(--green); }
.vis-toggle input:checked + .track::after { transform: translateX(20px); }
.vis-toggle input:focus-visible + .track { outline: 2.5px solid var(--orange); outline-offset: 2px; }
.vis-label { font-weight: 700; font-size: 15px; }
.vis-check { display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.vis-check input { width: auto; accent-color: var(--orange); }
.vis-owner { margin-left: auto; font-weight: 700; color: var(--ink-soft); font-size: 14px; }
.vis-owner::before { content: "👤 "; }

/* ============ page connexion ============ */
.auth-shell { display: grid; grid-template-columns: 1fr 440px; gap: 48px;
  align-items: center; padding: 40px 0; min-height: 70vh; }
@media (max-width: 860px) { .auth-shell { grid-template-columns: 1fr; gap: 24px; } }
.auth-hero .kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--blue); margin-bottom: 18px;
}
.auth-hero .kicker::before { content: ""; width: 30px; height: 2.5px; background: var(--blue); border-radius: 2px; }
.auth-hero h1 { font-family: var(--display); font-weight: 800;
  font-size: clamp(30px, 4.5vw, 52px); line-height: 1.08; letter-spacing: -1px; }
.auth-hero h1 .accent {
  background: linear-gradient(100deg, var(--orange), #ffb056);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-hero p { color: var(--ink-soft); max-width: 440px; margin-top: 18px; font-size: 16px; }
.auth-card { padding: 8px 8px 28px; }
.auth-tabs { display: flex; gap: 4px; padding: 8px; margin-bottom: 8px; }
.auth-tab {
  flex: 1; font: 700 15px var(--body); color: var(--ink-soft);
  background: none; border: 0; cursor: pointer; padding: 12px; border-radius: var(--radius-s);
  transition: background .15s, color .15s;
}
.auth-tab.active { background: var(--sky-lo); color: var(--orange-deep); }
#auth-form { padding: 0 24px; }
.field { margin-bottom: 4px; }
.field .hint { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 5px; font-weight: 600; }
.btn.wide { width: 100%; margin-top: 20px; justify-content: center; }
.apikey { display: inline-block; font-family: ui-monospace, monospace; font-size: 12.5px;
  background: var(--sky-lo); padding: 8px 12px; border-radius: 8px; margin: 6px 0;
  word-break: break-all; border: 1px solid var(--hairline); }
.msg code { font-family: ui-monospace, monospace; background: var(--sky-lo); padding: 1px 5px; border-radius: 4px; }

.vis-controls { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.vis-controls[hidden] { display: none; }

/* -- libellé de portée des statistiques -- */
.stats-head { margin: 4px 0 10px; }
.stats-scope {
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink-faint);
}

/* -- upload : section vidéo optionnelle + progression -- */
.req { font-size: 11px; font-weight: 700; color: var(--orange); letter-spacing: 1px; text-transform: uppercase; }
.video-optional { margin: 14px 0; border: 1px solid var(--hairline); border-radius: var(--radius-s); padding: 4px 14px; }
.video-optional summary { cursor: pointer; font-weight: 700; padding: 10px 0; color: var(--ink); user-select: none; }
.video-optional summary:hover { color: var(--orange-deep); }
.video-optional[open] summary { margin-bottom: 8px; }
.dialog-note.tight { margin: 4px 0 12px; }
.progress-wrap { margin: 14px 0; }
.progress-bar { height: 8px; background: var(--sky-lo); border-radius: 999px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--orange);
  border-radius: 999px; transition: width .3s ease; }
.progress-label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-top: 6px; }

/* ---- vérification email / reset / pagination ---- */
.verify-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #fff6e8; border: 1.5px solid #ffd8a1; color: #7a4a00;
  border-radius: var(--radius-s); padding: 12px 18px; margin-top: 18px;
  font-size: 14px; font-weight: 600;
}
.verify-banner .btn { margin-left: auto; }
.forgot-line { text-align: center; margin-top: 14px; font-size: 14px; }
.forgot-line a { color: var(--ink-soft); font-weight: 600; text-decoration: underline; }
.forgot-line a:hover { color: var(--orange-deep); }
.load-more { display: block; margin: 20px auto 0; }

/* ---- marqueur météo (divIcon, sans PNG externe) ---- */
.wx-pin { background: none; border: 0; }
.wx-pin-dot {
  display: block; width: 20px; height: 20px; border-radius: 50%;
  background: var(--orange); border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(20, 39, 59, .35);
  cursor: grab;
}
.wx-pin-dot:active { cursor: grabbing; }

/* ============ panneau d'administration ============ */
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ink-faint);
  padding: 12px 16px; border-bottom: 1.5px solid var(--hairline); white-space: nowrap;
}
.admin-table td { padding: 14px 16px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: var(--sky-lo); }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-table .cell-main { font-weight: 700; }
.admin-table .cell-main a { color: var(--ink); text-decoration: none; }
.admin-table .cell-main a:hover { color: var(--orange-deep); text-decoration: underline; }
.admin-table .cell-sub { font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; }
.admin-table .actions { text-align: right; white-space: nowrap; }
.admin-table select {
  font: inherit; font-size: 13px; padding: 6px 10px; width: auto; min-width: 130px;
  border-radius: var(--radius-s);
}
.mini-check {
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer;
  margin-bottom: 3px;
}
.mini-check input { width: auto; accent-color: var(--orange); margin: 0; }
.btn.small.danger {
  background: var(--paper); color: var(--red);
  border: 1.5px solid #f3c2cc; box-shadow: none; padding: 7px 14px; font-size: 13px;
}
.btn.small.danger:hover { background: var(--red); color: #fff; border-color: var(--red); transform: none; }
.vid-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--sky-lo); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 5px 10px; margin: 2px 4px 2px 0;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.vid-chip small { color: var(--ink-faint); font-weight: 500; }
.vid-del {
  border: 0; background: none; cursor: pointer; color: var(--ink-faint);
  font-size: 13px; line-height: 1; padding: 2px 3px; border-radius: 4px;
}
.vid-del:hover { background: var(--red); color: #fff; }

/* ---- ajout/remplacement vidéo sur la page d'un vol ---- */
.card-head .vid-action {
  float: right; margin-top: -3px; padding: 5px 12px; font-size: 12.5px;
}
.vid-progress { padding: 10px 4px 4px; }
.vid-progress[hidden] { display: none; }
.vid-progress .progress-bar {
  height: 7px; border-radius: 999px; background: var(--sky-lo);
  overflow: hidden; margin-bottom: 6px;
}
.vid-progress .progress-bar span {
  display: block; height: 100%; width: 0%; background: var(--orange);
  border-radius: 999px; transition: width .25s ease;
}
.vid-progress .progress-label { font-size: 12.5px; color: var(--ink-soft); }


/* ---- corrections tableau admin (colonnes qui se chevauchaient) ---- */
.admin-table { table-layout: auto; }
.admin-table th, .admin-table td { vertical-align: middle; }
/* La cellule des roles contient 2 lignes mini-check empilees : on lui donne
   de l'air et on empeche le texte de deborder sur la colonne voisine. */
.admin-table td .mini-check { display: flex; }
.admin-table .roles-cell { min-width: 130px; white-space: nowrap; }
.admin-table .actions { text-align: right; white-space: nowrap; }
/* evite que "Inscrit" et les autres colonnes soient ecrasees */
.admin-table td:first-child { min-width: 160px; }

/* ---- vidéo en cours de compression côté serveur ---- */
.video-processing {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 40px 20px; text-align: center; color: var(--ink-soft);
  background: var(--sky-lo); border-radius: 12px; min-height: 160px;
}
.video-processing small { color: var(--ink-faint); }
.video-processing .spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--sky-hi); border-top-color: var(--orange);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ---- glisser-déposer : formulaire "Nouveau vol" ---- */
.dropzone {
  border: 2px dashed var(--sky-hi, #b9cfe0);
  border-radius: 12px; padding: 14px 16px; cursor: pointer;
  background: var(--sky-lo, #f7fbfd);
  transition: border-color .15s ease, background .15s ease;
  margin-bottom: 6px;
}
.dropzone:hover { border-color: var(--ink-faint, #8ba2b8); }
.dropzone.dz-over { border-color: var(--orange, #ff6a00); background: #fff4ec; }
.dropzone.dz-filled { border-style: solid; border-color: var(--ink-faint, #8ba2b8); background: #fff; }
.dropzone.dz-error { border-color: #e0466a; background: #fdecef; }
.dz-inner { display: flex; align-items: center; gap: 10px;
  color: var(--ink-soft, #47617a); font-size: 14px; font-weight: 600; }
.dz-over .dz-icon, .dz-filled .dz-icon { color: var(--orange, #ff6a00); }
.dz-icon { flex-shrink: 0; color: var(--ink-faint, #8ba2b8); }
.dz-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-input-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---- glisser-déposer : cartes vidéo sur la page d'un vol ---- */
.video-droppable { position: relative; transition: outline .15s ease; border-radius: 10px; }
.video-droppable.drop-over {
  outline: 2px dashed var(--orange, #ff6a00);
  outline-offset: 3px;
  background: #fff4ec;
}
.video-droppable.drop-over::after {
  content: "Déposer la vidéo ici";
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--orange, #ff6a00); font-weight: 700; font-size: 14px;
  background: rgba(255,244,236,.85); border-radius: 10px; pointer-events: none;
}

/* ---- Page de recherche ---- */
.page-head { margin: 28px 0 18px; }
.page-head h1 { font-family: "Unbounded", sans-serif; font-size: clamp(28px, 5vw, 44px); margin: 0 0 6px; color: var(--ink, #14273b); }
.page-head .sub { color: var(--ink-soft, #47617a); margin: 0; }
.search-card { padding: 20px; margin-bottom: 22px; }
.search-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.search-fields label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint, #8ba2b8); }
.search-fields input { font-family: inherit; font-size: 15px; font-weight: 400; text-transform: none; letter-spacing: 0;
  padding: 10px 12px; border: 1px solid var(--hairline, #dce6ef); border-radius: 10px; background: var(--sky-lo, #f7fbfd); color: var(--ink, #14273b); }
.search-fields input:focus { outline: none; border-color: var(--orange, #ff6a00); }
.search-actions { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.search-count { color: var(--ink-soft, #47617a); font-weight: 600; font-size: 14px; }
.search-pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 24px 0; }
.search-pager #s-pageinfo { color: var(--ink-soft, #47617a); font-weight: 700; }
.search-pager button:disabled { opacity: .4; cursor: default; }

/* ---- Dashboard sauvegardes (admin) ---- */
.bk-health { display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  border-radius: 14px; margin-bottom: 18px; }
.bk-health.ok { background: rgba(46, 160, 67, .10); border: 1px solid rgba(46, 160, 67, .3); }
.bk-health.warn { background: rgba(224, 45, 75, .08); border: 1px solid rgba(224, 45, 75, .3); }
.bk-badge { font-size: 28px; line-height: 1; }
.bk-health.ok .bk-badge { color: #2ea043; }
.bk-health.warn .bk-badge { color: var(--red, #e02d4b); }
.bk-status { font-weight: 800; font-size: 17px; color: var(--ink, #14273b); }
.bk-sub { color: var(--ink-soft, #47617a); font-size: 13px; margin-top: 3px; }
.bk-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin-bottom: 20px; }
.bk-stat { background: var(--sky-lo, #f7fbfd); border: 1px solid var(--hairline, #dce6ef);
  border-radius: 12px; padding: 14px; }
.bk-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-faint, #8ba2b8); }
.bk-v { font-size: 18px; font-weight: 800; color: var(--ink, #14273b); margin-top: 4px; }
.bk-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.bk-tier h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-soft, #47617a); }
.bk-count { display: inline-block; background: var(--orange, #ff6a00); color: #fff;
  border-radius: 999px; padding: 1px 8px; font-size: 11px; margin-left: 4px; }

/* ---- Sélecteur de langue FR|EN (intégré définitivement) ---- */
.lang-switch {
  display: inline-flex; gap: 2px; margin: 0 10px; padding: 3px;
  border-radius: 999px; background: #fff;
  border: 1px solid var(--hairline, #dce6ef);
  box-shadow: 0 1px 3px rgba(20, 39, 59, .06);
}
.lang-switch button {
  border: 0; background: transparent; cursor: pointer;
  padding: 5px 13px; font-family: inherit; font-size: 13px; font-weight: 800;
  letter-spacing: .02em; color: var(--ink-faint, #8ba2b8);
  border-radius: 999px; transition: background .15s, color .15s;
}
.lang-switch button.active { background: var(--orange, #ff6a00); color: #fff; }
.lang-switch button:not(.active):hover { color: var(--ink-soft, #47617a); }

/* ---- Encart zones de vol drone (indicatif + liens officiels) ---- */
.drone-notice { z-index: 1000; }
.drone-notice-toggle {
  background: rgba(255, 106, 0, .92); color: #fff; border: 0; cursor: pointer;
  font-family: inherit; font-weight: 800; font-size: 12px; padding: 7px 11px;
  border-radius: 8px; box-shadow: 0 2px 8px rgba(20, 39, 59, .25);
}
.drone-notice-panel {
  background: #fff; border: 1px solid var(--hairline, #dce6ef); border-radius: 10px;
  padding: 12px 14px; margin-top: 8px; width: 260px;
  box-shadow: 0 4px 16px rgba(20, 39, 59, .18); font-size: 12.5px; line-height: 1.5;
}
.drone-notice-panel .dn-warn { margin: 0 0 8px; color: var(--ink, #14273b); }
.drone-notice-panel .dn-off { margin: 0 0 4px; font-weight: 700; color: var(--ink-soft, #47617a); }
.drone-notice-panel .dn-links { list-style: none; margin: 0 0 8px; padding: 0; }
.drone-notice-panel .dn-links li { margin: 3px 0; }
.drone-notice-panel .dn-links a { color: var(--orange, #ff6a00); text-decoration: none; font-weight: 600; }
.drone-notice-panel .dn-links a:hover { text-decoration: underline; }
.drone-notice-panel .dn-note { margin: 0; font-size: 11px; color: var(--ink-faint, #8ba2b8); }

/* ---- Sélecteur compact des zones de vol par pays ---- */
.zone-picker {
  background: #fff; border: 1px solid var(--hairline, #dce6ef);
  border-radius: 10px; padding: 8px 10px;
  box-shadow: 0 2px 10px rgba(20, 39, 59, .12);
}
.zone-picker-label {
  display: block; font-size: 10px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-faint, #8ba2b8); margin-bottom: 4px;
}
.zone-picker-select {
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--ink, #14273b); background: #fff;
  border: 1px solid var(--hairline, #dce6ef); border-radius: 7px;
  padding: 5px 8px; cursor: pointer; min-width: 150px;
}
.zone-picker-select:focus { outline: 2px solid var(--orange, #ff6a00); outline-offset: 1px; }

/* ============================================================
   Responsive mobile/tablette — AJOUTS uniquement (le desktop
   au-dessus de 900px reste strictement inchangé).
   ============================================================ */

/* --- Largeur intermédiaire (tablette, grand téléphone paysage) ---
   La grille .stats en auto-fit forçait 5 colonnes trop étroites → le
   texte des cartes débordait ("MAX ALTITUDE", "26:30"). On plafonne
   à 3 colonnes ici, 2 en dessous. */
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 32px; }
  .stat { padding: 16px 16px 14px; }
  .stat .v { font-size: 26px; }
}

/* --- Petits écrans : resserrer les marges latérales, la carte, la légende --- */
@media (max-width: 620px) {
  .wrap { padding: 0 14px 60px; }

  /* Carte moins haute sur mobile (460px mangeait tout l'écran) */
  .map { height: 340px; }
  .map.tall { height: 360px; }

  /* Légende : autoriser le retour à la ligne pour ne plus déborder,
     et la rendre un peu plus compacte. */
  .map-legend { font-size: 11.5px; line-height: 1.6; padding: 8px 11px; max-width: 62vw; }
  .map-legend .row { white-space: normal; }

  /* Titres de section un peu plus petits pour ne pas pousser la largeur */
  .section-head h2 { font-size: 20px; }
}

/* --- Très petits écrans : stats en 1 colonne (comme tes captures 1-2) --- */
@media (max-width: 400px) {
  .stats { grid-template-columns: 1fr; }
}

/* ============================================================
   Menu burger — mobile uniquement (≤ 720px).
   Sur desktop, le bouton est masqué et la nav reste inchangée.
   ============================================================ */

/* Bouton burger : caché par défaut (desktop), affiché en mobile */
.burger-btn { display: none; }
.burger-scrim, .burger-panel { display: none; }

@media (max-width: 720px) {
  /* Le bouton burger apparaît à droite de la barre */
  .burger-btn {
    display: inline-flex; flex-direction: column; justify-content: center;
    gap: 5px; width: 44px; height: 44px; padding: 0 10px;
    background: var(--paper); border: 1px solid var(--hairline);
    border-radius: 12px; cursor: pointer; margin-left: auto; flex: none;
  }
  .burger-btn span {
    display: block; height: 2.5px; width: 100%; border-radius: 2px;
    background: var(--ink); transition: transform .2s, opacity .2s;
  }
  /* petite animation croix quand ouvert */
  body.burger-open .burger-btn span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  body.burger-open .burger-btn span:nth-child(2) { opacity: 0; }
  body.burger-open .burger-btn span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  /* Tout ce qui n'est PAS le logo, le spacer, le sélecteur de langue ou le
     burger lui-même est masqué dans la barre : ces éléments vivent dans le
     panneau. Formulé en négatif pour couvrir aussi les liens ajoutés plus tard
     (« Rechercher », etc.) sans avoir à toucher au HTML des 8 pages.
     Une fois déplacés dans .burger-panel, ils ne sont plus descendants de
     <nav> : le sélecteur ne s'applique plus et ils redeviennent visibles. */
  nav > *:not(.brand):not(.spacer):not(#lang-switch):not(#burger-btn) {
    display: none;
  }

  /* La barre ne doit jamais élargir le document : sans ça, la page entière
     devient plus large que l'écran et il faut dézoomer pour tout voir. */
  nav { flex-wrap: nowrap; gap: 12px; min-width: 0; }
  nav .brand { flex: 0 1 auto; min-width: 0; }
  html, body { overflow-x: hidden; }

  /* Voile sombre derrière le panneau */
  .burger-scrim {
    display: block; position: fixed; inset: 0; z-index: 998;
    background: rgba(20, 39, 59, .4); opacity: 0; pointer-events: none;
    transition: opacity .25s; backdrop-filter: blur(2px);
  }
  body.burger-open .burger-scrim { opacity: 1; pointer-events: auto; }

  /* Panneau latéral qui glisse depuis la droite */
  .burger-panel {
    display: flex; flex-direction: column; gap: 14px; align-items: stretch;
    position: fixed; top: 0; right: 0; z-index: 999;
    width: min(280px, 82vw); height: 100%;
    background: var(--paper); box-shadow: -8px 0 30px rgba(20, 39, 59, .2);
    padding: 78px 22px 22px; overflow-y: auto;
    transform: translateX(100%); transition: transform .26s ease;
  }
  body.burger-open .burger-panel { transform: translateX(0); }

  /* Les boutons dans le panneau : pleine largeur, empilés, plus lisibles */
  .burger-panel .nav-auth {
    display: flex; flex-direction: column; align-items: stretch; gap: 12px; width: 100%;
  }
  .burger-panel .nav-auth .who {
    padding: 4px 2px 10px; border-bottom: 1px solid var(--hairline); margin-bottom: 4px;
  }
  .burger-panel .btn,
  .burger-panel .nav-auth .btn { width: 100%; text-align: center; justify-content: center; }
  .burger-panel #btn-upload { order: -1; }  /* "Nouveau vol" en premier */
}

/* ---- case à cocher CGU (inscription) ------------------------------------ */
/* La règle générique `input, select` (l.198) impose width:100% + padding, ce
   qui étire la case et la fait paraître centrée. On la neutralise ici. */
.field-check {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 18px 2px 6px; text-align: left; cursor: pointer;
}
.field-check input[type="checkbox"] {
  flex: 0 0 auto; width: 17px; height: 17px;
  margin: 1px 0 0; padding: 0;
  accent-color: var(--orange); cursor: pointer;
}
.field-check span {
  font: 600 13px/1.5 var(--body); color: var(--ink-soft);
}
.field-check a {
  color: var(--orange); font-weight: 700;
  text-decoration: underline; text-underline-offset: 2px;
}
.field-check a:hover { text-decoration: none; }

/* ---- liens légaux en pied de page --------------------------------------- */
footer .legal-links {
  display: flex; gap: 16px; flex-wrap: wrap; margin-top: 9px;
}
footer .legal-links a {
  color: #d98e00; text-decoration: none; font-weight: 600;
}
footer .legal-links a:hover { color: var(--orange); text-decoration: underline; }

/* ---- nav collante (desktop uniquement, ≥ 721px) -------------------------- */
@media (min-width: 721px) {
  nav {
    position: sticky; top: 12px; z-index: 1500;
    margin-top: 16px; padding: 11px 18px;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    border-radius: 999px;
    box-shadow: var(--shadow);
  }
  @supports not (backdrop-filter: blur(1px)) {
    nav { background: var(--paper); }
  }
  .controls { top: 84px; }
}

.btn.reported {
  background: var(--sky-lo); color: var(--ink-soft);
  border-color: var(--hairline); box-shadow: none; cursor: default;
}
.btn.reported:hover { background: var(--sky-lo); }

.admin-table a {
  color: var(--orange); font-weight: 700; text-decoration: none;
}
.admin-table a:hover { text-decoration: underline; }

/* ---- textarea : aligné sur input/select (l.198) -------------------------- */
/* La règle générique ne cible que input et select ; sans ça, les zones de
   texte gardent l'apparence native du navigateur. */
textarea {
  font: 400 15px/1.5 var(--body);
  color: var(--ink);
  background: var(--sky-lo);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-s);
  padding: 11px 14px;
  width: 100%;
  resize: vertical;                /* horizontal casserait la mise en page */
  transition: border-color .15s, background .15s;
}
textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: var(--paper);
}