/* =========================================
   1. VARIABLES & RESET (NEO-BRUTALISM POP)
   ========================================= */
:root {
    /* MODE CLAIR PAR DÉFAUT */
    --bg-main: #FAFAFA;
    --bg-light: #F0F0F0; 
    --black: #111111; /* Sert pour le texte, les bordures et les ombres */
    --white: #FFFFFF; /* Sert pour les fonds de cartes */
    
    /* Couleurs Franches */
    --yellow: #FFD400; 
    --pink: #FF7BBE;   
    --blue: #3A7DF0;   
    --green: #00B37E;  
    
    /* Design System */
    --border-thick: 3px solid var(--black);
    --shadow-brutal: 6px 6px 0px var(--black);
    --shadow-hover: 2px 2px 0px var(--black);
    
    /* Typographie */
    --font-sans: 'Public Sans', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    
    --transition: all 0.25s ease-out;
}

/* --- LE FAMEUX DARK MODE --- */
body.dark-mode {
    --bg-main: #121212;
    --bg-light: #1A1A1A; 
    
    /* Le génie du Néo-Brutalisme en Dark Mode : on inverse Noir et Blanc ! */
    --black: #ffe4e4; /* Les ombres et bordures deviennent claires ! */
    --white: #1f1f1f; /* Le fond des cartes devient gris très sombre */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body { 
    font-family: var(--font-sans); 
    background-color: var(--bg-main); 
    color: var(--black); 
    line-height: 1.6; 
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 5%; }
.mt-2 { margin-top: 1rem; } .mt-4 { margin-top: 2rem; } .mb-2 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.w-full { width: 100%; justify-content: center;}
.font-bold { font-weight: bold; }
.p-1 { padding: 8px; }

/* =========================================
   2. GESTION INTELLIGENTE DES COULEURS
   ========================================= */
/* Ces classes s'assurent que peu importe le mode clair ou sombre, 
   le texte sur les boutons/tags de couleur reste parfaitement lisible */
.bg-yellow { background-color: var(--yellow) !important; color: #111111 !important; }
.bg-pink { background-color: var(--pink) !important; color: #111111 !important; }
.bg-blue { background-color: var(--blue) !important; color: #FFFFFF !important; }
.bg-green { background-color: var(--green) !important; color: #FFFFFF !important; }

/* La classe bg-white s'adapte au dark mode (devient gris sombre avec texte clair) */
.bg-white { background-color: var(--white) !important; color: var(--black) !important; transition: background-color 0.4s ease, color 0.4s ease; }
.bg-light { background-color: var(--bg-light) !important; transition: background-color 0.4s ease; }

.text-blue { color: var(--blue) !important; }
.text-pink { color: var(--pink) !important; }
.text-green { color: var(--green) !important; }
.text-yellow { color: var(--yellow) !important; }

.section-padding { padding: 100px 0; }
.section-title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; text-transform: uppercase; margin-bottom: 3rem; border-bottom: var(--border-thick); padding-bottom: 10px; display: inline-block; transition: border-color 0.4s ease;}

/* =========================================
   3. BRUTALIST COMPONENTS
   ========================================= */
.brutal-box {
    border: var(--border-thick);
    border-radius: 8px;
    transition: border-color 0.4s ease;
}

.brutal-card {
    border: var(--border-thick);
    border-radius: 12px;
    box-shadow: var(--shadow-brutal);
    display: flex;
    flex-direction: column;
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.25s ease-out;
}
.card-title {
    padding: 15px 20px;
    border-bottom: var(--border-thick);
    font-family: var(--font-display);
    font-size: 1.2rem;
    text-transform: uppercase;
    transition: border-color 0.4s ease;
}
.card-inner { 
    padding: 25px; 
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.brutal-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px 24px;
    border: var(--border-thick);
    border-radius: 8px;
    box-shadow: var(--shadow-brutal);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: var(--transition);
}
.brutal-btn:hover { transform: translate(4px, 4px); box-shadow: var(--shadow-hover); }
.brutal-btn:active { transform: translate(6px, 6px); box-shadow: 0px 0px 0px var(--black); }

.brutal-badge {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
    border: var(--border-thick); border-radius: 50px;
    font-family: var(--font-display); font-weight: 700; font-size: 0.85rem;
    transition: border-color 0.4s ease;
}
.brutal-tag {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
    border: var(--border-thick); border-radius: 6px;
    font-size: 0.85rem; font-weight: 600;
    transition: border-color 0.4s ease;
}

.brutal-highlight {
    display: inline-block; padding: 0 10px; border: var(--border-thick); transform: rotate(-2deg);
    transition: border-color 0.4s ease;
}

/* =========================================
   4. HEADER & THEME SWITCH
   ========================================= */
.main-header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; background: var(--bg-main); border-bottom: var(--border-thick); transition: background-color 0.4s ease, border-color 0.4s ease;}
.header-inner { max-width: 1300px; margin: 0 auto; padding: 15px 5%; display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; padding: 5px 15px; box-shadow: 4px 4px 0px var(--black); text-decoration: none;}
.logo:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0px var(--black); }

.nav-list { display: flex; gap: 30px; }
.brutal-link { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; position: relative; text-transform: uppercase;}
.brutal-link::after { content: ''; position: absolute; left: 0; bottom: -4px; width: 100%; height: 3px; background: var(--black); transform: scaleX(0); transform-origin: right; transition: transform 0.3s ease, background-color 0.4s ease; }
.brutal-link:hover::after, .brutal-link.active::after { transform: scaleX(1); transform-origin: left; }

.header-actions { display: flex; gap: 15px; align-items: center; }

/* LE BOUTON DARK MODE */
.theme-switch {
    width: 45px; height: 45px;
    border: var(--border-thick); border-radius: 50%;
    background: var(--white); color: var(--black);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; box-shadow: 3px 3px 0px var(--black);
    transition: var(--transition);
}
.theme-switch:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0px var(--black); }
.theme-switch:active { transform: translate(3px, 3px); box-shadow: 0px 0px 0px var(--black); }

