/* Flight Sim Création — accueil. Chargée après site.css, ne sert qu'à index.html.
   Sommaire : ouverture (titre, main courante, plan de l'aérodrome) · sections numérotées · strips de packs */

/* ---------- ouverture ---------- */
.home-hero { padding: var(--s-8) 0 var(--s-9); }
.home-hero-grid { align-items: end; row-gap: var(--s-6); }
.home-intro h1 { font-size: var(--fs-3xl); margin-bottom: var(--s-5); }
.home-intro .lead { margin-bottom: var(--s-6); }

/* chiffres clés : le chiffre au-dessus, son libellé dessous */
.home-facts { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-7); margin: var(--s-7) 0 0; padding-top: var(--s-4); border-top: 1px solid var(--rule); }
.home-facts div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: var(--s-2); max-width: 16ch; }
.home-facts dt { font-size: var(--fs-sm); line-height: 1.35; color: var(--ink-2); }
.home-facts dd { margin: 0; font: 700 var(--fs-xl)/1 var(--f-mono); color: #fff; word-spacing: -.4em; } /* « 0 € » : espace pleine chasse en B612 Mono resserrée */

/* extrait de fréquence */
.freq { margin: 0; background: var(--black); border: 1px solid var(--rule); border-radius: var(--r-2); }
.freq-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
  padding: 10px var(--s-4);
  font: 600 var(--fs-xs)/1 var(--f-display);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.freq-head .i { color: var(--cyan); margin-right: 4px; }
.freq-chan { font: 400 12px/1 var(--f-mono); letter-spacing: .04em; color: var(--ink-2); }
.freq-log { margin: 0; padding: var(--s-2) 0; list-style: none; font: 400 14px/1.5 var(--f-mono); }
.freq-log li { display: grid; grid-template-columns: 8ch 6.5ch minmax(0, 1fr); gap: var(--s-3); margin: 0; padding: 7px var(--s-4); border-left: 3px solid transparent; }
.freq-log time { font-family: var(--f-ui); color: var(--ink-3); } /* B612 : mêmes chiffres que B612 Mono, deux-points étroits (« 14:26:08 » et non « 14: 26: 08 ») */
.freq-log b { font-weight: 700; color: var(--cyan); }
.freq-log p { margin: 0; font-family: var(--f-ui); color: var(--ink); } /* message en B612, comme .radio */
.freq-log .freq-pilot b, .freq-log .freq-pilot p { color: var(--ink-2); }
.freq-log .freq-call b { color: var(--red-ink); } /* appel téléphonique entrant */
.freq-log .is-now { background: var(--night-3); border-left-color: var(--cyan); }
.freq-log .is-now p { color: #fff; }
.freq-metar { margin: 0; padding: 10px var(--s-4); font: 400 12px/1.5 var(--f-mono); color: var(--ink-2); border-top: 1px solid var(--rule); }
.freq-metar span { margin-right: var(--s-2); color: var(--ink-3); }

/* plan de l'aérodrome (SVG en mètres, origine au seuil 03, axe de piste horizontal) */
.plan { margin: var(--s-4) 0 0; background: #060b16; border: 1px solid var(--rule); border-radius: var(--r-2); overflow: hidden; }
.plan-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding: 10px var(--s-4); border-bottom: 1px solid var(--rule); }
.plan-head strong { font: 700 var(--fs-md)/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; }
.plan-sub { font-size: var(--fs-sm); color: var(--ink-2); }
.plan-head .coords { margin-left: auto; }
.plan-map { aspect-ratio: 4900 / 1400; }
.plan-map svg { display: block; width: 100%; height: 100%; }
.plan-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-5); padding: 10px var(--s-4); border-top: 1px solid var(--rule); font: 400 12px/1.4 var(--f-mono); color: var(--ink-3); }
.plan-foot p { margin: 0; font-family: var(--f-text); } /* le © de B612 Mono est un exposant minuscule */
.plan-key { font-family: var(--f-ui); display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); margin: 0; padding: 0; list-style: none; color: var(--ink-2); }
.plan-key li { display: inline-flex; align-items: center; gap: var(--s-2); margin: 0; }
.plan-key li::before { content: ""; width: 14px; height: 0; border-top: 2px solid; }
.plan-key-radar::before { color: var(--cyan); }
.plan-key-gnd::before { color: var(--ink); }
.plan-key-hold::before { height: 6px; border-bottom: 1.5px solid; border-top-width: 1.5px; color: var(--ink); }
.plan-key-ops::before { border-top-style: dashed; color: var(--red-ink); }

