/* Airline Empire — le site.
   L'identité du JEU, pas celle d'un site : la palette de 32 couleurs de
   Codex (docs/art/PALETTE.md), la police Jersey 15 du jeu, le cerné encre de
   2 px, l'ombre dure du titre de l'accueil, le pixel net partout.
   Les jetons clair/sombre sont ceux de App/Theme.swift. */

@font-face {
  font-family: "Jersey 15";
  src: url("fonts/Jersey15-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ink: #1B1720;
  --paper: #FFF1CC;
  --aircraft: #E4E9DF;
  --midnight: #243349;
  --deep-sea: #163A59;
  --ocean: #245D80;
  --cobalt: #3E76A3;
  --altitude: #4D8FC4;
  --saffron: #F6C453;
  --gold: #E0A42A;
  --beacon: #F17A3E;
  --coral: #DF5745;
  --basil: #3D8A61;
  --plum: #503452;

  --ground: #F3EBDA;
  --surface: #FFF8E9;
  --chrome: #E9DFC7;
  --text: #1B1720;
  --text-2: #40566C;
  --muted: #607889;
  --border: #1B1720;
  --accent: #3E76A3;
  --accent-text: #FFF1CC;

  --pixel-font: "Jersey 15", "Silkscreen", ui-rounded, system-ui, sans-serif;
  --gap: clamp(16px, 3vw, 28px);
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #141C2B;
    --surface: #1E2A3D;
    --chrome: #111827;
    --text: #E4E9DF;
    --text-2: #8FA3AD;
    --muted: #607889;
    --border: #0C1220;
    --accent: #4D8FC4;
    --gold: #F6C453;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--pixel-font);
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

img.pixel, .pixel img { image-rendering: pixelated; image-rendering: crisp-edges; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--beacon); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gap); }

/* ---------- Bandeau ---------- */

.topbar {
  background: var(--chrome);
  border-bottom: 2px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.topbar .wrap {
  display: flex; align-items: center; gap: 14px;
  min-height: 60px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-size: 24px;
}
.brand img { width: 32px; height: 32px; }
.brand span { white-space: nowrap; }
.nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  color: var(--text-2); text-decoration: none;
  padding: 4px 10px; border: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] {
  color: var(--text); border-color: var(--border); background: var(--surface);
}

/* ---------- Titre en relief (comme l'accueil du jeu) ---------- */

.title-emboss {
  margin: 0;
  font-weight: normal;
  font-size: clamp(44px, 9vw, 92px);
  line-height: 1;
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--ink);
  letter-spacing: 0.02em;
}

/* ---------- Accueil ---------- */

.hero {
  position: relative;
  border-bottom: 2px solid var(--border);
  /* La carte à sa taille NATIVE (1440 × 810, le @3x du jeu) : « cover »
     l'agrandissait jusqu'aux gros pavés sur un téléphone. */
  background: var(--deep-sea) url("img/carte-monde-nuit.png") center top / 1440px auto no-repeat;
  image-rendering: pixelated;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,58,89,0.35), rgba(20,28,43,0.82));
}
.hero .wrap {
  position: relative;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--gap);
  align-items: center;
  padding-top: clamp(36px, 7vw, 84px); padding-bottom: clamp(36px, 7vw, 84px);
}
.hero .logo { width: clamp(120px, 18vw, 192px); height: auto; display: block; margin-bottom: 14px; }
.hero .tagline { color: var(--aircraft); font-size: clamp(24px, 3.4vw, 34px); margin: 14px 0 6px; }
.hero .lead { color: var(--aircraft); opacity: 0.92; max-width: 34ch; margin: 0 0 22px; }
.hero .phone { justify-self: center; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.pills li {
  font-size: 17px; color: var(--ink);
  background: var(--paper); border: 2px solid var(--ink);
  padding: 2px 10px;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Boutons (PixelButton) ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--pixel-font); font-size: 22px;
  min-height: 52px; padding: 6px 20px;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  text-decoration: none; cursor: pointer;
  transition: transform 80ms, box-shadow 80ms;
}
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--cobalt); color: var(--paper); }
.btn-primary:hover { background: var(--altitude); color: var(--paper); }
.btn-secondary { background: var(--paper); color: var(--ink); }
.btn-secondary:hover { background: var(--saffron); color: var(--ink); }
.btn[aria-disabled="true"] { background: var(--paper); color: var(--ink); cursor: default; box-shadow: 4px 4px 0 var(--ink); }
.btn .sub { font-size: 16px; opacity: 0.85; }

/* ---------- Téléphone (cadre des captures) ---------- */

.phone {
  width: min(300px, 78vw);
  background: var(--ink);
  border-radius: 34px;
  padding: 10px;
  box-shadow: 8px 8px 0 rgba(27,23,32,0.55);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 26px; }

