/* ═══════════════════════════════════════════════════════
   BatiAzur Analyse — v52
   Apple iOS 26 · HIG + Liquid Glass
   -apple-system · SF Pro · iOS system colors
   ═══════════════════════════════════════════════════════ */

/* ── iOS System Tokens ──────────────────────────────── */
:root {
  /* SF Pro stack (renders native on Apple devices) */
  --sf:  -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
         "Helvetica Neue", Arial, sans-serif;

  /* iOS system colors — dark mode permanent base */
  --ios-blue:       #0A84FF;
  --ios-blue-press: #0058C4;
  --btn-blue:       #0866E0;  /* fond des boutons : texte blanc lisible (AA) */
  --ios-tint:       rgba(10,132,255,.22);
  --ios-tint-mid:   rgba(10,132,255,.14);
  --ios-yellow:     #FFD60A;

  /* Backgrounds */
  --bg-primary:     #1C1C1E;
  --bg-card:        rgba(28,28,30,.90);
  --bg-card-blur:   rgba(28,28,30,.72);

  /* Labels — dark */
  --label:          #FFFFFF;
  --label-2:        rgba(235,235,245,.60);
  --label-3:        rgba(235,235,245,.58);  /* v53 : contraste AA (était .30) */
  --label-4:        rgba(235,235,245,.18);

  /* Fills */
  --fill:           rgba(118,118,128,.40);
  --fill-2:         rgba(118,118,128,.32);
  --fill-3:         rgba(118,118,128,.24);
  --separator:      rgba(84,84,88,.65);

  /* Liquid glass — dark */
  --glass-bar:      rgba(22,22,30,.86);
  --glass-spec:     rgba(48,48,58,.94);
  --glass-shad:     rgba(0,0,0,.52);

  /* Adaptive surfaces — dark */
  --surface-screen:  rgba(8,20,52,.32);
  --surface-card:    rgba(34,34,38,.90);
  --border-card:     rgba(255,255,255,.08);
  --surface-cell:    rgba(44,44,50,.82);
  --border-cell:     rgba(255,255,255,.10);
  --surface-msg:     rgba(38,38,44,.94);
  --surface-overlay: rgba(18,20,28,.92);
  --border-overlay:  rgba(255,255,255,.12);
  --warn-bg:         rgba(255,159,10,.16);
  --warn-border:     rgba(255,159,10,.32);
  --warn-text:       #FF9F0A;
  --tel-bg:          rgba(48,209,88,.14);
  --tel-border:      rgba(48,209,88,.30);
  --tel-text:        #30D158;
  --map-bg:          rgba(255,159,10,.14);
  --map-border:      rgba(255,159,10,.28);
  --map-text:        #FF9F0A;
  --cta-bg:          rgba(10,132,255,.12);
  --cta-border:      rgba(10,132,255,.26);
  --nomatch-bg:      rgba(255,159,10,.14);
  --nomatch-border:  rgba(255,159,10,.28);
  --nomatch-text:    #FF9F0A;

  /* Tab bar geometry */
  --bar-w:      min(420px, calc(100vw - 20px));
  --bar-h:      62px;
  --items:      5;
  --tab-w:      calc(var(--bar-w) / var(--items));
  --bubble:     52px;
  --bubble-top: -26px;
  --icon-size:  22px;
  --label-size: 10px;
  --bottom-gap: 0px;
  --dock-extra: 28px;
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html {
  margin: 0; padding: 0;
  min-height: 100%; min-height: 100dvh;
  /* overflow:hidden retiré → le fond de html peut peindre dans la zone
     système iOS (home indicator) en dessous de la viewport CSS */
}
body {
  margin: 0; padding: 0;
  height: 100%; height: -webkit-fill-available; height: 100dvh;
  overflow: hidden; overscroll-behavior: none;
}
body {
  font-family: var(--sf);
  color: var(--label);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 17px;
  line-height: 1.47;
}
input, button, select, a { font: inherit; }
button { cursor: pointer; border: 0; }

/* ── App background — pool vibrancy ─────────────────── */
/* Stratégie double :
   • html background-color = #0e5ac8 (fin du gradient) : remplit la zone
     système iOS sous le viewport CSS (home indicator) sans créer de bande
     visible car la couleur prolonge naturellement le gradient.
   • html background-image = gradient complet avec background-attachment:fixed
     pour les zones overscroll/bounce en haut.
   • .app background = même gradient, couvre tout l'écran via position:fixed. */
html {
  /* dark: gradient end = #0a2e74 — rempli safe-area iOS sans bande */
  background-color: #0a2e74;
  background-image:
    radial-gradient(ellipse 110% 55% at 14% -2%, rgba(0,90,210,.50),  transparent 52%),
    radial-gradient(ellipse  58% 44% at 88% 108%, rgba(0,40,140,.50), transparent 52%),
    linear-gradient(162deg,
      #1a3a6e 0%, #122e5e 12%, #0d2450 26%,
      #0e3068 44%, #0c2e6a 64%, #0a2e74 82%, #0a2e74 100%);
  background-attachment: fixed;
}

.app {
  position: fixed; inset: 0;
  overflow: hidden;

  background:
    radial-gradient(ellipse 110% 55% at 14% -2%, rgba(0,90,210,.50),  transparent 52%),
    radial-gradient(ellipse  58% 44% at 88% 108%, rgba(0,40,140,.50), transparent 52%),
    linear-gradient(162deg,
      #1a3a6e 0%,
      #122e5e 12%,
      #0d2450 26%,
      #0e3068 44%,
      #0c2e6a 64%,
      #0a2e74 82%,
      #0a2e74 100%);
}

/* Status bar safe area overlay */
.app::before {
  content: "";
  position: fixed; left: 0; right: 0; top: 0;
  height: max(env(safe-area-inset-top), 20px);
  pointer-events: none; z-index: 100;
  background: linear-gradient(180deg, rgba(12,32,80,.28), transparent);
}


/* Couche de verre fixe — désactivée : gradient pur comme le splash */
.app-glass {
  display: none;
}

/* ── Scroll ─────────────────────────────────────────── */
.app-scroll {
  position: absolute; inset: 0; top: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0;
  scroll-behavior: smooth;
  z-index: 2; /* au-dessus de .app-glass */
  /* Fondu bas : le contenu se dissout dans le fond avant la pill.
     La zone dock + safe-area devient transparente → montre le gradient
     composite (.app-glass) = même couleur que la "bande" → invisible.
     fade = 52px d'opaque→transparent, puis transparent jusqu'au bas.   */
  --fade-stop: calc(100% - var(--bar-h) - var(--dock-extra) - env(safe-area-inset-bottom, 34px));
  --fade-start: calc(var(--fade-stop) - 52px);
  -webkit-mask-image: linear-gradient(to bottom,
    black       0,
    black       var(--fade-start),
    transparent var(--fade-stop));
  mask-image: linear-gradient(to bottom,
    black       0,
    black       var(--fade-start),
    transparent var(--fade-stop));
}

/* ── iOS App Screen container — full bleed ──────────── */
.screen {
  width: 100%;
  margin: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  /* Bas = pill + bulle + safe-area + tampon 40px pour éviter que le
     contenu ne soit visible derrière le dock transparent */
  padding: max(env(safe-area-inset-top), 16px) 0 calc(var(--bar-h) + var(--dock-extra) + env(safe-area-inset-bottom, 34px) + 40px);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
/* ── iOS Large Title ────────────────────────────────── */
h1 {
  margin: 28px 20px 6px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.41px;
  color: var(--label);
}
.lead {
  margin: 0 20px;
  color: var(--label-2);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.24px;
}
.page { display: none; }
.page.active { display: block; flex: 1; padding-bottom: 4px; }

/* FAQ : conversation poussée vers le bas comme iMessage */
#page-faq.active {
  display: flex;
  flex-direction: column;
}

/* ── iOS Inset Grouped Sections (cards) ─────────────── */
.card {
  margin: 12px 16px 0;
  padding: 0;
  border-radius: 16px;
  background: var(--surface-card);
  border: 0.5px solid var(--border-card);
  box-shadow:
    inset 0 0.5px 0 rgba(255,255,255,.96),
    0 1px 2px rgba(0,0,0,.03),
    0 4px 14px rgba(0,28,100,.05);
  overflow: hidden;
}
.card-inner {
  padding: 14px 16px;
}
.card h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.38px;
  color: var(--label);
}
.card > h2,
.card > p { padding: 14px 16px; margin: 0; }
.card > h2 { padding-bottom: 4px; }
.card > p,
.card-inner p {
  color: var(--label-2);
  font-size: 15px;
  line-height: 1.47;
  letter-spacing: -0.24px;
  margin: 0;
}

/* Card section header (iOS style: above card) */
.section-header {
  margin: 22px 20px 6px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.08px;
  color: var(--label-2);
}

/* ── Quick action grid ──────────────────────────────── */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
  margin: 16px 16px 0;
}
/* Orphan last card (2-col): center at half-width */
.quick-grid > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 5px);
}

