/* --- VARIABLES & RESET --- */
:root {
    /* Ta Palette */
    --text: #f3f4e3;
    --background: #090a03;
    --primary: #303126;
    --secondary: #523024;
    --accent: #a7ff34;

    /* Versions RGB pour la gestion de l'opacité (rgba) */
    --text-rgb: 243, 244, 227;
    --background-rgb: 9, 10, 3;
    --primary-rgb: 48, 49, 38;
    --secondary-rgb: 82, 48, 36;      /* Pour les boutons glass marron */
    --accent-rgb: 202, 214, 71;       /* Pour les effets lumineux */
    
    /* Variables pour l'effet verre */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --blur-amt: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: 0.3s ease; }
img { max-width: 100%; display: block; }

/* --- UTILITIES --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 100px 0; }
.bg-secondary { background-color: rgba(var(--primary-rgb), 0.1); /* Légère variation du fond */ }

/* Texte accentué (Le vert lime) */
.accent-text { color: var(--accent); }

.section-title { 
    font-size: clamp(2rem, 5vw, 3rem); 
    font-weight: 800; 
    margin-bottom: 40px; 
    color: var(--text);
}

/* --- 1. NAVBAR FLOTTANTE --- */
.glass-nav {
    position: fixed;
    top: 25px;
    left: 0;
    right: 0;
    margin: 0 auto;
    
    width: 90%;
    max-width: 1000px;
    padding: 15px 40px;
    z-index: 1000;
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amt));
    -webkit-backdrop-filter: blur(var(--blur-amt));
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-logo { font-weight: 800; font-size: 1.2rem; letter-spacing: 2px; color: var(--text); }

.nav-links { display: flex; gap: 40px; }

.nav-links a { 
    font-size: 0.9rem; 
    text-transform: uppercase; 
    font-weight: 500; 
    color: var(--text);
    opacity: 0.8;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent); /* Hover Vert Lime */
    opacity: 1;
}

.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -4px; left: 50%; transform: translateX(-50%);
    background: var(--accent); transition: 0.3s;
}
.nav-links a:hover::after { width: 100%; }

.burger { display: none; cursor: pointer; }
.burger div { width: 25px; height: 2px; background: var(--text); margin: 6px; transition: 0.3s; }

/* --- HERO SECTION --- */
.hero-section {
    position: relative; height: 100vh;
    display: flex; align-items: center;
    padding-left: 10%;
    background-image: url('../img/bg1.jpg');
    background-size: cover; background-position: center;
}

.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    /* Dégradé utilisant ta couleur de fond --background */
    background: linear-gradient(0deg, rgba(var(--background-rgb),0.95) 0%, rgba(var(--background-rgb),0.5) 30%, rgba(var(--background-rgb),0.1) 80%);
    z-index: 1;
}

.hero-content { position: relative; z-index: 2; max-width: 700px; text-align: left; }

.hero-title {
    font-size: clamp(45px, 7vw, 90px);
    line-height: 1; font-weight: 800; margin-bottom: 10px;
    color: var(--text);
}
.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 300; margin-bottom: 40px; 
    color: rgba(var(--text-rgb), 0.8);
}

/* --- BUTTONS --- */
.cta-container { display: flex; gap: 20px; flex-wrap: wrap; }

/* Bouton Primaire (Glass + Secondary Marron) */
.btn-glass {
    padding: 15px 40px;
    /* Utilisation de --secondary avec transparence */
    background: rgba(var(--secondary-rgb), 0.4); 
    border: 1px solid rgba(var(--secondary-rgb), 0.8);
    backdrop-filter: blur(5px);
    border-radius: 50px;
    font-weight: 600; text-transform: uppercase; font-size: 0.9rem; 
    color: var(--text);
}
.btn-glass:hover {
    background: var(--secondary); /* Devient marron opaque */
    border-color: var(--secondary);
    color: var(--text);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

/* Bouton Secondaire (Outline) */
.btn-outline {
    padding: 15px 40px;
    background: transparent;
    border: 1px solid rgba(var(--text-rgb), 0.3);
    border-radius: 50px;
    font-weight: 600; text-transform: uppercase; font-size: 0.9rem; 
    color: var(--text);
}
.btn-outline:hover {
    background: var(--text);
    color: var(--background); /* Texte sombre sur fond clair */
    border-color: var(--text);
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute; bottom: 40px; left: 10%;
    opacity: 0.7; font-size: 0.8rem; letter-spacing: 1px;
    color: var(--text);
}

/* --- ABOUT SECTION --- */
.about-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 60px; align-items: center; }
.about-text p { 
    margin-bottom: 20px; font-size: 1.1rem; font-weight: 300; 
    color: rgba(var(--text-rgb), 0.8);
}

