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

:root {
    --green-dark:  #1a4a2e;
    --green-mid:   #2d6a4f;
    --green-light: #52b788;
    --gold:        #c8a84b;
    --gold-light:  #e9c46a;
    --cream:       #f8f5f0;
    --text:        #1a1a1a;
    --text-light:  #555;
    --white:       #ffffff;
    --shadow:      0 4px 20px rgba(0,0,0,0.15);
    --radius:      12px;
    --nav-h:       70px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    color: var(--text);
    background: var(--cream);
    min-height: 100vh;
    padding-top: var(--nav-h);
}

/* === NAVBAR === */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: var(--green-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--white);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav-brand img {
    height: 38px;
    width: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
}

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

.nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--green-mid);
    color: var(--gold-light);
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: 0.3s;
}

/* === HERO === */
.hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.45);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
    color: var(--white);
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    margin-bottom: 0.75rem;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.9;
    max-width: 600px;
    line-height: 1.6;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.badge {
    display: inline-block;
    background: var(--gold);
    color: var(--green-dark);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* === CONTAINER === */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 0.5rem;
}

.section-sub {
    color: var(--text-light);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}

/* === CARDS === */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.card-icon {
    background: var(--green-dark);
    padding: 2rem;
    text-align: center;
    font-size: 3rem;
}

.card-body {
    padding: 1.5rem;
}

.card-body h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--green-dark);
}

.card-body p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

.card-arrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--green-mid);
}

/* === EXTERNAL LINKS GRID === */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.link-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--white);
    border: 2px solid var(--green-light);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--green-dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.link-btn:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: var(--white);
    transform: translateY(-2px);
}

.link-btn .link-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* === SEARCH (documentaire) === */
.search-wrap {
    display: flex;
    max-width: 560px;
    margin: 0 auto 2rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.search-wrap input {
    flex: 1;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: none;
    outline: none;
    background: var(--white);
    color: var(--text);
}

.search-wrap button {
    padding: 1rem 1.5rem;
    background: var(--green-dark);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s;
}

.search-wrap button:hover { background: var(--green-mid); }

.animal-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.animal-chip {
    padding: 0.35rem 0.85rem;
    background: var(--white);
    border: 1px solid var(--green-light);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--green-dark);
    transition: background 0.15s, color 0.15s;
    user-select: none;
}

.animal-chip:hover {
    background: var(--green-dark);
    color: var(--white);
    border-color: var(--green-dark);
}

.animal-result {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1rem;
    display: none;
}

.animal-result.visible { display: block; }

.animal-result h2 {
    color: var(--green-dark);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gold);
}

.animal-result p { color: var(--text-light); }

.animal-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

.sponsored {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--gold);
    font-style: italic;
}

/* === ARTICLE PAGE === */
.article {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.article p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-light);
}

.article blockquote {
    border-left: 4px solid var(--gold);
    background: var(--cream);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--green-dark);
    font-size: 1.05rem;
    line-height: 1.8;
}

.stat-box {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff3cd;
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    font-weight: 700;
    color: var(--green-dark);
    font-size: 1.1rem;
}

/* === TEAM CARD === */
.team-quote {
    background: var(--green-dark);
    color: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 800px;
    margin: 2rem auto;
    position: relative;
}

.team-quote::before {
    content: '"';
    font-size: 5rem;
    color: var(--gold);
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    line-height: 1;
    opacity: 0.4;
}

.team-quote p {
    font-size: 1rem;
    line-height: 1.8;
    padding-left: 1rem;
    position: relative;
    z-index: 1;
}

.team-quote .author {
    margin-top: 1rem;
    font-weight: 700;
    color: var(--gold-light);
    padding-left: 1rem;
}

/* === FOOTER === */
footer {
    background: var(--green-dark);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 2rem 1.5rem;
    font-size: 0.9rem;
    margin-top: 4rem;
}

footer a { color: var(--gold-light); text-decoration: none; }
footer strong { color: var(--white); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--nav-h);
        left: 0; right: 0;
        background: var(--green-dark);
        padding: 1rem;
        gap: 0.25rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 0.75rem 1rem; }
    .nav-toggle { display: flex; }

    .hero { min-height: 300px; }
    .article { padding: 1.5rem; }
}
