/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg-dark: #0a0f1c;      /* Fond principal */
    --bg-card: #111a2f;      /* Fond des cartes */
    --primary: #3b82f6;      /* Bleu vibrant */
    --accent: #06b6d4;       /* Cyan néon */
    --text-main: #f1f5f9;    /* Blanc cassé */
    --text-muted: #94a3b8;   /* Gris bleuté */
    --border: rgba(255, 255, 255, 0.08);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

/* --- FIX ULTIME DU FOOTER (CSS GRID) --- */
body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    
    /* La structure magique pour le footer */
    display: grid;
    grid-template-rows: 1fr auto; /* 1fr = tout l'espace libre pour le main */
    min-height: 100vh; /* Force la page à faire au moins la taille de l'écran */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* =========================================
   2. UTILITIES & TYPOGRAPHY
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.small-container { max-width: 800px; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: #fff;
}

.highlight { color: var(--accent); }

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section { padding: 100px 0; }
.bg-alt { background: #0d1221; }

.section-title {
    font-size: 2.5rem;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 40%;
    height: 4px;
    background: var(--primary);
    margin-top: 10px;
    border-radius: 2px;
}

/* =========================================
   3. NAVBAR
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 15, 28, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 15px 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: -1px;
}

.logo .dot { color: var(--accent); font-size: 2rem; line-height: 0; }

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:hover { color: var(--accent); }

.btn-nav {
    border: 1px solid var(--primary);
    padding: 8px 20px;
    border-radius: 50px;
    color: var(--primary) !important;
}

.btn-nav:hover {
    background: var(--primary);
    color: #fff !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

/* Bouton Langue */
.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    transition: var(--transition);
    margin-left: 10px;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger .bar { width: 25px; height: 3px; background: white; transition: 0.3s; }

/* =========================================
   4. HERO SECTION & MAIN
   ========================================= */
/* Main prend la 1ère ligne de la grille (1fr) donc tout l'espace libre */
main {
    display: flex;
    flex-direction: column;
    /* Pas de margin-left ici car le layout global est géré par la grille, 
       mais le contenu intérieur doit être géré. 
       ATTENTION : Si tu as un menu fixe à gauche (sidebar), il faut le décalage.
       Si tu as un menu en haut (navbar), le padding-top suffit.
       Dans ton cas, c'est une Navbar en haut. */
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.badge {
    display: inline-block;
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 15px;
}

.hero h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 25px;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin-bottom: 35px;
}

.cta-group {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

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

.btn-secondary {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-secondary:hover {
    border-color: var(--text-main);
    background: rgba(255,255,255,0.05);
}

.hero-stats {
    display: flex;
    gap: 40px;
    border-top: 1px solid var(--border);
    padding-top: 30px;
}

.stat .number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.stat .label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.profile-blob {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.2), transparent);
    border: 2px solid var(--border);
    padding: 10px;
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.1);
    margin: 0 auto;
}

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

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}

/* =========================================
   5. SKILLS SECTION
   ========================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    margin-bottom: 60px;
}

.skill-category h3 {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
}

.skill-item { margin-bottom: 20px; }

.skill-item .info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
}

/* =========================================
   6. CERTIFICATIONS
   ========================================= */
.certifications-container {
    text-align: center;
    margin-top: 40px;
    padding: 40px;
    background: rgba(17, 26, 47, 0.6);
    border: 1px solid var(--border);
    border-radius: 16px;
    position: relative;
}

.certifications-container h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.cert-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 40px;
}

.badges-wrapper {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.badge-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px 20px;
    width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: all 0.4s ease;
    text-decoration: none;
}

.badge-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
}

.badge-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.badge-card:hover .badge-img {
    transform: scale(1.05);
}

.badge-info h4 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.badge-info span {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 12px;
}

/* --- FIX FINAL DU TEXTE TROP HAUT : PADDING ASYMÉTRIQUE --- */
.status-verified, .status-pending {
    border-radius: 50px; 
    
    /* 8px en haut, 4px en bas : ça force le texte à descendre visuellement */
    padding: 8px 16px 4px 16px; 
    
    font-weight: 600;
    font-size: 0.7rem !important; 
    letter-spacing: 1px; 
    text-transform: uppercase;
    
    display: inline-flex !important;
    align-items: center;      
    justify-content: center;  
    
    line-height: normal;           
    gap: 6px;                 
    
    margin-top: 12px;
    transition: all 0.3s ease;
    min-width: 100px; 
}

.status-verified {
    background: rgba(16, 185, 129, 0.1); 
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pending {
    background: rgba(234, 179, 8, 0.1);
    color: #facc15 !important;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.status-verified:hover, .status-pending:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Locked Badge */
.badge-locked {
    background: rgba(17, 26, 47, 0.4);
    cursor: default;
    opacity: 0.9;
}

.badge-locked:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
}

.badge-locked .badge-img {
    filter: grayscale(100%) opacity(0.5);
}

.badge-overlay {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    font-size: 1.5rem;
    color: #fff;
    background: rgba(0,0,0,0.5);
    padding: 15px;
    border-radius: 50%;
    backdrop-filter: blur(4px);
}

.credly-link-container {
    margin-top: 30px;
}

.btn-credly {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid transparent;
}

.btn-credly:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* =========================================
   7. PROJECTS SECTION
   ========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.5);
}

