:root {
    --primary-color: #2c3e50; /* Bleu nuit */
    --secondary-color: #ffffff;
    --accent-color: #1abc9c; /* Turquoise */
    --text-color: #34495e; /* Gris bleu */
    --light-gray: #ecf0f1; /* Gris très clair */
    --heading-font: 'Roboto Slab', serif;
    --body-font: 'Poppins', sans-serif;
}

body {
    font-family: var(--body-font);
    margin: 0;
    padding: 0;
    /* background-color: var(--light-gray); */
    background: linear-gradient(to bottom, #f4f6f9, #e9edf1); /* Dégradé subtil */
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-weight: 300; /* Police Poppins plus légère */
}

h1, h2, h3 {
    font-family: var(--heading-font);
    color: var(--primary-color);
    font-weight: 700; /* Roboto Slab bold */
}

header {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 3rem 1rem 2.5rem; /* Ajustement padding */
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 3rem;
    color: var(--secondary-color);
    font-weight: 700;
}

header p {
    margin-top: 0.5rem;
    font-size: 1.2rem;
    color: var(--light-gray);
    font-weight: 300;
}

main {
    padding: 4rem 1rem; /* Augmentation padding */
    max-width: 1100px;
    margin: 0 auto;
    flex-grow: 1;
}

main h2 {
    text-align: center;
    margin-bottom: 3rem; /* plus d'espace */
    font-size: 2.5rem;
}

.project-grid {
    /* display: grid; */
    /* grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); */
    display: flex; /* Utiliser Flexbox */
    justify-content: center; /* Centrer les cartes horizontalement */
    flex-wrap: wrap; /* Permettre le retour à la ligne sur petits écrans */
    gap: 2rem; /* Espacement entre les cartes */
}

.project-card {
    background-color: var(--secondary-color);
    border: none;
    border-radius: 10px;
    /* padding: 2rem; */
    padding: 0; /* Padding géré par les éléments internes */
    box-shadow: 0 5px 20px rgba(0,0,0,0.07); /* Ombre légèrement plus présente */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Pour que l'image respecte le border-radius */
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0; /* Start hidden for animation */
    flex-basis: calc(50% - 1rem); /* Base de 50% moins la moitié du gap */
    max-width: 450px; /* Limite la largeur maximale de chaque carte */
}

/* Animation d'apparition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Appliquer l'animation avec un délai */
.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
/* Ajoutez d'autres délais si vous rajoutez des cartes */

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease, filter 0.35s ease; /* Ajout transition */
}

.project-card:hover .project-image {
    transform: scale(1.05); /* Léger zoom au survol */
    filter: brightness(1.02); /* Très léger éclaircissement */
}

.project-card-content {
    padding: 1.5rem 2rem 2rem; /* Padding pour le texte et bouton */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem; /* Réduit l'espace après h3 */
    font-size: 1.4rem; /* Taille légèrement ajustée */
}

.project-card p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-weight: 400;
    font-size: 0.95rem; /* Taille légèrement ajustée */
}

.project-card a {
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff;
    padding: 0.75rem 1.5rem; /* Bouton plus grand */
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    align-self: flex-start; /* Aligne le bouton à gauche */
    font-weight: 600;
}

.project-card a:hover {
    background-color: #16a085; /* Assombrir la couleur d'accentuation */
    transform: scale(1.03); /* Léger zoom au survol */
}

footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
    background-color: var(--primary-color);
    color: var(--light-gray);
    font-size: 0.9rem;
}

.footer-links {
    margin-top: 0.5rem;
}

.footer-links a {
    color: var(--accent-color);
    text-decoration: none;
    margin: 0 0.75rem;
    transition: color 0.3s ease, transform 0.2s ease; /* Ajout transition transform */
    font-size: 1.5rem; /* Augmenter taille icônes */
    display: inline-block; /* Pour appliquer transform */
}

.footer-links a:hover {
    color: var(--secondary-color);
    /* text-decoration: underline; */
    transform: scale(1.1); /* Effet de grossissement au survol */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }
    main h2 {
        font-size: 2.2rem;
    }
    /* Retrait de la règle pour project-grid */
}

@media (max-width: 480px) {
    header {
        padding: 2rem 1rem;
    }
    header h1 {
        font-size: 2rem;
    }
    header p {
        font-size: 1.1rem;
    }
    main {
        padding: 2rem 1rem;
    }
    .project-card {
        padding: 1.5rem;
    }
}

@media (max-width: 600px) { /* Point de rupture pour empiler */
    .project-card {
        flex-basis: 100%; /* Les cartes prennent toute la largeur */
        max-width: 450px; /* Garde la limite pour cohérence */
    }
} 