/* ===== Styles Globaux & Reset ===== */
:root {
    --primary-color: #3498db; /* Bleu sympa */
    --secondary-color: #2ecc71; /* Vert pour accents */
    --dark-color: #2c3e50;    /* Texte principal */
    --light-color: #ecf0f1;   /* Fond clair */
    --white-color: #ffffff;
    --grey-color: #bdc3c7;
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Défilement doux lors du clic sur les liens internes */
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--white-color);
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; text-align: center; margin-bottom: 2.5rem; color: var(--primary-color); }
h3 { font-size: 1.5rem; color: var(--dark-color); }

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9; /* Bleu un peu plus foncé au survol */
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

section {
    padding: 80px 0;
}

.light-bg {
    background-color: var(--light-color);
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2rem auto;
    color: #555;
}

/* ===== Barre de Navigation ===== */
header {
    background-color: var(--white-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    color: var(--dark-color);
    font-weight: 600;
    padding-bottom: 5px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after { /* Style pour lien actif (à gérer avec JS si besoin) */
    width: 100%;
}

.burger { /* Cache le burger sur desktop */
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}


/* ===== Section Accueil (Hero) ===== */
.hero {
    background-color: var(--primary-color); /* Ou une image de fond */
    /* background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('[chemin/vers/image_fond.jpg]') no-repeat center center/cover; */
    color: var(--white-color);
    min-height: 70vh;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero h1 {
    color: var(--white-color);
    margin-bottom: 0.5rem;
}

.hero .subtitle {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero p {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    color: rgba(255, 255, 255, 0.8);
}

.cta-buttons .btn {
    margin: 0 10px;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white-color);
}

.btn-primary:hover {
    background-color: #27ae60; /* Vert plus foncé */
    color: var(--white-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white-color);
    border: 2px solid var(--white-color);
}

.btn-secondary:hover {
    background-color: var(--white-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.download-cv { /* Style spécifique pour le bouton CV */
    background-color: var(--primary-color);
    color: var(--white-color);
    margin-top: 1rem;
    display: inline-block; /* Nécessaire pour margin-top */
}

.download-cv:hover {
    background-color: #2980b9;
    color: var(--white-color);
}

.download-cv i {
    margin-right: 8px;
}


/* ===== Section À Propos ===== */
#a-propos .about-content {
    display: flex;
    gap: 30px;
    align-items: center;
}

#a-propos .about-text {
    flex: 2; /* Prend plus de place */
}

#a-propos .about-image {
    flex: 1;
    max-width: 300px; /* Ajuste la taille max de l'image */
    border-radius: 10px;
}


/* ===== Section CV & Compétences ===== */
#cv-competences .cv-section {
    text-align: center;
    margin-bottom: 3rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.skill-category {
    background-color: var(--white-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: center;
}

.skill-category h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.skill-category h4 i { /* Style pour les icônes */
    margin-right: 8px;
    color: var(--secondary-color);
}

.skill-category p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: #555;
}

/* ===== Section Portfolio ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--white-color);
    border-radius: 8px;
    overflow: hidden; /* Pour que l'image respecte le border-radius */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.project-card img {
    width: 100%;
    height: 200px; /* Hauteur fixe pour les images */
    object-fit: cover; /* Assure que l'image couvre bien sans se déformer */
}

.img-placeholder { /* Style pour le placeholder si pas d'image */
    width: 100%;
    height: 200px;
    background-color: var(--grey-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    font-weight: bold;
}


.project-info {
    padding: 20px;
    flex-grow: 1; /* Permet au contenu de pousser les liens vers le bas */
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    margin-bottom: 10px;
}

.project-info .technologies {
    font-size: 0.9rem;
    color: #777;
    margin-top: auto; /* Pousse les technos et liens vers le bas */
    margin-bottom: 15px;
}
.project-info .technologies strong{
    color: var(--dark-color);
}

.project-links {
    margin-top: 10px; /* Espace avant les liens */
    display: flex;
    gap: 15px;
}

.project-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}
.project-link i {
    margin-right: 5px;
}
.project-link:hover {
    text-decoration: underline;
}
.project-link.disabled {
    color: var(--grey-color);
    pointer-events: none; /* Non cliquable */
}


/* ===== Section Veille Informatique ===== */
.veille-list {
    max-width: 800px;
    margin: auto;
}

.veille-item {
    background-color: var(--white-color);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 5px solid var(--secondary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.veille-item h3 {
    margin-bottom: 5px;
}

.veille-item .date {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 10px;
}


/* ===== Section Contact ===== */
.contact-content {
    display: flex;
    flex-wrap: wrap; /* Pour passer en colonne sur mobile */
    gap: 40px;
    margin-top: 2rem;
}

.contact-form {
    flex: 2; /* Prend plus de place */
    min-width: 300px; /* Empêche d'être trop écrasé */
}

.contact-info {
    flex: 1;
    min-width: 250px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--grey-color);
    border-radius: 5px;
    font-family: inherit; /* Utilise la police du body */
}

.form-group textarea {
    resize: vertical; /* Permet le redimensionnement vertical */
}

.contact-form .btn {
    width: 100%;
    background-color: var(--primary-color);
}
.contact-form .btn:hover {
    background-color: #2980b9;
}

.form-notice {
    font-size: 0.8rem;
    color: #777;
    margin-top: 10px;
    text-align: center;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.contact-info i {
    margin-right: 10px;
    color: var(--primary-color);
    width: 20px; /* Pour aligner le texte */
    text-align: center;
}

.social-links a {
    font-size: 1.8rem;
    margin-right: 15px;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}


/* ===== Pied de Page ===== */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 30px 0;
    margin-top: 40px; /* Espace avant le footer */
}

footer p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

footer .footer-social-links a {
    color: var(--light-color);
    margin: 0 10px;
    font-size: 1.2rem;
}

footer .footer-social-links a:hover {
    color: var(--primary-color);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }

    /* Menu Mobile */
    .nav-links {
        display: none; /* Caché par défaut */
        flex-direction: column;
        position: absolute;
        top: 70px; /* Hauteur du header */
        left: 0;
        width: 100%;
        background-color: var(--white-color);
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        padding: 1rem 0;
        text-align: center;
    }

    .nav-links.active { /* Classe à ajouter avec JS */
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .burger {
        display: block; /* Afficher le burger sur mobile */
    }

    /* Sections */
    section { padding: 60px 0; }

     #accueil .hero-content {
        padding-top: 20px;
        padding-bottom: 20px;
    }
    .hero { min-height: auto; } /* Hauteur auto sur mobile */

    #a-propos .about-content {
        flex-direction: column; /* Texte au-dessus de l'image */
    }
     #a-propos .about-image {
        max-width: 80%; /* Un peu plus large sur mobile */
        margin-top: 20px;
    }

    .projects-grid {
        grid-template-columns: 1fr; /* Une colonne sur mobile */
    }

    .contact-content {
        flex-direction: column;
        gap: 30px;
    }

    .contact-form, .contact-info {
        flex: none; /* Reset flex */
        width: 100%;
    }
}