/* Card wrapping a choice-grid: transparent — no double frame */
.card:has(> .choice-grid) {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  overflow: visible;
  margin-left: 6px;
  margin-right: 6px;
}

/* ── iOS-style action cells ─────────────────────────── */
.choice-card {
  background: var(--surface-cell);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 0.5px solid var(--border-cell);
  border-radius: 18px;
  min-height: 84px;
  padding: 14px;
  color: var(--label);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  justify-content: flex-end;
  text-align: left;
  text-decoration: none;
  box-shadow:
    inset 0 0.5px 0 rgba(255,255,255,.95),
    0 1px 3px rgba(0,0,0,.04),
    0 4px 12px rgba(0,40,120,.07);
  transition: transform .15s ease, opacity .15s ease;
  user-select: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* Subtle tinted corner */
.choice-card::before {
  content: "";
  position: absolute; top: 0; right: 0;
  width: 52px; height: 52px;
  border-radius: 0 18px 0 52px;
  background: var(--ios-tint-mid);
  transition: background .15s ease;
}

.choice-card svg {
  width: 28px; height: 28px;
  stroke: var(--ios-blue); fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  position: absolute; top: 12px; right: 12px; z-index: 1;
}
.choice-card strong {
  font-size: 14px; font-weight: 700;
  letter-spacing: -0.3px; line-height: 1.2;
  position: relative; z-index: 1;
}
.choice-card small {
  color: var(--label-2);
  font-size: 12px; font-weight: 400;
  letter-spacing: -0.1px; line-height: 1.2;
  position: relative; z-index: 1;
}

.choice-card.active {
  background: rgba(0,122,255,.90);
  border-color: rgba(0,122,255,.50);
  color: #fff;
  box-shadow:
    inset 0 0.5px 0 rgba(255,255,255,.38),
    0 4px 14px rgba(0,122,255,.42),
    0 12px 28px rgba(0,122,255,.20);
}
.choice-card.active::before { background: rgba(255,255,255,.10); }
.choice-card.active svg { stroke: rgba(255,255,255,.85); }
.choice-card.active small { color: rgba(255,255,255,.72); }

.choice-card:active, .choice-card.pressed {
  transform: scale(.96) !important;
  opacity: .88 !important;
}
a.choice-card { text-decoration: none; }
a.choice-card:visited { color: var(--label); }
a.choice-card.active:visited { color: #fff; }

/* Choice grid inside card */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
  padding: 0 16px 16px;
  margin-top: 0;
}
.choice-grid.three {
  grid-template-columns: repeat(3, minmax(0,1fr));
}
/* Orphan last choice (2-col grid): center at half-width */
.choice-grid > :last-child:nth-child(2n+1) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 4px);
}
/* 3-col grid: never orphan-center */
.choice-grid.three > :last-child {
  grid-column: auto;
  justify-self: auto;
  width: auto;
}
.spaced-title {
  padding: 12px 16px 4px !important;
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: -0.24px !important;
  color: var(--label-2) !important;
}
.card > h2.spaced-title {
  padding-top: 0 !important;
}

/* ── iOS Buttons ────────────────────────────────────── */
.primary-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 12px 16px 0;
  min-height: 50px;
  border-radius: 14px;
  padding: 13px 16px;
  background: var(--ios-blue);
  color: #fff;
  font-family: var(--sf);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.41px;
  border: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    0 2px 8px rgba(0,122,255,.30),
    0 8px 20px rgba(0,122,255,.22);
  transition: transform .12s ease, opacity .12s ease;
  cursor: pointer;
  position: relative;
}
.primary-btn:active, .primary-btn.pressed {
  transform: scale(.97) !important;
  opacity: .88 !important;
  background: var(--ios-blue-press) !important;
}

