/* ====================================
   RESET & BASE STYLES
   ==================================== */

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

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #000;
    background-color: #fff;
    font-weight: 400;
    display: flex;
    min-height: 100vh;
}

a {
    color: #000;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Image Placeholders (rectangles noirs) */
.image-placeholder {
    position: relative;
    width: 100%;
    background-color: #000;
    overflow: hidden;
    padding-bottom: 56.25%; /* Ratio 16:9 paysage large */
}

.image-placeholder::before {
    content: '';
    display: block;
}

/* Video Container (Vimeo/YouTube) */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 133%; /* Portrait 3:4 par défaut */
    height: 0;
    overflow: hidden;
    background-color: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Video Container 16:9 (optionnel) */
.video-container.aspect-16-9 {
    padding-bottom: 56.25%;
}

/* Video Container carré (optionnel) */
.video-container.aspect-square {
    padding-bottom: 100%;
}

/* Video Container cinémascope 2.35:1 */
.video-container.video-wide {
    padding-bottom: 42.5%;
}

/* ====================================
   LEFT MENU (SIDEBAR)
   ==================================== */

.left-menu {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: #fff;
    padding: 60px 0 60px 60px;
    overflow-y: auto;
}

.site-title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 50px;
    line-height: 1.4;
    text-transform: uppercase;
}

.site-title a {
    color: #000;
}

/* ====================================
   MENU NAVIGATION
   ==================================== */

.menu-nav ul {
    list-style: none;
}

.menu-nav li {
    margin-bottom: 18px;
}

.menu-nav a {
    font-size: 0.8125rem;
    font-weight: 400;
    color: #666;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    display: block;
    transition: color 0.2s ease;
}

.menu-nav a:hover,
.menu-nav a.active {
    color: #000;
}

/* ====================================
   MAIN CONTENT AREA
   ==================================== */

.main-area {
    margin-left: 280px;
    flex: 1;
    padding: 60px 80px 80px 60px;
}

/* ====================================
   MOSAIC GRID (HOMEPAGE)
   ==================================== */

.mosaic-grid {
    display: block !important;
    columns: 5 !important;
    column-gap: 20px !important;
    width: 100%;
}

.mosaic-grid .mosaic-item {
    display: block;
    margin-bottom: 20px;
    break-inside: avoid-column;
    -webkit-column-break-inside: avoid;
}

.mosaic-item {
    position: relative;
    display: block;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-decoration: none;
}

.mosaic-item:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.mosaic-placeholder {
    width: 100%;
    position: relative;
}

.mosaic-placeholder img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Formes variées pour la mosaïque */
.mosaic-placeholder.square {
    padding-bottom: 100%; /* Carré 1:1 */
}

.mosaic-placeholder.portrait {
    padding-bottom: 150%; /* Portrait 2:3 */
}

.mosaic-placeholder.landscape {
    padding-bottom: 66.67%; /* Paysage 3:2 */
}

.mosaic-placeholder.tall-portrait {
    padding-bottom: 133%; /* Portrait haut 3:4 */
}

.mosaic-placeholder.wide-landscape {
    padding-bottom: 56.25%; /* Paysage large 16:9 */
}

/* ====================================
   HERO IMAGE (HOMEPAGE - LEGACY)
   ==================================== */

.hero-image {
    width: 100%;
}

.hero-image img {
    width: 100%;
    height: auto;
}

/* ====================================
   CONTENT SECTIONS
   ==================================== */

.content-section {
    max-width: 900px;
}

.page-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

.content-text {
    margin-bottom: 60px;
}

.content-text p {
    margin-bottom: 20px;
    line-height: 1.75;
    font-size: 0.9375rem;
}

/* ====================================
   WORKS GRID
   ==================================== */

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 50px 40px;
    margin-bottom: 80px;
}

.work-item {
    transition: opacity 0.2s ease;
}

.work-item:hover {
    opacity: 0.7;
}

.work-item a {
    display: block;
}

.work-item img {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
}

.work-info h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 5px;
    line-height: 1.4;
}

.work-info p {
    font-size: 0.875rem;
    color: #666;
    font-weight: 300;
}

/* ====================================
   BIOGRAPHY PAGE
   ==================================== */

.biography-content {
    max-width: 900px;
}

.biography-content h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 25px;
    margin-top: 50px;
    line-height: 1.3;
}

.biography-content h2:first-child {
    margin-top: 0;
}

.biography-content p {
    margin-bottom: 20px;
    line-height: 1.75;
}

.biography-content ul {
    list-style: none;
    margin-bottom: 30px;
}

.biography-content li {
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.biography-content li strong {
    font-weight: 500;
}

.biography-content h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 30px;
    margin-bottom: 10px;
}

.biography-content .year {
    display: inline-block;
    min-width: 120px;
    color: #666;
    font-size: 0.875rem;
}

.biography-content .bio-list {
    padding-left: 0;
}

.biography-content .bio-list li {
    margin-bottom: 20px;
    padding-left: 130px;
    position: relative;
}

.biography-content .bio-list li .year {
    position: absolute;
    left: 0;
    top: 0;
}

/* ====================================
   EXHIBITIONS LIST
   ==================================== */

.exhibitions-list,
.news-list {
    max-width: 900px;
}

.exhibition-item,
.news-item {
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e5e5;
}

