/* LEAV·U — composants du design system. Chaque composant = une classe préfixée, états inclus.
   Règle : aucune valeur brute ici, uniquement des tokens (var(--…)). */

/* =========================================================
   1. Icônes
   ========================================================= */
.icon { width: var(--size-icon); height: var(--size-icon); flex: none; stroke: currentColor; fill: none; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: var(--size-icon-sm); height: var(--size-icon-sm); }
.icon--xs { width: 16px; height: 16px; }
.icon--lg { width: 28px; height: 28px; }
.icon--fill { fill: currentColor; stroke: none; }

/* Pastille d'icône (liste, fiche) */
.icon-tile {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text);
}
.icon-tile--fluo { background: var(--color-brand-fluo); color: var(--color-brand-nuit); }
.icon-tile--accent { background: var(--accent-bg); color: var(--accent-ink); }
.icon-tile--round { border-radius: 50%; }
.icon-tile--lg { width: 48px; height: 48px; border-radius: var(--radius-md); }

/* =========================================================
   2. Boutons — hiérarchie : primary (fluo) > strong (nuit) > secondary (tonal) > outline > text
   Une seule action primaire par écran.
   ========================================================= */
.btn {
  --btn-bg: var(--surface-2); --btn-fg: var(--text); --btn-bd: transparent;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-3);
  min-height: var(--size-button); padding: 0 var(--space-7);
  border-radius: var(--radius-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  box-shadow: inset 0 0 0 1.5px var(--btn-bd);
  font: var(--type-button-weight) var(--type-button-size)/var(--type-button-line) var(--font-ui);
  letter-spacing: var(--type-button-tracking);
  white-space: nowrap;
  transition: transform var(--motion-fast) var(--motion-ease-out), background-color var(--motion-fast), opacity var(--motion-fast);
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: var(--size-button-sm); padding: 0 var(--space-5); font-size: 15px; }
.btn--primary { --btn-bg: var(--primary); --btn-fg: var(--on-primary); }
.btn--primary:active { --btn-bg: var(--primary-pressed); }
.btn--strong { --btn-bg: var(--strong); --btn-fg: var(--on-strong); }
.btn--secondary { --btn-bg: var(--surface-2); --btn-fg: var(--text); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: var(--border-control); }
.btn--text { --btn-bg: transparent; --btn-fg: var(--text); min-height: var(--size-touch-min); padding: 0 var(--space-3); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.btn--danger { --btn-bg: transparent; --btn-fg: var(--danger-ink); --btn-bd: var(--danger-ink); }
.btn--on-fluo { --btn-bg: var(--color-brand-nuit); --btn-fg: var(--color-neutral-0); }
.btn--on-dark { --btn-bg: rgba(255,255,255,.12); --btn-fg: #fff; --btn-bd: rgba(255,255,255,.28); }
.btn--hero { min-height: 64px; font-size: 22px; letter-spacing: .02em; font-weight: 700; }
.btn[disabled], .btn.is-disabled { opacity: .4; pointer-events: none; }
.btn.is-loading { color: transparent; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--btn-fg); border-right-color: transparent;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Bouton icône rond (44 pt) */
.icon-btn {
  width: var(--size-touch-min); height: var(--size-touch-min); flex: none;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--surface); color: var(--text);
  box-shadow: var(--elevation-1);
  transition: transform var(--motion-fast) var(--motion-ease-out);
}
.icon-btn:active { transform: scale(.92); }
.icon-btn--plain { background: transparent; box-shadow: none; }
.icon-btn--tonal { background: var(--surface-2); box-shadow: none; }
.icon-btn--glass { background: rgba(23,26,31,.42); color: #fff; box-shadow: none; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.icon-btn--fluo { background: var(--color-brand-fluo); color: var(--color-brand-nuit); }
.icon-btn--strong { background: var(--strong); color: var(--on-strong); }

/* Boutons de connexion (règles Apple / Google) */
.btn-auth {
  display: flex; align-items: center; justify-content: center; gap: var(--space-3);
  width: 100%; min-height: 52px; border-radius: var(--radius-pill);
  font: 600 17px/22px var(--font-ui);
}
.btn-auth--apple { background: #000; color: #fff; }
[data-theme="dark"] .btn-auth--apple { background: #fff; color: #000; }
.btn-auth--google { background: #fff; color: #1F1F1F; box-shadow: inset 0 0 0 1px #747775; }
[data-theme="dark"] .btn-auth--google { background: #131314; color: #E3E3E3; box-shadow: inset 0 0 0 1px #8E918F; }
.btn-auth--email { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--border-control); }
.btn-auth svg { width: 20px; height: 20px; flex: none; }

/* Boutons de paiement (Apple Pay / Google Pay, maquette) */
.btn-pay { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: var(--size-button); border-radius: var(--radius-pill); background: #000; color: #fff; font: 500 19px/1 -apple-system, system-ui, sans-serif; }
[data-theme="dark"] .btn-pay { background: #fff; color: #000; }

/* =========================================================
   3. Barres de navigation
   ========================================================= */
.navbar {
  flex: none; position: relative; z-index: 10;
  display: grid; grid-template-columns: 56px 1fr 56px; align-items: center;
  min-height: 52px; padding: 0 var(--space-3);
}
.navbar__title { text-align: center; font: var(--type-headline-weight) var(--type-headline-size)/var(--type-headline-line) var(--font-ui); letter-spacing: var(--type-headline-tracking); }
.navbar__lead { justify-self: start; }
.navbar__trail { justify-self: end; display: flex; gap: var(--space-2); }
.navbar--overlay { position: absolute; top: var(--size-statusbar); left: 0; right: 0; }
.large-title { padding: var(--space-2) var(--space-gutter) var(--space-5); }
.large-title__sub { margin-top: var(--space-2); }

/* Progression d'un parcours (ex. ajout de place 1/5) */
.steps { display: flex; gap: var(--space-2); padding: 0 var(--space-gutter); }
.steps__item { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); }
.steps__item.is-done { background: var(--strong); }
.steps__label { padding: var(--space-3) var(--space-gutter) 0; }

/* =========================================================
   4. Barre d'onglets (5 destinations, action centrale LEAV)
   ========================================================= */
.tabbar {
  flex: none; position: relative; z-index: 30; margin-top: auto;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: start;
  height: calc(var(--size-tabbar) + var(--size-home-indicator));
  padding-top: var(--space-2);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.6) blur(20px); -webkit-backdrop-filter: saturate(1.6) blur(20px);
  box-shadow: 0 -0.5px 0 var(--separator);
}
.tabbar__item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-height: 48px; padding-top: 4px;
  color: var(--text-3);
  font: var(--type-tab-weight) var(--type-tab-size)/var(--type-tab-line) var(--font-ui);
  letter-spacing: var(--type-tab-tracking);
}
.tabbar__item.is-active { color: var(--text); }
.tabbar__item.is-active .icon { stroke-width: 2.2; }
.tabbar__leav { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 48px; color: var(--text-3); font: var(--type-tab-weight) var(--type-tab-size)/var(--type-tab-line) var(--font-ui); letter-spacing: var(--type-tab-tracking); }
.tabbar__leav.is-active { color: var(--text); }
.tabbar__leav.is-active .tabbar__leav-disc { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--color-brand-nuit); }
[data-theme="dark"] .tabbar__leav.is-active .tabbar__leav-disc { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--color-brand-fluo); }
.tabbar__leav-disc {
  width: 52px; height: 30px;
  display: grid; place-items: center; border-radius: var(--radius-pill);
  background: var(--color-brand-fluo); color: var(--color-brand-nuit);
}
.tabbar__leav-disc svg { width: 20px; height: 22px; }
.tabbar__leav-disc svg path, .tabbar__leav-disc svg circle { fill: currentColor; }
.tabbar__badge { position: absolute; margin-left: 18px; margin-top: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font: 600 11px/18px var(--font-ui); text-align: center; }

/* =========================================================
   5. Champs de saisie
   ========================================================= */
.field { display: grid; gap: var(--space-2); }
.field__label { font: var(--type-footnote-weight) var(--type-footnote-size)/var(--type-footnote-line) var(--font-ui); color: var(--text-2); font-weight: 500; }
.input {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: var(--size-input); padding: 0 var(--space-5);
  border-radius: var(--radius-md);
  background: var(--surface); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
  font: var(--type-body-weight) var(--type-body-size)/var(--type-body-line) var(--font-ui);
}
.input--filled { background: var(--surface-2); box-shadow: none; }
.input input, .input textarea, .input select { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0; color: inherit; font: inherit; caret-color: var(--text); }
.input input::placeholder, .input__placeholder { color: var(--text-3); }
.input:focus-within { box-shadow: inset 0 0 0 2px var(--focus); }
.input.is-error { box-shadow: inset 0 0 0 2px var(--danger-ink); }
.field__error { color: var(--danger-ink); font-size: 13px; line-height: 18px; display: flex; gap: var(--space-2); align-items: center; }
.input__value { flex: 1; min-width: 0; }
.input .icon { color: var(--text-2); }

/* Champ recherche (pilule) */
.search {
  display: flex; width: 100%; text-align: left; align-items: center; gap: var(--space-3);
  min-height: 52px; padding: 0 var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--text-3);
  font: var(--type-callout-weight) var(--type-callout-size)/var(--type-callout-line) var(--font-ui);
}
.search .icon { color: var(--text); }
.search--elevated { background: var(--surface); box-shadow: var(--elevation-2); }

/* Paire de champs horaires (Arrivée / Départ) */
.time-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.time-cell { padding: var(--space-3) var(--space-5); min-height: 64px; border-radius: var(--radius-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); display: grid; align-content: center; gap: 2px; }
.time-cell__label { font: 500 12px/16px var(--font-ui); color: var(--text-2); }
.time-cell__value { font: 600 20px/26px var(--font-numeric); font-variant-numeric: tabular-nums; }
.time-cell.is-active { box-shadow: inset 0 0 0 2px var(--focus); }

/* Code OTP */
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--space-2); }
.otp__cell { height: 60px; border-radius: var(--radius-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); display: grid; place-items: center; font: 600 24px/1 var(--font-numeric); }
.otp__cell.is-active { box-shadow: inset 0 0 0 2px var(--focus); }

