/* --- IMPORTS FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

/* --- CONFIGURATION & VARIABLES (Mode Normal) --- */
:root {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --hover-bg: rgba(255, 255, 255, 0.05);
    --radius-lg: 16px;
    --container-width: 600px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column; 
    align-items: center;
    padding: 40px 20px 20px 20px; 
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}


.bg-shape {
    position: fixed; top: -100px; left: -100px; width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(0,0,0,0) 70%);
    z-index: -1; pointer-events: none;
}

.container { 
    width: 100%; 
    max-width: var(--container-width); 
    animation: fadeInUp 0.8s ease-out;
    flex: 1; 
    display: flex;
    flex-direction: column;
}

/* --- HEADER --- */
.profile-header { text-align: center; margin-bottom: 40px; }
.avatar-container { position: relative; width: 120px; height: 120px; margin: 0 auto 30px; cursor: pointer; }
.profile-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--glass-border); transition: all 0.5s ease; }

.status-badge {
    position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95); border: 1px solid var(--accent);
    padding: 6px 12px; border-radius: 20px; font-size: 0.75rem;
    display: flex; align-items: center; gap: 6px; color: var(--text-main);
    white-space: nowrap; z-index: 10;
    transition: all 0.5s ease;
}
.status-dot { width: 8px; height: 8px; background-color: #22c55e; border-radius: 50%; animation: pulse 2s infinite; }

.header-text h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 5px; }
.role { color: var(--accent); font-weight: 600; margin-bottom: 10px; font-size: 1.1rem;}
.bio { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

/* --- LIENS --- */
.links-section { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.glass-btn {
    display: flex; align-items: center; padding: 14px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg); text-decoration: none; color: var(--text-main);
    transition: all 0.3s ease; backdrop-filter: blur(12px);
}
.glass-btn:hover { background: var(--hover-bg); border-color: var(--accent); transform: translateY(-2px); }
.icon-box { width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.05); border-radius: 50%; margin-right: 15px; transition: all 0.5s ease; }
.glass-btn span { font-weight: 500; flex-grow: 1; }
.primary-btn { border-color: rgba(56, 189, 248, 0.3); }

/* --- SÉPARATEUR MON CV (NOUVEAU) --- */
.cv-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0 20px 0;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    opacity: 0; /* Pour l'animation JS */
    animation: fadeInUp 0.8s ease-out forwards 0.5s;
}

.cv-divider::before, .cv-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--glass-border);
    margin: 0 15px;
}

/* --- SECTIONS ACCORDÉON --- */
.collapsible-section {
    margin-bottom: 15px;
    border-radius: var(--radius-lg);
    background: rgba(30, 41, 59, 0.4); 
    border: 1px solid transparent;
    transition: all 0.3s ease;
    overflow: hidden;
}

.section-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-main);
    transition: background 0.2s;
}

.section-header:hover { background: rgba(255, 255, 255, 0.03); }
.icon-title { width: 24px; color: var(--accent); margin-right: 10px; text-align: center;}
.chevron { font-size: 0.9rem; color: var(--text-muted); transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }

.section-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 0.5;
}

.content-wrapper { overflow: hidden; }

.collapsible-section.active {
    background: var(--glass-bg);
    border-color: var(--glass-border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.collapsible-section.active .section-content {
    grid-template-rows: 1fr;
    opacity: 1;
    padding-bottom: 20px; 
}
.collapsible-section.active .chevron { transform: rotate(180deg); color: var(--accent); }

/* --- CONTENU DES CARTES --- */
.cards-grid { padding: 0 20px; display: grid; gap: 15px; }

.project-card {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
    padding: 15px; border-radius: 12px; transition: all 0.5s ease;
}

.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.card-top h3 { font-size: 0.95rem; }
.date-badge { background: rgba(255,255,255,0.1); padding: 3px 8px; border-radius: 4px; font-size: 0.7rem; color: var(--text-muted); }
.company-name, .subtitle-card { font-style: italic; color: var(--accent); margin-bottom: 8px; font-size: 0.85rem; }

.details-list { list-style: none; padding-left: 5px; }
.details-list li {
    position: relative; padding-left: 15px; margin-bottom: 4px;
    font-size: 0.85rem; color: #cbd5e1;
}
.details-list li::before { content: "•"; color: var(--accent); position: absolute; left: 0; }

/* --- CERTIFICATIONS --- */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
    padding: 0 5px;
    margin-bottom: 20px;
}

.cert-card-detailed {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
}

.cert-card-detailed:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cert-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
    flex-shrink: 0; 
    transition: all 0.5s ease;
}

