/* ============================================
   LAYOUT.CSS - Navigation, Hero, Footer
   ============================================ */

/* === Background animé === */
.bg-container {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: var(--z-particles);
    background: linear-gradient(135deg,
    var(--blue) 0%,
    var(--green) 20%,
    var(--peach) 40%,
    var(--pink) 60%,
    var(--purple) 80%,
    var(--blue) 100%);
    background-size: 300% 300%;
    animation: gradientWave 15s ease infinite;
    opacity: 0.15;
    filter: saturate(0.9) contrast(0.95);
}

@keyframes gradientWave {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* === Particules === */
.particles {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: var(--z-particles);
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    animation: float 20s infinite;
}

.particle:nth-child(1) {
    width: 80px;
    height: 80px;
    background: var(--blue);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 60px;
    height: 60px;
    background: var(--green);
    top: 70%;
    left: 20%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 100px;
    height: 100px;
    background: var(--peach);
    top: 40%;
    left: 80%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    width: 70px;
    height: 70px;
    background: var(--pink);
    top: 80%;
    left: 70%;
    animation-delay: 6s;
}

.particle:nth-child(5) {
    width: 90px;
    height: 90px;
    background: var(--purple);
    top: 20%;
    left: 50%;
    animation-delay: 8s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
    }
    25% {
        transform: translateY(-50px) translateX(30px) scale(1.1);
    }
    50% {
        transform: translateY(-100px) translateX(-30px) scale(0.9);
    }
    75% {
        transform: translateY(-50px) translateX(50px) scale(1.05);
    }
}

/* === Navigation === */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 25px 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(140, 191, 159, 0.2);
    z-index: var(--z-nav);
    transition: all var(--transition-base);
}

nav.scrolled {
    padding: 15px 0;
    background: var(--bg-blur);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2em;
    font-weight: 800;
    background: linear-gradient(135deg, #db8f42, #f2c977);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: transform var(--transition-base);
}

.logo:hover {
    transform: scale(1.05);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.2em;
    position: relative;
    transition: color var(--transition-base);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #db8f42, #f2c977);
    transition: width var(--transition-base);
}

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

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2em;
    color: white;
    cursor: pointer;
}

/* === Hero Section === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px var(--spacing-md) 60px;
    position: relative;
}

.hero-content {
    max-width: 1400px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-left {
    animation: slideInLeft 1s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-title {
    font-size: 5em;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 30px;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--green), var(--blue), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 18px rgba(240, 235, 224, 0.55);
}

.hero-subtitle {
    font-size: 1.8em;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.4;
    font-weight: 700;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-right {
    position: relative;
    animation: slideInRight 1s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.avatar-container {
    position: relative;
    width: 500px;
    height: 500px;
    margin: 0 auto;
}

/* .avatar-glow — enfant de avatar-main, suit floatAvatar automatiquement */
.avatar-glow {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: transparent;
    animation: sunPulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes sunPulse {
    0%, 100% {
        box-shadow:
                0 0 40px 18px rgba(242, 193, 107, 0.22),
                0 -200px 30px 0px rgba(242, 193, 107, 0.13),
                142px -142px 30px 0px rgba(242, 193, 107, 0.10),
                200px 0px 30px 0px rgba(196, 122, 90, 0.10),
                142px 142px 30px 0px rgba(196, 122, 90, 0.09),
                0 200px 30px 0px rgba(127, 184, 147, 0.09),
                -142px 142px 30px 0px rgba(127, 184, 147, 0.10),
                -200px 0px 30px 0px rgba(127, 184, 147, 0.10),
                -142px -142px 30px 0px rgba(242, 193, 107, 0.10);
    }
    50% {
        box-shadow:
                0 0 55px 25px rgba(242, 193, 107, 0.32),
                0 -225px 35px 0px rgba(242, 193, 107, 0.20),
                159px -159px 35px 0px rgba(242, 193, 107, 0.15),
                225px 0px 35px 0px rgba(196, 122, 90, 0.15),
                159px 159px 35px 0px rgba(196, 122, 90, 0.14),
                0 225px 35px 0px rgba(127, 184, 147, 0.14),
                -159px 159px 35px 0px rgba(127, 184, 147, 0.15),
                -225px 0px 35px 0px rgba(127, 184, 147, 0.15),
                -159px -159px 35px 0px rgba(242, 193, 107, 0.15);
    }
}

.avatar-main {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 50px auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(63, 47, 37, 0.18);
    animation: floatAvatar 4s ease-in-out infinite;
    overflow: visible; /* le glow doit déborder */
    z-index: 1;
}

/* picture contient et clippe l'image dans le cercle */
.avatar-main picture {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}

.avatar-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

@keyframes floatAvatar {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* === Section headers === */
.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 3.5em;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--green), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 14px rgba(240, 235, 224, 0.55);
}

.section-subtitle {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--text-tertiary);
}

/* === Footer === */
footer {
    background: var(--bg-blur);
    border-top: 2px solid rgba(140, 191, 159, 0.2);
    padding: 60px var(--spacing-md);
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-text {
    font-size: 1.2em;
    color: var(--text-tertiary);
    margin-bottom: 20px;
}

.footer-link {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-base);
}

.footer-link:hover {
    color: var(--pink);
}