/* ————————————————————————————————————————————————
   BIBIFLY — feuille de style
   Palette tirée du logo : violet profond, jaune soleil, bleu ciel.
   Titres : Fredoka (arrondie comme le logo) · Texte : Nunito.
   ———————————————————————————————————————————————— */

:root {
  --violet-950: #14032e;
  --violet-900: #2a0757;
  --violet-800: #3f0c82;
  --violet-700: #5414b0;
  --violet-600: #6e22d9;
  --violet-500: #8b45f0;
  --violet-200: #d9c6ff;
  --violet-100: #efe6ff;
  --yellow-300: #ffe066;
  --yellow-400: #ffd21f;
  --yellow-500: #ffc400;
  --orange-500: #ff9500;
  --sky-500: #1ea7f2;
  --sky-400: #4fc3f7;
  --sky-100: #dff4fe;
  --mint-600: #05875c;
  --coral-600: #d61f45;

  /* jetons sémantiques (thème clair) */
  --bg: #f6f2ff;
  --bg-glow-1: rgba(139, 69, 240, 0.10);
  --bg-glow-2: rgba(79, 195, 247, 0.12);
  --surface: #ffffff;
  --surface-2: #f3eefc;
  --surface-3: #e9e1f9;
  --ink: #1d0b3a;
  --ink-2: #463766;
  --ink-3: #64588a;
  --line: #e4daf6;
  --line-strong: #cbbbec;
  --brand: var(--violet-700);
  --brand-ink: #ffffff;
  --focus: #8b45f0;
  --cta-1: #ffde3d;
  --cta-2: #ffb700;
  --cta-ink: #2a0757;
  --shadow-1: 0 1px 2px rgba(42, 7, 87, 0.06), 0 4px 14px -6px rgba(42, 7, 87, 0.12);
  --shadow-2: 0 2px 6px rgba(42, 7, 87, 0.06), 0 22px 50px -24px rgba(42, 7, 87, 0.38);
  --shadow-3: 0 30px 90px -30px rgba(42, 7, 87, 0.55);

  /* niveaux de prix : fond doux + texte foncé (contraste ≥ 4,5:1) + barre saturée */
  --lv0-bg: #d8f6ea; --lv0-ink: #05603f; --lv0-bar: #12b886;
  --lv1-bg: #e8f6d1; --lv1-ink: #3a5f10; --lv1-bar: #74c043;
  --lv2-bg: #fff2c2; --lv2-ink: #6e4d00; --lv2-bar: #ffc400;
  --lv3-bg: #ffe3c9; --lv3-ink: #823600; --lv3-bar: #ff8f1f;
  --lv4-bg: #ffdde4; --lv4-ink: #94102e; --lv4-bar: #ff4d6a;

  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 28px;
  --font-title: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --wrap: 1180px;
  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #0f0424;
  --bg-glow-1: rgba(139, 69, 240, 0.18);
  --bg-glow-2: rgba(30, 167, 242, 0.10);
  --surface: #1b0a3a;
  --surface-2: #241050;
  --surface-3: #2f1663;
  --ink: #f6f1ff;
  --ink-2: #d5c8f2;
  --ink-3: #ad9fd6;
  --line: #34205f;
  --line-strong: #4b3384;
  --brand: #b48cff;
  --brand-ink: #14032e;
  --focus: #c4a3ff;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px -6px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.3), 0 22px 50px -24px rgba(0, 0, 0, 0.8);
  --shadow-3: 0 30px 90px -30px rgba(0, 0, 0, 0.9);
  --lv0-bg: #0c3b2c; --lv0-ink: #8ff0c8;
  --lv1-bg: #26391a; --lv1-ink: #c5ec97;
  --lv2-bg: #3f3209; --lv2-ink: #ffe27a;
  --lv3-bg: #45260d; --lv3-ink: #ffc08a;
  --lv4-bg: #4a1222; --lv4-ink: #ffadbd;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0f0424;
    --bg-glow-1: rgba(139, 69, 240, 0.18);
    --bg-glow-2: rgba(30, 167, 242, 0.10);
    --surface: #1b0a3a;
    --surface-2: #241050;
    --surface-3: #2f1663;
    --ink: #f6f1ff;
    --ink-2: #d5c8f2;
    --ink-3: #ad9fd6;
    --line: #34205f;
    --line-strong: #4b3384;
    --brand: #b48cff;
    --brand-ink: #14032e;
    --focus: #c4a3ff;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px -6px rgba(0, 0, 0, 0.5);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.3), 0 22px 50px -24px rgba(0, 0, 0, 0.8);
    --shadow-3: 0 30px 90px -30px rgba(0, 0, 0, 0.9);
    --lv0-bg: #0c3b2c; --lv0-ink: #8ff0c8;
    --lv1-bg: #26391a; --lv1-ink: #c5ec97;
    --lv2-bg: #3f3209; --lv2-ink: #ffe27a;
    --lv3-bg: #45260d; --lv3-ink: #ffc08a;
    --lv4-bg: #4a1222; --lv4-ink: #ffadbd;
    color-scheme: dark;
  }
}

/* ———————————————————— base ———————————————————— */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% 40%, var(--bg-glow-1), transparent 60%),
    radial-gradient(900px 500px at 95% 70%, var(--bg-glow-2), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-title); line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--yellow-400); color: var(--violet-900); padding: 10px 16px; border-radius: 12px; font-weight: 800; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }
.tnum { font-variant-numeric: tabular-nums; }