/* =========================================================
   6. Contrôles de sélection
   ========================================================= */
/* Contrôle segmenté */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: var(--radius-pill); background: var(--surface-2); }
.segmented__item { min-height: 38px; border-radius: var(--radius-pill); font: 500 14px/18px var(--font-ui); color: var(--text-2); }
.segmented__item.is-active { background: var(--strong); color: var(--on-strong); font-weight: 600; }

/* Chips (filtres / choix) */
.chips { display: flex; gap: var(--space-2); overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: var(--space-2); flex: none;
  min-height: 40px; padding: 0 var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
  font: 500 15px/20px var(--font-ui);
}
.chip.is-active { background: var(--strong); color: var(--on-strong); box-shadow: none; }
.chip--fluo.is-active { background: var(--color-brand-fluo); color: var(--color-brand-nuit); }
.chip .icon { width: 18px; height: 18px; }

/* Tuiles de choix (type de place, véhicule) */
.choice-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.choice-grid--3 { grid-template-columns: repeat(3, 1fr); }
.choice-grid--2 { grid-template-columns: repeat(2, 1fr); }
.choice {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 84px; padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-md);
  background: var(--surface); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
  font: 500 12px/16px var(--font-ui); text-align: center;
}
.choice.is-active { box-shadow: inset 0 0 0 2px var(--strong); background: var(--surface); }
.choice.is-active .icon-tile { background: var(--color-brand-fluo); color: var(--color-brand-nuit); }
.choice--row { flex-direction: row; justify-content: flex-start; min-height: 64px; padding: 0 var(--space-5); gap: var(--space-4); font: 500 16px/22px var(--font-ui); text-align: left; }
.choice--row .choice__check { margin-left: auto; }

