:root {
  /* On fournit NOTRE propre thème sombre (voir @media plus bas) : les navigateurs
     mobiles utilisent alors nos couleurs lisibles au lieu d'assombrir eux-mêmes
     la page (ce qui rendait des textes invisibles). */
  color-scheme: light dark;
  /* Palette WEYKO (brand kit) */
  --blue: #2F6BFF;
  --brand-dark: #090D16; /* barres sombres de marque (header, onglets, hero) — fixes */
  --violet: #9130E6;
  --ink: #090D16;
  --grad: linear-gradient(120deg, #2F6BFF 0%, #9130E6 100%);

  --bg: #090D16;
  --card: #ffffff;
  --field-bg: #ffffff;
  --text: #0b1220;
  --text-soft: #64748b;
  --line: #e6e9f0;
  --accent: #2F6BFF;
  --accent-ink: #1e4fd6;
  --gold: #e0910a;
  --green: #16a34a;
  --red: #dc2626;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(9, 13, 22, 0.10);
  --font-brand: 'Jura', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: #f2f4f8;
  color: var(--text);
  padding: 0 16px;
  padding-bottom: env(safe-area-inset-bottom);
  max-width: 640px;
  margin-inline: auto;
}

/* -------- Header -------- */
.app-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px calc(12px + env(safe-area-inset-top));
  background: var(--brand-dark);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-family: var(--font-brand);
  font-weight: 700; font-size: 22px; letter-spacing: .22em;
  padding-left: .22em; /* compense le tracking pour centrer optiquement */
}
.brand-tag { font-size: 10.5px; letter-spacing: .04em; color: #8b93a7; margin-top: 2px; }
.icon-btn {
  background: rgba(255,255,255,.12); border: none; color: #fff;
  width: 40px; height: 40px; border-radius: 50%; font-size: 18px; cursor: pointer;
}

/* -------- Tabs -------- */
.tabs {
  display: flex; gap: 4px; padding: 10px 14px;
  background: var(--brand-dark); position: sticky; top: 62px; z-index: 15;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  /* Centré quand les onglets tiennent dans la largeur ; « safe » évite qu'ils
     soient rognés/inaccessibles au défilement sur petits écrans. */
  justify-content: safe center;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; padding: 10px 14px; border: none; border-radius: 10px;
  background: transparent; color: #8b93a7; font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: var(--font-brand); letter-spacing: .02em; white-space: nowrap;
}
.tab.is-active { background: var(--grad); color: #fff; }

/* -------- Views -------- */
.view { display: none; padding: 16px 0; }
.view.is-active { display: block; }

/* -------- Accueil -------- */
.home-hero {
  background: var(--brand-dark); color: #fff; border-radius: var(--radius);
  padding: 22px 20px; box-shadow: var(--shadow); margin-bottom: 8px;
}
.home-hero h1 { font-family: var(--font-brand); font-size: 22px; margin: 0 0 4px; letter-spacing: .01em; }
.home-hero p { margin: 0 0 16px; color: #b9c0d0; font-size: 14px; }
.home-hero .primary-btn { width: auto; padding: 12px 20px; }
.home-h2 {
  font-family: var(--font-brand); font-size: 15px; letter-spacing: .02em;
  margin: 22px 4px 10px; color: var(--text);
}
#home-recent .chip-toggle { cursor: pointer; }

/* -------- Search card -------- */
.search-card {
  background: var(--card); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px;
}
/* Bouton secondaire sur le hero sombre */
.hero-ghost {
  margin-top: 10px; width: auto; padding: 11px 18px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.22);
  color: #fff; font-family: var(--font-brand); font-weight: 600; font-size: 14px;
}
.hero-ghost:active { transform: scale(.98); }

/* Prix carburant (liste triée par prix) */
.fuel-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.fuel-row:last-child { border-bottom: none; }
.fuel-price { font-family: var(--font-brand); font-weight: 700; font-size: 18px; color: var(--ink); white-space: nowrap; min-width: 92px; }
.fuel-price span { font-size: 11px; font-weight: 600; color: var(--text-soft); }
.fuel-info { flex: 1; min-width: 0; }
.fuel-name { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.fuel-meta { margin: 2px 0 0; font-size: 12px; color: var(--text-soft); }
.fuel-best { font-size: 10px; font-weight: 700; color: #15803d; background: #dcfce7; padding: 1px 6px; border-radius: 6px; }
.fuel-best.near { color: #1e4fd6; background: #e2ebff; }

/* Question carburant (accueil) */
.fuel-ask { background: var(--card); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.fuel-ask p { margin: 0 0 10px; font-size: 14px; color: var(--text); }
.fuel-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fuel-chips button { border: 1px solid var(--line); background: #f6f8fc; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.fuel-chips button:active { transform: scale(.97); }

.perdiem-applied { font-size: 13px; color: var(--accent-ink, #1b2a4a); background: #eef7ee; border: 1px solid #cfe8cf; padding: 9px 12px; border-radius: 10px; }
.perdiem-applied .link-btn { font-size: 13px; }
.search-intro { display: flex; flex-direction: column; gap: 4px; }
.search-intro h2 { font-family: var(--font-brand); font-size: 19px; margin: 0; color: var(--ink); }
.search-intro p { margin: 0; font-size: 13.5px; color: var(--text-soft); line-height: 1.35; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label {
  font-family: var(--font-brand);
  font-size: 12.5px; font-weight: 600; letter-spacing: .03em;
  color: var(--text); display: flex; align-items: center; gap: 8px; text-transform: uppercase;
}
.input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 12px; font-size: 15px; background: var(--field-bg); color: var(--text); appearance: none;
  font-family: var(--font-body);
}
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,107,255,.14); }
.loc-row { display: flex; gap: 8px; }
.loc-row .input { flex: 1; }

/* Saisie d'adresse + autocomplétion ORS */
.addr-wrap { position: relative; margin-top: 8px; }
.suggestions {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden; max-height: 240px; overflow-y: auto;
}
.suggestion {
  padding: 11px 14px; font-size: 14px; cursor: pointer; border-bottom: 1px solid var(--line);
}
.suggestion:last-child { border-bottom: none; }
.suggestion:hover, .suggestion.active { background: rgba(47,107,255,.08); }
.suggestion .s-hint { display: block; font-size: 12px; color: var(--text-soft); padding: 8px 14px; }
.ghost-btn {
  background: #eef3ff; border: 1.5px solid #cfdcff; color: var(--accent-ink);
  border-radius: 12px; padding: 0 14px; font-size: 18px; cursor: pointer; font-weight: 600;
}
.ghost-btn.full { width: 100%; padding: 11px; margin-top: 6px; font-size: 14px; font-family: var(--font-brand); }
.hint { margin: 0; font-size: 12px; color: var(--text-soft); min-height: 14px; }

.budget-badge {
  margin-left: auto; background: var(--grad); color: #fff;
  padding: 2px 11px; border-radius: 999px; font-size: 13px; font-weight: 700;
  font-family: var(--font-brand); letter-spacing: .02em;
}
.slider { width: 100%; accent-color: var(--violet); }
.slider-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-soft); }

.more-filters summary {
  font-family: var(--font-brand); font-size: 13px; font-weight: 600; letter-spacing: .03em;
  color: var(--accent-ink); cursor: pointer; text-transform: uppercase;
}
.more-filters { display: flex; flex-direction: column; gap: 14px; }
.more-filters > *:not(summary) { margin-top: 12px; }

/* Chips de filtre (critères déplacement pro) */
.chips-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: #fff; color: #334155;
  font-size: 12.5px; font-weight: 600; user-select: none;
}
.chip-toggle.is-on {
  border-color: transparent; color: #fff; background: var(--grad);
}

/* Pastilles d'option (assistant) — plus grandes, tap-friendly */
.pill-row { display: flex; gap: 8px; margin: 4px 0 2px; }
.pill {
  flex: 1; padding: 12px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--line); background: #fff; color: #334155;
  font-size: 14px; font-weight: 600; font-family: var(--font-body);
}
.pill.is-on { border-color: transparent; color: #fff; background: var(--grad); box-shadow: 0 4px 12px rgba(47,107,255,.28); }

.primary-btn {
  background: var(--grad); color: #fff; border: none; border-radius: 12px;
  padding: 15px; font-size: 16px; font-weight: 700; cursor: pointer; width: 100%;
  font-family: var(--font-brand); letter-spacing: .04em; text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(47,107,255,.28);
}
.primary-btn:active { transform: scale(.99); }

/* -------- Results -------- */
.results { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.result-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.rc-top { display: flex; gap: 12px; padding: 14px; }
.rc-emoji {
  font-size: 30px; width: 54px; height: 54px; flex-shrink: 0;
  display: grid; place-items: center; background: #f1f4fb; border-radius: 12px;
}
.rc-emoji.rc-photo { padding: 0; overflow: hidden; }
.rc-emoji.rc-photo img { width: 100%; height: 100%; object-fit: cover; }
.rc-body { flex: 1; min-width: 0; }
.rc-name { font-family: var(--font-brand); font-size: 16px; font-weight: 700; margin: 0 0 2px; letter-spacing: .01em; }
.rc-sub { font-size: 12px; color: var(--text-soft); margin: 0 0 6px; }
.rc-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: #f1f4fb; color: #334155;
}
.chip.price { background: #ecfdf5; color: #047857; }
.chip.rating { background: #fff7ea; color: #b45309; }
.chip.dist { background: #eef3ff; color: var(--accent-ink); }
.chip.open { background: #dcfce7; color: #15803d; }
.chip.closed { background: #fee2e2; color: #b91c1c; }
.chip.community { background: #f3f0fb; color: #6b21a8; }
.chip.detour { background: #fff1e6; color: #b45309; }
.chip.detour.low { background: #dcfce7; color: #15803d; }
.chip.danger { background: #fee2e2; color: #b91c1c; }
.section-title { font-size: 13px; font-weight: 700; color: var(--text-soft); margin: 16px 4px 8px; text-transform: uppercase; letter-spacing: .04em; }
.section-title:first-child { margin-top: 4px; }
label .opt { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-soft); font-size: 11px; }

/* Sélecteur segmenté (à venir / passés) */
.segmented { display: flex; gap: 4px; background: var(--card); border-radius: 12px; padding: 4px; margin-top: 14px; box-shadow: var(--shadow); }
.seg { flex: 1; padding: 10px; border: none; border-radius: 9px; background: transparent; color: var(--text-soft); font-family: var(--font-brand); font-weight: 600; font-size: 13px; cursor: pointer; }
.seg.is-active { background: var(--grad); color: #fff; }

/* Étapes d'itinéraire */
.step-card { display: flex; align-items: center; gap: 12px; padding: 14px; }
.step-date { text-align: center; min-width: 52px; }
.step-date .d { font-family: var(--font-brand); font-size: 20px; font-weight: 700; line-height: 1; }
.step-date .m { font-size: 11px; color: var(--text-soft); text-transform: uppercase; }
.step-body { flex: 1; }
.step-city { font-family: var(--font-brand); font-weight: 700; font-size: 16px; }
.step-sub { font-size: 12px; color: var(--text-soft); }
.step-del { background: none; border: none; color: var(--red); font-size: 18px; cursor: pointer; }

/* Carte interactive du déplacement */
.trip-map { position: relative; height: 300px; width: 100%; border-radius: 16px; margin-top: 12px; overflow: hidden; box-shadow: var(--shadow); z-index: 0; background: #e9eef7; }
.leaflet-container { font-family: var(--font-body); }
.map-pin { background: none; border: none; }
.map-pin span {
  display: grid; place-items: center; width: 32px; height: 32px; font-size: 16px; line-height: 1;
  background: #fff; border: 2px solid var(--blue, #2F6BFF); border-radius: 50%;
  box-shadow: 0 2px 6px rgba(9,13,22,.3);
}

/* Explorer : bascule Liste / Carte + carte des résultats */
.results-tools { display: flex; justify-content: flex-end; margin: 14px 2px 0; }
.seg { display: inline-flex; background: #eef1f6; border-radius: 12px; padding: 3px; gap: 2px; }
.seg-btn {
  border: none; background: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--muted, #5b6472); padding: 7px 14px; border-radius: 9px; transition: background .15s, color .15s;
}
.seg-btn.is-active { background: #fff; color: var(--accent-ink, #1b2a4a); box-shadow: 0 1px 3px rgba(9,13,22,.12); }
.results-map { position: relative; height: 340px; width: 100%; border-radius: 16px; margin-top: 10px; overflow: hidden; box-shadow: var(--shadow); z-index: 0; background: #e9eef7; }
.map-pop b { font-size: 13px; }
.map-pop .mp-sub { color: #5b6472; font-size: 12px; margin: 2px 0 6px; }
.map-pop .mp-open { border: none; background: var(--blue, #2F6BFF); color: #fff; font: inherit; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 8px; cursor: pointer; }

/* Récap trajet cliquable (temps + détour → Google Maps) */
#trip-map-info.clickable {
  cursor: pointer; color: var(--accent-ink); font-weight: 600; font-size: 13px;
  background: #eef3ff; padding: 9px 12px; border-radius: 10px; margin-top: 8px;
}
#trip-map-info.clickable:active { transform: scale(.99); }

/* Plan de tournée : jours + timeline d'étapes */
.day-group { margin-top: 14px; }
.day-head { font-family: var(--font-brand); font-weight: 700; font-size: 15px; color: var(--ink); margin: 0 2px 8px; }
.timeline { display: flex; flex-direction: column; gap: 8px; }
.tl-step { display: flex; gap: 12px; background: var(--card); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); position: relative; }
.tl-step::before { content: ''; position: absolute; left: 26px; top: 40px; bottom: -12px; width: 2px; background: var(--line); }
.tl-step:last-child::before { display: none; }
.tl-dot { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #eef3ff; font-size: 15px; z-index: 1; }
.tl-body { flex: 1; min-width: 0; }
.tl-title { font-weight: 600; font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl-note { font-size: 13px; color: var(--text-soft); margin-top: 2px; }
.tl-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mini-btn { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--accent-ink); cursor: pointer; }
.mini-btn.danger { color: var(--red); }
.mini-btn.add { border-color: var(--blue, #2F6BFF); color: var(--blue, #2F6BFF); }

/* Réordonnancement des étapes : poignée de glissement + état de dépôt */
.tl-drag { cursor: grab; color: var(--text-soft); font-size: 16px; align-self: center; user-select: none; touch-action: none; }
.tl-step.dragging { opacity: .5; }
.tl-step.drop-target { outline: 2px dashed var(--blue, #2F6BFF); outline-offset: 2px; }

/* Lieux le long du trajet (affichés DANS le Trajet, sans quitter la vue) */
.trip-places { background: #f3f6ff; border: 1px solid #dfe7ff; border-radius: 14px; padding: 12px; margin: 4px 0 14px; }
.tp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 14px; }
.tp-card { display: flex; align-items: center; gap: 10px; justify-content: space-between; background: var(--card); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); margin-bottom: 8px; }
.tp-card:last-child { margin-bottom: 0; }
.tp-info { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; flex: 1; }
.tp-emoji { font-size: 20px; flex: 0 0 auto; }
.tp-name { font-weight: 600; font-size: 14px; color: var(--ink); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-sub { font-size: 12px; color: var(--text-soft); margin: 2px 0 0; }

.rc-amenities { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 14px 12px; }
.am-badge {
  font-size: 11px; padding: 3px 8px; border-radius: 8px;
  background: #f3f0fb; color: #6b21a8; font-weight: 600;
}
.rc-actions { display: flex; border-top: 1px solid var(--line); }
.rc-actions button, .rc-actions a {
  flex: 1; padding: 13px; text-align: center; font-size: 14px; font-weight: 600;
  border: none; background: none; cursor: pointer; text-decoration: none; color: var(--text);
  font-family: var(--font-brand); letter-spacing: .02em;
}
.rc-actions .book { background: var(--grad); color: #fff; }
.rc-actions .fav { color: var(--gold); border-right: 1px solid var(--line); }
.rc-actions .reviews { color: var(--accent-ink); border-right: 1px solid var(--line); }

/* -------- Soirées étapes -------- */
.soiree-intro {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px;
}
.soiree-intro p { margin: 0; font-size: 14px; color: var(--text-soft); }
.soiree-intro strong { color: var(--text); }
#soiree-form { margin-top: 12px; }
.soiree-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip.seats { background: #eef3ff; color: var(--accent-ink); }
.chip.full { background: #fee2e2; color: #b91c1c; }
.chip.host { background: #f3f0fb; color: #6b21a8; }
.soiree-note { font-size: 13px; color: var(--text); margin: 8px 14px 0; font-style: italic; }

/* Profils des participants à une table partagée */
.guest-list { display: flex; flex-direction: column; gap: 6px; padding: 4px 14px 0; }
.guest { display: flex; align-items: center; gap: 10px; }
.guest-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, var(--blue, #2F6BFF), var(--violet, #9130E6));
}
.guest-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.guest-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.guest-host { font-size: 10px; font-weight: 700; color: #6b21a8; background: #f3f0fb; border-radius: 6px; padding: 1px 5px; margin-left: 4px; }
.guest-sub { font-size: 12px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* -------- Avis collaboratifs -------- */
.star-input { display: flex; gap: 4px; font-size: 28px; }
.star-input button { background: none; border: none; cursor: pointer; color: var(--gold); padding: 0; line-height: 1; }
#review-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.reviews-list { display: flex; flex-direction: column; gap: 12px; max-height: 40vh; overflow-y: auto; }
.review-item { border-top: 1px solid var(--line); padding-top: 12px; }
.review-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.review-author { font-weight: 700; font-size: 14px; }
.review-stars { color: var(--gold); font-size: 13px; }
.review-date { font-size: 11px; color: var(--text-soft); }
.review-comment { font-size: 14px; margin: 4px 0 0; color: var(--text); }

.empty { text-align: center; color: var(--text-soft); padding: 40px 20px; font-size: 14px; }
.count-line { font-family: var(--font-brand); font-size: 13px; color: var(--text-soft); font-weight: 600; padding-left: 4px; }

/* -------- Modal -------- */
.modal { position: fixed; inset: 0; background: rgba(9,13,22,.6); display: grid; place-items: end center; z-index: 40; }
.modal[hidden] { display: none; }
.modal-card {
  background: var(--card); width: 100%; max-width: 640px; border-radius: 20px 20px 0 0;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); position: relative;
  animation: slideUp .25s ease;
  max-height: 88vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-close { position: absolute; top: 16px; right: 16px; background: #f1f4fb; border: none; width: 34px; height: 34px; border-radius: 50%; font-size: 15px; cursor: pointer; }
.modal h2 { font-family: var(--font-brand); margin: 0 0 6px; letter-spacing: .02em; }
.muted { color: var(--text-soft); font-size: 13px; margin: 0 0 16px; }
#auth-form, #account-signed-in { display: flex; flex-direction: column; gap: 12px; }
hr { border: none; border-top: 1px solid var(--line); margin: 4px 0; }
.rgpd-row { display: flex; justify-content: space-between; gap: 8px; }
.link-btn { background: none; border: none; color: var(--accent-ink); font-size: 13px; cursor: pointer; padding: 6px; font-weight: 600; }
.link-btn.danger { color: var(--red); }

/* -------- Back-office partenaire : horaires & photos -------- */
.chk { display: flex; align-items: center; gap: 8px; font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-weight: 500; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--violet); }
#f-hours-block[hidden] { display: none; }
.photo-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-item { position: relative; width: 78px; height: 78px; border-radius: 10px; overflow: hidden; background: #f1f4fb; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item button {
  position: absolute; top: 3px; right: 3px; background: rgba(9,13,22,.65); color: #fff;
  border: none; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; font-size: 11px; line-height: 1;
}

/* -------- Fiche détaillée (photos + description) -------- */
.rc-top[role="button"] { cursor: pointer; }
.rc-top[role="button"]:hover { background: rgba(47,107,255,.04); }
#detail-body { max-height: 78vh; overflow-y: auto; }
.detail-gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: -4px -4px 12px; padding: 4px; }
.detail-gallery img { height: 190px; min-width: 78%; object-fit: cover; border-radius: 14px; scroll-snap-align: center; background: #f1f4fb; }
.detail-hero { height: 150px; display: grid; place-items: center; font-size: 60px; background: #f1f4fb; border-radius: 14px; margin-bottom: 12px; }
.detail-title { font-family: var(--font-brand); margin: 0 0 2px; }
.detail-sub { margin: 0 0 10px; }
.detail-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.detail-desc { font-size: 14px; line-height: 1.5; color: var(--ink); margin: 0 0 12px; white-space: pre-line; }
.detail-line { font-size: 13px; color: var(--text-soft); margin: 6px 0; }
.detail-hours { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--text-soft); margin: 6px 0; }
.detail-day b { color: var(--ink); font-weight: 700; }

/* -------- Séparateur « ou » + Google Sign-In -------- */
.or-sep { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--text-soft); font-size: 12px; }
.or-sep::before, .or-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
#google-signin { display: flex; justify-content: center; }

/* -------- Commande vocale -------- */
.voice-fab {
  position: fixed; right: 18px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 55;
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--grad); color: #fff; font-size: 26px; box-shadow: 0 6px 18px rgba(47,107,255,.45);
}
.voice-fab.unsupported { opacity: .78; }
.voice-safety { background: #fee2e2; color: #b91c1c; font-weight: 600; font-size: 13px; padding: 10px 12px; border-radius: 10px; margin: 10px 0 14px; }
.voice-fab.is-on { animation: voicePulse 1.1s ease-in-out infinite; }
@keyframes voicePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(145,48,230,.5); } 50% { box-shadow: 0 0 0 14px rgba(145,48,230,0); } }
.voice-panel {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 55; background: var(--brand-dark); color: #fff; padding: 12px 18px; border-radius: 16px;
  max-width: 88%; text-align: center; box-shadow: var(--shadow);
}
.voice-panel span { font-family: var(--font-brand); font-weight: 600; font-size: 13px; }
.voice-panel p { margin: 6px 0 0; font-size: 14px; color: #cbd5f5; }

/* -------- Toast -------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--brand-dark); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: 14px; z-index: 60; box-shadow: var(--shadow); max-width: 90%;
}

@media (prefers-color-scheme: dark) {
  body { background: #070a11; color: #e6e9f0; }
  :root {
    --card: #141a26;
    --field-bg: #0b111c;
    --text: #e6e9f0;
    --text-soft: #94a3b8;
    --ink: #eef2f8;          /* titres lisibles (« Où est votre rendez-vous ? » était invisible) */
    --line: #263143;
    --accent-ink: #a8c0ff;   /* liens/valeurs en bleu clair lisible sur fond sombre */
  }
  .rc-emoji, .tl-dot { background: #0b111c; }
  .chip { background: #0b111c; color: #cbd5e1; }
  .chip-toggle, .pill { background: #0b111c; color: #cbd5e1; border-color: #263143; }
  .am-badge { background: #241a33; color: #d8b4fe; }
  .modal-close { background: #0b111c; color: #e6e9f0; }
  .fuel-chips button { background: #0b111c; color: #e6e9f0; }
  .seg { background: #0b111c; }
  .seg-btn.is-active { background: #1c2634; color: #fff; }
  .trip-places { background: #10182a; border-color: #263143; }
  .perdiem-applied { background: #10251a; border-color: #24512f; color: #bfe6c4; }
}
