/* Variables de couleur et polices */
:root {
    --primary-color: #3498db;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --background-color: #ffffff;
    --font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* Réinitialisation et styles de base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--dark-color);
}

/* On transforme le body en conteneur flexbox */
body {
    display: flex;
    flex-direction: column; /* Les éléments s'empilent verticalement */
    min-height: 100vh;      /* Le body prend au minimum 100% de la hauteur de l'écran */
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: var(--background-color); /* Le fond blanc reste ici, c'est bien */
    color: var(--dark-color);
}

/* On dit à <main> de prendre toute la place disponible et on lui donne le fond */
main {
    flex-grow: 1; /* S'étire pour remplir l'espace vide */
    background-color: #f4f4f4; /* On met le fond gris ici ! */
}


/* Styles du header et de la navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--background-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    padding: 0 1rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.burger-menu {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* Styles du Hero (page d'accueil) */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90vh;
    text-align: center;
    /*background-color: #f4f4f4; Couleur de fond légère */
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #2980b9;
}

/* Conteneur principal pour les autres pages */
.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 2rem;
}

h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    color: var(--primary-color);
}

/* Grille pour les compétences et projets */
.skills-grid, .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.skill-card, .project-card {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.skill-card h3, .project-card h3 {
    margin-bottom: 1rem;
}

.skill-card ul {
    list-style: none;
}

/* Formulaire de contact */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.contact-form input, .contact-form textarea {
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--dark-color);
    color: var(--light-color);
    margin-top: 2rem;
}

/* --- Styles pour la page projets.html --- */
.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
    font-size: 1.1rem;
    color: #555;
}

.project-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden; /* Pour que l'image respecte les coins arrondis */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* Assure que l'image couvre la zone sans se déformer */
}

.project-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-card-content h3 {
    margin-bottom: 0.5rem;
}

.project-card-content p {
    flex-grow: 1; /* Pousse les tags et le bouton vers le bas */
    margin-bottom: 1rem;
}

.project-tags {
    margin-bottom: 1.5rem;
}

.project-tags span {
    display: inline-block;
    background-color: #eaf3fb; /* Couleur pastel associée au bleu primaire */
    color: var(--primary-color);
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-top: 0.5rem;
}

.cta-button-secondary {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cta-button-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
}


/* --- Styles pour la page de détail d'un projet --- */
.project-detail h1 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

.project-context {
    text-align: center;
    color: #666;
    margin-bottom: 2.5rem;
}

.project-main-image {
    width: 100%;
    margin-bottom: 3rem;
}

.project-main-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.project-section {
    margin-bottom: 3rem;
}

.project-section h2 {
    text-align: left;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

.project-tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.project-tech-grid h4 {
    margin-bottom: 0.8rem;
    color: var(--dark-color);
}

.project-tech-grid ul {
    list-style-type: none;
    padding-left: 0;
}

.project-tech-grid li {
    padding: 0.2rem 0;
}

.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.project-gallery-grid img {
    width: 100%;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.project-gallery-grid img:hover {
    transform: scale(1.03);
}

.project-links {
    text-align: center;
    margin-top: 2rem;
}

.project-links .cta-button, .project-links .cta-button-secondary {
    margin: 0.5rem;
}

/* Style pour le lien actif dans la navigation */
.nav-links a.active {
    color: var(--primary-color); /* Ou une autre couleur de votre choix */
    font-weight: bold;
    text-decoration: underline;
}

/* Responsive (pour les mobiles) */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px; /* Hauteur de la navbar */
        left: 0;
        background-color: #fff;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        padding: 1rem 0;
    }

    .burger-menu {
        display: block;
    }

    .hero-text h1 {
        font-size: 2rem;
    }
}