.menu-toggle { display: none; padding: 8px 12px; font-size: 1.2rem; cursor: pointer; box-shadow: 3px 3px 0px var(--black); }
.menu-toggle:active { transform: translate(3px, 3px); box-shadow: 0px 0px 0px var(--black); }

/* =========================================
   5. HERO SECTION
   ========================================= */
.hero { min-height: 90vh; display: flex; align-items: center; padding-top: 100px; overflow: hidden;}
.hero-container { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }

.hero-title { font-family: var(--font-display); font-size: clamp(3.5rem, 6vw, 5.5rem); line-height: 1.1; margin: 20px 0; font-weight: 800; letter-spacing: -1px;}
.hero-desc { font-size: 1.2rem; font-weight: 500; margin-bottom: 40px; max-width: 500px; }
.hero-actions { display: flex; gap: 20px; flex-wrap: wrap;}

.hero-visual { position: relative; display: flex; justify-content: center; }
.decorative-card { width: 300px; height: 400px; transform: rotate(3deg); padding: 15px; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative;}
.hero-img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); transition: 0.3s;}
.decorative-card:hover .hero-img { filter: grayscale(0%); }
.floating-badge { position: absolute; top: -15px; left: -30px; transform: rotate(-10deg); box-shadow: 4px 4px 0px var(--black); }
.floating-badge-2 { position: absolute; bottom: 20px; right: -20px; transform: rotate(5deg); box-shadow: 4px 4px 0px var(--black); }

/* =========================================
   6. ABOUT
   ========================================= */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.about-grid .brutal-card { height: 100%; }
.about-grid p { font-size: 1.05rem; }
.tech-list { display: flex; flex-wrap: wrap; gap: 12px; }

/* =========================================
   7. EXPERIENCE
   ========================================= */
.timeline { display: grid; grid-template-columns: 1fr; gap: 30px; max-width: 800px; }
.timeline-item { position: relative; padding-left: 0; }
.timeline-item .timeline-date { position: absolute; top: -15px; left: 20px; box-shadow: 3px 3px 0px var(--black); }
.timeline-item .card-inner { padding-top: 35px; }
.timeline-item h3 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 5px; }
.timeline-item .company { font-weight: 700; margin-bottom: 15px; text-transform: uppercase;}
.timeline-item ul { padding-left: 20px; margin-top: 10px; }
.timeline-item li { margin-bottom: 8px; }