.about-image { 
    position: relative; 
    max-width: 350px; 
    margin: 0 auto;
}

.about-image > img{
    border-radius: 15px;
}

.glass-frame {
    position: absolute; top: -15px; right: -15px; width: 100%; height: 100%;
    border: 2px solid var(--accent); /* Cadre vert lime */
    border-radius: 15px; z-index: 1;
}

/* --- CAROUSEL & CARDS --- */
.carousel-container {
    display: flex; gap: 30px; overflow-x: auto;
    width: 95%; margin: auto;
    padding: 20px 0 50px 5%; padding-right: 5%;
    scroll-snap-type: x mandatory; 
    cursor: grab;
    -webkit-overflow-scrolling: touch;
}
.carousel-container:active { cursor: grabbing; }

/* Scrollbar personnalisée avec tes couleurs */
.carousel-container::-webkit-scrollbar { height: 6px; }
.carousel-container::-webkit-scrollbar-track { 
    background: rgba(var(--text-rgb), 0.05); 
    margin: 0 100px; border-radius: 10px; 
}
.carousel-container::-webkit-scrollbar-thumb { 
    background: var(--primary); /* Olive sombre */
    border-radius: 10px; 
}
.carousel-container::-webkit-scrollbar-thumb:hover { 
    background: var(--accent); /* Vert lime au survol */
}

/* DESIGN DES CARTES */
.project-card {
    flex: 0 0 auto; width: 320px;
    background: rgba(var(--primary-rgb), 0.4); /* Fond olive transparent */
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    scroll-snap-align: start;
    transition: all 0.4s ease;
    display: flex; flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    background: rgba(var(--primary-rgb), 0.6);
    border-color: var(--accent); /* Bordure lime au survol */
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.card-img-holder { 
    height: 320px; 
    overflow: hidden; width: 100%; 
    border-bottom: 1px solid var(--glass-border);
}
.card-img-holder img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.project-card:hover .card-img-holder img { transform: scale(1.1); }

.card-body { padding: 25px; display: flex; flex-direction: column; height: 100%; }

.card-meta { 
    display: flex; justify-content: space-between; margin-bottom: 10px; 
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px;
    color: rgba(var(--text-rgb), 0.6);
}
.card-meta .year { color: var(--accent); font-weight: bold; }

.project-card h3 { 
    font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; 
    color: var(--text); 
}
.project-card p { 
    font-size: 0.9rem; margin-bottom: 20px; flex-grow: 1; line-height: 1.4;
    color: rgba(var(--text-rgb), 0.7);
}

.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tags span {
    font-size: 0.7rem; padding: 4px 10px;
    border: 1px solid rgba(var(--text-rgb), 0.2);
    border-radius: 20px; 
    color: rgba(var(--text-rgb), 0.8);
}

/* --- CONTACT --- */
.contact-section {
    position: relative;
    padding: 100px 0;
    width: 100%;
    background-image: url('../img/bg3.jpg');
    background-size: cover; background-position: center;
    background-attachment: fixed;
}

.contact-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(var(--background-rgb), 0.7); /* Fond teinté avec ta couleur de base */
    z-index: 1;
}

.contact-container {
    position: relative; z-index: 2; text-align: center; width: 100%;
    padding-bottom: 20px;
}

.glass-panel {
    background: rgba(var(--primary-rgb), 0.4); /* Fond olive transparent */
    backdrop-filter: blur(10px); 
    padding: 60px 20px; border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    max-width: 800px; margin: 0 auto;
}

