/* =========================================
   1. VARIABLES & RESET (La base)
   ========================================= */
:root {
    /* Palette de couleurs harmonisée */
    --primary-dark: #1e2a3a;    /* Le Bleu Nuit profond (fond sombre) */
    --primary-light: #2c3e50;   /* Bleu un peu plus clair (nav, footer) */
    --accent: #3498db;          /* Le Bleu Cyan qui pète (boutons, titres) */
    --card-dark: #24344d;       /* Fond des cartes en mode sombre */
    --text-light: #ecf0f1;      /* Texte sur fond sombre */
    --text-dark: #333333;       /* Texte sur fond clair */
    --bg-light: #f4f4f9;        /* Fond général clair */
}

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

html {
    scroll-behavior: smooth; /* Le défilement doux indispensable */
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* =========================================
   2. NAVIGATION & HEADER
   ========================================= */
nav {
    background: var(--primary-dark);
    color: var(--text-light);
    display: flex;
    justify-content: space-between;
    padding: 1rem 2rem;
    position: sticky; /* Reste collé en haut */
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border-bottom: 2px solid var(--accent);
}

nav ul { display: flex; gap: 20px; }
nav a:hover { color: var(--accent); }

header {
    /* Dégradé qui rejoint la couleur de la section suivante */
    background: linear-gradient(135deg, #1e2a3a 0%, #2980b9 100%);
    color: white;
    padding: 6rem 2rem;
    text-align: center;
}

header h1 { font-size: 3rem; margin-bottom: 0.5rem; font-weight: 600; }
header h2 { font-weight: 300; margin-bottom: 2rem; opacity: 0.9; font-size: 1.5rem; }
.intro-text { max-width: 700px; margin: 0 auto 2.5rem auto; font-size: 1.1rem; opacity: 0.9; }

/* Les Boutons Principaux */
.btn {
    background: var(--accent);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}
.btn:hover { background: #2980b9; transform: translateY(-2px); }

/* Zone téléchargement CV header */
.download-area {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
}
.btn-outline:hover {
    border-color: white;
    background: rgba(255,255,255,0.1);
}

/* =========================================
   3. SECTIONS GÉNÉRALES
   ========================================= */
.section { padding: 5rem 2rem; }
.container { max-width: 1100px; margin: 0 auto; }

/* Titres standard (sur fond clair) */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.2rem;
    color: var(--primary-dark);
    position: relative;
    font-weight: 600;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* =========================================
   4. SECTION À PROPOS & VEILLE (Mode Dark)
   ========================================= */
/* On utilise la même classe pour toutes les sections sombres pour l'uniformité */
.section-dark, .section-about-dark {
    background-color: var(--primary-dark);
    color: var(--text-light);
}

/* Titres spécifiques au mode sombre avec le style // */
.section-dark .section-title, 
.section-about-dark .section-title {
    color: white;
}
.section-dark .section-title::before,
.section-about-dark .section-title::before {
    content: '// ';
    color: var(--accent);
    font-weight: 600;
}
.section-dark .section-title::after,
.section-about-dark .section-title::after {
    display: none; /* On enlève le soulignement sur le fond sombre */
}

/* Grille "À propos" */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}
.about-card {
    background-color: var(--card-dark);
    padding: 3rem 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}
.about-card:hover { transform: translateY(-10px); }

.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px; height: 80px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    margin-bottom: 1.5rem;
}
.icon-wrapper i { font-size: 2rem; color: var(--accent); }
.about-card h3 { font-size: 1.4rem; margin-bottom: 1rem; color: white; }
.about-card p { color: #bdc3c7; font-size: 0.95rem; }

/* Grille "Veille" (Style similaire aux cartes About) */
.veille-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.veille-card {
    background: var(--card-dark); /* Même fond que About */
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}
.veille-card h3 { color: var(--accent); margin-bottom: 1rem; font-size: 1.3rem; }
.veille-list li { margin-bottom: 12px; list-style: none; position: relative; padding-left: 20px; color: #bdc3c7;}
.veille-list li::before {
    content: '›';
    color: var(--accent);
    position: absolute; left: 0; font-weight: bold; font-size: 1.2rem; line-height: 1rem;
}

/* =========================================
   5. SECTION PROJETS (Sur fond clair)
   ========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}
.card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    border-top: 5px solid var(--accent);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.1); }
.card h3 { margin: 1rem 0; color: var(--primary-dark); font-size: 1.4rem;}
.card-header {
    display: inline-block; padding: 4px 12px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; margin-bottom: 10px;
}
.tag-stage { background: #fff3cd; color: #e67e22; }
.tag-ecole { background: #f3e5f5; color: #9b59b6; }
.tag-stage2 { background: #e8f5e9; color: #2e7d32; }

.card ul li { margin-bottom: 8px; position: relative; padding-left: 25px; color: #555; }
.card ul li::before {
    content: '🔹';
    position: absolute; left: 0; font-size: 0.8rem; top: 3px;
}

/* --- MODIFICATION ICI : Bouton projets dans les cartes --- */
.card-actions { margin-top: 2rem; text-align: right; }
.btn-projet {
    display: inline-flex; align-items: center; gap: 8px;
    background-color: transparent; /* Fond transparent pour plus de clarté */
    color: var(--accent); /* Texte bleu */
    border: 2px solid var(--accent); /* Bordure bleue */
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.3s;
}
.btn-projet:hover { 
    background-color: var(--accent); /* Devient bleu plein au survol */
    color: white; 
    transform: translateY(-2px); 
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

/* =========================================
   6. SECTION DOCUMENTS (PDFs)
   ========================================= */
.docs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}
.doc-wrapper {
    flex: 1 1 450px;
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    text-align: center;
}
.doc-wrapper h3 { margin-bottom: 1rem; color: var(--primary-dark); }
.pdf-viewer {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 8px;
    background: #eee;
    margin-bottom: 1rem;
}

/* =========================================
   7. FOOTER & CONTACT 
   ========================================= */
footer {
    background: #111; /* Fond presque noir */
    color: #bdc3c7;   /* Gris clair pour le texte */
    padding: 4rem 2rem 2rem 2rem; /* Espace en haut et en bas */
    text-align: center;
    border-top: 1px solid #222;
}

.footer-title {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.footer-text {
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
    font-size: 1rem;
    line-height: 1.6;
}

/* Conteneur des boutons */
.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 3rem;
    flex-wrap: wrap; /* Pour que ça passe sur mobile */
}

/* Style des boutons de contact */
.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

/* Bouton Email */
.contact-btn.email {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.contact-btn.email:hover {
    background: white;
    color: #111;
    transform: translateY(-3px);
}

/* Bouton LinkedIn */
.contact-btn.linkedin {
    background: #0077b5; /* Bleu LinkedIn officiel */
    color: white;
    border: 1px solid #0077b5;
}
.contact-btn.linkedin:hover {
    background: #005582;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 119, 181, 0.4);
}

/* Copyright tout en bas */
.copyright {
    border-top: 1px solid #222;
    padding-top: 2rem;
    font-size: 0.8rem;
    opacity: 0.6;
}


/* =========================================
   8. PAGES DE DÉTAILS DES PROJETS (NOUVEAU)
   ========================================= */

/* Conteneur principal blanc pour lire le détail du projet */
.project-details {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-top: 2rem;
}

/* Sous-titres des sections du projet */
.project-details h3 {
    color: var(--primary-dark);
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg-light); /* Ligne de séparation très légère */
}

/* On évite que le tout premier titre soit trop espacé du haut de la carte */
.project-details h3:first-child {
    margin-top: 0;
}

/* Textes de la page projet */
.project-details p, .project-details ul {
    margin-bottom: 1.5rem;
    color: #555;
    font-size: 1.05rem;
}

/* Puces personnalisées pour les listes (ex: missions réalisées) */
.project-details ul li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.project-details ul li::before {
    content: '✓'; /* Coche bleue stylée au lieu du point classique */
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Grille pour afficher tes captures d'écran proprement */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* S'adapte tout seul sur mobile */
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Style des images dans la galerie */
.screenshot-gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.screenshot-gallery img:hover {
    transform: scale(1.03); /* Petit effet zoom sympa au survol */
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}