/* === RESET & TYPO === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Grantha Sangam MN', 'Helvetica Neue', Arial, Helvetica, sans-serif;
  font-size: 11px;
  color: #111;
  background: #fff;
  line-height: 1.5;
}

/* === HEADER === */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 14px 6px;
  border-bottom: 1px solid #111;
}
.site-title {
  font-family: 'Noto Serif', Georgia, 'Times New Roman', serif;
  font-size: 13pt;
  font-weight: 200;
  color: #000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  flex: 1;
  margin-right: 16px;
}
.header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.lang-btn { background: none; border: none; cursor: pointer; font-size: 10px; font-family: inherit; color: #888; padding: 0 2px; }
.lang-btn.active { color: #111; }
.header-btn { font-size: 10px; color: #111; text-decoration: none; }

/* === PAGE LAYOUT === */
.page-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* === MAPS COLUMN — grille CSS fixe, les cartes ne bougent pas === */
.maps-col {
  flex: 0 0 63%;
  border-right: 1px solid #111;
  display: grid;
  grid-template-rows: 35% auto 1fr;
  overflow: hidden;
  padding: 10px;
}
/* Toujours 2 colonnes égales : France à gauche, Camargue à droite */
.maps-top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  min-height: 0;
}
.map-section {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.map-meta-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.map-area-label { font-size: 8pt; font-weight: 400; }
.map-num {
  font-size: 8pt;
  font-weight: 400;
  margin-top: 4px;
  align-self: flex-start;
  flex-shrink: 0;
}
/* Ratio verrouillé sur les images de carte pour que les
   positions % des cercles correspondent exactement à l'image */
.map-img-wrap {
  position: relative;
  flex: 0 1 auto;
  overflow: hidden;
  min-height: 0;
  max-width: 100%;
  align-self: flex-start;
}
#france-wrap   { aspect-ratio: 916 / 954; }
#camargue-wrap { aspect-ratio: 988 / 932; }
.map-svg {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}
.maps-separator {
  height: 1px;
  background: #ccc;
  margin: 4px 0;
  align-self: center;
}

/* Village map area */
#ms-village { min-height: 0; overflow: hidden; }
.village-map-area {
  position: relative;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
.map-scroll-area {
  width: 100%; height: 100%;
  overflow: hidden;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-scroll-area:active { cursor: grabbing; }
.zoom-wrapper {
  position: relative;
  transform-origin: center;
  /* Dimensions exactes posées par fitVillageMap() (map.js) — ratio 1968/1341 garanti */
  aspect-ratio: 1968 / 1341;
  flex-shrink: 0;
}
#village-map-img { width: 100%; height: 100%; display: block; object-fit: fill; }
.map-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
}

/* Zoom controls */
.zoom-controls {
  position: absolute; top: 0; right: 0;
  display: flex; flex-direction: column;
  border: 1px solid #111;
}
.zoom-btn {
  background: #fff; border: none; cursor: pointer;
  font-size: 14px; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit; color: #111;
  border-bottom: 1px solid #111;
}
.zoom-btn:last-child { border-bottom: none; }
.zoom-btn:hover { background: #f5f5f5; }

/* Compass */
.compass-block {
  position: absolute; bottom: 0; right: 0;
  font-size: 9px; line-height: 1.3; text-align: center;
  padding: 2px 4px;
}

/* Nav circles — positions calibrées sur la maquette PDF */
.nav-circle {
  position: absolute;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid #111;
  background: transparent;
  cursor: pointer;
  left: 76.5%; top: 85.8%;
  transform: translate(-50%, -50%);
}
.nav-circle.cam-pos {
  left: 60.6%; top: 36.1%;
  width: 22px; height: 22px;
}
.nav-circle:hover { background: rgba(0,0,0,0.04); }

/* === INFO PANEL (right) === */
.info-panel {
  flex: 0 0 37%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 12px 14px;
  gap: 14px;
}
.about-meta { font-size: 10px; color: #555; margin-bottom: 4px; }
.about-body { font-size: 8pt; font-weight: 400; margin-bottom: 6px; line-height: 1.55; }
.about-signature { font-size: 10px; font-style: italic; color: #555; margin-top: 10px; }
.search-bar {
  width: 100%;
  border: 1px solid #111;
  padding: 6px 8px;
  font-size: 10.5px;
  font-family: inherit;
  background: #fff;
  outline: none;
  border-radius: 0;
}
.search-bar:focus { border-color: #555; }

/* === LEGEND === */
.legend-cats { display: flex; flex-direction: column; gap: 3px; }
.legend-row { display: flex; flex-direction: column; }
.legend-row-header {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; padding: 1px 0; user-select: none;
}
.legend-row-header:hover .legend-cat-label { text-decoration: underline; }
.legend-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.legend-cat-label { font-size: 9pt; font-weight: 700; }
.legend-sub { display: none; padding: 2px 0 4px 16px; }
.legend-sub-item { font-size: 9pt; font-weight: 400; padding: 1px 0; }
.legend-sub-item a { color: #111; text-decoration: none; }
.legend-sub-item a:hover { text-decoration: underline; }
.legend-row.open .legend-sub { display: block; }

/* Lien programme mensuel — en bas à droite de la page d'accueil */
.monthly-wrap { margin-top: auto; padding-top: 10px; text-align: right; }
.monthly-link { font-size: 10pt; font-weight: 700; color: #111; text-decoration: none; }
.monthly-link:hover { text-decoration: underline; }

/* === VIEWS === */
.view { display: none; }
.view.active { display: block; }
#view-home.active { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* === BACK BUTTON (fiche) : CERCLE ROSE === */
.back-circle {
  position: fixed;
  top: 14px; left: 14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #e84b8a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  text-decoration: none;
  z-index: 200;
  cursor: pointer;
}
.back-circle::before {
  content: '';
  display: block;
  width: 9px;
  height: 9px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) translate(2px, -2px);
}
.back-circle:hover { background: #d43a78; }

/* Fiche header — titre noir comme sur toutes les pages */
.fiche-header { padding-left: 62px; }

/* === FICHE VIEW === */
#view-fiche.active { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.fiche-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}
.fiche-left {
  flex: 0 0 63%;
  border-right: 1px solid #111;
  padding: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.fiche-cat-row {
  margin-bottom: 4px;
  padding-bottom: 5px;
  border-bottom: 1px solid #000;
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-shrink: 0;
}
.fiche-cat-badge { font-size: 9pt; font-weight: 700; }
/* Pastille noire pour les libellés jaune fluo (Sport) — illisibles sur blanc */
.cat-pill {
  background: #000;
  padding: 1px 7px;
  border-radius: 9px;
  font-weight: 700;
}
/* Les 2 cartes prennent la page de haut en bas */
.fiche-map-wrap,
.fiche-map-single-wrap {
  position: relative;
  flex: 1 1 0;
  min-height: 140px;
  overflow: hidden;
}
.fiche-map-inner {
  position: relative;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 1968 / 1341;
}
.fiche-map-img { width: 100%; height: 100%; object-fit: fill; display: block; }
.fiche-shape-overlay {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.fiche-single-dot {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.fiche-ring-dot {
  position: absolute;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid #000;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
/* Séparation entre les 2 cartes : simple trait noir fin */
.fiche-maps-divider {
  border-top: 1px solid #000;
  margin: 6px 0 4px;
  flex-shrink: 0;
}
.fiche-place-name-row {
  padding: 2px 0 4px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex-shrink: 0;
}
.fiche-place-name-label { font-size: 9pt; font-weight: 700; }
.fiche-gmaps-row { padding: 6px 0 2px; flex-shrink: 0; }
.fiche-gmaps-link { font-size: 9pt; color: #111; text-decoration: none; font-weight: 700; }
.fiche-gmaps-link:hover { text-decoration: underline; }
.fiche-left-separator { border-top: 1px solid #ccc; margin: 8px 0; }
.fiche-right {
  flex: 0 0 37%;
  padding: 12px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fiche-top-cols { display: flex; gap: 20px; }
.fiche-loc-col, .fiche-kw-col { flex: 1; }
.fiche-field-label { font-size: 10pt; font-weight: 700; margin-bottom: 4px; }
.fiche-field-body { font-size: 10pt; font-weight: 400; line-height: 1.5; }
.fiche-sec { display: flex; flex-direction: column; gap: 4px; }
.fiche-keywords { display: flex; flex-direction: column; gap: 2px; }
.fiche-kw { font-size: 10pt; font-weight: 400; }
.fiche-kw::before { content: "- "; }
.fiche-ext-link { font-size: 11px; color: #111; font-weight: 700; }
.fiche-right-separator { border-top: 1px solid #ccc; }
.event-block { font-size: 10pt; }
.event-row { margin-bottom: 8px; }
.event-label { font-size: 10pt; font-weight: 700; display: block; }
.fiche-hours { width: 100%; border-collapse: collapse; font-size: 10pt; }
.fiche-hours td { padding: 1px 8px 1px 0; }
.fiche-sec-title { font-size: 10pt; font-weight: 700; margin-bottom: 4px; }
.fiche-sec-body { font-size: 10pt; font-weight: 400; }
.edit-btn { font-size: 10px; padding: 3px 8px; cursor: pointer; border: 1px solid #111; background: none; margin-top: 6px; }
.event-empty { font-size: 10.5px; color: #888; }

/* === DOT sur la carte === */
.map-dot {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: all;
  transition: transform 0.1s;
  z-index: 2;
}
.map-dot:hover { transform: translate(-50%, -50%) scale(1.3); }
.map-dot.hidden { display: none; }
.map-dot.pos-draggable { cursor: grab; }
.map-dot.pos-draggable:active { cursor: grabbing; }

/* Tooltip sur les dots */
.map-tooltip {
  position: absolute;
  bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: #111; color: #fff;
  font-size: 10px; padding: 3px 8px;
  white-space: nowrap; pointer-events: none;
  display: none; z-index: 20;
}

/* Delete button on dots (admin position mode) */
.dot-del-btn {
  position: absolute; top: -5px; right: -5px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #c0392b; color: white; border: none;
  font-size: 9px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 20; pointer-events: all;
}

/* === POS TOOLBAR === */
.pos-toolbar {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.85); color: #fff;
  display: flex; align-items: center; gap: 10px; padding: 6px 10px;
  font-size: 10px; z-index: 50;
}
.pos-hint { flex: 1; }
.pos-ok-btn { background: #27ae60; color: #fff; border: none; padding: 4px 10px; cursor: pointer; font-size: 10px; }
.pos-cancel-btn { background: #c0392b; color: #fff; border: none; padding: 4px 10px; cursor: pointer; font-size: 10px; }
.pos-toggle-btn {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.6); color: #fff; border: none;
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center; z-index: 30;
}
.nav-circle.drag-enabled { cursor: grab; }
.nav-circle.drag-enabled:active { cursor: grabbing; }

/* Dot en mode drag */
.map-dot.drag-mode { cursor: grab !important; }
.map-dot.drag-mode:active { cursor: grabbing !important; }
.map-overlay.drag-active { cursor: crosshair; }

/* === ADMIN VIEWS === */
.admin-gate-wrap { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 40px); }
.auth-card { max-width: 380px; width: 90%; padding: 32px; border: 1px solid #ddd; }
.auth-title { font-size: 16px; font-weight: 400; margin-bottom: 20px; }
.auth-form { display: flex; flex-direction: column; gap: 8px; }
.auth-label { font-size: 11px; }
.auth-input { border: 1px solid #ccc; padding: 7px 10px; font-family: inherit; font-size: 11px; outline: none; width: 100%; }
.auth-input:focus { border-color: #111; }
.auth-submit { background: #111; color: #fff; border: none; padding: 8px 16px; font-family: inherit; font-size: 11px; cursor: pointer; margin-top: 4px; }
.auth-submit.small { padding: 5px 12px; }
.auth-error { color: #c0392b; font-size: 10px; min-height: 14px; }
.auth-hint { font-size: 10px; color: #888; margin-top: 8px; }
.auth-back { font-size: 10px; color: #888; text-decoration: none; display: block; margin-bottom: 12px; }
.auth-place-name { font-size: 11px; color: #888; margin-bottom: 12px; }
.admin-wrap { padding: 20px 24px; max-width: 800px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.admin-title { font-size: 16px; font-weight: 400; }
.admin-logout-btn { font-size: 10px; border: 1px solid #ccc; background: none; padding: 4px 10px; cursor: pointer; font-family: inherit; }
.admin-section { margin-bottom: 28px; }
.admin-section-title { font-size: 12px; font-weight: 700; margin-bottom: 10px; border-bottom: 1px solid #eee; padding-bottom: 6px; }
.admin-hint { font-size: 10px; color: #888; margin: 4px 0; }
.admin-places-list, .admin-users-list { display: flex; flex-direction: column; gap: 8px; }
.admin-place-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px; border: 1px solid #eee; font-size: 11px; }
.admin-place-name { flex: 1; min-width: 120px; }
.admin-btn { font-size: 10px; border: 1px solid #ccc; background: none; padding: 3px 8px; cursor: pointer; font-family: inherit; }
.admin-user-row { font-size: 10px; color: #555; padding: 3px 0; }
.admin-no-data { font-size: 10px; color: #888; }
.admin-place-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.admin-invite-btn { font-size: 10px; border: 1px solid #ccc; background: none; padding: 3px 8px; cursor: pointer; font-family: inherit; }
.admin-invite-url { font-size: 10px; color: #1a9e4b; font-family: monospace; word-break: break-all; margin-top: 4px; }
.admin-user-email { flex: 1; }
.admin-user-places { font-size: 10px; color: #888; }

#view-login.active,
#view-register.active { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 40px); }
#view-admin.active { display: block; }

/* === PROGRAMME — encadrés arrondis comme la maquette PDF === */
#view-programme.active { display: block; min-height: 100vh; }
.prog-site-header { padding-left: 62px; }
.prog-header {
  padding: 14px 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.prog-title { font-size: 18pt; font-weight: 700; }
.prog-period { font-size: 14pt; font-weight: 700; }
.prog-back { margin: 12px 20px; display: inline-block; font-size: 10px; color: #888; cursor: pointer; border: none; background: none; font-family: inherit; }
#programme-events { padding: 0 32px 32px; max-width: 1000px; }
.prog-day {
  margin-bottom: 24px;
  border: 1.5px solid #000;
  border-radius: 18px;
  padding: 12px 18px 14px;
}
.prog-day-title { font-size: 14pt; font-weight: 700; margin-bottom: 8px; }
.prog-event-card {
  border: 1px solid #000;
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 12px;
}
.prog-event-card:last-child { margin-bottom: 0; }
.prog-event-row { font-size: 10pt; font-weight: 400; margin-bottom: 6px; }
.prog-event-row:last-child { margin-bottom: 0; }
.prog-event-label { font-weight: 400; }
/* Aliases v1 → v2 */
.prog-date { font-size: 14pt; font-weight: 700; margin-bottom: 8px; }
.prog-card { border: 1px solid #000; border-radius: 12px; padding: 10px 16px; margin-bottom: 12px; }
.prog-row { font-size: 10pt; font-weight: 400; margin-bottom: 6px; }
.prog-lbl { font-weight: 400; }

/* === SAVE BANNER === */
.save-banner {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: #111; color: #fff; padding: 8px 20px; font-size: 11px;
  z-index: 1000; transition: opacity 0.3s;
}
.save-banner.hidden { opacity: 0; pointer-events: none; }
.save-banner.error { background: #c0392b; }

/* === EDIT PANEL === */
.edit-panel {
  position: fixed; top: 0; right: 0; width: 400px; height: 100vh;
  background: #fff; border-left: 1px solid #ddd; z-index: 300;
  display: flex; flex-direction: column;
}
.edit-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #eee;
}
.edit-panel-title { font-size: 13px; font-weight: 400; }
.edit-panel-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.ep-group { display: flex; flex-direction: column; gap: 5px; }
.ep-label { font-size: 10px; color: #666; text-transform: uppercase; letter-spacing: 0.05em; }
.ep-input { border: 1px solid #ddd; padding: 7px 10px; font-size: 11px; font-family: inherit; outline: none; width: 100%; }
.ep-input:focus { border-color: #111; }
.ep-textarea { border: 1px solid #ddd; padding: 7px 10px; font-size: 11px; font-family: inherit; outline: none; resize: vertical; width: 100%; }
.ep-textarea:focus { border-color: #111; }
.ep-hour-row { display: flex; gap: 6px; margin-bottom: 4px; }
.ep-hour-day, .ep-hour-time { flex: 1; border: 1px solid #ddd; padding: 5px 8px; font-size: 11px; font-family: inherit; }
.ep-remove-btn { background: none; border: 1px solid #e55; color: #e55; padding: 4px 8px; cursor: pointer; font-size: 10px; }
.ep-row-del { background: none; border: none; color: #e55; cursor: pointer; font-size: 16px; padding: 0 3px; }
.ep-add-row-btn { background: none; border: 1px solid #ccc; color: #555; padding: 5px 10px; cursor: pointer; font-size: 10px; font-family: inherit; margin-top: 2px; width: 100%; text-align: left; }
.ep-kw-tags { display: flex; flex-wrap: wrap; gap: 4px; min-height: 28px; }
.ep-kw-tag { background: #f0f0f0; border: 1px solid #ddd; padding: 3px 8px; font-size: 10px; display: flex; align-items: center; gap: 5px; }
.ep-kw-tag .ep-kw-remove,
.ep-kw-tag-del { background: none; border: none; cursor: pointer; color: #888; font-size: 11px; padding: 0; line-height: 1; }
.ep-kw-add-row { display: flex; gap: 6px; margin-top: 4px; }
.ep-add-inline-btn { background: #111; color: #fff; border: none; padding: 6px 10px; cursor: pointer; font-size: 10px; font-family: inherit; flex-shrink: 0; }
.ep-divider { border-top: 1px solid #eee; padding-top: 10px; margin-top: 6px; }
.ep-save-btn { background: #111; color: #fff; border: none; padding: 7px 16px; cursor: pointer; font-size: 11px; font-family: inherit; }
.ep-cancel-btn { background: none; color: #555; border: 1px solid #ccc; padding: 7px 16px; cursor: pointer; font-size: 11px; font-family: inherit; }

/* === MODAL === */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
}
.modal-card { background: #fff; padding: 28px 32px; width: 340px; max-width: 92vw; display: flex; flex-direction: column; gap: 14px; }
.modal-title { font-size: 14px; font-weight: 400; }
.modal-hint { font-size: 10px; color: #888; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Edit toolbar (v1 compat) */
.edit-toolbar { display: none; gap: 8px; width: 100%; }
.edit-save-btn { flex: 1; border: none; background: #111; color: white; font-size: 11px; font-family: inherit; padding: 7px 12px; cursor: pointer; }
.edit-cancel-btn { border: 1px solid #ccc; background: white; color: #555; font-size: 11px; font-family: inherit; padding: 7px 12px; cursor: pointer; }

/* contenteditable */
[contenteditable="true"].editable {
  outline: none; border-bottom: 1.5px dashed #aaa; padding-bottom: 2px;
  cursor: text; min-width: 20px; display: inline-block;
}
[contenteditable="true"].editable:focus { border-bottom-color: #111; }

/* === SCROLLBAR minimal === */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #f5f5f5; }
::-webkit-scrollbar-thumb { background: #ccc; }

/* ============================================================
   RESPONSIVE — MOBILE / TABLETTE (≤ 768px)
   Les colonnes desktop (cartes 63% / panneau 37%) s'empilent,
   la page redevient scrollable verticalement, les cartes
   passent en pleine largeur avec une hauteur lisible.
   La typographie (spec Mia) reste inchangée.
   ============================================================ */
@media (max-width: 768px) {
  /* Vues qui étaient verrouillées plein écran → hauteur naturelle + scroll */
  #view-home.active,
  #view-fiche.active {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  /* Colonnes côte à côte → empilées l'une sous l'autre */
  .page-layout,
  .fiche-layout {
    flex-direction: column;
    overflow: visible;
  }

  /* maps-col n'est plus une grille à lignes fixes : flux vertical naturel */
  .maps-col {
    flex: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-right: none;
    border-bottom: 1px solid #111;
    overflow: visible;
  }

  .fiche-left {
    flex: none;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #111;
    overflow: visible;
  }

  .info-panel,
  .fiche-right {
    flex: none;
    width: 100%;
    overflow: visible;
  }

  /* Carte du village : la zone épouse exactement le ratio de l'image
     (sinon hauteur fixe en vh → vide au-dessus/dessous de la carte centrée) */
  .village-map-area { aspect-ratio: 1968 / 1341; min-height: 0; }

  /* Cartes de fiche : hauteur lisible une fois empilées */
  .fiche-map-wrap,
  .fiche-map-single-wrap { min-height: 40vh; }

  /* Panneau d'édition (admin) → plein écran sur mobile */
  .edit-panel { width: 100%; }

  /* Modale jamais plus large que l'écran */
  .modal-card { width: 92vw; }
}

/* Petits téléphones (≤ 480px) : les 2 cartes France + Camargue se superposent */
@media (max-width: 480px) {
  .maps-top-row { grid-template-columns: 1fr; gap: 12px; }
  .fiche-top-cols { flex-direction: column; gap: 12px; }
}
