/*===========================================================
 style.css
 Galerie Photos Responsive - Fond noir

===========================================================*/


/*===========================================================
 RESET SIMPLE
===========================================================*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}


/*===========================================================
 LIENS
===========================================================*/

a {
    color: #fff;
    text-decoration: none;
}

a:hover {
    opacity: 0.8;
    font-size: 10px;
}


/*===========================================================
 HEADER / MENU STICKY
===========================================================*/

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #000;
    border-bottom: 1px solid #222;
    transition: all 0.3s ease;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Réduction du menu au scroll */
header.shrink {
    padding: 10px 20px;
}

/* header h1 avait une valeur initiale 22px */
header h1 {
    font-size: 14px;
}


/*===========================================================
 MENU
===========================================================*/

.menu {
    list-style: none;
    display: flex;
    gap: 20px;
}

.menu li {
    position: relative;
}

/* Dropdown */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #111;
    padding: 10px;
    list-style: none;
    min-width: 150px;
    border: 1px solid #333;
}

.menu li:hover .submenu {
    display: block;
}

.submenu li {
    padding: 5px 0;
}


/*===========================================================
 INTRO
===========================================================*/

.intro {
    padding: 40px 20px;
    text-align: center;
    max-width: 900px;
    margin: auto;
}

.intro h2 {
    margin-bottom: 10px;
}


/*===========================================================
 GALERIE
===========================================================*/

.gallery {
    display: grid;
    gap: 15px;
    padding: 20px;
}

/* Première ligne : 3 images */
.first-row {
    grid-template-columns: repeat(3, 1fr);
}

/* Autres lignes : 4 images */
.other-rows {
    grid-template-columns: repeat(4, 1fr);
}


/*===========================================================
 VIGNETTES
===========================================================*/

.gallery-item {
    background: #111;
    padding: 10px;
    border: 1px solid #222;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}


/* Texte sous image */
.thumb-title {
    margin-top: 8px;
    font-size: 14px;
    text-align: center;
    color: #ccc;
}


/*===========================================================
 LIGHTBOX
===========================================================*/

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

/* Activation */
.lightbox.active {
    display: flex;
}

/* Fond sombre */
.lightbox-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
}

/* Contenu */
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

/* Image principale */
.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 5px;
}


/* Légende sous l'image */
.caption {
    margin-top: 10px;
    color: #ddd;
    font-size: 14px;
}


/*===========================================================
 NAVIGATION LIGHTBOX
===========================================================*/

.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 30px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.nav:hover {
    background: rgba(255,255,255,0.2);
}

.prev {
    left: -60px;
}

.next {
    right: -60px;
}


/*===========================================================
 FOOTER
===========================================================*/

footer {
    text-align: center;
    padding: 30px 10px;
    border-top: 1px solid #222;
    margin-top: 40px;
    color: #777;
}


/*===========================================================
 RESPONSIVE
===========================================================*/

@media (max-width: 900px) {

    .other-rows {
        grid-template-columns: repeat(2, 1fr);
    }

    .first-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav {
        display: none;
    }
}

@media (max-width: 600px) {

    .other-rows,
    .first-row {
        grid-template-columns: 1fr;
    }

    header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}
