:root {
  --bg: #f5f6f3; --panel: #ffffff; --text: #1d2a1f; --muted: #66736a; --line: #dfe4dc;
  --accent: #2f7d3b; --accent-soft: #e6f2e7;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #131a14; --panel: #1b241c; --text: #e8eee9; --muted: #98a69b; --line: #2b372d; --accent: #6bc07a; --accent-soft: #223a26; }
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
code { background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 18px; letter-spacing: 0.2px; }
.brand span { color: var(--accent); }
.tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.wrap { max-width: 900px; margin: 0 auto; padding: 24px 16px; }
h1 { font-size: 22px; margin: 6px 0 2px; }
h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--muted); margin: 20px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; margin-top: 6px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: block; }
.card:hover { border-color: var(--accent); }
.card-title { font-weight: 600; font-size: 17px; }
.card-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; font-size: 13px; color: var(--muted); }
.pill { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 10px; font-weight: 600; }

.parcelle { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - 47px); }
.panel { padding: 14px 16px 24px; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line); }
#map { height: 100%; min-height: 320px; background: #cdd3cb; }
.back { font-size: 13px; color: var(--muted); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 12px 0 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 6px 0; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--text); padding: 7px 4px; font-size: 14px; cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent); color: #fff; }
.slider { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; margin: 6px 0; }
.slider input { flex: 1; }
.ramp { height: 12px; border-radius: 6px; margin-top: 12px; background: linear-gradient(90deg, #a50026, #f46d43, #fee08b, #66bd63, #006837); }
.ramp-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 3px; }
.legend-classes { display: flex; gap: 14px; margin-top: 12px; font-size: 13px; }
.legend-classes i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.stats { width: 100%; border-collapse: collapse; }
.stats td { padding: 4px 0; border-bottom: 1px solid var(--line); }
.stats td:last-child { text-align: right; font-weight: 600; }
.bar-row { display: flex; align-items: center; gap: 8px; margin: 5px 0; }
.bar-label { width: 62px; }
.bar { flex: 1; height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; }
.bar-val { width: 40px; text-align: right; font-weight: 600; }
.note { font-size: 12.5px; color: var(--muted); margin-top: 12px; }

@media (max-width: 800px) {
  .parcelle { grid-template-columns: 1fr; grid-template-rows: 55vh auto; height: auto; }
  #map { order: -1; height: 55vh; }
  .panel { border-right: 0; border-top: 1px solid var(--line); }
}

/* import de vol, formulaires */
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 9px 16px; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn:disabled { opacity: 0.5; cursor: default; }
.small-btn { padding: 5px 12px; font-size: 13px; margin-top: 10px; }
.wrap.narrow { max-width: 640px; }
form label { display: block; margin: 10px 0; font-size: 13px; color: var(--muted); }
form input, form select, form textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font: inherit; font-size: 15px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
form input[type=file] { padding: 7px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.hint { display: block; margin-top: 3px; font-size: 12px; }
.progress { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; margin: 14px 0 6px; }
#progress-bar { height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.indeterminate { height: 100%; width: 35%; background: var(--accent); border-radius: 5px; animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
.error { color: #c0392b; background: rgba(192, 57, 43, 0.1); border-radius: 8px; padding: 10px 12px; }
.link-danger { background: none; border: 0; color: #c0392b; padding: 0; margin-top: 22px; font-size: 13px; cursor: pointer; text-decoration: underline; }
#flight-select { width: 100%; padding: 4px; font-size: 14px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 6px; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } }

/* comparaison de vols */
.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); margin-left: 6px; }
.ramp-div { background: linear-gradient(90deg, #d73027, #f5f5eb, #1a9850); }
.cmp-form { margin-top: 12px; }

/* espace client : navigation du bandeau */
.topnav { margin-left: auto; display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.topnav a:hover { color: var(--text); }
