/* Diplôme de finisher (app/views/diploma_card.php) : A4 paysage, une page par diplôme à l'impression. */
@page {
    size: A4 landscape;
    margin: 0;
}

body.diploma-page {
    background: #e9ecef;
    margin: 0;
    font-family: Inter, system-ui, sans-serif;
}

.diploma-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    padding: 1rem;
}

.diploma {
    --diploma-accent: #0d6efd;
    --diploma-accent-contrast: #fff;
    width: 297mm;
    height: 210mm;
    max-width: 100%;
    margin: 0 auto 1.5rem;
    padding: 12mm;
    background: #fff;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .12);
    box-sizing: border-box;
    color: #1d2433;
    break-after: page;
}

.diploma-frame {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 3px solid var(--diploma-accent);
    border-radius: 6mm;
    padding: 10mm 14mm;
    box-sizing: border-box;
}

.diploma-head {
    display: flex;
    align-items: center;
    gap: 8mm;
}

.diploma-logo {
    width: 26mm;
    height: 26mm;
    object-fit: contain;
}

.diploma-overline {
    color: var(--diploma-accent);
    font-size: 11pt;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.diploma-event {
    font-size: 22pt;
    font-weight: 800;
    line-height: 1.15;
}

.diploma-date {
    color: #5c6577;
    font-size: 12pt;
}

.diploma-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.diploma-label {
    color: #5c6577;
    font-size: 13pt;
    font-style: italic;
}

.diploma-name {
    font-size: 36pt;
    font-weight: 800;
    line-height: 1.1;
    margin: 2mm 0 3mm;
}

.diploma-race {
    font-size: 14pt;
}

.diploma-time {
    margin: 7mm 0 5mm;
    padding: 3mm 10mm;
    border-radius: 4mm;
    background: var(--diploma-accent);
    color: var(--diploma-accent-contrast);
}

.diploma-time span {
    font-size: 34pt;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.diploma-time small {
    display: block;
    font-size: 12pt;
    opacity: .85;
}

.diploma-ranks {
    display: flex;
    gap: 12mm;
    list-style: none;
    margin: 0;
    padding: 0;
}

.diploma-ranks li {
    font-size: 13pt;
}

.diploma-ranks strong {
    font-size: 20pt;
}

.diploma-ranks span {
    display: block;
    color: #5c6577;
    font-size: 10pt;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.diploma-foot {
    display: flex;
    justify-content: space-between;
    color: #5c6577;
    font-size: 10pt;
}

@media screen and (max-width: 1100px) {
    .diploma {
        width: auto;
        height: auto;
        aspect-ratio: 297 / 210;
        padding: 3%;
    }

    .diploma-frame {
        padding: 4% 5%;
    }

    .diploma-event { font-size: clamp(1rem, 3vw, 1.8rem); }
    .diploma-name { font-size: clamp(1.4rem, 5vw, 3rem); }
    .diploma-time span { font-size: clamp(1.4rem, 5vw, 2.8rem); }
    .diploma-race, .diploma-ranks li { font-size: clamp(.8rem, 1.8vw, 1.1rem); }
    .diploma-ranks strong { font-size: clamp(1rem, 2.6vw, 1.6rem); }
    .diploma-logo { width: 12vw; height: 12vw; max-width: 26mm; max-height: 26mm; }
}

@media print {
    body.diploma-page { background: #fff; }
    .diploma-toolbar { display: none; }
    .diploma { box-shadow: none; margin: 0; width: 297mm; height: 210mm; aspect-ratio: auto; padding: 12mm; }
}
