* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
    color: #222;
    background-color: #f4f4f4;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.header {
    background-color: #1d3557;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
}

.nav-links a:hover {
    text-decoration: underline;
}

.theme-button,
.message-button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.theme-button {
    color: #1d3557;
    background-color: white;
}

.main-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
    flex: 1;
}

.hero {
    margin-bottom: 40px;
    text-align: center;
}

.hero h1 {
    font-size: 36px;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.card {
    padding: 30px;
    border-radius: 10px;
    background-color: white;
    box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h2 {
    margin-bottom: 15px;
    color: #1d3557;
}

.card p {
    line-height: 1.6;
}

.interaction {
    margin-top: 40px;
    text-align: center;
}

.message-button {
    color: white;
    background-color: #e63946;
}

.message-button:hover {
    background-color: #c92f3b;
}

#message {
    min-height: 24px;
    margin-top: 20px;
    font-weight: bold;
}

.footer {
    padding: 25px;
    color: white;
    background-color: #1d3557;
    text-align: center;
}

/* Thème sombre activé avec JavaScript */

body.dark-theme {
    color: #f4f4f4;
    background-color: #121212;
}

body.dark-theme .card {
    background-color: #242424;
}

body.dark-theme .card h2 {
    color: #90caf9;
}

/* Responsive */

@media screen and (max-width: 800px) {
    .navbar {
        flex-direction: column;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .cards-container {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 28px;
    }
}