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

body {
    font-family: 'Roboto Mono', monospace;
    font-size: 11.5px;
    line-height: 1.7;
    color: #444444;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================
   BARRE LATÉRALE (FIXE)
   ========================================================== */
.sidebar {
    width: 280px;
    height: 100vh;
    position: fixed; 
    top: 0;
    left: 0;
    padding: 40px 30px;
    border-right: 1px solid #eeeeee;
    background-color: #ffffff;
    overflow-y: auto;
    
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
}

/* --- LOGO --- */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-image {
    width: 220px;       /* Remplit tout l'espace disponible en haut de la barre */
    max-width: 100%;    /* Empêche le logo de dépasser */
    height: auto;
}

/* --- SECTION 'À PROPOS' --- */
.about-me {
    flex-shrink: 0;
    margin-top: auto; /* Pousse le texte et le lien tout en bas de la barre */
    padding-top: 30px; /* Maintient un espace minimal sous le logo */
}

.about-me p {
    font-size: 11px;
    line-height: 1.7;
    color: #000000;
}

/* Style du lien "Pour me parler" */
.about-me a {
    color: #000000;
    font-weight: 700;
    text-decoration: underline;
    transition: opacity 0.2s ease;
    cursor: pointer;
    display: inline-block;
}

.about-me a:hover {
    opacity: 0.6;
}

/* ==========================================================
   CONTENU PRINCIPAL (GALERIE MASONRY)
   ========================================================== */
.main-content {
    margin-left: 280px;
    width: calc(100% - 280px);
    padding: 40px;
}

.gallery {
    column-width: 260px; 
    column-gap: 20px; 
}

.gallery img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 20px;
    border-radius: 2px;
    break-inside: avoid;
    transition: opacity 0.3s ease;
    cursor: pointer;
    border: 1px solid #e0e0e0;
}

.gallery img:hover {
    opacity: 0.8;
}

/* ==========================================================
   FENÊTRE MODALE (POPUP IMAGE)
   ========================================================== */
.modal {
    display: none; 
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); 
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-box {
    background-color: #ffffff;
    padding: 20px;
    max-width: 80%;
    max-height: 90vh;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-img {
    max-width: 100%;
    max-height: 70vh; 
    object-fit: contain;
    border-radius: 2px;
}

.modal-caption {
    margin-top: 15px;
    font-size: 13px;
    color: #333333;
    line-height: 1.5;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #ccc;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: none;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
    user-select: none;
    z-index: 10000;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.6);
    color: #000000;
}

.prev-btn { left: 20px; }
.next-btn { right: 20px; }

.page-counter {
    margin-top: 10px;
    font-size: 11px;
    color: #888888;
}

/* ==========================================================
   ADAPTATION MOBILE (RESPONSIVE)
   ========================================================== */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #eeeeee;
        padding: 30px 20px;
        gap: 20px;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }

    .gallery {
        column-width: 100%;
    }

    .modal-box {
        max-width: 95%;
        padding: 15px;
    }
    
    .modal-img {
        max-height: 60vh;
    }
}