/* Beer Sheva, le guide — dans l'esprit du guide PDF de Hanna : page blanche, gros titres caramel, touches de vert d'eau. Thème clair uniquement. */

@font-face { font-family: "Rubik"; src: url("../fonts/rubik-latin.woff2") format("woff2"); font-weight: 300 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Rubik"; src: url("../fonts/rubik-cyrillic.woff2") format("woff2"); font-weight: 300 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Rubik"; src: url("../fonts/rubik-hebrew.woff2") format("woff2"); font-weight: 300 900; font-display: swap; unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
/* Police au choix de Hanna (mode édition, Couleurs et style) : chargée seulement si elle la choisit. */
@font-face { font-family: "Playfair"; src: url("../fonts/playfair-latin.woff2") format("woff2"); font-weight: 400 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC; }
@font-face { font-family: "Playfair"; src: url("../fonts/playfair-cyrillic.woff2") format("woff2"); font-weight: 400 900; font-display: swap; unicode-range: U+0400-045F, U+0490-0491; }
@font-face { font-family: "Playfair"; src: url("../fonts/frankruhl-hebrew.woff2") format("woff2"); font-weight: 300 900; font-display: swap; unicode-range: U+0590-05FF, U+FB1D-FB4F; }

:root {
  /* palette */
  --cream: #FFF8F0;
  --cream-dark: #F5EDE3;
  --sand: #E8D5B7;
  --white: #FFFFFF;
  --terracotta: #A5623A;
  --terracotta-deep: #8A4F2D;
  --blue-deep: #2B4C6F;
  --blue-light: #E8F1F8;
  --ink: #2D2A26;
  --ink-soft: #5A5650;
  --red: #B3261E;
  --red-light: #FCEBE9;
  --olive: #55733A;
  --olive-light: #EAF1E0;
  --water: #2A6A90;
  --water-light: #E1EFF7;
  --teal: #2B7070;
  --teal-light: #DFEFEE;
  --ochre: #8F6210;
  --ochre-light: #F7EBCF;
  --coral: #B24E2B;
  --coral-light: #FBE5DA;
  --leaf: #2C7050;
  --leaf-light: #E0F0E7;
  --rust: #8A3F2B;
  --rust-light: #F6E2DA;
  /* couleurs du guide de Hanna (logo et mise en page Canva) */
  --paper: #FFFCF8;
  --caramel: #C8956A;
  --caramel-title: #B98154;
  --caramel-deep: #9C6638;
  --caramel-soft: #F3E3D3;
  --sea: #5FA8A0;
  --teal-deep: #2F7A72;
  --sea-soft: #E3F1EF;
  --navy: #23365C;
  --charcoal: #3E3A3A;

  /* rôles */
  --bg: var(--paper);
  --surface: var(--white);
  --surface-soft: var(--caramel-soft);
  --border: var(--sand);
  --text: var(--ink);
  --text-muted: var(--ink-soft);
  --accent: var(--caramel-deep);
  --accent-strong: var(--charcoal);
  --title: var(--caramel-title);
  --on-accent: var(--white);
  --info: var(--blue-deep);
  --info-soft: var(--blue-light);
  --danger: var(--red);
  --danger-soft: var(--red-light);
  --success: var(--leaf);
  --success-soft: var(--leaf-light);
  --cat: var(--accent);
  --cat-soft: var(--surface-soft);

  --radius-card: 20px;
  --radius-control: 12px;
  --shadow: 0 1px 2px rgb(90 60 30 / 6%), 0 8px 22px rgb(90 60 30 / 8%);
  --shadow-lift: 0 2px 4px rgb(90 60 30 / 8%), 0 16px 34px rgb(90 60 30 / 14%);
  --gutter: 16px;
  --tabbar-h: 68px; /* hauteur ; « --tabbar » est la couleur réglable par Hanna (theme-extra.css) */
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Rubik", system-ui, sans-serif;
}

.tile--parks, .page-head--parks { --cat: var(--olive); --cat-soft: var(--olive-light); }
.tile--pools, .page-head--pools { --cat: var(--water); --cat-soft: var(--water-light); }
.tile--mikveh, .page-head--mikveh { --cat: var(--teal); --cat-soft: var(--teal-light); }
.tile--shopping, .page-head--shopping { --cat: var(--ochre); --cat-soft: var(--ochre-light); }
.tile--kids, .page-head--kids { --cat: var(--coral); --cat-soft: var(--coral-light); }
.tile--culture, .page-head--culture { --cat: var(--blue-deep); --cat-soft: var(--blue-light); }
.tile--emergency, .page-head--emergency { --cat: var(--red); --cat-soft: var(--red-light); }
.tile--pharmacy, .page-head--pharmacy { --cat: var(--leaf); --cat-soft: var(--leaf-light); }
.tile--events, .page-head--events { --cat: var(--rust); --cat-soft: var(--rust-light); }
.tile--settle, .page-head--settle { --cat: var(--terracotta); --cat-soft: var(--cream-dark); }
.tile--food, .page-head--food { --cat: var(--caramel-deep); --cat-soft: var(--caramel-soft); }
.tile--quartiers, .page-head--quartiers { --cat: var(--navy); --cat-soft: var(--blue-light); }
.tile--adg, .page-head--adg { --cat: var(--teal-deep); --cat-soft: var(--sea-soft); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }

.app { max-width: 640px; margin: 0 auto; padding-bottom: calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); overflow-x: clip; }
.icon { flex: none; }