/* Interrupteur (switch) */
.switch { position: relative; width: 51px; height: 31px; flex: none; border-radius: 16px; background: var(--surface-3); transition: background var(--motion-base) var(--motion-ease-out); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: translate var(--motion-base) var(--motion-spring); }
.switch.is-on { background: var(--color-brand-fluo); }
.switch.is-on::after { translate: 20px 0; background: var(--color-brand-nuit); }
[data-theme="dark"] .switch { background: var(--color-neutral-700); }
[data-theme="dark"] .switch.is-on { background: var(--color-brand-fluo); }

/* Bouton radio / case */
.radio { width: 24px; height: 24px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--border-control); display: grid; place-items: center; }
.radio.is-on { box-shadow: inset 0 0 0 7px var(--strong); }
.check { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--color-brand-fluo); color: var(--color-brand-nuit); }

/* Notation étoiles */
.stars { display: flex; gap: var(--space-2); justify-content: center; }
.stars .icon { width: 36px; height: 36px; color: var(--text-3); }
.stars .is-on .icon { color: var(--color-brand-fluo); fill: var(--color-brand-fluo); stroke: var(--success-ink); }
[data-theme="dark"] .stars .is-on .icon { stroke: var(--color-brand-fluo); }
.rating { display: inline-flex; align-items: center; gap: 4px; font: 600 14px/18px var(--font-ui); font-variant-numeric: tabular-nums; }
.rating .icon { width: 16px; height: 16px; fill: currentColor; stroke: none; color: var(--text); }
.rating__count { color: var(--text-2); font-weight: 400; }

