/* Réinitialisation des styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables de couleurs */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #ddd;
    --header-bg: #1a2b3c;
    --header-text: #fff;
    --footer-bg: #2c3e50;
    --footer-text: #ecf0f1;
}

/* Styles généraux */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* En-tête */
header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 30px;
    text-align: center;
    border-radius: 5px 5px 0 0;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

header h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: normal;
}

.meta {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.meta p {
    margin: 5px 0;
}

/* Table des matières */
.table-of-contents {
    background-color: var(--light-bg);
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.table-of-contents h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

.table-of-contents ul {
    list-style: none;
}

.table-of-contents li {
    margin-bottom: 8px;
}

.table-of-contents a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.3s;
    display: block;
    padding: 5px 0;
    font-weight: 500;
}

.table-of-contents a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Sections */
section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

section:last-child {
    border-bottom: none;
}

section h2 {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
}

section h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin: 25px 0 15px 0;
}

section p {
    margin-bottom: 15px;
}

section ul, section ol {
    margin-left: 25px;
    margin-bottom: 20px;
}

section li {
    margin-bottom: 8px;
}

section strong {
    color: var(--primary-color);
    font-weight: 600;
}

.content {
    padding: 0 15px;
}

/* Pied de page */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 20px;
    text-align: center;
    border-radius: 0 0 5px 5px;
    margin-top: 30px;
}

.footer-content p {
    margin: 5px 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px 10px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    header h2 {
        font-size: 1.3rem;
    }
    
    .meta {
        flex-direction: column;
        align-items: center;
    }
    
    section h2 {
        font-size: 1.4rem;
    }
    
    section h3 {
        font-size: 1.2rem;
    }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* Styles d'impression */
@media print {
    body {
        font-size: 12pt;
    }
    
    .container {
        box-shadow: none;
        max-width: 100%;
    }
    
    header, footer {
        background-color: white;
        color: black;
    }
    
    .table-of-contents {
        break-inside: avoid;
    }
    
    section {
        page-break-inside: avoid;
    }
    
    a {
        color: black;
        text-decoration: none;
    }
}