/* ---------- Sections ---------- */

section { padding: clamp(40px, 7vw, 76px) 0; }
section + section { border-top: 2px solid var(--border); }
.section-title {
  font-weight: normal; font-size: clamp(30px, 5vw, 44px);
  margin: 0 0 8px; line-height: 1.05;
}
.kicker {
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-2); font-size: 16px; margin: 0 0 6px;
}
.intro { color: var(--text-2); max-width: 60ch; margin: 0 0 28px; }

/* ---------- Cartes (PixelCard) ---------- */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.card {
  background: var(--surface);
  border: 2px solid var(--border);
  box-shadow: 4px 4px 0 var(--border);
  padding: 18px;
}
.card h3 { font-weight: normal; font-size: 26px; margin: 10px 0 6px; }
.card p { margin: 0; color: var(--text-2); }
.card .icon { width: 48px; height: 48px; }
.card ul { margin: 8px 0 0; padding-left: 20px; color: var(--text-2); }

/* ---------- Galerie ---------- */

.gallery {
  display: flex; gap: 22px; overflow-x: auto;
  padding: 6px 4px 22px; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.gallery figure { margin: 0; flex: 0 0 auto; scroll-snap-align: start; }
.gallery .phone { width: 230px; border-radius: 28px; padding: 8px; }
.gallery .phone img { border-radius: 21px; }
.gallery figcaption { margin-top: 12px; text-align: center; color: var(--text-2); font-size: 18px; }

/* ---------- Fins ---------- */

.endings { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.ending { text-align: center; }
.ending img { width: 96px; height: 96px; }
.ending h3 { font-weight: normal; font-size: 24px; margin: 10px 0 4px; }
.ending.win h3 { color: var(--gold); text-shadow: 2px 2px 0 var(--ink); }

/* ---------- Bande « sans » ---------- */

.promise {
  background: var(--midnight); color: var(--aircraft);
  border-top: 2px solid var(--border); border-bottom: 2px solid var(--border);
}
.promise .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.promise p { margin: 0; font-size: clamp(22px, 3vw, 30px); }
.promise .price { color: var(--saffron); text-shadow: 2px 2px 0 var(--ink); font-size: clamp(34px, 5vw, 52px); }

/* ---------- Pages de texte ---------- */

.page { padding: clamp(28px, 5vw, 56px) 0 clamp(40px, 7vw, 76px); }
.page h1 { font-weight: normal; font-size: clamp(36px, 6vw, 56px); margin: 0 0 6px; line-height: 1.05; }
.page h2 { font-weight: normal; font-size: 30px; margin: 34px 0 10px; }
.page p, .page li { color: var(--text); max-width: 70ch; }
.page .updated { color: var(--muted); font-size: 17px; }
.panel {
  background: var(--surface); border: 2px solid var(--border);
  box-shadow: 4px 4px 0 var(--border); padding: 18px 20px; margin: 18px 0;
  max-width: 760px;
}
.panel p:first-child { margin-top: 0; }
.panel p:last-child { margin-bottom: 0; }
.mail { font-size: 26px; }

details {
  background: var(--surface); border: 2px solid var(--border);
  margin: 10px 0; max-width: 760px;
}
details summary { cursor: pointer; padding: 12px 16px; font-size: 22px; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+ "; color: var(--accent); }
details[open] summary::before { content: "− "; }
details > div { padding: 0 16px 14px; color: var(--text-2); }
details > div p { margin: 0 0 8px; }

dl.legal { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; max-width: 760px; }
dl.legal dt { color: var(--text-2); }
dl.legal dd { margin: 0; }
.todo { background: var(--saffron); color: var(--ink); padding: 0 6px; }

/* ---------- Pied ---------- */

footer {
  background: var(--chrome); border-top: 2px solid var(--border);
  padding: 28px 0 36px; color: var(--text-2); font-size: 17px;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer a { color: var(--text-2); }
footer .credits { width: 100%; font-size: 15px; color: var(--muted); }

/* ---------- Petits écrans ---------- */

@media (max-width: 760px) {
  body { font-size: 19px; }
  .topbar .wrap { gap: 8px; min-height: 54px; }
  /* Deux points par pixel d'art : plus de monde visible, toujours net. */
  .hero { background-size: 960px auto; }
  .nav { flex-wrap: nowrap; gap: 2px; }
  .nav a { font-size: 18px; padding: 3px 7px; }
  .hero .wrap { grid-template-columns: 1fr; text-align: left; }
  .hero .phone { width: min(260px, 70vw); }
  .brand span { display: none; }
  dl.legal { grid-template-columns: 1fr; }
  dl.legal dd { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