/* ---------- langues ---------- */
.langbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; gap: 4px;
  padding: calc(8px + env(safe-area-inset-top)) var(--gutter) 8px;
  background: rgb(255 252 248 / 88%);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.langbar__btn {
  flex: 1 1 0; min-height: 44px; padding: 0 6px;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--text-muted); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}
.langbar__btn--on { background: var(--ink); color: var(--cream); font-weight: 600; }

/* ---------- accueil ---------- */
.view { padding: 0 var(--gutter); display: flex; flex-direction: column; gap: 20px; }
.view--loading { padding-top: 16px; }
.skeleton { height: 150px; border-radius: var(--radius-card); background: var(--surface-soft); }

.search {
  display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 0 14px; min-height: 54px;
  border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-muted);
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgb(165 98 58 / 16%); }
.search__input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; outline: none; }

.home-body { display: flex; flex-direction: column; gap: 28px; }
.block { display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head__title, .block__title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 900; line-height: 1.1; text-transform: uppercase; letter-spacing: -0.01em; color: var(--title); text-wrap: balance; }
.section-head__link { color: var(--accent); font-size: 14px; font-weight: 600; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.section-head__aside { color: var(--text-muted); font-size: 14px; text-align: end; }

.today { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; }
.pulse-card { display: flex; flex-direction: column; gap: 4px; min-height: 112px; padding: 14px; border-radius: var(--radius-card); text-decoration: none; }
.pulse-card--pharmacy { background: var(--leaf-light); color: var(--ink); }
.pulse-card--events { background: var(--ink); color: var(--cream); }
.pulse-card__kicker { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.pulse-card--pharmacy .pulse-card__kicker { color: var(--leaf); }
.pulse-card__main { font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.pulse-card__main--figure { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; }
.pulse-card__sub { margin-top: auto; font-size: 14px; font-variant-numeric: tabular-nums; opacity: 0.85; text-align: start; }

.live-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: currentColor; }

.rail {
  display: flex; gap: 12px; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.poster { flex: none; width: 164px; display: flex; flex-direction: column; gap: 4px; scroll-snap-align: start; text-decoration: none; }
.poster--wide { width: 248px; }
.poster__frame { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 18px; background: var(--surface-soft); box-shadow: var(--shadow); }
.poster--wide .poster__frame { aspect-ratio: 4 / 3; }
.poster__img { width: 100%; height: 100%; object-fit: cover; }
.poster__img--missing { visibility: hidden; }
.poster__date {
  position: absolute; inset-inline-start: 8px; bottom: 8px; max-width: calc(100% - 16px);
  padding: 3px 10px; border-radius: 999px; background: var(--cream); color: var(--ink); font-size: 12px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.poster__title { margin-top: 4px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.poster__sub { color: var(--text-muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 132px; padding: 14px;
  border-radius: var(--radius-card); background: var(--cat-soft); text-decoration: none; overflow: hidden;
}
.tile__icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 10px; border-radius: 16px; background: var(--cat); color: var(--white); }
.tile__title { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.tile__sub { color: var(--text-muted); font-size: 13.5px; line-height: 1.35; }
.tile--events, .tile--emergency { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; gap: 14px; flex-wrap: wrap; }
.tile--events .tile__icon, .tile--emergency .tile__icon { margin-bottom: 0; }

.install {
  display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 16px;
  border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer;
}
.install--hint { border-style: dashed; border-color: var(--border); font-weight: 400; cursor: default; padding: 12px 16px; text-align: center; border-radius: var(--radius-card); }

/* ---------- pages ---------- */
.toolbar, .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text);
  font: inherit; font-size: 15px; cursor: pointer;
}
.chip--on { background: var(--ink); border-color: var(--ink); color: var(--cream); font-weight: 600; }
.count, .source { color: var(--text-muted); font-size: 14px; }
.empty { padding: 24px 0; color: var(--text-muted); text-align: center; }
.notice { padding: 12px 14px; border-radius: var(--radius-control); background: var(--info-soft); color: var(--info); font-size: 15px; }
.list { display: flex; flex-direction: column; gap: 14px; }

/* ---------- fiches ---------- */
.card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.card--compact { box-shadow: none; }
.card--accent { border: 2px solid var(--leaf); }
.card--focus { border-color: var(--accent); }
.card__photo { width: calc(100% + 32px); max-width: none; height: auto; margin: -16px -16px 6px; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-soft); }
.card__eyebrow { color: var(--text-muted); font-size: 12.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.card__eyebrow--strong { color: var(--accent); text-transform: none; letter-spacing: 0.01em; font-size: 13.5px; }
.card__title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; line-height: 1.22; overflow-wrap: anywhere; }
.card__he { margin-top: -4px; color: var(--text-muted); font-size: 15px; text-align: start; }
.card__addr, .card__meta { display: flex; align-items: flex-start; gap: 6px; color: var(--text-muted); font-size: 15px; }
.card__addr .icon, .card__meta .icon { margin-top: 3px; }
.card__dist { margin-inline-start: auto; padding-inline-start: 8px; color: var(--info); font-weight: 600; white-space: nowrap; }
.card__note { font-size: 15px; text-wrap: pretty; }
.card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 14px;
  border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text);
  font-size: 15px; font-weight: 600; text-decoration: none;
}
.btn--primary { flex: 1 1 auto; background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--primary:active { background: var(--accent-strong); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.badge--open { background: var(--success-soft); color: var(--success); }
.badge--closed { background: var(--surface-soft); color: var(--text-muted); }
.hours summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; }
.hours summary::-webkit-details-marker { display: none; }
.hours__label { color: var(--info); font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.hours__rows { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; padding: 4px 0 8px; font-size: 15px; }
.hours__rows dt { color: var(--text-muted); }
.hours__rows dd { font-variant-numeric: tabular-nums; text-align: start; }
[dir="rtl"] .hours__rows dd { text-align: end; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: 3px 10px; border-radius: 999px; background: var(--surface-soft); font-size: 13px; font-weight: 600; }

.phone-list { display: flex; flex-direction: column; }
.phone-row, .dial { display: flex; align-items: center; gap: 10px; min-height: 50px; border-top: 1px solid var(--border); font-size: 15px; text-decoration: none; }
.phone-row__num, .dial__num { margin-inline-start: auto; color: var(--info); font-weight: 700; font-variant-numeric: tabular-nums; }

.event { flex-direction: row; gap: 12px; }
.event__img { flex: none; width: 92px; height: 92px; border-radius: 14px; object-fit: cover; background: var(--surface-soft); }
.event__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.event .card__title { font-size: 1.12rem; }

/* ---------- urgence ---------- */
.block--soft { padding: 16px; border-radius: var(--radius-card); background: var(--surface-soft); }
.block__text { color: var(--text-muted); font-size: 15px; text-wrap: pretty; }
.block__text--strong { color: var(--text); font-weight: 600; }
.alert { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius-card); background: var(--danger); color: var(--white); }
.alert__title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; line-height: 1.15; }
.dials { display: flex; flex-direction: column; padding: 0 14px; border-radius: 16px; background: var(--surface); color: var(--text); }
.dials .dial:first-child { border-top: 0; }
.dial__label { font-weight: 600; }
.alert .dial__num { color: var(--danger); font-size: 1.2rem; }
.steps { display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.step--plain { padding: 0; border: 0; background: transparent; }
.step--plain .dials { border: 1px solid var(--border); }
.step__title { font-size: 1.05rem; line-height: 1.3; }

.footer { display: flex; flex-direction: column; gap: 6px; padding: 8px 0 16px; color: var(--text-muted); font-size: 13px; }
.footer__link { min-height: 44px; display: inline-flex; align-items: center; color: var(--accent); font-weight: 600; }
.credits { display: flex; flex-direction: column; }
.credit { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid var(--border); font-size: 14px; overflow-wrap: anywhere; }
.credit a { color: var(--info); font-weight: 600; }
.credit span { color: var(--text-muted); }

/* ---------- barre d'onglets ---------- */
.tabbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  max-width: 640px; margin: 0 auto; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border); background: rgb(255 252 248 / 94%);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; min-height: 56px; border-radius: 16px; color: var(--text-muted); font-size: 11px; font-weight: 600; text-decoration: none; }
.tab--on { color: var(--accent); background: var(--surface-soft); }
.tab--sos { color: var(--danger); }
.tab--sos.tab--on { background: var(--danger-soft); }

