/* --- VARIABLES & RESET --- */
:root {
    --bg-dark: #121212;
    --text-light: #f5f5f5;
    --bg-light: #F4F4F6; 
    --line-color: #4B5563;
    /* Couleurs Compétences */
    --accent-red: #C0392B; --accent-orange: #E67E22; --accent-yellow: #F1C40F; --accent-green: #2ECC71; --accent-cyan: #28D7C7;
    /* Couleurs Timeline */
    --cat-formation: #3498DB; --cat-project: #E67E22; --cat-stage: #F1C40F; --cat-alternance: #22C55E;
    --font-main: 'Montserrat', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-main); background-color: var(--bg-dark); color: var(--text-light); overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

#welcome-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: 9999; display: flex; justify-content: center; align-items: center; transition: opacity 1s ease; }
.loader-line { width: 0; height: 2px; background: white; animation: loadLine 2s forwards; }
@keyframes loadLine { to { width: 100%; } }

/* HEADER */
header { position: fixed; top: 0; width: 100%; padding: 25px 60px; display: flex; justify-content: space-between; align-items: center; background: rgba(18, 18, 18, 0.98); backdrop-filter: blur(10px); z-index: 100; border-bottom: 1px solid #333; }
.logo { font-weight: 900; font-size: 1.8rem; cursor: pointer; transition: transform 0.3s; letter-spacing: 1px; }
.logo:hover { color: var(--accent-orange); }
.nav-links { display: flex; gap: 40px; } 
.nav-links a { font-size: 1.05rem; font-weight: 500; text-transform: uppercase; }
.nav-links a:hover { color: var(--accent-orange); }

/* HERO */
.hero-section { height: 85vh; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-top: 80px;}
.hero-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.4; z-index: -1; }