/* ———————————————————— barre du haut ———————————————————— */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--violet-950) 78%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar__inner { max-width: var(--wrap); margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand__logo { height: 44px; width: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35)); }
.brand__name { font-family: var(--font-title); font-weight: 700; font-size: 1.35rem; letter-spacing: 0.02em; }
.brand__name span { color: var(--yellow-400); }
.topnav { display: flex; gap: 4px; margin-left: 8px; }
.topnav a { color: rgba(255, 255, 255, 0.82); text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 999px; transition: background 0.2s, color 0.2s; }
.topnav a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 14px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); color: #fff;
  transition: background 0.2s, transform 0.2s var(--ease-spring);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-1px); }
.icon-btn .ic { width: 20px; height: 20px; }
.modal .icon-btn, .sheet .icon-btn { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.source-pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff; font-weight: 700; font-size: 0.9rem;
}
.source-pill__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow-400); box-shadow: 0 0 0 4px rgba(255, 210, 31, 0.2); }
.source-pill[data-real='true'] .source-pill__dot { background: #2ee6a6; box-shadow: 0 0 0 4px rgba(46, 230, 166, 0.22); }

/* ———————————————————— héros ———————————————————— */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  background: linear-gradient(180deg, var(--violet-950) 0%, var(--violet-900) 30%, var(--violet-700) 62%, #7d3cf0 80%, var(--sky-400) 118%);
  padding: 56px 20px 150px;
}
.sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sky__stars {
  position: absolute; inset: 0 0 40% 0; opacity: 0.85;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent 60%), radial-gradient(1px 1px at 22% 42%, #fff, transparent 60%),
    radial-gradient(1.5px 1.5px at 35% 12%, #ffe9a6, transparent 60%), radial-gradient(1px 1px at 48% 30%, #fff, transparent 60%),
    radial-gradient(2px 2px at 62% 16%, #fff, transparent 60%), radial-gradient(1px 1px at 74% 38%, #fff, transparent 60%),
    radial-gradient(1.5px 1.5px at 86% 10%, #ffe9a6, transparent 60%), radial-gradient(1px 1px at 92% 34%, #fff, transparent 60%),
    radial-gradient(1px 1px at 6% 52%, #fff, transparent 60%), radial-gradient(1.5px 1.5px at 56% 50%, #fff, transparent 60%);
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.55; } to { opacity: 1; } }
.cloud {
  position: absolute; border-radius: 999px; background: #fff; opacity: 0.9;
  filter: drop-shadow(0 10px 20px rgba(42, 7, 87, 0.25));
  animation: drift linear infinite;
}
.cloud::before, .cloud::after { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.cloud--1 { width: 220px; height: 54px; bottom: 70px; left: -240px; animation-duration: 70s; }
.cloud--1::before { width: 90px; height: 90px; top: -46px; left: 34px; }
.cloud--1::after { width: 120px; height: 110px; top: -66px; left: 90px; }
.cloud--2 { width: 160px; height: 40px; bottom: 150px; left: -200px; opacity: 0.55; animation-duration: 95s; animation-delay: -40s; }
.cloud--2::before { width: 70px; height: 70px; top: -36px; left: 24px; }
.cloud--2::after { width: 86px; height: 80px; top: -48px; left: 66px; }
.cloud--3 { width: 280px; height: 64px; bottom: 30px; left: -300px; animation-duration: 120s; animation-delay: -70s; }
.cloud--3::before { width: 110px; height: 110px; top: -56px; left: 40px; }
.cloud--3::after { width: 150px; height: 130px; top: -80px; left: 110px; }
.cloud--4 { width: 130px; height: 34px; bottom: 210px; left: -160px; opacity: 0.4; animation-duration: 80s; animation-delay: -15s; }
.cloud--4::before { width: 56px; height: 56px; top: -28px; left: 18px; }
.cloud--4::after { width: 70px; height: 64px; top: -38px; left: 52px; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(calc(100vw + 600px)); } }
.sky__trail { position: absolute; inset: auto 0 40px 0; width: 100%; height: 70%; }
.sky__trail path { fill: none; stroke: rgba(255, 210, 31, 0.55); stroke-width: 3; stroke-dasharray: 2 14; stroke-linecap: round; animation: dash 30s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -800; } }
.hero__visual { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 0.8s; }
.hero__visual.is-on { opacity: 0.55; mix-blend-mode: soft-light; }
.hero__inner { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); font-weight: 800; font-size: 0.9rem; color: var(--yellow-300);
}
.hero h1 { font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 700; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--yellow-400); position: relative; white-space: nowrap; }
.hero h1 em::after {
  content: ''; position: absolute; left: 2%; right: 2%; bottom: -0.08em; height: 0.16em; border-radius: 99px;
  background: linear-gradient(90deg, var(--sky-400), var(--yellow-400)); opacity: 0.9;
}
.hero__lead { font-size: 1.15rem; max-width: 36em; margin: 20px 0 24px; color: rgba(255, 255, 255, 0.88); }
.hero__chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hero__chips li {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 0.92rem;
  background: rgba(20, 3, 46, 0.35); border: 1px solid rgba(255, 255, 255, 0.18);
}
.hero__chips .ic { color: var(--yellow-400); }
.hero__mascot { display: grid; place-items: center; }
.hero__logo {
  width: min(100%, 520px); height: auto;
  filter: drop-shadow(0 30px 40px rgba(20, 3, 46, 0.55));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-14px) rotate(1.5deg); }
}

/* ———————————————————— formulaire ———————————————————— */
.search-wrap { max-width: var(--wrap); margin: -110px auto 0; padding: 0 20px; position: relative; z-index: 5; }
.search {
  background: var(--surface); border-radius: var(--radius-l); padding: 22px; box-shadow: var(--shadow-3);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  display: grid; gap: 18px;
}
.search__row--top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.search__row--route { display: grid; grid-template-columns: 1fr auto 1fr 0.95fr; gap: 10px; align-items: stretch; }

