/* --- VARIABLES & BASE --- */
:root {
    --primary: #ffbd39;
    --dark: #1a1a1a;
    --darker: #111111;
    --light: #252525;
    --text: #e5e5e5;
    --white: #ffffff;
    --gap: 2rem;
}

/* Reset de base */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html { 
    scroll-behavior: smooth; 
}

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

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

img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 8px; 
}

.center { 
    text-align: center; 
}

/* --- EN-TÊTE & NAVIGATION --- */
.site-header { 
    background: var(--darker); 
    padding: 1rem 0; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    border-bottom: 1px solid #333;
}

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

.logo {
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.logo-img {
    max-height: 40px; /* Limite la hauteur du logo pour qu'il tienne dans le header */
    width: auto;      /* Conserve les proportions */
    display: inline-block;
    vertical-align: middle;
}

.main-nav ul { 
    display: flex; 
    list-style: none; 
    gap: 1.5rem; 
    align-items: center; 
}

.main-nav a { 
    color: var(--white); 
    text-decoration: none; 
    font-size: 0.9rem; 
    transition: 0.3s; 
}

.main-nav a:hover,
.main-nav a.active { 
    color: var(--primary); 
}

/* Menu Burger (Mobile) */
.burger {
    display: none; 
    flex-direction: column; 
    gap: 5px; 
    background: none; 
    border: none; 
    cursor: pointer; 
    z-index: 1001;
}

.burger span { 
    display: block; 
    width: 25px; 
    height: 3px; 
    background: var(--primary);
    transition: 0.3s;
}

/* --- BOUTONS --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    cursor: pointer;
}

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

.btn-primary:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 5px 15px rgba(255, 189, 57, 0.4); 
}

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

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

.btn-secondary-dark { 
    border: 1px solid #444; 
    color: var(--white); 
}

.btn-secondary-dark:hover {  
    background: #333; 
    border-color: var(--primary);
}

/* Bouton Spécial NAS ESDIC */
.btn-nas {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--light);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 10px;
    transition: 0.3s;
}

.btn-nas:hover {
    background: var(--primary);
    color: var(--dark);
}

/* --- HERO SECTION --- */
.hero-section { 
    background: var(--dark); 
    color: var(--white); 
    padding: 5rem 0; 
    min-height: 75vh; 
    display: flex; 
    align-items: center; 
}

.hero-grid { 
    display: grid; 
    grid-template-columns: 1.2fr 0.8fr; 
    gap: var(--gap); 
    align-items: center; 
}

/* Alignement côte à côte du texte et de l'image */
.hero-container-grid {
    display: grid;
    grid-template-columns: 1fr 400px; /* Le texte prend tout l'espace restants, l'image est limitée à 350px */
    gap: 3rem;                         /* Espace entre le texte et l'image */
    align-items: center;               /* Alignement vertical au centre */
}

/* Contrôle et réduction de la taille de l'image */
.hero-container-media .profile-img {
    width: 100%;
    max-width: 400px;                  /* Ajuste cette valeur si tu veux l'image plus petite ou plus grande */
    height: auto;
    border-radius: 12px;               /* Bords légèrement arrondis */
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

/* Adaptation automatique pour mobile */
@media (max-width: 768px) {
    .hero-container-grid {
        grid-template-columns: 1fr;    /* Bascule sur 1 colonne sur écran mobile */
        gap: 2rem;
    }
}

/* Section Hero aérée et haute */
.hero-container-section {
    padding: 6rem 0;                   /* Augmente l'espace en haut et en bas de la section */
    min-height: 80vh;                  /* Force la section à occuper au moins 80% de la hauteur de l'écran */
    display: flex;
    align-items: center;               /* Centre le contenu verticalement dans cet espace */
    
}

/* Espacement interne des éléments de texte */
.hero-container-text h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;             /* Espace sous le titre */
}

.hero-container-subtitle {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;             /* Espace sous le paragraphe */
    max-width: 650px;
}

.hero-container-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.hero-text h1 { 
    font-size: 2.8rem; 
    line-height: 1.2; 
    margin-bottom: 1.5rem; 
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #b0b0b0;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 15px;
}

