/* =======================
   COMMUN (desktop + mobile)
======================= */
body {
    margin: 0;
    font-family: sans-serif;
}
header {
    width: 100%;
    text-align: center;  /* centre tout le contenu du header */
    position: relative;  /* si tu veux positionner le menu ou autres éléments */
}

header h2 {
    margin: 0;
    font-weight: bold;
}


/* =======================
   DESKTOP : ACCORDÉON
======================= */
.works-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: stretch;
    align-items: stretch;
    width: 100%;
    overflow: hidden;
   height: calc(92vh - 60px); /* réduit pour laisser 60px en bas */
    position: relative;         /* nécessaire pour position absolute des flèches */
    transition: height 0.5s ease;
}

.work-item {
    flex: 1;
    height: 100%;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: flex 0.5s ease;
}

.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.work-caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    background-color: rgba(255,255,255,0.8);
    padding: 5px 0;
    font-size: 0.9em;
    color: #666;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-item:hover .work-caption {
    opacity: 1;
}
/* Flèches desktop ajustées */
.arrow {
    position: fixed;       /* toujours visible */
    bottom: 20px;          /* 30px du bas de l'écran */
    font-size: 1.2rem;     /* plus petites */
    cursor: pointer;
    z-index: 10;         /* au-dessus de tout */
    color: #888;           /* gris */
}

.arrow-left {
    left: 15px;            /* 30px depuis le bord gauche */
}

.arrow-right {
    right: 15px;           /* 30px depuis le bord droit */
}


/* =======================
   MOBILE : MOSAÏQUE DYNAMIQUE
======================= */
@media (max-width: 768px) {
    .works-grid {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        height: auto;
        margin: 0;
    }
    .work-item {
        flex: 0 0 auto;
        width: 100%; /* JS ajuste */
        height: auto; /* JS ajuste */
        margin: 0;
    }
    .work-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
	    .arrow {
        display: none !important;
    }
	  /* NE PAS masquer le burger */
    #menu-toggle,
    .menu-toggle {
        display: block !important;
        z-index: 99999;   /* pour être sûr qu’il soit au-dessus */
        position: relative; /* si besoin */
    }
}
