:root {
    --bg: black;
    --ppaper: #fff;
    --text: wheat;
    --muted: #6f7973;
    --border: rgba(38, 53, 46, .15);
    --button: #8b6828;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("/assets/RAlogoFull.B3VKqKJp.webp") center / 80% auto no-repeat;
    opacity: 0.13;
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

a { color: inherit; }

.site-header {
    min-height: 75px;
    padding: 15px clamp(20px, 5vw, 70px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    text-decoration: none;
    letter-spacing: .16em;
    font-size: .8rem;
}

.logo img {
    height: 50px;
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.site-header nav a {
    text-decoration: none;
    font-size: .85rem;
}

.nav-create {
    border: 1px solid var(--text);
    border-radius: 999px;
    padding: 10px 18px;
    background: var(--button);

}

.page {
    width: min(900px, calc(100% - 30px));
    margin: auto;
    padding: clamp(50px, 8vw, 110px) 0;
}

.wide-page {
    width: min(1400px, calc(100% - 30px));
    margin: auto;
    padding: clamp(50px, 8vw, 110px) 0;
}

.hero {
    max-width: 760px;
    margin: 0 auto 60px;
    text-align: center;
}

.eyebrow {
    font-size: .68rem;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 15px 0 25px;
    font-family: Georgia, serif;
    font-size: clamp(2.7rem, 7vw, 5.5rem);
    font-weight: 400;
    line-height: .98;
}

.hero > p:not(.eyebrow) {
    color: var(--muted);
    line-height: 1.7;
}

.card {
/*    margin: 30px 0;*/
    padding:  clamp(25px, 5vw, 50px);
    background: var(--paper);
    border-radius: 22px;
}

.card h2 {
    margin-top: 0;
    font-family: Georgia, serif;
    font-size: 2rem;
    font-weight: 400;
}

.form {
    display: grid;
    gap: 25px;
}

.form label > span {
    display: block;
    margin-bottom: 8px;
    font-size: .85rem;
}

.form small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

.form input,
.form select,
.form textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #37300b;
    color: var(--text);
    font: inherit;
}
.form input::placeholder{
    color: grey;
    opacity:0.5;
}



input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text) !important;
    -webkit-background-clip: text;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: green;
    box-shadow: 0 0 0 1000px #37300b inset !important;
    -webkit-box-shadow: 0 0 0 1000px #37300b inset !important;
    background-color: #f3efe8 !important;
}

.form textarea {
    resize: vertical;
    line-height: 1.6;
}

.button {
    display: inline-block;
    border: 0;
    border-radius: 999px;
    padding: 15px 25px;
    background: var(--button);
    color: white;
    font: inherit;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
}

.inline-button { margin-top: 20px; }
.status { text-align: center; }

.upload-previews,
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.upload-photo,
.existing-photo {
    overflow: hidden;
    background: var(--bg);
    border-radius: 12px;
}

.upload-media__preview,
.existing-media__preview {
    width: 100%;
    overflow: hidden;
}

.upload-media__preview img,
.upload-media__preview video,
.existing-media__preview img,
.existing-media__preview video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
}
/*
.upload-photo img,
.existing-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}
*/
.upload-photo textarea {
    width: calc(100% - 20px);
    margin: 10px;
    padding: 10px;
}

.existing-photo p {
    padding: 0 12px;
    font-size: .85rem;
    line-height: 1.5;
}

.delete-photo {
    margin: 0 12px 12px;
    border: 0;
    background: white;
    text-decoration: underline;
    cursor: pointer;
}

.consent {
    display: flex;
    gap: 12px;
    margin: 25px 0;
    line-height: 1.5;
}

.consent input { width: auto; }

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.book-card {
    min-height: 240px;
    padding: 30px;
    background: #393939;
    border-radius: 18px;
    text-decoration: none;
}

.book-card h2 {
    font-family: Georgia, serif;
    font-size: 1.8rem;
    font-weight: 400;
}

.book-card > p:last-child { color: var(--muted); }


/* =========================================================
   GALERIE DES VOYAGEURS
   ========================================================= */

.photos-page {
    padding-top: clamp(50px, 7vw, 100px);
}

.photos-hero {
    margin-bottom: clamp(60px, 9vw, 120px);
}

.photos-hero h1 {
    font-size: clamp(3.2rem, 8vw, 7rem);
}


/* Galerie type masonry */

.global-gallery--travelers {
    columns: 3 320px;
    column-gap: clamp(15px, 2vw, 28px);
}


.gallery-item {
    display: inline-block;
    width: 100%;

    margin: 0 0 clamp(30px, 4vw, 50px);

    break-inside: avoid;
}


.gallery-photo {
    display: block;

    color: inherit;
    background: transparent;

    text-decoration: none;
}


.gallery-photo__image {
    position: relative;
    overflow: hidden;

    background: #e5e1d7;
}


