/* Page /permis-de-feu-vierge — document vierge imprimable A4 */

.pv-intro {
    padding: 2.5rem 0 1.5rem;
    background: #fff;
}

.pv-intro h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.2;
    color: #0f172a;
    margin-bottom: 1rem;
}

.pv-lead {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #334155;
    max-width: 60ch;
}

.pv-lead strong { color: #0f172a; }

.pv-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin: 1.5rem 0 0.5rem;
}

.pv-note {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
}

.pv-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin: 2rem 0 0;
}

.pv-fact {
    border: 1px solid #e2e8f0;
    border-left: 4px solid #dc2626;
    border-radius: 0.5rem;
    padding: 1rem 1.125rem;
    background: #fff;
}

.pv-fact h3 {
    font-size: 1rem;
    color: #0f172a;
    margin-bottom: 0.375rem;
}

.pv-fact p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #475569;
    margin: 0;
}

.pv-body {
    padding: 2.5rem 0;
    background: #f8fafc;
}

.pv-prose {
    max-width: 820px;
    margin: 0 auto;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #334155;
}

.pv-prose h2 {
    font-size: 1.5rem;
    color: #0f172a;
    margin: 2rem 0 0.75rem;
}

.pv-prose h3 {
    font-size: 1.125rem;
    color: #0f172a;
    margin: 1.5rem 0 0.5rem;
}

.pv-prose p { margin: 0 0 1rem; }
.pv-prose ul, .pv-prose ol { margin: 0 0 1rem 1.25rem; }
.pv-prose li { margin-bottom: 0.375rem; }

.pv-table-wrap { overflow-x: auto; margin: 0 0 1.5rem; }

.pv-compare {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    background: #fff;
}

.pv-compare caption {
    caption-side: top;
    text-align: left;
    font-size: 0.875rem;
    color: #64748b;
    padding-bottom: 0.5rem;
}

.pv-compare th,
.pv-compare td {
    border: 1px solid #e2e8f0;
    padding: 0.625rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.pv-compare thead th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 600;
}

.pv-compare tbody th {
    font-weight: 500;
    color: #334155;
    background: #fbfdff;
}

/* ─── Document vierge ─────────────────────────────────────── */

.pv-doc-wrap {
    padding: 2.5rem 0;
    background: #e2e8f0;
}

.pv-doc-head {
    max-width: 210mm;
    margin: 0 auto 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.pv-doc-head p {
    font-size: 0.875rem;
    color: #475569;
    margin: 0;
}

#permisVierge {
    background: #fff;
    width: 210mm;
    max-width: 100%;
    margin: 0 auto;
    padding: 14mm 12mm;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.12);
    font-family: Arial, Helvetica, sans-serif;
    color: #1e293b;
    font-size: 10.5px;
    line-height: 1.45;
}

#permisVierge h2 {
    font-size: 17px;
    text-align: center;
    color: #dc2626;
    letter-spacing: 0.06em;
    margin: 0 0 2px;
    font-weight: 800;
}

#permisVierge .pv-doc-sub {
    text-align: center;
    font-size: 9.5px;
    color: #64748b;
    margin-bottom: 2px;
}

#permisVierge .pv-doc-legal {
    text-align: center;
    font-size: 8px;
    color: #94a3b8;
    font-style: italic;
    margin-bottom: 10px;
}

#permisVierge h3 {
    font-size: 11.5px;
    font-weight: 700;
    color: #1e293b;
    border-bottom: 2px solid #dc2626;
    padding-bottom: 3px;
    margin: 12px 0 6px;
}

#permisVierge h4 {
    font-size: 10px;
    font-weight: 700;
    color: #475569;
    margin: 8px 0 4px;
}

#permisVierge table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9.5px;
    margin-bottom: 6px;
}

#permisVierge th,
#permisVierge td {
    border: 1px solid #cbd5e1;
    padding: 4px 6px;
    text-align: left;
    vertical-align: top;
}