.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.seg__opt { position: relative; }
.seg__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg__opt span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 10px;
  font-weight: 700; color: var(--ink-2); transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.seg__opt input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg__opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.seg__opt:hover span { color: var(--ink); }
.seg--small .seg__opt span { min-height: 36px; padding: 0 12px; font-size: 0.92rem; }

.select { position: relative; display: inline-flex; align-items: center; }
.select select {
  appearance: none; min-height: 48px; padding: 0 40px 0 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface-2); font-weight: 700; cursor: pointer;
}
.select .ic { position: absolute; right: 12px; pointer-events: none; color: var(--ink-3); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; color: var(--ink-2); position: relative; min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 44px; height: 26px; margin: 0; cursor: pointer; }
.switch__track { width: 44px; height: 26px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-strong); position: relative; transition: background 0.25s; flex: none; }
.switch__track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: transform 0.3s var(--ease-spring);
}
.switch input:checked + .switch__track { background: var(--violet-600); border-color: var(--violet-600); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch small { display: block; font-weight: 600; color: var(--ink-3); }

.field { position: relative; display: flex; flex-direction: column; justify-content: center; background: var(--surface-2); border: 2px solid transparent; border-radius: var(--radius-m); padding: 10px 16px; min-height: 72px; transition: border-color 0.2s, background 0.2s; }
.field:focus-within { border-color: var(--violet-500); background: var(--surface); }
.field__label { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.field__label .ic { color: var(--violet-500); }
.field__input { border: 0; background: transparent; padding: 2px 0 0; font-size: 1.12rem; font-weight: 800; width: 100%; outline: none; min-width: 0; }
.field--place .field__input { padding-right: 56px; text-overflow: ellipsis; }
.field__sub { font-size: 0.8rem; font-weight: 700; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 56px; }
.field__sub:empty { display: none; }
.field__btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field__input::placeholder { color: var(--ink-3); font-weight: 600; opacity: 0.8; }
.field__code {
  position: absolute; right: 14px; top: 50%; transform: translateY(-20%); font-family: var(--font-title); font-weight: 700;
  font-size: 0.82rem; padding: 3px 8px; border-radius: 8px; background: var(--violet-100); color: var(--violet-800);
}
:root[data-theme='dark'] .field__code { background: var(--surface-3); color: var(--violet-200); }
.field__code:empty { display: none; }
.field__btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; cursor: pointer; }
.field__btn .ic { color: var(--ink-3); }
.swap {
  align-self: center; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface);
  display: grid; place-items: center; color: var(--violet-600); box-shadow: var(--shadow-1);
  transition: transform 0.4s var(--ease-spring), border-color 0.2s;
}
.swap:hover { transform: rotate(180deg); border-color: var(--violet-500); }

.ac {
  position: absolute; z-index: 30; left: -2px; right: -2px; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow-2);
  max-height: 340px; overflow: auto; min-width: 300px;
}
.ac li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.ac li[aria-selected='true'], .ac li:hover { background: var(--surface-2); }
.ac__code { font-family: var(--font-title); font-weight: 700; min-width: 46px; text-align: center; padding: 4px 6px; border-radius: 8px; background: var(--violet-100); color: var(--violet-800); font-size: 0.85rem; }
:root[data-theme='dark'] .ac__code { background: var(--surface-3); color: var(--violet-200); }
.ac__text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ac__text strong { font-weight: 800; }
.ac__text small { color: var(--ink-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac__empty { color: var(--ink-3); padding: 12px; }

.pop {
  position: absolute; z-index: 30; right: 0; top: calc(100% + 8px); width: min(360px, 92vw); padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow-2);
  display: grid; gap: 10px;
}
.pop__note { margin: 4px 0 0; font-size: 0.86rem; color: var(--ink-3); }
.pop__note.is-warn { color: var(--coral-600); font-weight: 700; }
.pop__done { justify-self: end; }
.pax { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 6px 0; }
.pax__avatar { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }
.pax__avatar .ic { width: 22px; height: 22px; }
.pax__avatar--adult { background: var(--violet-100); color: var(--violet-700); }
.pax__avatar--child { background: #fff3c2; color: #8a5a00; }
.pax__avatar--baby { background: var(--sky-100); color: #0b6b9e; }
.pax__text { display: flex; flex-direction: column; line-height: 1.25; }
.pax__text small { color: var(--ink-3); font-weight: 600; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface);
  display: grid; place-items: center; color: var(--violet-700); transition: background 0.2s, transform 0.15s;
}
:root[data-theme='dark'] .stepper button { color: var(--violet-200); }
.stepper button:hover:not(:disabled) { background: var(--surface-2); }
.stepper button:active:not(:disabled) { transform: scale(0.92); }
.stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper output { min-width: 28px; text-align: center; font-family: var(--font-title); font-weight: 700; font-size: 1.2rem; }
.stepper--inline output { min-width: 24px; }
.stepper .unit { color: var(--ink-3); font-weight: 700; margin-right: 2px; }

.ideas { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: -6px; }
.ideas__label { font-weight: 800; color: var(--ink-3); font-size: 0.88rem; margin-right: 4px; }
.idea {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px dashed var(--line-strong); background: transparent; font-weight: 700; font-size: 0.9rem; color: var(--ink-2);
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease-spring);
}
.idea:hover { background: var(--surface-2); border-style: solid; border-color: var(--violet-500); transform: translateY(-2px); }

.when { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; min-width: 0; }
.when__title { font-family: var(--font-title); font-size: 1.25rem; font-weight: 700; padding: 0; margin-bottom: 4px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--surface); font-weight: 800; color: var(--ink-2);
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.2s var(--ease-spring);
}
.tab:hover { border-color: var(--violet-200); color: var(--ink); }
.tab[aria-selected='true'] { border-color: var(--violet-600); background: var(--violet-600); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px -12px var(--violet-600); }
.panel { display: grid; gap: 16px; padding: 18px; border-radius: var(--radius-m); background: var(--surface-2); border: 1px solid var(--line); animation: fadeUp 0.35s var(--ease-out); }
.panel__block { display: grid; gap: 10px; min-width: 0; }
.panel__grid { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.mini-label { margin: 0; font-size: 0.82rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.mini-label small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.inline-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hint { margin: 0; font-size: 0.9rem; color: var(--ink-3); }
.hint strong { color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface);
  font-weight: 800; color: var(--ink-2); transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--violet-200); color: var(--ink); }