/* =========================================================
   7. Listes groupées
   ========================================================= */
.list { border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.list--plain { background: transparent; border-radius: 0; }
.list__header { padding: var(--space-6) var(--space-gutter) var(--space-3); }
.list-row {
  position: relative;
  display: flex; align-items: center; gap: var(--space-4);
  min-height: var(--size-row); padding: var(--space-3) var(--space-5);
  width: 100%; text-align: left;
}
.list-row + .list-row::before { content: ""; position: absolute; top: 0; right: 0; left: calc(var(--space-5) + 40px + var(--space-4)); height: 1px; background: var(--separator); }
.list-row--no-icon + .list-row--no-icon::before { left: var(--space-5); }
.list-row__text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.list-row__title { font: 500 16px/22px var(--font-ui); }
.list-row__sub { font: 400 13px/18px var(--font-ui); color: var(--text-2); }
.list-row__value { color: var(--text-2); font: 400 15px/20px var(--font-ui); font-variant-numeric: tabular-nums; }
.list-row__chevron { color: var(--text-3); width: 20px; height: 20px; }
.list-row:active { background: var(--surface-2); }
.list-row--danger .list-row__title { color: var(--danger-ink); }

/* Lignes clé / valeur (récapitulatifs) */
.kv { display: grid; gap: var(--space-3); }
.kv__row { display: flex; justify-content: space-between; gap: var(--space-4); font: 400 15px/20px var(--font-ui); color: var(--text-2); font-variant-numeric: tabular-nums; }
.kv__row strong { color: var(--text); font-weight: 500; }
.kv__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--space-4); border-top: 1px solid var(--separator); font: 700 20px/26px var(--font-display); font-variant-numeric: tabular-nums; }

/* =========================================================
   8. Cartes et blocs
   ========================================================= */
