@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

:root {
    --primary-bg: #0d1117;
    --card-bg: #161b22;
    --text-color-project: #ffffff;
    --text-muted: #cbd5e1;
    --border-radius: 16px;
    --shadow-light: 0px 6px 18px rgba(255, 255, 255, 0.1);
    --shadow-hover: 0px 10px 30px rgba(255, 255, 255, 0.3);
    --transition: all 0.4s ease-in-out;
    --highlight: #3b82f6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

.pro-container{
    background: var(--primary-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 80vh;
    padding: 40px 20px;
}
/* 🌟 Titre principal */
.section-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-color-project);
    margin-top: 50px;
    margin-bottom: 5px;
    text-align: center;
    width: 90%;
    max-width: 1100px;
}

/* 🌟 Conteneur des projets */
.projects-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 cartes par ligne sur grand écran */
    gap: 20px;
    /* Espacement entre les cartes */
    justify-content: center;
    max-width: 1100px;
    width: 90%;
}

/* 🌟 Carte de projet */
.project-card {
    position: relative;
    min-width: 350px;
    /* Taille minimale */
    flex: 1;
    /* Répartition équitable */
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* 🌟 Lien cliquable */
.project-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    width: 100%;
}

/* 🌟 Effet au survol */
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* 🌟 Image de fond */
.project-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover img {
    opacity: 0.9;
    transform: scale(1.03);
}

/* 🌟 Contenu */
.project-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-content h3 {
    font-size: 20px;
    color: var(--text-color-project);
    font-weight: 600;
    margin-bottom: 10px;
}

/* 🌟 Texte ajusté sur tablettes & mobiles */
.project-content p {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

/* 🌟 Tags */
.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    font-size: 13px;
    background: rgba(255, 255, 255, 0.15);
    padding: 5px 12px;
    border-radius: 6px;
    color: var(--text-muted);
}

/* 🌟 Bouton de navigation */
.project-button {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: var(--highlight);
    color: white;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 16px;
}

.project-card:hover .project-button {
    background: #2563eb;
}

.project-button i {
    transition: var(--transition);
}

.project-card:hover .project-button i {
    transform: rotate(45deg);
}

/* 🌟 Sous-titre */
.section-description {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 800px;
    margin-bottom: 30px;
    text-align: center;
}


/* 🌟 📱 Responsive Design */

/* 📲 Tablettes et Mobiles : 2 cartes en haut, 2 en bas */
@media (max-width: 1024px) {
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
        /* 2 cartes par ligne */
    }

    .project-card {
        min-width: 260px;
        /* Taille réduite */
    }

    .project-content h3 {
        font-size: 18px;
        /* Texte plus petit */
    }

    .project-content p {
        font-size: 14px;
    }
}

/* 📱 Petits mobiles (max 768px) : Toujours 2 cartes en haut, 2 en bas */
@media (max-width: 768px) {
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .project-card {
        min-width: 220px;
    }

    .project-content h3 {
        font-size: 17px;
    }

    .project-content p {
        font-size: 13px;
    }

    .tag {
        font-size: 11px;
    }
}

/* 📱 Très petits écrans (max 480px) : 1 carte par ligne */
@media (max-width: 480px) {
    .projects-container {
        grid-template-columns: 1fr;
    }

    .project-card {
        width: 100%;
    }

    .project-content h3 {
        font-size: 16px;
    }

    .project-content p {
        font-size: 12px;
    }

    .tag {
        font-size: 10px;
    }
}