/* ===== VARIABLES ===== */
:root {
    --primary: #2d5016;
    --primary-light: #4a7c2e;
    --accent: #e8a838;
    --dark: #1a1a1a;
    --light: #f5f5f0;
    --earth: #8b6914;
    --sand: #d4c5a9;
    --text: #333;
    --text-light: #666;
    --shadow: rgba(0,0,0,0.15);
    --glow: rgba(45, 80, 22, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 20px var(--shadow);
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(232, 168, 56, 0.3);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

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

.burger {
    display: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8rem 5% 4rem;
    background: linear-gradient(135deg, var(--dark) 0%, #2d5016 50%, var(--earth) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s infinite linear;
}

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

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--light);
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(232, 168, 56, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 30px rgba(232, 168, 56, 0.5); }
    to { text-shadow: 0 0 50px rgba(232, 168, 56, 0.8), 0 0 100px rgba(232, 168, 56, 0.3); }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--sand);
    margin-bottom: 2rem;
}

.stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat {
    text-align: center;
}

.stat .number {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent);
}

.stat .label {
    font-size: 0.9rem;
    color: var(--sand);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--accent);
    color: var(--dark);
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(232, 168, 56, 0.4);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(232, 168, 56, 0.6);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.ant-illustration {
    font-size: 15rem;
    animation: bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(232, 168, 56, 0.5));
}

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

/* ===== SECTIONS ===== */
section {
    padding: 5rem 5%;
}

section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary);
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

/* ===== ESPÈCES ===== */
.especes {
    background: var(--light);
}

.especes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.espece-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    transition: all 0.3s;
}

.espece-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--shadow);
}

.espece-image {
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
}

.espece-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.espece-card:hover .espece-image img {
    transform: scale(1.1);
}

.espece-info {
    padding: 1.5rem;
}

.espece-info h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.scientific {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.description {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* ===== ANATOMIE ===== */
.anatomie {
    background: linear-gradient(135deg, #f5f5f0 0%, #e8e8e0 100%);
}

.anatomie-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.anatomie-image {
    position: sticky;
    top: 100px;
}

.anatomie-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow);
}

.anatomie-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.part {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 3px 15px var(--shadow);
    border-left: 4px solid var(--accent);
}

.part h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* ===== COLONIE ===== */
.colonie {
    background: var(--dark);
    color: var(--light);
}

.colonie h2 {
    color: var(--accent);
}

.colonie h2::after {
    background: var(--primary-light);
}

.caste-system {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.caste {
    background: rgba(255,255,255,0.05);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(232, 168, 56, 0.2);
    transition: all 0.3s;
}

.caste:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-5px);
}

.caste-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.caste h3 {
    color: var(--accent);
    margin-bottom: 1rem;
}

.caste-stats {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--sand);
}

.colonie-facts {
    background: rgba(255,255,255,0.05);
    padding: 2rem;
    border-radius: 20px;
}

.colonie-facts h3 {
    color: var(--accent);
    text-align: center;
    margin-bottom: 2rem;
}

.fact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.fact {
    background: rgba(255,255,255,0.05);
    padding: 1.5rem;
    border-radius: 15px;
    position: relative;
    padding-top: 3rem;
}

.fact-number {
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--accent);
    color: var(--dark);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
}

.fact h4 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

/* ===== GALERIE ===== */
.galerie {
    background: var(--light);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 2rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-item:hover .overlay {
    transform: translateY(0);
}

.overlay p {
    color: white;
    font-weight: 700;
}

/* ===== FUN FACTS ===== */
.fun-facts {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.fun-facts h2 {
    color: white;
}

.fun-facts h2::after {
    background: var(--accent);
}

.facts-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    min-height: 300px;
}

.fact-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.5s;
    pointer-events: none;
}

.fact-card.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.fact-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.fact-card h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.fact-card p {
    font-size: 1.1rem;
    line-height: 1.6;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.carousel-controls button {
    background: var(--accent);
    color: var(--dark);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-controls button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(232, 168, 56, 0.5);
}

.dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--accent);
    transform: scale(1.2);
}

/* ===== FOOTER ===== */
footer {
    background: var(--dark);
    color: var(--light);
    padding: 3rem 5% 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3, .footer-section h4 {
    color: var(--accent);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--sand);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--sand);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .burger {
        display: block;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 6rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .stats {
        justify-content: center;
    }
    
    .ant-illustration {
        font-size: 10rem;
    }
    
    .anatomie-container {
        grid-template-columns: 1fr;
    }
    
    .anatomie-image {
        position: relative;
        top: 0;
    }
    
    .especes-grid {
        grid-template-columns: 1fr;
    }
    
    .fact-card {
        padding: 2rem 1rem;
    }
}

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

.espece-card, .part, .caste, .fact {
    animation: fadeInUp 0.6s ease-out;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

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