.chip[aria-checked='true'], .chip[aria-pressed='true'] { background: var(--violet-900); border-color: var(--violet-900); color: #fff; }
:root[data-theme='dark'] .chip[aria-checked='true'], :root[data-theme='dark'] .chip[aria-pressed='true'] { background: var(--violet-200); border-color: var(--violet-200); color: var(--violet-950); }
.chip .badge-sugg { font-size: 0.7rem; background: var(--yellow-400); color: var(--violet-900); padding: 1px 6px; border-radius: 99px; }
.periods { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
.period {
  flex: 0 0 auto; scroll-snap-align: start; min-width: 190px; text-align: left; padding: 14px 16px; border-radius: 16px;
  border: 2px solid var(--line); background: var(--surface); display: grid; gap: 4px; position: relative;
  transition: border-color 0.2s, transform 0.25s var(--ease-spring), box-shadow 0.2s;
}
.period:hover { transform: translateY(-3px); box-shadow: var(--shadow-1); }
.period[aria-checked='true'] { border-color: var(--violet-600); box-shadow: 0 12px 28px -16px var(--violet-600); }
.period[aria-checked='true']::after {
  content: ''; position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--violet-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.period__name { font-family: var(--font-title); font-weight: 600; font-size: 1.05rem; padding-right: 26px; }
.period__dates { font-weight: 700; color: var(--ink-2); font-size: 0.92rem; }
.period__meta { font-size: 0.82rem; color: var(--ink-3); font-weight: 700; }
.period__meta .soon { color: var(--mint-600); }
.periods__empty { color: var(--ink-3); margin: 0; }
.date-field { display: grid; gap: 6px; }
.date-field input { min-height: 48px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 700; }

.alt { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 18px; border-radius: var(--radius-m); border: 1px dashed var(--line-strong); }
.alt__opts { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.alt.is-off .alt__opts { opacity: 0.4; pointer-events: none; }
.form-error { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--lv4-bg); color: var(--lv4-ink); font-weight: 800; }

/* ———————————————————— boutons ———————————————————— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 20px;
  border-radius: 14px; border: 2px solid transparent; font-weight: 800; text-decoration: none; white-space: nowrap;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn--cta {
  min-height: 64px; font-family: var(--font-title); font-size: 1.25rem; font-weight: 700; color: var(--cta-ink);
  background: linear-gradient(180deg, var(--cta-1), var(--cta-2)); border-radius: var(--radius-m);
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.6) inset, 0 -3px 0 rgba(0, 0, 0, 0.08) inset, 0 18px 34px -16px rgba(255, 170, 0, 0.9);
}
.btn--cta:hover { transform: translateY(-2px); box-shadow: 0 2px 0 rgba(255, 255, 255, 0.6) inset, 0 -3px 0 rgba(0, 0, 0, 0.08) inset, 0 24px 40px -16px rgba(255, 170, 0, 1); }
.btn--cta .ic { width: 24px; height: 24px; }
.btn--cta[aria-busy='true'] { pointer-events: none; opacity: 0.85; }
.btn--primary { background: var(--violet-700); color: #fff; }
.btn--primary:hover { background: var(--violet-600); transform: translateY(-1px); }
.btn--yellow { background: linear-gradient(180deg, var(--cta-1), var(--cta-2)); color: var(--cta-ink); }
.btn--yellow:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -12px rgba(255, 170, 0, 0.9); }
.btn--ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--violet-500); }
.btn--glass { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.btn--glass:hover { background: rgba(255, 255, 255, 0.2); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 0.92rem; }

/* ———————————————————— résultats ———————————————————— */
.results { max-width: var(--wrap); margin: 0 auto; padding: 40px 20px 20px; outline: none; }
.results:empty { display: none; }
.r-section { margin-top: 44px; animation: fadeUp 0.5s var(--ease-out) both; }
.r-section:first-child { margin-top: 0; }
.r-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.r-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; display: flex; align-items: center; gap: 10px; }
.r-head h2 .ic { color: var(--violet-500); }
.r-head p { margin: 4px 0 0; color: var(--ink-3); font-weight: 600; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radius-m); margin-bottom: 18px;
  background: color-mix(in srgb, var(--yellow-400) 18%, var(--surface)); border: 1px solid color-mix(in srgb, var(--yellow-500) 45%, transparent);
  color: var(--ink); font-weight: 600;
}
.notice .ic { color: #b37b00; margin-top: 2px; }
.notice button { background: none; border: 0; padding: 0; font-weight: 800; color: var(--brand); text-decoration: underline; }

/* — chargement — */
.loading { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 40px 20px 60px; }
.loading__mascot {
  width: min(300px, 70vw); height: auto; animation: float 2.4s ease-in-out infinite;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent);
}
.loading__title { font-family: var(--font-title); font-size: 1.6rem; font-weight: 700; margin: 0; }
.loading__msg { margin: 0; color: var(--ink-3); font-weight: 700; min-height: 1.6em; }
.loading__bar { width: min(420px, 80vw); height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; position: relative; }
.loading__bar::after {
  content: ''; position: absolute; inset: 0; width: 40%; border-radius: inherit;
  background: linear-gradient(90deg, var(--violet-500), var(--sky-400), var(--yellow-400));
  animation: bar 1.2s var(--ease-out) infinite;
}
@keyframes bar { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.skeleton { display: grid; gap: 14px; width: 100%; max-width: var(--wrap); }
.skeleton div { height: 90px; border-radius: var(--radius-m); background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* — erreur — */
.oops { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 30px 20px; }
.oops img { width: 200px; filter: grayscale(0.3); }
.oops h2 { font-size: 1.5rem; }
.oops p { margin: 0; color: var(--ink-2); font-weight: 600; max-width: 40em; }

/* — le bon plan — */
.best {
  position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius-l); color: #fff; padding: 30px;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(79, 195, 247, 0.35), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(255, 210, 31, 0.18), transparent 60%),
    linear-gradient(135deg, var(--violet-900), var(--violet-700) 60%, #7a33ee);
  box-shadow: var(--shadow-3);
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px;
}
.best__mascot {
  position: absolute; right: -40px; top: -30px; width: 330px; opacity: 0.18; z-index: -1; transform: rotate(8deg);
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent);
}
.best__tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--yellow-400); color: var(--violet-900);
  font-weight: 800; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.best__route { margin: 14px 0 6px; font-family: var(--font-title); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.best__route .ic { color: var(--yellow-400); }
.best__route small, .trip-head h2 small { font-family: var(--font-body); font-size: 0.5em; font-weight: 800; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.16); vertical-align: middle; }
.best__dates { font-weight: 700; font-size: 1.1rem; color: rgba(255, 255, 255, 0.9); margin: 0 0 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-weight: 800; font-size: 0.84rem;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.badge .ic { width: 15px; height: 15px; }
.badge--glass { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.22); }
.badge--good { background: var(--lv0-bg); color: var(--lv0-ink); border-color: transparent; }
.badge--warn { background: var(--lv3-bg); color: var(--lv3-ink); border-color: transparent; }
.badge--sim { background: var(--yellow-400); color: var(--violet-900); border-color: transparent; }
.best__price { align-self: center; justify-self: end; text-align: right; display: grid; gap: 4px; }
.best__amount { font-family: var(--font-title); font-weight: 700; font-size: clamp(2.8rem, 6vw, 4.2rem); line-height: 1; color: var(--yellow-400); text-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); }
.best__for { font-weight: 700; color: rgba(255, 255, 255, 0.85); }
.best__unit { font-size: 0.9rem; color: rgba(255, 255, 255, 0.75); font-weight: 600; }
.best__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gauge { grid-column: 1 / -1; display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--radius-m); background: rgba(20, 3, 46, 0.35); border: 1px solid rgba(255, 255, 255, 0.14); }
.gauge__top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-weight: 700; }
.gauge__top strong { color: var(--yellow-300); }
.gauge__bar { position: relative; height: 12px; border-radius: 99px; background: linear-gradient(90deg, var(--lv0-bar), var(--lv1-bar), var(--lv2-bar), var(--lv3-bar), var(--lv4-bar)); }
.gauge__pin {
  position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--violet-900);
  transform: translate(-50%, -50%); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); transition: left 1s var(--ease-out);
}
.gauge__legend { display: flex; justify-content: space-between; font-size: 0.8rem; color: rgba(255, 255, 255, 0.72); font-weight: 700; }

