/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg: #f5f5f7; --surface: #ffffff; --text: #1d1d1f; --text-soft: #6e6e73;
    --accent: #0071e3; --success: #27c93f; --warning: #ffcc00;
    --border: #e5e5e5; --shadow: 0 10px 30px rgba(0,0,0,0.08); --line-color: #d1d1d6;
    --hero-bg: url('https://images.unsplash.com/photo-1510915361894-db8b60106cb1?q=80&w=2070&auto=format&fit=crop');
}
[data-theme="dark"] {
    --bg: #0d1117; --surface: #161b22; --text: #f0f6fc; --text-soft: #8b949e;
    --accent: #58a6ff; --border: #30363d; --shadow: 0 10px 30px rgba(0,0,0,0.5); --line-color: #30363d;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); transition: background 0.3s, color 0.3s; line-height: 1.6; overflow-x: hidden; }

/* NAV */
.apple-nav { position: fixed; top: 0; left: 0; width: 100%; height: 60px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); z-index: 9999; border-bottom: 1px solid rgba(0,0,0,0.1); display: flex; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
[data-theme="dark"] .apple-nav { background: rgba(13, 17, 23, 0.95); border-bottom: 1px solid var(--border); }
.nav-container { width: 100%; max-width: 1200px; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }
.nav-logo { font-weight: 800; font-size: 1.1rem; color: var(--text); text-decoration: none; white-space: nowrap; z-index: 2; }
.dot { color: var(--accent); }
.nav-menu { display: flex; align-items: center; }
.nav-link { text-decoration: none; color: var(--text-soft); margin: 0 10px; font-weight: 500; font-size: 0.9rem; transition: 0.3s; white-space: nowrap; }
.nav-link:hover, .nav-link.highlight { color: var(--accent); }
.nav-tools { display: flex; align-items: center; gap: 10px; z-index: 2; }
.tool-btn { background: none; border: none; color: var(--text); cursor: pointer; font-size: 1.1rem; transition: 0.3s; padding: 5px; }
.tool-btn:hover { color: var(--accent); }
.btn-cv-nav { background: var(--accent); color: white; padding: 6px 12px; border-radius: 20px; font-weight: 600; font-size: 0.8rem; text-decoration: none; display: flex; align-items: center; gap: 5px; transition: 0.3s; white-space: nowrap; }
.btn-cv-nav:hover { transform: translateY(-2px); }
@media (max-width: 900px) { .nav-menu { display: none; } .nav-container { justify-content: space-between; } }

/* HERO */
.hero-section { position: relative; height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; background-image: var(--hero-bg); background-size: cover; background-position: center; background-attachment: fixed; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.85); backdrop-filter: blur(3px); }
[data-theme="dark"] .hero-overlay { background: rgba(13, 17, 23, 0.85); }
.hero-content { position: relative; z-index: 2; max-width: 800px; padding: 20px; }
h1 { font-size: 4rem; margin: 20px 0; line-height: 1.1; letter-spacing: -2px; }
.gradient-text { background: linear-gradient(135deg, var(--accent), #9b51e0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.status-pill { display: inline-block; background: rgba(39, 201, 63, 0.1); color: #27c93f; border: 1px solid #27c93f; padding: 6px 16px; border-radius: 50px; font-weight: 700; font-size: 0.85rem; margin-bottom: 20px; }
.btn { padding: 14px 30px; border-radius: 99px; text-decoration: none; font-weight: 600; display: inline-flex; gap: 10px; align-items: center; transition: 0.3s; border: none; cursor: pointer; }
.btn-primary { background: var(--accent); color: white; box-shadow: 0 5px 20px rgba(0, 113, 227, 0.3); }
.btn-sm { padding: 8px 20px; font-size: 0.85rem; }
.btn-glass { background: rgba(255,255,255,0.5); border: 1px solid rgba(0,0,0,0.1); color: var(--text); backdrop-filter: blur(10px); }
.btn:hover { transform: translateY(-3px); }

/* SECTIONS & FULL PAGE */
.section-wrapper { padding: 100px 0; }
.full-page-section { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 20px; }

.bg-alt { background: rgba(0,0,0,0.03); } [data-theme="dark"] .bg-alt { background: rgba(255,255,255,0.02); }
.bg-dark { background: #0d1117; border-top: 1px solid var(--border); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section-title { font-size: 2.5rem; margin-bottom: 50px; text-align: center; }
.center-text { text-align: center; }
.scroll-reveal, .animate-up { opacity: 0; transform: translateY(30px); transition: all 0.6s ease; }
.scroll-reveal.active, .animate-up.active { opacity: 1; transform: translateY(0); }

/* ABOUT & STACK */
.grid-50-50 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.lead-text { font-size: 1.1rem; line-height: 1.6; color: var(--text-soft); }
.stats-row { display: flex; gap: 40px; margin-top: 30px; }
.stat-num { font-size: 2.5rem; font-weight: 800; color: var(--accent); display: block; margin-bottom: 5px; }
.code-block { background: #1e1e1e; padding: 25px; border-radius: 12px; font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; color: #d4d4d4; box-shadow: 0 20px 50px rgba(0,0,0,0.2); transform: rotate(2deg); border: 1px solid rgba(255,255,255,0.1); }
.code-header span { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.red { background: #ff5f56; } .yellow { background: #ffbd2e; } .green { background: #27c93f; }
.kwd { color: #c678dd; } .str { color: #98c379; } .cls { color: #e5c07b; } .fnc { color: #61afef; } .bool { color: #d19a66; }

.tech-grid { display: flex; flex-wrap: wrap; gap: 30px; justify-content: center; }
.tech-item { display: flex; flex-direction: column; align-items: center; width: 110px; text-align: center; }
.tech-item i { font-size: 3rem; margin-bottom: 10px; transition: 0.3s; }
.tech-item:hover i { transform: translateY(-5px); }
.tech-item span { font-weight: 500; font-size: 0.85rem; line-height: 1.2; }

/* Couleurs Icones */
.win-color { color: #0078d4; } .vmware-color { color: #607078; } .proxmox-color { color: #e57000; }
.storm-color { color: #0099cc; } .watchguard-color { color: #d4222a; } .cisco-color { color: #1ba0d7; } .aruba-color { color: #ff8300; } .trend-color { color: #d71920; }
.notion-color { color: #000; } .agile-color { color: #ff9900; } .visio-color { color: #3955a3; } .glpi-color { color: #005a8c; } .azure-color { color: #0089d6; }
[data-theme="dark"] .notion-color { color: #fff; }

/* FIX DARK MODE POUR LOGOS NOIRS */
.pfsense-color { color: #212121; } .icon-dark-adapt { color: #000000; }
[data-theme="dark"] .pfsense-color { color: #ffffff; text-shadow: 0 0 10px rgba(255,255,255,0.5); }
[data-theme="dark"] .icon-dark-adapt { color: #ffffff !important; }
[data-theme="dark"] .tech-item i { filter: drop-shadow(0 0 5px rgba(255,255,255,0.2)); }

/* TIMELINE CENTRÉE */
.timeline-centered { position: relative; max-width: 1000px; margin: 0 auto; padding: 20px 0; }
.timeline-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; background: var(--border); transform: translateX(-50%); border-radius: 4px; overflow: hidden; }
.timeline-progress { position: absolute; top: 0; left: 0; width: 100%; height: 0%; background: var(--accent); box-shadow: 0 0 10px var(--accent); transition: height 0.1s linear; }
.tl-item { position: relative; width: 50%; padding: 0 40px; margin-bottom: 60px; box-sizing: border-box; }
.tl-item.left { left: 0; text-align: right; } .tl-item.right { left: 50%; text-align: left; }
.tl-dot { position: absolute; top: 20px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 4px solid var(--border); z-index: 2; transition: 0.3s; }
.tl-item.left .tl-dot { right: -10px; } .tl-item.right .tl-dot { left: -10px; }
.tl-item.active .tl-dot { border-color: var(--accent); background: var(--accent); }
.tl-content-box { background: var(--surface); padding: 25px; border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--border); position: relative; transition: 0.3s; }
.tl-content-box:hover { transform: translateY(-5px); border-color: var(--accent); }
.tl-date { display: block; font-size: 0.85rem; font-weight: 800; color: var(--accent); margin-bottom: 5px; text-transform: uppercase; }
.tl-content-box h3 { margin: 0 0 5px 0; font-size: 1.2rem; }
.tl-content-box p { font-size: 0.95rem; color: var(--text-soft); margin-top: 10px; line-height: 1.5; }
.tl-company { font-weight: 600; color: var(--text-soft); font-size: 0.9rem; text-transform: uppercase; margin-right: 5px; }

/* PROJETS & CERTIFS */
.projects-grid, .certs-grid-premium { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; margin-top: 40px; }
.project-card, .cert-card-premium { background: var(--surface); border-radius: 20px; border: 1px solid var(--border); box-shadow: var(--shadow); transition: 0.4s; overflow: hidden; display: flex; flex-direction: column; }
.project-card:hover, .cert-card-premium:hover { transform: translateY(-10px); }
.project-image { height: 200px; position: relative; overflow: hidden; }
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.project-card:hover .project-image img { transform: scale(1.05); }
.project-overlay-hover { position: absolute; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); display:flex; align-items:center; justify-content:center; opacity:0; transition:0.3s; }
.project-card:hover .project-overlay-hover { opacity:1; }
.project-content { padding: 25px; flex: 1; display: flex; flex-direction: column; }
.company-tag { background: rgba(0,0,0,0.05); padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; color: var(--text-soft); }
[data-theme="dark"] .company-tag { background: rgba(255,255,255,0.1); }
.project-type { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--accent); float: right; }
.project-excerpt { margin-bottom: 20px; flex: 1; color: var(--text-soft); }
.project-stack { border-top: 1px solid var(--border); padding-top: 15px; font-size: 1.5rem; color: var(--text-soft); display: flex; gap: 10px; }
.project-stack i:hover { color: var(--accent); }

/* CERTIFICATIONS */
.cert-card-premium { padding: 25px; flex-direction: row; align-items: center; gap: 20px; position: relative; }
.cert-card-premium::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); opacity: 0.5; }
.cert-card-premium:hover { border-color: var(--accent); }
.cert-badge-icon { width: 60px; height: 60px; background: rgba(0,0,0,0.05); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; flex-shrink: 0; }
.cert-details h3 { margin: 5px 0; font-size: 1.1rem; }
.cert-issuer { font-size: 0.8rem; text-transform: uppercase; color: var(--text-soft); letter-spacing: 1px; font-weight: 700; }
.cert-status { font-weight: 700; padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; margin-top: 5px; display: inline-block; }
.cert-status.valid { background: rgba(39, 201, 63, 0.1); color: #27c93f; } .cert-status.pending { background: rgba(255, 204, 0, 0.1); color: #e6b800; }

/* CONNECTEUR */
.section-connector { display: flex; flex-direction: column; align-items: center; margin: -40px 0; position: relative; z-index: 5; }
.connector-line { width: 2px; height: 30px; background: var(--border); }
.connector-badge { background: var(--surface); border: 1px solid var(--border); padding: 6px 16px; border-radius: 50px; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow); color: var(--text-soft); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; }

/* TERMINAL WIDGET */
.terminal-widget { position: fixed; bottom: 20px; right: 20px; width: 450px; height: 320px; background: #161b22; border-radius: 12px; z-index: 9999; border: 1px solid #30363d; box-shadow: 0 20px 50px rgba(0,0,0,0.6); display: flex; flex-direction: column; font-family: 'JetBrains Mono', monospace; overflow: hidden; transition: 0.3s; }
.terminal-widget.fullscreen { width: 90vw; height: 85vh; right: 5vw; bottom: 7.5vh; }
.terminal-header { padding: 12px 15px; background: #0d1117; cursor: pointer; display: flex; justify-content: space-between; border-bottom: 1px solid #30363d; }
.dots { display: flex; gap: 8px; align-items: center; }
.dots span { width: 14px; height: 14px; border-radius: 50%; display: inline-block; position: relative; cursor: pointer; }
.red { background: #ff5f56; border: 1px solid #e0443e; } .yellow { background: #ffbd2e; border: 1px solid #dea123; } .green { background: #27c93f; border: 1px solid #1aab29; }
.term-title { font-size: 0.85rem; color: #8b949e; margin-left: 10px; }
.terminal-content { padding: 15px; color: #c9d1d9; flex: 1; display: flex; flex-direction: column; overflow: hidden; background: #161b22; }
.terminal-widget.closed { height: 46px; width: 240px; }
.terminal-widget.closed .terminal-content { display: none; }
#terminal-output { flex: 1; overflow-y: auto; font-size: 0.9rem; }
.input-line { display: flex; gap: 8px; border-top: 1px solid #30363d; padding-top: 10px; }
#terminal-input { background: transparent; border: none; color: white; flex: 1; outline: none; font-family: inherit; }

/* FOOTER */
.white-text { color: white !important; }
.copyright { color: var(--text-soft); }
.footer-links a { color: white; font-size: 2.5rem; margin: 0 15px; transition: 0.3s; }
.footer-links a:hover { color: var(--accent); }
.big-btn { padding: 15px 40px; font-size: 1.2rem; }

@media (max-width: 768px) {
    .grid-50-50, .tl-header { flex-direction: column; align-items: flex-start; }
    .projects-grid, .certs-grid-premium { grid-template-columns: 1fr; }
    .timeline-line { left: 20px; }
    .tl-item { width: 100%; padding-left: 50px; padding-right: 0; }
    .tl-item.left, .tl-item.right { left: 0; text-align: left; }
    .tl-item.left .tl-dot, .tl-item.right .tl-dot { left: 11px; right: auto; }
    .tl-content-box::after { content: ''; position: absolute; top: 20px; left: -8px; width: 16px; height: 16px; background: var(--surface); transform: rotate(45deg); border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); }
    .terminal-widget { width: 95%; right: 2.5%; bottom: 10px; }
    h1 { font-size: 2.5rem; }
}

/* =========================================
   ACCESSIBILITÉ, MOBILE & PAGES DÉTAIL
   ========================================= */
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
html:not(.js) .scroll-reveal, html:not(.js) .animate-up { opacity: 1; transform: none; }
.veeam-color { color: #00b336; } .linkedin-color { color: #0a66c2; }
[data-theme="dark"] .linkedin-color { color: #58a6ff; }
.cursor { color: var(--accent); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.prompt { color: var(--success); }

/* Hero & sections de l'accueil */
.hero-section { height: auto; min-height: 100vh; min-height: 100svh; padding: 100px 0 60px; }
.hero-desc { font-size: 1.2rem; color: var(--text-soft); max-width: 60ch; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
[data-theme="dark"] .btn-glass { background: rgba(255,255,255,0.08); border-color: var(--border); }
@media (hover: none) { .hero-section { background-attachment: scroll; } }
.stat-label { color: var(--text-soft); font-size: 0.9rem; }
.stack-category { text-align: center; color: var(--text-soft); font-size: 1.1rem; margin: 0 0 24px; }
.project-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.project-card:focus-within .project-overlay-hover { opacity: 1; }
.code-block { overflow-x: auto; }

/* Menu mobile */
.nav-burger { display: none; }
@media (max-width: 900px) {
    .nav-burger { display: inline-block; }
    .nav-menu { position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 8px 20px 16px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
    .nav-menu.open { display: flex; }
    .nav-menu .nav-link { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 1rem; }
}
@media (max-width: 600px) { .nav-tools .linkedin-color { display: none; } }

/* Page HomeLab */
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(39,201,63,.5); } 70% { box-shadow: 0 0 0 8px rgba(39,201,63,0); } 100% { box-shadow: 0 0 0 0 rgba(39,201,63,0); } }
.lab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 50px; }
.lab-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.lab-card h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 1.2rem; }
.lab-card h3 i { color: var(--accent); }
.lab-specs { list-style: none; margin: 0; padding: 0; }
.lab-specs li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.lab-specs li:last-child { border-bottom: 0; }
.lab-specs li > span:first-child { color: var(--text-soft); flex-shrink: 0; }
.lab-specs li > span:last-child { text-align: right; }

/* Page projet (template) */
.project-hero-section { position: relative; min-height: 60vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 120px 20px 100px; background-size: cover; background-position: center; }
.project-overlay { position: absolute; inset: 0; background: linear-gradient(rgba(13,17,23,.75), rgba(13,17,23,.92)); }
.project-hero-content { position: relative; z-index: 2; max-width: 800px; }
.project-hero-content h1 { color: #fff; }
.project-card-wrapper { position: relative; z-index: 3; max-width: 860px; margin: -60px auto 80px; padding: 48px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
.project-card-wrapper h3 { display: flex; align-items: center; gap: 12px; font-size: 1.4rem; }
.project-card-wrapper h3 i { color: var(--accent); }
.project-diagram { display: block; width: 100%; height: auto; margin: 24px 0; border-radius: 12px; border: 1px solid var(--border); }
.clean-list-sm { padding-left: 20px; } .clean-list-sm li { margin-bottom: 8px; }
.detail-box { padding: 20px 24px; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 12px; background: var(--bg); }
.detail-box.gain { border-left-color: var(--success); }
.detail-box .lbl { display: block; margin-bottom: 6px; font-size: 0.85rem; font-weight: 700; color: var(--text-soft); }
.detail-box p { margin: 0; }
@media (max-width: 768px) { .project-card-wrapper { padding: 28px 22px; margin-top: -40px; } }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .scroll-reveal, .animate-up { opacity: 1; transform: none; }
}

@media (hover: none) { .project-overlay-hover { opacity: 1; align-items: flex-end; padding-bottom: 16px; background: linear-gradient(transparent 45%, rgba(0,0,0,.65)); } }


/* =========================================
   HERO IMAGE INFORMATIQUE, LOGOS, TERMINAL
   ========================================= */
:root { --hero-bg: url('https://images.unsplash.com/photo-1558494949-ef010cbdcc31?q=80&w=2000&auto=format&fit=crop'); }
.hero-section { background-color: #0b1220; }
.hero-overlay { background: linear-gradient(180deg, rgba(245,245,247,.72), rgba(245,245,247,.94)); backdrop-filter: none; }
[data-theme="dark"] .hero-overlay { background: linear-gradient(180deg, rgba(13,17,23,.35), rgba(13,17,23,.88)); }
.hero-desc { color: var(--text); opacity: .85; }

/* Logos de marques (injectés par script.js, l'icône Font Awesome reste en secours) */
.logo-img { width: 3rem; height: 3rem; margin-bottom: 10px; object-fit: contain; border-radius: 8px; transition: transform .3s; }
.tech-item:hover .logo-img { transform: translateY(-5px); }
.project-stack .logo-img { width: 1.5rem; height: 1.5rem; margin: 0; }
.cert-badge-icon .logo-img { width: 1.8rem; height: 1.8rem; margin: 0; }
[data-theme="dark"] .invert-dark { filter: invert(1); }
