.atlas-bocage {
    --bocage-ink: #263e31;
    --bocage-accent: #41654d;
    --bocage-muted: #53645a;
    --bocage-border: #354e4028;
    --bocage-glass: #ffffffed;
    --bocage-background: #edf2ea;
    --bocage-font: Ubuntu, system-ui, sans-serif;
    box-sizing: border-box;
    container: atlas-bocage / inline-size;
    width: min(1320px, 100%);
    margin: 12px auto 38px;
    color: var(--bocage-ink);
    font: 16px/1.55 var(--bocage-font);
    text-align: start;
}

.atlas-bocage *, .atlas-bocage *::before, .atlas-bocage *::after { box-sizing: border-box; }
.atlas-bocage [hidden] { display: none !important; }
.atlas-bocage :is(a, select, button, canvas):focus-visible { outline: 2px solid var(--bocage-accent); outline-offset: 4px; }

.atlas-bocage-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    margin: 0 0 18px;
    padding: 0 1px;
}

.atlas-bocage-heading::before, .atlas-bocage-heading::after { display: none; }
.atlas-bocage-title { min-width: 0; text-align: start; overflow-wrap: anywhere; }
.atlas-bocage .atlas-bocage-title h2 {
    margin: 0 0 4px;
    padding: 0;
    color: #580b15;
    font: 700 clamp(25px, 3.4vw, 40px)/1.12 var(--bocage-font);
    letter-spacing: -.035em;
    text-transform: none;
}

