/* ========================= */
/*         VARIABLES         */
/* ========================= */

:root {
    --primary: #156064;
    --secondary: #4a90e2;
    --secondary-hover: #357abd;
    --accent: #ffcc00;

    --bg: #eeeeee;
    --white: #ffffff;
    --text: #333;
    --text-light: #666;
    --border: #ddd;

    --radius: 8px;
    --radius-lg: 12px;

    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 30px;
    --space-lg: 50px;

    --transition: 0.25s ease;
}

/* ========================= */
/*          RESET            */
/* ========================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ========================= */
/*          GLOBAL           */
/* ========================= */

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
}

.container {
    width: min(1100px, 90%);
    margin: auto;
}

/* ========================= */
/*          HEADER           */
/* ========================= */

header {
    background: var(--primary);
    color: var(--white);
    padding: var(--space-md) 0;
    text-align: center;
}

.logo {
    transform: scale(1.5);
    margin-bottom: var(--space-sm);
}

header h1 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

/* ========================= */
/*        NAVIGATION         */
/* ========================= */

nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    list-style: none;
    margin-top: var(--space-sm);
}

nav a {
    text-decoration: none;
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
}

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

/* ========================= */
/*           INTRO           */
/* ========================= */

.intro {
    text-align: center;
    padding: var(--space-lg) 0;
}

.intro h2 {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.intro p {
    color: var(--text-light);
    max-width: 700px;
    margin: auto;
}

/* ========================= */
/*         SPECIES           */
/* ========================= */

.species {
    padding-bottom: var(--space-lg);
}

.species h2 {
    text-align: center;
    margin-bottom: var(--space-md);
}

.species-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
}

.species-item {
    background: var(--white);
    padding: var(--space-sm);
    border-radius: var(--radius);
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform var(--transition);
}

.species-item:hover {
    transform: translateY(-5px);
}

.species-item img {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: var(--space-xs);
}

.species-item h3 {
    margin-top: var(--space-xs);
}

/* ========================= */
/*         FORMULAIRE        */
/* ========================= */

form {
    max-width: 400px;
    margin: var(--space-md) auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);

    background: var(--white);
    padding: var(--space-sm);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

input[type="text"] {
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 16px;
    transition: var(--transition);
}

input[type="text"]:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 6px rgba(74,144,226,0.3);
    outline: none;
}

button {
    padding: 12px;
    border: none;
    border-radius: var(--radius);
    background: var(--secondary);
    color: var(--white);
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}

button:hover {
    background: var(--secondary-hover);
}

/* ========================= */
/*          TABLEAU          */
/* ========================= */

table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-md) 0;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

thead {
    background: var(--primary);
    color: var(--white);
}

th, td {
    padding: 12px;
    text-align: left;
}

tbody tr:nth-child(even) {
    background: #f7f9f9;
}

tbody tr:hover {
    background: #e3f2f2;
}

td em {
    color: #555;
}

/* ========================= */
/*          FOOTER           */
/* ========================= */

footer {
    background: var(--primary);
    color: var(--white);
    text-align: center;
    padding: var(--space-sm);
    margin-top: var(--space-lg);
}

/* ========================= */
/*         RESPONSIVE        */
/* ========================= */

@media (max-width: 768px) {

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

}

@media (max-width: 480px) {

    .intro h2 {
        font-size: 1.5rem;
    }

    .species h2 {
        font-size: 1.6rem;
    }

}