.sparkle { position: absolute; width: 10px; height: 10px; pointer-events: none; z-index: 3; }
.sparkle::before, .sparkle::after { content: ''; position: absolute; inset: 0; background: var(--yellow-300); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.sparkle { animation: pop 1.1s var(--ease-out) forwards; }
@keyframes pop { 0% { transform: scale(0) rotate(0); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1.4) rotate(120deg); opacity: 0; } }

/* — autres suggestions — */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card {
  text-align: left; display: grid; gap: 8px; padding: 18px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-1); transition: transform 0.25s var(--ease-spring), box-shadow 0.25s, border-color 0.2s; position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--violet-200); }
.card__kind { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--violet-600); }
:root[data-theme='dark'] .card__kind { color: var(--violet-200); }
.card__price { font-family: var(--font-title); font-weight: 700; font-size: 1.9rem; line-height: 1; }
.card__price small { font-family: var(--font-body); font-size: 0.85rem; font-weight: 700; color: var(--ink-3); }
.card__dates { font-weight: 800; }
.card__meta { color: var(--ink-3); font-weight: 600; font-size: 0.92rem; }
.card__diff { font-weight: 800; font-size: 0.86rem; }
.card__diff.plus { color: var(--lv3-ink); }
.card__diff.minus { color: var(--lv0-ink); }

