/* CityInfo Maroc — feuille de style unique, sans dépendance externe.
   Trois principes : une identité chaude (terre cuite, safran, zellige) empruntée
   aux annuaires marocains, une vue en deux colonnes (résultats + carte collante)
   sur les pages d'annuaire, et une échelle typographique resserrée pour que la
   densité d'information reste lisible. */

/* ----------------------------------------------------------- typographie */
/* Polices déposées dans /assets/fonts/ : aucune requête vers un tiers.
   Manrope pour les titres, Inter pour le texte courant, Playfair Display pour
   les pages éditoriales, Cairo pour les noms en arabe (très fréquents ici). */
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/assets/fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display'; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url('/assets/fonts/playfair-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cairo'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/assets/fonts/cairo-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

/* ------------------------------------------------------------- variables */
:root {
  color-scheme: light dark;

  /* Terre cuite : la couleur de texte passe le contraste AA sur blanc,
     --brand-bright ne sert qu'aux aplats et aux dégradés. */
  --brand: #c2410c;
  --brand-strong: #9a3412;
  --brand-bright: #f97316;
  --brand-light: #fb923c;
  --brand-soft: #fff3ea;
  --brand-tint: #ffe7d5;

  --accent: #a16207;
  --accent-bright: #ca8a04;
  --accent-soft: #fdf6e3;

  /* Le bleu des panneaux de stationnement : il ne sert qu'au P des parkings,
     et c'est justement parce qu'il détonne dans la palette qu'il se lit. */
  --parking: #1d4ed8;

  --cream: #fbf7f0;
  --sand: #f4ead2;
  --zellige: #b08d57;
  --zellige-opacity: .032;

  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --line: #e5e7eb;
  --line-strong: #d5dae1;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;

  --ok: #047857;
  --ok-soft: #ecfdf5;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06);
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 6px 20px rgba(15, 23, 42, .10);
  --shadow-lg: 0 2px 6px rgba(15, 23, 42, .06), 0 18px 40px rgba(15, 23, 42, .14);

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;

  --wrap: 1320px;
  --wrap-prose: 760px;
  --header-h: 66px;
  --gap: clamp(16px, 2vw, 28px);

  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: 'Manrope', var(--sans);
  --editorial: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --arabic: 'Cairo', var(--sans);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #fb923c;
    --brand-strong: #fdba74;
    --brand-bright: #f97316;
    --brand-light: #fdba74;
    --brand-soft: #2b1a0e;
    --brand-tint: #3a2312;

    --accent: #eab308;
    --accent-bright: #facc15;
    --accent-soft: #2a2410;

    /* Sur fond sombre, le bleu des panneaux s'éclaircit pour rester lisible. */
    --parking: #3b82f6;

    --cream: #131b2c;
    --sand: #1c2437;
    --zellige: #ca8a04;
    --zellige-opacity: .05;

    --ink: #e6edf5;
    --ink-2: #b4c1d2;
    --ink-3: #8b9ab0;
    --line: #243248;
    --line-strong: #33415a;
    --surface: #172033;
    --surface-2: #0b1220;
    --surface-3: #1f2b42;

    --ok: #34d399;
    --ok-soft: #0f2a22;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .45);
    --shadow: 0 4px 16px rgba(0, 0, 0, .40);
    --shadow-lg: 0 10px 28px rgba(0, 0, 0, .55);
  }
}

/* Trame de zellige : losanges et étoiles à huit branches, posés en filigrane
   derrière le héros et les tuiles. Un SVG en data-URI, donc aucune image à
   télécharger et aucune requête supplémentaire. */
:root {
  --zellige-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.1'%3E%3Cpath d='M32 4 44 16 32 28 20 16z'/%3E%3Cpath d='M32 36 44 48 32 60 20 48z'/%3E%3Cpath d='M0 32 12 20 24 32 12 44z'/%3E%3Cpath d='M64 32 52 20 40 32 52 44z'/%3E%3Cpath d='M23 23h18v18H23z'/%3E%3Cpath d='M32 18l9 14-9 14-9-14z'/%3E%3Cpath d='M18 32l14-9 14 9-14 9z'/%3E%3C/g%3E%3C/svg%3E");
}
.zellige { position: relative; isolation: isolate; }
.zellige::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--zellige-tile);
  background-size: 64px 64px;
  opacity: var(--zellige-opacity);
  /* La trame est noire dans le SVG : on la reteinte sans dupliquer le fichier. */
  filter: none;
}
@media (prefers-color-scheme: dark) { .zellige::before { filter: invert(1); opacity: .06; } }

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
}
:lang(ar), .ar { font-family: var(--arabic); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 {
  margin: 0 0 .5em; font-family: var(--display); font-weight: 700;
  line-height: 1.18; letter-spacing: -.02em;
}
h1 { font-size: clamp(1.85rem, 1.25rem + 2.2vw, 2.8rem); letter-spacing: -.032em; }
h2 { font-size: clamp(1.2rem, 1.05rem + .7vw, 1.55rem); }
h3 { font-size: 1.02rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(16px, 3vw, 32px); }
.section { padding-block: clamp(24px, 3vw, 40px); }
.section + .section { border-top: 1px solid var(--line); }
.muted { color: var(--ink-3); font-size: .9em; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: -999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--r) 0;
}
.skip-link:focus { inset-inline-start: 0; }

/* --------------------------------------------------------------- en-tête */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-bar {
  display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding-block: 10px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 700; font-size: 1.06rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(140deg, var(--brand), var(--brand-strong));
  color: #fff; font-size: .95rem; box-shadow: var(--shadow-sm);
}
.city-switch select, .site-search input, .hero-search input, .list-toolbar input {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 9px 15px; transition: border-color .15s, box-shadow .15s;
}
.city-switch select { padding-inline-end: 34px; cursor: pointer; }
.site-search input:focus, .hero-search input:focus, .list-toolbar input:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); outline: none;
}
.site-search { display: flex; flex: 1 1 240px; gap: 8px; min-width: 190px; max-width: 520px; }
.site-search input { flex: 1; }
.site-search button, .hero-search button {
  font: inherit; font-weight: 620; cursor: pointer; white-space: nowrap;
  padding: 9px 18px; border: 0; border-radius: 999px;
  background: var(--brand); color: #fff; transition: background .15s, transform .1s;
}
.site-search button:hover, .hero-search button:hover { background: var(--brand-strong); }
.site-search button:active, .hero-search button:active { transform: translateY(1px); }
@media (max-width: 880px) {
  .site-search { order: 4; flex-basis: 100%; max-width: none; }
}

/* ------------------------------------------------------------ suggestions */
/* La liste qui s'ouvre sous la barre de recherche. Elle flotte au-dessus de
   la page — y compris au-dessus d'une carte plein écran, d'où le rang élevé —
   et se cale sur la largeur du formulaire, moins le bouton. */