/* Couleurs spécifiques (Normal) */
.cisco-color { color: #00bceb; background: rgba(0, 188, 235, 0.1); }
.genetec-color { color: #8dc63f; background: rgba(141, 198, 63, 0.1); }
.mitel-color { color: #f47920; background: rgba(244, 121, 32, 0.1); }
.anssi-color { color: #003399; background: rgba(0, 51, 153, 0.1); }
.security-color { color: #e11d48; background: rgba(225, 29, 72, 0.1); }

.cert-info h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 2px; color: var(--text-main); }
.cert-issuer { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.cert-level {
    display: inline-block; font-size: 0.7rem;
    background: rgba(56, 189, 248, 0.1); color: var(--accent);
    padding: 2px 8px; border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

footer { 
    text-align: center; 
    color: var(--text-muted); 
    font-size: 0.8rem; 
    margin-top: auto; 
    padding-top: 40px;
    padding-bottom: 20px;
    opacity: 0.6; 
    width: 100%;
}

@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); } 70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }


/* ========================================= */
/* EASTER EGG : CYBERPUNK MODE (CACHÉ)      */
/* ========================================= */

body.cyberpunk-mode {
    --bg-color: #0b0b0b;
    --text-main: #fcee0a;
    --text-muted: #00f0ff;
    --accent: #fcee0a;
    --glass-bg: rgba(0, 0, 0, 0.95);
    --glass-border: #fcee0a;
    --hover-bg: rgba(0, 240, 255, 0.2);
    --radius-lg: 0px; 
    
    background-image: 
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
}

/* Changement de police global */
body.cyberpunk-mode * {
    font-family: 'Orbitron', sans-serif !important;
    letter-spacing: 1px;
}

/* --- CORRECTIF POUR LES ICÔNES FONT AWESOME --- */
/* On force les icônes à utiliser leur propre police, pas Orbitron */
body.cyberpunk-mode .fas,
body.cyberpunk-mode .fab,
body.cyberpunk-mode .far,
body.cyberpunk-mode i[class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-weight: 900; 
}

/* Style du séparateur en mode Cyberpunk */
body.cyberpunk-mode .cv-divider {
    color: var(--text-main);
    text-shadow: 0 0 5px var(--accent);
}
body.cyberpunk-mode .cv-divider::before,
body.cyberpunk-mode .cv-divider::after {
    border-bottom: 1px solid var(--text-muted);
    box-shadow: 0 0 5px var(--text-muted);
}

/* Masquer la forme d'arrière-plan douce originale */
body.cyberpunk-mode .bg-shape { display: none; }

/* Carrés & Néons */
body.cyberpunk-mode .glass-btn,
body.cyberpunk-mode .project-card,
body.cyberpunk-mode .collapsible-section,
body.cyberpunk-mode .cert-card-detailed {
    border: 1px solid var(--accent);
    box-shadow: 4px 4px 0px var(--text-muted);
    border-radius: 0 !important;
}

body.cyberpunk-mode .profile-img {
    border-radius: 0 !important;
    border: 2px solid var(--accent);
    filter: grayscale(100%) contrast(1.2);
}

body.cyberpunk-mode .status-badge {
    background: #000;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 0;
}

body.cyberpunk-mode .status-dot {
    background-color: var(--text-muted);
    box-shadow: 0 0 10px var(--text-muted);
}

/* Fix Containers Icones */
body.cyberpunk-mode .icon-box,
body.cyberpunk-mode .cert-icon {
    border-radius: 0 !important;
    background: #000 !important;
    border: 1px solid var(--text-muted);
    color: var(--text-muted) !important;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
    transform: none !important;
}

body.cyberpunk-mode .arrow-icon, 
body.cyberpunk-mode .chevron,
body.cyberpunk-mode .icon-title {
    color: var(--accent) !important;
}

/* Glitch Titre */
body.cyberpunk-mode h1 {
    position: relative;
    text-transform: uppercase;
    animation: glitch 1s linear infinite;
}

body.cyberpunk-mode h1::before,
body.cyberpunk-mode h1::after {
    content: attr(data-text);
    position: absolute;
    left: 0; top: 0; width: 100%; height: 100%;
    background: #0b0b0b;
}

body.cyberpunk-mode h1::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-1 5s infinite linear alternate-reverse;
}

body.cyberpunk-mode h1::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip: rect(20px, 9999px, 10px, 0); }
    20% { clip: rect(60px, 9999px, 70px, 0); }
    40% { clip: rect(10px, 9999px, 50px, 0); }
    60% { clip: rect(80px, 9999px, 30px, 0); }
    80% { clip: rect(40px, 9999px, 90px, 0); }
    100% { clip: rect(30px, 9999px, 60px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(10px, 9999px, 80px, 0); }
    20% { clip: rect(90px, 9999px, 10px, 0); }
    40% { clip: rect(30px, 9999px, 20px, 0); }
    60% { clip: rect(50px, 9999px, 60px, 0); }
    80% { clip: rect(70px, 9999px, 40px, 0); }
    100% { clip: rect(20px, 9999px, 90px, 0); }
}