/* ========================================================= */
/* PAGE A4                                                    */
/* ========================================================= */

.receipt-page {
    width: 210mm;
    min-height: 297mm;

    margin: 0 auto;

    padding-top: 12mm;
    padding-left: 10mm;
    padding-right: 10mm;
    padding-bottom: 10mm;

    background: #ffffff;

    color: #000000;

    font-family: "Times New Roman",
                 Times,
                 serif;

    font-size: 14px;

    box-sizing: border-box;
}


/* ========================================================= */
/* CONTAINER                                                   */
/* ========================================================= */

.receipt-container {
    width: 100%;
    max-width: 190mm;
    margin: 0 auto;
}


/* ========================================================= */
/* HEADER                                                      */
/* ========================================================= */

.receipt-header {
    position: relative;

    width: 100%;

    min-height: 52mm;
}


/* ========================================================= */
/* LOGO                                                        */
/* ========================================================= */

.logo-wrapper {
    position: absolute;
    top: 0;
    left: 0;

    width: 105mm;
    text-align: center;
}

.vecobu-logo {
    display: block;
    width: 32mm;
    height: 32mm;
    object-fit: contain;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2mm;
}


/* ========================================================= */
/* ORGANISATION                                                */
/* ========================================================= */

.organization-info {
    position: absolute;
    top: 32mm;
    left: 0;
}


.organization-info div {
    font-size: 14px;
    line-height: 17px;
    white-space: nowrap;
}


/* ========================================================= */
/* DATE D'IMPRESSION                                           */
/* ========================================================= */

.print-date {
    position: absolute;
    top: 3mm;
    right: 0;

    font-size: 14px;
    white-space: nowrap;
    text-align: right;
}


/* ========================================================= */
/* TITRE                                                       */
/* ========================================================= */

.receipt-title {
    width: 100%;
    text-align: center;

    font-size: 18px;
    line-height: 22px;
    font-weight: bold;
    text-transform: uppercase;

    margin-top: 4mm;
    margin-bottom: 5mm;
}


/* ========================================================= */
/* CONTENU                                                      */
/* ========================================================= */

.receipt-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 18mm;

    width: 100%;
}


/* ========================================================= */
/* COLONNES                                                     */
/* ========================================================= */

.receipt-column {
    width: 100%;
}

.receipt-column-left {
    min-width: 0;
}

.receipt-column-right {
    min-width: 0;
}


/* ========================================================= */
/* LIGNE                                                        */
/* ========================================================= */

.receipt-row {
    display: grid;
    grid-template-columns: 60mm 4mm 1fr;
    min-height: 7.5mm;
    align-items: center;

    font-size: 14px;
    line-height: 17px;
}


.label {
    text-align: left;
    white-space: nowrap;
}


.colon {
    text-align: center;
    font-weight: normal;
}


.value {
    text-align: left;
    white-space: nowrap;
}


.total-row .label {
    font-weight: bold;
}

.total-row .value {
    font-weight: bold;
}


.description-row {
    margin-top: 8mm;
}

.description-row .value {
    font-style: italic;
    color: #555;
}


/* ========================================================= */
/* SIGNATURES                                                  */
/* ========================================================= */

.receipt-bottom-information {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 18mm;

    width: 100%;
    margin-top: 10mm;
}


.member-signature {
    min-height: 25mm;
    position: relative;
    border: 1px dashed #999;
    border-radius: 4px;
    padding: 6mm 8mm;
    font-size: 14px;
    color: #666;
}


.operator-block {
    min-height: 25mm;
    position: relative;
}


.operator-block div {
    font-size: 14px;
    line-height: 17px;
}


.operator-title {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 14px;
    white-space: nowrap;
}

.operator-name {
    position: absolute;
    left: 0;
    top: 9mm;
    font-size: 14px;
    white-space: nowrap;
}


/* ========================================================= */
/* MESSAGE FINAL                                               */
/* ========================================================= */

.receipt-greeting {
    margin-top: 8mm;
    font-size: 14px;
    line-height: 17px;
}

.greeting-bold {
    font-weight: bold;
    margin-top: 2mm;
}


/* ========================================================= */
/* IMPRESSION                                                  */
/* ========================================================= */

@media print {

    @page {
        size: A4 portrait;
        margin: 0;
    }

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        width: 210mm;
        height: 297mm;
        background: #ffffff !important;
    }

    .receipt-page {
        width: 210mm;
        min-height: 297mm;
        margin: 0;
        padding-top: 12mm;
        padding-left: 10mm;
        padding-right: 10mm;
        padding-bottom: 10mm;
        box-shadow: none !important;
        page-break-after: avoid;
        page-break-inside: avoid;
    }
}


/* ========================================================= */
/* ÉCRAN                                                       */
/* ========================================================= */

@media screen {

    .receipt-page {
        box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
        margin-top: 20px;
        margin-bottom: 20px;
    }
}


/* ========================================================= */
/* PETITS ÉCRANS                                               */
/* ========================================================= */

@media screen and (max-width: 900px) {

    .receipt-page {
        transform-origin: top left;
        width: 210mm;
        margin-left: 10px;
    }
}

.receipt-page.recu-membre .receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-height: 0;
    margin-bottom: 4mm;
}

.receipt-page.recu-membre .header-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 120mm;
}

.receipt-page.recu-membre .logo-wrapper,
.receipt-page.recu-membre .organization-info,
.receipt-page.recu-membre .print-date {
    position: static;
    width: auto;
}

.receipt-page.recu-membre .organization-info div {
    white-space: normal;
}

.receipt-page.recu-membre .receipt-title {
    white-space: normal;
    overflow-wrap: anywhere;
}

.receipt-page.recu-membre .receipt-content,
.receipt-page.recu-membre .receipt-bottom-information {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 8mm;
}

.receipt-page.recu-membre .receipt-row {
    grid-template-columns: 40mm 4mm minmax(0, 1fr);
    align-items: start;
    padding: 1mm 0;
}

.receipt-page.recu-membre .label,
.receipt-page.recu-membre .value {
    white-space: normal;
    overflow-wrap: anywhere;
    min-width: 0;
}

.receipt-page.recu-membre .receipt-greeting {
    text-align: center;
}

@media print {
    body:has(.recu-membre) .page-header {
        display: none !important;
    }

    .receipt-page.recu-membre {
        min-height: 0;
        height: auto;
    }
}