.card { border-radius: var(--radius-lg); background: var(--surface); padding: var(--space-5); }
.card--flat { background: var(--surface-2); }
.card--outline { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.card--elevated { box-shadow: var(--elevation-2); }
.card--night { background: var(--color-brand-nuit); color: var(--color-neutral-25); }
.card--fluo { background: var(--color-brand-fluo); color: var(--color-brand-nuit); }

/* Carte place (résultat) */
.spot-card { display: grid; grid-template-columns: 96px 1fr; gap: var(--space-4); padding: var(--space-3); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--elevation-2); text-align: left; width: 100%; }
.spot-card__photo { width: 96px; height: 112px; border-radius: var(--radius-md); object-fit: cover; background: var(--surface-2); }
.spot-card__body { display: grid; align-content: start; gap: 2px; padding: var(--space-1) var(--space-2) 0 0; min-width: 0; }
.spot-card__price { margin-top: var(--space-2); font: 700 20px/24px var(--font-numeric); font-variant-numeric: tabular-nums; }
.spot-card__price small { font: 500 14px/18px var(--font-ui); color: var(--text-2); }

/* Prix */
.price { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-weight: 700; }
.price__unit { font-family: var(--font-ui); font-weight: 500; color: var(--text-2); font-size: .6em; }

/* Bandeau d'information */
.banner { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); background: var(--surface-2); font: 400 14px/20px var(--font-ui); }
.banner--success { background: var(--success-bg); }
.banner--accent { background: var(--accent-bg); }
.banner--warning { background: var(--warning-bg); }
.banner--danger { background: var(--danger-bg); }
.banner .icon { flex: none; margin-top: 1px; }
.banner--success .icon { color: var(--success-ink); }
.banner--accent .icon { color: var(--accent-ink); }
.banner--warning .icon { color: var(--warning-ink); }
.banner--danger .icon { color: var(--danger-ink); }

/* Statut (pastille) */
.status { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 var(--space-3); border-radius: var(--radius-pill); font: 600 12px/16px var(--font-ui); letter-spacing: .02em; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--live { background: var(--color-brand-fluo); color: var(--color-brand-nuit); }
.status--live::before { background: var(--color-brand-nuit); }
.status--busy { background: var(--accent-bg); color: var(--accent-ink); }
.status--off { background: var(--surface-2); color: var(--text-2); }
.status--warn { background: var(--warning-bg); color: var(--warning-ink); }
.status--no-dot::before { display: none; }

/* Équipements (grille 2 colonnes) */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.feature { display: flex; align-items: center; gap: var(--space-3); min-height: 44px; padding: 0 var(--space-4); border-radius: var(--radius-md); background: var(--surface-2); font: 500 14px/18px var(--font-ui); }
.feature .icon { width: 20px; height: 20px; }

/* Avatar */
.avatar { width: var(--size-avatar); height: var(--size-avatar); flex: none; border-radius: 50%; object-fit: cover; background: var(--surface-3); }
.avatar--sm { width: 36px; height: 36px; }
.avatar--lg { width: 72px; height: 72px; }
.avatar--xl { width: 88px; height: 88px; }
.host { display: flex; align-items: center; gap: var(--space-4); }

/* Statistiques (revenus) */
.stats { display: grid; gap: var(--space-3); }
.stat-row { display: flex; justify-content: space-between; align-items: baseline; font: 400 15px/20px var(--font-ui); color: var(--text-2); }
.stat-row strong { color: var(--text); font: 600 17px/22px var(--font-numeric); font-variant-numeric: tabular-nums; }

/* Graphique en barres (SVG/HTML) */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.bars__bar { flex: 1; border-radius: 4px 4px 2px 2px; background: var(--surface-3); min-height: 6px; }
.bars__bar.is-current { background: var(--color-brand-fluo); }
[data-theme="light"] .bars__bar.is-current, :root:not([data-theme="dark"]) .bars__bar.is-current { box-shadow: inset 0 0 0 1px var(--color-fluo-600); }
.bars__labels { display: flex; gap: 6px; margin-top: var(--space-2); }
.bars__labels span { flex: 1; text-align: center; font: 500 10px/12px var(--font-ui); color: var(--text-3); }

/* Notification */
.notif { display: grid; grid-template-columns: 44px 1fr auto; gap: var(--space-4); align-items: start; padding: var(--space-4) 0; }
.notif + .notif { border-top: 1px solid var(--separator); }
.notif__time { font: 400 12px/16px var(--font-ui); color: var(--text-3); font-variant-numeric: tabular-nums; }
.notif.is-unread .notif__title::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--accent); vertical-align: middle; }

