/* 🌈 Thème global */
:root {
    --bg: #f9f9f9;
    --text: #222;
    --primary: #1abc9c;
    --primary-dark: #16a085;
    --header-bg: #2c3e50;
    --card-bg: #ffffff;
    --card-shadow: rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
}

.dark-mode {
    --bg: #121212;
    --text: #f0f0f0;
    --primary: #16a085;
    --primary-dark: #1abc9c;
    --header-bg: #1abc9c;
    --card-bg: #1e1e1e;
    --card-shadow: rgba(255, 255, 255, 0.05);
}

/* 🧱 Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* 📐 Layout */
.container {
    max-width: 95%;
    width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 🧭 Header */
header {
    background-color: var(--header-bg);
    padding: 20px 0;
    box-shadow: 0 2px 4px var(--card-shadow);
}

.logo {
    font-weight: bold;
    font-size: 1.4em;
    color: white;
}

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

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    color: white;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
}

nav a:hover {
    background-color: var(--primary-dark);
}

/* 📦 Sections */
main {
    padding-top: 40px;
}

section {
    padding: 60px 0;
    text-align: center;
}

/* 🧾 Titres */
h1, h2, h3 {
    color: var(--primary-dark);
    margin-bottom: 20px;
}

/* 🔘 Boutons */
.btn, button {
    background-color: var(--primary);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: bold;
    cursor: pointer;
}

.btn:hover, button:hover {
    background-color: var(--primary-dark);
}

/* 🧩 Service Cards */
.service-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.service-item {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    box-shadow: 0 4px 12px var(--card-shadow);
    width: 280px;
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-6px);
}

.service-item h3 {
    margin-bottom: 10px;
}

/* 🌙 Mode sombre toggle */
#toggleTheme {
    margin-top: 20px;
    padding: 8px 16px;
}

/* 📝 Footer */
footer {
    background-color: var(--header-bg);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    border-top: 3px solid var(--primary);
}

/* 🔧 Formulaires */
input[type="text"], input[type="password"], input[type="email"] {
    padding: 12px;
    width: 100%;
    max-width: 400px;
    margin: 10px auto;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    display: block;
    background-color: white;
    color: var(--text);
}

.dark-mode input {
    background-color: #333;
    color: white;
    border: 1px solid #666;
}

/* ✨ Animation fade-in */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 📱 Responsive */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .service-list {
        flex-direction: column;
        align-items: center;
    }

    .btn, button {
        width: 100%;
        max-width: 240px;
    }
}