.gallery-photo__image img {
    display: block;

    width: 100%;
    height: auto;

    transition:
        transform .7s cubic-bezier(.2,.7,.2,1),
        opacity .4s ease;
}


/* Survol */

.gallery-photo__overlay {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: flex-end;

    padding: 20px;

    background:
        linear-gradient(
            to top,
            rgba(12,16,14,.55),
            transparent 45%
        );

    opacity: 0;

    transition: opacity .35s ease;
}


.gallery-photo__overlay span {
    color: white;

    font-size: .78rem;
    letter-spacing: .03em;

    transform: translateY(8px);

    transition: transform .35s ease;
}


.gallery-photo:hover
.gallery-photo__image img {
    transform: scale(1.025);
}


.gallery-photo:hover
.gallery-photo__overlay {
    opacity: 1;
}


.gallery-photo:hover
.gallery-photo__overlay span {
    transform: translateY(0);
}


/* Textes */

.gallery-photo__text {
    padding: 13px 3px 0;
}


.gallery-photo__caption {
    margin: 0;

    font-family: Georgia, serif;
    font-size: 1rem;
    line-height: 1.5;
}


.gallery-photo__meta {
    margin: 7px 0 0;

    color: var(--muted);

    font-size: .72rem;
    letter-spacing: .03em;
}


/* Footer */

.gallery-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;

    margin-top:
        clamp(80px, 10vw, 140px);

    text-align: center;
}


.gallery-footer p {
    margin: 0;

    color: var(--muted);

    font-family: Georgia, serif;
    font-size: 1.2rem;
}


/* Téléphone */

@media (max-width: 700px) {

    .photos-page {
        width: calc(100% - 24px);
    }

    .photos-hero h1 {
        font-size: clamp(3rem, 15vw, 5rem);
    }

    .global-gallery--travelers {
        columns: 1;
    }

    .gallery-item {
        margin-bottom: 48px;
    }

    /*
     * Pas besoin d'overlay au survol sur tactile.
     * Le texte reste visible sous la photo.
     */
    .gallery-photo__overlay {
        display: none;
    }

}

.book-footer {
    margin-top: 70px;
    text-align: center;
}

.empty {
    text-align: center;
    color: var(--muted);
}

@media (max-width: 700px) {
    .site-header { align-items: flex-start; }
    .site-header nav a:not(.nav-create) { display: none; }
    .hero h1 { font-size: clamp(2.7rem, 14vw, 4.5rem); }
}


/* Administration */
.admin-table-wrap{overflow-x:auto}.admin-table{width:100%;border-collapse:collapse}.admin-table th,.admin-table td{padding:12px;border-bottom:1px solid rgba(0,0,0,.12);text-align:left}.admin-photo.is-hidden{opacity:.45}.admin-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.button.secondary{background:#666}


.photo-caption {
    width: 100%;
    margin-top: 10px;
    resize: vertical;
}

.photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.photo-actions button {
    cursor: pointer;
}

.photo-actions button:disabled {
    opacity: .35;
    cursor: default;
}

.move-photo {
    min-width: 42px;
    font-size: 1.2rem;
}

/* =========================================================
   CARNET PUBLIC
   ========================================================= */

.public-book {
    width: min(1280px, calc(100% - 40px));
    padding-top: clamp(55px, 8vw, 110px);
    margin-inline: auto;
}


.public-book-hero {
    width: min(950px, 100%);
    margin: 0 auto clamp(50px, 8vw, 100px);
    text-align: center;
}


.public-book-hero h1 {
    max-width: 950px;
    margin: 18px auto 28px;

    font-family: Georgia, serif;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 400;
    line-height: .95;
    letter-spacing: -.035em;
}


.book-by {
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.7;
}


.book-by span {
    padding: 0 .3em;
}


/* Histoire */

.public-story {
    width: min(720px, 100%);
    margin:
        0 auto
        clamp(70px, 10vw, 140px);
}


.public-story p {
    margin: 0;

    font-family: Georgia, serif;
    font-size: clamp(1.25rem, 2.4vw, 1.75rem);
    line-height: 1.8;
}


/* Galerie */

.public-gallery--book {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap:
        clamp(35px, 6vw, 90px)
        clamp(18px, 3vw, 45px);
}


.public-photo {
    min-width: 0;
    margin: 0;
}


/* Première photo */

.public-photo--hero {
    grid-column: 1 / -1;
    width: min(1100px, 100%);
    margin-inline: auto;
}


.public-photo__button {
    display: block;
    width: 100%;
    padding: 0;

    border: 0;
    background: none;

    cursor: zoom-in;
}

.public-photo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 3px;

    transition:
        transform .35s ease,
        opacity .35s ease;
}

.public-photo:not(.public-photo--hero) img {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
}