#permisVierge thead th {
    background: #f1f5f9;
    font-weight: 700;
    color: #334155;
}

#permisVierge .pv-fill { height: 18px; }
#permisVierge .pv-fill-lg { height: 30px; }
#permisVierge .pv-lbl { width: 34%; background: #f8fafc; font-weight: 600; color: #334155; }
#permisVierge .pv-tick { width: 52px; text-align: center; font-size: 12px; color: #94a3b8; }

#permisVierge .pv-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

#permisVierge .pv-sigs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

#permisVierge .pv-sig {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 6px;
}

#permisVierge .pv-sig strong {
    display: block;
    font-size: 9.5px;
    color: #dc2626;
    margin-bottom: 4px;
}

#permisVierge .pv-sig span {
    display: block;
    font-size: 8.5px;
    color: #64748b;
    margin-bottom: 2px;
}

#permisVierge .pv-sig-box {
    height: 46px;
    border-bottom: 1px solid #334155;
}

#permisVierge .pv-rules {
    margin-top: 10px;
    padding: 6px 8px;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    background: #fffbeb;
    font-size: 8.5px;
    color: #475569;
}

#permisVierge .pv-rules p { margin: 0 0 2px; }
#permisVierge .pv-rules strong { color: #1e293b; }

#permisVierge .pv-doc-foot {
    margin-top: 10px;
    padding-top: 6px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 7.5px;
    color: #94a3b8;
}

/* ─── FAQ ─────────────────────────────────────────────────── */

.pv-faq {
    padding: 2.5rem 0 3.5rem;
    background: #fff;
}

.pv-faq-item {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.125rem 0;
}

.pv-faq-item h3 {
    font-size: 1.0625rem;
    color: #0f172a;
    margin-bottom: 0.375rem;
}

.pv-faq-item p {
    font-size: 1rem;
    line-height: 1.7;
    color: #475569;
    margin: 0;
}

.pv-updated {
    font-size: 0.8125rem;
    color: #64748b;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    #permisVierge { padding: 8mm 6mm; font-size: 10px; }
    #permisVierge .pv-cols,
    #permisVierge .pv-sigs { grid-template-columns: 1fr; }
    .pv-doc-wrap { padding: 1.5rem 0; }
}

/* À l'impression, seul le document sort de l'imprimante.
   display:none (et pas visibility:hidden) : sinon les blocs masqués
   réservent leur hauteur et l'on imprime des pages blanches derrière. */
@media print {
    body > *:not(.main-content) { display: none !important; }
    .main-content > *:not(.pv-doc-wrap) { display: none !important; }
    .pv-doc-head { display: none !important; }

    .pv-doc-wrap { padding: 0; background: #fff; }
    .pv-doc-wrap .container { max-width: none; width: auto; padding: 0; margin: 0; }

    #permisVierge {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        box-shadow: none;
        font-size: 9px;
        line-height: 1.35;
    }

    #permisVierge h2 { font-size: 15px; }
    #permisVierge h3 { font-size: 10.5px; margin: 8px 0 4px; }
    #permisVierge h4 { font-size: 9px; margin: 6px 0 3px; }
    #permisVierge table { font-size: 8.5px; }
    #permisVierge th, #permisVierge td { padding: 3px 5px; }
    #permisVierge .pv-fill { height: 15px; }
    #permisVierge .pv-fill-lg { height: 26px; }
    #permisVierge .pv-sig-box { height: 40px; }

    /* Ne jamais couper une section, un tableau ou un cadre de signature */
    #permisVierge h3,
    #permisVierge h4,
    #permisVierge table,
    #permisVierge .pv-sigs,
    #permisVierge .pv-sig,
    #permisVierge .pv-rules { break-inside: avoid; page-break-inside: avoid; }
    #permisVierge h3, #permisVierge h4 { break-after: avoid; page-break-after: avoid; }

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