:root {
    --bg: #f5f6f8;
    --card: #ffffff;
    --primary: #111827;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border: #e5e7eb;
    --text: #1f2937;
    --muted: #6b7280;
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
}

/* Header */

header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    max-width: 1000px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav a {
    text-decoration: none;
    color: var(--text);
    margin-left: 15px;
    font-weight: 500;
}

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

/* Layout */

.container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 15px;
}

/* Cards */

.card {
    background: var(--card);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

/* Headings */

h1, h2 {
    margin-top: 0;
}

/* Lecture style */

.content {
    font-family: Georgia, serif;
    line-height: 1.8;
    font-size: 18px;
    white-space: pre-line;
}

/* Formulaires */

input, textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 16px;
    margin-bottom: 15px;
    transition: 0.2s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

/* Boutons */

.button {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 10px 18px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.button:hover {
    background: var(--accent-hover);
}

.button-secondary {
    background: #e5e7eb;
    color: #111;
}

.button-secondary:hover {
    background: #d1d5db;
}

/* Responsive */

@media (max-width: 600px) {
    .nav {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== PAGE ACCUEIL ===== */

body.home {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f9fafb, #eef2ff);
    text-align: center;
}

.home-container {
    max-width: 700px;
    padding: 20px;
}

.home-container h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.subtitle {
    color: #6b7280;
    margin-bottom: 40px;
}

.home-grid {
    display: grid;
    gap: 20px;
}

.home-card {
    background: white;
    padding: 30px 20px;
    border-radius: 16px;
    text-decoration: none;
    color: #111827;
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    transition: 0.25s ease;
}

.home-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.home-card h2 {
    margin: 15px 0 10px;
}

.home-card p {
    color: #6b7280;
    font-size: 14px;
}

.home-card .icon {
    font-size: 32px;
}

.home-card.secondary {
    background: #111827;
    color: white;
}

.home-card.secondary p {
    color: #d1d5db;
}

@media (min-width: 600px) {
    .home-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Liste chapitres */

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.chapter-item {
    padding: 15px;
    background: #f9fafb;
    border-radius: 12px;
    text-decoration: none;
    color: #111827;
    border: 1px solid #e5e7eb;
    transition: 0.2s;
}

.chapter-item:hover {
    background: #eef2ff;
    border-color: #2563eb;
}