.site-search { position: relative; }
.suggest {
  position: absolute; z-index: 1200; inset-inline: 0; top: calc(100% + 6px);
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 14px; box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
  overflow: hidden;
}
.suggest[hidden] { display: none; }
.suggest-list { list-style: none; margin: 0; padding: 6px; max-height: min(62vh, 420px); overflow-y: auto; }
.suggest-group {
  padding: 8px 12px 4px; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3);
}
.suggest-item { border-radius: 9px; }
.suggest-item a {
  display: flex; flex-direction: column; gap: 1px;
  padding: 8px 12px; color: inherit; text-decoration: none;
}
.suggest-item.is-active { background: var(--brand-soft); }
.suggest-item.is-active .suggest-label { color: var(--brand-strong); }
.suggest-label { font-weight: 550; }
.suggest-note { font-size: .8rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-item.is-all { border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; margin-top: 4px; }
.suggest-item.is-all .suggest-label { font-weight: 600; color: var(--brand); }

/* ---------------------------------------------------------------- héros */
/* Pas de photographie : les fiches viennent d'OpenStreetMap, qui n'en fournit
   pas. L'ambiance tient donc au dégradé sable + safran et à la trame de
   zellige, qui tiennent en quelques octets là où une photo en coûterait 300 Ko. */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(70% 130% at 82% -20%, color-mix(in srgb, var(--brand-bright) 22%, transparent), transparent 62%),
    radial-gradient(55% 110% at 6% 0%, color-mix(in srgb, var(--accent-bright) 18%, transparent), transparent 58%),
    linear-gradient(170deg, var(--cream), var(--surface) 70%);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(40px, 6.5vw, 88px);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--zellige-tile); background-size: 96px 96px;
  opacity: var(--zellige-opacity);
}
@media (prefers-color-scheme: dark) { .hero::before { filter: invert(1); opacity: .05; } }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 6px 14px 6px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  font-size: .8rem; font-weight: 600; color: var(--ink-2);
  backdrop-filter: blur(6px);
}
.hero-eyebrow b {
  padding: 2px 9px; border-radius: 999px; font-weight: 700; font-size: .74rem;
  background: var(--brand-bright); color: #fff;
}
.hero h1 { max-width: 22ch; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lede { max-width: 60ch; }
.lede { font-size: clamp(1rem, .96rem + .34vw, 1.16rem); color: var(--ink-2); }

/* Recherche à deux champs « Quoi ? / Où ? », la signature des annuaires. */
.hero-search {
  display: flex; align-items: stretch; gap: 0; max-width: 760px; margin: 28px 0 18px;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 999px; box-shadow: var(--shadow); padding: 6px;
  flex-wrap: wrap;
}
.hero-search .field {
  display: flex; flex-direction: column; justify-content: center;
  flex: 1 1 180px; min-width: 0; padding: 4px 20px; position: relative;
}
.hero-search .field + .field::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 18%; bottom: 18%;
  width: 1px; background: var(--line);
}
.hero-search .field:first-child { flex-grow: 1.6; }
.hero-search .field label {
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3);
}
.hero-search input, .hero-search select {
  font: inherit; font-size: .96rem; color: var(--ink); background: transparent;
  border: 0; padding: 2px 0; width: 100%; min-width: 0;
}
.hero-search input:focus, .hero-search select:focus { outline: none; }
.hero-search .field:focus-within label { color: var(--brand); }
.hero-search button {
  flex: 0 0 auto; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap;
  padding: 13px 28px; border: 0; border-radius: 999px;
  background: var(--brand); color: #fff; transition: background .15s, transform .1s;
}
.hero-search button:hover { background: var(--brand-strong); }
.hero-search button:active { transform: translateY(1px); }
@media (max-width: 620px) {
  .hero-search { border-radius: var(--r-lg); padding: 10px; }
  .hero-search .field { flex-basis: 100%; padding: 8px 12px; }
  .hero-search .field + .field::before { inset-inline: 0 auto; top: 0; width: 100%; height: 1px; }
  .hero-search button { flex-basis: 100%; }
}

.hero-links { font-size: .9rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hero-links a {
  padding: 6px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid var(--line-strong); color: var(--ink-2); font-weight: 550;
}
.hero-links a:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); text-decoration: none; }

/* Bandeau de chiffres sous le héros — les compteurs sont réels, pas arrondis
   à la hausse : c'est le seul argument que puisse avancer un annuaire ouvert. */
.hero-stats {
  list-style: none; display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 56px);
  margin: 30px 0 0; padding-top: 24px;
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.hero-stats li { display: flex; flex-direction: column; gap: 2px; }
.hero-stats b {
  font-family: var(--display); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 800; letter-spacing: -.03em; color: var(--ink); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hero-stats span { font-size: .84rem; color: var(--ink-3); }
.hero-stats li:first-child b { color: var(--brand); }

.page-head { padding-block: clamp(18px, 2.4vw, 32px) 4px; }
.page-head .lede { max-width: 72ch; }
.eyebrow {
  font-size: .76rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: .55em;
}
.eyebrow a { color: var(--brand); }

/* ------------------------------------------------------------ fil d'Ariane */
.breadcrumb { padding-top: 14px; font-size: .82rem; color: var(--ink-3); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; }
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 7px; color: var(--line-strong); }

/* --------------------------------------------- vue annuaire : liste + carte */
.split-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(360px, 32vw, 460px);
  gap: var(--gap);
  align-items: start;
  padding-bottom: 40px;
}
/* Carte d'une fiche : un seul point, inutile d'occuper toute la hauteur. */
.split-map.is-short { height: min(68vh, 540px); }
.split-map {
  position: sticky;
  top: calc(var(--header-h) + 14px);
  height: calc(100dvh - var(--header-h) - 28px);
  min-height: 420px;
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow);
}
.split-map .map-shell { margin: 0; display: flex; flex-direction: column; height: 100%; }
.split-map .map { flex: 1; height: auto !important; border: 0; border-radius: 0; }
.split-map .map-note { padding: 7px 12px; margin: 0; border-top: 1px solid var(--line); background: var(--surface); }
.map-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.map-head h2 { margin: 0; font-size: .92rem; letter-spacing: -.01em; }
.map-head .muted { font-size: .8rem; }

@media (max-width: 1080px) {
  .split-view { grid-template-columns: 1fr; }
  .split-map { position: static; height: auto; min-height: 0; order: -1; }
  .split-map .map { height: 320px !important; }
}

/* --------------------------------------------- vue carte (pages de lieux) */
/* La carte occupe tout le fond de l'écran, la liste flotte au-dessus dans un
   panneau qui défile seul : la disposition des services de cartographie, celle
   que le visiteur attend quand il cherche un lieu. La vue ne mesure qu'un
   écran — le pied de page reste atteignable en poursuivant le défilement. */
.map-view {
  position: relative;
  height: calc(100dvh - var(--header-h));
  min-height: 560px;
  background: var(--surface-3);
}
.map-canvas { position: absolute; inset: 0; }
.map-view .map-shell { margin: 0; height: 100%; }
.map-view .map { height: 100% !important; border: 0; border-radius: 0; }

.map-panel {
  position: absolute; inset-block: 0; inset-inline-start: 0; z-index: 10;
  width: clamp(336px, 30vw, 428px);
  background: var(--surface);
  box-shadow: 0 0 20px rgba(15, 23, 42, .18);
  overflow-y: auto;
}
.panel-head { padding: 14px 20px 14px; border-bottom: 1px solid var(--line); }
.panel-head .breadcrumb { padding-top: 0; margin-bottom: 8px; }
.panel-head h1 { font-size: clamp(1.32rem, 1.1rem + .7vw, 1.6rem); margin-bottom: .4em; }
.panel-head .lede { font-size: .93rem; max-width: none; }
.panel-head .callout { margin-top: 11px; font-size: .84rem; padding: 9px 12px; }
/* Sous-rubriques et quartiers en une seule bande qui glisse horizontalement :
   sur trois lignes, ils repousseraient les résultats hors de l'écran. */
.panel-head .chip-list {
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  margin: 12px 0 0; padding-bottom: 1px;
}
.panel-head .chip-list::-webkit-scrollbar { display: none; }
.panel-head .chip-list li { flex: 0 0 auto; font-size: .82rem; }
.panel-head .chip-list + .chip-list { margin-top: 7px; }
.panel-head > p:last-child { margin-bottom: 0; }

/* Barre de filtre : elle reste visible pendant le défilement de la liste,
   comme le champ de recherche d'une carte. */
