/* =====================================================
   1. VARIABLES ET BASE
===================================================== */

* {
    box-sizing: border-box;
}

:root {
    --fond: #F5E3CF;
    --fond-secondaire: #F2D2D2;
    --texte: #35243D;
    --secondaire: #786477;
    --rose: #E77FA5;
    --rose-clair: #F8C5D8;
    --rose-fonce: #C94F83;
    --violet: #514566;
    --abricot: #E9A05F;
    --bordure: #E8BFC5;
    --largeur: 1400px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--fond);
    color: var(--texte);
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}


/* =====================================================
   2. HEADER ET NAVIGATION
===================================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(245, 227, 207, 0.96);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--bordure);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    display: block;
    width: auto;
    height: 58px;
    max-width: 190px;
    object-fit: contain;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 35px;
    font-size: 13px;
    font-weight: 500;
}

.navigation a {
    position: relative;
    padding: 10px 0;
    color: var(--secondaire);
    transition: color .2s;
}

.navigation a:hover,
.navigation a.active {
    color: var(--texte);
}

.navigation a::after {
    content: "";
    position: absolute;
    bottom: 3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--rose-fonce);
    transition: width .25s;
}

.navigation a:hover::after,
.navigation a.active::after {
    width: 100%;
}


/* =====================================================
   3. MENU HAMBURGER
===================================================== */

.menu-deroulant {
    position: relative;
}

.menu-deroulant summary {
    width: 42px;
    height: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    list-style: none;
    border: 1px solid var(--bordure);
    border-radius: 50%;
    transition: background .2s;
}

.menu-deroulant summary::-webkit-details-marker {
    display: none;
}

.menu-deroulant summary:hover {
    background: var(--rose-clair);
}

.menu-deroulant summary span {
    width: 17px;
    height: 1.5px;
    background: var(--texte);
    transition: transform .2s, opacity .2s;
}

.menu-deroulant[open] summary span:first-child {
    transform: translateY(6.5px) rotate(45deg);
}

.menu-deroulant[open] summary span:nth-child(2) {
    opacity: 0;
}

.menu-deroulant[open] summary span:last-child {
    transform: translateY(-6.5px) rotate(-45deg);
}

.menu-contenu {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 290px;
    max-height: 75vh;
    overflow-y: auto;
    padding: 25px;
    background: #FFF0E3;
    border: 1px solid var(--bordure);
    border-radius: 12px;
    box-shadow: 0 15px 45px rgba(53, 36, 61, .15);
    animation: apparition .2s ease;
}

@keyframes apparition {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-contenu .eyebrow {
    margin: 0 0 15px;
}

.menu-albums {
    padding: 0;
    margin: 0;
    list-style: none;
}

.menu-albums ul {
    padding-left: 18px;
    list-style: none;
}

.menu-albums li {
    margin: 8px 0;
}

.menu-albums a {
    display: block;
    padding: 6px 0;
    color: var(--secondaire);
    font-size: 13px;
    transition: color .2s;
}

.menu-albums a:hover {
    color: var(--rose-fonce);
}


/* =====================================================
   4. TEXTES ET TITRES
===================================================== */

.eyebrow {
    color: var(--rose-fonce);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    font-family: Georgia, serif;
    font-weight: normal;
}

h2 {
    font-size: clamp(30px, 4vw, 42px);
}

.section-description {
    color: var(--secondaire);
    line-height: 1.7;
    font-size: 14px;
}

.section-entete {
    margin-bottom: 35px;
}


/* =====================================================
   5. HERO / PAGE D'ACCUEIL
===================================================== */

.hero {
    min-height: 570px;
    padding: 90px 9%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    background:
        radial-gradient(
            ellipse at 85% 20%,
            rgba(231, 127, 165, .55),
            transparent 50%
        ),
        linear-gradient(
            115deg,
            #F5E3CF 0%,
            #F5C9CE 55%,
            #ECA6BE 100%
        );
}

.hero .eyebrow {
    margin-bottom: 5px;
}

.hero h1 {
    margin: 20px 0;
    font-size: clamp(45px, 7vw, 88px);
    line-height: 1.08;
    letter-spacing: -2px;
}

.hero h1 em {
    color: var(--rose-fonce);
    font-weight: normal;
}

.hero-description {
    max-width: 460px;
    color: var(--secondaire);
    line-height: 1.8;
    font-size: 15px;
}

.bouton {
    display: inline-block;
    margin-top: 25px;
    padding: 15px 23px;
    background: var(--texte);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    transition: background .25s, transform .25s;
}

.bouton:hover {
    background: var(--rose-fonce);
    transform: translateY(-3px);
}


/* =====================================================
   6. SECTIONS GÉNÉRALES
===================================================== */

.section {
    padding: 80px 6%;
    max-width: 1600px;
    margin: 0 auto;
}

.section h2 {
    margin: 10px 0 20px;
}


/* =====================================================
   7. DERNIÈRES PHOTOGRAPHIES
===================================================== */

.section-recentes {
    overflow: hidden;
}

/* Défilement horizontal manuel des dernières photos */
.defilement-recentes {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--rose) transparent;
}

