/* ==========================================================================
   CSS Variables & Design Tokens
   ========================================================================== */
:root {
    /* Color Palette - Honey/Amber Theme */
    --primary: #FFB300;
    --primary-dark: #FFA000;
    --primary-light: #FFCA28;
    
    --bg-main: #FAFAFA;
    --bg-card: #FFFFFF;
    --bg-panel: rgba(255, 255, 255, 0.7);
    
    --text-main: #1A1A1A;
    --text-muted: #666666;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-dark));
    --gradient-bg: linear-gradient(135deg, #FFFDF7, #FAFAFA);
    
    /* Typography */
    --font-main: 'Outfit', sans-serif;
    
    /* Shadows & Effects */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(255, 179, 0, 0.15), 0 10px 10px -5px rgba(255, 179, 0, 0.05);
    
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --glass-blur: blur(12px);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-padding {
    padding: 100px 0;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* ==========================================================================
   Background Elements
   ========================================================================== */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-light);
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: rgba(255, 202, 40, 0.2);
    bottom: -150px;
    left: -150px;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
}

/* ==========================================================================
   Buttons & Tags
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px; /* Plus cubique */
    font-weight: 600;
    transition: var(--transition-base);
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--primary-dark);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary-light);
    color: #fff;
    border-color: var(--primary-light);
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 179, 0, 0.1);
    color: var(--primary-dark);
    border-radius: 6px; /* Plus cubique */
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.tag {
    background: var(--bg-main);
    padding: 4px 12px;
    border-radius: 4px; /* Plus cubique */
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: var(--transition-base);
}

.navbar.scrolled {
    padding: 15px 0;
    background: rgba(255, 179, 0, 0.85); /* Miel subtil et translucide */
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-right {
    display: flex;
    align-items: center;
}

/* Lang Dropdown */
.lang-dropdown-container {
    position: relative;
    display: inline-block;
}

.lang-dropdown-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.lang-dropdown-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.lang-flag {
    width: 20px;
    border-radius: 2px;
}

.dropdown-icon {
    transition: transform 0.3s;
}

.lang-dropdown-container.open .dropdown-icon {
    transform: rotate(180deg);
}

.lang-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    display: none;
    flex-direction: column;
    min-width: 140px;
    overflow: hidden;
    z-index: 100;
}

.lang-dropdown-container.open .lang-dropdown-menu {
    display: flex;
}

.lang-option {
    background: none;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-fast);
    text-align: left;
}

.lang-option:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --- Logo Outline Trick --- */
.logo-outline-container {
    position: relative;
    display: inline-block;
}

.logo-outline-black, .logo-outline-white {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(1.06);
    width: auto;
    z-index: -1;
    transition: var(--transition-base);
}

.logo-outline-black {
    height: 55px;
    filter: brightness(0);
}

.logo-outline-white {
    height: 40px;
    filter: brightness(0) invert(1);
}

.logo-img {
    height: 65px;
    width: auto;
    transition: var(--transition-base);
    position: relative;
    z-index: 1;
    animation: float3d 4s ease-in-out infinite;
}

@keyframes float3d {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(3deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.logo-container:hover .logo-img {
    transform: scale(1.1) rotate(-5deg);
    animation: none;
}

.logo-container:hover .logo-outline-black {
    transform: translate(-50%, -50%) scale(1.11);
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-main);
    position: relative;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition-base);
}

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

.nav-link:hover {
    color: var(--primary-dark);
}

.mobile-menu-toggle {
    display: none;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 90%;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-large-logo {
    max-width: 85%;
    height: auto;
    filter: drop-shadow(0 20px 30px rgba(255, 179, 0, 0.3));
    animation: float 6s ease-in-out infinite;
}

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

/* ==========================================================================
   Projects Section
   ========================================================================== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.section-subtitle {
    color: var(--text-muted);
}

.large-card {
    background: var(--bg-card);
    border-radius: 12px; /* Plus cubique */
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: grid;
    grid-template-columns: 1fr 1fr;
    transition: var(--transition-base);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.small-card {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.03);
    max-width: 700px;
    margin: 0 auto;
    transition: var(--transition-base);
}

.small-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.large-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.project-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    position: relative;
    overflow: hidden;
    background: var(--gradient-bg);
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.large-card:hover .project-image {
    transform: scale(1.05);
}

.project-details {
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.project-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.project-title span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-muted);
    opacity: 0.7;
    background: rgba(0,0,0,0.05);
    padding: 4px 10px;
    border-radius: 8px;
}

.project-description {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.project-description strong {
    color: var(--text-main);
}

/* --- Athera Custom Identity --- */
.athera-card {
    position: relative;
}

.athera-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    box-shadow: inset 0 0 0 2px transparent;
    transition: var(--transition-base);
    border-radius: 12px;
    z-index: 10;
    pointer-events: none;
}

.athera-card:hover::after {
    box-shadow: inset 0 0 0 2px rgba(162, 89, 255, 0.5); /* Purple accent */
}

.athera-card:hover {
    box-shadow: 0 15px 30px rgba(162, 89, 255, 0.15); /* Mystical shadow */
}