.secondary-btn {
  display: flex; align-items: center; justify-content: center;
  text-align: center; gap: 6px;
  width: calc(100% - 32px);
  margin: 8px 16px 0;
  border: none;
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--ios-tint);
  color: var(--ios-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.24px;
  transition: transform .12s ease, opacity .12s ease;
  cursor: pointer;
}
.secondary-btn:active, .secondary-btn.pressed {
  transform: scale(.97) !important;
  opacity: .80 !important;
}
.secondary-btn.is-done {
  background: rgba(52,199,89,.15) !important;
  color: #1a7a35 !important;
}

/* ── iOS Form fields ────────────────────────────────── */
.form-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  background: transparent;
}
.field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--separator);
  background: transparent;
}
.field:last-child { border-bottom: none; }
.field span {
  color: var(--label);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.41px;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 120px;
}
.field input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  color: var(--label-2);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.41px;
  text-align: right;
  padding: 0;
  min-width: 0;
  width: 100%;
}
.field input::placeholder {
  color: var(--label-3);
}
.hidden { display: none !important; }

/* ── iOS Result box ─────────────────────────────────── */
.result-box {
  margin: 12px 16px 0;
  border-radius: 16px;
  padding: 18px;
  background: rgba(0,122,255,.90);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 0.5px solid rgba(0,122,255,.50);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    0 4px 14px rgba(0,122,255,.38),
    0 20px 48px rgba(0,122,255,.16);
  color: #fff;
}
.result-box span {
  display: block;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 11px;
  font-weight: 700;
  opacity: .72;
  margin-bottom: 6px;
}
.result-box strong {
  display: block;
  font-size: 38px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
}
.result-box p {
  color: rgba(255,255,255,.84);
  font-size: 14px;
  margin: 0; line-height: 1.5;
  letter-spacing: -0.24px;
}

@keyframes resultPop {
  0%   { transform: scale(.97); opacity: .72; }
  55%  { transform: scale(1.015); }
  100% { transform: scale(1); opacity: 1; }
}
.result-box.is-fresh { animation: resultPop .35s cubic-bezier(.2,.9,.18,1); }

/* ── iOS Chips / Segmented ──────────────────────────── */
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 16px 12px; margin-top: 0; }
.chip {
  border: 0.5px solid rgba(60,60,67,.18);
  background: var(--fill-2);
  backdrop-filter: blur(8px);
  color: var(--label);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
  transition: transform .12s ease;
  cursor: pointer;
}
.chip.active {
  background: var(--ios-blue);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0,122,255,.32);
}

/* ── Warning ─────────────────────────────────────────── */
.warning {
  margin: 10px 16px 0;
  border-radius: 12px;
  padding: 11px 14px;
  background: var(--warn-bg);
  border: 0.5px solid var(--warn-border);
  color: var(--warn-text);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: -0.2px;
}
.note {
  margin: 8px 16px 0 !important;
  font-size: 12px !important;
  color: var(--label-3) !important;
  letter-spacing: -0.1px !important;
  padding-bottom: 12px !important;
}

/* ── Plan de traitement steps ────────────────────────── */
.plan-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
}
.plan-step {
  padding: 10px 0 10px;
  border-bottom: 0.5px solid rgba(255,255,255,.18);
}
.plan-step:last-child { border-bottom: none; padding-bottom: 0; }
.plan-step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.plan-step-num {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0;
}
.plan-step-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  letter-spacing: -0.2px;
}
.plan-step-body {
  font-size: 13px;
  color: rgba(255,255,255,.84);
  line-height: 1.5;
  padding-left: 30px;
  letter-spacing: -0.1px;
}
.plan-step-body li {
  list-style: none;
  padding-left: 0;
  margin-bottom: 3px;
}
.plan-step-body li::before { content: "• "; opacity: .6; }
.plan-alert {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: rgba(255,200,0,.18);
  border: 0.5px solid rgba(255,200,0,.38);
  border-radius: 8px;
  padding: 7px 10px;
  margin: 6px 0 4px 30px;
  font-size: 12px;
  color: rgba(255,255,255,.92);
  line-height: 1.4;
  font-weight: 500;
}
.plan-wait {
  display: block;
  background: rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 6px 10px;
  margin: 6px 0 0 30px;
  font-size: 12px;
  color: rgba(255,255,255,.80);
  font-weight: 500;
  line-height: 1.4;
}
.plan-ok {
  display: block;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  padding: 6px 0 2px;
  letter-spacing: -0.3px;
}
.plan-ok-sub {
  display: block;
  font-size: 13px;
  text-align: center;
  color: rgba(255,255,255,.78);
  padding: 2px 0 6px;
}

/* ── Contact cells (iOS Settings style) ─────────────── */
.contact-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--separator);
  background: transparent;
}
.contact-block:last-of-type { border-bottom: none; }
.contact-block span {
  color: var(--label);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.41px;
  white-space: nowrap;
  flex-shrink: 0;
}
.contact-block strong {
  color: var(--label-2);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.24px;
  text-align: right;
  flex: 1;
  min-width: 0;
}
/* Override secondary-btn inside contact */
.contact-block .secondary-btn,
.contact-block .nav-buttons .secondary-btn {
  width: auto;
  margin: 0;
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 999px;
  background: var(--ios-tint);
  white-space: nowrap;
}
.nav-buttons {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 8px;
  padding: 0 16px 14px;
}
.nav-buttons .secondary-btn {
  width: auto; margin: 0; flex: 1;
  min-width: 0;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 10px;
}

/* Vertical contact block layout for address */
.contact-block.contact-block--column {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.contact-block.contact-block--column strong {
  text-align: left;
}

/* ── Home volume card ─────────────────────────────────── */
#homeVolumeText {
  padding: 14px 16px;
  font-size: 15px;
  color: var(--label-2);
  letter-spacing: -0.24px;
  display: block;
}

