/* =====================================================================
   lieux.css — Page Lieux (liste + carte) et fiches des lieux
   ---------------------------------------------------------------------
   Langage « fanzine sobre » : le noir du site, la machine à écrire
   (Courier Prime) pour les infos, des étiquettes façon Dymo aux couleurs
   des familles. L'orange reste réservé aux actions.
   Chargé après style.css. Couleurs des familles : lieux-commun.js.
   ===================================================================== */

:root {
    --font-type: 'Courier Prime', 'Courier New', monospace;
    --font-lecture: 'Newsreader', Georgia, serif;
    --ink: #1c1a17;
    --nav-h: 52px;
    --sticky-top: 52px;
}

.page-lieux,
.page-fiche {
    background: var(--bg);
}

/* Icônes au trait */
.ui-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* =====================
   En-tête de la page
   ===================== */
.lieux-head {
    max-width: 1480px;
    margin: 0 auto;
    padding: 44px 24px 26px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
}

.lieux-eyebrow {
    font-family: var(--font-type);
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 6px;
}

.lieux-title {
    font-size: clamp(44px, 6vw, 76px);
    letter-spacing: 0.01em;
    line-height: 0.95;
}

.lieux-lead {
    margin-top: 12px;
    max-width: 560px;
    font-family: var(--font-lecture);
    font-style: italic;
    font-size: 19px;
    line-height: 1.45;
    color: var(--text-muted);
}

/* Recherche */
.lieux-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 1 340px;
    color: var(--text-muted);
}

.lieux-search .ui-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.lieux-search input {
    width: 100%;
    padding: 13px 14px 12px 44px;
    background: var(--bg2);
    border: 1px solid var(--border-hover);
    border-radius: 3px;
    color: var(--text);
    font-family: var(--font-type);
    font-size: 15px;
    transition: border-color 0.15s;
}

.lieux-search input::placeholder {
    color: var(--text-dim);
}

.lieux-search input:focus {
    outline: none;
    border-color: var(--accent);
}

/* =====================
   Filtres : étiquettes Dymo, collées sous la nav
   ===================== */
.lieux-filtres {
    position: sticky;
    top: var(--nav-h);
    z-index: 900;
    background: rgba(12, 12, 11, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    padding: 12px max(24px, calc((100% - 1480px) / 2 + 24px)) 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.chips-options:empty {
    display: none;
}

.chips-sep {
    width: 1px;
    height: 22px;
    margin: 0 4px;
    background: var(--border-hover);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px 8px;
    background: var(--bg2);
    border: 1px solid var(--border-hover);
    border-radius: 3px;
    color: var(--text);
    font-family: var(--font-type);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.chip .ui-icon {
    color: var(--fam, var(--text-muted));
}

.chip:hover {
    border-color: var(--fam, var(--accent));
}

/* Active : ruban Dymo à la couleur de la famille */
.chip.is-active {
    background: var(--fam, var(--accent));
    border-color: transparent;
    color: var(--ink);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18), 0 4px 10px rgba(0, 0, 0, 0.35);
}

.chip.is-active .ui-icon {
    color: currentColor;
}

/* « Tout » et les options sans famille : orange du site, lettres claires */
.chip.is-active:not([style*="--fam"]) {
    color: #fff6ee;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.chip--small {
    padding: 7px 10px 6px;
    font-size: 12px;
    letter-spacing: 0.08em;
}

.chip--small .ui-icon {
    width: 14px;
    height: 14px;
}

.chip:focus-visible,
.lieux-reset:focus-visible,
.card-link:focus-visible,
.view-fab:focus-visible,
.locate-btn:focus-visible,
.btn-plein:focus-visible,
.btn-trait:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* =====================
   Liste + carte
   ===================== */
.lieux-split {
    max-width: 1480px;
    margin: 0 auto;
    padding: 20px 24px 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(400px, 42%);
    gap: 24px;
    align-items: start;
}

.lieux-resultats {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 16px;
}

.list-count {
    font-family: var(--font-type);
    font-size: 14px;
    color: var(--text-muted);
}

.lieux-reset {
    background: none;
    border: none;
    padding: 0;
    color: var(--accent);
    font-family: var(--font-type);
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.lieux-reset[hidden],
.list-empty[hidden] {
    display: none;
}

.list-empty {
    padding: 48px 0;
    font-family: var(--font-lecture);
    font-style: italic;
    font-size: 19px;
    color: var(--text-muted);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 18px;
}

/* =====================
   Carte d'un lieu
   ===================== */
.lieu-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.lieu-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px var(--shadow);
}

.lieu-card.is-selected {
    border-color: var(--fam);
    box-shadow: 0 0 0 1px var(--fam), 0 12px 28px var(--shadow);
}

.card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.card-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg3);
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.lieu-card:hover .card-media img {
    transform: scale(1.04);
}

/* Sans photo : la couleur de la famille, en trame */
.card-media-vide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        repeating-linear-gradient(135deg, transparent 0 9px, rgba(255, 255, 255, 0.025) 9px 10px),
        color-mix(in srgb, var(--fam) 14%, var(--bg3));
}