.public-photo__button:hover img {
    opacity: .94;
}


.public-photo figcaption {
    width: min(620px, calc(100% - 20px));

    margin:
        14px auto 0;

    color: var(--muted);

    font-family: Georgia, serif;
    font-size: .95rem;
    font-style: italic;
    line-height: 1.6;
}


/* Pied du carnet */

.book-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;

    margin-top:
        clamp(100px, 12vw, 170px);

    text-align: center;
}


.book-footer p {
    margin: 0;

    color: var(--muted);

    font-family: Georgia, serif;
    font-size: 1.2rem;
}


.book-footer-gallery {
    color: var(--muted);
    font-size: .85rem;
}


/* =========================================================
   LIGHTBOX
   ========================================================= */

body.lightbox-open {
    overflow: hidden;
}


.souvenir-lightbox {
    position: fixed;
    z-index: 10000;
    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 40px 80px;

    background: rgba(12, 16, 14, .96);
}


.souvenir-lightbox.is-open {
    display: flex;
}


.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;
}


.lightbox-image {
    display: block;

    max-width: 100%;
    max-height: calc(100vh - 150px);

    object-fit: contain;
}


.lightbox-caption {
    max-width: 700px;

    margin: 18px auto 0;

    color: rgba(255,255,255,.9);

    font-family: Georgia, serif;
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
}


.lightbox-counter {
    margin: 9px 0 0;

    color: rgba(255,255,255,.5);

    font-size: .72rem;
    letter-spacing: .12em;
}


.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    z-index: 2;

    border: 0;
    background: none;

    color: white;

    cursor: pointer;
}


.lightbox-close {
    top: 18px;
    right: 25px;

    font-size: 2.4rem;
    font-weight: 200;
}


.lightbox-prev,
.lightbox-next {
    top: 50%;

    transform: translateY(-50%);

    padding: 20px;

    font-family: Georgia, serif;
    font-size: 4rem;
    font-weight: 200;
}


.lightbox-prev {
    left: 10px;
}


.lightbox-next {
    right: 10px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .public-book {
        width: calc(100% - 24px);
    }


    .public-book-hero {
        margin-bottom: 55px;
    }


    .public-book-hero h1 {
        font-size: clamp(2.8rem, 14vw, 5rem);
    }


    .public-story {
        margin-bottom: 65px;
    }


    .public-story p {
        font-size: 1.2rem;
        line-height: 1.7;
    }


    .public-gallery--book {
        grid-template-columns: 1fr;
        gap: 50px;
    }


    .public-photo--hero {
        grid-column: auto;
    }


    .public-photo img,
    .public-photo:not(.public-photo--hero) img {
        height: auto;
        aspect-ratio: auto;
        object-fit: contain;
    }


    .souvenir-lightbox {
        padding: 55px 12px 75px;
    }


    .lightbox-image {
        max-height: calc(100vh - 170px);
    }


    .lightbox-prev,
    .lightbox-next {
        top: auto;
        bottom: 8px;

        transform: none;

        padding: 8px 25px;

        font-size: 3rem;
    }


    .lightbox-prev {
        left: 10px;
    }


    .lightbox-next {
        right: 10px;
    }


    .lightbox-close {
        top: 8px;
        right: 14px;
    }
}/* =========================================================
   ACCUEIL DES CARNETS
   ========================================================= */

.souvenirs-home {
    padding-top: clamp(50px, 7vw, 100px);
}

.souvenirs-hero {
/*    margin-bottom: clamp(65px, 9vw, 120px);*/
}

.souvenirs-hero h1 {
    /*    font-size: clamp(3.2rem, 8vw, 7rem);*/
    font-size: clamp(3.2rem, 8vw, 5rem);
}

.souvenirs-hero__actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 22px;

    margin-top: 30px;
}

.souvenirs-photo-link {
    color: var(--muted);
    font-size: .88rem;
}


/* Cartes */
/*
.books-grid--visual {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap:
        clamp(40px, 6vw, 85px)
        clamp(20px, 3vw, 45px);
}


.book-card--visual {
    min-height: 0;
    padding: 10px;

    overflow: hidden;

    border-radius: 10px;
    border: 1px solid goldenrod;
    background: transparent;

    text-decoration: none;
}
*/
.books-grid--visual {
    display: block;
    columns: 2;
    column-gap: clamp(20px, 3vw, 45px);
}

.book-card--visual {
    display: inline-block;
    width: 100%;
    margin: 0 0 clamp(40px, 6vw, 85px);
    break-inside: avoid;
}
/*
.book-card__image {
    position: relative;

    overflow: hidden;

    width: 100%;
    aspect-ratio: 4 / 3;

    border-radius: 10px;
    background: #e5e1d7;
}


.book-card__image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform .7s cubic-bezier(.2,.7,.2,1),
        opacity .4s ease;
}
*/