/* — calendrier — */
.cal-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.85rem; font-weight: 700; color: var(--ink-3); }
.legend i { width: 28px; height: 12px; border-radius: 4px; display: inline-block; }
.cal-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.month { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px; box-shadow: var(--shadow-1); }
.month h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 12px; text-transform: capitalize; }
.month__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.month__dow { text-align: center; font-size: 0.75rem; font-weight: 800; color: var(--ink-3); text-transform: uppercase; padding-bottom: 2px; }
.day {
  position: relative; aspect-ratio: 1 / 1.02; min-height: 48px; border-radius: 12px; border: 2px solid transparent; padding: 4px 2px 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; background: var(--surface-2); color: var(--ink-3);
  font-weight: 700; transition: transform 0.2s var(--ease-spring), border-color 0.2s, box-shadow 0.2s;
}
.day__n { font-size: 0.82rem; }
.day__p { font-size: 0.78rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.day.is-off { opacity: 0.45; background: transparent; border: 1px dashed var(--line); }
.day.is-holiday::before { content: ''; position: absolute; left: 4px; right: 4px; top: -5px; height: 3px; border-radius: 2px; background: var(--sky-400); }
.day[data-lv] { cursor: pointer; }
.day[data-lv]::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: 3px; height: 3px; border-radius: 2px; background: var(--bar); }
.day[data-lv]:hover { transform: translateY(-2px) scale(1.04); box-shadow: var(--shadow-1); z-index: 2; }
.day[aria-pressed='true'] { border-color: var(--violet-700); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet-500) 30%, transparent); }
:root[data-theme='dark'] .day[aria-pressed='true'] { border-color: var(--violet-200); }
.day__star { position: absolute; top: -7px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--yellow-400); color: var(--violet-900); display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); }
.day__star .ic { width: 12px; height: 12px; fill: currentColor; stroke-width: 1.5; }
.day__moon { position: absolute; top: 3px; left: 4px; width: 11px; height: 11px; color: var(--violet-500); }
.lv0 { background: var(--lv0-bg); color: var(--lv0-ink); --bar: var(--lv0-bar); }
.lv1 { background: var(--lv1-bg); color: var(--lv1-ink); --bar: var(--lv1-bar); }
.lv2 { background: var(--lv2-bg); color: var(--lv2-ink); --bar: var(--lv2-bar); }
.lv3 { background: var(--lv3-bg); color: var(--lv3-ink); --bar: var(--lv3-bar); }
.lv4 { background: var(--lv4-bg); color: var(--lv4-ink); --bar: var(--lv4-bar); }

.cal-layout > *, .cal-wrap > *, .best > *, .search > *, .panel > *, .r-section > * { min-width: 0; }
.cal-layout.is-single { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 18px; align-items: start; }
.cal-layout.is-single .cal-wrap { grid-template-columns: 1fr; }
.cal-layout.is-single .returns { margin-top: 0; }
.cal-layout.is-single .ret-list { flex-wrap: wrap; overflow: visible; }
.returns { margin-top: 18px; padding: 18px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.returns h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.returns p { margin: 0 0 12px; color: var(--ink-3); font-weight: 600; }
.ret-list { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 10px; scroll-snap-type: x mandatory; }
.ret {
  flex: 0 0 auto; scroll-snap-align: start; min-width: 132px; border-radius: 16px; border: 2px solid transparent; padding: 12px 14px; text-align: left;
  display: grid; gap: 2px; transition: transform 0.2s var(--ease-spring), box-shadow 0.2s; position: relative;
}
.ret:hover { transform: translateY(-3px); box-shadow: var(--shadow-1); }
.ret strong { font-family: var(--font-title); font-size: 1.25rem; font-weight: 700; }
.ret span { font-weight: 700; font-size: 0.86rem; }
.ret small { font-weight: 700; opacity: 0.8; }

/* — grille aller × retour — */
.matrix-wrap { overflow: auto; border-radius: var(--radius-l); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-1); max-height: 560px; }
.matrix { border-collapse: separate; border-spacing: 4px; font-variant-numeric: tabular-nums; }
.matrix th { position: sticky; background: var(--surface); font-size: 0.78rem; font-weight: 800; color: var(--ink-3); padding: 6px; white-space: nowrap; z-index: 1; }
.matrix thead th { top: 0; }
.matrix tbody th { left: 0; text-align: right; }
.matrix thead th:first-child { left: 0; z-index: 2; }
.matrix td { padding: 0; }
.matrix td button { width: 64px; height: 40px; border-radius: 10px; border: 2px solid transparent; font-weight: 800; font-size: 0.8rem; transition: transform 0.15s; }
.matrix td button:hover { transform: scale(1.08); border-color: var(--violet-500); }
.matrix td button.is-best { box-shadow: 0 0 0 3px var(--yellow-400); }
.matrix td.empty { width: 64px; height: 40px; }

/* — aéroports — */
.airports { display: grid; gap: 10px; }
.ap {
  display: grid; grid-template-columns: 1.4fr 2fr auto; gap: 16px; align-items: center; padding: 16px 18px; text-align: left; width: 100%;
  border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  transition: transform 0.2s var(--ease-spring), border-color 0.2s;
}
.ap:hover { transform: translateY(-2px); border-color: var(--violet-200); }
.ap.is-main { border: 2px solid var(--violet-500); }
.ap.is-winner { border: 2px solid var(--lv0-bar); }
.ap__name { display: grid; gap: 2px; }
.ap__name strong { font-weight: 800; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ap__name small { color: var(--ink-3); font-weight: 700; }
.ap__bars { display: grid; gap: 6px; }
.ap__bar { height: 14px; border-radius: 99px; background: var(--surface-2); overflow: hidden; display: flex; }
.ap__bar i { display: block; height: 100%; }
.ap__bar .flight { background: linear-gradient(90deg, var(--violet-600), var(--violet-500)); }
.ap__bar .ground { background: repeating-linear-gradient(135deg, var(--sky-400) 0 6px, var(--sky-500) 6px 12px); }
.ap__detail { font-size: 0.85rem; color: var(--ink-3); font-weight: 700; display: flex; gap: 12px; flex-wrap: wrap; }
.ap__detail span { display: inline-flex; align-items: center; gap: 4px; }
.ap__net { text-align: right; display: grid; gap: 4px; justify-items: end; }
.ap__net strong { font-family: var(--font-title); font-size: 1.4rem; font-weight: 700; }
.ap-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.85rem; font-weight: 700; color: var(--ink-3); }
.ap-legend i { display: inline-block; width: 22px; height: 10px; border-radius: 99px; margin-right: 6px; vertical-align: middle; }

