:root {
  --pink: #FCC4E1;
  --pink-line: #F0D3E3;
  --bg: #FFF7FB;
  --navy: #1E2060;
  --navy-soft: #4A4D80;
  --red: #D03F2F;
  --red-text: #C8372A;
  --coral: #EA5A4A;
  --sage: #86965A;
  --sage-text: #5E6B3A;
  --yellow: #F4F52B;
  --ink: #10131F;
  --white: #FFFFFF;
  --font-display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #F6B3D5;
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.4;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.hero :focus-visible, .done :focus-visible { outline-color: var(--yellow); }
.done .btn-yellow:focus-visible { outline-color: var(--white); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

#app {
  position: relative;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 0 0 1px rgba(30, 32, 96, 0.08), 0 0 40px rgba(30, 32, 96, 0.12);
}
#app.no-nav { padding-bottom: 0; }

#view { outline: none; }
.loading { padding: 40px 24px; text-align: center; color: var(--navy-soft); }

h1, h2, h3 { margin: 0; }
.display { font-family: var(--font-display); font-weight: 800; }
.section-title { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--red-text); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 2px solid transparent;
  font-size: 15px; font-weight: 700; text-decoration: none; text-align: center;
}
.btn-navy { background: var(--navy); color: var(--white); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-red { background: var(--red); color: var(--white); min-height: 56px; font-size: 17px; width: 100%; }
.btn-yellow { background: var(--yellow); color: var(--navy); min-height: 52px; font-size: 16px; width: 100%; }
.btn-block { width: 100%; }

.round {
  width: 44px; height: 44px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; border: 0; background: var(--navy); color: var(--pink);
}
.icon { display: block; flex-shrink: 0; }

/* ---------- Accueil ---------- */
.hero {
  background: var(--pink);
  padding: calc(18px + env(safe-area-inset-top, 0px)) 24px 18px;
  display: flex; flex-direction: column; gap: 14px;
  container-type: inline-size;
}
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-logo { display: block; width: 38%; max-width: 170px; height: auto; margin-left: -4px; flex-shrink: 0; }
.wordmark { font-family: var(--font-display); font-weight: 800; line-height: 0.98; color: var(--navy); }
.hero .wordmark { font-size: 30px; flex-shrink: 0; }
.hero-side { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; text-align: right; }
.hero-trades, .hero-place { margin: 0; font-size: 12.5px; line-height: 1.2; }
.hero-trades { font-weight: 700; white-space: nowrap; }
.hero-intro { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.35; text-align: center; text-wrap: balance; }
/* Très petits écrans : les métiers peuvent passer à la ligne plutôt que déborder. */
@media (max-width: 340px) { .hero-trades { white-space: normal; } }
/* Les textes s'agrandissent avec la largeur disponible (ils tiennent toujours dans la colonne). */
@supports (width: 1cqw) {
  .hero-trades, .hero-place { font-size: clamp(12px, calc((62cqw - 12px) / 14.73), 16px); }
  .hero-intro { font-size: clamp(12px, calc(100cqw / 30.5), 15px); }
}

.block { padding: 22px 20px 0; display: flex; flex-direction: column; gap: 12px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; }
.block-head small { font-size: 13px; color: var(--navy-soft); }

.card-row {
  display: flex; align-items: center; gap: 12px; background: var(--white);
  border-radius: 18px; padding: 14px 14px 14px 16px; box-shadow: 0 1px 0 rgba(30, 32, 96, 0.08);
}
.card-row .grow { flex-grow: 1; min-width: 0; }
.row-name { font-weight: 700; font-size: 16px; line-height: 1.25; }
.row-sub { font-size: 13px; color: var(--navy-soft); line-height: 1.35; }
.row-price { font-weight: 700; font-size: 15px; color: var(--red-text); }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 124px;
  padding: 16px; border-radius: 20px; color: var(--ink); text-decoration: none;
}
.tile.sage { background: var(--sage); }
.tile.coral { background: var(--coral); }
.tile strong { display: block; font-size: 17px; }
.tile span { font-size: 13px; }

.offer {
  margin: 18px 20px 0; background: var(--yellow); border-radius: 22px; padding: 18px;
  display: flex; flex-direction: column; gap: 6px; color: var(--navy);
}
.offer .eyebrow { font-size: 12px; letter-spacing: 0.12em; font-weight: 700; text-transform: uppercase; }
.offer .offer-title { font-weight: 700; font-size: 18px; line-height: 1.25; }
.offer .offer-price { display: flex; align-items: baseline; gap: 10px; }
.offer .offer-price strong { font-family: var(--font-display); font-weight: 800; font-size: 28px; color: var(--red-text); }
.offer .offer-price s { font-size: 15px; }
.offer p { margin: 0; font-size: 13px; }
.offer .btn { margin-top: 8px; }

.address {
  margin: 18px 20px 28px; background: var(--navy); color: var(--white); border-radius: 22px; padding: 18px;
  font-size: 14px; line-height: 1.5;
}
.address strong { display: block; font-size: 16px; color: var(--pink); margin-bottom: 2px; }
.address a { text-decoration: none; font-weight: 700; display: inline-block; margin-top: 8px; padding: 4px 0; }

