/* ============================================
   Support théorique — Styles document formel
============================================ */

.support-document {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Page de garde */
.cover-page {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 3rem;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--text-inverse);
    position: relative;
}

.cover-page::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--accent), var(--primary-light), var(--accent));
}

.cover-logo {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 2rem;
    border: 2px solid rgba(255,255,255,0.3);
}

.cover-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-inverse);
    margin-bottom: 0.5em;
    max-width: 700px;
    line-height: 1.3;
}

.cover-subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 2rem;
    max-width: 600px;
}

.cover-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* Sommaire */
.toc {
    padding: 3rem;
}

.toc h2 {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
}

.toc-list {
    list-style: none;
    padding: 0;
    counter-reset: toc;
}

.toc-list > li {
    counter-increment: toc;
    margin-bottom: 0;
}

.toc-list > li > a {
    display: flex;
    align-items: baseline;
    padding: 0.75rem 0;
    border-bottom: 1px dotted var(--border);
    color: var(--text);
    text-decoration: none;
    transition: var(--transition-fast);
}

.toc-list > li > a:hover {
    color: var(--primary);
    padding-left: 8px;
}

.toc-list > li > a::before {
    content: "Unité " counter(toc) " —";
    font-weight: 700;
    color: var(--primary);
    margin-right: 0.75rem;
    white-space: nowrap;
}

.toc-annexes {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border);
    list-style: none;
    padding-left: 0;
}

.toc-annexes li a {
    display: block;
    padding: 0.5rem 0;
    color: var(--text-light);
    text-decoration: none;
}

.toc-annexes li a:hover { color: var(--primary); }

/* Contenu des unités */
.support-content {
    padding: 3rem;
}

.unite-header {
    background: var(--primary-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    border-left: 5px solid var(--primary);
}

.unite-header .unite-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--text-inverse);
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.unite-header h2 {
    margin-bottom: 0.3em;
    font-size: 1.4rem;
}

.unite-header .unite-duree {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.unite-header .objectifs {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.unite-header .objectifs h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin-bottom: 0.5em;
}

/* Sous-sections */
.support-content h3 {
    color: var(--primary);
    font-size: 1.15rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-bg);
}

.support-content h4 {
    color: var(--primary-dark);
    font-size: 1rem;
    margin: 1.5rem 0 0.75rem;
}

.support-content p {
    text-align: justify;
    margin-bottom: 0.75em;
    font-size: 0.95rem;
}

.support-content ul, .support-content ol {
    margin-bottom: 1em;
    font-size: 0.95rem;
}

.support-content li {
    margin-bottom: 0.3em;
}

/* Encadrés réglementaires */
.encadre {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.encadre-titre {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 0.5em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.encadre-reglementaire {
    border-left: 4px solid var(--primary);
    background: var(--primary-bg);
}

.encadre-attention {
    border-left: 4px solid var(--warning);
    background: var(--warning-light);
}

.encadre-pratique {
    border-left: 4px solid var(--accent);
    background: #e8f8f0;
}

.encadre-interdit {
    border-left: 4px solid var(--danger);
    background: var(--danger-light);
}

/* Annexes */
.annexe {
    padding: 2rem 3rem;
    border-top: 2px solid var(--border);
}

.annexe h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* Navigation support */
.support-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 3rem;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
}

.support-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Print button */
.print-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
    flex-direction: column;
    align-items: flex-end;
}

.print-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(26,82,118,0.3);
    transition: var(--transition);
}

.print-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26,82,118,0.4);
}

.print-btn svg { width: 18px; height: 18px; }

.print-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: white;
    padding: 6px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Responsive support */
@media (max-width: 768px) {
    .support-content, .toc, .annexe { padding: 1.5rem; }
    .cover-page { padding: 2rem 1.5rem; min-height: 50vh; }
    .cover-title { font-size: 1.5rem; }
    .support-nav { padding: 1rem 1.5rem; }
    .print-controls { top: auto; bottom: 20px; right: 15px; }
}
