/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #FAF8F5;
  --ink:       #1E1E1E;
  --ink-light: #6B6B6B;
  --red:       #C0392B;
  --red-dark:  #922B21;
  --card-bg:   #FFFFFF;
  --shadow:    0 4px 24px rgba(0,0,0,0.13);
  --radius:    12px;
  --header-h:  64px;
}

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

/* ─── Header ─── */
header {
  position: relative;
  z-index: 1000;
  height: var(--header-h);
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon {
  font-size: 1.4rem;
}

header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.header-subtitle {
  font-size: 0.72rem;
  font-weight: 300;
  opacity: 0.55;
  margin-top: 1px;
}

.header-count {
  font-size: 0.72rem;
  font-weight: 500;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ─── Map ─── */
#map {
  position: absolute;
  top: var(--header-h);
  left: 0; right: 0; bottom: 0;
  z-index: 1;
}

/* Tiles légèrement réchauffés */
.leaflet-tile {
  filter: saturate(0.9) brightness(1.03);
}

/* ─── Markers ─── */
.marker-pin {
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.marker-pin:hover,
.marker-pin.active {
  background: var(--red-dark);
  transform: rotate(-45deg) scale(1.15);
}

.marker-pin .pin-number {
  transform: rotate(45deg);
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

/* ─── Detail card ─── */
.detail-card {
  position: absolute;
  top: calc(var(--header-h) + 16px);
  right: 16px;
  z-index: 800;
  width: 300px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(0);
  opacity: 1;
}

.detail-card.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
}

.detail-card-number {
  width: 44px;
  min-width: 44px;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.detail-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}


.detail-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.detail-address {
  font-size: 0.72rem;
  color: var(--ink-light);
  line-height: 1.4;
}

.detail-comment {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--ink);
  border-left: 3px solid var(--red);
  padding-left: 10px;
  font-style: italic;
  margin-top: 2px;
}

.detail-gmaps {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--red);
  text-decoration: none;
  transition: color 0.15s;
}

.detail-gmaps:hover {
  color: var(--red-dark);
  text-decoration: underline;
}

/* ─── Bouton recentrer ─── */
.reset-view-btn {
  width: 30px;
  height: 30px;
  background: white;
  border: none;
  cursor: pointer;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reset-view-btn:hover {
  background: #f4f4f4;
  color: var(--red);
}