/* ── Social cards ────────────────────────────────────── */
.home-link-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
}
.social-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--separator);
  color: var(--label);
  text-decoration: none;
  transition: opacity .12s ease;
  cursor: pointer;
  background: transparent;
}
.social-card:last-child { border-bottom: none; }
.social-card:active { opacity: .6; }
.social-card-text { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.social-card strong {
  font-size: 17px; font-weight: 500;
  letter-spacing: -0.41px;
  color: var(--label);
}
.social-card small {
  font-size: 13px; font-weight: 400;
  color: var(--label-2);
  letter-spacing: -0.08px;
}
/* iOS-style disclosure indicator */
.social-card::after {
  content: "";
  width: 8px; height: 13px; flex-shrink: 0;
  background-color: var(--label-3);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  margin-left: 4px;
}
.social-logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.social-logo svg { width: 40px; height: 40px; display: block; }

/* ── Horaires d'ouverture ────────────────────────────── */
.horaire-header {
  padding: 14px 16px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.horaire-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--label-2);
}
.horaire-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--label-3);
  border-top-color: var(--ios-blue);
  border-radius: 50%;
  animation: horaireSpin 0.75s linear infinite;
  flex-shrink: 0;
}
@keyframes horaireSpin {
  to { transform: rotate(360deg); }
}
.horaire-status {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.horaire-status-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.horaire-subtext {
  font-size: 13px;
  color: var(--label-2);
  padding-left: 1px;
}
.horaire-indicatif {
  font-size: 11px;
  color: var(--label-3);
  padding: 2px 7px;
  background: var(--fill-3);
  border-radius: 8px;
}
.horaire-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
}
.horaire-badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: .9;
}
.horaire-badge.horaire-ouvert {
  background: rgba(48,209,88,.16);
  color: #30D158;
}
.horaire-badge.horaire-ferme {
  background: rgba(255,69,58,.14);
  color: #FF453A;
}
.horaire-badge.horaire-bientot {
  background: rgba(255,159,10,.18);
  color: #FF9F0A;
}
.horaire-days {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--separator);
}
.horaire-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--separator);
  gap: 8px;
}
.horaire-row:last-child { border-bottom: none; }
.horaire-next-day .horaire-day   { color: var(--label-2); font-weight: 500; }
.horaire-next-day .horaire-hours { color: var(--label);   font-weight: 500; }
.horaire-day {
  color: var(--label-2);
  min-width: 90px;
}
.horaire-hours {
  color: var(--label);
  text-align: right;
  flex: 1;
}
.horaire-today .horaire-day {
  color: var(--ios-blue);
  font-weight: 600;
}
.horaire-today .horaire-hours {
  color: var(--ios-blue);
  font-weight: 600;
}
.horaire-today {
  background: rgba(10,132,255,.10);
  border-radius: 0;
}
.horaire-footer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 16px;
  border-top: 1px solid var(--separator);
  font-size: 12px;
  color: var(--label-3);
  text-decoration: none;
  cursor: pointer;
  transition: color .15s;
}
.horaire-footer-link:active { opacity: .6; }
.horaire-error {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--label-2);
}

/* ── News list ───────────────────────────────────────── */
.news-list { display: grid; gap: 12px; padding: 0 0 4px; }
.news-card { overflow: hidden; }
.news-image {
  width: calc(100% - 32px);
  margin: 0 16px 14px;
  aspect-ratio: 16/9;
  border-radius: 12px;
  object-fit: cover;
  background: var(--ios-tint);
}
.news-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 14px 16px 8px; margin: 0;
}
.news-pill {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--ios-tint);
  color: var(--ios-blue);
  font-size: 12px; font-weight: 700;
  letter-spacing: -0.1px;
}
.news-actions {
  display: flex; flex-direction: column; gap: 6px;
  padding: 0 0 4px;
}
.card > .news-card .secondary-btn {
  margin: 0; width: calc(100% - 32px);
}

/* ── Back button ─────────────────────────────────────── */
.back-btn {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 44px;
  border: none; background: transparent;
  color: var(--ios-blue);
  font-size: 17px; font-weight: 400;
  letter-spacing: -0.41px;
  padding: 8px 20px;
  margin: 0;
  transition: opacity .12s ease;
  cursor: pointer;
}
.back-btn svg {
  width: 14px; height: 14px;
  stroke: var(--ios-blue); fill: none;
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}
.back-btn:active { opacity: .5; }

/* ── iOS Floating Glass Tab Bar ──────────────────────── */
.tabbar-dock {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: calc(var(--bar-h) + var(--dock-extra) + env(safe-area-inset-bottom, 34px));
  z-index: 50;
  pointer-events: none;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: env(safe-area-inset-bottom, 34px);
  background: transparent;
}
.tabbar {
  width: var(--bar-w);
  height: var(--bar-h);
  border-radius: 999px;

  background: var(--glass-bar);
  backdrop-filter: blur(40px) saturate(220%) brightness(1.06);
  -webkit-backdrop-filter: blur(40px) saturate(220%) brightness(1.06);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,.96),
    inset 0 -0.5px 0 rgba(0,0,0,.05),
    0 2px 8px rgba(0,0,0,.06),
    0 16px 44px rgba(0,40,120,.20),
    0 32px 64px rgba(0,40,120,.09);
  border: 0.5px solid rgba(255,255,255,.88);
  display: grid;
  grid-template-columns: repeat(5,1fr);
  overflow: visible; position: relative;
  pointer-events: auto;
}

/* Bubble indicator */
.bubble {
  pointer-events: none;
  position: absolute;
  width: var(--bubble); height: var(--bubble);
  border-radius: 50%;
  background: var(--ios-blue);
  top: var(--bubble-top);
  left: calc((var(--tab-w) - var(--bubble)) / 2);
  transform: translateX(0) scale(1);
  transition: transform .34s cubic-bezier(.2,.9,.18,1);
  z-index: 1;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    0 4px 14px rgba(0,122,255,.52),
    0 12px 28px rgba(0,122,255,.22);
}
.tabbar[data-active="volume"] .bubble  { transform: translateX(var(--tab-w)) scale(1); }
.tabbar[data-active="dosage"]  .bubble { transform: translateX(calc(var(--tab-w) * 2)) scale(1); }
.tabbar[data-active="faq"]     .bubble { transform: translateX(calc(var(--tab-w) * 3)) scale(1); }
.tabbar[data-active="compte"]  .bubble { transform: translateX(calc(var(--tab-w) * 4)) scale(1); }
.tabbar.bounce .bubble { animation: bubbleBounce .26s cubic-bezier(.2,.9,.18,1); }
@keyframes bubbleBounce {
  0%   { scale: 1; }
  42%  { scale: .84; }
  72%  { scale: 1.10; }
  100% { scale: 1; }
}