/* ---------- conseil de Hanna, Shabbat, détails ---------- */
.tip { display: flex; gap: 12px; padding: 12px; border-radius: 16px; background: var(--coral-light); text-decoration: none; }
.tip__face { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.tip__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tip__label { color: var(--coral); font-size: 12.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.tip__text { font-size: 15px; text-wrap: pretty; }
.tip__link { min-height: 44px; display: inline-flex; align-items: center; color: var(--coral); font-size: 14px; font-weight: 600; }
.shabbat { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 16px; background: var(--ochre-light); color: var(--ink); font-size: 15px; font-weight: 500; }
.shabbat .icon { color: var(--ochre); }
.card__link { color: inherit; text-decoration: none; }
.card__auto { color: var(--text-muted); font-size: 12px; }
.toolbar--stack { flex-direction: column; }
.page-head__title--place { font-size: clamp(1.6rem, 7vw, 2rem); overflow-wrap: anywhere; }
.dials--outlined { border: 1px solid var(--border); }

.card { position: relative; }
.fav {
  position: absolute; top: 8px; inset-inline-end: 8px; z-index: 2;
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: rgb(255 248 240 / 88%); color: var(--text-muted); cursor: pointer;
}
.fav--on { color: var(--coral); }
.fav--on .icon { fill: currentColor; }
.card:not(.card--photo) > .card__eyebrow, .card:not(.card--photo) > .card__title { padding-inline-end: 44px; }
.poster__motif { display: grid; place-items: center; width: 100%; height: 100%; background: var(--cat-soft); color: var(--cat); }

/* ---------- carte ---------- */
.view--map { padding: 0; gap: 0; }
.map-bar { padding: 4px 0 8px; }
.rail--chips { margin: 0; padding: 0 var(--gutter); }
.rail--chips .chips { flex-wrap: nowrap; }
.rail--chips .chip { flex: none; white-space: nowrap; }
.map-frame { position: relative; height: calc(100dvh - 196px - env(safe-area-inset-bottom) - env(safe-area-inset-top)); min-height: 340px; }
.map { width: 100%; height: 100%; background: var(--surface-soft); font-family: var(--font); z-index: 0; }
.map-locate {
  position: absolute; z-index: 5; inset-inline-end: 12px; top: 12px;
  display: grid; place-items: center; width: 48px; height: 48px;
  border: 0; border-radius: 50%; background: var(--cream); color: var(--ink); box-shadow: var(--shadow-lift); cursor: pointer;
}
.map-popup { display: flex; flex-direction: column; gap: 2px; min-width: 160px; font-family: var(--font); }
.map-popup__kind { margin: 0; color: var(--text-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.map-popup__name { margin: 0; font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; line-height: 1.25; }
.map-popup__link { margin-top: 6px; min-height: 40px; display: inline-flex; align-items: center; color: var(--accent); font-weight: 600; }
.leaflet-popup-content-wrapper { border-radius: 16px; }
.map .map-popup p { margin: 0; }

@media (min-width: 520px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .banner { height: 240px; }
}