.card-media-icon {
    width: 44px;
    height: 44px;
    fill: none;
    stroke: var(--fam);
    stroke-width: 1.25;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.8;
}

/* Étiquette Dymo de la catégorie, posée sur la photo */
.card-label,
.map-card-label,
.fiche-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px 4px;
    background: var(--fam);
    border-radius: 2px;
    color: var(--ink);
    font-family: var(--font-type);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15), 0 3px 8px rgba(0, 0, 0, 0.4);
}

.card-label .ui-icon,
.map-card-label .ui-icon,
.fiche-label .ui-icon {
    width: 13px;
    height: 13px;
    stroke-width: 2;
}

.card-label {
    position: absolute;
    left: 10px;
    bottom: 10px;
}

/* Coup de cœur : tampon */
.card-coeur,
.fiche-coeur {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px 3px;
    border: 2px solid #fff6ee;
    border-radius: 3px;
    background: rgba(224, 92, 42, 0.92);
    color: #fff6ee;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transform: rotate(-5deg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.card-coeur .ui-icon,
.fiche-coeur .ui-icon {
    width: 13px;
    height: 13px;
    fill: currentColor;
    stroke-width: 0;
}

.card-coeur {
    position: absolute;
    top: 10px;
    right: 10px;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    padding: 14px 16px 15px;
}

.card-title {
    font-size: 22px;
    line-height: 1.05;
}

.card-description {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.45;
}

.card-meta {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-family: var(--font-type);
    font-size: 13px;
    color: var(--text-muted);
}

.card-tags {
    display: inline-flex;
    gap: 6px;
    margin-left: auto;
}

.card-tag .ui-icon {
    width: 16px;
    height: 16px;
}

/* =====================
   Colonne carte (collante sur ordinateur)
   ===================== */
.lieux-map-col {
    position: sticky;
    top: calc(var(--sticky-top) + 20px);
    height: calc(100vh - var(--sticky-top) - 40px);
    min-height: 420px;
}

.lieux-map-frame {
    position: relative;
    height: 100%;
    border: 1px solid var(--border-hover);
    border-radius: 4px;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    background: #121211;
}

/* Fond sombre, légèrement réchauffé */
#map .leaflet-tile-pane {
    filter: sepia(0.25) saturate(0.8) brightness(1.18) contrast(0.95);
}

.leaflet-container {
    font-family: 'Barlow', sans-serif;
}

.leaflet-bar a,
.leaflet-bar a:hover {
    background: var(--bg2);
    color: var(--text);
    border-bottom-color: var(--border-hover);
}

.leaflet-bar a:hover {
    color: var(--accent);
}

.leaflet-bar {
    border: 1px solid var(--border-hover) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35) !important;
}

.leaflet-control-attribution {
    background: rgba(12, 12, 11, 0.7) !important;
    color: var(--text-dim) !important;
    font-size: 10px;
}

.leaflet-control-attribution a {
    color: var(--text-muted) !important;
}

/* Points */
.pin-icon {
    background: none;
    border: 0;
}

.pin {
    position: relative;
    display: block;
    width: 18px;
    height: 18px;
}

.pin-dot {
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--fam);
    box-shadow: 0 0 0 2px #0c0c0b, 0 0 0 3px rgba(255, 255, 255, 0.35);
    transition: transform 0.15s;
}