/* couches du plan : les tailles sont en mètres (unités du viewBox) */
.plan svg text { font-family: var(--f-mono); font-size: 46px; fill: var(--ink-2); paint-order: stroke; stroke: #060b16; stroke-width: 14px; stroke-linejoin: round; }
.p-fence path { fill: none; stroke: var(--rule-2); stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.p-apron path { fill: #0f1a2d; stroke: #22334f; vector-effect: non-scaling-stroke; }
.p-tl path { fill: none; stroke: #3c4f72; vector-effect: non-scaling-stroke; }
.p-twy path { fill: none; stroke: #22314c; stroke-width: 23px; stroke-linecap: round; stroke-linejoin: round; }
.p-twy-cl path { fill: none; stroke: var(--sign); stroke-opacity: .5; vector-effect: non-scaling-stroke; }
.p-bldg path { fill: #18253d; stroke: #34496e; vector-effect: non-scaling-stroke; }
.p-bldg .p-term { fill: #22355a; stroke: #4b6491; }
.p-bldg .p-twr { fill: var(--ink-2); stroke: none; }
.p-parked { fill: #4d5f80; }
.p-runway { fill: #d3dae5; }
.p-stopway { fill: none; stroke: var(--ink-3); stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.p-rwy-cl { stroke: #0a1324; stroke-width: 3px; stroke-dasharray: 30 20; }
.p-rwy-mk { fill: #0a1324; }
.p-hold path { fill: none; stroke: var(--ink); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.p-wsock { fill: none; stroke: var(--ink-2); vector-effect: non-scaling-stroke; }
.p-wsock path, .p-wsock circle { vector-effect: non-scaling-stroke; }

.p-dim path { fill: none; stroke: var(--ink-3); vector-effect: non-scaling-stroke; }
.p-dim rect { fill: #060b16; }
.plan .p-dim text { text-anchor: middle; dominant-baseline: central; fill: var(--ink-2); stroke: none; }
.plan .p-rwy-id text { text-anchor: middle; font: 700 84px/1 var(--f-display); fill: #fff; }
.plan .p-rwy-id .p-qfu { font: 400 40px/1 var(--f-mono); fill: var(--ink-2); }

/* panneaux de taxiway : jaune sur noir, liseré jaune */
.p-signs rect { fill: #000; stroke: var(--sign); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.plan .p-signs text { text-anchor: middle; dominant-baseline: central; font: 700 48px/1 var(--f-display); fill: var(--sign); stroke: none; }
.plan .p-lbl text { font-size: 40px; letter-spacing: 4px; fill: var(--ink-3); }

/* trafic */
.p-gnd use { fill: var(--ink); }
/* engins SSLIA en route vers le poste 3 */
.p-ops-route { fill: none; stroke: var(--red-ink); stroke-opacity: .8; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.p-ops-fire { fill: rgba(224, 48, 42, .14); stroke: var(--red-ink); stroke-width: 1.5px; vector-effect: non-scaling-stroke; animation: blink 1.2s steps(2, jump-none) infinite; }
.p-ops rect { fill: var(--red); stroke: #060b16; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.plan .p-ops text { font-size: 40px; font-weight: 700; fill: var(--red-ink); }
.plan .p-gnd text { font-size: 40px; fill: var(--ink); }
.p-app { fill: var(--cyan); }
.p-axis { fill: none; stroke: var(--cyan); stroke-opacity: .55; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.p-gap { fill: #060b16; }
.p-break, .p-leader { fill: none; stroke: var(--cyan); vector-effect: non-scaling-stroke; }
.p-app circle { fill: var(--cyan); }
.p-app circle:nth-of-type(2) { opacity: .7; }
.p-app circle:nth-of-type(3) { opacity: .45; }
.p-app circle:nth-of-type(4) { opacity: .25; }
.plan .p-tag { font-size: 46px; fill: var(--cyan); }
.plan .p-tag-cs { font-weight: 700; }
.plan .p-nm { font-size: 38px; text-anchor: middle; fill: var(--ink-3); }

.p-north path { fill: var(--ink-2); }
.plan .p-north text { text-anchor: middle; dominant-baseline: central; font: 700 52px/1 var(--f-display); fill: var(--ink); }
.p-scale rect { fill: var(--ink-2); stroke: var(--ink-2); vector-effect: non-scaling-stroke; }
.p-scale .p-scale-b { fill: none; }
.plan .p-scale text { font-size: 36px; text-anchor: middle; }

/* ---------- sections ---------- */
.home-head h2 { margin-bottom: var(--s-4); }
.home-head > p:not(.section-number) { color: var(--ink-2); }

/* notes : libellé en capitales mono, texte courant */
.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gutter); margin: var(--s-6) 0 0; }
.notes div { padding: var(--s-3) 0; border-top: 1px solid var(--rule); }
.notes dt { margin-bottom: var(--s-1); font: 400 var(--fs-xs)/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--sign); }
.notes dd { margin: 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--ink-2); }
.notes--single { grid-template-columns: 1fr; }
.notes--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* strips de contrôle (01) */
.home-strips, .pack-strips { margin: 0; padding: 0; list-style: none; }
.home-strips > li, .pack-strips > li { margin: 0; }
.strip-pos { align-items: flex-start; width: 92px; flex: none; }
.strip-pos .strip-label { font-family: var(--f-mono); letter-spacing: .02em; }
.strip-id { width: 196px; flex: none; }
.strip-say { margin: 0; font: 400 14px/1.45 var(--f-ui); }
.strip .strip-cell--end { align-items: flex-end; text-align: right; }

/* FIDS des escales (02) */
.fids-note { margin: var(--s-4) 0 0; font-size: var(--fs-sm); color: var(--ink-2); }

/* appel (03) */
.steps { display: grid; gap: 0; margin: var(--s-6) 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; margin: 0; padding: var(--s-3) 0 var(--s-3) 44px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: var(--fs-sm); counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: var(--s-3); font: 700 var(--fs-sm)/1.5 var(--f-mono); color: var(--sign); }
.steps b { display: block; font: 700 var(--fs-md)/1.4 var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.call .card-head { align-items: center; }
.call-meta { font: 400 var(--fs-xs)/1 var(--f-ui); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.call h3 { margin-bottom: var(--s-4); }
.call-log { display: grid; gap: var(--s-3); margin: 0 0 var(--s-5); padding: 0; list-style: none; }
.call-log li { display: grid; grid-template-columns: 9ch minmax(0, 1fr); gap: var(--s-3); margin: 0; }
.call-log b { font: 400 var(--fs-xs)/1.9 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.call-log p { margin: 0; color: var(--ink); }
.call-log .call-op p { color: var(--sign); }
.call .kv { margin-bottom: var(--s-5); }

/* main courante type (01) : l'appel en Barlow, comme les noms d'aéroports du réseau */
.scen-wrap { margin-top: var(--s-6); }
.scen td:nth-child(2), .scen td:nth-child(3) { font-family: var(--f-text); white-space: normal; }
.scen td:nth-child(2) { font-weight: 500; }
.scen td:nth-child(3) { color: var(--ink-2); }

/* état des moyens (02) */
.units td:nth-child(2), .units td:nth-child(3) { font-family: var(--f-text); white-space: normal; }
.units td:nth-child(2) { color: var(--ink-2); }

/* réseau (05) */
.net td:nth-child(2), .net td:nth-child(4) { font-family: var(--f-text); font-weight: 500; }
.net td:nth-child(4) { white-space: normal; color: var(--ink-2); }
.net td.num { word-spacing: -.4em; white-space: nowrap; } /* « 1 000 000 € » resserré (B612 Mono) */
.net-pack { display: block; font: 400 var(--fs-xs)/1.3 var(--f-ui); white-space: nowrap; color: var(--ink-3); }

/* session multijoueur (05) */
.session { overflow: hidden; }
.session-head { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) var(--s-4); font: 600 var(--fs-xs)/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid var(--rule); }
.session-head .mono { font-weight: 400; letter-spacing: .04em; color: var(--ink-2); }
.session .seats { padding: 0; gap: 1px; background: var(--rule); }
.session.card--flush { padding: 0; }
.session .code-box { margin: var(--s-4); }

/* packs en strips (06) */
.pack-strip { color: var(--buff-ink); text-decoration: none; transition: border-color var(--t), background-color var(--t); }
.pack-strip:hover { --strip-band: var(--sign); color: var(--buff-ink); background: #f6efdc; }
.pack-strip-icon { justify-content: center; width: 64px; flex: none; }
.pack-strip-icon .i { width: 28px; height: 28px; }
.pack-strip-name { width: 210px; flex: none; }
.pack-strip-name .strip-value { font-family: var(--f-display); font-size: var(--fs-lg); letter-spacing: .03em; text-transform: uppercase; }
.pack-strip-text { font: 400 var(--fs-sm)/1.45 var(--f-text); }
.pack-strip .badge { margin-top: 2px; width: fit-content; }
.pack-strip .badge--ok { color: #0b6a3c; border-color: rgba(11, 106, 60, .55); } /* vert lisible sur le chamois */
/* prix en B612 (et non Mono) : la virgule de la Mono occupe une case entière (« 3, 99 € ») */
.pack-strip [data-price] { font-family: var(--f-ui); white-space: nowrap; }

/* appel final (le pied de page apporte déjà sa marge haute) */
.home-end { padding-bottom: 0; }
.home-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-5) var(--s-7); }
.home-cta h2 { margin-bottom: var(--s-3); }
.home-cta p { margin: 0; }

/* ---------- petits écrans ---------- */
@media (max-width: 1199px) {
  /* fréquence : heure et station sur une ligne, message dessous */
  .freq-log li { grid-template-columns: auto minmax(0, 1fr); gap: 2px var(--s-3); }
  .freq-log p { grid-column: 1 / -1; }
  /* escales : le type d'avion cède la place, l'étape passe à la ligne */
  .stopovers th:nth-child(2), .stopovers td:nth-child(2) { display: none; }
  .stopovers td:nth-child(4) { white-space: normal; }
}
@media (max-width: 900px) {
  .home-hero { padding-top: var(--s-6); }
  .notes--3 { grid-template-columns: 1fr; }
  .home-hero-grid { align-items: start; }
  /* le plan est recadré sur le seuil 21 (preserveAspectRatio xMaxYMid slice) pour garder des étiquettes lisibles */
  .plan-map { aspect-ratio: 2 / 1; }
  .p-dim { display: none; } /* la cote de piste n'a plus de sens une fois le plan recadré */
}
@media (max-width: 700px) {
  .plan-head .coords { margin-left: 0; }
  .notes { grid-template-columns: 1fr; }
  .net .net-opt { display: none; }
}
@media (max-width: 600px) {
  .plan-map { aspect-ratio: 5 / 4; }
  .home-intro h1 { font-size: var(--fs-2xl); }
  .home-intro .btn-row .btn { flex: 1 1 auto; }
  .home-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
  .freq-log li { padding-inline: var(--s-3); }
  .call .card-head { flex-wrap: wrap; }
  .call .card-head > * { white-space: nowrap; }
  .call-log li { grid-template-columns: 1fr; gap: 2px; }
  .session .code-box .small { white-space: nowrap; }
  .session .code-box .mono { font-size: var(--fs-lg); letter-spacing: .2em; }

  /* strips : ligne 1 = repères, ligne 2 = texte sur toute la largeur */
  .home-strips .strip, .pack-strip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
  .home-strips .strip-cell, .pack-strip .strip-cell { width: auto; border-top: 0; border-left: 1px solid var(--buff-rule); }
  .home-strips .strip-cell:first-child, .pack-strip .strip-cell:first-child { border-left: 0; }
  .home-strips .strip-say, .pack-strip .pack-strip-text { grid-row: 2; grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--buff-rule); }

  /* tableaux FIDS : une ligne devient un bloc (indicatif + statut, puis le détail) */
  .fids--stack, .fids--stack tbody { display: block; }
  .fids--stack caption { display: flow-root; } /* contient le <small> flottant, sinon la 1re ligne se tasse à côté */
  .fids--stack thead { display: none; }
  .fids--stack tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: 2px var(--s-3); padding: 10px var(--s-4); }
  .fids--stack td { padding: 0; white-space: normal; }
  .stopovers td:nth-child(2) { display: none; }
  .stopovers td:nth-child(3)::before { content: "Poste "; color: var(--ink-3); }
  .stopovers td:nth-child(4) { grid-row: 2; grid-column: 1 / -1; color: var(--ink-2); }
  .stopovers td:nth-child(5), .net td:nth-child(7), .units td:nth-child(4) { grid-row: 1; grid-column: 3; }
  .scen td:nth-child(3) { grid-row: 1; grid-column: 2 / -1; text-align: right; font-size: var(--fs-xs); }
  .scen td:nth-child(2), .units td:nth-child(3) { grid-row: 2; grid-column: 1 / -1; }
  .units td:nth-child(2) { font-size: var(--fs-xs); }
  .net td:nth-child(6) { grid-row: 2; grid-column: 2; text-align: left; font-size: var(--fs-xs); color: var(--ink-2); }
}
