
.rs-prototype-randonnee-page .rs-prototype-main {
    width: min(1500px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0 70px;
}

.rs-prototype-article {
    background: #fff;
}

.rs-prototype-status {
    display: inline-flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 6px 11px;
    border: 1px solid #d8dde3;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}


.rs-prototype-db-warning {
    margin: -8px 0 20px;
    padding: 11px 14px;
    border-left: 4px solid #dba617;
    background: #fff8df;
    color: #6b4a00;
    font-size: 14px;
    line-height: 1.45;
}

.rs-prototype-db-warning strong,
.rs-prototype-db-warning span {
    display: block;
}

.rs-prototype-header {
    margin-bottom: 24px;
}

.rs-prototype-header h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 70px);
    line-height: 1.06;
}

.rs-prototype-photo-date {
    margin: 11px 0 0;
    font-size: 16px;
    color: #606a73;
}

.rs-prototype-itinerary {
    width: 100%;
    margin: 14px 0 0;
    font-size: clamp(16px, 1.45vw, 20px);
    line-height: 1.45;
    font-weight: 600;
    color: #27323b;
}

.rs-prototype-alert {
    display: flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    gap: 9px;
    margin-top: 13px;
    padding: 9px 14px;
    border-left: 4px solid #e3a21a;
    background: #fff8df;
    color: #704d00;
    font-size: 15px;
}

.rs-prototype-alert-icon {
    font-size: 18px;
    line-height: 1;
}

.rs-prototype-hero {
    margin: 0 0 24px;
    overflow: hidden;
    border-radius: 8px;
    background: #eef1f3;
    aspect-ratio: 2.35 / 1;
}

.rs-prototype-hero-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rs-prototype-hero.rs-hero-focal-center .rs-prototype-hero-image {
    object-position: center;
}

.rs-prototype-hero.rs-hero-focal-top .rs-prototype-hero-image {
    object-position: center top;
}

.rs-prototype-hero.rs-hero-focal-bottom .rs-prototype-hero-image {
    object-position: center bottom;
}

.rs-prototype-hero.rs-hero-focal-left .rs-prototype-hero-image {
    object-position: left center;
}

.rs-prototype-hero.rs-hero-focal-right .rs-prototype-hero-image {
    object-position: right center;
}

.rs-kpi-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 7px;
    margin: 0 0 32px;
}

.rs-kpi {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 66px;
    padding: 9px 9px;
    border: 1px solid #e1e5e9;
    border-radius: 7px;
    background: #fafbfc;
    color: #202830;
    text-align: left;
    text-decoration: none !important;
}

button.rs-kpi {
    width: 100%;
    margin: 0;
    appearance: none;
    font: inherit;
    cursor: pointer;
}

.rs-kpi-icon {
    display: inline-flex;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    margin-right: 7px;
    align-items: center;
    justify-content: center;
    color: #52616d;
}

.rs-kpi-icon svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    overflow: visible;
}

.rs-kpi-text,
.rs-kpi-label,
.rs-kpi-value {
    display: block;
    min-width: 0;
}

.rs-kpi-label {
    margin-bottom: 3px;
    color: #68727c;
    font-size: 11px;
    line-height: 1.12;
}

.rs-kpi-value {
    overflow-wrap: anywhere;
    color: #202830;
    font-size: 14px;
    line-height: 1.18;
}

