/* ============================================
   RESET
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Caché par défaut sur desktop */
#mobile-header,
#mobile-menu {
    display: none;
}
.mobile-portraits {
    display: none;
}
html, body {
    overflow-x: hidden;
    width: 100%;
}

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR / MENU
============================================ */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    background: #fff;
    padding: 40px;
    box-sizing: border-box;
}

#sidebar h1 {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: 60px;
}

#sidebar h1 a {
    text-decoration: none;
    color: #000;
}

#sidebar h1 a:hover {
    color: #888;
}

#sidebar nav ul {
    list-style: none;
}

#sidebar nav ul li {
    margin-bottom: 1px;
}

#sidebar nav ul li.separated {
    margin-bottom: 40px;
}

#sidebar nav ul li a {
    text-decoration: none;
    color: #000;
    font-size: 10px;
    letter-spacing: 1px;
}

#sidebar nav ul li a:hover {
    color: #888;
}

/* ============================================
   PAGE D'ACCUEIL : image unique centrée (#content)
============================================ */
#content {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-sizing: border-box;
}

#content img {
    max-width: 100%;
    max-height: 85vh;
}
#content a {
    display: block;
    line-height: 0;
}

#content a:hover img {
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

/* ============================================
   PAGE ABOUT : texte de présentation
============================================ */
#content.text-page {
    justify-content: flex-start;
    align-items: flex-start;
}

.statement {
    max-width: 700px;
    margin-top: 80px;
    margin-left: 300px;
    font-size: 12px;
    line-height: 1.6;
    color: #000;
    text-align: justify;
    position: relative;
}

.statement p {
    margin-bottom: 1.5em;
}

.side-portrait {
    position: absolute;
    right: -180px;
    width: 70px;
    height: auto;
}

/* ============================================
   MENU DEROULANT : CONTACT
============================================ */
.contact-info {
    display: none;
    margin-top: 12px;
}

.contact-info.open {
    display: block;
}

.contact-info p {
    font-size: 12px;
    margin-bottom: 4px;
}
.copyright {
    position: fixed;
    bottom: 40px;
    left: 40px;
    font-size: 10px;
    letter-spacing: 1px;
    color: #000;
}

/* ============================================
   LISTE DEROULANTE PAINTINGS (positionnée à droite, sans pousser le menu)
============================================ */
li.separated {
    position: relative;
}

.paintings-list {
    display: none;
    position: absolute;
    top: 0;
    left: 140px;
    width: 200px;
    max-height: 70vh;
    overflow-y: auto;
    list-style: none;
    padding-right: 10px;
}

.paintings-list.open {
    display: block;
}

.paintings-list li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 6px;
    font-size: 13px;
    white-space: nowrap;
}

.paintings-list li .dash {
    position: absolute;
    left: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.paintings-list li.active .dash {
    opacity: 1;
}

.paintings-list li a {
    text-decoration: none;
    color: #000;
}

.paintings-list li a:hover {
    color: #888;
}

/* ============================================
   PAGE PAINTINGS : défilement vertical des toiles
============================================ */
.paintings-scroll {
    display: block;
    width: 100%;
    padding: 0 80px 200px 80px;
    box-sizing: border-box;
    overflow: hidden;
}

.painting {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 180px;
}

.painting:first-child {
    min-height: 100vh;
    align-items: center;
    margin-bottom: 140px;
}

.painting-frame {
    position: relative;
    display: inline-block;
}

.painting-frame img {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
   
}

.painting .caption {
    position: absolute;
    left: 100%;
    bottom: 0;
    margin-left: 100px;
    width: 200px;
    white-space: normal;
    font-size: 11px;
    line-height: 1.6;
    text-align: left;
}

.painting .painting-title {
    margin-bottom: 8px;
    font-weight: 500;
}

/* ============================================
   VERSION MOBILE (moins de 768px)
============================================ */
@media (max-width: 768px) {

	#content img {
    margin-top: 20px;
}
.mobile-portraits {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    height: 40vh;
    margin-bottom: 20px;
}

.mobile-portraits img {
    width: 35%;
    max-width: 140px;
    height: auto;
    object-fit: cover;
}

/* On cache les anciennes images flottantes dans le texte, remplacées par le bloc ci-dessus */
.side-portrait {
    display: none;
}
    /* On cache complètement l'ancien menu desktop */
    #sidebar {
        display: none;
    }

    /* Barre fixe en haut */
    #mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        padding: 0 20px;
        background: #fff;
        z-index: 100;
        box-sizing: border-box;
        border-bottom: 1px solid #eee;
    }

    .mobile-logo {
        font-size: 14px;
        font-weight: 400;
        letter-spacing: 1px;
        text-decoration: none;
        color: #000;
    }

    /* Bouton burger */
    #mobile-menu-toggle {
        width: 24px;
        height: 18px;
        position: relative;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
    }

    #mobile-menu-toggle span {
        display: block;
        position: absolute;
        left: 0;
        width: 100%;
        height: 1px;
        background: #000;
        transition: all 0.3s ease;
    }

    #mobile-menu-toggle span:nth-child(1) { top: 0; }
    #mobile-menu-toggle span:nth-child(2) { top: 8px; }
    #mobile-menu-toggle span:nth-child(3) { top: 16px; }

    /* Animation en croix quand le menu est ouvert */
    #mobile-menu-toggle.open span:nth-child(1) {
        top: 8px;
        transform: rotate(45deg);
    }
    #mobile-menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    #mobile-menu-toggle.open span:nth-child(3) {
        top: 8px;
        transform: rotate(-45deg);
    }

    /* Menu plein écran */
    #mobile-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #fff;
        z-index: 90;
        padding: 100px 30px 30px 30px;
        box-sizing: border-box;
    }

    #mobile-menu.open {
        display: block;
    }

    #mobile-menu nav ul {
        list-style: none;
    }

    #mobile-menu nav ul li {
        margin-bottom: 25px;
    }

    #mobile-menu nav ul li a {
        text-decoration: none;
        color: #000;
        font-size: 18px;
        letter-spacing: 1px;
    }

    #mobile-menu .contact-info {
        margin-top: 15px;
    }

    #mobile-menu .contact-info p {
        font-size: 14px;
        margin-bottom: 6px;
    }
	.contact-info a {
    color: inherit;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}
.mobile-copyright {
    position: absolute;
    bottom: 30px;
    left: 30px;
    font-size: 10px;
    letter-spacing: 1px;
    color: #888;
}
    /* Contenu : espace pour la barre fixe */
    #content,
    .statement,
    .paintings-scroll {
        margin-left: 0;
        padding: 60px 20px 40px 20px;
        box-sizing: border-box;
    }
.statement {
    margin-top: 0;
}
    #content {
        min-height: auto;
    }

    /* Page About */
    .side-portrait {
        position: static;
        float: right;
        width: 60px;
        margin: 0 0 10px 15px;
    }

    /* Page Paintings : plus de liste, images pleine largeur */
    .paintings-list {
        display: none;
    }

    .painting-frame {
        display: block;
        width: 100%;
    }

    .painting-frame img {
        max-width: 100%;
        width: 100%;
        max-height: none;
        height: auto;
    }

    .painting .caption {
        position: static;
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
        text-align: left;
    }
	
	.painting {
    margin-bottom: 60px;
}

    .painting:first-child {
    min-height: auto;
    padding-top: 20px;
    margin-bottom: 60px;
}

    .copyright {
        display: none;
    }
}
