/* ==========================================================================
   1. VARIABLES & RESET GLOBAL
   ========================================================================== */
:root {
    --bg-color: #0f172a;        /* Fond bleu nuit */
    --card-bg: #1e293b;         /* Fond des cartes */
    --text-color: #f1f5f9;      /* Blanc cassé */
    --text-muted: #94a3b8;      /* Gris pour les sous-titres */
    --accent: #38bdf8;          /* Bleu électrique */
    --font-main: 'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0; padding: 0;
    width: 100%;
    overflow-x: hidden;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
}

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

/* IMPORTANT : On annule le padding par défaut pour que les bannières collent en haut */
main { 
    padding-top: 0 !important; 
    margin-top: 0 !important; 
}


/* ==========================================================================
   2. NAVBAR (MENU) - Gestion Transparence / Solide
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: 80px;
    z-index: 1000;
    
    /* Transparent par défaut */
    background: transparent; 
    transition: all 0.4s ease;
    
    display: flex; align-items: center; padding: 0 2rem;
}

/* Classe ajoutée par JS quand on descend */
.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95); /* Bleu Nuit Opaque */
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.nav-content {
    width: 100%; max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
}

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

.nav-links { display: flex; gap: 2rem; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }


/* ==========================================================================
   3. PAGE ACCUEIL (HERO PARALLAXE & CONTENU)
   ========================================================================== */

/* --- HERO SECTION --- */
.parallax-hero {
    background-image: url('https://images.unsplash.com/photo-1555066931-4365d14bab8c?q=80&w=2070&auto=format&fit=crop');
    background-attachment: fixed; /* Effet Parallaxe */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex; justify-content: center; align-items: center;
}

.overlay {
    background: rgba(15, 23, 42, 0.7); 
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    text-align: center;
    padding: 20px;
    position: relative;
}

