* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }

    @view-transition {
        navigation: auto;
    }
}

@font-face {
    font-family: 'Arial Rounded MT';
    src: url('../fonts/ArialRoundedMT-Regular.woff2') format('woff2'),
         url('../fonts/ArialRoundedMT-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Arial Rounded MT';
    src: url('../fonts/ArialRoundedMT-Bold.woff2') format('woff2'),
         url('../fonts/ArialRoundedMT-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-bg: #0a0e27;
    --text-white: #ffffff;
    --text-gray: #b8c1db;
    --font-family: 'Arial Rounded MT', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --gradient-blue: linear-gradient(135deg, #2b3a87 0%, #4a6fa5 100%);
    --gradient-blue-hover: linear-gradient(135deg, #3545a0 0%, #5a80c5 100%);
}

@keyframes pageIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

body {
    font-family: var(--font-family);
    background-color: var(--primary-bg);
    background-image: radial-gradient(ellipse 80% 40% at 50% -5%, #0f1a40 0%, transparent 70%);
    background-attachment: fixed;
    color: var(--text-white);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    animation: pageIn 0.25s ease-out;
}

/* Neige */
#snow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    display: block;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    padding: 0.6rem 1.2rem;
    background: var(--gradient-blue);
    color: #fff;
    border-radius: 0 0 8px 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 0;
}

/* Navbar */
.navbar {
    background: transparent;
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: none;
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled,
.navbar:has(.nav-menu.active) {
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom-color: rgba(184, 193, 219, 0.08);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.nav-logo img {
    width: 40px;
    height: 40px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu > li:last-child {
    margin-left: 1.5rem;
}

.nav-link {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-white);
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.burger-line {
    width: 25px;
    height: 3px;
    background-color: var(--text-white);
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 3px;
}

.burger-menu.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Accueil */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    padding: 0 4rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 4vw, 5.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 1.6vw, 1.8rem);
    font-weight: 400;
    color: var(--text-gray);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    perspective: 1000px;
}

/* Aiko-chan */
.hero-image img {
    max-width: min(500px, 30vw);
    max-height: 60vh;
    width: auto;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(74, 111, 165, 0.3));
    animation: float 3s ease-in-out infinite;
    transition: transform 0.1s ease-out;
    will-change: transform;
    cursor: pointer;
    transform-style: preserve-3d;
}

@keyframes float {
    0%, 100% {
        transform: translateY(-15px);
    }
    50% {
        transform: translateY(15px);
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem 2rem;
    color: var(--text-gray);
    font-size: 0.95rem;
    font-weight: 400;
    position: relative;
    z-index: 2;
    margin-top: auto;
    opacity: 0.65;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.footer-sep {
    opacity: 0.4;
}

footer a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--text-white);
}

/* Hero CTAs */
.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0.85rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-family);
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hero-btn-primary {
    background: var(--gradient-blue);
    color: var(--text-white);
    border: none;
}

.hero-btn-primary:hover {
    background: var(--gradient-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 111, 165, 0.4);
}

.hero-btn-secondary {
    background: transparent;
    color: var(--text-white);
    border: 2px solid rgba(184, 193, 219, 0.4);
}

.hero-btn-secondary:hover {
    background: rgba(184, 193, 219, 0.1);
    border-color: rgba(184, 193, 219, 0.7);
    transform: translateY(-2px);
}

.theme-toggle {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theme-icon {
    width: 22px;
    height: 22px;
    opacity: 0.6;
    filter: invert(1);
    transition: opacity 0.2s ease;
}

.theme-toggle:hover .theme-icon {
    opacity: 1;
}

.theme-icon-moon { display: none; }
.theme-icon-sun  { display: block; }

.lang-switcher {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.1rem;
}

.lang-toggle {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.globe-icon {
    width: 22px;
    height: 22px;
    opacity: 0.6;
    filter: invert(1);
    transition: opacity 0.2s ease;
}

.lang-toggle:hover .globe-icon {
    opacity: 1;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: rgba(20, 25, 50, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 0.5rem;
    min-width: 140px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 1002;
}

.lang-switcher.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-gray);
    font-size: 0.9rem;
    font-family: var(--font-family);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.lang-btn.active {
    background: rgba(74, 111, 165, 0.3);
    color: var(--text-white);
}

.flag-icon {
    width: 22px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
}

@media (max-width: 1200px) {
    .hero-image img { max-width: min(380px, 30vw); }
}

@media (max-width: 980px) {
    .burger-menu { display: flex; }

    .nav-menu {
        position: fixed;
        top: var(--navbar-h, 70px);
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(10, 14, 39, 0.98);
        backdrop-filter: blur(10px);
        padding: 2rem;
        gap: 1.5rem;
        transition: max-height 0.5s ease, opacity 0.5s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
    }

    .nav-menu.active { max-height: 30rem; opacity: 1; }
    .nav-menu li { width: 100%; text-align: center; }
    .nav-menu > li:last-child { margin-left: 0; }

    .nav-link {
        font-size: 1.1rem;
        display: block;
        padding: 0.5rem;
    }

    .lang-switcher {
        justify-content: center;
        width: 100%;
        padding: 1rem 0;
        border-top: 1px solid rgba(74, 111, 165, 0.2);
        margin-top: 1rem;
        gap: 0.75rem;
    }

    .theme-toggle {
        padding: 0.5rem 0.75rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 6px;
    }

    .lang-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: none;
        box-shadow: none;
        padding: 0.25rem;
        display: flex;
        gap: 0;
        min-width: auto;
    }

    .lang-toggle { display: none; }
    .lang-btn { padding: 0.5rem 1rem; }
    .flag-icon { width: 24px; height: 18px; }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: 6rem 2rem 2rem;
        justify-content: center;
        align-items: center;
        gap: 1rem;
    }

    .hero-title { font-size: 3.5rem; margin-bottom: 0.5rem; }
    .hero-subtitle { font-size: 1.5rem; }
    .hero-image { margin: 0; justify-content: center; }
    .hero-image img { max-width: 280px; }
    .hero-actions { justify-content: center; }
}

/* Focus visible — navigation clavier */
:focus-visible {
    outline: 2px solid rgba(74, 111, 165, 0.85);
    outline-offset: 3px;
    border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
    body {
        animation: none !important;
    }

    .hero-image img,
    .about-image img,
    .artist-image img {
        animation: none !important;
    }
}


@media (max-width: 480px) {
    .navbar {
        padding: 1rem;
    }

    .nav-logo {
        font-size: 1.2rem;
    }

    .nav-logo img {
        width: 35px;
        height: 35px;
    }

    .nav-menu {
        top: 60px;
        padding: 1.5rem;
    }

    .hero {
        gap: 1rem;
        padding: 5rem 1.5rem 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-image img {
        max-width: 230px;
    }

    footer {
        font-size: 0.75rem;
        padding: 1.5rem 1rem;
    }
}