.hero-overlay.pixel-box {
    position: relative; z-index: 10;
    background: rgba(15, 23, 42, 0.9);
    border: 4px solid #fff;
    padding: 40px 60px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 15px 0 rgba(0,0,0,0.5);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.hero-overlay.pixel-box h1 {
    color: #ffffff; font-family: 'Courier New', Courier, monospace;
    font-weight: 800; text-transform: uppercase; margin-bottom: 20px;
    text-shadow: 3px 3px 0 #000; font-size: 2.8rem; letter-spacing: 3px; line-height: 1.2;
}
.hero-desc {
    color: #ddd; font-size: 1.2rem; line-height: 1.6;
    margin-bottom: 25px; max-width: 700px;
    font-family: var(--font-main); font-weight: 400;
}
.hero-sub {
    color: #38bdf8; font-family: 'Courier New', Courier, monospace;
    font-weight: 700; font-size: 1rem; text-shadow: 1px 1px 0 #000; letter-spacing: 1px; text-transform: uppercase;
}

/* MARQUEE */
.marquee { background: var(--bg-light); color: #1a1a1a; padding: 20px 0; overflow: hidden; white-space: nowrap; border-top: 1px solid #333; border-bottom: 1px solid #333; }
.marquee-content { display: inline-block; animation: scrollLeft 40s linear infinite; font-weight: 600; font-size: 1.1rem; }
.keyword-item { display: inline-block; margin: 0 30px; cursor: pointer; transition: all 0.3s ease; }
.keyword-item:hover { color: var(--accent-orange); transform: scale(1.1); }
@keyframes scrollLeft { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* SECTIONS */
section { padding: 90px 8%; position: relative; border-bottom: 1px solid #222; box-sizing: border-box; }
h2.section-title { font-size: 2.5rem; margin-bottom: 50px; text-transform: uppercase; border-left: 5px solid white; padding-left: 20px; }

/* QUI JE SUIS */
.about-container { display: flex; align-items: stretch; gap: 50px; justify-content: space-between; max-width: 1200px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.about-text-wrapper { flex: 1 1 500px; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.about-text { text-align: justify; line-height: 1.8; color: #ddd; border-left: 2px solid rgba(255, 255, 255, 0.1); padding-left: 30px; }
.about-visual { flex: 0 0 350px; max-width: 380px; width: 100%; box-sizing: border-box; }
.profile-card { background: #1e1e1e; border: 1px solid #333; border-radius: 10px; width: 100%; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.3); box-sizing: border-box; }
.card-header { background: #181818; padding: 10px 20px; border-bottom: 1px solid #333; font-size: 0.8rem; color: #888; text-transform: uppercase; }
.status-dot { width: 8px; height: 8px; background-color: var(--accent-green); border-radius: 50%; box-shadow: 0 0 5px var(--accent-green); display:inline-block; margin-right:5px; }
.card-image { width: 100%; height: 300px; overflow: hidden; } 
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-info { padding: 25px; text-align: center; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 20px; text-align: left; }
.info-item { display: flex; align-items: center; gap: 10px; color: #ccc; font-size: 0.85rem; }
.tech-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tech-tag { background: rgba(255,255,255,0.05); border: 1px solid #333; padding: 4px 10px; border-radius: 4px; font-size: 0.75rem; color: #aaa; font-family: monospace; }

/* TIMELINE */
#parcours { background-color: var(--bg-light); color: #1F2937; border-top: 1px solid #E5E7EB; border-bottom: 1px solid #E5E7EB; }
#parcours .section-title { border-left-color: #1F2937; color: #111; }
.scroll-hint { text-align: center; color: #6B7280; font-style: italic; font-size: 0.9rem; margin-bottom: 25px; }
.timeline-legend { display: flex; justify-content: center; gap: 25px; margin-bottom: 50px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: #4B5563; font-weight: 700; text-transform: uppercase; }
.legend-icon { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: white; border: 2px solid #ccc; font-size: 0.8rem; color: #ccc; }

.legend-item.type-formation .legend-icon { border-color: var(--cat-formation); color: var(--cat-formation); }
.legend-item.type-project .legend-icon { border-color: var(--cat-project); color: var(--cat-project); }
.legend-item.type-stage .legend-icon { border-color: var(--cat-stage); color: var(--cat-stage); }
.legend-item.type-alternance .legend-icon { border-color: var(--cat-alternance); color: var(--cat-alternance); }

.timeline-container-outer { position: relative; display: flex; align-items: center; justify-content: center; max-width: 1250px; margin: 0 auto; width: 100%; box-sizing: border-box; gap: 15px; }
.scroll-btn { width: 48px; height: 48px; border-radius: 50%; border: none; background-color: #1F2937; color: #FFFFFF; display: flex; align-items: center; justify-content: center; flex-shrink: 0; z-index: 20; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.15); transition: all 0.3s; }
.scroll-btn:hover { background-color: var(--accent-orange); transform: translateY(-2px); }
.scroll-btn.left { margin-right: 0; } .scroll-btn.right { margin-left: 0; }

.timeline-wrapper { flex: 1; min-width: 0; width: 100%; overflow-x: auto; padding: 25px 0; scrollbar-width: none; scroll-behavior: smooth; }
.timeline-wrapper::-webkit-scrollbar { display: none; }
.timeline { display: flex; gap: 90px; min-width: max-content; padding: 0 90px; position: relative; align-items: stretch; min-height: 300px; }
#parcours .timeline::before { content: ''; position: absolute; top: 50%; transform: translateY(-50%); left: 50px; right: 50px; height: 4px; background: var(--line-color); z-index: 0; }

.time-point { position: relative; width: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.3s; z-index: 1; }
.time-point:hover { transform: scale(1.05); }
#parcours .date { flex: 1; display: flex; align-items: flex-end; padding-bottom: 20px; font-weight: 800; font-size: 0.95rem; text-transform: uppercase; text-align: center; color: #555; }
#parcours .label { flex: 1; display: flex; align-items: flex-start; padding-top: 20px; font-size: 0.9rem; color: #1F2937; font-weight: 600; text-align: center; }
#parcours .tp-dot { flex: 0 0 auto; margin: 0; width: 40px; height: 40px; background: #FFFFFF; border-style: solid; border-width: 2px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; position: relative; transition: all 0.3s; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.time-point.type-formation .tp-dot { border-color: var(--cat-formation); color: var(--cat-formation); }
.time-point.type-formation:hover .tp-dot { background: var(--cat-formation); color: #fff; }
.time-point.type-project .tp-dot { border-color: var(--cat-project); color: var(--cat-project); }
.time-point.type-project:hover .tp-dot { background: var(--cat-project); color: #fff; }
.time-point.type-stage .tp-dot { border-color: var(--cat-stage); color: var(--cat-stage); }
.time-point.type-stage:hover .tp-dot { background: var(--cat-stage); color: #fff; }
.time-point.type-alternance .tp-dot { border-color: var(--cat-alternance); color: var(--cat-alternance); }
.time-point.type-alternance:hover .tp-dot { background: var(--cat-alternance); color: #fff; }

/* Switch Mode */
.mode-switch-container { display: flex; justify-content: center; gap: 20px; margin-bottom: 50px; }
.switch-btn { padding: 12px 30px; background: transparent; border: 2px solid #333; color: #888; border-radius: 30px; cursor: pointer; font-weight: 600; text-transform: uppercase; transition: 0.3s; font-size: 0.9rem; }
.switch-btn:hover { border-color: #555; color: white; }
.switch-btn.active { background: white; color: #000; border-color: white; }
.hidden-mode { display: none !important; }
.fade-out-anim { opacity: 0; transition: opacity 0.3s ease; }
.fade-in-anim { opacity: 0; animation: fadeInMode 0.3s forwards; }
@keyframes fadeInMode { to { opacity: 1; } }

/* Compétences */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 1200px; margin: 0 auto; transition: opacity 0.3s ease; }
.skill-card { background: linear-gradient(145deg, #1e1e1e, #161616); padding: 40px 30px; border-radius: 8px; border-top: 4px solid var(--comp-color); display: flex; flex-direction: column; align-items: center; transition: transform 0.3s; }
.skill-card:hover { transform: translateY(-5px); }
.card-header-icon { font-size: 2rem; color: var(--comp-color); margin-bottom: 15px; }
.skill-card h3 { font-size: 1.8rem; margin-bottom: 10px; text-transform: uppercase; }
.skill-desc { margin-bottom: 20px; color: #aaa; text-align: center; font-size: 0.9rem; }
.skill-levels-list { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: auto; }
.lvl-list-btn { display: flex; align-items: center; background: rgba(255,255,255,0.05); border: 1px solid #333; border-radius: 8px; padding: 12px; cursor: pointer; transition: all 0.3s; text-align: left; color: #f5f5f5; width: 100%; }
.lvl-list-btn:hover { background: var(--comp-color); color: white; transform: translateX(5px); border-color: var(--comp-color); }
.lvl-badge { font-weight: 800; background: rgba(0,0,0,0.3); padding: 2px 8px; border-radius: 4px; margin-right: 10px; font-size: 0.8rem; min-width: 70px; text-align: center;}
.lvl-text { font-size: 0.85rem; flex: 1; font-weight: 500; }
.lvl-list-btn.disabled { opacity: 0.4; cursor: not-allowed; }
.pro-skill-item { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.pro-detail { font-size: 0.85rem; color: #ccc; background: rgba(0,0,0,0.2); padding: 8px 12px; border-radius: 4px; border-left: 2px solid var(--comp-color); }
.pro-link { display: inline-block; margin-top: 10px; font-size: 0.8rem; font-weight: bold; color: var(--comp-color); text-transform: uppercase; transition: 0.3s; }
.pro-link:hover { color: white; text-decoration: underline; }

/* =========================================
   SECTION MES PROJETS (PORTFOLIO PRINCIPAL)
   ========================================= */
#projets { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 80px 20px; 
    box-sizing: border-box; 
}

.section-header-wrapper { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 35px; 
    border-bottom: 2px solid rgba(255, 255, 255, 0.08); 
    padding-bottom: 15px; 
}
.projects-intro { color: #aaa; font-size: 1rem; margin-bottom: 40px; max-width: 800px; line-height: 1.6; }

.projects-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); 
    gap: 28px; 
    width: 100%; 
    box-sizing: border-box; 
    transition: opacity 0.3s ease; 
}

.project-card { 
    background: #12161f; 
    border: 1px solid #232a36; 
    border-radius: 12px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    box-sizing: border-box; 
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); 
    position: relative; 
}

.project-card:hover { 
    transform: translateY(-6px); 
    border-color: #38bdf8; 
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 16px rgba(56, 189, 248, 0.15); 
}

/* Zone Image Contrôlée (Hauteur fixe, Recadrage net, Overlay sombre) */
.project-img-wrapper { 
    width: 100%; 
    height: 185px; 
    min-height: 185px; 
    max-height: 185px; 
    overflow: hidden; 
    position: relative; 
    background: #090c10; 
    border-bottom: 1px solid #232a36; 
    flex-shrink: 0; 
}

.project-img-wrapper::after { 
    content: ''; 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(180deg, rgba(9, 12, 16, 0.05) 0%, rgba(9, 12, 16, 0.5) 100%); 
    pointer-events: none; 
    transition: opacity 0.3s ease; 
}

.project-card:hover .project-img-wrapper::after { 
    opacity: 0.15; 
}

.project-img-wrapper img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center; 
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1); 
    display: block; 
}

.project-card:hover .project-img-wrapper img { 
    transform: scale(1.06); 
}

/* Contenu Texte dans une zone équilibrée */
.project-content { 
    padding: 22px 24px; 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    box-sizing: border-box; 
    background: #12161f; 
}

.badges-container { 
    margin-bottom: 10px; 
    display: flex; 
    flex-wrap: wrap; 
    gap: 6px; 
    min-height: 28px; 
    align-items: center; 
}

.badge-univ { 
    display: inline-block; 
    padding: 3px 9px; 
    background: rgba(255, 255, 255, 0.04); 
    border-radius: 4px; 
    font-size: 0.76rem; 
    font-weight: 700; 
    color: #fff; 
    border: 1px solid transparent; 
    letter-spacing: 0.3px; 
    text-transform: uppercase; 
}

.badge-tech { 
    display: inline-block; 
    padding: 3px 8px; 
    background: rgba(56, 189, 248, 0.1); 
    border-radius: 4px; 
    font-size: 0.74rem; 
    color: #38bdf8; 
    border: 1px solid rgba(56, 189, 248, 0.25); 
    font-weight: 600; 
}

.project-title { 
    font-size: 1.15rem; 
    font-weight: 700; 
    color: #f8fafc; 
    margin: 0 0 8px 0; 
    line-height: 1.35; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
    min-height: 2.7em; 
}

.project-desc { 
    font-size: 0.88rem; 
    color: #94a3b8; 
    margin: 0 0 16px 0; 
    flex: 1; 
    line-height: 1.48; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
    min-height: 2.9em; 
}

.btn-view-project { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 6px; 
    margin-top: auto; 
    padding: 8px 16px; 
    background: rgba(56, 189, 248, 0.08); 
    border-radius: 6px; 
    font-size: 0.8rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    transition: all 0.25s ease; 
    text-decoration: none; 
    border: 1px solid rgba(56, 189, 248, 0.4); 
    color: #38bdf8 !important; 
    align-self: flex-start; 
}

.btn-view-project:hover { 
    background: #38bdf8 !important; 
    color: #090d12 !important; 
    border-color: #38bdf8 !important; 
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35); 
    transform: translateY(-2px); 
}

#reset-filter-btn { background: transparent; border: 1px solid var(--accent-orange); color: var(--accent-orange); padding: 8px 16px; border-radius: 20px; cursor: pointer; opacity: 0; visibility: hidden; transition: 0.3s; }
#reset-filter-btn.visible { opacity: 1; visibility: visible; }

.contact-section { text-align: center; background: #1a1a1a; padding: 100px 0; }
.contact-icons { display: flex; justify-content: center; gap: 40px; margin-top: 40px; }
.icon-link { display: flex; flex-direction: column; align-items: center; gap: 10px; transition: 0.3s; opacity: 0.7; }
.icon-link:hover { opacity: 1; transform: translateY(-5px); color: var(--accent-orange); }
.highlight-cv:hover { color: #2ECC71; }
.icon { font-size: 2.5rem; }
footer { text-align: center; padding: 20px; opacity: 0.5; font-size: 0.8rem; }

.timeline-modal-content { background: #1e1e1e; border-top-width: 6px; border-top-style: solid; color: #f5f5f5; padding: 0; overflow: hidden; max-width: 500px; border-radius: 8px; }
.modal-header { padding: 25px 30px 10px 30px; }
.modal-date { font-weight: bold; text-transform: uppercase; }
.modal-header h3 { margin-top: 5px; font-size: 1.5rem; color: #fff; }
.modal-body { padding: 10px 30px 20px 30px; color: #ccc; line-height: 1.6; }
.modal-footer { padding: 20px 30px; background: rgba(0,0,0,0.2); text-align: right; }
.btn-project { display: inline-block; padding: 10px 25px; background: #fff; color: #000; font-weight: bold; border-radius: 4px; transition: 0.3s; cursor:pointer; }
.btn-project:hover { transform: translateY(-2px); }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 1000; display: none; justify-content: center; align-items: center; }
.modal-overlay.active { display: flex; }
.modal-content { background: #1e1e1e; padding: 40px; border-radius: 10px; max-width: 500px; width: 90%; position: relative; border: 1px solid #333; }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 1.5rem; cursor: pointer; }

.scroll-reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.scroll-reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1024px) {
    .about-container { flex-direction: column; align-items: center; gap: 40px; }
    .about-visual { width: 100%; max-width: 400px; }
    .about-text { padding-left: 15px; }
    .timeline { padding: 0 60px; gap: 70px; }
}

@media (max-width: 768px) {
    .about-container, .skills-grid { flex-direction: column; grid-template-columns: 1fr; align-items: center; }
    .nav-links, .scroll-btn { display: none; } 
    .about-visual { width: 100%; max-width: 400px; }
    .projects-grid { grid-template-columns: 1fr; }
}

/* =========================================
   TUTORIEL D'ACCUEIL (OPTIMISÉ VIDÉOPROJECTEUR & STRUCTURE CLAIRE)
   ========================================= */
#guide-btn { position: fixed; bottom: 30px; right: 30px; width: 55px; height: 55px; border-radius: 50%; background: #1a1a1a; border: 2px solid #444; color: #fff; font-size: 1.6rem; cursor: pointer; z-index: 900; transition: 0.3s; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
#guide-btn:hover { background: var(--accent-cyan); color: #000; border-color: var(--accent-cyan); transform: translateY(-3px); }

#tutorial-modal-new { z-index: 3000; }

.tutorial-modal-content { 
    width: 92vw; 
    max-width: 1100px; 
    height: 85vh; 
    max-height: 820px; 
    padding: 0; 
    display: flex; 
    flex-direction: column; 
    background: #121212; 
    border: 1px solid #333; 
    border-radius: 12px; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.tutorial-header { padding: 25px 40px; background: #0a0a0a; border-bottom: 1px solid #222; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;}
.tutorial-header h3 { font-size: 1.4rem; color: #fff; margin: 0; font-weight: 700;}
.close-modal { font-size: 2rem; color: #888; transition: 0.3s; }
.close-modal:hover { color: #fff; }

.tutorial-body { padding: 40px 60px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; }

.tutorial-step { display: none; flex-direction: column; align-items: flex-start; gap: 20px; animation: fadeInTut 0.4s ease forwards; width: 100%; }
.tutorial-step.active { display: flex; }
@keyframes fadeInTut { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* Typographie Agrandie */
.tut-icon { font-size: 3.5rem; margin-bottom: 10px; align-self: center; }
.tutorial-step h4 { font-size: 28px; color: #fff; text-align: center; width: 100%; margin-bottom: 10px; font-weight: 800;}
.tutorial-step p { font-size: 18px; color: #e5e7eb; line-height: 1.7; width: 100%; text-align: left; }
.tut-list { list-style: none; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 15px; margin-top: 10px;}
.tut-list li { font-size: 18px; color: #e5e7eb; line-height: 1.6; padding-left: 20px; position: relative; }
.tut-list li::before { content: '•'; position: absolute; left: 0; color: #60A5FA; font-weight: bold; }
.tut-list strong { color: #fff; }

/* Légende des couleurs */
.color-legend-box { background: #0f1215; border: 1px solid #222; padding: 25px; border-radius: 8px; width: 100%; margin-top: 10px; }
.color-category { font-size: 14px; text-transform: uppercase; color: #888; font-weight: 700; margin-bottom: 12px; letter-spacing: 1px; border-bottom: 1px solid #222; padding-bottom: 5px;}
.color-item { display: flex; align-items: center; gap: 15px; font-size: 17px; color: #ccc; margin-bottom: 12px; }
.color-item strong { color: #fff; min-width: 160px; }
.color-dot { width: 22px; height: 22px; border-radius: 4px; flex-shrink: 0; }

.tut-info-box { background: rgba(59, 130, 246, 0.1); border-left: 4px solid #3b82f6; padding: 20px; font-size: 17px; color: #bfdbfe; line-height: 1.6; border-radius: 0 8px 8px 0; margin-top: 20px; width: 100%; display: flex; gap: 15px; align-items: flex-start;}
.tut-info-box i { font-size: 1.5rem; color: #3b82f6; margin-top: 2px;}

.tutorial-footer { padding: 25px 40px; background: #0a0a0a; border-top: 1px solid #222; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;}
.btn-tut { padding: 12px 25px; background: transparent; border: 1px solid #555; color: #ccc; border-radius: 30px; cursor: pointer; transition: 0.3s; font-weight: 700; font-size: 16px; }
.btn-tut:hover { background: #fff; color: #000; border-color: #fff; }
#btn-tut-next, #btn-tut-end { background: #fff; color: #000; border-color: #fff; }
#btn-tut-next:hover, #btn-tut-end:hover { background: #ddd; }
.btn-tut.hidden { display: none; }
.tut-dots { display: flex; gap: 10px; }
.tut-dot { width: 10px; height: 10px; border-radius: 50%; background: #444; transition: 0.3s; }
.tut-dot.active { background: #fff; transform: scale(1.3); }

/* =========================================
   VRAIE ARBORESCENCE DU SITE (PRÉSENTATION SOUTENANCE)
   ========================================= */
.site-tree-container {
    width: 100%;
    background: #090c10;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: inset 0 0 25px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    margin-top: 4px;
}

/* Niveau 1 : Racine */
.tree-level-root {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100%;
}
.tree-box-root {
    background: #161b22;
    border: 1px solid #38bdf8;
    color: #fff;
    font-weight: 800;
    font-size: 13.5px;
    padding: 5px 18px;
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
}
.tree-stem-down {
    width: 2px;
    height: 10px;
    background: #4b5563;
}

/* Niveau 2 : Grandes Rubriques */
.tree-level-sections {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}
.tree-rail-h {
    width: 82%;
    height: 2px;
    background: #4b5563;
    position: relative;
}
.tree-sections-row {
    display: flex;
    justify-content: space-between;
    width: 90%;
    margin-top: 6px;
}
.sec-node {
    background: #111;
    border: 1px solid #333;
    color: #aaa;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
}
.sec-node::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    width: 2px;
    height: 8px;
    background: #4b5563;
    transform: translateX(-50%);
}
.sec-active {
    color: #fff;
    border-color: #555;
    background: #1a202c;
}

/* Niveau 3 : Branches & Sous-Pages */
.tree-level-branches {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: stretch;
    gap: 7px;
    position: relative;
}
.tree-branch {
    flex: 1;
    background: rgba(18, 24, 32, 0.7);
    border: 1px solid #222;
    border-radius: 6px;
    padding: 7px 9px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}
.branch-context { flex: 1.1; border-top: 3px solid #a855f7; }
.branch-skills { flex: 1.25; border-top: 3px solid #3b82f6; }
.branch-projects { flex: 2.1; border-top: 3px solid #0ea5e9; }

.branch-header {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 3px;
}
.branch-nodes {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Sous-nœuds */
.sub-node {
    background: #0d1117;
    border: 1px solid #21262d;
    padding: 3.5px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
}
.sub-node:hover {
    background: #161b22;
    border-color: #4b5563;
    transform: translateY(-1px);
}

.node-context {
    border-left: 3px solid #a855f7;
}
.node-context i { color: #c084fc; font-size: 0.8rem; }

.node-c { border-left: 3px solid #C0392B; justify-content: space-between; }
.node-v { border-left: 3px solid #E67E22; justify-content: space-between; }
.node-m { border-left: 3px solid #F1C40F; justify-content: space-between; }
.node-i { border-left: 3px solid #2ECC71; justify-content: space-between; }

.badge-c, .badge-v, .badge-m, .badge-i {
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 700;
}
.badge-c { background: rgba(192, 57, 43, 0.3); color: #f87171; }
.badge-v { background: rgba(230, 126, 34, 0.3); color: #fb923c; }
.badge-m { background: rgba(241, 196, 15, 0.3); color: #fde047; }
.badge-i { background: rgba(46, 204, 113, 0.3); color: #4ade80; }

.node-levels {
    font-size: 10px;
    color: #94a3b8;
}

/* Grille 2 colonnes des projets dans l'arborescence */
.tree-projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}
.node-p {
    border-left: 3px solid #0ea5e9;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 3.5px 5px;
}
.span-full {
    grid-column: span 2;
}

/* Connecteur central */
.tree-cross-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0 1px;
}
.cross-pill {
    background: #1e293b;
    border: 1px solid #38bdf8;
    color: #38bdf8;
    padding: 3px 6px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}
.cross-arrows {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
}
.c-arr-right { color: #4ade80; white-space: nowrap; }
.c-arr-left { color: #38bdf8; white-space: nowrap; }

/* Bandeau légende en bas */
.tree-legend-strip {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    width: 100%;
    margin-top: 8px;
}
.legend-card {
    background: #11161d;
    border: 1px solid #222;
    border-radius: 5px;
    padding: 5px 8px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 10.5px;
    line-height: 1.3;
    color: #94a3b8;
}
.legend-card strong { color: #f1f5f9; }

/* Responsive Mobile */
@media (max-width: 768px) {
    .tutorial-modal-content { width: 96vw; height: 92vh; }
    .tutorial-body { padding: 20px 12px; }
    .tutorial-step h4 { font-size: 18px; }
    .tutorial-step p, .tut-list li, .color-item { font-size: 13.5px; }
    
    .tree-sections-row { flex-direction: column; align-items: center; gap: 4px; }
    .tree-rail-h, .sec-node::before, .tree-stem-down { display: none; }
    
    .tree-level-branches { flex-direction: column; height: auto; gap: 10px; }
    .tree-branch { width: 100%; min-width: unset; }
    .tree-projects-grid { grid-template-columns: 1fr; }
    .tree-cross-connector { display: none; }
    .tree-legend-strip { grid-template-columns: 1fr; }
}

/* =========================================
   MICRO-FONDS ANIMÉS DISCRETS DES SECTIONS
   ========================================= */

/* 1. SECTION QUI JE SUIS */
#qui-je-suis {
    background-color: #0b0f17;
    position: relative;
    overflow: hidden;
}
#qui-je-suis::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(90deg, rgba(14, 165, 233, 0.025) 1px, transparent 1px),
        linear-gradient(rgba(14, 165, 233, 0.025) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}
#qui-je-suis::after {
    content: '';
    position: absolute;
    top: -20%; right: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: slowPulseCyan 22s ease-in-out infinite alternate;
}
#qui-je-suis > * {
    position: relative;
    z-index: 1;
}

/* 2. SECTION PARCOURS */
#parcours {
    position: relative;
    overflow: hidden;
}
#parcours::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.018) 1px, transparent 1px);
    background-size: 100% 32px;
    pointer-events: none;
    z-index: 0;
}
#parcours::after {
    content: '';
    position: absolute;
    top: 50%; left: -20%;
    width: 140%; height: 250px;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.035) 0%, transparent 70%);
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 0;
    animation: slowProgressLine 28s ease-in-out infinite alternate;
}
#parcours > * {
    position: relative;
    z-index: 1;
}

/* 3. SECTION COMPÉTENCES */
#competences {
    background-color: #0d111a;
    position: relative;
    overflow: hidden;
}
#competences::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(circle at 10% 15%, rgba(192, 57, 43, 0.035) 0%, transparent 45%),
        radial-gradient(circle at 90% 15%, rgba(230, 126, 34, 0.035) 0%, transparent 45%),
        radial-gradient(circle at 15% 85%, rgba(241, 196, 15, 0.03) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(46, 204, 113, 0.035) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
    animation: slowCompGlow 25s ease-in-out infinite alternate;
}
#competences > * {
    position: relative;
    z-index: 1;
}

/* 4. SECTION PROJETS */
#projets {
    background-color: #0b0e17;
    position: relative;
    overflow: hidden;
}
#projets::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(56, 189, 248, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}
#projets::after {
    content: '';
    position: absolute;
    left: 0; right: 0; top: -100px;
    height: 120px;
    background: linear-gradient(180deg, transparent 0%, rgba(14, 165, 233, 0.03) 50%, transparent 100%);
    pointer-events: none;
    z-index: 0;
    animation: slowScanline 20s linear infinite;
}
#projets > * {
    position: relative;
    z-index: 1;
}

/* 5. SECTION CONTACT */
#contact {
    background-color: #090c14;
    position: relative;
    overflow: hidden;
}
#contact::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 650px; height: 350px;
    background: radial-gradient(ellipse at center, rgba(14, 165, 233, 0.06) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    animation: slowPulseCyan 18s ease-in-out infinite alternate;
}
#contact > * {
    position: relative;
    z-index: 1;
}

/* KEYFRAMES AMBIANTS LENTS & SUBTILS */
@keyframes slowPulseCyan {
    0% { transform: scale(0.95); opacity: 0.7; }
    100% { transform: scale(1.1); opacity: 1.0; }
}

@keyframes slowProgressLine {
    0% { transform: translateY(-50%) translateX(-10%); }
    100% { transform: translateY(-50%) translateX(10%); }
}

@keyframes slowCompGlow {
    0% { transform: scale(0.98); opacity: 0.75; }
    100% { transform: scale(1.04); opacity: 1.0; }
}

@keyframes slowScanline {
    0% { transform: translateY(0); opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { transform: translateY(1200px); opacity: 0; }
}

/* ACCESSIBILITÉ PREFERS-REDUCED-MOTION */
@media (prefers-reduced-motion: reduce) {
    #qui-je-suis::after,
    #parcours::after,
    #competences::before,
    #projets::after,
    #contact::before,
    .marquee-content {
        animation: none !important;
        transform: none !important;
    }
}