.panel-bar {
  position: sticky; inset-block-start: 0; z-index: 3;
  display: grid; gap: 7px; padding: 12px 20px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.panel-bar input { width: 100%; }
.results-count { font-size: .82rem; color: var(--ink-3); }
.results-count .filter-count:not(:empty)::before { content: " · "; }

/* Dans le panneau, les fiches forment une liste continue : le cadre et
   l'ombre de chacune feraient trois bordures pour une colonne de 400 px. */
.map-panel .result-list { gap: 0; }
.map-panel .card {
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  box-shadow: none; padding: 14px 20px;
}
.map-panel .card:hover, .map-panel .card.is-active { transform: none; box-shadow: none; }
.map-panel .card:hover { background: var(--surface-2); }
.map-panel .card-index { inset-block-start: 9px; inset-inline-start: 9px; }
.map-panel .card-thumb { width: 44px; height: 44px; font-size: 1rem; margin-inline-end: 13px; }
.map-panel .card-title { font-size: .98rem; }
.map-panel .pagination { margin: 0; padding: 16px 20px; }

/* Regroupements du panneau (rubriques d'un quartier, modes de transport) :
   un bandeau par groupe. */
.map-panel > .section, .map-panel [data-lines] .section { padding-block: 0; border-top: 0; }
.map-panel > .section > h2, .map-panel [data-lines] .section > h2 {
  margin: 0; padding: 11px 20px; font-size: .92rem;
  background: var(--surface-2); border-block: 1px solid var(--line);
}
.map-panel > .section > p { padding: 12px 20px; margin: 0; font-size: .9rem; }

/* Lignes de transport : le rang isole son tracé sur la carte, et la pastille
   de numéro garde la couleur qui sert au tracé. */
.map-panel .line-list { gap: 0; }
.map-panel .line-row {
  width: 100%; font: inherit; text-align: start; cursor: pointer;
  padding: 11px 20px; background: none; box-shadow: none;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
}
.map-panel .line-row:hover { background: var(--surface-2); }
.map-panel .line-row[aria-pressed="true"] { background: var(--brand-soft); }
.map-panel .line-row.is-untraced { opacity: .5; cursor: default; }
/* Ligne listée mais absente de la carte (le train) : pas de survol cliquable. */
.map-panel .line-row.is-static { cursor: default; }
.map-panel .line-row.is-static:hover { background: none; }
.map-panel .line-ends { font-size: .93rem; }

/* Rubriques de la ville : un rang par rubrique, pictogramme en tête. Le rang
   filtre la carte, le lien à sa droite ouvre la liste complète — deux gestes
   distincts pour deux intentions distinctes. */
.panel-title {
  margin: 0; padding: 13px 20px 9px; font-size: .82rem; font-weight: 650;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
}
.cat-list { list-style: none; }
.cat-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.cat-pick {
  flex: 1; display: flex; align-items: center; gap: 12px;
  padding: 12px 8px 12px 20px; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--ink); text-align: start;
}
.cat-pick:hover { background: var(--surface-2); }
.cat-ico { width: 21px; height: 21px; flex: none; color: var(--brand); }
.cat-name { flex: 1; font-weight: 550; font-size: .95rem; }
.cat-count { font-size: .82rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cat-row.is-all .cat-pick { padding-inline-start: 20px; font-weight: 650; }
.cat-go {
  display: flex; align-items: center; padding-inline: 14px;
  font-size: .82rem; color: var(--ink-3); white-space: nowrap;
  border-inline-start: 1px solid var(--line);
}
.cat-go:hover { color: var(--brand); text-decoration: none; background: var(--surface-2); }
/* Rubrique retenue : elle se lit d'un coup d'œil, la carte n'affichant plus
   qu'elle. */
.cat-pick[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-strong); }
.cat-pick[aria-pressed="true"] .cat-count { color: var(--brand); }

/* Vue de la ville, en tête du panneau. */
.panel-cover { margin: 0 0 13px; border-radius: var(--r); overflow: hidden; aspect-ratio: 21 / 9; }
/* `.cover-img` est posée en fond dans le bandeau des pages de ville : ici elle
   redevient une image ordinaire, dans le flux. */
.panel-cover .cover-img {
  position: static; inset: auto; z-index: auto;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* Chiffres de la ville : en pavés, ils repoussaient les rubriques hors de
   l'écran. Ils tiennent ici en deux lignes de texte. */
.panel-head .stat-grid { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 13px 0 0; }
.panel-head .stat-grid li {
  display: flex; align-items: baseline; gap: 5px;
  padding: 0; border: 0; background: none;
}
.panel-head .stat-value { display: inline; font-size: .95rem; font-weight: 700; }
.panel-head .stat-label { display: inline; font-size: .84rem; }
.panel-head .stat-hint { display: none; }
.panel-head .poi-actions { margin: 13px 0 0; }
.map-noscript { position: absolute; inset-block-start: 16px; inset-inline: 16px; z-index: 5; }

/* Liens de fin de liste : ils quittent la vue carte pour un fond neutre,
   qui les distingue des résultats. */
.panel-body { padding: 0 20px; }
.panel-body > section:first-child { padding-top: 16px; }
.panel-foot { padding: 0 20px 28px; background: var(--surface-2); }
.panel-foot .section { padding-block: 22px; }
.panel-foot h2 { font-size: .98rem; }
.panel-foot .link-list { font-size: .88rem; }
.panel-foot .split { grid-template-columns: 1fr; gap: 22px; }
/* Mentions et sources : elles vivaient au pied de page, retiré depuis. */
.site-links { margin: 10px 0 0; font-size: .84rem; color: var(--ink-3); }
.site-links a { color: var(--ink-3); }
.site-links a:hover { color: var(--brand); }

/* Boutons de bascule liste/carte : le petit écran ne peut montrer que l'une
   ou l'autre. Ils restent `hidden` tant que le script ne les a pas activés. */
.map-fab, .map-close { display: none; }
.map-fab {
  position: fixed; inset-block-end: 18px; inset-inline: 0;
  width: max-content; margin-inline: auto; z-index: 60;
  align-items: center; gap: 7px; padding: 12px 22px;
  border: 0; border-radius: 999px; background: var(--ink); color: var(--surface);
  font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
  box-shadow: var(--shadow-lg);
}
.map-fab:hover { background: var(--brand); }
.map-close {
  position: absolute; inset-block-start: 12px; inset-inline-start: 12px; z-index: 12;
  align-items: center; padding: 9px 16px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink-2);
  font: inherit; font-size: .84rem; font-weight: 550; cursor: pointer;
  box-shadow: var(--shadow);
}
.map-close:hover { border-color: var(--brand); color: var(--brand); }

@media (max-width: 900px) {
  /* La liste et la carte ne tiennent pas côte à côte : le panneau occupe la
     vue, et la carte prend tout l'écran quand on la demande. */
  .map-panel { inset-inline: 0; width: auto; box-shadow: none; padding-bottom: 76px; }
  body.map-open .map-panel { display: none; }
  body.map-open { overflow: hidden; }
  body.map-open .map-view { position: fixed; inset: 0; z-index: 100; height: auto; min-height: 0; }
  .map-fab:not([hidden]) { display: inline-flex; }
  body.map-open .map-fab { display: none; }
  body.map-open .map-close:not([hidden]) { display: inline-flex; }
}

/* ------------------------------------------------------------- résultats */
.results-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.results-head h2 { margin: 0; font-size: 1rem; color: var(--ink-2); font-weight: 600; }
.list-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 16px 0 6px; }
.list-toolbar input { flex: 1 1 300px; max-width: 480px; }
.filter-count { font-size: .85rem; color: var(--ink-3); }