/* Minuteur (stationnement en cours) */
.timer { position: relative; width: 236px; height: 236px; margin: 0 auto; display: grid; place-items: center; }
.timer svg { position: absolute; inset: 0; rotate: -90deg; overflow: visible; }
.timer__track { stroke: rgba(255,255,255,.12); }
.timer__progress { stroke: var(--color-brand-fluo); stroke-linecap: round; transition: stroke-dashoffset 1s linear; filter: drop-shadow(0 0 10px rgba(198,255,0,.45)); }
.timer__value { font: var(--type-timer-weight) var(--type-timer-size)/var(--type-timer-line) var(--font-numeric); font-variant-numeric: tabular-nums; letter-spacing: var(--type-timer-tracking); }
.timer__label { margin-top: var(--space-2); font: 500 14px/18px var(--font-ui); color: var(--color-neutral-300); }

/* Grille photos */
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.photo-grid__item { position: relative; aspect-ratio: 1; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-2); }
.photo-grid__item img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid__item--main { grid-column: span 2; aspect-ratio: 16/10; }
.photo-grid__add { display: grid; place-items: center; align-content: center; gap: var(--space-2); color: var(--text-2); box-shadow: inset 0 0 0 1.5px var(--border-control); background: transparent; font: 500 13px/18px var(--font-ui); border-radius: var(--radius-md); }
.photo-grid__tag { position: absolute; left: var(--space-3); bottom: var(--space-3); }

/* Galerie (fiche place) */
.gallery { position: relative; height: 300px; flex: none; overflow: hidden; background: var(--surface-2); }
.gallery__track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track img { flex: none; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.gallery__dots { position: absolute; left: 0; right: 0; bottom: 34px; display: flex; justify-content: center; gap: 6px; }
.gallery__dots span { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.55); transition: width var(--motion-base) var(--motion-ease-out); }
.gallery__dots span.is-active { width: 18px; background: #fff; }

/* Pagination (onboarding) */
.dots { display: flex; gap: 6px; }
.dots span { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.4); transition: width var(--motion-base) var(--motion-ease-out), background var(--motion-base); }
.dots span.is-active { width: 22px; background: var(--color-brand-fluo); }

/* =========================================================
   9. Feuilles (bottom sheets) et fenêtres
   ========================================================= */
.sheet-host { position: absolute; inset: 0; z-index: 80; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-host__scrim { position: absolute; inset: 0; background: var(--scrim); animation: fade-in var(--motion-base) var(--motion-ease-out); }
.sheet {
  position: relative; z-index: 1;
  max-height: calc(100% - 64px);
  display: flex; flex-direction: column;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--surface); color: var(--text);
  padding: var(--space-3) var(--space-gutter) calc(var(--size-home-indicator) + var(--space-3));
  box-shadow: var(--elevation-3);
  animation: sheet-in var(--motion-slow) var(--motion-ease-out);
}
.sheet__grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 0 auto var(--space-4); flex: none; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.sheet__body { overflow-y: auto; scrollbar-width: none; }
.sheet--inline { position: absolute; left: 0; right: 0; bottom: 0; animation: none; box-shadow: 0 -8px 30px -12px rgba(15,17,20,.25); z-index: 20; }
.sheet-host.is-closing .sheet { animation: sheet-out var(--motion-base) var(--motion-ease-in-out) forwards; }
.sheet-host.is-closing .sheet-host__scrim { animation: fade-out var(--motion-base) forwards; }
@keyframes sheet-in { from { translate: 0 100%; } }
@keyframes sheet-out { to { translate: 0 100%; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* Alerte (dialog système) */
.alert-host { position: absolute; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--scrim); animation: fade-in var(--motion-fast); }
.alert { width: 290px; border-radius: var(--radius-lg); background: var(--surface); text-align: center; overflow: hidden; animation: alert-in var(--motion-base) var(--motion-ease-out); }
.alert__body { padding: var(--space-6) var(--space-5) var(--space-5); display: grid; gap: var(--space-2); }
.alert__actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--separator); }
.alert__actions button { min-height: 48px; font: 500 16px/20px var(--font-ui); }
.alert__actions button + button { border-left: 1px solid var(--separator); font-weight: 600; }
@keyframes alert-in { from { scale: 1.1; opacity: 0; } }