/* ———————————————————— itinéraire (feuille latérale) ———————————————————— */
dialog { color: var(--ink); }
dialog::backdrop { background: rgba(14, 3, 34, 0.55); backdrop-filter: blur(4px); }
.sheet {
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(560px, 100vw); max-width: 100vw; padding: 0; border: 0;
  background: var(--bg); box-shadow: var(--shadow-3);
}
.sheet[open] { animation: slideIn 0.4s var(--ease-out); }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet__inner { padding: 0 0 30px; }
.trip-head {
  position: sticky; top: 0; z-index: 2; padding: 20px 22px 18px; color: #fff;
  background: linear-gradient(135deg, var(--violet-900), var(--violet-700));
}
.trip-head__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.trip-head h2 { font-size: 1.5rem; font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.trip-head h2 .ic { color: var(--yellow-400); }
.trip-head p { margin: 6px 0 0; color: rgba(255, 255, 255, 0.85); font-weight: 700; }
.trip-head .icon-btn { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.2); color: #fff; }
.trip-body { padding: 18px 22px; display: grid; gap: 18px; }
.ribbon { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; font-weight: 700; font-size: 0.9rem; background: color-mix(in srgb, var(--yellow-400) 22%, var(--surface)); }
.ribbon .ic { color: #b37b00; flex: none; margin-top: 2px; }
.ribbon--live { background: var(--lv0-bg); color: var(--lv0-ink); }
.ribbon--live .ic { color: inherit; }
.leg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px; box-shadow: var(--shadow-1); }
.leg__title { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.leg__title h3 { font-size: 1.15rem; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.leg__title h3 .ic { color: var(--violet-500); }
.leg__title span { font-weight: 800; color: var(--ink-3); font-size: 0.9rem; }
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl__stop { display: grid; grid-template-columns: 62px 22px 1fr; gap: 10px; align-items: start; }
.tl__time { font-family: var(--font-title); font-weight: 700; font-size: 1.15rem; text-align: right; line-height: 1.2; }
.tl__time small { display: block; font-family: var(--font-body); font-size: 0.72rem; color: var(--coral-600); font-weight: 800; }
.tl__dot { width: 16px; height: 16px; border-radius: 50%; border: 4px solid var(--violet-600); background: var(--surface); margin: 3px auto 0; position: relative; z-index: 1; }
.tl__place strong { display: block; font-weight: 800; }
.tl__place small { color: var(--ink-3); font-weight: 600; }
.tl__flight { display: grid; grid-template-columns: 62px 22px 1fr; gap: 10px; min-height: 64px; }
.tl__line { width: 3px; margin: 0 auto; background: repeating-linear-gradient(180deg, var(--violet-500) 0 8px, transparent 8px 14px); border-radius: 2px; }
.tl__info { padding: 10px 12px; margin: 6px 0; border-radius: 12px; background: var(--surface-2); font-size: 0.9rem; font-weight: 700; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.tl__info .ic { color: var(--violet-500); }
.tl__info img { width: 20px; height: 20px; border-radius: 4px; }
.tl__layover { display: grid; grid-template-columns: 62px 22px 1fr; gap: 10px; }
.tl__layover .tl__line { background: repeating-linear-gradient(180deg, var(--orange-500) 0 3px, transparent 3px 7px); }
.tl__wait { margin: 6px 0; padding: 10px 12px; border-radius: 12px; background: var(--lv2-bg); color: var(--lv2-ink); font-weight: 800; font-size: 0.9rem; display: flex; gap: 8px; align-items: center; }
.price-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.price-table td { padding: 8px 0; border-bottom: 1px dashed var(--line); font-weight: 700; }
.price-table td:last-child { text-align: right; }
.price-table tr.total td { border: 0; padding-top: 14px; font-family: var(--font-title); font-size: 1.4rem; }
.price-table tr.total td:last-child { color: var(--violet-700); }
:root[data-theme='dark'] .price-table tr.total td:last-child { color: var(--yellow-400); }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px; box-shadow: var(--shadow-1); }
.box h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.box h3 .ic { color: var(--violet-500); }
.box p { margin: 0; color: var(--ink-3); font-weight: 600; font-size: 0.9rem; }
.book { display: grid; gap: 10px; }
.book a {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px;
  text-decoration: none; color: var(--ink); border: 2px solid var(--line); background: var(--surface); transition: transform 0.2s var(--ease-spring), border-color 0.2s;
}
.book a:hover { transform: translateX(4px); border-color: var(--violet-500); }
.book a.is-main { background: linear-gradient(180deg, var(--cta-1), var(--cta-2)); border-color: transparent; color: var(--cta-ink); }
.book__logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-title); font-weight: 700; background: var(--violet-100); color: var(--violet-800); }
.book a.is-main .book__logo { background: rgba(255, 255, 255, 0.6); }
.book strong { display: block; font-weight: 800; }
.book small { color: var(--ink-3); font-weight: 600; }
.book a.is-main small { color: var(--violet-800); }
.trip-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ———————————————————— réglages ———————————————————— */
.modal { width: min(640px, 94vw); max-height: 90dvh; padding: 0; border: 0; border-radius: var(--radius-l); background: var(--bg); box-shadow: var(--shadow-3); }
.modal[open] { animation: fadeUp 0.3s var(--ease-out); }
.modal__inner { padding: 22px; display: grid; gap: 16px; }
.modal__head { display: flex; justify-content: space-between; align-items: center; }
.modal__head h2 { font-size: 1.6rem; font-weight: 700; }
.source { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px; display: grid; gap: 10px; }
.source header { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.source h3 { font-size: 1.1rem; font-weight: 600; }
.source p { margin: 0; color: var(--ink-2); font-weight: 600; font-size: 0.92rem; }
.source ol { margin: 0; padding-left: 20px; color: var(--ink-2); font-weight: 600; font-size: 0.92rem; }
.source input[type='password'], .source input[type='text'] { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-2); font-weight: 700; }
.status { font-size: 0.82rem; font-weight: 800; padding: 4px 10px; border-radius: 99px; }
.status--on { background: var(--lv0-bg); color: var(--lv0-ink); }
.status--off { background: var(--surface-3); color: var(--ink-3); }
.status--err { background: var(--lv4-bg); color: var(--lv4-ink); }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* ———————————————————— comment ça marche ———————————————————— */
.how { max-width: var(--wrap); margin: 70px auto 0; padding: 0 20px; }
.how h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; text-align: center; margin-bottom: 28px; }
.how__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.how__step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px 20px; box-shadow: var(--shadow-1); }
.how__num { position: absolute; top: 14px; right: 16px; font-family: var(--font-title); font-weight: 700; font-size: 2.2rem; color: var(--violet-100); line-height: 1; }
:root[data-theme='dark'] .how__num { color: var(--surface-3); }
.how__art { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, var(--violet-600), var(--sky-400)); color: #fff; margin-bottom: 14px; overflow: hidden; }
.how__art .ic { width: 30px; height: 30px; }
.how__art.has-img { width: 100%; height: 150px; border-radius: 18px; background: var(--surface-2); }
.how__art img { width: 100%; height: 100%; object-fit: cover; }
.how__step h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 6px; }
.how__step p { margin: 0; color: var(--ink-2); font-weight: 500; font-size: 0.95rem; }