.defilement-recentes::-webkit-scrollbar {
    height: 7px;
}

.defilement-recentes::-webkit-scrollbar-track {
    background: transparent;
}

.defilement-recentes::-webkit-scrollbar-thumb {
    background: var(--rose);
    border-radius: 10px;
}

.piste-recentes {
    display: flex;
    align-items: stretch;
    gap: 14px;
    width: max-content;
}

.piste-recentes .photo {
    flex: 0 0 260px;
    width: 260px;
}

.piste-recentes .photo img {
    height: 220px;
}


/* =====================================================
   8. PHOTOGRAPHIES
===================================================== */

.photo {
    display: block;
    overflow: hidden;
    background: var(--fond-secondaire);
    border-radius: 5px;
}

.photo img {
    width: 100%;
    height: 260px;
    display: block;
    object-fit: cover;
    transition: transform .5s ease;
}

.photo:hover img {
    transform: scale(1.06);
}


/* =====================================================
   9. ALBUMS À DÉCOUVRIR
===================================================== */

.section-albums {
    overflow: hidden;
}

.album-section {
    margin-bottom: 65px;
}

.album-entete {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.album-entete .eyebrow {
    margin-bottom: 8px;
}

.album-entete h3 {
    margin: 0;
    font-size: 30px;
}

.album-entete h3 a {
    transition: color .2s;
}

.album-entete h3 a:hover {
    color: var(--rose-fonce);
}

.album-lien {
    padding-bottom: 5px;
    color: var(--secondaire);
    font-size: 12px;
    transition: color .2s;
}

.album-lien:hover {
    color: var(--rose-fonce);
}


/* =====================================================
   10. DÉFILEMENT DES PHOTOGRAPHIES DES ALBUMS
===================================================== */

.album-defilement {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

.album-rangee {
    width: 100%;
    overflow: hidden;
}

.album-piste {
    display: flex;
    width: max-content;
    gap: 12px;
    animation: defilement 65s linear infinite;
}

.album-piste .photo {
    width: 260px;
    flex-shrink: 0;
}

.album-piste .photo img {
    height: 180px;
}

.album-rangee.sens-inverse .album-piste {
    animation-name: defilement-inverse;
}

.album-defilement:hover .album-piste {
    animation-play-state: paused;
}

@keyframes defilement {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@keyframes defilement-inverse {
    from {
        transform: translateX(-50%);
    }

    to {
        transform: translateX(0);
    }
}


/* =====================================================
   11. ALBUMS ET SOUS-ALBUMS
===================================================== */

.albums {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.album {
    min-height: 155px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 12px;
    background: linear-gradient(
        145deg,
        #F6BBD0,
        #EBC6D8,
        #E6C9E8
    );
    border: 1px solid var(--bordure);
    border-radius: 7px;
    transition: transform .25s, box-shadow .25s;
}

.album:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(41, 35, 68, .09);
}

.album span:first-child {
    font-family: Georgia, serif;
    font-size: 25px;
}

.album span:last-child {
    color: var(--secondaire);
    font-size: 12px;
}


/* =====================================================
   12. PAGE GALERIE
===================================================== */

.section-galerie {
    min-height: 65vh;
}

.section-galerie h1 {
    margin: 15px 0 35px;
    font-size: clamp(40px, 6vw, 65px);
}

.fil-ariane {
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--secondaire);
    font-size: 12px;
}

.fil-ariane a:hover {
    color: var(--rose-fonce);
}

.sous-albums {
    margin-bottom: 55px;
}

.sous-albums h2,
.galerie-photos h2 {
    font-size: 28px;
}

.galerie-photos {
    margin-top: 55px;
}

.grille {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.album-vide {
    color: var(--secondaire);
    font-size: 14px;
}


/* =====================================================
   13. À PROPOS
===================================================== */

.section-apropos {
    padding-top: 65px;
    padding-bottom: 90px;
    background: linear-gradient(
        110deg,
        #F0C9D0,
        #F5DCCB,
        #F5E3CF
    );
}

.section-apropos p:last-child {
    max-width: 600px;
    color: var(--secondaire);
    line-height: 1.9;
}


/* =====================================================
   14. VISIONNEUSE
===================================================== */

.visionneuse {
    position: fixed;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 65px;
    border: none;
    background: rgba(20, 17, 29, .96);
}

.visionneuse::backdrop {
    background: rgba(20, 17, 29, .96);
}

.visionneuse[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.visionneuse img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.visionneuse-fermer {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 38px;
    cursor: pointer;
}


/* =====================================================
   15. FOOTER
===================================================== */

.footer {
    padding: 35px 6%;
    border-top: 1px solid var(--bordure);
    color: var(--secondaire);
    font-size: 12px;
}


/* =====================================================
   16. RESPONSIVE TABLETTES
===================================================== */

@media (max-width: 1000px) {
    .albums {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .piste-recentes .photo {
        flex-basis: 230px;
        width: 230px;
    }
}


/* =====================================================
   17. RESPONSIVE MOBILES
===================================================== */

@media (max-width: 700px) {
    .header {
        padding: 12px 5%;
        gap: 12px;
    }

    .logo img {
        height: 45px;
        max-width: 130px;
    }

    .navigation {
        gap: 12px;
        font-size: 11px;
    }

    .menu-deroulant summary {
        width: 36px;
        height: 36px;
    }

    .menu-contenu {
        width: min(290px, 85vw);
    }

    .hero {
        min-height: 440px;
        padding: 65px 7%;
    }

    .hero h1 {
        font-size: clamp(40px, 10vw, 60px);
    }

    .section {
        padding: 55px 5%;
    }

    .grille {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .photo img {
        height: 180px;
    }

    .piste-recentes {
        gap: 9px;
    }

    .piste-recentes .photo {
        flex-basis: 190px;
        width: 190px;
    }

    .piste-recentes .photo img {
        height: 155px;
    }

    .album-entete {
        align-items: flex-start;
        flex-direction: column;
    }

    .album-entete h3 {
        font-size: 26px;
    }

    .album-piste .photo {
        width: 190px;
    }

    .album-piste .photo img {
        height: 145px;
    }

    .album-section {
        margin-bottom: 45px;
    }

    .albums {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .album {
        min-height: 125px;
        padding: 15px;
    }

    .album span:first-child {
        font-size: 20px;
    }

    .visionneuse {
        padding: 20px;
    }
}


/* =====================================================
   18. ACCESSIBILITÉ : RÉDUCTION DES ANIMATIONS
===================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* =====================================================
   19. VISIONNEUSE ET INTERACTIONS SOCIALES
===================================================== */

.visionneuse[open] {
    display: block;
}

.visionneuse-contenu {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 30px;
    width: 100%;
    height: calc(100vh - 130px);
    max-width: 1500px;
    margin: auto;
}

.visionneuse-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 100%;
}

.visionneuse-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.interactions {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 28px;
    overflow-y: auto;
    background: #FFF0E3;
    color: var(--texte);
    border-radius: 12px;
}

.interactions-entete {
    border-bottom: 1px solid var(--bordure);
    padding-bottom: 15px;
}

.interactions-entete .eyebrow {
    margin-top: 0;
}

.interactions-entete h2 {
    font-size: 25px;
    margin: 8px 0;
}

.bouton-like {
    display: flex;
    align-items: center;
    gap: 9px;
    align-self: flex-start;
    margin: 20px 0;
    padding: 12px 18px;
    border: 1px solid var(--bordure);
    border-radius: 30px;
    background: white;
    color: var(--texte);
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.bouton-like:hover {
    transform: scale(1.04);
    background: var(--rose-clair);
}

.bouton-like span:first-child {
    color: var(--rose-fonce);
    font-size: 23px;
}

.bouton-like.aime {
    background: var(--rose-clair);
    border-color: var(--rose);
}

.bouton-like:disabled {
    opacity: .6;
    cursor: wait;
}

.commentaires {
    flex: 1;
    min-height: 100px;
}

.commentaires h3,
.comment-form h3 {
    font-family: Georgia, serif;
    font-size: 21px;
    font-weight: normal;
}

.commentaire {
    padding: 15px 0;
    border-bottom: 1px solid var(--bordure);
}

.commentaire strong {
    display: block;
    font-size: 13px;
}

.commentaire small {
    display: block;
    margin-top: 4px;
    color: var(--secondaire);
    font-size: 10px;
}

.commentaire p {
    margin-bottom: 0;
    color: var(--texte);
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.commentaire-vide {
    color: var(--secondaire);
    font-size: 13px;
    line-height: 1.6;
}

.comment-form {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--bordure);
}

.comment-form input,
.comment-form textarea {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 12px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: var(--texte);
    background: white;
    border: 1px solid var(--bordure);
    border-radius: 6px;
    outline: none;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--rose-fonce);
}

.comment-form textarea {
    min-height: 95px;
    resize: vertical;
}

.bouton-commenter {
    width: 100%;
    padding: 13px;
    color: white;
    background: var(--rose-fonce);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s;
}

.bouton-commenter:hover {
    background: var(--violet);
}

.bouton-commenter:disabled {
    opacity: .6;
    cursor: wait;
}

#comment-message {
    color: var(--rose-fonce);
    font-size: 12px;
}

/* RESPONSIVE */

@media (max-width: 900px) {

    .visionneuse {
        padding: 55px 20px 20px;
    }

    .visionneuse-contenu {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 15px;
        height: calc(100vh - 90px);
    }

    .interactions {
        padding: 18px;
    }

}

@media (max-width: 650px) {

    .visionneuse {
        padding: 60px 12px 12px;
    }

    .visionneuse-contenu {
        display: flex;
        flex-direction: column;
        height: calc(100vh - 80px);
        overflow-y: auto;
        gap: 15px;
    }

    .visionneuse-image {
        flex: 0 0 35vh;
        min-height: 200px;
    }

    .visionneuse-image img {
        max-height: 35vh;
    }

    .interactions {
        flex: 0 0 auto;
        overflow: visible;
        padding: 20px;
    }

    .visionneuse-fermer {
        top: 10px;
        right: 18px;
    }

}


/* =====================================================
   BOUTONS LIKE SUR LES PHOTOGRAPHIES
===================================================== */

.photo-carte {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 5px;
}

.photo-carte .photo {
    width: 100%;
}

.photo-like {
    position: absolute;
    z-index: 5;
    right: 10px;
    bottom: 10px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 5px;
    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.85);
    cursor: pointer;

    transition: transform .2s, background .2s;
}

.photo-like img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.photo-like:hover {
    transform: scale(1.15);
    background: white;
}

.photo-like:disabled {
    opacity: .6;
    cursor: wait;
}

/* Dimensions dans les défilements */

.piste-recentes .photo-carte {
    flex: 0 0 260px;
    width: 260px;
}

.album-piste .photo-carte {
    width: 260px;
    flex-shrink: 0;
}

/* Bouton like dans la visionneuse */

.bouton-like img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.bouton-like.aime {
    background: var(--rose-clair);
    border-color: var(--rose);
}

/* Bouton livre */

.bouton-histoire {
    width: 44px;
    height: 44px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 5px;
    border: none;
    border-radius: 50%;

    background: transparent;
    cursor: pointer;

    transition: transform .2s;
}

.bouton-histoire img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bouton-histoire:hover {
    transform: scale(1.12);
}

/* Informations de la photo */

.photo-informations {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.photo-informations-texte {
    min-width: 0;
}

.photo-description {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.photo-description[hidden] {
    display: none;
}

/* Adaptation mobile */

@media (max-width: 700px) {

    .piste-recentes .photo-carte {
        flex-basis: 190px;
        width: 190px;
    }

    .album-piste .photo-carte {
        width: 190px;
    }

}