/* ---------- Carte ---------- */
.page-head {
  background: var(--pink); padding: calc(24px + env(safe-area-inset-top, 0px)) 20px 16px;
  display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; z-index: 3;
}
.page-head h1 { font-family: var(--font-display); font-weight: 800; font-size: 24px; }
.tabs { display: flex; gap: 6px; background: rgba(255, 255, 255, 0.6); padding: 4px; border-radius: 999px; }
.tab {
  flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 999px;
  font-size: 13px; font-weight: 700; text-decoration: none; color: var(--navy); text-align: center;
}
.tab[aria-current="page"] { background: var(--navy); color: var(--white); }

.menu-list { padding: 4px 20px 24px; }
.menu-group-title {
  margin: 0; padding: 22px 0 4px; font-size: 13px; letter-spacing: 0.1em; font-weight: 700;
  text-transform: uppercase; color: var(--sage-text);
}
.product {
  display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--pink-line);
}
.product .grow { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }

.stepper {
  display: inline-flex; align-items: center; gap: 2px; background: var(--navy); color: var(--white);
  border-radius: 999px; padding: 2px; flex-shrink: 0;
}
.stepper button {
  width: 44px; height: 44px; border-radius: 999px; border: 0; background: transparent; color: var(--pink);
  display: inline-flex; align-items: center; justify-content: center;
}
.stepper output { min-width: 44px; text-align: center; font-weight: 700; font-size: 14px; }
.stepper.light { background: var(--white); border: 1px solid var(--navy); color: var(--navy); }
.stepper.light button { color: var(--navy); }

/* ---------- Barre panier + navigation ---------- */
#cartbar-slot, #nav-slot { position: relative; }
.cartbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 448px;
  bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom, 0px));
  z-index: 5; display: flex; align-items: center; justify-content: space-between;
  min-height: 54px; padding: 0 22px; border-radius: 999px; background: var(--red); color: var(--white);
  font-size: 15px; font-weight: 700; text-decoration: none; box-shadow: 0 6px 18px rgba(30, 32, 96, 0.25);
}
.nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 6;
  width: 100%; max-width: 480px;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--white); border-top: 1px solid var(--pink-line);
  display: flex; align-items: stretch; justify-content: space-around;
}
.nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 12px; font-weight: 700; text-decoration: none; color: var(--navy-soft);
}
.nav a[aria-current="page"] { color: var(--red-text); }
.badge-wrap { position: relative; display: flex; }
.badge {
  position: absolute; top: -6px; right: -11px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  background: var(--red); color: var(--white); font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
body.has-bar #app:not(.no-nav) { padding-bottom: calc(var(--nav-h) + 76px + env(safe-area-inset-bottom, 0px)); }

/* ---------- Panier ---------- */
.empty { padding: 48px 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.empty strong { font-size: 18px; }
.empty p { margin: 0; font-size: 14px; color: var(--navy-soft); }

.cart-body { padding: 8px 20px 28px; display: flex; flex-direction: column; gap: 24px; }
.cart-line { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--pink-line); }
.cart-line .grow { flex-grow: 1; min-width: 0; }
.cart-line .line-total { min-width: 64px; text-align: right; font-weight: 700; font-size: 15px; }

.group { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.group legend, .group .group-title { padding: 0; font-weight: 700; font-size: 16px; margin-bottom: 10px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--navy);
  background: var(--white); color: var(--navy); font-size: 14px; font-weight: 700;
}
.choice.grow { flex: 1; }
.choice[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.hint { margin: 0; font-size: 13px; color: var(--navy-soft); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: 14px; }
.field input {
  min-height: 48px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--navy);
  background: var(--white); font-size: 16px;
}
.field input[aria-invalid="true"] { border-color: var(--red-text); }
.field .error { margin: 0; font-size: 13px; font-weight: 700; color: var(--red-text); }

.summary {
  background: var(--white); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 8px; font-size: 15px;
}
.summary div { display: flex; justify-content: space-between; gap: 12px; }
.summary .total { font-weight: 800; font-size: 18px; padding-top: 8px; border-top: 1px solid var(--pink-line); }

/* ---------- Confirmation ---------- */
.done {
  background: var(--navy); color: var(--white); min-height: 100vh; min-height: 100dvh;
  padding: calc(56px + env(safe-area-inset-top, 0px)) 24px 40px;
  display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
}
.done .check {
  width: 88px; height: 88px; border-radius: 999px; background: var(--pink); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
}
.done h1 { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.1; }
.done p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--pink); }
.done .recap {
  width: 100%; background: rgba(255, 255, 255, 0.1); border-radius: 20px; padding: 16px;
  display: flex; flex-direction: column; gap: 8px; font-size: 14px; text-align: left; margin: 0;
}
.done .recap div { display: flex; justify-content: space-between; gap: 12px; }
.done .recap dt { margin: 0; }
.done .recap dd { margin: 0; font-weight: 700; text-align: right; }
.done .demo-note {
  font-size: 13px; color: var(--white); background: rgba(244, 245, 43, 0.16); border-radius: 14px; padding: 10px 14px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
