/* Annexes : pages de référence défilantes (glossaire, ressources, aide-mémoire) */

:root {
    --seanergy-blue: #0066cc;
    --seanergy-dark-blue: #003d7a;
    --seanergy-orange: #ff6b35;
    --seanergy-green: #00d084;
    --seanergy-yellow: #ffd93d;
    --border-color: #d5dbdb;
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-attachment: fixed;
    color: white;
    min-height: 100vh;
    padding: 2rem;
}

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

.back-link {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: rgba(255,255,255,0.8); text-decoration: none;
    margin-bottom: 2rem; font-size: 0.95rem;
}
.back-link:hover { color: white; }

.annex-header {
    text-align: center;
    margin-bottom: 2rem; padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}
.annex-header h1 { font-size: 2.4rem; font-weight: 600; margin-bottom: 0.6rem; }
.annex-header p { font-size: 1.2rem; color: var(--seanergy-yellow); }

.annex-toc {
    background: rgba(255,255,255,0.08);
    border-left: 4px solid var(--seanergy-yellow);
    border-radius: 8px;
    padding: 1rem 1.5rem; margin-bottom: 2rem;
}
.annex-toc h2 { font-size: 1.1rem; color: var(--seanergy-yellow); margin-bottom: 0.6rem; }
.annex-toc ul { list-style: none; columns: 3 220px; column-gap: 2rem; }
.annex-toc li { padding: 0.1rem 0; break-inside: avoid; }
.annex-toc a { color: white; text-decoration: none; opacity: 0.9; }
.annex-toc a:hover { opacity: 1; text-decoration: underline; }

.annex-content {
    background: white; color: #263238;
    border-radius: 12px; box-shadow: var(--shadow-lg);
    padding: 2rem 2.5rem; line-height: 1.6;
}
.annex-content h2 {
    color: var(--seanergy-dark-blue); font-size: 1.4rem;
    margin: 2rem 0 0.8rem; padding-bottom: 0.3rem;
    border-bottom: 2px solid #e8f1fc;
    scroll-margin-top: 1rem;
}
.annex-content h2:first-child { margin-top: 0; }
.annex-content h3 { color: var(--seanergy-blue); font-size: 1.1rem; margin: 1.2rem 0 0.5rem; }
.annex-content p, .annex-content ul, .annex-content ol { margin: 0.6rem 0; }
.annex-content ul, .annex-content ol { padding-left: 1.5rem; }
.annex-content a { color: var(--seanergy-blue); }
.annex-content hr { border: none; border-top: 1px solid var(--border-color); margin: 1.5rem 0; }

.annex-content code {
    font-family: 'Fira Code', 'Consolas', monospace; font-size: 0.88em;
    background: #f1f5f9; color: #0f3460; padding: 0.1rem 0.35rem; border-radius: 4px;
}
.annex-content pre {
    background: #1e293b; color: #e2e8f0;
    border-radius: 8px; padding: 1rem 1.2rem; margin: 0.8rem 0;
    overflow-x: auto; font-size: 0.85rem; line-height: 1.5;
}
.annex-content pre code { background: none; color: inherit; padding: 0; font-size: inherit; }

.table-wrap { overflow-x: auto; margin: 0.8rem 0; }
.annex-content table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.annex-content th {
    background: var(--seanergy-dark-blue); color: white;
    text-align: left; padding: 0.6rem 0.8rem;
    position: sticky; top: 0;
}
.annex-content td { padding: 0.5rem 0.8rem; border-bottom: 1px solid #e5e9ec; vertical-align: top; }
.annex-content tr:nth-child(even) td { background: #f8fafc; }
.annex-content td:first-child { font-weight: 600; color: var(--seanergy-dark-blue); }
.annex-content td:last-child:not(:first-child) { white-space: nowrap; }

/* Encadrés (même syntaxe que les modules : > 💡, > ⚠️, …) */
.warning-box, .success-box, .info-box, .content-box {
    border-radius: 8px; padding: 0.7rem 1rem; margin: 0.8rem 0; border-left: 4px solid;
}
.warning-box { background: #fff4ed; border-color: var(--seanergy-orange); }
.success-box { background: #e9fbf3; border-color: var(--seanergy-green); }
.info-box    { background: #e8f1fc; border-color: var(--seanergy-blue); }
.content-box { background: #f8fafc; border-color: var(--border-color); }
.warning-box h3, .success-box h3, .info-box h3, .content-box h3 { margin: 0 0 0.3rem; font-size: 1rem; }
.warning-box p, .success-box p, .info-box p, .content-box p { margin: 0.2rem 0; }

.footer {
    text-align: center; margin-top: 3rem; padding-top: 1.5rem;
    border-top: 2px solid rgba(255, 255, 255, 0.2); opacity: 0.9; font-weight: 300;
}

@media (max-width: 768px) {
    body { padding: 1rem; }
    .annex-header h1 { font-size: 1.6rem; }
    .annex-content { padding: 1.2rem 1rem; }
}

@media print {
    body { background: white; color: black; padding: 0; }
    .back-link, .annex-toc, .footer { display: none; }
    .annex-header { border-color: #ccc; }
    .annex-header p { color: #555; }
    .annex-content { box-shadow: none; padding: 0; }
    .annex-content th { position: static; }
    .annex-content pre { white-space: pre-wrap; }
}
