/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.logo {
    max-height: 180px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Navigation - Table des matières */
.table-of-contents {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin: 2rem 0;
    border-left: 4px solid #667eea;
}

.table-of-contents h2 {
    color: #667eea;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.table-of-contents h2::before {
    content: "📋";
    margin-right: 0.5rem;
}

.table-of-contents ol {
    list-style: none;
    counter-reset: toc-counter;
}

.table-of-contents ol li {
    counter-increment: toc-counter;
    margin: 0.5rem 0;
}

.table-of-contents ol li::before {
    content: counter(toc-counter) ". ";
    color: #667eea;
    font-weight: bold;
    margin-right: 0.5rem;
}

.table-of-contents a {
    color: #2c3e50;
    text-decoration: none;
    padding: 0.5rem 0;
    display: inline-block;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.table-of-contents a:hover,
.table-of-contents a.active {
    color: #667eea;
    padding-left: 1rem;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
}

/* Sections d'articles */
.article {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    margin: 2rem 0;
    border-left: 4px solid #667eea;
    position: relative;
}

.article::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px 10px 0 0;
}

.article h2 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.article h2::before {
    content: "📄";
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.article h3 {
    color: #495057;
    font-size: 1.3rem;
    margin: 2rem 0 1rem 0;
    display: flex;
    align-items: center;
}

.article h3::before {
    content: "▸";
    color: #667eea;
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.article h4 {
    color: #6c757d;
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem 0;
    font-weight: 600;
}

.article p {
    margin-bottom: 1rem;
    text-align: justify;
}

.article ul, .article ol {
    margin: 1rem 0 1rem 2rem;
}

.article li {
    margin: 0.5rem 0;
}

/* Éléments de mise en valeur */
.highlight-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
}

.highlight-box::before {
    content: "💡";
    position: absolute;
    top: -10px;
    left: 15px;
    background: white;
    padding: 0 0.5rem;
    font-size: 1.2rem;
}

.warning-box {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
}

.warning-box::before {
    content: "⚠️";
    position: absolute;
    top: -10px;
    left: 15px;
    background: white;
    padding: 0 0.5rem;
    font-size: 1.2rem;
}

/* Tableau de tarification */
.pricing-table {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid #e9ecef;
}

.pricing-table h4 {
    color: #667eea;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.pricing-table h4::before {
    content: "💰";
    margin-right: 0.5rem;
}

.pricing-table table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.pricing-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
}

.pricing-table td:first-child {
    color: #495057;
    font-weight: 500;
}

.pricing-table td:last-child {
    color: #667eea;
    font-weight: bold;
    text-align: right;
    width: 100px;
}

.pricing-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.note {
    font-style: italic;
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Liens */
a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Strong et emphasis */
strong {
    color: #495057;
    font-weight: 600;
}

em {
    color: #6c757d;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 2rem 0;
    margin-top: 3rem;
}

footer .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

footer h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

footer p {
    line-height: 1.8;
    opacity: 0.9;
}

footer a {
    color: #667eea;
}

footer a:hover {
    color: white;
}

.version-info {
    text-align: right;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .article {
        padding: 1.5rem;
        margin: 1rem 0;
    }

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

    .article h3 {
        font-size: 1.2rem;
    }

    .table-of-contents {
        padding: 1.5rem;
        margin: 1rem 0;
    }

    footer .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .version-info {
        text-align: center;
    }

    .pricing-table table {
        font-size: 0.9rem;
    }

    .pricing-table td {
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 2rem 0;
    }

    header h1 {
        font-size: 1.7rem;
    }

    .logo {
        max-height: 160px;
    }

    .article {
        padding: 1rem;
    }

    .article h2 {
        font-size: 1.3rem;
    }

    .table-of-contents {
        padding: 1rem;
    }

    .highlight-box,
    .warning-box,
    .pricing-table {
        padding: 1rem;
    }
}

/* Animation d'apparition au scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article {
    animation: fadeInUp 0.6s ease-out;
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
        font-size: 12pt;
        line-height: 1.4;
    }

    header {
        background: none;
        color: black;
        padding: 1rem 0;
        box-shadow: none;
    }

    .table-of-contents {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .article {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .highlight-box,
    .warning-box {
        border: 1px solid #ccc;
        background: none;
    }

    footer {
        background: none;
        color: black;
        border-top: 2px solid #ccc;
        margin-top: 2rem;
        padding-top: 1rem;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    .logo {
        filter: none;
    }
}

/* Accessibilité - Focus */
a:focus,
button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Sélection de texte */
::selection {
    background: rgba(102, 126, 234, 0.2);
    color: #2c3e50;
}

::-moz-selection {
    background: rgba(102, 126, 234, 0.2);
    color: #2c3e50;
}