.book-card__image {
    position: relative;
    overflow: hidden;
    width: 100%;
    border-radius: 10px;
    background: #e5e1d7;
}

.book-card__image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;

    transition:
        transform .7s cubic-bezier(.2,.7,.2,1),
        opacity .4s ease;
}

.book-card--visual:hover
.book-card__image img {
    transform: scale(1.025);
    opacity: .94;
}


.book-card__image--empty {
    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--muted);

    font-family: Georgia, serif;
    font-size: 1.1rem;
    letter-spacing: .08em;
}


.book-card__content {
    padding: 22px 5px 0;
}


.book-card__content .eyebrow {
    margin: 0 0 12px;
}


.book-card__content h2 {
    margin: 0;

    font-family: Georgia, serif;
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    font-weight: 400;
    line-height: 1.05;
}


.book-card__meta {
    margin: 14px 0 0;

    color: var(--muted);

    font-size: .82rem;
}


.book-card__excerpt {
    max-width: 570px;

    margin: 17px 0 0;

    color: var(--muted);

    font-family: Georgia, serif;
    font-size: .95rem;
    line-height: 1.65;
}


.book-card__more {
    display: inline-block;

    margin-top: 20px;

    font-size: .82rem;
    border-bottom: 1px solid var(--border);

    padding-bottom: 4px;
}


/* Mobile */

@media (max-width: 700px) {

    .souvenirs-home {
        width: calc(100% - 24px);
    }

    .souvenirs-hero h1 {
        font-size: clamp(3rem, 15vw, 5rem);
    }
/*
    .books-grid--visual {
        grid-template-columns: 1fr;
        gap: 65px;
    }
*/
    .books-grid--visual {
    columns: 1;
}
    .book-card__content {
        padding-top: 18px;
    }

    .book-card__excerpt {
        font-size: .92rem;
    }
}

.traveler-content {
    margin-top: 14px;
    color: var(--muted);
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.book-lodge-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: border-color .2s ease;
}

.book-lodge-link:hover {
    border-color: currentColor;
}

/* =========================================================
   VIDEOS — CARNET PUBLIC
   ========================================================= */

.public-video {
    position: relative;
    overflow: hidden;
    background: #111;
}

.public-video video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    background: #111;
}

.public-media--video .media-type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}
.book-card__image {
    position: relative;
}
/*
.book-card__image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
*/
.book-card__image video {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}
.book-card__video-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    background: rgba(255,255,255,.88);
    color: #111;
    font-size: 1.1rem;
    pointer-events: none;
}

.upload-media {
    position: relative;
}

.media-upload-status {
    position: absolute;
    inset: 0;
    z-index: 20;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .7rem;

    background: rgba(255, 255, 255, .82);

    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.media-upload-status[hidden] {
    display: none;
}

.media-upload-spinner {
    width: 30px;
    height: 30px;

    border: 2px solid rgba(0, 0, 0, .15);
    border-top-color: currentColor;
    border-radius: 50%;

    animation: media-upload-spin .8s linear infinite;
}

@keyframes media-upload-spin {
    to {
        transform: rotate(360deg);
    }
}
.book-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: .8rem;
    padding: .45rem .8rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.book-status[data-status="draft"] {
    opacity: .65;
}

.book-status[data-status="pending"]::before {
    content: "●";
    margin-right: .5rem;
}

.book-status[data-status="published"]::before {
    content: "✓";
    margin-right: .5rem;
}

.book-status[data-status="hidden"] {
    opacity: .65;
}
.stay-period {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Médias dans l'administration */

.admin-photo img,
.admin-photo video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
}

.admin-photo video {
    background: #111;
}
.admin-photo {
    max-width: 500px;
}
.button:disabled,
.save-caption:disabled {
    opacity: .35;
    cursor: default;
    pointer-events: none;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;
    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;
    font-size: 1.25rem;

    cursor: pointer;
}

.icon-button:hover {
    background: rgba(255, 255, 255, .08);
}

.icon-button:disabled {
    opacity: .25;
    cursor: default;
    pointer-events: none;
}
.create-media-section {
    margin-top: 15px;
}

.create-media-section h2 {
    margin-bottom: 8px;
}

.create-media-section > p {
    color: var(--muted);
    margin-bottom: 20px;
}

.remove-upload {
    margin: 5px 10px 12px auto;
}

#creationSuccess {
    text-align: center;
}

#creationSuccess .button {
    margin-top: 15px;
}
.create-upload-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;

    margin: 20px 0;
    padding: 18px;

    border-radius: 12px;
    background: rgba(255,255,255,.08);
}

.create-upload-status[hidden] {
    display: none;
}

.upload-progress-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

#createUploadPercent {
    min-width: 45px;
    font-size: 1rem;
    text-align: right;
}
