@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400&display=swap');

:root {
    --bg-dark: #0c0c0c;
    --text-light: #f0f0f0;
    --border-color: #333;
}

/* RESET GLOBAL */
* { 
    box-sizing: border-box; 
    -webkit-font-smoothing: antialiased; 
    cursor: default !important; 
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: 'Cormorant Garamond', serif;
    background: rgb(250, 249, 244);
}

/* HEADER */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 1000;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.nav-btn {
    background: none;
    border: none;
    font: inherit;
    font-size: 16px;
    color: #000;
    padding: 0;
    margin-left: 0;
}

/* PANELS */
.sliding-panel {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.sliding-panel.open {
    transform: translateY(0);
}

#infoPanel {
    height: 35vh;
    background: rgb(250, 249, 244);
    z-index: 1100;
    border-top: 1px solid #eee;
}

#contactPanel {
    height: 35vh;
    background: rgb(250, 249, 244);
    z-index: 1100;
    border-top: 1px solid #eee;
}

#projectsPanel {
    background: var(--bg-dark);
    color: var(--text-light);
    z-index: 1105;
}

#viewPanel {
    background: var(--bg-dark);
    color: var(--text-light);
    z-index: 1200;
}

/* INFO GRID */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1.5fr;
    gap: 3rem;
    padding: 3rem 2rem;
}

.info-col a {
    display: block;
    text-decoration: none;
    color: #000;
    margin-bottom: 0.3rem;
}

/* PANEL CONTENT */
.panel-content {
    flex: 1;
    overflow-y: auto;
}

.panel-close {
    position: sticky;
    bottom: 0;
    text-align: right;
    padding: 1.5rem 2rem;
    font-size: 11px;
    text-transform: uppercase;
    background: inherit;
}

/* PROJECT LIST */
.project-row {
    display: flex;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.project-col-visual {
    width: 25%;
    padding: 0 2rem;
}

.project-col-visual img {
    width: 100%;
    max-width: 180px;
    height: auto;
    display: block;
}

.project-col-info {
    width: 75%;
    padding: 0 2rem;
}

.view-link {
    color: #888;
    text-decoration: none;
    font-size: 12px;
}

/* ========================= */
/* VIEW DETAIL (REFONTE)     */
/* ========================= */

.view-detail {
    display: flex;
    gap: 2rem;
    padding: 1.5rem 2rem;
}

/* HEADER À GAUCHE */
.view-header {
    flex: 0 0 30%;
    border-right: 1px solid var(--border-color);
    padding-right: 2rem;
}

/* COLONNE DROITE */
.view-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* GALERIE EN GRILLE (PLUS DE SCROLL HORIZONTAL) */
.view-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.view-gallery figure {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.view-gallery img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.view-gallery figcaption {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #666;
    font-style: normal;
}

/* TEXTE SOUS LES IMAGES */
.view-text {
    padding-top: 1rem;
}

/* ========================= */
/* BACKGROUND GALLERY        */
/* ========================= */

.gallery-bg {
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: rgb(250, 249, 244);
}

.gallery-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-image {
    max-width: 90%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    -webkit-user-drag: none;
}

.gallery-caption {
    color: #000;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 1.05rem;
    text-transform: none;
    letter-spacing: 0.05em;
    margin: 0;
    padding: 0;
    background: none;
    text-align: center;
    pointer-events: none;
    z-index: 2;
    margin-top: 1rem;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    color: #000;
    border: none;
    font-size: 56px;
    width: auto;
    height: auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: serif;
    font-weight: 300;
    letter-spacing: 2px;
}

.gallery-prev {
    left: 1rem;
}

.gallery-next {
    right: 1rem;
}

/* ========================= */
/* RESPONSIVE                */
/* ========================= */

@media (max-width: 768px) {

    .site-header {
        padding: 0 1rem;
    }

    .nav-btn {
        margin-left: 1rem;
        font-size: 14px;
    }

    .panel-content {
        padding: 1rem;
    }

    .panel-close {
        padding: 1rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 1rem;
    }

    .project-row {
        flex-direction: column;
        padding: 1.25rem 0;
    }

    .project-col-visual,
    .project-col-info {
        width: 100%;
        padding: 0 1rem;
    }

    .project-col-visual img {
        max-width: 100%;
    }

    .view-detail {
        flex-direction: column;
        padding: 1rem;
    }

    .view-header {
        flex: none;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-right: 0;
        padding-bottom: 1.5rem;
    }

    .view-gallery {
        grid-template-columns: 1fr;
    }

    .view-text {
        padding-top: 0.75rem;
    }

    .gallery-bg {
        padding: 1rem 0 2rem;
    }

    .gallery-image {
        max-width: 70%;
        max-height: 45vh;
    }

    .gallery-caption {
        font-size: 1rem;
    }

    .gallery-btn {
        font-size: 36px;
        padding: 0 1rem;
    }

    .sliding-panel.open {
        height: 100vh;
    }

    .sliding-panel {
        top: 0;
    }
}