.rs-kpi-action {
    border-color: #b9cfdd;
    background: #f4f9fc;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.rs-kpi-action:hover,
.rs-kpi-action:focus-visible {
    border-color: #1d5f8a;
    background: #eaf4fa;
    color: #202830;
    transform: translateY(-1px);
    outline: none;
}

.rs-kpi-action .rs-kpi-icon {
    color: #1d5f8a;
}

.rs-prototype-section {
    margin: 0 0 44px;
}

.rs-prototype-section > h2 {
    margin: 0 0 18px;
    font-size: clamp(25px, 2.7vw, 36px);
    line-height: 1.15;
}

.rs-prototype-richtext {
    width: 100%;
    max-width: none;
    font-size: 19px;
    line-height: 1.75;
}

.rs-prototype-richtext p:last-child {
    margin-bottom: 0;
}

.rs-videos-section {
    margin-top: 4px;
}

.rs-prototype-videos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.rs-prototype-video {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: #111;
}

.rs-prototype-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.rs-prototype-video-direct {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.rs-prototype-video-direct video {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #111;
}

.rs-local-video-loading {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    color: #fff;
    font-size: 0.92rem;
    text-align: center;
    background: #111;
}

.rs-prototype-video-direct.is-video-ready .rs-local-video-loading,
.rs-prototype-video-direct.is-video-error .rs-local-video-loading {
    display: none;
}

.rs-local-video-fallback {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #fff;
    font-weight: 700;
    text-align: center;
    background: #111;
}

.rs-prototype-video-direct.is-video-error video {
    display: none;
}

.rs-prototype-video-direct.is-video-error .rs-local-video-fallback {
    display: flex;
}

.rs-prototype-video-external {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: #fff;
    text-align: center;
}

.rs-prototype-gallery {
    margin-bottom: 0;
}

.rs-prototype-warning {
    padding: 18px;
    border: 1px solid #d63638;
    border-radius: 6px;
    background: #fcf0f1;
}

/* Lightbox Meteoblue */
.rs-weather-lightbox[hidden] {
    display: none !important;
}

.rs-weather-lightbox {
    position: fixed;
    z-index: 1000000000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rs-weather-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .72);
}

.rs-weather-modal {
    position: relative;
    z-index: 1;
    width: 390px;
    max-width: calc(100vw - 28px);
    height: 500px;
    max-height: calc(100vh - 28px);
    overflow: hidden;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
}

.rs-weather-modal iframe {
    display: block;
    width: 340px;
    height: 470px;
    margin: 24px auto 0;
    border: 0;
}

.rs-weather-close {
    position: absolute;
    z-index: 2;
    top: 5px;
    right: 10px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #333;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

body.rs-weather-open {
    overflow: hidden;
}

@media (max-width: 1350px) {
    .rs-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .rs-kpi-value {
        font-size: 15px;
    }
}

@media (max-width: 900px) {
    .rs-prototype-hero {
        aspect-ratio: 16 / 9;
    }

    .rs-prototype-videos {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .rs-prototype-randonnee-page .rs-prototype-main {
        width: min(100% - 20px, 1500px);
        padding-top: 24px;
    }

    .rs-prototype-itinerary {
        font-size: 16px;
    }

    .rs-prototype-alert {
        width: 100%;
    }

    .rs-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .rs-kpi {
        min-height: 63px;
        padding: 9px;
    }

    .rs-kpi-icon {
        flex-basis: 27px;
        width: 27px;
        height: 27px;
        margin-right: 6px;
    }

    .rs-kpi-icon svg {
        width: 23px;
        height: 23px;
    }

    .rs-kpi-value {
        font-size: 14px;
    }

    .rs-prototype-richtext {
        font-size: 17px;
        line-height: 1.65;
    }

    .rs-weather-modal {
        width: min(390px, calc(100vw - 18px));
        height: min(500px, calc(100vh - 18px));
    }

    .rs-weather-modal iframe {
        transform: scale(.92);
        transform-origin: top center;
        margin-top: 28px;
    }
}


/* Galerie justified uniforme v0.10 — uniquement pour le prototype */
.rspg-wrapper {
    width: 100%;
}

.rspg-gallery {
    display: block;
    width: 100%;
}

.rspg-row {
    display: flex;
    width: 100%;
    gap: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}

.rspg-row:last-child {
    margin-bottom: 0;
}

.rspg-item {
    display: block;
    flex: 0 0 auto;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 3px;
    background: #eef1f3;
    cursor: zoom-in;
    appearance: none;
}

.rspg-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .18s ease, filter .18s ease;
}

.rspg-item:hover img,
.rspg-item:focus-visible img {
    transform: scale(1.015);
    filter: brightness(.96);
}

.rspg-item:focus-visible {
    outline: 3px solid #1d5f8a;
    outline-offset: 2px;
}

.rspg-lightbox[hidden] {
    display: none !important;
}

.rspg-lightbox {
    position: fixed;
    z-index: 1000000100;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
}

.rspg-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .92);
}

.rspg-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    color: #fff;
}

.rspg-viewport {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
}

.rspg-viewport img {
    display: block;
    max-width: 95%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center center;
    will-change: transform;
    transition: transform .08s linear;
    user-select: none;
    -webkit-user-drag: none;
}

.rspg-close,
.rspg-fullscreen,
.rspg-nav,
.rspg-play {
    border: 0;
    color: #fff;
    cursor: pointer;
}

.rspg-close,
.rspg-fullscreen {
    position: absolute;
    z-index: 4;
    top: 8px;
    background: rgba(0, 0, 0, .35);
    border-radius: 5px;
}

.rspg-close {
    right: 10px;
    width: 46px;
    height: 46px;
    padding: 0;
    font-size: 42px;
    line-height: 1;
}

.rspg-fullscreen {
    left: 10px;
    min-width: 46px;
    height: 42px;
    padding: 4px 10px;
    font-size: 22px;
}

.rspg-nav {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 62px;
    height: 86px;
    padding: 0;
    transform: translateY(-50%);
    background: transparent;
    font-size: 54px;
    opacity: .52;
    transition: opacity .2s ease;
}

.rspg-nav:hover,
.rspg-nav:focus-visible {
    opacity: 1;
}

.rspg-prev {
    left: 4px;
}

.rspg-next {
    right: 4px;
}

.rspg-info {
    flex: 0 0 auto;
    width: min(960px, 92vw);
    margin: 8px auto 0;
    text-align: center;
}

.rspg-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.rspg-play {
    width: 39px;
    height: 39px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: transparent;
    font-size: 17px;
    line-height: 1;
}

.rspg-counter {
    font-size: 17px;
    font-weight: 700;
}

.rspg-caption {
    min-height: 1.5em;
    margin-top: 8px;
    font-size: 20px;
    line-height: 1.38;
}

body.rspg-open {
    overflow: hidden;
}

@media (max-width: 700px) {
    .rspg-row {
        gap: 5px;
        margin-bottom: 5px;
    }

    .rspg-lightbox {
        padding: 7px;
    }

    .rspg-nav {
        width: 44px;
        height: 70px;
        font-size: 40px;
    }

    .rspg-info {
        width: 94vw;
    }

    .rspg-counter {
        font-size: 14px;
    }

    .rspg-caption {
        font-size: 15px;
    }
}


/* Mode panoramique de la lightbox */
.rspg-viewport.rspg-panorama {
    cursor: ew-resize;
}

.rspg-viewport.rspg-panorama img {
    width: auto;
    height: 100%;
    max-width: none;
    max-height: 100%;
    object-fit: contain;
}

.rs-prototype-gallery {
    padding-top: 2px;
}


/* Adaptation mobile v0.14 */
@media (max-width: 599px) {
    .rs-prototype-hero {
        width: calc(100% + 20px);
        margin-left: -10px;
        margin-right: -10px;
        border-radius: 0;
        aspect-ratio: 16 / 9;
    }

    .rspg-row {
        width: 100%;
    }

    .rspg-item {
        border-radius: 2px;
    }
}