.profile-img {
    border: 2px solid var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* --- CARTES & SERVICES (Nouveau) --- */
.services-overview {
    padding: 5rem 0;
    background: var(--darker);
}

.services-overview h2,
.location-coverage h2 {
    font-size: 2rem;
    margin-bottom: 2.5rem;
    margin-top: 2.5rem;
    color: var(--white);
    border-left: 4px solid var(--primary);
    padding-left: 15px;
}

.location-coverage h2:first-of-type {
    margin-top: 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Force 2 colonnes égales */
    gap: 2rem;                            /* Espace entre les cartes */
    max-width: 900px;                     /* Largeur maximale pour centrer la grille */
    margin: 0 auto;                       /* Centre la grille horizontalement */
}

/* Optionnel : passer en 1 seule colonne sur mobile pour la lisibilité */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.service-card {
    background: var(--light);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    border: 1px solid #333;
    transition: 0.3s;
}

.service-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.service-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.service-card p {
    color: #aaa;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.link-more {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
}

.link-more:hover {
    color: var(--primary);
}

/* --- ANCRAGE GÉOGRAPHIQUE --- */
.location-coverage {
    padding: 4rem 0;
    background: var(--dark);
}

.location-list {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.location-list li {
    background: var(--light);
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid #333;
    color: var(--primary);
    font-size: 0.9rem;
}

/* --- SECTION LINKEDIN --- */
.linkedin-card {
    background: var(--light);
    border-radius: 12px;
    overflow: hidden;
    max-width: 600px;
    margin: 3rem auto 0;
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.linkedin-header {
    background: linear-gradient(90deg, #0077b5, #00a0dc);
    height: 100px;
}

.linkedin-body {
    padding: 0 30px 30px 30px;
    margin-top: -50px;
}

.linkedin-profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--light);
    object-fit: cover;
    background: var(--dark);
}

.profile-name { font-size: 1.8rem; color: var(--white); margin-bottom: 5px; }
.profile-title { font-size: 1rem; color: var(--text); margin-bottom: 10px; }
.profile-location { font-size: 0.85rem; color: #888; margin-bottom: 15px; }

/* --- CONTACT --- */
.contact-grid { 
    display: grid; 
    grid-template-columns: 1fr 1.5fr; 
    gap: 4rem; 
    margin-top: 3rem;
}

.info-item h4 { margin-bottom: 5px; color: var(--white); }
.info-item p, .info-item a { color: #aaa; text-decoration: none; }

.form-group input, 
.form-group textarea { 
    width: 100%; 
    padding: 15px; 
    background: var(--light);
    color: var(--white);
    border: 1px solid #333; 
    border-radius: 8px; 
    font-family: inherit; 
    font-size: 1rem; 
    transition: 0.3s;
}

.form-group input:focus, 
.form-group textarea:focus { 
    border-color: var(--primary); 
    outline: none; 
}

/* --- CERTIFICATIONS & PHOTO GRID --- */
.cert-honors-grid { display: grid; grid-template-columns: 1fr 280px 1fr; gap: 2rem;align-items: center; margin-top: 3rem;}
.img-vertical { width: 100%; max-width: 240px; border-radius: 12px; border: 2px solid var(--primary); display: block; margin: 0 auto;}
.photo-legend { text-align: center; margin-top: 15px; }
.photo-legend .rank { color: var(--primary); font-weight: bold; text-transform: uppercase; }

/* --- SECTION PARCOURS (Timeline) --- */
.timeline { position: relative; max-width: 800px; margin: 0 auto; padding: 20px 0; }
.timeline::before { content: ''; position: absolute; left: 50%; width: 2px; height: 100%; background: var(--primary); transform: translateX(-50%); }
.timeline-item { margin-bottom: 40px; position: relative; width: 50%; padding: 0 40px; }
.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; text-align: left; }
.timeline-date { color: var(--primary); font-weight: bold; margin-bottom: 10px; }
.timeline-content { background: var(--light); padding: 20px; border-radius: 8px; border: 1px solid #333; }

/* Nouveau style pour la section Education avec fond image */
.bg-office-moget {position: relative; /* Nécessaire pour l'overlay */background-image: url('images/bureau_moget.png'); /* Vérifiez bien le chemin de votre image ! */background-size: cover;background-position: center;background-attachment: fixed; /* Optionnel : effet parallaxe sympa */color: var(--white); /* Force le texte en blanc pour le contraste */}
.bg-office-moget::before {content: '';position: absolute;top: 0;left: 0;width: 100%;height: 100%;background-color: rgba(17, 17, 17, 0.85); /* Utilise votre variable var(--darker) avec de l'opacité */z-index: 1;}
.bg-office-moget .container {position: relative;z-index: 2;}
.bg-office-moget .section-subtitle {color: #aaa; /* Gris clair pour le sous-titre */}
.bg-office-moget .education-card {background: rgba(37, 37, 37, 0.9); /* var(--light) avec opacité pour laisser deviner le fond */border: 1px solid #444;}
.bg-office-moget .education-card h3 {color: var(--white);}
.bg-office-moget .school {color: var(--primary);}
.bg-office-moget .description {color: #ccc;}

/* --- SECTION FORMATIONS (Cards) --- */
.education-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: 2rem; }
.education-card { background: var(--light); padding: 2rem; border-radius: 12px; border: 1px solid #333; transition: 0.3s; }
.education-card:hover { border-color: var(--primary); transform: translateY(-5px); }

.resume-list {list-style: none;padding-left: 0;}
.resume-list li {position: relative;padding-left: 25px;margin-bottom: 12px;}
.resume-list li::before {content: '→';position: absolute;left: 0;color: var(--primary);font-weight: bold;}

/* Skills */
.section-subtitle { margin-bottom: 3rem; color: #666; }
.skills-wrapper { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 3rem;}
.skill-category h3 { color: var(--primary); margin-bottom: 1.5rem; border-left: 4px solid var(--primary); padding-left: 15px; display: flex; align-items: center; gap: 10px; font-size: 1.3rem; margin-bottom: 2rem;}
.skill-item { margin-bottom: 1.5rem; }
.skill-info { display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 500;}
.progress-line { height: 8px; width: 100%; background: #e0e0e0;border-radius: 10px; position: relative; overflow: hidden;}
.progress-line span {height: 100%;background: var(--primary);position: absolute;left: 0;top: 0; width: 0; /* Animé via JS */ transition: width 1.5s cubic-bezier(0.1, 0.42, 0.41, 1);}
.skill-category {background: rgba(255, 255, 255, 0.03); padding: 2rem;border-radius: 15px;border: 1px solid #333; transition: 0.3s;}
.skill-category:hover { border-color: var(--primary); transform: translateY(-5px);}
.skill-category .icon { font-style: normal; background: var(--primary);color: var(--dark); width: 35px; height: 35px; display: flex; justify-content: center; align-items: center; border-radius: 8px; font-size: 1.1rem;}
.category-details { margin-top: 1.5rem; font-size: 0.85rem; color: #888; font-style: italic; border-top: 1px solid #333;padding-top: 10px;}
.skill-info span:last-child { font-size: 0.8rem; color: var(--primary); text-transform: uppercase; letter-spacing: 1px;}

/* Projets  */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-top: 3rem;}
.project-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.05); transition: transform 0.3s ease;}
.project-card:hover { transform: translateY(-10px); }
.project-image { position: relative; height: 200px; overflow: hidden;}
.project-image img { width: 100%; height: 100%; object-fit: cover;}
.project-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(26, 26, 26, 0.8); display: flex; justify-content: center; align-items: center; opacity: 0;transition: opacity 0.3s ease;}
.project-card:hover .project-overlay { opacity: 1; }
.btn-view {background: var(--primary); color: var(--dark); padding: 10px 20px; border-radius: 5px; text-decoration: none; font-weight: 600;}
.project-info { padding: 1.5rem; }
.project-tag { font-size: 0.75rem; color: var(--primary); text-transform: uppercase; font-weight: 700; letter-spacing: 1px;}
.project-info h3 { margin: 0.5rem 0; font-size: 1.25rem; }
.project-info p { font-size: 0.9rem; color: #666; }


/* --- PIED DE PAGE (Footer) --- */
.site-footer {
    background: var(--darker);
    border-top: 1px solid #333;
    padding-top: 4rem;
    color: #888;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding-bottom: 3rem;
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
}

.footer-col p {
    font-size: 0.88rem;
    line-height: 1.5;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    font-size: 0.88rem;
    transition: 0.3s;
}

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

.footer-bottom {
    border-top: 1px solid #222;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.8rem;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }   
    .hero-text h1 { font-size: 2.2rem; }
    .hero-actions { justify-content: center; }
}

@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    
    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--darker);
        z-index: 999;
        transition: 0.4s;
        padding-top: 80px;
    }

    .main-nav.active {
        display: block;
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 2rem;
    }

    .burger { display: flex; }
}