/* Toast / snackbar */
.toast { position: absolute; z-index: 95; left: var(--space-gutter); right: var(--space-gutter); bottom: calc(var(--size-home-indicator) + 76px); display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); background: var(--surface-inverse); color: var(--text-inverse); font: 500 15px/20px var(--font-ui); box-shadow: var(--elevation-3); animation: toast-in var(--motion-base) var(--motion-ease-out); }
@keyframes toast-in { from { translate: 0 16px; opacity: 0; } }

/* Notification push (aperçu bannière iOS) */
.push { position: absolute; z-index: 96; top: 58px; left: 10px; right: 10px; display: grid; grid-template-columns: 38px 1fr auto; gap: var(--space-3); padding: 14px; border-radius: 22px; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: var(--elevation-3); animation: push-in var(--motion-slow) var(--motion-ease-out); text-align: left; }
.push__icon { width: 38px; height: 38px; border-radius: 9px; }
@keyframes push-in { from { translate: 0 -120%; } }

/* États vides */
.empty { display: grid; justify-items: center; text-align: center; gap: var(--space-3); padding: var(--space-10) var(--space-6); }
.empty__art { width: 120px; height: 120px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); margin-bottom: var(--space-3); }

/* Squelette de chargement */
.skeleton { border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Séparateur */
.divider { height: 1px; background: var(--separator); border: 0; margin-inline: 0; margin-bottom: 0; }
.divider:not([class*="mt-"]) { margin-top: 0; }
.or { display: flex; align-items: center; gap: var(--space-4); color: var(--text-3); font: 500 13px/18px var(--font-ui); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--separator); }

/* =========================================================
   10. Carte géographique et pointeurs LEAV·U
   ========================================================= */
.map { position: absolute; inset: 0; background: var(--map-land); overflow: hidden; }
.map canvas { outline: none; }
.map__fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.map .maplibregl-ctrl-bottom-left { top: auto !important; bottom: calc(var(--map-attr-bottom, 0px) + 8px) !important; }
.map .maplibregl-ctrl-attrib.maplibregl-compact { margin: 0 0 0 10px; }
.map-controls { position: absolute; z-index: 15; right: var(--space-4); display: grid; gap: var(--space-3); }