.tab {
  position: relative; z-index: 5;
  height: var(--bar-h);
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 10px;
  color: var(--label-3);
  font-weight: 700;
  font-size: var(--label-size);
  letter-spacing: .02em;
  user-select: none; touch-action: manipulation;
  background: transparent;
}
.tab::before {
  content: ""; position: absolute;
  left: 0; right: 0;
  top: calc(var(--bubble-top) - 12px); bottom: 0;
  background: transparent;
}
.icon {
  position: absolute;
  left: 50%; top: calc(var(--bar-h) * .10);
  width: var(--bubble); height: var(--bubble);
  transform: translateX(-50%) scale(1);
  display: flex; align-items: center; justify-content: center;
  color: var(--label-3);
  transition: top .34s cubic-bezier(.2,.9,.18,1), color .16s ease;
  pointer-events: none; z-index: 2;
}
.icon svg {
  width: var(--icon-size); height: var(--icon-size);
  display: block; stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.tab-label {
  position: relative; z-index: 2;
  display: block; line-height: 1;
  color: var(--label-3);
  transition: transform .34s cubic-bezier(.2,.9,.18,1), color .16s ease;
  pointer-events: none;
}
.tab.active .icon  { top: var(--bubble-top); color: #fff; }
.tab.active .tab-label { color: var(--ios-blue); transform: translateY(-2px); }

/* Tab press states */
.tab:active, .tab.pressed { transform: none !important; background: transparent !important; }
.tabbar .tab.pressed .tab-label,
.tabbar .tab:active  .tab-label { color: var(--label-3) !important; }
.tabbar .tab.active.pressed .tab-label,
.tabbar .tab.active:active  .tab-label { color: var(--ios-blue) !important; }
.tabbar .tab.pressed .icon,
.tabbar .tab:active  .icon { color: var(--label-3) !important; }
.tabbar .tab.active.pressed .icon,
.tabbar .tab.active:active  .icon { color: #fff !important; }

/* ── Splash ──────────────────────────────────────────── */
.splash-screen {
  position: fixed; inset: 0; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  /* background-color = fin du gradient app = safe-area seamless */
  background-color: #0a2e74;
  background-image:
    radial-gradient(ellipse 110% 55% at 14% -2%, rgba(0,90,210,.50),  transparent 52%),
    radial-gradient(ellipse  58% 44% at 88% 108%, rgba(0,40,140,.50), transparent 52%),
    linear-gradient(162deg, #1a3a6e 0%, #122e5e 12%, #0d2450 26%,
      #0e3068 44%, #0c2e6a 64%, #0a2e74 82%, #0a2e74 100%);
  opacity: 1;
  transition: opacity .7s ease, visibility .7s ease;
  /* Fallback CSS : disparaît à 5s même si JS ne répond pas */
  animation: splashCssFallback 0s 5s forwards;
}
@keyframes splashCssFallback {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
.splash-screen.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-glow {
  position: absolute;
  width: 380px; height: 380px; border-radius: 50%;
  background: rgba(80,170,255,.14);
  filter: blur(48px);
  animation: splashGlow 1.8s ease-in-out infinite alternate;
}
.splash-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center;
  animation: splashEnter .7s cubic-bezier(.2,.9,.18,1) both;
}
.splash-logo {
  width: 112px; height: 112px; border-radius: 26px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.18),
    inset 0 1px 0 rgba(255,255,255,.34),
    0 24px 56px rgba(0,10,60,.48);
}
.splash-title {
  margin-top: 20px; color: #fff;
  font-size: 28px; font-weight: 700;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 16px rgba(0,0,0,.24);
}
.splash-subtitle {
  margin-top: 6px;
  color: rgba(160,210,255,.82);
  font-size: 15px; font-weight: 500;
  letter-spacing: -0.2px;
}
.app.is-ready .screen { animation: appReveal .65s cubic-bezier(.2,.9,.18,1) both; }

/* ── Keyframes ───────────────────────────────────────── */
@keyframes splashEnter {
  0%   { opacity: 0; transform: translateY(14px) scale(.95); }
  100% { opacity: 1; transform: translateY(0)    scale(1); }
}
@keyframes splashGlow {
  0%   { transform: translateY(-26px) scale(.94); opacity: .48; }
  100% { transform: translateY( -8px) scale(1.08); opacity: .86; }
}
@keyframes appReveal {
  0%   { opacity: 0; transform: translateY(16px) scale(.988); }
  100% { opacity: 1; transform: translateY(0)    scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ── Small phones ────────────────────────────────────── */
@media (max-width: 370px) {
  :root { --bar-w: calc(100vw - 22px); }
  .choice-grid.three { grid-template-columns: repeat(2,1fr); }
  h1 { font-size: 28px; }
}

/* ── Landscape ───────────────────────────────────────── */
@media (orientation: landscape) {
  :root {
    --bar-w:      min(500px, calc(100vw - 80px));
    --bar-h:      56px;
    --bubble:     48px;
    --bubble-top: -24px;
    --icon-size:  20px;
    --label-size: 10px;
    --bottom-gap: 60px;
    --dock-extra: 40px;
  }
  .app          { padding-top: 0; }
  .app::before  { display: none; }
  .app-scroll   { padding: 0 0 calc(var(--bar-h) + var(--dock-extra) + env(safe-area-inset-bottom, 0px)); }
  .screen       { width: 100%; border-radius: 0; padding: 12px 0 22px; min-height: 100dvh; }
  h1            { font-size: 26px; margin: 12px 20px 4px; }
  .lead         { font-size: 14px; }
  .responsive-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; padding: 0 16px; }
  .responsive-grid .card { margin: 0; }
  .choice-grid  { grid-template-columns: repeat(3,1fr); }
  .quick-grid   { grid-template-columns: repeat(3,1fr); }
  .home-link-grid { grid-template-columns: 1fr; }
  .nav-buttons  { flex-direction: row; }
  .news-list    { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .splash-logo  { width: 88px; height: 88px; border-radius: 22px; }
  .splash-title { font-size: 22px; }
}
@media (orientation:landscape) and (max-height:430px) {
  :root {
    --bar-w: min(520px,calc(100vw - 100px));
    --bar-h: 52px; --bubble: 44px; --bubble-top: -22px;
    --bottom-gap: 74px; --dock-extra: 36px;
  }
  .app-scroll { padding-top: 0; }
  .screen { padding: 10px 0 16px; }
  h1 { font-size: 22px; }
}
@media (orientation:landscape) and (max-height:360px) {
  :root { --bar-h:48px; --bubble:40px; --bubble-top:-20px; --bottom-gap:82px; --dock-extra:32px; }
}

/* ═══════════════════════════════════════════════════════
   FAQ / Assistant conversationnel
   ═══════════════════════════════════════════════════════ */

/* ── FAQ header ─────────────────────────────────────── */
.faq-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 20px 4px;
}
.faq-header h1 {
  margin: 0;
  font-size: 28px;
}
.faq-avatar {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #007AFF 0%, #0055cc 100%);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    0 4px 12px rgba(0,122,255,.38);
}
.faq-avatar svg {
  width: 24px; height: 24px;
  stroke: #fff; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.faq-status {
  margin: 0 20px 0 0;
  font-size: 13px;
  color: rgba(52,199,89,1);
  font-weight: 500;
  letter-spacing: -0.1px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.faq-status::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(52,199,89,1);
  box-shadow: 0 0 5px rgba(52,199,89,.6);
  display: inline-block;
  flex-shrink: 0;
}

/* ── FAQ suggestion chips ────────────────────────────── */
.faq-chips-wrap {
  margin: 12px 0 0;
  overflow: hidden;
}
.faq-chips {
  display: flex;
  gap: 8px;
  padding: 4px 16px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.faq-chips::-webkit-scrollbar { display: none; }
.faq-chip {
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(0,122,255,.10);
  border: 0.5px solid rgba(0,122,255,.24);
  color: var(--ios-blue);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease, background .12s ease;
}
.faq-chip:active { transform: scale(.94); opacity: .78; }

/* ── FAQ messages list ───────────────────────────────── */
.faq-messages {
  flex: 1; /* remplit l'espace restant dans #page-faq */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* messages collés en haut */
  gap: 10px;
  padding: 8px 16px 16px;
  min-height: 80px;
}

/* Message bubble base */
.faq-msg {
  max-width: 86%;
  padding: 11px 14px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.52;
  letter-spacing: -0.24px;
  word-break: break-word;
  animation: msgPop .22s cubic-bezier(.2,.9,.18,1);
}
@keyframes msgPop {
  0%   { opacity: 0; transform: scale(.92) translateY(6px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* User bubble */
.faq-msg.user {
  align-self: flex-end;
  background: var(--ios-blue);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,122,255,.30), 0 8px 20px rgba(0,122,255,.14);
}

/* Bot bubble */
.faq-msg.bot {
  align-self: flex-start;
  background: var(--surface-msg);
  color: var(--label);
  border-bottom-left-radius: 4px;
  border: 0.5px solid rgba(60,60,67,.13);
  box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 4px 14px rgba(0,40,120,.07);
}
.faq-msg.bot strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--label);
  margin-bottom: 6px;
}
.faq-msg.bot .faq-body {
  color: var(--label-2);
  font-size: 14px;
  line-height: 1.56;
}
.faq-msg.bot .faq-body li {
  margin: 3px 0 3px 12px;
  list-style: disc;
}
.faq-msg.bot .faq-chips-follow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.faq-msg.bot .faq-follow-chip {
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(0,122,255,.10);
  border: 0.5px solid rgba(0,122,255,.22);
  color: var(--ios-blue);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s ease;
}
.faq-msg.bot .faq-follow-chip:active { transform: scale(.93); }

/* Bot no-match bubble */
.faq-msg.nomatch {
  background: var(--nomatch-bg);
  border: 0.5px solid var(--nomatch-border);
  color: var(--nomatch-text);
}

/* Typing indicator */
.faq-typing {
  align-self: flex-start;
  background: var(--surface-msg);
  border: 0.5px solid var(--border-card);
  border-radius: 20px;
  border-bottom-left-radius: 4px;
  padding: 14px 18px;
  display: flex;
  gap: 5px;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.faq-typing span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--label-3);
  animation: faqDot 1.3s ease-in-out infinite;
  display: block;
}
.faq-typing span:nth-child(2) { animation-delay: .22s; }
.faq-typing span:nth-child(3) { animation-delay: .44s; }
@keyframes faqDot {
  0%, 60%, 100% { transform: translateY(0); opacity: .35; }
  30%            { transform: translateY(-5px); opacity: 1; }
}

/* ── FAQ Input overlay (fixed above tab bar) ─────────── */
.faq-input-overlay {
  position: absolute;
  bottom: calc(var(--bar-h) + var(--dock-extra) + var(--bottom-gap) + env(safe-area-inset-bottom) + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: min(430px, calc(100% - 16px));
  padding: 7px 7px 7px 14px;
  background: var(--surface-overlay);
  backdrop-filter: blur(40px) saturate(200%) brightness(1.04);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.04);
  border: 0.5px solid var(--border-overlay);
  border-radius: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 40;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    inset 0 -0.5px 0 rgba(0,0,0,.03),
    0 2px 8px rgba(0,0,0,.07),
    0 10px 28px rgba(0,40,120,.14);
}
#faqInput {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  color: var(--label);
  font-family: var(--sf);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.3px;
  padding: 4px 0;
  min-width: 0;
  caret-color: var(--ios-blue);
}
#faqInput::placeholder { color: var(--label-3); }
#faqSend {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ios-blue);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,122,255,.38), inset 0 1px 0 rgba(255,255,255,.22);
  transition: transform .12s ease, opacity .12s ease;
  cursor: pointer;
  border: none;
  padding: 0;
}
#faqSend:active { transform: scale(.86); opacity: .80; }
#faqSend svg {
  width: 17px; height: 17px;
  stroke: white; fill: none;
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}

/* App extra bottom padding when FAQ input visible */
.faq-active .app-scroll {
  padding-bottom: calc(var(--bar-h) + var(--dock-extra) + var(--bottom-gap) + 80px + env(safe-area-inset-bottom));
}

/* No-match contact buttons */
.faq-contact-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.faq-contact-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
  text-decoration: none;
  transition: opacity .12s ease, transform .12s ease;
  cursor: pointer;
}
.faq-contact-btn:active { opacity: .75; transform: scale(.97); }
.faq-contact-btn svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
  fill: currentColor;
}
.faq-contact-tel {
  background: var(--tel-bg);
  border: 0.5px solid var(--tel-border);
  color: var(--tel-text);
}
.faq-contact-mail {
  background: var(--cta-bg);
  border: 0.5px solid var(--cta-border);
  color: var(--ios-blue);
}
.faq-contact-map {
  background: var(--map-bg);
  border: 0.5px solid var(--map-border);
  color: var(--map-text);
}