.exhibition-item:last-child,
.news-item:last-child {
    border-bottom: none;
}

.exhibition-item h3,
.news-item h3 {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 10px;
    line-height: 1.4;
}

.exhibition-date,
.news-date {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 15px;
    font-weight: 300;
}

.exhibition-item p,
.news-item p {
    line-height: 1.75;
    font-size: 0.9375rem;
}

/* ====================================
   WORK DETAIL PAGE
   ==================================== */

.work-detail-hero {
    margin-bottom: 3rem;
}

.work-detail-hero img,
.work-detail-hero .image-placeholder {
    width: 100%;
    height: auto;
}

.work-detail-info {
    max-width: 900px;
    margin-bottom: 2rem;
}

.work-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 10px;
    line-height: 1.3;
}

.work-meta {
    font-size: 0.9375rem;
    color: #666;
    margin-bottom: 0;
    font-weight: 300;
}

.work-description {
    max-width: 900px;
    margin-bottom: 4rem;
}

.work-description p {
    margin-bottom: 1.5rem;
    line-height: 1.75;
    font-size: 1rem;
    color: #333;
}

.work-description p:last-child {
    margin-bottom: 0;
}

.work-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 80px;
}

.work-gallery img {
    width: 100%;
    height: auto;
}

/* Galerie en quinconce (masonry) */
.work-gallery.masonry {
    display: block !important;
    columns: 2 !important;
    column-gap: 40px !important;
}

.work-gallery.masonry img {
    width: 100% !important;
    height: auto !important;
    margin: 0 0 40px 0 !important;
    display: block !important;
    break-inside: avoid-column;
    -webkit-column-break-inside: avoid;
}

@media (max-width: 768px) {
    .work-gallery.masonry {
        columns: 1 !important;
    }
    
    .work-gallery.masonry img {
        margin: 0 0 30px 0 !important;
    }
}

/* ====================================
   FOOTER
   ==================================== */

.site-footer {
    margin-top: 100px;
    padding-top: 40px;
    border-top: 1px solid #e5e5e5;
    font-size: 0.8125rem;
    color: #666;
    line-height: 1.6;
}

.site-footer a {
    color: #666;
}

/* ====================================
   MOBILE MENU TOGGLE
   ==================================== */

.menu-toggle {
    display: none;
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 1000;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: #000;
    transition: all 0.3s ease;
}

/* ====================================
   RESPONSIVE - TABLET
   ==================================== */

@media (max-width: 1024px) {
    .left-menu {
        width: 240px;
        padding: 50px 0 50px 50px;
    }

    .main-area {
        margin-left: 240px;
        padding: 50px 60px 60px 50px;
    }

    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 40px 30px;
    }

    .mosaic-grid {
        columns: 4 !important;
        column-gap: 15px !important;
    }
    
    .mosaic-grid .mosaic-item {
        margin-bottom: 15px;
    }
    
    /* Ajuster les formes pour tablette */
    .mosaic-placeholder.portrait {
        padding-bottom: 133%;
    }
    
    .mosaic-placeholder.tall-portrait {
        padding-bottom: 120%;
    }
}

/* ====================================
   RESPONSIVE - MOBILE
   ==================================== */

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .menu-toggle {
        display: flex;
    }

    .left-menu {
        position: fixed;
        left: -100%;
        width: 70%;
        transition: left 0.3s ease;
        z-index: 999;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .left-menu.active {
        left: 0;
    }

    .main-area {
        margin-left: 0;
        padding: 100px 30px 50px 30px;
    }

    .works-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .work-gallery {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .mosaic-grid {
        columns: 3 !important;
        column-gap: 10px !important;
    }
    
    .mosaic-grid .mosaic-item {
        margin-bottom: 10px;
    }
    
    /* Simplifier les formes sur mobile */
    .mosaic-placeholder.portrait {
        padding-bottom: 120%;
    }
    
    .mosaic-placeholder.tall-portrait {
        padding-bottom: 110%;
    }
    
    .mosaic-placeholder.landscape,
    .mosaic-placeholder.wide-landscape {
        padding-bottom: 75%;
    }

    /* Pages projets - Mobile */
    .work-detail-hero {
        margin-bottom: 2rem;
    }

    .work-detail-info {
        margin-bottom: 1.5rem;
    }

    .work-title {
        font-size: 1.75rem;
    }

    .work-description {
        margin-bottom: 3rem;
    }

    .work-description p {
        font-size: 0.9375rem;
        line-height: 1.65;
        margin-bottom: 1.25rem;
    }

    .work-gallery {
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .main-area {
        padding: 90px 20px 40px 20px;
    }

    .site-title {
        font-size: 1rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .mosaic-grid {
        columns: 2 !important;
        column-gap: 8px !important;
    }
    
    .mosaic-grid .mosaic-item {
        margin-bottom: 8px;
    }

    /* Pages projets - Petit mobile */
    .work-detail-hero {
        margin-bottom: 1.5rem;
    }

    .work-title {
        font-size: 1.5rem;
    }

    .work-meta {
        font-size: 0.875rem;
    }

    .work-description {
        margin-bottom: 2.5rem;
    }

    .work-description p {
        font-size: 0.875rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }

    .work-gallery {
        gap: 1.5rem;
    }
}