.pin-icon:hover .pin-dot,
.pin-icon.is-hot .pin-dot {
    transform: scale(1.5);
}

.pin.is-selected .pin-dot {
    transform: scale(1.6);
    box-shadow: 0 0 0 2px #0c0c0b, 0 0 0 4px var(--fam), 0 0 18px var(--fam);
}

.pin-label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    pointer-events: none;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
    text-shadow: 0 0 3px #0c0c0b, 0 0 3px #0c0c0b, 0 0 6px #0c0c0b;
    display: none;
}

.show-labels .pin-label,
.pin-icon:hover .pin-label,
.pin-icon.is-hot .pin-label,
.pin.is-selected .pin-label {
    display: block;
}

/* Regroupements : anneau aux couleurs des familles, nombre au centre */
.pin-cluster-icon {
    background: none;
    border: 0;
}

.pin-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    padding: 3px;
    box-shadow: 0 0 0 2px #0c0c0b, 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s;
}

.pin-cluster span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #161614;
    color: var(--text);
    font-family: var(--font-type);
    font-size: 13px;
    font-weight: 700;
}

.pin-cluster-icon:hover .pin-cluster {
    transform: scale(1.08);
}

/* =====================
   Panneau d'aperçu (remplace les popups)
   ===================== */
.map-card {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 1000;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    width: min(380px, calc(100% - 24px));
    background: var(--bg2);
    border: 1px solid var(--border-hover);
    border-top: 3px solid var(--fam);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    animation: mapCardIn 0.2s ease-out;
}

.map-card[hidden] {
    display: none;
}

@keyframes mapCardIn {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.map-card-media {
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--fam) 14%, var(--bg3));
}

.map-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px 14px 13px;
    min-width: 0;
}

.map-card-label {
    font-size: 11px;
    padding: 4px 7px 3px;
    box-shadow: none;
}

.map-card-title {
    font-size: 21px;
    padding-right: 26px;
}

.map-card-desc {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-muted);
}

.map-card-meta {
    font-family: var(--font-type);
    font-size: 13px;
    color: var(--text-muted);
}

.map-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.map-card-close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    padding: 5px;
    background: rgba(12, 12, 11, 0.7);
    border: none;
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
}

/* Boutons */
.btn-plein,
.btn-trait {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px 7px;
    border-radius: 3px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-plein {
    background: var(--accent);
    color: #fff;
}

.btn-plein:hover {
    background: var(--accent-hover);
}

.btn-trait {
    border: 1px solid var(--border-hover);
    color: var(--text);
}

.btn-trait:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* =====================
   Géolocalisation : "Me localiser" / "Suivre en direct"
   ===================== */
.locate-control {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 10px 10px 0 0;
}

.locate-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    min-height: 38px;
    background: var(--bg2);
    border: 1px solid var(--border-hover);
    border-radius: 3px;
    color: var(--text);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    transition: border-color 0.15s, color 0.15s, background 0.15s, opacity 0.15s;
    white-space: nowrap;
}

.locate-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.locate-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.locate-btn-icon {
    display: flex;
}

.locate-btn.is-loading .locate-btn-icon {
    animation: locateSpin 0.9s linear infinite;
}

.locate-btn.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

@keyframes locateSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Libellés seulement quand la carte est assez large */
.lieux-map-col .locate-btn-label {
    display: none;
}

.lieux-map-col .locate-btn {
    padding: 8px;
    min-width: 38px;
    justify-content: center;
}

/* Position de l'utilisateur */
.user-location-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-location-dot {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3b82f6;
    border: 3px solid white;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5), 0 2px 8px rgba(0, 0, 0, 0.5);
}

.user-marker-live .user-location-dot {
    animation: userLocationPulse 1.8s ease-out infinite;
}

@keyframes userLocationPulse {
    0% { box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5), 0 2px 8px rgba(0, 0, 0, 0.5); }
    70% { box-shadow: 0 0 0 14px rgba(59, 130, 246, 0), 0 2px 8px rgba(0, 0, 0, 0.5); }
    100% { box-shadow: 0 0 0 2px rgba(59, 130, 246, 0), 0 2px 8px rgba(0, 0, 0, 0.5); }
}