.athera-card:hover .project-title {
    color: #9b51e0; /* Deep purple on hover */
    transition: var(--transition-base);
}

.athera-card .stat-value {
    color: #9b51e0;
}

/* --- Astral Custom Identity --- */
.astral-card {
    position: relative;
    background: linear-gradient(135deg, rgba(20, 30, 48, 0.02) 0%, rgba(74, 144, 226, 0.05) 100%);
}

.astral-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    box-shadow: inset 0 0 0 2px transparent;
    transition: var(--transition-base);
    border-radius: 12px;
    z-index: 10;
    pointer-events: none;
}

.astral-card:hover::after {
    box-shadow: inset 0 0 0 2px rgba(74, 144, 226, 0.5); /* Light blue accent */
}

.astral-card:hover {
    box-shadow: 0 15px 30px rgba(74, 144, 226, 0.15); /* Space blue shadow */
}

.astral-card:hover .project-title {
    color: #4a90e2; /* Light blue on hover */
    transition: var(--transition-base);
}

.astral-card .stat-value {
    color: #4a90e2;
}

.project-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   About Section (Kromaa)
   ========================================================================== */
.about-section {
    position: relative;
    overflow: hidden;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.about-title-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.about-icon {
    width: 45px;
    height: 45px;
    animation: float3d 5s ease-in-out infinite reverse;
}

.about-text-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255,255,255,0.8);
    backdrop-filter: var(--glass-blur);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
}

.about-text-card p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.about-text-card p:last-child {
    margin-bottom: 0;
}

.about-text-card strong {
    color: var(--primary-dark);
    font-weight: 700;
}

.about-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

/* Orange square behind the head */
.about-visual::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-35%, -35%) rotate(5deg);
    width: 220px;
    height: 220px;
    background: var(--primary);
    border-radius: 20px;
    opacity: 0.8;
    z-index: 0;
    box-shadow: var(--shadow-md);
}

.kromaa-head {
    width: 240px;
    height: auto;
    image-rendering: pixelated;
    transform: scaleX(-1); /* Flips the head to look left */
    animation: floatHead 4s ease-in-out infinite;
    filter: drop-shadow(0 25px 35px rgba(0,0,0,0.2));
    position: relative;
    z-index: 1;
}

@keyframes floatHead {
    0% { transform: scaleX(-1) translateY(0px); }
    50% { transform: scaleX(-1) translateY(-15px); }
    100% { transform: scaleX(-1) translateY(0px); }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: #111;
    color: #fff;
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: #888;
    margin-top: 15px;
}

.footer-logo {
    height: 40px;
    position: relative;
    z-index: 1;
}

.footer h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==========================================================================
   Animations & Easter Eggs
   ========================================================================== */
.honey-particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.honeycomb {
    position: absolute;
    top: -50px;
    background-image: url('imgs/Honeycomb_JE2_BE2.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    image-rendering: pixelated; /* Garde le côté pixel art net */
    animation: fall linear forwards;
}

@keyframes fall {
    to {
        transform: translateY(110vh) rotate(360deg);
    }
}

.honey-drip-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9998;
}

.drip-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30vh;
    background: var(--primary);
    border-bottom-left-radius: 50% 20%;
    border-bottom-right-radius: 50% 20%;
    box-shadow: 0 20px 50px rgba(255, 179, 0, 0.5);
    animation: slideDown 5s ease-in-out forwards;
    opacity: 0.9;
}

@keyframes slideDown {
    0% { transform: translateY(-100%); }
    20% { transform: translateY(0); }
    80% { transform: translateY(0); opacity: 0.9; }
    100% { transform: translateY(-100%); opacity: 0; }
}

.footer-links a {
    color: #aaa;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-contact p {
    color: #aaa;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #666;
    font-size: 0.9rem;
}

/* ==========================================================================
   Animations & Responsive
   ========================================================================== */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-large-logo {
        max-width: 250px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-title-wrapper {
        justify-content: center;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .kromaa-head {
        width: 200px;
        margin-top: 20px;
    }
    
    .glass-panel {
        transform: translateX(0);
    }
    
    .panel-secondary {
        transform: translateX(0);
    }
    
    .large-card {
        grid-template-columns: 1fr;
    }
    
    .project-image-container {
        min-height: 250px;
    }
    
    .project-details {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    /* Navbar & Mobile Menu */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        cursor: pointer;
        z-index: 1001;
        margin-right: 15px;
    }

    .mobile-menu-toggle span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: var(--text-main);
        border-radius: 3px;
        transition: var(--transition-base);
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transform: translateY(-100%);
        transition: var(--transition-base);
        z-index: 1000;
        opacity: 0;
        pointer-events: none;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links .nav-link {
        font-size: 1.5rem;
    }
    
    .nav-right {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    /* Typographie */
    .hero-title {
        font-size: 2.2rem;
    }

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

    /* Layout ajustements */
    .section-padding {
        padding: 60px 0;
    }

    .project-stats {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 20px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .footer-logo {
        margin: 0 auto;
    }
}
