/* ================================================================
   HISTORIQUE COTISATION MEMBRE
   VERSION STATIQUE
   ================================================================ */


/* ----------------------------------------------------------------
   RESET LOCAL
   ---------------------------------------------------------------- */

.cotisation-page-wrapper,
.cotisation-page-wrapper * {
    box-sizing: border-box;
}


/* ----------------------------------------------------------------
   PAGE / FOND
   ---------------------------------------------------------------- */

.cotisation-page-wrapper {
    width: 100%;
    min-height: 100vh;

    background: #ffffff;

    display: flex;
    justify-content: center;
    align-items: flex-start;

    padding: 8px;
}


/* ----------------------------------------------------------------
   DOCUMENT A4
   ---------------------------------------------------------------- */

.cotisation-document {
    position: relative;

    width: 210mm;
    min-height: 297mm;

    background: #ffffff;

    border: 1px solid #777;

    padding: 8mm 8mm 5mm 8mm;

    color: #111;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 9px;

    line-height: 1.15;

    overflow: hidden;
}


/* ----------------------------------------------------------------
   HEADER
   ---------------------------------------------------------------- */

.document-header {
    position: relative;

    width: 100%;

    height: 39mm;
}


/* ----------------------------------------------------------------
   LOGO
   ---------------------------------------------------------------- */

.logo-zone {
    position: absolute;

    left: 17mm;
    top: 1mm;

    width: 31mm;
    height: 23mm;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow: hidden;
}

.fbd-logo {
    width: 25mm;
    height: 25mm;

    object-fit: contain;

    display: block;
}


/* ----------------------------------------------------------------
   ORGANISATION
   ---------------------------------------------------------------- */

.organisation-info {
    position: absolute;

    left: 11mm;
    top: 25mm;

    width: 65mm;

    text-align: center;

    font-size: 8px;

    line-height: 1.35;

    white-space: nowrap;
}


/* ----------------------------------------------------------------
   DATE IMPRESSION
   ---------------------------------------------------------------- */

.print-info {
    position: absolute;

    right: 22mm;
    top: 7mm;

    width: 58mm;

    text-align: left;

    font-size: 8px;

    white-space: nowrap;
}


/* ----------------------------------------------------------------
   INFORMATIONS MEMBRE
   ---------------------------------------------------------------- */

.member-summary {
    width: 100%;

    height: 28mm;

    position: relative;
}


/* ----------------------------------------------------------------
   BLOC GAUCHE
   ---------------------------------------------------------------- */

.member-left {
    position: absolute;

    left: 1mm;
    top: 0;

    width: 88mm;
}


/* ----------------------------------------------------------------
   LIGNES INFORMATIONS
   ---------------------------------------------------------------- */

.info-line {
    display: grid;

    grid-template-columns:
        35mm
        5mm
        auto;

    min-height: 5.2mm;

    align-items: center;

    font-size: 8px;
}


.info-label {
    text-align: left;
}


.info-colon {
    text-align: center;
}


.info-value {
    text-align: left;

    white-space: nowrap;
}


/* ----------------------------------------------------------------
   BLOC DROIT
   ---------------------------------------------------------------- */

.member-right {
    position: absolute;

    right: 1mm;
    top: 0;

    width: 77mm;
}


.financial-line {
    display: grid;

    grid-template-columns:
        42mm
        5mm
        auto;

    min-height: 5.2mm;

    align-items: center;

    font-size: 8px;

    white-space: nowrap;
}


/* ----------------------------------------------------------------
   TITRE
   ---------------------------------------------------------------- */

.history-title {
    width: 100%;

    text-align: center;

    font-weight: 700;

    font-size: 9px;

    margin-top: 1mm;

    margin-bottom: 2.5mm;

    line-height: 1.1;
}


/* ----------------------------------------------------------------
   TABLEAU
   ---------------------------------------------------------------- */

.history-table-wrapper {
    width: 100%;

    overflow: hidden;
}


.history-table {
    width: 100%;

    border-collapse: collapse;

    table-layout: fixed;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 7.3px;

    color: #111;
}


/* ----------------------------------------------------------------
   COLONNES
   ---------------------------------------------------------------- */

.history-table .date-column {
    width: 16%;
}

.history-table .label-column {
    width: 43%;
}

.history-table .piece-column {
    width: 17%;

}

.history-table .amount-column {
    width: 8%;

}


/* ----------------------------------------------------------------
   CELLULES
   ---------------------------------------------------------------- */

.history-table th,
.history-table td {
    border: 1px solid #222;

    padding: 1.2mm 1mm;

    vertical-align: middle;

    line-height: 1.05;

    overflow: hidden;
}


/* ----------------------------------------------------------------
   ENTÊTE TABLEAU
   ---------------------------------------------------------------- */

.history-table thead th {
    height: 9mm;

    background: #ffffff;

    font-weight: 400;

    text-align: center;

    vertical-align: middle;

    white-space: nowrap;
}


/* ----------------------------------------------------------------
   DONNÉES
   ---------------------------------------------------------------- */

.history-table tbody td {
    height: 6.8mm;

    font-weight: 400;

    text-align: left;
}


/* ----------------------------------------------------------------
   CELLULES NUMÉRIQUES
   ---------------------------------------------------------------- */

.history-table td.number {
    text-align: right;

    white-space: nowrap;

    padding-right: 1.5mm;
}


/* ----------------------------------------------------------------
   DATE
   ---------------------------------------------------------------- */

.history-table tbody td:first-child {
    text-align: left;

    white-space: nowrap;
}


/* ----------------------------------------------------------------
   N° PIÈCE
   ---------------------------------------------------------------- */

.history-table tbody td:nth-child(3) {
    text-align: center;

    white-space: nowrap;
}


/* ----------------------------------------------------------------
   LIBELLÉ
   ---------------------------------------------------------------- */

.history-table tbody td:nth-child(2) {
    text-align: left;

    white-space: normal;

    word-break: normal;
}


/* ----------------------------------------------------------------
   FOOTER
   ---------------------------------------------------------------- */

.document-footer {
    width: 100%;

    margin-top: 2mm;

    display: flex;

    justify-content: space-between;

    align-items: center;

    font-size: 7px;

    line-height: 1;
}


.footer-left {
    text-align: left;
}


.footer-right {
    text-align: right;

    white-space: nowrap;
}


/* ----------------------------------------------------------------
   IMPRESSION
   ---------------------------------------------------------------- */

@media print {

    @page {
        size: A4 portrait;

        margin: 0;
    }


    html,
    body {
        margin: 0 !important;

        padding: 0 !important;

        width: 210mm;

        height: 297mm;

        background: #ffffff !important;
    }


    .cotisation-page-wrapper {
        width: 210mm;

        min-height: 297mm;

        padding: 0;

        margin: 0;

        display: block;

        background: #ffffff;
    }


    .cotisation-document {
        width: 210mm;

        min-height: 297mm;

        height: 297mm;

        margin: 0;

        border: 1px solid #777;

        padding: 8mm 8mm 5mm 8mm;

        box-shadow: none;

        overflow: hidden;
    }


    .history-table {
        break-inside: auto;
    }


    .history-table tr {
        break-inside: avoid;

        page-break-inside: avoid;
    }


    .history-table thead {
        display: table-header-group;
    }


    .history-table tfoot {
        display: table-footer-group;
    }
}


/* ----------------------------------------------------------------
   ÉCRAN
   ---------------------------------------------------------------- */

@media screen {

    .cotisation-document {
        box-shadow:
            0 0 5px rgba(0, 0, 0, 0.18);
    }
}