/* Toast : retours de géolocalisation */
.lieux-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 12px);
    max-width: min(90vw, 400px);
    background: var(--bg2);
    border: 1px solid var(--border-hover);
    color: var(--text);
    padding: 12px 18px;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    font-size: 13px;
    line-height: 1.5;
    z-index: 4000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}

.lieux-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

.lieux-toast.error {
    border-color: #dc3545;
}

/* =====================
   Bouton flottant Liste / Carte (mobile)
   ===================== */
.view-fab {
    display: none;
}

/* =====================
   Mobile et tablette : une seule colonne, carte plein écran à la demande
   ===================== */
@media (max-width: 1099px) {
    .lieux-split {
        display: block;
        padding-bottom: 96px;
    }

    .lieux-map-col {
        display: none;
    }

    body.is-map-view {
        overflow: hidden;
    }

    body.is-map-view .lieux-map-col {
        display: block;
        position: fixed;
        top: var(--sticky-top);
        left: 0;
        right: 0;
        bottom: 0;
        height: auto;
        min-height: 0;
        z-index: 800;
    }

    body.is-map-view .lieux-map-frame {
        border: none;
        border-radius: 0;
    }

    body.is-map-view .lieux-list-col,
    body.is-map-view .lieux-head,
    body.is-map-view .main-footer {
        display: none;
    }

    .map-card {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    }

    .view-fab {
        position: fixed;
        left: 50%;
        bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        z-index: 950;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 13px 26px;
        background: var(--accent);
        color: white;
        border: 1px solid var(--accent);
        border-radius: 4px;
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55), 0 2px 10px rgba(224, 92, 42, 0.35);
        font-family: 'Barlow Condensed', sans-serif;
        font-size: 15px;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        cursor: pointer;
        transform: translateX(-50%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s, background 0.2s, color 0.2s;
    }

    .view-fab .ui-icon {
        width: 18px;
        height: 18px;
        stroke-width: 2;
    }

    .view-fab-icon {
        display: flex;
    }

    .view-fab-icon[hidden] {
        display: none;
    }

    .view-fab.is-map {
        background: rgba(22, 22, 20, 0.94);
        border-color: var(--border-hover);
        color: var(--text);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .view-fab.is-away {
        opacity: 0;
        pointer-events: none;
        transform: translate(-50%, 140%);
    }

    .lieux-toast {
        bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 1099px) and (prefers-reduced-motion: no-preference) {
    .view-fab.is-intro {
        animation: fab-intro 1.4s ease-out 1s 2;
    }
}

@keyframes fab-intro {
    0%   { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55), 0 0 0 0 rgba(224, 92, 42, 0.65); }
    70%  { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55), 0 0 0 18px rgba(224, 92, 42, 0); }
    100% { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55), 0 0 0 0 rgba(224, 92, 42, 0); }
}

/* Téléphones : en-tête resserré, filtres sur une ligne qui défile */
@media (max-width: 720px) {
    .lieux-head {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        padding: 28px 16px 18px;
    }

    .lieux-search {
        flex-basis: auto;
    }

    .lieux-lead {
        font-size: 17px;
    }

    .lieux-filtres {
        padding: 10px 0;
        gap: 8px;
    }

    .lieux-filtres .chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 16px;
        scrollbar-width: none;
    }

    .lieux-filtres .chips::-webkit-scrollbar {
        display: none;
    }

    .chip {
        padding: 8px 11px 7px;
        font-size: 13px;
    }

    .lieux-split {
        padding: 16px 16px 96px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .map-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .lieu-card,
    .card-media img,
    .map-card {
        transition: none;
        animation: none;
    }
}

/* =====================================================================
   Fiche d'un lieu
   ===================================================================== */
.fiche {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 80px;
}

.fiche-retour {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--text-muted);
    font-family: var(--font-type);
    font-size: 14px;
    text-decoration: none;
}

.fiche-retour:hover {
    color: var(--accent);
}

/* Galerie : une grande photo, deux petites à côté */
.fiche-galerie {
    display: grid;
    gap: 8px;
    height: clamp(260px, 46vw, 520px);
    border-radius: 4px;
    overflow: hidden;
}