.atlas-bocage .atlas-bocage-title p { margin: 0; color: #625d56; font: 15px/1.55 var(--bocage-font); text-align: start; }
.atlas-bocage-heading a, .atlas-bocage-town-link {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    padding-block: 8px;
    font: 700 13px/1.55 var(--bocage-font);
    text-decoration: none;
}
.atlas-bocage .atlas-bocage-heading a {
    flex-shrink: 0;
    padding: 10px 15px;
    border: 1px solid #e7dada;
    border-radius: 999px;
    color: #580b15;
    background: #fff;
}
.atlas-bocage .atlas-bocage-heading a:hover { background: #faf5f3; }
.atlas-bocage-town-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.atlas-bocage-experience {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid #dce5db;
    border-radius: 24px;
    background: var(--bocage-background);
    box-shadow: 0 17px 44px #2a463319;
}

.atlas-bocage-scenery {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -3;
    transition: transform .47s cubic-bezier(.24,.72,.25,1), filter .36s ease;
}
.atlas-bocage-experience[data-started] .atlas-bocage-scenery {
    background:
        linear-gradient(90deg, #f6f9f1b3, #f7faf22e 49%, #edf3ed0d),
        linear-gradient(180deg, #f6faf533, #f6faf500 53%, #ecf2e622),
        url('baie-aerienne.webp') 66% center / cover no-repeat;
}
.atlas-bocage-experience[data-opening] .atlas-bocage-scenery { transform: scale(1.075); filter: saturate(.8) brightness(.92); }

.atlas-bocage-frame { position: relative; padding: 0 clamp(14px, 2.5vw, 34px); }

.atlas-bocage-layout {
    display: grid;
    grid-template-columns: minmax(212px, .78fr) minmax(0, 2.62fr);
    grid-template-areas: 'selector stage';
    align-items: center;
    gap: 0 18px;
    padding: 10px 0;
}
.atlas-bocage-selector {
    grid-area: selector;
    position: relative;
    z-index: 1;
    min-width: 0;
    max-width: 278px;
    padding: clamp(16px, 2.05vw, 24px);
    border: 1px solid #ffffffa8;
    border-radius: 18px;
    background: var(--bocage-glass);
    box-shadow: 0 12px 32px #263e3121;
    text-align: start;
}
.atlas-bocage-experience:not([data-ready]) :is(.atlas-bocage-selector, .atlas-bocage-zoom, .atlas-bocage-scene) { visibility: hidden; }
.atlas-bocage-selector label { display: block; margin-bottom: 8px; color: var(--bocage-ink); font: 700 14px/1.55 var(--bocage-font); text-align: start; }
.atlas-bocage .atlas-bocage-selector select {
    display: block;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 9px 13px;
    appearance: auto;
    border: 1px solid var(--bocage-border);
    border-radius: 10px;
    background: #f6f9f5;
    color: var(--bocage-ink);
    font: 16px/1.5 var(--bocage-font);
}
.atlas-bocage-selected { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--bocage-border); }
.atlas-bocage .atlas-bocage-selected-name {
    margin: 0 0 11px;
    padding: 0;
    color: var(--bocage-ink);
    font: 700 clamp(24px, 2.5vw, 31px)/1.12 var(--bocage-font);
    letter-spacing: -.025em;
    text-transform: none;
    text-align: start;
    overflow-wrap: anywhere;
}
.atlas-bocage-selected dl { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; }
.atlas-bocage-selected dl > div { flex: 1 0 auto; padding: 8px 10px; border-radius: 8px; background: #edf3eb; }
.atlas-bocage-selected dt { margin: 0; color: var(--bocage-muted); font: 12px/1.5 var(--bocage-font); }
.atlas-bocage-selected dd { margin: 0; color: var(--bocage-ink); font: 500 15px/1.5 var(--bocage-font); }
.atlas-bocage .atlas-bocage-town-link {
    display: flex;
    justify-content: space-between;
    min-height: 44px;
    margin-top: 14px;
    padding: 9px 12px;
    border-radius: 9px;
    background: #31533c;
    color: #fff;
    font-size: 14px;
    text-decoration: none;
}
.atlas-bocage .atlas-bocage-town-link:hover { background: #457255; }

.atlas-bocage-stage { grid-area: stage; position: relative; min-width: 0; height: clamp(475px, 48vw, 620px); margin: 0 -16px 0 -3px; }
.atlas-bocage .atlas-bocage-scene { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; touch-action: pan-y; cursor: grab; filter: drop-shadow(0 18px 16px #233c2b53); }
.atlas-bocage [data-zoomed] .atlas-bocage-scene { touch-action: none; }
.atlas-bocage .atlas-bocage-scene.is-over-commune { cursor: pointer; }
.atlas-bocage .atlas-bocage-scene[data-dragging] { cursor: grabbing; }
.atlas-bocage .atlas-bocage-scene:focus-visible { outline-offset: -4px; }
.atlas-bocage-callout, .atlas-bocage-place-labels { position: absolute; inset: 0; pointer-events: none; }
.atlas-bocage-bubble {
    position: absolute;
    top: 0;
    left: 0;
    width: max-content;
    max-width: calc(100% - 16px);
    transform: translate(-50%,-100%);
    padding: 7px 12px;
    border: 1px solid #69826b7a;
    border-radius: 9px;
    background: #f9fbf3;
    box-shadow: 0 5px 12px #24433123;
    color: var(--bocage-ink);
    font: 700 13px/1.25 var(--bocage-font);
}
.atlas-bocage-bubble::after { content: ''; position: absolute; top: 100%; left: 50%; height: 15px; width: 1px; background: #40634c; }
.atlas-bocage-place-labels span {
    position: absolute;
    top: 0;
    left: 0;
    min-width: max-content;
    transform: translate(-50%,7px);
    color: #f9fff2;
    font: 700 11px/1.15 var(--bocage-font);
    text-shadow: 0 1px 4px #152e22, 0 1px 3px #152e22;
}
.atlas-bocage-place-labels span::after { content: ''; position: absolute; bottom: calc(100% + 3px); left: calc(50% - 2px); width: 4px; height: 4px; border-radius: 50%; background: #e3eee0; }
.atlas-bocage-status, .atlas-bocage-noscript { position: absolute; inset: 40% 18px auto; margin: 0; text-align: center; }
.atlas-bocage-zoom { display: none; }
.atlas-bocage-stage .atlas-bocage-flight-map {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0;
    background: #e8ede4;
    pointer-events: none;
    transition: opacity .6s cubic-bezier(.36,0,.3,1);
}
.atlas-bocage-stage .atlas-bocage-flight-map[data-live] { opacity: 1; }
.atlas-bocage-flight-map .maplibregl-canvas { filter: saturate(.88) contrast(1.06) brightness(.985); }
.atlas-bocage-flight-cancel {
    position: absolute;
    z-index: 4;
    inset: 12px 12px auto auto;
    min-height: 40px;
    padding: 7px 13px;
    border: 1px solid #d9e4d7;
    border-radius: 8px;
    background: #fffffff5;
    color: #31533c;
    font: 700 13px/1.3 var(--bocage-font);
    cursor: pointer;
}
.atlas-bocage [data-opening] .atlas-bocage-zoom { visibility: hidden; }
[data-atlas-town-home-intro],
[data-atlas-town-content] > :not(.atlas-town-dialog[data-atlas-cinematic],script,style,link) { display: none !important; }
.atlas-bocage-journey {
    position: absolute;
    z-index: 3;
    inset: auto auto clamp(14px, 3vw, 30px) 50%;
    display: flex;
    align-items: center;
    gap: 9px;
    width: max-content;
    max-width: calc(100% - 24px);
    margin: 0;
    padding: 11px 16px;
    border: 1px solid #ffffffb8;
    border-radius: 99px;
    background: #f9fcf5f5;
    color: #24412f;
    box-shadow: 0 8px 24px #263e313d;
    font: 700 14px/1.3 var(--bocage-font);
    text-align: center;
    pointer-events: none;
    transform: translateX(-50%);
    animation: atlas-bocage-arrival .28s ease-out both;
}
.atlas-bocage-journey::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #558667; box-shadow: 0 0 0 4px #55866725; }
@keyframes atlas-bocage-arrival {
    from { opacity: 0; transform: translate(-50%, 8px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@container atlas-bocage (max-width: 640px) {
    .atlas-bocage-heading { flex-wrap: wrap; gap: 9px 16px; margin-bottom: 14px; }
    .atlas-bocage .atlas-bocage-heading a { padding: 6px 10px; font-size: 12px; }
    .atlas-bocage-experience { border-radius: 16px; }
    .atlas-bocage-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'stage' 'selector'; padding: 12px 0 14px; }
    .atlas-bocage-stage { height: clamp(255px, 65vw, 355px); margin: 0 -10px 5px; }
    .atlas-bocage-selector { max-width: none; }
    .atlas-bocage-experience[data-started] .atlas-bocage-scenery { background-position: 76% center; }
    .atlas-bocage-place-labels span { font-size: 9px; }
}

@media (max-width: 767px) {
    .atlas-bocage-zoom {
        position: absolute;
        z-index: 2;
        inset: auto 6px 4px auto;
        display: flex;
        overflow: hidden;
        border: 1px solid var(--bocage-border);
        border-radius: 11px;
        background: #ffffffed;
        box-shadow: 0 4px 12px #263e3121;
    }
    .atlas-bocage .atlas-bocage-zoom button {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #31533c;
        font: 700 23px/1 var(--bocage-font);
        touch-action: manipulation;
    }
    .atlas-bocage .atlas-bocage-zoom button + button { border-inline-start: 1px solid var(--bocage-border); }
    .atlas-bocage .atlas-bocage-zoom button:disabled { color: #a1a9a1; }
    .atlas-bocage .atlas-bocage-zoom button:focus-visible { outline-offset: -3px; }
}

@media (prefers-reduced-motion: reduce) {
    .atlas-bocage-scenery, .atlas-bocage-stage .atlas-bocage-flight-map { transition: none; }
    .atlas-bocage-journey { animation: none; }
}
