/* === Reset général === */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* empêche le scroll horizontal */
}

body {
    margin: 0px;
    font-family: Arial, sans-serif;
    background-color: #13526f;
    color: white;
    width: 100%;
}

/* === Header === */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: black;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2vw;
    z-index: 100;
}

header h1 {
    margin: 0;
    font-size: clamp(1.2rem, 4vw, 2rem);
}

/* === Navigation === */
nav {
    padding-right: 5vw;
}

nav a {
    color: white;
    margin: 0.6vw;
    text-decoration: none;
    font-weight: bold;
    font-size: clamp(1rem, 3vw, 1.8rem);
    padding: 0.3rem 0.8rem;
    font-family: "Arial Rounded MT Bold", Arial, sans-serif;
    transition: all 0.4s ease;
}

nav a:hover,
nav a.active {
    color: #111111;
    background-color: #13526f;
    font-weight: bolder;
    border-radius: 20px;
}

/* === Décalage du contenu sous le header === */
main {
    padding-top: 2vw;
    padding-bottom: 0px; /* éviter que le footer cache */
}

/* === Sections === */
.section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Backgrounds */
.broderie .main-image,
.impr3d .main-image {
    height: 100%;
    width: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.broderie .main-image {
    background-image: url("Images/BG broderie.jpg");
}

.impr3d .main-image {
    background-image: url("Images/BG impr3d.jpg");
}

/* === Grille d'images === */
.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 4 images par ligne */
    gap: 1rem;
    width: 90%;
    margin: 0 auto;
    justify-items: center;
    align-items: center;
    padding-bottom: 10vw;
    padding-top: 10vw;
}

.image-grid img {
    width: 80%;
    border-radius: 15px;
    transition: transform 0.4s ease, border-radius 0.4s ease;
    cursor: pointer;
}

.image-grid img:hover {
    transform: scale(1.05);
    border-radius: 25px;
}

/* === Responsive Grille === */
@media (max-width: 1024px) {
    .image-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 colonnes */
    }
}

@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes */
    }
}

@media (max-width: 480px) {
    .image-grid {
        grid-template-columns: 1fr; /* 1 colonne */
    }
}

/* === Footer === */
footer {
    position: fixed;
    bottom: 0;
    text-align: center;
    width: 100%;
    padding: 15px;
    font-size: 0.9rem;
    background-color: black;
    z-index: 3;
}

/* === Overlay sur images === */
/* Conteneur */
.image-container {
    position: relative;
    width: 80%;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Image */
.image-container img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    transition: transform 0.4s ease, border-radius 0.4s ease;
    cursor: pointer;
}

/* Overlay noir invisible au départ */
.image-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0); /* transparent */
    transition: background 0.4s ease;
    border-radius: inherit;
    z-index: 1;
}

/* Texte "Visuel" */
.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #e8e8e8;
    font-size: 1.8rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

/* Effet hover */
.image-container:hover img {
    transform: scale(1.05);
    border-radius: 25px;
}

.image-container:hover::after {
    background: #13526f;
    opacity: 0.5; /* fondu vers noir */
}

.image-container:hover .overlay-text {
    opacity: 1;
}