.glass-panel h3 {
    margin-bottom: 20px; font-size: 2.5rem; font-weight: 700; 
    color: var(--text);
}
.glass-panel p {
    color: rgba(var(--text-rgb), 0.8);
    font-size: 1.1rem; margin-bottom: 40px;
}

.big-btn { margin-top: 30px; display: inline-block; font-size: 1.1rem; }

.social-links { margin-top: 40px; display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }

.social-item {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    color: var(--text); opacity: 0.7; transition: 0.3s;
}

.social-item span { font-size: 0.85rem; font-weight: 500; letter-spacing: 1px; }

.social-icon {
    width: 32px; height: 32px; stroke: currentColor; transition: 0.3s;
}

.social-item:hover {
    opacity: 1;
    color: var(--accent); /* Icône devient verte au survol */
    transform: translateY(-3px);
}

footer {
    position: relative; z-index: 2; text-align: center; 
    padding: 100px 0 20px 0; font-size: 0.9rem; opacity: 0.7;
    background: transparent; width: 100%;
    color: var(--text);
}

/* --- RESPONSIVE MOBILE --- */
@media screen and (max-width: 768px) {
    .glass-nav { width: 95%; padding: 15px 25px; }
    
    .nav-links {
        position: fixed;
        top: -27px; left: -50vw;
        width: 200vw; height: 120vh;
        padding-top: 25px;
        background: var(--background); /* Fond uni sur mobile */
        
        display: flex; flex-direction: column; 
        justify-content: center; align-items: center; gap: 30px;

        transform: translateX(100%); 
        transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.4s ease;
        opacity: 0; visibility: hidden; z-index: -1;
    }
    
    .nav-links.nav-active { 
        transform: translateX(0%); opacity: 1; visibility: visible;
        left: 50%; transform: translateX(-50%);
        width: 100vw; height: 100vh; top: -27px;
    }
    
    .nav-links a { font-size: 1.8rem; color: var(--text); }
    .burger { display: block; z-index: 1001; }
    
    .hero-section { padding-left: 5%; justify-content: center; background-position: 70% center; }
    .hero-title { font-size: 3rem; }
    .about-grid { grid-template-columns: 1fr; }
    .about-image { order: -1; margin-bottom: 30px; }
    .project-card { width: 85vw; }

    .big-btn {
        font-size: 0.85rem; padding: 15px 15px; width: 100%;
        box-sizing: border-box; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }   
}

.toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
.toggle .line2 { opacity: 0; }
.toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }

/* --- PROJET SPECIFIC & MARKDOWN --- */
.project-hero {
    height: 60vh;
    background-attachment: fixed;
}

.markdown-body {
    text-align: left; color: rgba(var(--text-rgb), 0.9);
    line-height: 1.8; max-width: 900px; margin: 0 auto;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    color: var(--text);
    margin-top: 40px; margin-bottom: 20px; font-weight: 700;
}

.markdown-body h1 { font-size: 2.5rem; border-bottom: 1px solid var(--glass-border); padding-bottom: 15px; }
.markdown-body h2 { font-size: 1.8rem; color: var(--accent); } /* Titres H2 en Vert Lime */
.markdown-body h3 { font-size: 1.4rem; }

.markdown-body p { margin-bottom: 20px; font-size: 1.05rem; }
.markdown-body ul, .markdown-body ol { margin-bottom: 20px; padding-left: 20px; }
.markdown-body li { margin-bottom: 10px; }
.markdown-body li::marker { color: var(--accent); }

.markdown-body a { color: var(--accent); text-decoration: underline; }
.markdown-body a:hover { color: var(--text); }

.markdown-body pre {
    background: rgba(0,0,0,0.3); padding: 20px; border-radius: 10px;
    overflow-x: auto; border: 1px solid var(--glass-border); margin-bottom: 30px;
}
.markdown-body code {
    font-family: 'Courier New', Courier, monospace;
    background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 4px; font-size: 0.9em;
}

.markdown-body img {
    max-width: 100%; border-radius: 10px; margin: 30px 0;
    max-height: 900px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid var(--glass-border);
}

.markdown-body blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 20px; font-style: italic; color: rgba(var(--text-rgb), 0.6); margin: 30px 0;
}