/* BatiAzur CTA footer in bot messages */
.faq-batiazur-cta {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--cta-bg);
  border: 0.5px solid var(--cta-border);
}
.faq-batiazur-cta svg {
  width: 14px; height: 14px;
  fill: var(--ios-blue);
  flex-shrink: 0;
  margin-top: 2px;
}
.faq-batiazur-cta span {
  font-size: 12px;
  color: var(--label-2);
  line-height: 1.45;
  letter-spacing: -0.1px;
}
.faq-batiazur-cta strong { color: var(--ios-blue); font-weight: 700; }
.faq-batiazur-cta a {
  color: var(--ios-blue);
  text-decoration: none;
  font-weight: 600;
}

/* ── Small phones: FAQ ──────────────────────────────── */
@media (max-width: 370px) {
  .faq-header h1 { font-size: 22px; }
}

/* ── Landscape: FAQ input ───────────────────────────── */
@media (orientation: landscape) {
  .faq-input-overlay {
    bottom: calc(var(--bar-h) + var(--dock-extra) + var(--bottom-gap) + env(safe-area-inset-bottom) + 4px);
    width: min(600px, calc(100% - 80px));
  }
}

/* ── Dark-specific shadow overrides (permanent) ──────── */
.card {
  box-shadow:
    inset 0 0.5px 0 rgba(255,255,255,.08),
    0 1px 2px rgba(0,0,0,.24),
    0 4px 14px rgba(0,0,0,.28);
}
.choice-card {
  box-shadow:
    inset 0 0.5px 0 rgba(255,255,255,.10),
    0 1px 3px rgba(0,0,0,.24),
    0 4px 12px rgba(0,0,0,.32);
}
.choice-card::before        { background: rgba(255,255,255,.05); }
.choice-card.active         { background: rgba(10,132,255,.88); }
.choice-card.active::before { background: rgba(255,255,255,.08); }
.primary-btn {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 2px 8px rgba(10,132,255,.32),
    0 8px 20px rgba(10,132,255,.18);
}
.tabbar {
  border-color: rgba(255,255,255,.12);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,.14),
    inset 0 -0.5px 0 rgba(0,0,0,.30),
    0 2px 6px rgba(0,0,0,.20),
    0 8px 18px rgba(0,0,0,.28),
    0 16px 32px rgba(0,0,0,.14);
}
.bubble {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    0 4px 14px rgba(10,132,255,.60),
    0 12px 28px rgba(10,132,255,.30);
}
.result-box {
  background: rgba(10,132,255,.88);
  border-color: rgba(10,132,255,.46);
}
.faq-input-overlay {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    inset 0 -0.5px 0 rgba(0,0,0,.30),
    0 2px 8px rgba(0,0,0,.32),
    0 10px 28px rgba(0,0,0,.44);
}
.faq-msg.bot {
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 1px 3px rgba(0,0,0,.24), 0 4px 14px rgba(0,0,0,.32);
}
.social-logo[style*="background:#fff"] {
  background: rgba(255,255,255,.08) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.40) !important;
}

