/* =========================
   BASE
========================= */

body {
    margin: 0;
    font-family: Georgia, serif;
    color: #eee;
    text-align: center;
    min-height: 100vh;
    position: relative;
    background: #0c1022; /* couleur de secours */
    overflow-x: hidden;
}

/* Image floutée en arrière-plan */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("images/fond.jpg") center center / cover no-repeat;
    filter: blur(5px);
    transform: scale(1.1);
    z-index: -2;
}

/* Voile sombre */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 35, 0.55);
    z-index: -1;
}


/* =========================
   HEADER
========================= */

header {
    padding: 40px 20px;
}

h1 {
    margin: 0;
    font-weight: normal;
    letter-spacing: 2px;
}


/* =========================
   GALERIE
========================= */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 20px;
}

.item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
}

.item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.4s ease;
}

.item:hover img {
    transform: scale(1.05);
}

/* Effet vitre légère */
.item img {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(3px);
    border: 1px solid rgba(255,255,255,0.08);
}


/* =========================
   CAPTION
========================= */

.caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    font-size: 16px;
    letter-spacing: 1px;
    text-align: left;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.item:hover .caption {
    opacity: 1;
}


/* =========================
   LIGHTBOX
========================= */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}
.lightbox-img {
    transition: transform 0.3s ease;
}
.lightbox-img:hover {
    transform: scale(1.05);
}
.close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}
.filters {
    margin: 20px 0;
}

.filters button {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 8px 18px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.3s;
}

.filters button:hover {
    background: rgba(255,255,255,0.2);
}

.filters button.active {
    background: rgba(255,255,255,0.3);
}
/* =========================
   CARTES (ratio libre)
========================= */

.item.carte img {
    height: auto;
    max-height: 500px;
    object-fit: contain;
}