@import url('https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Space Grotesk", serif;
}

body {
    background: #ebebeb;
    color: #333;
    line-height: 1.6;
}

#author {
    font-size: 1.1rem;
    color: #adadad;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: url('../main-bg.png') no-repeat center center/cover;
    background-position-y: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
}

.hero-content {
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.5rem;
}

/* Categories Section */
.categories {
    padding: 50px 20px;
    max-width: 95vw;
    margin: 0 auto;
}

.category-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.category {
    width: 100%;
    height: 80vh;
    background-size: cover;
    background-position: center;
    position: relative;
    text-decoration: none;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.category:hover {
    transform: scale(1.01);
    filter: brightness(1.15);
}

.category::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
}

.category span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 3rem;
    z-index: 1;
}

/* Subcategories Section */
.subcategories {
    padding: 50px 20px;
    max-width: 95vw;
    margin: 0 auto;
}

.subcategory-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.subcategory {
    width: 100%;
    height: 80vh;
    background-size: cover;
    background-position: center;
    position: relative;
    text-decoration: none;
    transition: transform 0.3s ease, filter 0.4s ease;
}

.subcategory:hover {
    transform: scale(1.02);
    filter: brightness(1.15);
}

.subcategory::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.subcategory span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 3rem;
    z-index: 1;
}

.back-link {
    position: relative;
    /*width: 47%;*/
    bottom: 20px;
    color: #333f33;
    text-decoration: none;
    font-size: 1.3rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* Gallery Section */
.gallery {
    display: none;
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.photo-item {
    aspect-ratio: 1;
    overflow: hidden; /* Pour éviter tout débordement */
    cursor: pointer;
    transition: transform 0.3s ease;
}

.photo-item img {
    filter: blur(0.6px);
    image-rendering: pixelated;    
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Simule background-size: cover */
}

.photo-item:hover {
    transform: scale(1.03);
}

/* Fullscreen View */
.fullscreen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.fullscreen img {
    max-width: 80%;
    max-height: 70%;
}

.fullscreen p {
    color: white;
    padding: 20px;
    max-width: 80%;
}

.close-btn {
    position: absolute;
    top: 0px;
    right: 0px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 10px 30px 30px 30px;
}

#back-compagnies {
    display: none;
}

footer {
    display: flex;
    justify-content: center;
    background-color: #cfcfcf;
    padding: 20px;
}

footer p {
    font-weight: 500;
    font-size: 17px;
    padding-left: 10px;
    padding-right: 10px;
}

@media (max-width: 500px) {
    .hero {
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
    }
    .hero h1 {
        font-size: 2rem;
    }

    footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .category {
        height: 330px !important;
    }

    .subcategory {
        height: 330px !important;
    }

    .photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    }

}
