/* ============================================================
   travel-map.css — carnet de voyage « Exploration Européenne »
   (page Profil, 2026-10-11). Base commune : exp-map.css (classes
   .xm-*) ; ici seulement ce qui est propre aux voyages : chiffres,
   liste groupée par pays, drapeaux ronds, puces des villes.
   Règle de la DA : pas de bordure — fonds et ombres seulement.
   ============================================================ */

/* ── Chiffres clés ── */
.tm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0 20px 14px; }
.tm-stat { padding: 10px 11px; border-radius: 14px; background: var(--xm-sel); }
.tm-stat b { display: block; font-size: 19px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; color: var(--xm-text); font-variant-numeric: tabular-nums; }
.tm-stat small { display: block; margin-top: 3px; font-size: 11px; line-height: 1.3; color: var(--xm-muted); }

/* ── Liste groupée par pays ── */
.tm-list { flex: 1; overflow-y: auto; padding: 0 10px 14px; scrollbar-width: thin; }
.tm-group + .tm-group { margin-top: 2px; }
.tm-country { width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 14px; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 14px; background: transparent; color: var(--xm-text); text-align: left; cursor: pointer; font: inherit; transition: background .2s; }
.tm-country:hover { background: var(--xm-sel); }
.tm-group.is-active > .tm-country { background: var(--xm-glass-2); box-shadow: var(--xm-shadow); }
.tm-country strong { font-size: 14px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-country > span:last-child { color: var(--xm-muted); transition: transform .35s var(--xm-ease); }
.tm-country svg { width: 14px; height: 14px; display: block; }
.tm-group.is-open > .tm-country > span:last-child { transform: rotate(90deg); }
.tm-n { min-width: 24px; padding: 3px 7px; border-radius: 999px; background: var(--xm-sel); font-family: var(--v3-mono, monospace); font-size: 11px; text-align: center; color: var(--xm-muted); font-variant-numeric: tabular-nums; }
.tm-flag { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(10, 10, 12, .2); background: #fff; }
.tm-flag img { width: 100%; height: 100%; object-fit: cover; display: block; }

.tm-cities { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--xm-ease); }
.tm-group.is-open > .tm-cities { grid-template-rows: 1fr; }
.tm-cities > ol { overflow: hidden; list-style: none; margin: 0; padding: 0 0 0 24px; position: relative; }
.tm-cities > ol::before { content: ''; position: absolute; left: 25px; top: 6px; bottom: 14px; width: 1.5px; background: var(--xm-faint); }
.tm-group.is-open > .tm-cities > ol { padding-bottom: 6px; }
.tm-city { width: 100%; display: grid; grid-template-columns: 10px minmax(0, 1fr); align-items: center; gap: 12px; padding: 7px 10px 7px 0; border: 0; border-radius: 12px; background: transparent; color: var(--xm-text); text-align: left; cursor: pointer; font: inherit; transition: background .2s, padding .3s var(--xm-ease); }
.tm-city i { width: 7px; height: 7px; margin-left: -2px; border-radius: 50%; background: var(--xm-muted); position: relative; z-index: 1; box-shadow: 0 0 0 3px var(--xm-glass-2); transition: background .2s, transform .3s; }
.tm-city span { min-width: 0; display: flex; flex-direction: column; }
.tm-city strong { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-city small { font-size: 11.5px; color: var(--xm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-city:hover { background: var(--xm-sel); padding-left: 4px; }
.tm-city.is-active { background: var(--xm-ink); color: var(--xm-ink-fg); padding-left: 4px; }
.tm-city.is-active small { color: inherit; opacity: .65; }
.tm-city.is-active i { background: var(--xm-ink-fg); transform: scale(1.3); box-shadow: none; }

/* ── Fiche ── */
.tm-card-flag { flex: none; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 0 0 3px #fff, 0 6px 16px -4px rgba(10, 10, 12, .35); }
.tm-card-flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tm-card-flag img[src=""] { visibility: hidden; }
.tm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tm-chips:empty { display: none; }
.tm-chips button { padding: 6px 10px; border: 0; border-radius: 999px; background: var(--xm-sel); color: var(--xm-text); font: 500 12px/1 var(--v3-font, inherit); cursor: pointer; transition: background .2s, transform .25s cubic-bezier(.34,1.56,.64,1); }
.tm-chips button:hover { background: var(--xm-ink); color: var(--xm-ink-fg); transform: translateY(-1px); }
.tm-card.is-country .xm-card-desc { margin-top: 12px; }

.tm-country:focus-visible, .tm-city:focus-visible, .tm-chips button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(77, 107, 255, .5); }

@media (max-width: 759px) {
  .tm-stats { padding: 0 14px 10px; }
  .tm-stat { padding: 8px 9px; }
  .tm-stat b { font-size: 16px; }
  .tm-list { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 0 10px 12px; scroll-snap-type: x mandatory; }
  .tm-group { flex: none; width: 62%; scroll-snap-align: start; }
  .tm-group + .tm-group { margin-top: 0; }
  .tm-country { background: var(--xm-sel); grid-template-columns: 30px minmax(0, 1fr) auto; }
  .tm-country > span:last-child { display: none; }
  .tm-cities { display: none; }
  .tm .xm-card { bottom: 250px; }
}
@media (prefers-reduced-motion: reduce) {
  .tm-cities, .tm-city, .tm-country > span:last-child { transition: none; }
}