.fiche-galerie--2 {
    grid-template-columns: 2fr 1fr;
}

.fiche-galerie--3 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.fiche-galerie--3 .fiche-photo:first-child {
    grid-row: span 2;
}

.fiche-photo {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: var(--bg3);
    overflow: hidden;
    cursor: zoom-in;
}

.fiche-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.fiche-photo:hover img {
    transform: scale(1.03);
}

.fiche-photo:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.fiche-photo--vide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: default;
    color: var(--text-dim);
    font-family: var(--font-type);
    font-size: 14px;
    background:
        repeating-linear-gradient(135deg, transparent 0 9px, rgba(255, 255, 255, 0.025) 9px 10px),
        color-mix(in srgb, var(--fam) 12%, var(--bg3));
}

/* Texte + infos pratiques */
.fiche-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 48px;
    margin-top: 32px;
    align-items: start;
}

.fiche-etiquettes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.fiche-label--sec {
    background: transparent;
    color: var(--fam);
    box-shadow: inset 0 0 0 1px var(--fam);
    text-shadow: none;
}

.fiche-coeur {
    margin-left: 6px;
}

.fiche-titre {
    font-size: clamp(40px, 5.5vw, 68px);
    line-height: 0.95;
}

.fiche-chapo {
    margin-top: 14px;
    font-family: var(--font-lecture);
    font-style: italic;
    font-size: 22px;
    line-height: 1.4;
    color: var(--text-muted);
}

.fiche-desc {
    margin-top: 22px;
    max-width: 64ch;
    font-family: var(--font-lecture);
    font-size: 19px;
    line-height: 1.65;
    color: #d8d3c9;
}

.fiche-desc p + p {
    margin-top: 1em;
}

.fiche-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
    list-style: none;
}

.fiche-tags li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px 6px;
    border: 1px solid var(--border-hover);
    border-radius: 3px;
    font-family: var(--font-type);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fiche-infos {
    position: sticky;
    top: calc(var(--nav-h) + 20px);
    padding: 22px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-top: 3px solid var(--fam);
    border-radius: 4px;
}

.fiche-infos-titre {
    font-size: 16px;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.fiche-dl {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.fiche-dl dt {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-type);
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.fiche-dl dd {
    margin-top: 2px;
    font-size: 16px;
    overflow-wrap: anywhere;
}

.fiche-dl a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--border-hover);
    text-underline-offset: 3px;
}

.fiche-dl a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

.fiche-info-note {
    margin-left: 6px;
    color: var(--text-muted);
    font-size: 14px;
}

.fiche-map {
    height: 200px;
    margin-bottom: 14px;
    border: 1px solid var(--border-hover);
    border-radius: 3px;
    background: #121211;
}

.fiche-map .leaflet-tile-pane {
    filter: sepia(0.25) saturate(0.8) brightness(1.18) contrast(0.95);
}

.fiche-itineraire {
    width: 100%;
    justify-content: center;
    padding: 11px 14px 10px;
}

/* À deux pas */
.fiche-voisins {
    margin-top: 72px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.fiche-voisins-titre {
    font-size: 28px;
    margin-bottom: 18px;
}

.fiche-voisins .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* Photos en grand */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.92);
    cursor: zoom-out;
    animation: fadeIn 0.2s ease-out;
}

.lightbox[hidden] {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#lightboxImage {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 3px;
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    padding: 10px;
    background: rgba(22, 22, 20, 0.9);
    border: 1px solid var(--border-hover);
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
}

.lightbox-close .ui-icon {
    width: 20px;
    height: 20px;
}

@media (max-width: 900px) {
    .fiche-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .fiche-infos {
        position: static;
    }
}

@media (max-width: 720px) {
    .fiche {
        padding: 16px 16px 64px;
    }

    .fiche-galerie,
    .fiche-galerie--2,
    .fiche-galerie--3 {
        display: flex;
        height: 300px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .fiche-galerie .fiche-photo {
        flex: 0 0 88%;
        scroll-snap-align: start;
    }

    .fiche-galerie--1 .fiche-photo {
        flex-basis: 100%;
    }

    .fiche-chapo {
        font-size: 19px;
    }

    .fiche-desc {
        font-size: 18px;
    }
}