.result-list { list-style: none; display: grid; gap: 10px; }
/* La fiche reprend la structure des annuaires illustrés — vignette à gauche,
   titre, étiquettes, coordonnées — mais la vignette est un monogramme : les
   données ouvertes ne fournissent pas de photographie. */
.card {
  position: relative;
  /* Colonne de vignette en « auto » : sans vignette (résultats de recherche),
     elle se réduit à zéro et la fiche ne garde aucun retrait. */
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 15px 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover, .card.is-active {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  box-shadow: var(--shadow); transform: translateY(-2px);
}
.card.is-active { background: color-mix(in srgb, var(--brand-soft) 70%, var(--surface)); }
.card > :not(.card-thumb):not(.card-index) { grid-column: 2; }
.card-thumb {
  grid-column: 1; grid-row: 1 / span 4; align-self: start;
  display: grid; place-items: center; width: 52px; height: 52px;
  margin-inline-end: 15px;
  border-radius: var(--r); font-family: var(--display);
  font-size: 1.15rem; font-weight: 800; letter-spacing: -.03em;
  background: linear-gradient(150deg, var(--brand-soft), var(--brand-tint));
  color: var(--brand-strong);
  border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
  text-transform: uppercase; user-select: none;
}
.card:hover .card-thumb { background: linear-gradient(150deg, var(--brand-bright), var(--brand)); color: #fff; border-color: transparent; }
.card-title { margin: 0 0 6px; font-size: 1.04rem; letter-spacing: -.015em; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--brand); text-decoration: none; }
.card-index {
  position: absolute; inset-block-start: -7px; inset-inline-start: -7px;
  display: grid; place-items: center; min-width: 24px; height: 24px; padding-inline: 6px;
  border-radius: 999px; background: var(--ink); color: var(--surface);
  font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-sm); z-index: 1;
}
.card:hover .card-index, .card.is-active .card-index { background: var(--brand); color: #fff; }
@media (max-width: 460px) {
  .card { grid-template-columns: minmax(0, 1fr); }
  .card-thumb { display: none; }
  .card > :not(.card-thumb):not(.card-index) { grid-column: 1; }
}
.card-meta { list-style: none; display: grid; gap: 4px; margin: 0 0 10px; font-size: .87rem; color: var(--ink-2); }
.card-meta li { display: flex; gap: 8px; align-items: flex-start; }
.card-meta a { color: var(--ink-2); }
.card-meta a:hover { color: var(--brand); }
.card-meta-empty { font-size: .85rem; color: var(--ink-3); font-style: italic; margin-bottom: 10px; }
.ico { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 3px; fill: var(--ink-3); }
.card:hover .ico, .card.is-active .ico { fill: var(--brand); }

.badges { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 9px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .73rem; font-weight: 600; letter-spacing: .01em;
  padding: 3px 10px; border-radius: 999px;
  background: var(--surface-3); color: var(--ink-2);
}
.badge .ico { width: 11px; height: 11px; margin: 0; fill: var(--accent); }
.badge-cat { background: var(--brand-soft); color: var(--brand-strong); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-star { background: var(--accent-soft); color: var(--accent); }
/* Pas de note d'avis : rien dans les données ouvertes ne permet d'en fabriquer
   une. Le badge dit ce qu'il sait vraiment — la richesse de la fiche. */
.badge-full {
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}
.badge-full .ico { fill: var(--accent); }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }

/* -------------------------------------------------------------- boutons */
.btn, .btn-mini {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-weight: 620; border-radius: 999px; border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn { padding: 11px 22px; background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn:hover { background: var(--brand-strong); color: #fff; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: none; }
.btn-ghost:hover { background: var(--surface); border-color: var(--brand); color: var(--brand); }
.btn-mini { padding: 6px 13px; font-size: .8rem; background: var(--surface); color: var(--ink-2); border-color: var(--line-strong); }
.btn-mini:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.btn-mini-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-mini-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.poi-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; align-items: center; }
/* Les deux gestes d'une fiche : y aller, et appeler. Chacun porte son
   pictogramme et ses mots — le numéro plutôt que « appeler », puisque c'est
   lui qu'on cherche des yeux, et qu'on le compose parfois à la main. */
.btn .ico {
  width: 18px; height: 18px; flex: none; margin: 0; fill: #fff;
}
.btn:hover .ico { fill: #fff; }
/* Appeler prend le vert, qui est la couleur du téléphone partout ailleurs :
   deux boutons pleins côte à côte se distinguent alors du premier coup d'œil,
   sans hiérarchie entre eux — ce sont deux gestes, pas un principal et un
   secondaire. Le numéro exact reste dans `aria-label` et dans le tableau. */
.btn-call { background: var(--ok); }
.btn-call:hover { background: color-mix(in srgb, var(--ok) 82%, #000); color: #fff; }

/* --------------------------------------------------------------- grilles */
.city-grid, .cat-grid { list-style: none; display: grid; gap: 16px; }
.city-grid { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
.cat-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.city-card, .cat-card, .cat-tile, .panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.city-card:hover, .cat-card:hover, .cat-tile:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  box-shadow: var(--shadow); transform: translateY(-2px);
}

/* Tuiles de rubrique : à défaut de la photographie qui coiffe les cartes de
   citybook, un bandeau teinté + zellige, dont la teinte tourne d'une tuile à
   l'autre pour que la grille ne soit pas un mur monochrome. */
.cat-card, .city-card { position: relative; overflow: hidden; padding-top: 58px; isolation: isolate; }
.cat-card::before, .city-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 42px; z-index: -1;
  background:
    var(--zellige-tile) 0 0 / 40px 40px,
    linear-gradient(110deg, var(--tile-a, var(--brand-soft)), var(--tile-b, var(--brand-tint)));
  background-blend-mode: soft-light, normal;
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 14%, transparent);
}
.cat-card:nth-child(4n+2), .city-card:nth-child(4n+2) { --tile-a: var(--accent-soft); --tile-b: var(--sand); }
.cat-card:nth-child(4n+3), .city-card:nth-child(4n+3) { --tile-a: #eef6f3; --tile-b: #dceee7; }
.cat-card:nth-child(4n+4), .city-card:nth-child(4n+4) { --tile-a: #eef2fb; --tile-b: #dde5f7; }
@media (prefers-color-scheme: dark) {
  .cat-card:nth-child(4n+3), .city-card:nth-child(4n+3) { --tile-a: #10261f; --tile-b: #17342a; }
  .cat-card:nth-child(4n+4), .city-card:nth-child(4n+4) { --tile-a: #131c30; --tile-b: #1b2740; }
}
.cat-card h3, .city-card h3 { font-size: 1.1rem; }
/* « Voir plus → » : le lien de la tuile couvre toute la carte. */
.tile-more {
  display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0;
  font-size: .86rem; font-weight: 650; color: var(--brand);
}
.cat-card:hover .tile-more, .city-card:hover .tile-more { gap: 10px; }
.tile-more::after { content: "→"; transition: transform .15s; }
.city-card h3, .cat-card h2, .cat-card h3, .cat-tile h3 { margin-bottom: .3em; }
.city-card h3 a, .cat-card h2 a, .cat-card h3 a, .cat-tile h3 a { color: var(--ink); }
.city-card h3 a:hover, .cat-card h2 a:hover, .cat-card h3 a:hover, .cat-tile h3 a:hover { color: var(--brand); text-decoration: none; }
.city-tagline { color: var(--ink-2); font-size: .9rem; margin-bottom: .45em; }
.city-count, .cat-count, .tile-count { font-size: .84rem; color: var(--ink-3); margin: 0; }
.city-count b, .cat-count b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.tile-count { font-weight: 600; color: var(--brand); }
.cat-card p { font-size: .92rem; color: var(--ink-2); }
.split { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.split > div > h2:first-child { margin-top: 0; }

/* ---------------------------------------------------------------- divers */
.stat-grid { list-style: none; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(146px, 1fr)); margin: 22px 0; }
.stat-grid li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.stat-value { display: block; font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.stat-label { display: block; font-size: .82rem; color: var(--ink-3); }
.stat-hint { display: block; font-size: .74rem; color: var(--ink-3); opacity: .75; }

.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip-list li { font-size: .86rem; color: var(--ink-3); }
.chip-list li a {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink-2); font-weight: 520;
}
.chip-list li a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
/* Sous-rubriques : navigation d'un niveau de l'annuaire à l'autre. */
.sub-nav { margin-bottom: 18px; }
.sub-nav .current {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px;
  border: 1px solid var(--brand); border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 600;
}
.sub-nav .current + .muted, .sub-nav li .muted { font-variant-numeric: tabular-nums; }
.tile-subs { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; font-size: .86rem; }
.tile-subs li { color: var(--ink-3); }
.tile-subs li a { color: var(--ink-2); }
.cat-subs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .78rem; margin: 0 0 10px; }
.cat-subs a {
  padding: 4px 11px; border-radius: 999px; font-weight: 550;
  background: var(--surface-3); color: var(--ink-2); border: 1px solid transparent;
}
.cat-subs a:hover { background: var(--brand-soft); color: var(--brand-strong); border-color: color-mix(in srgb, var(--brand) 25%, transparent); text-decoration: none; }

.link-list { list-style: none; display: grid; gap: 8px; font-size: .94rem; }
.link-list li { color: var(--ink-2); }
.link-list.arrow li::before { content: "→"; color: var(--brand); margin-inline-end: 7px; }
.pill-nav { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.pill-nav a {
  display: inline-block; padding: 9px 18px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: .9rem; font-weight: 600;
}
.pill-nav a:hover { background: var(--brand-strong); color: #fff; text-decoration: none; }
.callout {
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: var(--r); padding: 13px 17px; color: var(--ink-2); font-size: .93rem;
}
.h-inline { font-size: .95rem; display: inline-block; margin-inline-end: 12px; color: var(--ink-2); }

.data-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.data-table th, .data-table td { text-align: start; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tr:last-child th, .data-table tr:last-child td { border-bottom: 0; }
.data-table th[scope="row"] { width: 36%; color: var(--ink-3); font-weight: 600; }
.data-table thead th { background: var(--surface-3); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }

.prose { max-width: var(--wrap-prose); }
.prose p, .prose li { color: var(--ink-2); }
.prose h2 { margin-top: 1.6em; color: var(--ink); }
.wiki {
  margin: 0; padding: 18px 22px; background: var(--surface);
  border: 1px solid var(--line); border-inline-start: 3px solid var(--brand);
  border-radius: var(--r); color: var(--ink-2);
}
.wiki cite { display: block; margin-top: 12px; font-size: .82rem; color: var(--ink-3); font-style: normal; }
.name-ar { font-size: 1.15rem; color: var(--ink-3); margin-top: -.5em; }
.check-list { list-style: none; display: grid; gap: 7px; font-size: .94rem; color: var(--ink-2); }
.check-list li::before { content: "✓"; color: var(--brand); font-weight: 700; margin-inline-end: 8px; }
.faq dt { font-weight: 640; margin-top: 1.2em; color: var(--ink); }
.faq dd { margin: .35em 0 0; color: var(--ink-2); }
.timeline { list-style: none; display: grid; gap: 20px; }
.timeline li { display: grid; grid-template-columns: 116px 1fr; gap: 18px; align-items: start; }
.timeline h2, .timeline h3 { font-size: 1.04rem; margin-bottom: .3em; }
.timeline p { color: var(--ink-2); margin: 0; }
.step-time {
  font-weight: 700; font-size: .84rem; color: var(--brand-strong);
  background: var(--brand-soft); border-radius: 999px; padding: 4px 12px;
  justify-self: start; text-align: center;
}
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; gap: 6px; } }


/* ---------------------------------------------------------------- cartes */
.map-shell { margin: 10px 0; }
.map {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface-3); z-index: 0;
}
.map-note { font-size: .76rem; color: var(--ink-3); margin: 7px 0 0; }
.leaflet-container { font: inherit; background: var(--surface-3); }
.leaflet-popup-content-wrapper { border-radius: var(--r); box-shadow: var(--shadow-lg); }
.leaflet-popup-content { margin: 12px 14px; font-size: .88rem; line-height: 1.5; }
.leaflet-popup-content strong { display: block; font-size: .95rem; margin-bottom: 2px; }

/* Bulle d'un repère : elle reprend la fiche de la liste, privée de son cadre —
   le cadre, ici, c'est la bulle. Adresse, téléphone, horaires, étiquettes et
   boutons restent ceux de la fiche, sans les réécrire. */
.poi-popup .leaflet-popup-content-wrapper { padding: 0; overflow: hidden; }
.poi-popup .leaflet-popup-content { margin: 0; }
.map-popup { padding: 15px 16px 14px; }
.map-popup .card {
  padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
}
.map-popup .card:hover { transform: none; box-shadow: none; border-color: transparent; }
.map-popup .card-title { font-size: 1rem; }
.map-popup .card-meta { margin-bottom: 9px; }
/* Leaflet colore tous les liens de sa carte en bleu, et sa feuille est
   chargée après la nôtre : la fiche reprend ici ses propres couleurs. */
.map-popup .card-title a { color: var(--ink); }
.map-popup .card-title a:hover { color: var(--brand); }
.map-popup .card-meta a, .map-popup-lines a { color: var(--ink-2); }
.map-popup .btn-mini { color: var(--ink-2); }
.map-popup .btn-mini:hover { color: var(--brand); }
.map-popup .btn-mini-primary, .map-popup .btn-mini-primary:hover { color: #fff; }
/* Les fiches perdent leur vignette sous 460 px ; la bulle garde la sienne :
   c'est elle qui porte le numéro du repère, qui sinon couvrirait le nom. */
.map-popup .card { grid-template-columns: auto minmax(0, 1fr); }
.map-popup .card-thumb { display: grid; }
.map-popup .card > :not(.card-thumb):not(.card-index) { grid-column: 2; }
.map-popup-min { display: grid; gap: 3px; }
.map-popup-kind { color: var(--ink-3); font-size: .82rem; }
.map-popup-lines { color: var(--ink-2); font-size: .85rem; }
.map-popup-lines a { color: var(--ink-2); }
.map-popup-min .card-actions { margin-top: 9px; }
.marker-pin {
  display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50% 50% 50% 4px; transform: rotate(-45deg);
  background: var(--brand); color: #fff; border: 2px solid var(--surface);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3); font-size: .7rem; font-weight: 700;
}
.marker-pin span { transform: rotate(45deg); }
.marker-pin.is-active { background: var(--accent); z-index: 500; }
/* Repère d'une fiche : il porte le pictogramme du type — train, autocar,
   avion — au lieu d'un numéro. L'épingle étant un carré pivoté, son contenu
   se remet d'aplomb, comme le fait le numéro. */
.marker-pin-ico { width: 30px; height: 30px; }
.marker-pin-ico .pin-ico {
  width: 16px; height: 16px; transform: rotate(45deg);
  stroke: currentColor; fill: none;
}
/* Au-delà d'une soixantaine de points, la numérotation devient illisible :
   on retombe sur un repère circulaire compact. */
.marker-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--brand); border: 2px solid var(--surface);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.marker-dot.is-active { background: var(--accent); transform: scale(1.35); }


/* ------------------------------------------------------------ pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 30px 0 8px; }
.pagination ol { display: flex; gap: 4px; list-style: none; }
.pagination a, .pagination .current, .pagination .gap, .pagination .disabled {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; padding: 8px 12px; font-size: .9rem; font-weight: 550;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink-2);
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.pagination .gap { border-color: transparent; background: none; }
.pagination .disabled { opacity: .45; }

@media print {
  .site-header, .pagination, .map-shell, .split-map, .map-fab, .map-close, .list-toolbar, .panel-bar { display: none !important; }
  .split-view { grid-template-columns: 1fr; }
  .map-view { height: auto; min-height: 0; }
  .map-panel { position: static; width: auto; overflow: visible; box-shadow: none; }
  body { background: #fff; font-size: 11pt; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------ pages éditoriales */
/* Guides et récits : Playfair Display en titre, mesure resserrée, initiale
   ornée. L'annuaire reste en Manrope — deux registres, deux usages. */
.editorial h1, .editorial h2, .editorial h3 {
  font-family: var(--editorial); font-weight: 600; letter-spacing: -.01em;
}
.editorial h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); line-height: 1.12; }
.editorial .page-head { position: relative; padding-block: clamp(26px, 4vw, 52px) 8px; }
.editorial .page-head::before {
  content: ""; display: block; width: 54px; height: 3px; margin-bottom: 20px;
  border-radius: 999px; background: linear-gradient(90deg, var(--brand-bright), var(--accent-bright));
}
.editorial .lede { font-size: clamp(1.06rem, 1rem + .4vw, 1.24rem); line-height: 1.65; }
.editorial .prose p { font-size: 1.04rem; line-height: 1.75; }
.editorial .timeline h2, .editorial .timeline h3 { font-family: var(--display); font-size: 1.06rem; font-weight: 700; }
.editorial .step-time { font-family: var(--sans); }
/* Les tuiles gardent la typographie de l'annuaire : ce sont des liens, pas du récit. */
.editorial .cat-card h2, .editorial .cat-card h3, .editorial .city-card h3 { font-family: var(--display); font-weight: 700; }

/* ------------------------------------------------------ ajustements sombres */
@media (prefers-color-scheme: dark) {
  /* Sur fond sombre, l'orange est clair : le texte des boutons pleins doit
     redevenir foncé, sinon le contraste tombe sous le seuil lisible. */
  .btn, .btn:hover,
  .btn-mini-primary, .btn-mini-primary:hover,
  .site-search button, .hero-search button,
  .pill-nav a, .pill-nav a:hover,
  .hero-eyebrow b,
  .sub-nav .current,
  .skip-link { color: #1b1105; }
  /* Bandeaux de tuile : la même trame, mais posée plus doucement. */
  .cat-card::before, .city-card::before { opacity: .55; }
}

/* ------------------------------------------------------------ photographies */
/* Toutes les images viennent de Wikimedia Commons et portent une licence libre.
   Les licences CC BY / CC BY-SA imposent de citer l'auteur près de l'image :
   aucune règle ici ne doit masquer une `figcaption`. */
.photo { margin: 0 0 20px; }
.photo img {
  width: 100%; height: auto; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface-3);
}
.photo figcaption {
  margin-top: 8px; font-size: .78rem; color: var(--ink-3); line-height: 1.5;
}
.photo figcaption a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 2px; }
.photo figcaption a:hover { color: var(--brand); }
.photo-poi img { max-height: 420px; object-fit: cover; }

/* Bandeau de ville : la photo passe sous un voile pour que le titre reste
   lisible quelle que soit l'image — certaines vues sont très claires. */
.city-cover {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(260px, 32vw, 400px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-block: clamp(28px, 4vw, 52px) 0;
  background: var(--ink);
}
.cover-img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
}
.cover-shade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(190deg, rgba(8, 12, 22, .30) 0%, rgba(8, 12, 22, .58) 45%, rgba(8, 12, 22, .86) 100%);
}
.city-cover .cover-inner { padding-bottom: 28px; }
.city-cover h1 { color: #fff; max-width: 20ch; text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }
.city-cover .lede { color: rgba(255, 255, 255, .92); max-width: 62ch; text-shadow: 0 1px 12px rgba(0, 0, 0, .5); }
.cover-credit {
  margin: 0; padding: 7px clamp(16px, 3vw, 32px);
  font-size: .72rem; color: rgba(255, 255, 255, .72);
  background: rgba(8, 12, 22, .55);
}
.cover-credit a { color: rgba(255, 255, 255, .82); text-decoration: underline; text-underline-offset: 2px; }
.cover-credit a:hover { color: #fff; }

/* Tuile de ville illustrée : la photo remplace le bandeau décoratif. */
.city-card.has-photo { padding-top: 0; }
.city-card.has-photo::before { display: none; }
.city-card.has-photo .cover-img {
  position: static; z-index: auto;
  /* `img { max-width: 100% }` de la base rognerait le débord sur les côtés. */
  width: calc(100% + 40px); max-width: none;
  height: 132px; object-fit: cover; margin: 0 -20px 16px;
  border-bottom: 1px solid var(--line);
}

/* Logo d'enseigne en vignette de fiche : fond neutre, logo entier, jamais rogné. */
.card-thumb-logo {
  background: #fff; border-color: var(--line); padding: 6px;
}
.card-thumb-logo img { width: 100%; height: 100%; object-fit: contain; }
.card:hover .card-thumb-logo { background: #fff; border-color: var(--line-strong); }
@media (prefers-color-scheme: dark) {
  /* Beaucoup de logos sont dessinés pour un fond blanc : on le leur garde. */
  .card-thumb-logo, .card:hover .card-thumb-logo { background: #f8fafc; }
}
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.grid-credit { margin: 16px 0 0; font-size: .8rem; }

/* ------------------------------------------------------------------- RTL */
/* La feuille est écrite en propriétés logiques : `dir="rtl"` suffit à
   retourner marges, bordures et positions. Ne restent que les signes qui
   pointent quelque part, et la typographie arabe. */
[dir="rtl"] .link-list.arrow li::before { content: "←"; }
[dir="rtl"] .tile-more::after { content: "←"; }
[dir="rtl"] .check-list li::before { content: "✓"; }
/* Le dégradé du héros vient du coin haut-droit : on le renvoie côté gauche
   pour qu'il reste derrière le titre et non devant. */
[dir="rtl"] .hero {
  background:
    radial-gradient(70% 130% at 18% -20%, color-mix(in srgb, var(--brand-bright) 22%, transparent), transparent 62%),
    radial-gradient(55% 110% at 94% 0%, color-mix(in srgb, var(--accent-bright) 18%, transparent), transparent 58%),
    linear-gradient(190deg, var(--cream), var(--surface) 70%);
}
[dir="rtl"] .cat-card::before, [dir="rtl"] .city-card::before {
  background:
    var(--zellige-tile) 0 0 / 40px 40px,
    linear-gradient(250deg, var(--tile-a, var(--brand-soft)), var(--tile-b, var(--brand-tint)));
  background-blend-mode: soft-light, normal;
}

/* En arabe, tout le texte passe en Cairo — les titres compris, Manrope ne
   dessinant pas l'arabe. Les chiffres restent en chiffres arabes occidentaux,
   comme sur les panneaux et les devantures au Maroc. */
:root:lang(ar) { --sans: var(--arabic); --display: var(--arabic); --editorial: var(--arabic); }
[lang="ar"] body, [lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3, [lang="ar"] h4 { font-family: var(--arabic); }
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3, [lang="ar"] h4 { letter-spacing: 0; line-height: 1.35; }
[lang="ar"] .hero-stats b, [lang="ar"] .stat-value { letter-spacing: 0; }
[lang="ar"] .eyebrow { letter-spacing: 0; text-transform: none; }
[lang="ar"] .hero-search .field label { letter-spacing: 0; }

/* Sélecteur de langue, à côté du sélecteur de ville. */
.lang-switch select {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 9px 15px; cursor: pointer;
}
.lang-switch select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); outline: none; }
@media (max-width: 880px) { .lang-switch { order: 5; } }

/* Parking : le P blanc sur fond bleu des panneaux routiers. C'est le seul
   pictogramme que tout le monde lit sans légende — inutile d'en dessiner un
   autre, et sa couleur le distingue des pastilles d'arrêt. */
.parking-badge, .map-parking {
  display: grid; place-items: center; width: 26px; height: 26px; flex: none;
  border-radius: 7px; background: var(--parking); color: #fff;
  font-weight: 700; font-size: .92rem; line-height: 1; letter-spacing: 0;
}
/* Posé sur la carte, le jeton porte le liseré blanc des autres repères : sans
   lui, il se confond avec le bâti du fond de carte. */
.map-parking {
  border: 2px solid #fff; box-shadow: 0 1px 5px rgba(15, 23, 42, .45);
  transition: transform .12s;
}
.map-parking:hover, .map-parking.is-active { transform: scale(1.22); }
.map-parking.is-active { background: var(--brand); z-index: 500; }

/* Tracé d'une voie : il passe sous les repères sans leur disputer l'attention,
   et reste lisible sur un fond de carte clair comme sombre. */
.street-path {
  stroke: var(--brand); stroke-opacity: .75;
  stroke-width: 6; stroke-linecap: round; stroke-linejoin: round;
  fill: var(--brand); fill-opacity: .08;
}

/* Repère compact : à plusieurs centaines de points, l'épingle classique de
   Leaflet couvre la carte plus qu'elle ne l'informe. */
.citymap-pin span {
  display: block; width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand-bright); border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .45);
}
.citymap-pin:hover span { background: var(--brand-strong); transform: scale(1.25); }

/* ------------------------------------------------------ carte de l'accueil */
/* L'accueil tient tout entier dans la vue carte des pages de rubrique : le
   pays et ses villes, ou les adresses entourant le visiteur s'il a donné sa
   position. */
.nearme { border-block: 1px solid var(--line); }
/* Le rang d'une ville est un lien, celui d'une rubrique un bouton : même
   apparence, pour que la liste garde sa régularité d'un état à l'autre. */
.nearme a.cat-pick:hover { text-decoration: none; }
.nearme .cat-list { border-top: 1px solid var(--line); }

/* Ville couverte : un repère plus large que celui d'une adresse, avec son nom
   posé au-dessus — à l'échelle du pays, une carte de points muets ne dit rien. */
.nearme-city span {
  display: block; width: 14px; height: 14px; border-radius: 50%;
  background: var(--brand); border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(15, 23, 42, .45);
}
.nearme-city:hover span { background: var(--brand-strong); transform: scale(1.2); }
.leaflet-tooltip.nearme-label {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); box-shadow: var(--shadow);
  font: inherit; font-size: .76rem; font-weight: 600; padding: 2px 7px;
}
.leaflet-tooltip.nearme-label::before { display: none; }

/* Ma position : un repère qui ne se confond pas avec les adresses. */
.nearme-pin span {
  display: block; width: 15px; height: 15px; border-radius: 50%;
  background: var(--brand-strong); border: 3px solid #fff;
  box-shadow: 0 0 0 4px var(--brand-soft), 0 1px 5px rgba(15, 23, 42, .45);
}
/* Le rayon couvert, tracé au pointillé : il dit d'un coup d'œil jusqu'où
   portent les repères affichés. */
.nearme-ring {
  fill: var(--brand); fill-opacity: .05;
  stroke: var(--brand); stroke-opacity: .5; stroke-width: 1.5; stroke-dasharray: 5 5;
}

@media (max-width: 900px) {
  /* Le panneau et la carte ne tiennent pas côte à côte : ils s'empilent, la
     liste d'abord — l'accueil garde son défilement, sans la bascule plein
     écran des pages de lieux. */
  .nearme { height: auto; min-height: 0; }
  .nearme .map-panel { position: static; width: auto; padding-bottom: 0; overflow: visible; }
  .nearme .map-canvas { position: relative; inset: auto; height: 70vh; min-height: 360px; }
}

/* --------------------------------------------------- lignes de transport */
.line-list { list-style: none; display: grid; gap: 8px; }
.line-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 14px;
  align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 11px 14px;
  box-shadow: var(--shadow-sm);
}
.line-row:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
/* Le numéro se lit comme sur la devanture du bus : cartouche plein, chiffres
   tabulaires pour que les colonnes s'alignent d'une ligne à l'autre. */
.line-ref {
  display: grid; place-items: center; min-width: 46px; height: 32px;
  padding-inline: 10px; border-radius: 8px;
  font-family: var(--display); font-weight: 800; font-size: .95rem;
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
  background: var(--ink); color: var(--surface);
}
.line-ref[data-mode="tram"] { background: #0f766e; color: #fff; }
.line-ref[data-mode="train"], .line-ref[data-mode="light_rail"] { background: #1d4ed8; color: #fff; }
.line-ref[data-mode="subway"] { background: #6d28d9; color: #fff; }
.line-ref[data-mode="trolleybus"], .line-ref[data-mode="share_taxi"] { background: var(--accent); color: #fff; }
.line-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.line-ends { font-weight: 550; color: var(--ink); }
.line-op { font-size: .82rem; color: var(--ink-3); }
.line-op a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 2px; }
.line-op a:hover { color: var(--brand); }

/* --------------------------------------------------------- s'y rendre */
/* Le calcul de trajet tient en une ligne de formulaire : un départ, deux
   boutons. Les résultats s'ouvrent dessous, sans quitter la fiche. */
/* Le bloc « Itinéraire » : trois manières d'arriver, une seule à la fois. Les
   modes prennent l'allure d'un sélecteur segmenté — c'est ce que le visiteur
   attend d'un choix exclusif. */
.trip-modes { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.trip-mode {
  font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
  transition: background .15s, border-color .15s, color .15s;
}
.trip-mode:hover { border-color: var(--brand); color: var(--brand); }
.trip-mode[aria-pressed="true"] {
  background: var(--brand-soft); border-color: var(--brand); color: var(--brand-strong);
}
.trip-fallback { margin: 10px 0 0; }

.trip-form {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 14px 0 6px;
}
.trip-form input { flex: 1 1 260px; }

/* ------------------------------------------------ panneau d'itinéraire */
/* « Itinéraire » ouvre un panneau par-dessus la fiche, à la place qu'occupe
   le panneau de la fiche : le départ se choisit là où l'on regardait déjà,
   et la carte reste visible à côté pour situer ce qu'on choisit. */
.trip-sheet {
  position: absolute; inset-block: 0; inset-inline-start: 0; z-index: 20;
  width: clamp(336px, 30vw, 428px);
  display: flex; flex-direction: column;
  background: var(--surface);
  box-shadow: 0 0 26px rgba(15, 23, 42, .22);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .22s ease-out;
}
[dir="rtl"] .trip-sheet { transform: translateX(100%); }
.trip-sheet.is-open, [dir="rtl"] .trip-sheet.is-open { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) { .trip-sheet { transition: none; } }
.trip-sheet[hidden] { display: none; }

.trip-sheet-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.trip-sheet-head h2 { margin: 0; font-size: 1.05rem; }
.trip-back {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none;
  border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer;
}
.trip-back:hover { background: var(--surface-2); color: var(--brand); }
.trip-back .ico { width: 20px; height: 20px; fill: currentColor; }
[dir="rtl"] .trip-back .ico { transform: scaleX(-1); }

/* Les deux points du trajet, l'un sous l'autre, reliés comme sur un plan. */
.trip-fields { display: grid; gap: 8px; padding: 14px 16px 10px; }
.trip-line {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--surface);
}
.trip-line:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.trip-line input { flex: 1; min-width: 0; border: 0; padding: 0; background: none; font: inherit; color: var(--ink); }
.trip-line input:focus { outline: none; box-shadow: none; }
.trip-line.is-fixed { background: var(--surface-2); }
.trip-dest { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-pip { width: 11px; height: 11px; flex: none; border-radius: 50%; }
.trip-pip-from { border: 3px solid var(--ink-3); }
.trip-pip-to { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.trip-clear {
  border: 0; background: none; cursor: pointer; font-size: 1.15rem; line-height: 1;
  color: var(--ink-3); padding: 0 2px;
}
.trip-clear:hover { color: var(--ink); }
.trip-sheet .trip-modes { padding: 0 16px 10px; margin: 0; }

/* Départs proposés : la position d'abord, puis ceux qu'on a déjà employés,
   puis — dès qu'on tape — les lieux de la ville qui s'en approchent. */
.trip-picks { list-style: none; margin: 0; padding: 4px 8px 8px; border-top: 1px solid var(--line); }
.trip-picks[hidden] { display: none; }
.trip-pick-group {
  padding: 10px 8px 4px; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3);
}
.trip-pick {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 8px; border-radius: 10px; cursor: pointer;
}
.trip-pick.is-active { background: var(--brand-soft); }
.trip-pick-ico { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--surface-2); color: var(--ink-3); }
.trip-pick.is-active .trip-pick-ico { background: var(--surface); color: var(--brand); }
.trip-pick-ico .ico { width: 16px; height: 16px; fill: currentColor; }
.trip-pick-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-sheet .trip-out { padding: 0 16px 20px; }

@media (max-width: 900px) {
  /* Le panneau occupe l'écran : il n'y a pas de place pour deux colonnes. */
  .trip-sheet { inset-inline: 0; width: auto; }
  body.trip-open { overflow: hidden; }
}
.trip-out { margin: 12px 0 4px; }
.trip-from { font-weight: 600; margin-bottom: .3em; }
.trip-h { font-size: .95rem; margin: 16px 0 8px; }
.trip-list { list-style: none; display: grid; gap: 8px; }
/* Chaque proposition est un bouton : elle dessine son trajet sur la carte. */
.trip-option {
  width: 100%; font: inherit; text-align: start; cursor: pointer;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 12px;
  align-items: center; padding: 11px 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.trip-option:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.trip-option[aria-pressed="true"] {
  border-color: var(--brand); background: var(--brand-soft);
}
.trip-badges { display: flex; flex-direction: column; gap: 4px; }
.trip-cta { display: block; font-size: .74rem; font-weight: 500; color: var(--ink-3); }
.trip-option[aria-pressed="true"] .trip-cta { color: var(--brand); }
.trip-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trip-step { font-size: .9rem; color: var(--ink-2); }
.trip-total { font-size: .86rem; font-weight: 650; color: var(--brand); white-space: nowrap; text-align: end; }
.trip-note { font-size: .78rem; margin-top: 10px; }
/* Dans le panneau — quatre cents pixels de large — la durée passe sous le
   trajet plutôt que de comprimer les noms d'arrêts. */
.map-panel .trip-option, .trip-option { grid-template-columns: auto minmax(0, 1fr); }
.map-panel .trip-total, .trip-total { grid-column: 2; text-align: start; margin-top: 5px; }
.trip-cta { display: inline; margin-inline-start: 8px; }
/* Sans script, il n'y a pas de carte à montrer : le renvoi reste caché, et
   `display` ne doit pas défaire l'attribut `hidden` qui l'y garde. */
.trip-cta[hidden] { display: none; }

/* Page de trajet : la pastille d'une ligne porte sa couleur en style en
   ligne — la même que son tracé sur la carte —, et la proposition choisie
   la reprend sur sa tranche, pour se distinguer des autres d'un coup d'œil. */
.trip-option[aria-pressed="true"] { box-shadow: inset 3px 0 0 var(--brand), var(--shadow-sm); }
[dir="rtl"] .trip-option[aria-pressed="true"] { box-shadow: inset -3px 0 0 var(--brand), var(--shadow-sm); }

/* Pictogramme de mode : dans une pastille de ligne, il précède le numéro ;
   seul, il tient lieu de puce devant un arrêt. */
.mode-ico { width: 13px; height: 13px; flex: none; }
.line-ref .mode-ico { width: 12px; height: 12px; margin-inline-end: 4px; }
.line-ref { display: inline-flex; align-items: center; justify-content: center; }
.stop-mode { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; }
.stop-mode .mode-ico { width: 15px; height: 15px; }
.stop-mode[data-mode="bus"] { background: #334155; }
.stop-mode[data-mode="tram"] { background: #0f766e; }
.stop-mode[data-mode="train"] { background: #1d4ed8; }
.stop-mode[data-mode="trolleybus"], .stop-mode[data-mode="share_taxi"] { background: var(--accent); }

/* Le même jeton, posé sur la carte de la fiche. */
.map-stop {
  display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; color: #fff; border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(15, 23, 42, .45);
  transition: transform .12s;
}
.map-stop[data-mode="bus"] { background: #334155; }
.map-stop[data-mode="tram"] { background: #0f766e; }
.map-stop[data-mode="trolleybus"], .map-stop[data-mode="share_taxi"] { background: #a16207; }
.map-stop[data-mode="train"] { background: #1d4ed8; }

/* Type de lieu, dans le tableau de la fiche : le pictogramme distingue d'un
   coup d'œil la gare routière de la gare ferroviaire, que la rubrique
   « transport » confond. */
.kind-type { display: inline-flex; align-items: center; gap: 7px; }
.kind-ico { width: 17px; height: 17px; flex: none; color: var(--brand); }
.map-stop.is-active { transform: scale(1.25); background: var(--brand); z-index: 500; }

/* ------------------------------------------------------- comment y aller */
/* L'arrêt survolé — dans la liste ou sur la carte — se signale des deux côtés. */
.stop-list { list-style: none; display: grid; gap: 8px; margin: 12px 0; }
.stop-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 12px;
  align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 10px 14px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.stop-row.is-active {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  background: var(--brand-soft);
}
.stop-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--ink-3); border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--ink-3);
}
.stop-dot[data-mode="tram"] { background: #0f766e; box-shadow: 0 0 0 2px #0f766e; }
.stop-dot[data-mode="bus"] { background: var(--brand-bright); box-shadow: 0 0 0 2px var(--brand-bright); }
.stop-body { display: flex; flex-direction: column; min-width: 0; }
.stop-name { font-weight: 550; color: var(--ink); }
.stop-dist { font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.stop-lines { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.line-ref-sm { min-width: 30px; height: 24px; font-size: .78rem; padding-inline: 7px; border-radius: 6px; }
@media (max-width: 520px) {
  .stop-row { grid-template-columns: auto minmax(0, 1fr); }
  .stop-lines { grid-column: 2; justify-content: flex-start; margin-top: 6px; }
}

/* Tableau de crédits : long, dense, et consulté ponctuellement. */
.credits-table { font-size: .86rem; }
.credits-table td { padding-block: 8px; }
.credits-table td:first-child { word-break: break-word; }