.footer { max-width: var(--wrap); margin: 60px auto 0; padding: 26px 20px 40px; display: flex; gap: 14px; align-items: center; color: var(--ink-3); font-weight: 600; font-size: 0.9rem; border-top: 1px solid var(--line); }
.footer p { margin: 0; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; padding: 12px 18px; border-radius: 14px;
  background: var(--violet-900); color: #fff; font-weight: 800; box-shadow: var(--shadow-2); animation: fadeUp 0.3s var(--ease-out);
}

/* ———————————————————— responsive ———————————————————— */
@media (max-width: 1060px) {
  .search__row--route { grid-template-columns: 1fr auto 1fr; }
  .field--pax { grid-column: 1 / -1; }
  .how__steps { grid-template-columns: repeat(2, 1fr); }
  .best { grid-template-columns: 1fr; }
  .best__price { justify-self: start; text-align: left; }
}
@media (max-width: 820px) {
  .cal-layout.is-single { grid-template-columns: 1fr; }
  .cal-layout.is-single .ret-list { flex-wrap: nowrap; overflow-x: auto; }
  .hero { padding: 36px 16px 130px; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__mascot { order: -1; }
  .hero__logo { width: min(78%, 340px); }
  .topnav { display: none; }
  .ap { grid-template-columns: 1fr; }
  .ap__net { text-align: left; justify-items: start; }
}
@media (max-width: 640px) {
  .hero { padding: 22px 16px 120px; }
  .hero__logo { width: min(58%, 230px); }
  .hero h1 { font-size: 2rem; }
  .hero__lead { font-size: 1rem; margin: 12px 0 0; }
  .hero__chips, .eyebrow { display: none; }
  .cloud { transform: scale(0.6); }
  .topbar__inner { padding: 8px 16px; gap: 10px; }
  .brand__name { display: none; }
  .source-pill { padding: 0 12px; font-size: 0.8rem; }
  .search-wrap { padding: 0 12px; }
  .search { padding: 16px; border-radius: 24px; }
  .search__row--route { grid-template-columns: 1fr; }
  .swap { justify-self: end; margin: -26px 12px -26px 0; z-index: 2; transform: rotate(90deg); }
  .swap:hover { transform: rotate(270deg); }
  .results { padding: 30px 12px 10px; }
  .how { padding: 0 12px; }
  .how__steps { grid-template-columns: 1fr; }
  .best { padding: 22px; }
  .cal-wrap { grid-template-columns: 1fr; }
  .month { padding: 12px; }
  .month__grid { gap: 4px; }
  .day { min-height: 42px; border-radius: 10px; }
  .day__p { font-size: 0.68rem; }
  .alt__opts { margin-left: 0; }
  .tab { flex: 1 1 auto; justify-content: center; padding: 0 12px; }
  .sheet { width: 100vw; margin: auto 0 0; height: 94dvh; max-height: 94dvh; border-radius: 24px 24px 0 0; }
  @keyframes slideIn { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .footer { padding: 20px 16px 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .cloud { display: none; }
}

@media print {
  .topbar, .hero, .search-wrap, .how, .footer, .results, .trip-actions, .book { display: none !important; }
  .sheet { position: static; width: 100%; height: auto; max-height: none; box-shadow: none; }
  .trip-head { position: static; }
}