/* =========================================
   8. PROJECTS
   ========================================= */
.filters { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 40px; }
.filter-btn.active { background: var(--black) !important; color: var(--bg-main) !important; transform: translate(4px, 4px); box-shadow: 2px 2px 0px var(--black); }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }
.project-card { display: flex; flex-direction: column; height: 100%; transition: opacity 0.3s, transform 0.3s; }
.project-card.hidden { display: none; }

.project-img { min-height: 220px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: var(--border-thick); position: relative; overflow: hidden; border-top: none; border-left: none; border-right: none;}
.project-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; top:0; left:0;}
.status-badge { position: absolute; top: 15px; right: 15px; box-shadow: 3px 3px 0px var(--black); }

.project-card h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 10px; line-height: 1.2;}
.project-card p { font-weight: 500; margin-bottom: 20px; flex-grow: 1;}
.tech-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;}

.project-actions { display: flex; gap: 10px; flex-wrap: wrap;}
.project-actions .brutal-btn { flex: 1; padding: 10px; font-size: 0.85rem;}

/* =========================================
   9. CONTACT
   ========================================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center;}
.massive-title { font-family: var(--font-display); font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1.1; }
.lead-text { font-size: 1.2rem; font-weight: 500; }

.social-links { display: flex; gap: 15px; flex-wrap: wrap;}
.social-links a { width: 50px; height: 50px; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.social-links a:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0px var(--black); }

.input-brutal { margin-bottom: 20px; }
.input-brutal label { display: block; font-family: var(--font-display); font-weight: 700; margin-bottom: 8px; }
.input-brutal input, .input-brutal textarea { width: 100%; padding: 15px; border: var(--border-thick); border-radius: 8px; font-family: var(--font-sans); font-size: 1rem; box-shadow: 4px 4px 0px var(--black); transition: var(--transition); }
.input-brutal input:focus, .input-brutal textarea:focus { outline: none; transform: translate(2px, 2px); box-shadow: 2px 2px 0px var(--black); }

/* =========================================
   10. FOOTER
   ========================================= */
.border-top { border-top: var(--border-thick); transition: border-color 0.4s ease;}
.brutal-footer { padding: 40px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.footer-inner .logo { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; }
.footer-inner p { font-weight: 500; }

/* =========================================
   11. LIGHTBOX & ANIMATIONS
   ========================================= */
.lightbox { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.9); z-index: 3000; display: none; align-items: center; justify-content: center; }
.lightbox.active { display: flex; }
.lightbox-content { position: relative; max-width: 90%; max-height: 90%; display: flex; flex-direction: column; align-items: center; }
.lightbox-content img, .lightbox-content video { max-width: 100%; max-height: 80vh; border: var(--border-thick); box-shadow: var(--shadow-brutal);}
.close-btn { position: absolute; top: 20px; right: 20px; width: 50px; height: 50px; font-size: 1.5rem; cursor: pointer; transition: 0.2s;}
.close-btn:active { transform: translate(3px, 3px); box-shadow: 0px 0px 0px var(--black); }
.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; font-size: 1.5rem; cursor: pointer; transition: 0.2s;}
.nav-btn:active { transform: translateY(-50%) translate(3px, 3px); box-shadow: 0px 0px 0px var(--black); }
.prev-btn { left: 20px; } .next-btn { right: 20px; }

.reveal { opacity: 0; transform: translateY(30px); transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }

/* =========================================
   12. RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .hide-mobile { display: none !important; }
    .menu-toggle { display: block; }
    
    .nav-list { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background: var(--bg-main); border-bottom: var(--border-thick); padding: 20px; text-align: center; transition: background-color 0.4s ease, border-color 0.4s ease;}
    .nav-list.active { display: flex; }
    
    .hero-container, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px;}
    .hero-content { text-align: center; }
    .hero-actions { justify-content: center; }
    
    .decorative-card { transform: rotate(0); width: 100%; max-width: 350px; margin: 0 auto;}
    .floating-badge { left: 10px; }
    
    .footer-inner { flex-direction: column; gap: 15px; text-align: center; }
}