:root {
  color-scheme: dark;
  --bg: #04100d;
  --bg-2: #07140f;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eafff5;
  --muted: #94aaa0;
  --mint: #74f0a0;
  --orange: #ff8a3d;
  --danger: #ff7a7a;
  --radius: 22px;
  --max: 1140px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(120% 80% at 12% -10%, rgba(116, 240, 160, 0.14), transparent 55%),
    radial-gradient(110% 70% at 92% 0%, rgba(255, 138, 61, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 55%, #030b08);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(116, 240, 160, 0.3); }

.app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* ---------- Top bar ---------- */
.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
  padding: 0 max(20px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(4, 14, 11, 0.7);
  backdrop-filter: blur(18px);
}

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #04130d;
  background: linear-gradient(135deg, var(--mint), var(--orange));
}
.brand-name { font-weight: 800; letter-spacing: -0.02em; font-size: 18px; }

.topnav { display: flex; gap: 4px; }
.topnav button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 14.5px;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.topnav button:hover { color: var(--text); }
.topnav button.active { color: var(--text); background: var(--surface-2); }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.cta-mini {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  font-size: 14px;
  color: #04130d;
  background: linear-gradient(135deg, var(--mint), var(--orange));
  cursor: pointer;
}

/* ---------- Stage / views ---------- */
.stage {
  flex: 1 1 auto;
  min-height: 58dvh;
}

.view {
  display: none;
  padding: 14px 0 24px;
}
.view.active {
  display: block;
  animation: view-fade 0.22s ease;
}

.view-inner {
  width: min(var(--max), calc(100vw - 40px));
  margin: 0 auto;
  padding: 28px 0;
}
.view-inner.scrollable {
  max-height: none;
  overflow: visible;
  align-self: auto;
  padding: 28px 0 32px;
}

@keyframes view-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Home ---------- */
.home {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(116, 240, 160, 0.16);
}
h1 {
  margin: 18px 0 0;
  font-size: clamp(42px, 6.4vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.accent {
  background: linear-gradient(100deg, var(--mint), #bfeed0 40%, var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  margin: 22px 0 28px;
  max-width: 480px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}
.home-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s, background 0.2s;
}
.btn.primary { color: #04130d; background: linear-gradient(135deg, var(--mint), var(--orange)); }
.btn.primary:hover { transform: translateY(-2px); }
.btn.ghost { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.btn.ghost:hover { border-color: var(--mint); }
.btn.full { width: 100%; }

.home-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.home-stats strong { display: block; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.home-stats span { font-size: 13px; color: var(--muted); font-weight: 500; }

.home-visual { position: relative; height: 380px; }
.visual-glow {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background:
    radial-gradient(80% 60% at 70% 20%, rgba(116, 240, 160, 0.3), transparent 60%),
    radial-gradient(70% 70% at 20% 90%, rgba(255, 138, 61, 0.28), transparent 55%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line);
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 14px;
  padding: 16px;
}
.hero-media.single { grid-template-columns: 1fr; }
.hero-media img {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 20, 16, 0.9);
}
.hero-media img.is-empty { display: none; }
#heroImageSecondary { margin-top: 24px; }
.visual-card {
  position: absolute;
  left: 28px;
  bottom: 28px;
  right: 28px;
  padding: 22px;
  border-radius: 20px;
  background: rgba(4, 14, 11, 0.55);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
}
.visual-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.visual-card p { margin: 14px 0 0; color: var(--text); font-size: 15px; line-height: 1.5; }

/* ---------- Promo strip ---------- */
.promo-strip {
  position: relative;
  margin-top: 28px;
}
.promo-track { display: flex; gap: 12px; flex-wrap: wrap; }
.promo-item {
  flex: 1 1 240px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.promo-item strong { display: block; font-size: 14px; }
.promo-item p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- View heads ---------- */
.view-head { margin-bottom: 28px; max-width: 620px; }
.view-head.compact { margin-bottom: 20px; }
.view-head h2 { margin: 12px 0 0; font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.04em; font-weight: 800; }
.view-head h3 { margin: 12px 0 0; font-size: 24px; letter-spacing: -0.03em; font-weight: 800; }
.view-head p { margin: 12px 0 0; color: var(--muted); font-size: 15.5px; line-height: 1.55; }

/* ---------- Packages ---------- */
.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.card {
  position: relative;
  padding: 26px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.18s ease, border-color 0.2s, background 0.2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.card.featured {
  padding-top: 56px;
  background: linear-gradient(170deg, rgba(116, 240, 160, 0.12), rgba(255, 138, 61, 0.05));
  border-color: rgba(116, 240, 160, 0.4);
}
.card.featured::after {
  content: "Populaire";
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 999px;
  color: #04130d;
  background: linear-gradient(135deg, var(--mint), var(--orange));
}
.card h3 { margin: 0; font-size: 19px; letter-spacing: -0.02em; }
.card p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.card small { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.card .price { display: block; margin-top: 18px; font-size: 32px; font-weight: 800; letter-spacing: -0.04em; }

/* ---------- Fleet ---------- */
.fleet-block { margin-top: 44px; padding-top: 36px; border-top: 1px solid var(--line); }
.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.machine-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.machine-photo {
  width: 100%;
  height: 180px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.machine-photo--empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 12px;
}
.machine-card h3 { margin: 0; font-size: 18px; }
.machine-card p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.machine-card small { display: block; margin-top: 10px; color: var(--mint); font-weight: 700; font-size: 12.5px; }
.machine-thumbs { display: flex; gap: 8px; }
.machine-thumbs img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

/* ---------- Reserve ---------- */
.reserve {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: 28px;
  align-items: start;
}
.reserve-form { display: flex; flex-direction: column; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row.three { grid-template-columns: repeat(3, 1fr); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span, .field-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.field-title { display: block; margin-bottom: 12px; }
.required-mark {
  color: var(--orange);
  font-weight: 800;
}

input, select {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  transition: border-color 0.18s;
}
input:focus, select:focus { outline: none; border-color: var(--mint); }
input:required, select:required { border-color: var(--line-strong); }
input:required:focus, select:required:focus { border-color: var(--mint); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
select, option { color: var(--text); }
option { background: #0d1814; }

.switch-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  padding: 0 14px;
}
.switch-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--mint);
}
.switch-line span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.date-open {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  height: 34px;
  padding: 0 10px;
  cursor: pointer;
  width: fit-content;
}
.date-open:hover { border-color: var(--mint); }

.availability {
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.availability.ok { color: var(--mint); border-color: rgba(116, 240, 160, 0.35); background: rgba(116, 240, 160, 0.08); }
.availability.bad { color: var(--danger); border-color: rgba(255, 122, 122, 0.3); background: rgba(255, 122, 122, 0.07); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.chip:hover { border-color: var(--line-strong); }
.chip span { color: var(--muted); font-weight: 700; }
.chip.active { border-color: var(--mint); background: rgba(116, 240, 160, 0.1); }

button.chip {
  border: 1px solid var(--line);
  color: var(--text);
}

/* ---------- Summary ---------- */
.reserve-summary {
  position: sticky;
  top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px;
  border-radius: 26px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.summary-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.summary-total { font-size: 46px; font-weight: 900; letter-spacing: -0.05em; line-height: 1.05; }
.summary-sub { font-size: 13.5px; color: var(--muted); }
.summary-sub strong { color: var(--text); }
.summary-usd { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.summary-note {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(116, 240, 160, 0.07);
  border: 1px solid rgba(116, 240, 160, 0.22);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.summary-note strong { display: block; color: var(--text); font-size: 14px; }
.summary-fine { margin: 12px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.form-status {
  margin: 12px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  border-radius: 12px;
}
.form-status:empty { display: none; }
.form-status:not(:empty) {
  padding: 11px 13px;
  border: 1px solid var(--line);
}
.form-status.info {
  color: var(--text);
  border-color: rgba(116, 240, 160, 0.28);
  background: rgba(116, 240, 160, 0.08);
}
.form-status.success {
  color: var(--mint);
  border-color: rgba(116, 240, 160, 0.35);
  background: rgba(116, 240, 160, 0.11);
}
.form-status.error {
  color: #ffd2d2;
  border-color: rgba(255, 122, 122, 0.38);
  background: rgba(255, 122, 122, 0.1);
}

.btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}
.btn.loading {
  filter: saturate(0.85);
}

/* ---------- Infos (sécurité & contrat) ---------- */
.infos-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 22, 18, 0.5);
}
.infos-tab {
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}
.infos-tab.active {
  background: rgba(109, 255, 143, 0.12);
  color: var(--text);
}
.infos-panel { display: none; }
.infos-panel.active { display: block; }

.detail-sections { display: grid; gap: 16px; }
.detail-block {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.detail-block h3 {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.detail-block p,
.detail-block li {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.55;
}
.detail-block ul { margin: 8px 0 0; padding-left: 20px; }

.legal-doc { display: grid; gap: 8px; }
.legal-doc details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}
.legal-doc summary {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 800;
  font-size: 14px;
  list-style: none;
}
.legal-doc summary::-webkit-details-marker { display: none; }
.legal-doc .legal-body {
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}
.legal-doc .legal-body h4 {
  margin: 14px 0 6px;
  font-size: 13px;
  color: var(--text);
  font-weight: 800;
}
.legal-doc .legal-body ul { margin: 6px 0; padding-left: 18px; }

.inline-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--mint);
  font: inherit;
  font-size: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.inline-link:hover { color: var(--text); }

.footer-legal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 0 10px;
  font-size: 13px;
}
.footer-legal button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: inherit;
  cursor: pointer;
}
.footer-legal button:hover { color: var(--text); }

/* ---------- Footer ---------- */
.footer {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  background: rgba(4, 14, 11, 0.6);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-size: 13px;
  color: var(--muted);
}
.footer-mid { flex: 1; text-align: center; }
.footer a:hover { color: var(--text); }
.staff-row { padding: 0 0 14px; }
.staff-link {
  display: inline-block;
  color: rgba(148, 170, 160, 0.45);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.staff-link:hover { color: rgba(148, 170, 160, 0.8); }

.card.package-selectable { cursor: pointer; }
.card.package-selectable:hover { border-color: var(--mint); }

/* ---------- Mobile tab bar ---------- */
.tabbar { display: none; }

.hidden { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .home { grid-template-columns: 1fr; gap: 32px; }
  .home-visual { height: 280px; order: -1; }
  .reserve { grid-template-columns: 1fr; }
  .reserve-summary {
    position: relative;
    top: auto;
  }
}

@media (max-width: 720px) {
  .topnav { display: none; }
  .topbar { height: 60px; }
  .topbar-right { display: none; }
  .cta-mini { display: none; }
  .stage { padding-bottom: 0; }
  .view { padding-top: 8px; }
  .view-inner {
    width: calc(100vw - 28px);
    padding: 18px 0 92px;
  }
  .view-inner.scrollable { padding: 18px 0 92px; }
  .home { padding-top: 8px; }
  .field-row, .field-row.three { grid-template-columns: 1fr; }
  .home-actions .btn { width: 100%; }
  .home-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 10px;
    margin-top: 28px;
    padding-top: 20px;
  }
  .home-stats strong { font-size: 22px; }
  .home-visual { height: 250px; }
  #heroImageSecondary { margin-top: 12px; }
  .visual-card {
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding: 16px;
  }
  .visual-card p { margin-top: 8px; font-size: 14px; }
  .promo-strip { margin-top: 18px; }
  .promo-track { display: grid; gap: 10px; }
  .promo-item { padding: 12px 14px; }
  .card { padding: 20px 18px; }
  .card.featured { padding-top: 58px; }
  .card .price { font-size: 44px; }
  .reserve-summary { padding: 20px; border-radius: 20px; }
  .summary-total { font-size: 42px; }
  .summary-fine { font-size: 13px; line-height: 1.5; }
  .switch-line { min-height: 52px; }
  .infos-tabs {
    display: flex;
    width: 100%;
  }
  .infos-tab {
    flex: 1;
    text-align: center;
  }
  .footer {
    padding-bottom: calc(66px + env(safe-area-inset-bottom));
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 0 10px;
  }
  .footer-mid {
    text-align: left;
    flex: auto;
  }
  .footer-legal {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 8px;
  }
  .staff-row { padding-bottom: 6px; }

  .tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 6px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: rgba(4, 14, 11, 0.92);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
    z-index: 40;
  }
  .tabbar button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    padding: 6px 4px;
  }
  .tabbar button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar button.active { color: var(--text); }
  .tabbar button.active svg { stroke: var(--mint); }
  .tabbar .tab-cta { color: var(--mint); }
}

@media (prefers-reduced-motion: reduce) {
  .view.active { animation: none; }
  .btn.primary:hover, .card:hover { transform: none; }
}
