/* brochure.css — Styles print A4 brochure Enerlab Academy (refonte V3 2026-05-24)
 * Format : A4 portrait, 8 pages
 * Polices : Fraunces (h1, h2 cover, headings), Source Sans 3 (body), JetBrains Mono (eyebrow/labels)
 * Palette V3 : --ink #0a1628, --blue #0055a4, --accent #d97706, --paper #fbfaf6, --rule #e6e8ed
 */

@page {
    size: A4 portrait;
    margin: 18mm;
}

@page :first {
    margin: 0; /* cover full-bleed */
}

* { box-sizing: border-box; }

body {
    font-family: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 10pt;
    line-height: 1.55;
    color: #0a1628;
    margin: 0;
    padding: 0;
}

h1, h2 {
    color: #0a1628;
    margin-top: 0;
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-weight: 500;
    letter-spacing: -0.012em;
}
h1 { font-size: 28pt; margin: 0 0 12pt; }
h2 {
    font-size: 18pt;
    margin: 0 0 8pt;
    border-bottom: 1pt solid #d97706;
    padding-bottom: 4pt;
}
h3 {
    font-size: 12pt;
    color: #0055a4;
    margin: 6pt 0 3pt;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
}
h4 {
    font-size: 10pt;
    color: #0055a4;
    margin: 4pt 0 2pt;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
}

p { margin: 0 0 6pt; }

