:root {
    /* Palette de couleurs modernisée avec nuances */
    --black: #0a0a0f;
    --dark-gray: #14141f;
    --medium-gray: #1e1e2e;
    --light-gray: #8b92a7;
    --lighter-gray: #a8afc7;
    --white: #f5f5f7;

    /* Couleurs d'accent - Gradient moderne */
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-hover: #2563eb;

    /* Typographie */
    --font-body: 'Poppins', sans-serif;
    --font-title: 'Poiret One', cursive;
    --font-code: 'Inconsolata', monospace;

    /* Dimensions */
    --navbar-height: 85px;
    --border-radius: 16px;
    --border-radius-sm: 8px;

    /* Animations */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- RESET & BASE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--black) 0%, var(--dark-gray) 50%, var(--black) 100%);
    background-attachment: fixed;
    color: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--accent-secondary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.2;
}

/* --- SCROLLBAR PERSONNALISÉE --- */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--dark-gray);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* --- NAVBAR --- */
.navbar {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    min-height: var(--navbar-height);
    transition: var(--transition-base);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-brand object {
    height: calc(var(--navbar-height) - 35px);
    width: auto;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3));
    transition: var(--transition-base);
}

.navbar-brand object:hover {
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.6));
}

.nav-link {
    margin: 0 20px;
    color: var(--white) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.2px;
    position: relative;
    padding-bottom: 5px;
    transition: var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--accent-primary) !important;
    transform: translateY(-2px);
}

/* Hamburger Icon - Plus moderne */
.navbar-toggler {
    border: none;
    background: none;
    outline: none !important;
    box-shadow: none !important;
    padding: 10px;
}

.nav-icon {
    width: 30px;
    height: 22px;
    position: relative;
    cursor: pointer;
}

.nav-icon span {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    display: block;
    height: 3px;
    width: 100%;
    border-radius: 3px;
    position: absolute;
    left: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.nav-icon span:nth-child(1) { top: 0; }
.nav-icon span:nth-child(2) { top: 9px; }
.nav-icon span:nth-child(3) { top: 18px; }

.nav-icon.is-open span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}

.nav-icon.is-open span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.nav-icon.is-open span:nth-child(3) {
    transform: rotate(-45deg);
    top: 9px;
}

/* --- SECTIONS --- */
section {
    padding: 120px 20px;
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.05), transparent 60%);
    pointer-events: none;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, var(--white), var(--accent-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.section-subtitle {
    max-width: 700px;
    margin: 0 auto 5rem auto;
    font-size: 1.15rem;
    color: var(--lighter-gray);
    font-weight: 300;
    line-height: 1.8;
}

/* --- HERO SECTION --- */
#hero {
    padding-top: calc(var(--navbar-height) + 80px);
    padding-bottom: 80px;
    text-align: center;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.1), transparent 70%),
                linear-gradient(135deg, var(--black), var(--dark-gray));
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--black));
    pointer-events: none;
}

#hero h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--white), var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
}

#hero .lead {
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--lighter-gray);
    font-weight: 300;
    text-transform: none;
    letter-spacing: 0.5px;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-avatar {
    margin: 2rem 0;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.hero-avatar img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid transparent;
    background: linear-gradient(var(--dark-gray), var(--dark-gray)) padding-box,
                linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)) border-box;
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.4),
                0 8px 30px rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
}

.hero-avatar img:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.6),
                0 12px 40px rgba(0, 0, 0, 0.4);
}

.social-icons {
    display: flex;
    gap: 20px;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

.social-icons a {
    transition: var(--transition-smooth);
}

.social-icons a:hover {
    transform: translateY(-5px) scale(1.1);
}

/* --- PORTFOLIO --- */
#portfolio {
    background: var(--black);
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
    aspect-ratio: 16/10;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    opacity: 0;
    transition: var(--transition-base);
    z-index: 1;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition-smooth);
}

.portfolio-item:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.3),
                0 0 40px rgba(139, 92, 246, 0.2);
}

.portfolio-item:hover::before {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.08);
}

/* --- SERVICES (Glassmorphism) --- */
#services {
    background: linear-gradient(135deg, var(--white) 0%, #e8e9f3 100%);
    color: var(--dark-gray);
}

#services .section-title {
    background: linear-gradient(135deg, var(--dark-gray), var(--accent-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#services .card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
    text-align: center;
    height: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
}

#services .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transform: scaleX(0);
    transition: var(--transition-smooth);
}

#services .card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 0.9);
}

#services .card:hover::before {
    transform: scaleX(1);
}

.service-title {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.15rem;
    margin: 20px 0 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--dark-gray);
}

.emoji {
    font-size: 3rem;
    display: block;
    margin: 20px 0 10px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: var(--transition-smooth);
}

#services .card:hover .emoji {
    transform: scale(1.15) rotate(5deg);
}

/* --- CONTACT --- */
#contact {
    background: linear-gradient(135deg, var(--dark-gray) 0%, var(--black) 100%);
    position: relative;
}

#contact form {
    background: rgba(30, 30, 46, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

#contact .form-control {
    background: rgba(20, 20, 31, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: var(--white);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    font-size: 1rem;
    transition: var(--transition-base);
}

#contact .form-control:focus {
    background: rgba(20, 20, 31, 0.95);
    color: var(--white);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1),
                0 0 20px rgba(59, 130, 246, 0.3);
    outline: none;
}

#contact ::placeholder {
    color: var(--light-gray);
    opacity: 0.7;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    padding: 16px 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 50px;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.5);
}

.btn-primary:active {
    transform: translateY(-2px);
}

/* --- FOOTER --- */
footer {
    background: var(--black);
    color: var(--light-gray);
    text-align: center;
    padding: 50px 20px;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    font-size: 0.95rem;
}

footer p {
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    gap: 25px;
    justify-content: center;
    align-items: center;
}

.footer-icon {
    width: 28px;
    height: 28px;
    filter: grayscale(1) brightness(1.3);
    transition: var(--transition-smooth);
}

.footer-icon:hover {
    filter: grayscale(0) brightness(1);
    transform: scale(1.3) rotate(5deg);
}

/* --- TOAST NOTIFICATION --- */
.toast-container {
    position: fixed;
    top: calc(var(--navbar-height) + 20px);
    right: 20px;
    z-index: 1090;
}

.toast {
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    section {
        padding: 80px 15px;
    }

    .section-title {
        font-size: 2rem;
    }

    #hero {
        min-height: 70vh;
        padding-top: calc(var(--navbar-height) + 50px);
    }

    .nav-link {
        margin: 10px 0;
    }

    #contact form {
        padding: 2rem;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .hero-avatar img {
        width: 100px;
        height: 100px;
    }

    .btn-primary {
        padding: 14px 35px;
        font-size: 0.9rem;
    }
}