/* ═══ Mon espace : comptes, bassins, produits (v52) ═══════ */
.segmented {
  display: flex;
  gap: 2px;
  margin: 14px 16px 8px;
  padding: 2px;
  border-radius: 10px;
  background: var(--fill-3);
}
.segmented .seg {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--label);
  border-radius: 8px;
  padding: 8px 6px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
  cursor: pointer;
  transition: background .18s ease;
}
.segmented .seg.active {
  background: var(--ios-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,122,255,.32);
}
.card .note a, .space-p a { color: var(--ios-blue); text-decoration: none; font-weight: 600; }
.field select {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--ios-blue);
  font-size: 17px;
  text-align: right;
  text-align-last: right;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.field select option { color: #000; }
.field input[type="checkbox"] { flex: 0 0 auto; width: 22px; height: 22px; margin-left: auto; accent-color: var(--ios-blue); }
.check-field { border-top: 0.5px solid var(--separator); }
.product-pick { border-bottom: 0.5px solid var(--separator); }
.product-pick .field span { min-width: 0; }
.link-btn {
  margin-left: auto;
  border: none;
  background: none;
  color: var(--ios-blue);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
.link-btn.block { display: block; margin: 6px auto 14px; }
.form-msg { margin: 0 16px; font-size: 14px; line-height: 1.4; min-height: 0; }
.form-msg.ko { margin-top: 10px; color: #FF453A; }
.form-msg.ok { margin-top: 10px; color: #30D158; }
.space-p { padding: 14px 16px; margin: 0; color: var(--label-2); font-size: 15px; line-height: 1.45; }
.space-p strong { color: var(--label); }
.space-cat {
  margin: 0;
  padding: 14px 16px 4px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--label-2);
}
.space-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 0.5px solid var(--separator);
}
.space-row div:first-child { min-width: 0; }
.space-row strong { display: block; color: var(--label); font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.space-row small { display: block; color: var(--label-2); font-size: 13px; margin-top: 2px; }
.row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.row-del, .row-edit {
  border: none;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.row-edit { background: var(--ios-tint); color: var(--ios-blue); }
.row-del { background: rgba(255,69,58,.14); color: #FF453A; }
.space-details { border-top: 0.5px solid var(--separator); }
.space-details > summary {
  padding: 13px 16px;
  color: var(--ios-blue);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
}
.space-details > summary::-webkit-details-marker { display: none; }
.space-details[open] > summary { padding-bottom: 4px; }
.space-details .secondary-btn { margin-bottom: 4px; }
.danger-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 14px 16px 0;
  min-height: 44px;
  border: none;
  border-radius: 12px;
  background: rgba(255,69,58,.14);
  color: #FF453A;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.sync-state.ok { color: #30D158 !important; }
.sync-state.pending, .sync-state.saving { color: var(--label-2) !important; }
.sync-state.error { color: var(--warn-text) !important; }
#homeSpaceText { line-height: 1.5; }
#page-compte .primary-btn:disabled, #page-compte .secondary-btn:disabled { opacity: .6; }

/* Profil du fond (pente composée / pointe de diamant) */
.profile-box { margin: 12px 16px 0; }
.profile-box:empty { display: none; }
.profile-box svg { display: block; width: 100%; height: auto; }
.profile-water { fill: rgba(10,132,255,.28); }
.profile-line { fill: none; stroke: #5AC8FA; stroke-width: 2.5; stroke-linejoin: round; }
.profile-surface { stroke: rgba(255,255,255,.55); stroke-width: 1.5; stroke-dasharray: 5 4; }

/* ═══════════════════════════════════════════════════════
   v53 — Modernisation, icônes Lucide, accessibilité
   ═══════════════════════════════════════════════════════ */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
svg.i {
  width: 20px; height: 20px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -4px;
}

/* Contrastes AA : fonds bleus plus profonds sous le texte blanc */
.primary-btn, .chip.active, .segmented .seg.active, .choice-card.active { background: var(--btn-blue) !important; }
.result-box { background: linear-gradient(145deg, #0A6CF0, #0650C8) !important; border-color: rgba(120,180,255,.35) !important; }
.result-box p { color: rgba(255,255,255,.94); }
.tab-label, .tab .icon { color: var(--label-2); }
.primary-btn, .secondary-btn { display: flex; align-items: center; justify-content: center; gap: 8px; }

/* Focus clavier visible partout */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid #64D2FF !important;
  outline-offset: 2px;
  border-radius: 10px;
}
.field:focus-within { background: rgba(10,132,255,.08); }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }

/* Cibles tactiles ≥ 44 px */
.chip, .row-del, .row-edit, .link-btn { min-height: 40px; }
.segmented .seg { min-height: 40px; }

/* Accueil : en-tête + carte « Mon bassin » */
.home-hero { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px; }
.home-hero h1 { margin: 0 0 2px; font-size: 28px; line-height: 1.1; }
.home-hero .lead { margin: 0; font-size: 15px; }
.home-logo { width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0; box-shadow: 0 6px 18px rgba(0,60,180,.45); }
.pool-card { padding: 16px 0 16px; background: linear-gradient(160deg, rgba(10,132,255,.20), rgba(34,34,38,.92) 55%) !important; }
.pool-card-head { display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.pool-card-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,132,255,.22); color: #64D2FF;
}
.pool-card-icon svg.i { width: 24px; height: 24px; }
.pool-card-label { margin: 0; font-size: 13px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: .05em; }
.pool-card-value { margin: 2px 0 0; font-size: 26px; font-weight: 700; color: var(--label); letter-spacing: -0.4px; }
.card > p.pool-card-meta, .pool-card-meta { margin: 10px 16px 0; padding: 0; font-size: 13px; color: var(--label-2); line-height: 1.45; }
.btn-row { display: flex; gap: 10px; margin: 14px 16px 0; }
.btn-row .primary-btn, .btn-row .secondary-btn { margin: 0; width: auto; }
.btn-row .primary-btn { flex: 1.6; min-height: 48px; font-size: 16px; }
.btn-row .secondary-btn { flex: 1; min-height: 48px; }
.choice-card svg.cc-icon {
  position: absolute; top: 12px; right: 12px; width: 24px; height: 24px;
  stroke: #64D2FF; stroke-width: 1.9;
}

/* Résultat : actions côte à côte */
.result-actions { display: flex; gap: 8px; margin: 10px 16px 16px; }
.result-actions .secondary-btn { margin: 0; width: auto; flex: 1; font-size: 14px; padding: 10px 8px; }

/* Lecture d'étiquette */
.scan-box { padding: 12px 0 4px; border-bottom: 0.5px solid var(--separator); }
.scan-btn { cursor: pointer; margin-top: 0; }
.scan-btn.is-busy { opacity: .6; pointer-events: none; }
.scan-tip { margin: 8px 16px 0; font-size: 13px; line-height: 1.45; color: var(--label-2); }
.scan-text pre { margin: 0 16px 12px; white-space: pre-wrap; font-size: 12px; color: var(--label-2); max-height: 180px; overflow: auto; }

/* Guide de démarrage */
.ob-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,8,30,.62);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .22s ease;
}
.ob-overlay.open { opacity: 1; }
.ob-sheet {
  position: relative;
  width: min(520px, 100%);
  max-height: 92vh; overflow: auto;
  background: #1E1F25;
  border: 0.5px solid rgba(255,255,255,.12);
  border-radius: 28px 28px 0 0;
  padding: 28px 22px calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translateY(30px); transition: transform .28s cubic-bezier(.2,.9,.18,1);
  color: var(--label);
}
.ob-overlay.open .ob-sheet { transform: none; }
@media (min-width: 600px) {
  .ob-overlay { align-items: center; }
  .ob-sheet { border-radius: 28px; }
}
.ob-skip {
  position: absolute; top: 14px; right: 14px;
  border: none; background: var(--fill-3); color: var(--label);
  border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; min-height: 36px; cursor: pointer;
}
.ob-icon {
  width: 64px; height: 64px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #2E9BFF, #0A3FA8); color: #fff;
  box-shadow: 0 8px 22px rgba(10,100,255,.4);
  margin-bottom: 16px;
}
.ob-icon svg.i { width: 32px; height: 32px; }
.ob-body h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.2; letter-spacing: -0.4px; }
.ob-text { margin: 0 0 14px; color: var(--label-2); font-size: 16px; line-height: 1.5; }
.ob-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ob-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.ob-points svg.i { color: #30D158; width: 18px; height: 18px; margin-top: 1px; }
.ob-dots { display: flex; gap: 6px; justify-content: center; margin: 22px 0 16px; }
.ob-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--fill); transition: width .2s ease, background .2s ease; }
.ob-dot.active { width: 22px; background: var(--ios-blue); }
.ob-actions { display: flex; gap: 10px; }
.ob-actions .primary-btn, .ob-actions .secondary-btn { margin: 0; width: auto; flex: 1; min-height: 50px; }

/* Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
/* Texte agrandi par l'utilisateur : les libellés peuvent passer à la ligne */
.field span { white-space: normal; }
/* v53 correctifs mise en page */
.home-hero { margin: 24px 20px 18px; }
.home-hero h1 { margin: 0 0 4px; }
.home-hero .lead { margin: 0; }
.pool-card .pool-card-label, .pool-card .pool-card-value { padding: 0 !important; }
.pool-card { margin-top: 0; }
.btn-row .primary-btn, .btn-row .secondary-btn { flex: 1; white-space: nowrap; }
[tabindex="-1"]:focus-visible { outline: none !important; }
.field span small.unit { color: var(--label-2); font-size: 14px; }
.quick-grid > :last-child:nth-child(odd) { width: 100%; justify-self: stretch; min-height: 0; }

/* v54 — Barre d'onglets : même animation quel que soit l'onglet.
   La bulle met toujours le même temps à arriver (même pour aller de
   Accueil à Espace) ; l'icône active ne monte et ne devient blanche
   qu'une fois la bulle arrivée dessous. */
.bubble { transition: transform .32s cubic-bezier(.3,.85,.25,1); }
.icon { transition: top .22s cubic-bezier(.3,.85,.25,1), color .12s ease; }
.tab.active .icon {
  transition: top .26s cubic-bezier(.2,.9,.18,1) .14s, color .14s ease .2s;
}
.tab-label { transition: transform .26s cubic-bezier(.2,.9,.18,1), color .14s ease; }
.tab.active .tab-label { transition: transform .26s cubic-bezier(.2,.9,.18,1) .14s, color .14s ease .14s; }
.tabbar .icon svg.i, .tabbar .icon svg { width: var(--icon-size); height: var(--icon-size); vertical-align: 0; }
.tab:focus-visible { outline-offset: -4px; border-radius: 999px; }