em, i { font-style: italic; color: #0055a4; }

.page {
    page-break-after: always;
    min-height: 257mm;
    position: relative;
    padding-bottom: 14mm; /* footer space */
}
.page:last-child { page-break-after: auto; }

.cover {
    page-break-after: always;
    background: linear-gradient(135deg, #0a1628 0%, #0055a4 65%, #003d7a 100%);
    color: #fbfaf6;
    padding: 30mm 25mm;
    height: 297mm;
    margin: 0;
    position: relative;
}
.cover h1 {
    color: #fbfaf6;
    font-size: 38pt;
    margin-bottom: 6pt;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    letter-spacing: -0.018em;
}
.cover .eyebrow {
    font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
    font-size: 9pt;
    letter-spacing: 2.5pt;
    text-transform: uppercase;
    opacity: 0.85;
    margin: 0 0 22pt;
}
.cover .subtitle { font-size: 14pt; opacity: 0.92; font-style: italic; }
.cover .badge {
    display: inline-block;
    background: rgba(217,119,6,0.18);
    border: 0.5pt solid rgba(217,119,6,0.6);
    padding: 3.5mm 6mm;
    border-radius: 1mm;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 8.5pt;
    letter-spacing: 0.8pt;
    text-transform: uppercase;
    margin-top: 12mm;
}
.cover .logo-zone {
    position: absolute;
    bottom: 20mm; left: 25mm; right: 25mm;
    text-align: center;
    color: rgba(251,250,246,0.85);
    font-family: 'JetBrains Mono', monospace;
    font-size: 8.5pt;
    letter-spacing: 0.4pt;
    padding-top: 4mm;
    border-top: 0.5pt solid rgba(251,250,246,0.25);
}

.kpi-row {
    display: flex; gap: 4mm;
    margin: 6mm 0;
    background: #fbfaf6;
    padding: 5mm;
    border-radius: 1mm;
    border-left: 1mm solid #d97706;
}
.kpi { flex: 1; text-align: center; }
.kpi-value {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22pt;
    font-weight: 500;
    color: #0055a4;
    line-height: 1;
    letter-spacing: -0.018em;
}
.kpi-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 7pt;
    color: #5a6577;
    letter-spacing: 0.4pt;
    text-transform: uppercase;
    margin-top: 3pt;
}

.step {
    display: flex; gap: 4mm;
    margin-bottom: 4mm;
    break-inside: avoid;
}
.step-n {
    flex-shrink: 0;
    width: 9mm; height: 9mm;
    border-radius: 1mm;
    background: #0055a4;
    color: #fbfaf6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 11pt;
}
.step-content { flex: 1; }
.step-content h4 { color: #0a1628; font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 11pt; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 3mm 0;
    font-size: 9pt;
}
th, td {
    padding: 2.5mm 3mm;
    text-align: left;
    border-bottom: 0.3pt solid #e6e8ed;
    vertical-align: top;
}
th {
    background: #0a1628;
    color: #fbfaf6;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    font-size: 8pt;
    letter-spacing: 0.4pt;
    text-transform: uppercase;
}
tr.total {
    background: rgba(0,85,164,.08);
    font-weight: 700;
    color: #0055a4;
}
td.right, th.right { text-align: right; }

.pillars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5mm;
    margin-top: 5mm;
}
.pillar {
    background: #fbfaf6;
    border-top: 1mm solid #0055a4;
    padding: 4mm 5mm;
    border-radius: 0;
    break-inside: avoid;
}
.pillar h3 {
    color: #0a1628;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 11pt;
    margin-bottom: 2pt;
}
.pillar p { font-size: 9pt; color: #2d3748; }

.filieres {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4mm;
}
.filiere {
    background: #fff;
    border: 0.5pt solid #e6e8ed;
    border-top: 1mm solid #0055a4;
    padding: 4mm;
    border-radius: 0;
    break-inside: avoid;
}
.filiere h3 {
    color: #0a1628;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 10pt;
    margin-bottom: 2pt;
}
.filiere p { font-size: 8.5pt; color: #5a6577; margin: 0; }

.contact-block {
    background: #fbfaf6;
    padding: 6mm;
    border-radius: 0;
    border-left: 1mm solid #d97706;
    margin: 5mm 0;
}
.contact-block h3 {
    color: #0a1628;
    margin-top: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
}

.qr-block {
    display: flex;
    gap: 5mm;
    align-items: center;
    background: #fbfaf6;
    padding: 5mm;
    border-radius: 0;
    border-left: 1mm solid #0055a4;
    margin-top: 6mm;
    break-inside: avoid;
}
.qr-block img { width: 30mm; height: 30mm; }

.footer-meta {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 7pt;
    color: #5a6577;
    letter-spacing: 0.3pt;
    border-top: 0.3pt solid #e6e8ed;
    padding-top: 2mm;
}
.footer-meta .left { float: left; }
.footer-meta .right { float: right; }
.footer-meta::after { content: ""; display: block; clear: both; }

.callout {
    background: #fbfaf6;
    border-left: 1mm solid #d97706;
    padding: 4mm 5mm;
    border-radius: 0;
    margin: 4mm 0;
    font-size: 9.5pt;
    color: #2d3748;
}

blockquote {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    color: #2d3748;
    border-left: 1mm solid #0055a4;
    padding-left: 5mm;
    margin: 0 0 6mm;
    font-size: 11pt;
    line-height: 1.55;
}
blockquote footer {
    font-family: 'JetBrains Mono', monospace;
    font-style: normal;
    font-size: 8pt;
    color: #0055a4;
    margin-top: 3mm;
    letter-spacing: 0.4pt;
    text-transform: uppercase;
}

a { color: #0055a4; text-decoration: none; border-bottom: 0.3pt solid currentColor; }
a:hover { text-decoration: none; color: #003d7a; }

/* Print-only utilities */
.no-print { display: none !important; }

@media screen {
    body { background: #e6e8ed; padding: 8mm 0; }
    .page {
        background: #fff;
        margin: 5mm auto;
        max-width: 210mm;
        box-shadow: 0 2mm 8mm rgba(10,22,40,.18);
        padding: 18mm;
    }
    .cover { margin: 5mm auto; max-width: 210mm; box-shadow: 0 2mm 8mm rgba(10,22,40,.18); padding: 30mm 25mm; height: 297mm; }
    .print-bar {
        position: fixed; top: 0; left: 0; right: 0;
        background: #0a1628;
        color: #fbfaf6;
        padding: 12px 20px;
        font-family: 'JetBrains Mono', 'Consolas', monospace;
        font-size: 12px;
        letter-spacing: 0.5px;
        z-index: 999;
        box-shadow: 0 1px 0 #d97706, 0 4px 12px rgba(10,22,40,.25);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 16px;
    }
    .print-bar button {
        background: #d97706;
        color: #0a1628;
        border: none;
        padding: 8px 22px;
        border-radius: 2px;
        cursor: pointer;
        font-weight: 600;
        font-family: 'JetBrains Mono', monospace;
        font-size: 11px;
        letter-spacing: 1px;
        text-transform: uppercase;
    }
    .print-bar button:hover { background: #b25f04; }
    body { padding-top: 56px; }
}

@media print {
    .print-bar { display: none !important; }
}
