/* ==========================================================================
   CONTENEUR PRINCIPAL
   ========================================================================== */
.real-main-container {
    max-width: 1100px;
    margin: 80px auto;
    padding: 2rem;
    color: white;
}

.categories-overview {
    text-align: center;
    margin-bottom: 4rem;
}

.categories-list {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.category-card {
    background-color: #1e1e1e;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 255, 170, 0.1);
    width: 280px;
    border: 1px solid #333;
}

.category-card h3 {
    color: #00ffaa;
    margin-bottom: 1rem;
}

.category-card p {
    font-size: 0.95rem;
    color: #ccc;
}

/* ==========================================================================
   SECTIONS DE PROJETS
   ========================================================================== */
.category-section {
    margin-bottom: 5rem;
}

.category-section h2 {
    color: #00ffaa;
    margin-bottom: 1rem;
}

.separator {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, #00ffaa, transparent);
    margin-bottom: 2rem;
}

.year-title {
    color: #eab2bb;
    text-align: center;
    margin-top: 3rem;
    margin-bottom: 2rem;
    font-size: 1.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.projects-list {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ==========================================================================
   CARTES PROJETS (SYSTÈME HOVER DESKTOP)
   ========================================================================== */
.project-card {
    position: relative;
    background-color: #1e1e1e;
    width: 320px;
    height: 220px; /* Hauteur fixe pour l'effet hover */
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 255, 170, 0.2);
    overflow: hidden; /* Coupe l'overlay qui dépasse */
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Overlay contenant description + bouton */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9); /* Fond sombre au survol */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    opacity: 0; /* Invisible par défaut */
    transition: opacity 0.4s ease;
    box-sizing: border-box;
}

/* Titre et texte dans l'overlay */
.project-overlay h4 {
    margin-bottom: 0.8rem;
    color: #00ffaa;
    font-size: 1.1rem;
}

.project-overlay p {
    font-size: 0.85rem;
    color: #ddd;
    margin-bottom: 1.2rem;
    line-height: 1.4;
}

/* Bouton à l'intérieur de la carte */
.btn-download {
    display: inline-block;
    padding: 8px 18px;
    background-color: #00ffaa;
    color: #000;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-download:hover {
    background-color: #ffffff;
    box-shadow: 0 0 15px #00ffaa;
}

/* --- EFFETS HOVER (Uniquement sur PC) --- */
@media (min-width: 769px) {
    .project-card:hover .project-overlay {
        opacity: 1;
    }

    .project-card:hover img {
        transform: scale(1.1);
        filter: blur(2px);
    }
}

/* ==========================================================================
   RESPONSIVE MOBILE
   ========================================================================== */
@media (max-width: 768px) {
    /* Réduction des marges sur les côtés */
    .real-main-container {
        padding: 1rem 0.8rem;
        margin-top: 40px;
    }

    .projects-list {
        gap: 1.5rem;
    }

    .project-card {
        width: 100%; /* Prend toute la largeur moins les marges */
        height: auto; /* Hauteur libre sur mobile */
        display: flex;
        flex-direction: column;
    }

    .project-card img {
        height: 200px; /* Hauteur fixe de l'image sur mobile */
        border-radius: 12px 12px 0 0;
    }

    /* L'overlay redeviens un bloc classique sous l'image */
    .project-overlay {
        position: static;
        opacity: 1;
        background: #1e1e1e;
        padding: 1.2rem;
        border-radius: 0 0 12px 12px;
    }

    .project-overlay p {
        font-size: 0.9rem;
    }

    .category-card {
        width: 100%;
    }

    .year-title {
        font-size: 1.3rem;
        margin-top: 2rem;
    }
}