.highlight-card {
    border-color: rgba(59, 130, 246, 0.3);
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.card-header { padding: 25px 25px 10px; }
.card-body { padding: 0 25px 25px; flex-grow: 1; display: flex; flex-direction: column; }

.tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

.tag-accent { color: var(--accent); }

.project-card h3 { font-size: 1.3rem; margin-bottom: 10px; color: #fff; }
.project-card p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 20px; flex-grow: 1; }

.project-link-p { margin-bottom: 15px !important; }
.link-text { color: var(--accent); font-weight: 600; }
.link-text:hover { text-decoration: underline; }

.tech-tags {
    display: flex;
    gap: 10px;
    list-style: none;
    flex-wrap: wrap;
}

.tech-tags li {
    font-size: 0.75rem;
    background: rgba(255,255,255,0.05);
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--text-main);
    font-family: monospace;
    border: 1px solid rgba(255,255,255,0.1);
}

/* =========================================
   8. HOBBIES SECTION
   ========================================= */
.hobbies-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}

.hobby-box {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
}

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

.hobby-box i { font-size: 2.5rem; color: var(--accent); margin-bottom: 20px; }
.hobby-box h4 { margin-bottom: 10px; font-size: 1.1rem; }
.hobby-box p { color: var(--text-muted); font-size: 0.9rem; }

/* =========================================
   9. CONTACT & FOOTER (FIXED)
   ========================================= */
.contact-section { text-align: center; }

.contact-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin-top: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    color: var(--text-main);
}

.contact-item i { font-size: 1.5rem; color: var(--primary); }
.contact-item:hover { color: var(--accent); }

/* Footer fixé en bas grâce à Grid sur le body */
footer {
    grid-row-start: 2; /* Force le footer sur la 2ème ligne */
    grid-row-end: 3;
    
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    padding: 20px 0;
    text-align: center;
    background: rgba(10, 15, 28, 0.95);
    z-index: 100;
}

/* =========================================
   10. MODAL / LIGHTBOX
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1000px;
    position: relative;
    text-align: center;
}

#modal-img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from {transform:scale(0.8); opacity: 0;}
    to {transform:scale(1); opacity: 1;}
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 2001;
}

.close-modal:hover { color: var(--primary); }

.nav-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
    border: none;
}

.nav-btn:hover { background-color: rgba(59, 130, 246, 0.8); }

.next-btn { right: 0; border-radius: 3px 0 0 3px; }
.prev-btn { left: 0; border-radius: 3px 0 0 3px; }

.clickable-project {
    cursor: pointer;
}
.clickable-project:hover .card-image-overlay {
    opacity: 1;
}

/* =========================================
   11. ANIMATIONS (SCROLL REVEAL)
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Effects */
.skill-item:nth-child(1) { transition-delay: 0.1s; }
.skill-item:nth-child(2) { transition-delay: 0.2s; }
.skill-item:nth-child(3) { transition-delay: 0.3s; }

.project-card:nth-child(1) { transition-delay: 0.1s; }
.project-card:nth-child(2) { transition-delay: 0.2s; }
.project-card:nth-child(3) { transition-delay: 0.3s; }
.project-card:nth-child(4) { transition-delay: 0.1s; }
.project-card:nth-child(5) { transition-delay: 0.2s; }
.project-card:nth-child(6) { transition-delay: 0.3s; }

.badge-card:nth-child(1) { transition-delay: 0.1s; }
.badge-card:nth-child(2) { transition-delay: 0.3s; }
.badge-card:nth-child(3) { transition-delay: 0.5s; }

.hobby-box:nth-child(1) { transition-delay: 0.1s; }
.hobby-box:nth-child(2) { transition-delay: 0.2s; }
.hobby-box:nth-child(3) { transition-delay: 0.3s; }
.hobby-box:nth-child(4) { transition-delay: 0.4s; }

/* =========================================
   12. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        padding: 30px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.active { transform: translateY(0); }
    
    .hamburger { display: flex; color: white; }
    .hamburger.toggle .bar:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
    .hamburger.toggle .bar:nth-child(2) { opacity: 0; }
    .hamburger.toggle .bar:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }

    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-img-container { order: -1; margin-bottom: 30px; display: flex; justify-content: center; }
    .profile-blob { width: 220px; height: 220px; }
    .cta-group { justify-content: center; flex-direction: column; }
    .hero-stats { justify-content: center; flex-wrap: wrap; gap: 20px; }
    
    .section-title { font-size: 2rem; }
    .project-card { margin-bottom: 20px; }
    
    .lang-btn {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
    }
}