/* Pointeur : bulle anthracite + pictogramme U·point vert fluo */
.pin { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 8px; border-radius: 14px; background: var(--color-brand-anthracite); color: #fff; box-shadow: 0 0 0 2px #fff, 0 6px 14px -4px rgba(15,17,20,.45); font: 700 14px/1 var(--font-numeric); font-variant-numeric: tabular-nums; cursor: pointer; transform-origin: 50% 100%; transition: transform var(--motion-base) var(--motion-spring), background var(--motion-fast); }
.pin::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; translate: -50% 0; rotate: 45deg; border-radius: 0 0 4px 0; background: inherit; box-shadow: 2px 2px 0 0 #fff; z-index: -1; }
.pin__glyph { width: 22px; height: 24px; flex: none; }
.pin__glyph path, .pin__glyph circle { fill: var(--color-brand-fluo); }
.pin--solo { padding: 0; width: 40px; justify-content: center; }
.pin.is-selected { background: var(--color-brand-fluo); color: var(--color-brand-nuit); transform: scale(1.18); z-index: 5; box-shadow: 0 0 0 2px var(--color-brand-nuit), 0 10px 22px -6px rgba(15,17,20,.45); }
.pin.is-selected::after { box-shadow: 2px 2px 0 0 var(--color-brand-nuit); }
.pin.is-selected .pin__glyph path, .pin.is-selected .pin__glyph circle { fill: var(--color-brand-nuit); }
.pin--ev .pin__glyph path, .pin--ev .pin__glyph circle { fill: var(--color-brand-magenta); }
.pin--off { background: var(--color-neutral-400); }
.pin--off .pin__glyph path, .pin--off .pin__glyph circle { fill: #fff; }
[data-theme="dark"] .pin { box-shadow: 0 0 0 2px var(--color-neutral-700), 0 6px 14px -4px rgba(0,0,0,.6); }
[data-theme="dark"] .pin::after { box-shadow: 2px 2px 0 0 var(--color-neutral-700); }
.pin__more { position: absolute; top: -9px; left: -9px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--color-brand-nuit); color: var(--color-brand-fluo); box-shadow: 0 0 0 2px #fff; font: 700 11px/22px var(--font-numeric); text-align: center; }
.pin__from { font: 600 12px/1 var(--font-numeric); color: var(--color-neutral-300); }
.pin--cluster { background: var(--color-brand-nuit); box-shadow: 0 0 0 2px var(--color-brand-fluo), 0 6px 14px -4px rgba(15,17,20,.45); }
.pin--cluster::after { box-shadow: 2px 2px 0 0 var(--color-brand-fluo); }
.pin-cluster { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--color-brand-anthracite); color: var(--color-brand-fluo); box-shadow: 0 0 0 2px #fff, 0 0 0 8px rgba(38,42,49,.18); font: 700 15px/1 var(--font-numeric); }

/* Position de l'utilisateur */
.me-dot { position: relative; z-index: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--color-brand-nuit); box-shadow: 0 0 0 4px #fff, 0 4px 10px rgba(0,0,0,.3); }
.me-dot::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--color-brand-fluo); }
.me-dot::after { content: ""; position: absolute; inset: -22px; border-radius: 50%; background: rgba(198,255,0,.25); animation: pulse 2.4s var(--motion-ease-out) infinite; z-index: -1; }
@keyframes pulse { from { scale: .4; opacity: 1; } to { scale: 1.3; opacity: 0; } }

/* Destination */
.dest-pin { width: 32px; height: 32px; border-radius: 50% 50% 50% 4px; rotate: -45deg; background: var(--color-brand-nuit); box-shadow: 0 0 0 3px #fff; display: grid; place-items: center; }
.dest-pin::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; }

/* =========================================================
   11. Écrans photo plein cadre (splash, onboarding)
   ========================================================= */
.hero-photo { position: absolute; inset: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,17,20,.55) 0%, rgba(15,17,20,0) 34%, rgba(15,17,20,0) 52%, rgba(15,17,20,.92) 100%); }
.hero-photo--top::after { background: linear-gradient(180deg, rgba(15,17,20,.9) 0%, rgba(15,17,20,.35) 40%, rgba(15,17,20,0) 60%, rgba(15,17,20,.85) 100%); }
.on-photo { position: relative; z-index: 2; color: #fff; }
.on-photo .c-2 { color: rgba(255,255,255,.78); }

/* Logo */
.logo { display: block; height: auto; }
/* Ordre d'empilement sur la carte : position utilisateur sous les pointeurs */
.map__markers > div:has(.me-dot), .maplibregl-marker.me-dot { z-index: 0 !important; }
.map__markers > div:has(.pin), .maplibregl-marker.pin { z-index: 1 !important; }
.map__markers > div:has(.is-selected), .maplibregl-marker.is-selected { z-index: 2 !important; }
.maplibregl-ctrl-attrib-static { z-index: 15; }

.map__markers > div:has(.dest-pin), .maplibregl-marker.dest-pin { z-index: 0 !important; }

/* Zone de toucher des pointeurs : 48 pt minimum (taille visuelle 40) */
.pin::before { content: ""; position: absolute; inset: -4px; }
