/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg-dark: #0f172a;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #38bdf8;       /* Bleu clair */
    --secondary: #818cf8;     /* Indigo */
    --accent: #c084fc;        /* Violet */
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --glow-dev: rgba(56, 189, 248, 0.5);   /* Bleu ciel */
    --glow-ops: rgba(192, 132, 252, 0.5);  /* Violet */
    --glow-arch: rgba(45, 212, 191, 0.5);  /* Teal / Vert menthe */
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* =========================================
   2. BACKGROUND ANIMATIONS
   ========================================= */
.background-glow, .background-glow-2 {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    animation: floatBg 10s infinite alternate;
}
.background-glow { top: -10%; left: -10%; width: 50vw; height: 50vw; background: var(--primary); }
.background-glow-2 { bottom: -10%; right: -10%; width: 40vw; height: 40vw; background: var(--accent); animation-delay: -5s; }

@keyframes floatBg { 
    0% { transform: translate(0, 0); } 
    100% { transform: translate(20px, 40px); } 
}

/* =========================================
   3. NAVIGATION (Glassmorphism)
   ========================================= */
header {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    z-index: 1000; width: auto;
}
@media (min-width: 768px) {
    header { top: 20px; bottom: auto; }
}

.glass-nav {
    display: flex; gap: 10px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(16px);
    padding: 12px 24px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.nav-btn {
    background: transparent; border: none; color: var(--text-muted);
    padding: 10px 18px; border-radius: 30px; cursor: pointer;
    font-family: var(--font-heading); font-weight: 600;
    transition: all 0.3s ease; display: flex; align-items: center; gap: 8px;
}
.nav-btn span { display: none; }
@media (min-width: 768px) { .nav-btn span { display: inline; } }

.nav-btn:hover { color: white; background: rgba(255,255,255,0.05); }
.nav-btn.active { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; box-shadow: 0 0 15px rgba(56, 189, 248, 0.4); }

/* =========================================
   4. LAYOUT GÉNÉRAL & TITRES
   ========================================= */
main { max-width: 1200px; margin: 0 auto; padding: 20px; padding-top: 100px; padding-bottom: 120px; }

.section { display: none; animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.section.active-section { display: block; }

@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.section-title { font-size: 2.5rem; margin-bottom: 40px; position: relative; color: white; font-family: var(--font-heading); }
.section-title::after { content: ''; display: block; width: 80px; height: 5px; background: var(--primary); margin-top: 10px; border-radius: 5px; }

/* =========================================
   5. PAGE D'ACCUEIL (Hero)
   ========================================= */
.hero-container {
    display: flex; flex-direction: column-reverse; align-items: center; gap: 40px;
    min-height: 70vh; justify-content: center;
}
@media (min-width: 900px) {
    .hero-container { flex-direction: row; text-align: left; justify-content: space-between; }
    .hero-text-side { width: 55%; }
    .hero-visual-side { width: 40%; display: flex; justify-content: center; }
}

.badge {
    display: inline-block; padding: 6px 16px; background: rgba(56, 189, 248, 0.1);
    color: var(--primary); border-radius: 20px; font-size: 0.9rem; font-weight: 600;
    border: 1px solid rgba(56, 189, 248, 0.2); margin-bottom: 20px;
}

h1 { font-size: 3rem; line-height: 1.1; margin-bottom: 10px; font-weight: 800; }
.gradient-text {
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.typing-container { font-size: 1.5rem; color: var(--text-muted); font-weight: 400; min-height: 1.6em; height: auto; margin-bottom: 20px; }
.txt-type { border-right: 2px solid var(--primary); padding-right: 5px; animation: blink 0.7s infinite; }
@keyframes blink { 50% { border-color: transparent; } }

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

.hero-buttons { display: flex; gap: 15px; margin-bottom: 40px; flex-wrap: wrap; }
.cta-btn {
    padding: 12px 30px; border-radius: 30px; font-weight: 600; cursor: pointer; border: none; font-size: 1rem; transition: transform 0.2s;
}
.cta-btn:hover { transform: translateY(-3px); }
.cta-btn.primary { background: white; color: var(--bg-dark); }
.cta-btn.secondary { background: rgba(255,255,255,0.05); color: white; border: 1px solid rgba(255,255,255,0.1); }

.social-links { display: flex; gap: 20px; }
.social-links a { color: var(--text-muted); font-size: 1.5rem; transition: 0.3s; }
.social-links a:hover { color: var(--primary); transform: scale(1.1); }

.blob-animation {
    width: 300px; height: 300px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph 8s ease-in-out infinite;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 20px 50px rgba(56, 189, 248, 0.3);
}
@keyframes morph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* =========================================
   6. PAGE À PROPOS (Bento Grid)
   ========================================= */
.bento-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Version Ordinateur / Tablette */
@media (min-width: 900px) {
    .bento-grid {
        flex-direction: row; 
        align-items: flex-start;
    }
    .bento-col-main {
        flex: 2;
        display: flex; flex-direction: column; gap: 20px;
    }
    .bento-col-side {
        flex: 1;
        display: flex; flex-direction: column; gap: 20px;
        position: sticky; top: 100px;
    }
}

.card-icon { position: absolute; top: -10px; right: -10px; font-size: 5rem; opacity: 0.05; transform: rotate(15deg); }

.bento-card {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    padding: 30px; border-radius: var(--radius-lg); position: relative;
    overflow: hidden; transition: transform 0.3s ease, border-color 0.3s;
}
.bento-card:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-5px); }
.bento-card h3 { font-size: 1.4rem; margin-bottom: 15px; color: white; }

.info-list { list-style: none; }
.info-list li { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; color: var(--text-muted); }
.info-list i { color: var(--primary); width: 20px; }

.btn-download {
    display: inline-flex; align-items: center; gap: 10px; margin-top: 10px;
    background: rgba(56, 189, 248, 0.1); color: var(--primary);
    padding: 10px 20px; border-radius: 12px; text-decoration: none; font-weight: 600;
    transition: 0.3s;
}
.btn-download:hover { background: var(--primary); color: var(--bg-dark); }
.goal-card { background: linear-gradient(135deg, rgba(129, 140, 248, 0.1), rgba(192, 132, 252, 0.1)); }
.goal-icon { font-size: 2.5rem; color: var(--accent); margin-bottom: 10px; }

.trophy-list {
    list-style: none;
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}
.trophy-list::-webkit-scrollbar { width: 4px; }
.trophy-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.trophy-list li {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 10px; margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem; color: var(--text-muted);
    transition: transform 0.2s ease;
}
.trophy-list li:hover { transform: translateX(5px); background: rgba(255, 255, 255, 0.07); }
.trophy-list li strong { color: white; }

.medal-gold i { color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.4); }
.medal-silver i { color: #c0c0c0; text-shadow: 0 0 10px rgba(192, 192, 192, 0.4); }
.medal-bronze i { color: #cd7f32; text-shadow: 0 0 10px rgba(205, 127, 50, 0.4); }

.medal-gold { border-left: 3px solid #ffd700; }
.medal-silver { border-left: 3px solid #c0c0c0; }
.medal-bronze { border-left: 3px solid #cd7f32; }

.soft-skills-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

.soft-skills-tags span {
    background: rgba(56, 189, 248, 0.1); color: var(--primary);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 8px 16px; border-radius: 50px;
    font-size: 0.9rem; font-weight: 500;
    display: flex; align-items: center; gap: 8px;
    transition: all 0.3s ease;
}
.soft-skills-tags span i { font-size: 1rem; }
.soft-skills-tags span:hover {
    background: var(--primary); color: var(--bg-dark);
    transform: translateY(-3px); box-shadow: 0 5px 15px rgba(56, 189, 248, 0.3);
}

.timeline {
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    margin-left: 10px; padding-left: 25px; padding-top: 5px;
}
.timeline-item { position: relative; margin-bottom: 30px; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
    content: ''; position: absolute; left: -32px; top: 5px;
    width: 12px; height: 12px; background: var(--primary);
    border-radius: 50%; border: 2px solid var(--bg-dark);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.timeline-item .date {
    display: inline-block; background: rgba(56, 189, 248, 0.1);
    color: var(--primary); padding: 2px 8px; border-radius: 4px;
    font-size: 0.8rem; font-weight: 600; margin-bottom: 8px;
}
.timeline-item h4 { margin: 0 0 5px 0; color: white; font-size: 1.1rem; }
.timeline-item p { margin: 0; font-size: 0.95rem; color: var(--text-muted); line-height: 1.5; }

/* =========================================
   7. PAGE CONNAISSANCES
   ========================================= */
.skill-card {
    position: relative;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 30px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Effet rebond léger */
    z-index: 1;
}

.card-glow {
    position: absolute;
    top: -50px; right: -50px;
    width: 150px; height: 150px;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.card-dev:hover { 
    border-color: rgba(56, 189, 248, 0.4); 
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(56, 189, 248, 0.15);
}
.card-dev .card-glow { background: var(--glow-dev); opacity: 0.2; }
.card-dev h3 i { color: var(--primary); text-shadow: 0 0 15px rgba(56, 189, 248, 0.6); }

.card-ops:hover { 
    border-color: rgba(192, 132, 252, 0.4); 
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(192, 132, 252, 0.15);
}
.card-ops .card-glow { background: var(--glow-ops); opacity: 0.2; }
.card-ops h3 i { color: var(--accent); text-shadow: 0 0 15px rgba(192, 132, 252, 0.6); }

.card-arch:hover { 
    border-color: rgba(45, 212, 191, 0.4); 
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(45, 212, 191, 0.15);
}
.card-arch .card-glow { background: var(--glow-arch); opacity: 0.2; }
.card-arch h3 i { color: #2dd4bf; text-shadow: 0 0 15px rgba(45, 212, 191, 0.6); }

.skill-card h3 {
    margin-bottom: 10px; font-size: 1.4rem; color: white; display: flex; align-items: center; gap: 12px;
}
.skill-intro {
    font-size: 0.9rem; color: var(--text-muted); margin-bottom: 25px; 
    border-left: 3px solid rgba(255,255,255,0.1); padding-left: 15px; 
}

.tech-tags-wrapper {
    display: flex; flex-wrap: wrap; gap: 10px;
}

.tag-pill {
    position: relative;
    font-size: 0.8rem; font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    cursor: default;
    transition: all 0.3s ease;
    display: flex; align-items: center; gap: 8px;
}

.tag-pill i { font-size: 0.9rem; }

.tag-pill:hover {
    color: white;
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
}

.card-dev .tag-pill:hover { border-color: var(--primary); box-shadow: 0 5px 15px rgba(56, 189, 248, 0.2); }
.tech-core { border-left: 2px solid var(--primary); }

.card-ops .tag-pill:hover { border-color: var(--accent); box-shadow: 0 5px 15px rgba(192, 132, 252, 0.2); }
.tool-git, .tool-ide { border-left: 2px solid var(--accent); }

.card-arch .tag-pill:hover { border-color: #2dd4bf; box-shadow: 0 5px 15px rgba(45, 212, 191, 0.2); }
.arch-method { border-left: 2px solid #2dd4bf; }

/* =========================================
   8. PAGE PROJETS & SLIDER
   ========================================= */
.projects-grid {
    display: grid; grid-template-columns: 1fr; gap: 40px;
}
@media (min-width: 768px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }

.project-card {
    background: var(--glass-bg); border-radius: var(--radius-lg); 
    border: 1px solid var(--glass-border); 
    padding: 0; display: flex; flex-direction: column; overflow: hidden;
    transition: 0.3s ease;
}
.project-card:hover { 
    border-color: var(--primary); transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.project-slider-component {
    position: relative; height: 250px; 
    background: #0f172a; border-bottom: 1px solid var(--glass-border);
}
@media (max-width: 768px) { .project-slider-component { height: 200px; } }

.project-slider-component.mode-contain .slide img {
    object-fit: contain; background-color: #000;
}

.slider-track-container { height: 100%; position: relative; overflow: hidden; }
.slider-track {
    padding: 0; margin: 0; list-style: none; position: relative; 
    height: 100%; width: 100%; transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.slide { position: absolute; top: 0; bottom: 0; width: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }

.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.6); color: white; border: none; 
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer; 
    z-index: 10; backdrop-filter: blur(4px); border: 1px solid var(--glass-border); 
    transition: all 0.3s; display: flex; align-items: center; justify-content: center;
}
.slider-btn:hover { background: var(--primary); color: var(--bg-dark); }
.slider--prev { left: 10px; }
.slider--next { right: 10px; }

.slider-dots-nav {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: 6px; width: 95%;
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 10;
}
.slider-dot {
    border: none; width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.3); cursor: pointer; transition: all 0.3s;
}
.slider-dot.active-dot { background: var(--primary); transform: scale(1.3); box-shadow: 0 0 8px var(--primary); }

.project-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.project-header { margin-bottom: 15px; }
.project-header h3 { margin-bottom: 0; font-size: 1.4rem; color: white; font-weight: 700; }
.project-header img { max-height: 60px; width: auto; display: block; margin-bottom: 5px; }

.tags-group-container { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.tag-row { display: flex; align-items: flex-start; gap: 10px; }
.tag-label {
    font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
    min-width: 60px; padding-top: 5px; display: flex; align-items: center; gap: 6px;
}
.tag-label i { font-size: 0.8rem; opacity: 0.7; }
.tech-tags-wrapper { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }

.tag-pill {
    font-size: 0.75rem; font-weight: 700; padding: 4px 10px;
    border-radius: 6px; text-transform: uppercase; letter-spacing: 0.5px;
    border: 1px solid transparent; transition: 0.3s; cursor: default;
}
.tag-pill.tech { background: rgba(56, 189, 248, 0.1); color: var(--primary); border-color: rgba(56, 189, 248, 0.2); }
.tag-pill.tool { background: rgba(192, 132, 252, 0.1); color: var(--accent); border-color: rgba(192, 132, 252, 0.2); }
.tag-pill:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.3); }

.project-description { margin-bottom: 20px; }
.project-description p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.project-description strong { color: var(--text-main); }

.action-buttons { display: flex; gap: 15px; margin-top: 20px; }

.project-link {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 20px; border-radius: 5px;
    text-decoration: none; font-weight: bold;
    transition: transform 0.2s, opacity 0.2s;
    gap: 8px;
    margin-top: auto; 
}
.project-link:hover { transform: translateY(-2px); opacity: 0.9; }

/* Style spécifique GitHub */
.github-btn { background-color: #333; color: white; border: 1px solid #333; }


/* =========================================
   9. LIGHTBOX
   ========================================= */
.lightbox {
    display: none; position: fixed; z-index: 9999;
    padding-top: 50px; left: 0; top: 0; width: 100%; height: 100%; 
    background-color: rgba(0, 0, 0, 0.9); backdrop-filter: blur(5px);
    justify-content: center; align-items: center; flex-direction: column;
}

.lightbox-content {
    margin: auto; display: block; max-width: 90%; max-height: 85vh;
    border-radius: 8px; box-shadow: 0 0 50px 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;}
}

.lightbox-close {
    position: absolute; top: 20px; right: 35px;
    color: #f1f1f1; font-size: 40px; font-weight: bold;
    transition: 0.3s; cursor: pointer;
}
.lightbox-close:hover { color: var(--primary); text-decoration: none; }