.hero-content h1 {
    font-size: 3.5rem; color: #f1f5f9; margin-bottom: 0.5rem;
    font-weight: 800; text-transform: uppercase; letter-spacing: 2px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

.text-gradient {
    background: -webkit-linear-gradient(45deg, #38bdf8, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content .subtitle {
    font-size: 1.4rem; color: #e2e8f0; margin-bottom: 2.5rem; font-weight: 500;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.hero-btns { display: flex; gap: 1.5rem; justify-content: center; }

.btn {
    padding: 0.8rem 1.8rem; border-radius: 50px; font-weight: 600; font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s; text-decoration: none;
}
.btn.primary { background: var(--accent); color: var(--bg-color); border: 2px solid var(--accent); }
.btn.secondary { background: transparent; color: white; border: 2px solid white; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.btn.secondary:hover { background: white; color: var(--bg-color); }

/* Flèche Scroll */
.scroll-down {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    color: white; font-size: 1rem; text-decoration: none; 
    display: flex; flex-direction: column; align-items: center;
    opacity: 0.8; transition: 0.3s; cursor: pointer; z-index: 10;
}
.scroll-down:hover { opacity: 1; color: var(--accent); }
.scroll-down span { font-size: 3rem; animation: bounce 2s infinite; }

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* --- SECTION COMPETENCES --- */
.skills-section {
    background-color: #0f172a; padding: 80px 20px;
    position: relative; z-index: 2; 
    text-align: center;
}
.skills-title { font-size: 2.5rem; color: #f1f5f9; margin-bottom: 10px; font-weight: 700; }
.intro-skills { color: var(--text-muted); margin-bottom: 50px; }

.skills-container {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 40px;
    max-width: 1100px; margin: 0 auto;
}
.skill-item {
    display: flex; flex-direction: column; align-items: center; cursor: pointer;
    width: 100px; transition: transform 0.3s;
}
.skill-item:hover { transform: scale(1.15); }
.skill-item i { font-size: 60px; margin-bottom: 10px; transition: 0.3s; }
.skill-item:hover i { filter: drop-shadow(0 0 8px rgba(255,255,255,0.5)); }
.skill-name { color: #f1f5f9; font-weight: 600; }
.devicon-github-original { color: white; }

/* --- MODAL (POPUP) --- */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 1000;
    justify-content: center; align-items: center;
}
.modal-content {
    background: var(--card-bg); padding: 2.5rem; border-radius: 1rem;
    width: 90%; max-width: 500px; text-align: center;
    position: relative;
}
@keyframes fadeIn { from {opacity: 0; transform: translateY(-20px);} to {opacity: 1; transform: translateY(0);} }
.close-btn {
    position: absolute; top: 15px; right: 20px;
    font-size: 2rem; cursor: pointer; color: var(--text-muted);
}
.close-btn:hover { color: white; }
#modal-img { width: 80px; margin-bottom: 1rem; }
#modal-desc { margin: 1.5rem 0; color: var(--text-muted); }

.progress-container { text-align: left; margin-top: 1.5rem; }
.progress-bar { height: 10px; background: #334155; border-radius: 5px; overflow: hidden; margin-top: 0.5rem; }
.progress-fill { height: 100%; background: var(--accent); width: 0%; transition: width 0.5s ease; }

/* --- SECTION PROJETS RECENTS --- */
.featured-projects {
    background-color: #0f172a; padding: 80px 20px;
    text-align: center;
    position: relative; z-index: 2;
}
.projects-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; max-width: 1100px; margin: 40px auto;
}
.project-card {
    background: #1e293b; border-radius: 15px; overflow: hidden;
    text-decoration: none; transition: transform 0.3s, box-shadow 0.3s;
    display: flex; flex-direction: column; text-align: left;
}
.project-card:hover {
    transform: translateY(-10px); box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.card-image { height: 200px; overflow: hidden; }
.card-image img {
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0.8; transition: opacity 0.3s, transform 0.5s;
}
.project-card:hover .card-image img { opacity: 1; transform: scale(1.05); }
.card-info { padding: 1.5rem; }
.card-info h3 { color: #f1f5f9; font-size: 1.4rem; margin-bottom: 0.5rem; }
.card-info p { color: #94a3b8; font-size: 0.95rem; margin-bottom: 1rem; }
.tags { display: flex; gap: 10px; }
.tags span {
    background: rgba(56, 189, 248, 0.1); color: var(--accent);
    padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; font-weight: 600;
}


/* ==========================================================================
   4. PAGES STANDARD (ECOLE, ENTREPRISE, PROJETS)
   ========================================================================== */

/* Header spécifique pour ces pages */
.page-header {
    background-size: cover; background-position: center;
    margin-top: 0 !important; /* Colle en haut */
    
    /* Padding important pour que le texte soit visible sous le menu */
    padding-top: 150px; 
    padding-bottom: 80px;
    padding-left: 20px; padding-right: 20px;
    
    text-align: center;
}

.page-title { font-size: 3rem; font-weight: 800; color: #f1f5f9; margin-bottom: 10px; }
.page-subtitle { color: #94a3b8; font-size: 1.2rem; max-width: 600px; margin: 0 auto; }

.content-wrapper { max-width: 1000px; margin: 0 auto; padding: 60px 20px; }

/* Carte Large (Style Ecole/Entreprise) */
.school-card {
    background: #1e293b; border-radius: 20px; padding: 40px;
    display: flex; align-items: center; gap: 40px;
    margin-bottom: 60px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.school-logo-wrapper {
    background-color: #ffffff; width: 150px; height: 150px;
    border-radius: 20px; display: flex; justify-content: center; align-items: center;
    flex-shrink: 0; padding: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.real-logo { width: 100%; height: auto; object-fit: contain; }

.school-info h2 { color: var(--accent); font-size: 2rem; margin-bottom: 15px; }
.school-info h2 a { text-decoration: none; color: inherit; }
.school-info p { color: #cbd5e1; line-height: 1.7; margin-bottom: 20px; }

/* Correctifs soulignement */
.company-link, 
.school-info h2 a {
    text-decoration: none !important;  
    border-bottom: none !important;    
}
.company-link:hover, 
.school-info h2 a:hover {
    border-bottom: none !important;
    color: var(--accent); 
}

.school-features { display: flex; gap: 15px; flex-wrap: wrap; }
.badge {
    background: rgba(56, 189, 248, 0.1); color: var(--accent);
    padding: 5px 15px; border-radius: 50px; font-weight: 600; font-size: 0.9rem;
}

/* Lien Entreprise */
.company-link { border-bottom: 1px dotted var(--accent); transition: 0.3s; }
.company-link:hover { color: var(--accent); border-bottom: 1px solid var(--accent); }

/* Section avec Grille (BTS, Missions) */
.bts-section { text-align: center; margin-bottom: 60px; }
.bts-section h2 { font-size: 2.5rem; color: #f1f5f9; margin-bottom: 20px; }
.bts-desc { color: #94a3b8; max-width: 700px; margin: 0 auto 50px auto; }

.options-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.option-card {
    background: #0f172a; 
    border-radius: 15px; overflow: hidden; transition: transform 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2) !important; 
}
.option-card:hover { transform: translateY(-5px); border-color: var(--accent) !important; }

.option-img {
    height: 200px; width: 100%; object-fit: cover;
}

.option-content { padding: 30px; text-align: left; }
.option-content h3 { font-size: 1.6rem; color: #f1f5f9; margin-bottom: 5px; }
.option-subtitle { color: var(--accent); font-weight: 600; margin-bottom: 20px; display: block; }
.option-content p { color: #94a3b8; font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px; }
.job-list li { color: #cbd5e1; margin-bottom: 5px; list-style: none; }
.job-list li::before { content: "•"; color: var(--accent); font-weight: bold; display: inline-block; width: 1em; }

/* Responsive Mobile Pages (Tablettes) */
@media (max-width: 768px) {
    .school-card { flex-direction: column; text-align: center; }
    .school-features { justify-content: center; }
    .school-logo-wrapper { margin-bottom: 20px; }
}

/* =========================================
   BLOCS DE RÉSUMÉ FINAL & BOUTON RETOUR
   ========================================= */
.tech-summary-card {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 40px; 
}

.btn-back {
    display: inline-flex; 
    align-items: center;
    gap: 10px; 
    color: var(--accent); 
    background: transparent; 
    border: 2px solid var(--accent); 
    padding: 10px 25px;
    border-radius: 50px; 
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 30px; 
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: var(--accent); 
    color: var(--bg-color); 
    transform: translateX(-5px); 
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.3); 
}

.project-footer-action {
    display: flex;
    justify-content: center; 
    margin-top: 60px;        
    margin-bottom: 20px;     
    width: 100%;
}


/* ==========================================================================
   5. PAGE CONTACT (STANDARD PC - LAYOUT NORMAL)
   ========================================================================== */
.header-contact {
    background-image: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.9)), url('https://images.unsplash.com/photo-1557683316-973673baf926?q=80&w=2070&auto=format&fit=crop');
}

.contact-container {
    max-width: 1000px; 
    margin: 80px auto; /* Marge standard pour PC */
    padding: 0 40px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: 80px;
    /* PAS DE PADDING-TOP GÉANT ICI */
}

/* Partie Gauche : Avatar 3D */
.contact-visual {
    position: relative; flex: 1; display: flex; justify-content: center;
    margin-top: 0; /* Marge normale */
}
.avatar-glow {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.4) 0%, rgba(167, 139, 250, 0.1) 70%, transparent 100%);
    border-radius: 50%; filter: blur(40px); z-index: 1;
}
.avatar-3d {
    position: relative; z-index: 2;
    width: 320px; height: 320px; object-fit: cover;
    border-radius: 50%; border: 3px solid rgba(56, 189, 248, 0.3);
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.6));
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Partie Droite : Texte & Liens */
.contact-content { flex: 1.2; text-align: left; }
.contact-title { font-size: 2.5rem; font-weight: 800; color: #f1f5f9; margin-bottom: 10px; }
.contact-text { color: #94a3b8; font-size: 1.1rem; margin-bottom: 30px; line-height: 1.6; }

.contact-links { display: flex; flex-direction: column; gap: 20px; }

.big-link-card {
    display: flex; align-items: center;
    background: #1e293b; 
    padding: 20px 30px; border-radius: 15px;
    text-decoration: none; transition: all 0.3s ease;
}
.big-link-card:hover {
    background: #0f172a; transform: translateX(10px);
}

.link-icon { font-size: 2rem; margin-right: 20px; }
.link-details h4 { color: #f1f5f9; font-size: 1.1rem; margin-bottom: 5px; }
.link-details span { color: var(--accent); font-weight: 500; }



/* =========================================
   PAGE DÉTAIL PROJET (projet-vtc, etc.)
   ========================================= */

.project-header-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 40px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.detail-card {
    background: var(--card-bg); 
    padding: 30px;
    border-radius: 15px;
}

.detail-title {
    color: var(--text-color);
    font-size: 1.4rem;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.detail-list { padding-left: 0; }

.detail-list li {
    color: #cbd5e1; 
    margin-bottom: 10px; 
    list-style: none; 
    position: relative; 
    padding-left: 20px;
}

.detail-list li::before {
    content: "•"; 
    color: var(--accent); 
    position: absolute; 
    left: 0; 
    font-weight: bold;
}

.tech-badges { 
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; 
    margin-top: 10px; 
}

.tech-tag {
    background: rgba(56, 189, 248, 0.15); 
    color: var(--accent);
    padding: 8px 15px; 
    border-radius: 5px; 
    font-weight: 600; 
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .detail-grid { grid-template-columns: 1fr; }
    .project-header-img { height: 250px; }
}

/* =========================================
   PAGE : PROJETS & MODALE DÉTAILS
   ========================================= */

/* --- STYLE DE LA MODALE LARGE --- */
#projectModal .modal-content {
    max-width: 900px; /* Plus large pour la lecture */
    text-align: left;
    padding: 40px;
}

/* Titre du projet dans la modale */
#p-title {
    color: #f1f5f9; 
    font-size: 2.2rem; 
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

/* Blocs de contenu (Contexte, Missions...) */
.project-details-section {
    margin-bottom: 25px;
    background: rgba(15, 23, 42, 0.5); /* Fond légèrement plus foncé */
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* Sous-titres (Fonctionnalités, MVC...) */
.project-subtitle {
    color: var(--accent); /* Bleu du thème */
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex; align-items: center; gap: 10px;
}

/* Listes à puces dans la modale */
.modal-list { list-style: none; padding-left: 0; }
.modal-list li { 
    position: relative; padding-left: 20px; margin-bottom: 8px; color: #cbd5e1;
}
.modal-list li::before {
    content: "•"; color: var(--accent); font-weight: bold; position: absolute; left: 0;
}
.modal-list strong { color: #f1f5f9; font-weight: 600; }


/* ==========================================================================
   6. PAGE VEILLE TECHNOLOGIQUE
   ========================================================================== */

.header-veille {
    background-image: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.9)), 
                      url('https://images.unsplash.com/photo-1599507591144-667d4ed390ae?q=80&w=2070&auto=format&fit=crop');
}
.section-methodology { margin-bottom: 60px; }
.methodology-icon-wrapper { background: #0f172a; display: flex; align-items: center; justify-content: center; }
.methodology-icon { font-size: 3rem; }
.section-title { text-align: center; margin-bottom: 30px; }
.table-responsive { overflow-x: auto; margin-top: 20px; }
.tech-table { width: 100%; border-collapse: collapse; background: #1e293b; border-radius: 8px; color: #cbd5e1; text-align: left; overflow: hidden; }
.tech-table thead tr { background: #0f172a; }
.tech-table th { padding: 15px; border-bottom: 2px solid #334155; font-weight: bold; }
.tech-table td { padding: 15px; border-bottom: 1px solid #334155; }
.tech-table tbody tr:last-child td { border-bottom: none; }
.section-concepts { margin-top: 80px; }
.conclusion-card { margin-top: 60px; border-left: 4px solid #38bdf8; }
.conclusion-text { color: #cbd5e1; line-height: 1.7; } 


/* ==========================================================================
   7. FOOTER (PIED DE PAGE)
   ========================================================================== */
.site-footer {
    background-color: #0d131f; 
    color: #94a3b8; 
    padding: 30px 20px; 
    margin-top: 40px;    
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center; 
}

.footer-content {
    margin-bottom: 10px; 
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; 
    gap: 50px; 
    margin-top: 15px; 
    margin-bottom: 5px; 
}

.socials, .legal-links {
    display: flex;
    gap: 20px; 
}

.footer-link {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 1rem;
    margin: 0;
}

.footer-link:hover {
    color: var(--accent);
}

/* =========================================
   8. RESPONSIVE MOBILE FIX (NAVBAR & CONTACT)
   ========================================= */
@media (max-width: 900px) {
    
    /* A. Navbar Mobile (Safari Friendly) */
    .navbar {
        height: auto !important;
        min-height: 80px;
        padding: 10px 0;
        background: rgba(15, 23, 42, 0.98);
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-content {
        flex-direction: column;
        width: 100%;
        padding: 0;
        align-items: center;
    }

    .logo {
        margin-bottom: 10px;
        width: 100%;
        text-align: center;
        display: block;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        width: 100%;
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
        gap: 15px;
        padding: 10px 20px 20px 20px;
        margin: 0;
        justify-content: flex-start;
        align-items: center;
    }

    .nav-links li {
        flex: 0 0 auto;
    }

    .nav-links a {
        display: inline-block;
        font-size: 0.9rem;
        background: rgba(255, 255, 255, 0.08);
        padding: 8px 16px;
        border-radius: 50px;
        color: #e2e8f0;
        border: 1px solid rgba(255,255,255,0.05);
    }
    
    /* B. CORRECTIFS DECALAGE CONTENU (Autres pages) */
    .page-header, .header-veille {
        padding-top: 220px !important; 
    }
    
    .hero-content {
        padding-top: 150px; 
    }

    /* C. FIX SPECIFIQUE CONTACT (UNIQUEMENT MOBILE) */
    /* Ces règles s'activent SEULEMENT si l'écran est petit */
    .contact-container {
        flex-direction: column; /* Empile image puis texte */
        padding-top: 160px !important; /* Pousse le contenu SOUS la barre */
        margin-top: 0 !important;
        padding-bottom: 40px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .contact-visual {
        margin-top: 0 !important; 
        margin-bottom: 40px;
        width: 100%; 
    }
    
    /* On rapetisse un peu l'image sur mobile pour que ça rentre mieux */
    .avatar-3d, .avatar-glow {
        width: 280px; height: 280px;
    }
    
    .big-link-card {
        width: 100%;
        justify-content: center;
    }
}
