    @font-face {
        font-family: 'Stamp18';
        src: url('/stamp/font/stamped18.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp19';
        src: url('/stamp/font/stamped19.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp20';
        src: url('/stamp/font/stamped20.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp21';
        src: url('/stamp/font/stamped21.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp22';
        src: url('/stamp/font/stamped22.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp23';
        src: url('/stamp/font/stamped23.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp24';
        src: url('/stamp/font/stamped24.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp25';
        src: url('/stamp/font/stamped25.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp2';
        src: url('/stamp/font/stamped2.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp3';
        src: url('/stamp/font/stamped3.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp4';
        src: url('/stamp/font/stamped4.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp5';
        src: url('/stamp/font/stamped5.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp6';
        src: url('/stamp/font/stamped6.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp7';
        src: url('/stamp/font/stamped7.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp8';
        src: url('/stamp/font/stamped8.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp11';
        src: url('/stamp/font/stamped11.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp12';
        src: url('/stamp/font/stamped12.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp13';
        src: url('/stamp/font/stamped13.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp14';
        src: url('/stamp/font/stamped14.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp15';
        src: url('/stamp/font/stamped15.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp16';
        src: url('/stamp/font/stamped16.woff2') format('woff2');
    }

    @font-face {
        font-family: 'Stamp17';
        src: url('/stamp/font/stamped17.woff2') format('woff2');
    }

.contenu {
    font-family: 'Arial', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
}

    .facture-container1 {
        width: 100%;
        max-width: 600px;
        padding: 20px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        background-color: white;
        border-radius: 8px;
    }

    .facture-invoice-content {
        width: 100%;
        max-width: 984px;
        /* ratio par défaut (stamp.webp) */
        aspect-ratio: var(--invoice-ratio, 984 / 1500);
        background-image: url('/stamp/facturette.webp');
        background-size: cover;
        /* important */
        background-repeat: no-repeat;
        background-position: center;
        position: relative;
        overflow: hidden;
        box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
    }

    .facture-invoice-content.custom-bg {
        background-size: contain;
        background-position: center;
        /* Centre l'image importée */
        box-shadow: none;
    }

    .facture-draggable {
        cursor: move;
        display: inline-block;
        position: absolute;
        line-height: 1;
    }

    .facture-editable:hover {
        border: none;
    }

    .facture-text-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 5px;
        margin: 5px 0;
        border: 1px dashed #000;
        border-radius: 4px;
    }

    .facture-text-item button {
        margin-left: 5px;
    }

    .facture-text-item i,
    .facture-text-item .delete-btn {
        cursor: pointer;
    }

    .facture-slider-container {
        display: flex;
        justify-content: center;
    }

    .facture-slider-container label {
        margin-right: 10px;
    }

    .facture-slider {
        -webkit-appearance: none;
        width: 50px;
        height: 24px;
        background: #ff0000;
        outline: none;
        opacity: 0.7;
        transition: .4s;
        border-radius: 34px;
        position: relative;
    }

    .facture-slider:before {
        content: '';
        position: absolute;
        height: 20px;
        width: 20px;
        left: 2px;
        bottom: 2px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

    .facture-slider:checked {
        background-color: #4CAF50;
    }

    .facture-slider:checked:before {
        transform: translateX(26px);
    }

    .facture-stamp-options {
        display: block;
    }

    .facture-stamp-options input,
    .facture-stamp-options select,
    .facture-stamp-options button {
        margin-top: 0px;
    }

    .center-container {
        display: flex;
        justify-content: center;
        margin: 20px 0;
        /* Vous pouvez ajuster cette marge selon vos besoins */
    }

    .facture-options-group {
        display: flex;
        gap: 5px;
    }

    .facture-options-group .form-group {
        flex: 1 1 0;
    }

    .facture-options-group .form-group.flex-70 {
        flex: 0 0 70%;
    }

    .facture-options-group .form-group.flex-30 {
        flex: 0 0 30%;
    }

    .facture-options-group .form-group.flex-50 {
        flex: 0 0 50%;
    }

    #stampSizeValue,
    #stampRotationValue {
        display: inline-block;
        margin-left: 10px;
        font-size: 1rem;
    }

    .facture-options-group .form-group.flex-60 {
        flex: 0 0 60%;
    }

    .facture-options-group .form-group.flex-40 {
        flex: 0 0 40%;
    }

    @media (min-width: 769px) {
        #fontSizeChoice option[value="46px"] {
            font-size: 46px;
        }
    }

    @media (max-width: 768px) {
        #fontSizeChoice option[value="28px"] {
            font-size: 28px;
        }
    }

    .progress {
        height: 25px;
        background-color: #e9ecef;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
        width: 100%;
    }

    .progress-bar {
        height: 100%;
        background-color: #28a745;
        transition: width 0.4s ease;
    }

    .image-option {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 10px;
        margin-bottom: 10px;
        transition: border-color 0.3s, background-color 0.3s;
    }

    .image-option i {
        margin-right: 8px;
    }

    .image-option.active {
        border-color: #28a745;
        background-color: #e9f7ef;
    }

    .new-image-item.active {
        border: 2px solid green;
        padding: 2px;
        border-radius: 5px;
    }



    #downloadPNG {
        display: none;
        /* Masquer le bouton Télécharger le tampon par défaut */
    }

    /* Styles pour le fond opaque derrière le popup */
    .popup-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 9998;
    }

    /* Styles pour le popup lui-même */
    .popup {
        display: none;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: white;
        padding: 30px;
        box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.3);
        border-radius: 15px;
        z-index: 9999;
        width: 400px;
        max-width: 90%;
        text-align: center;
    }

    /* Style pour le bouton de fermeture du popup */
    .popup .close-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        cursor: pointer;
        font-size: 24px;
    }

    /* Style pour l'icône info */
    .popup .info-btn {
        display: inline-block;
        margin-top: 15px;
        cursor: pointer;
        color: #007bff;
        font-size: 18px;
        text-decoration: underline;
    }

    /* Style pour le message d'information */
    .popup .info-msg {
        display: none;
        margin-top: 15px;
        font-size: 16px;
        color: #333;
    }

    /* Ajustements pour les petits écrans */
    @media (max-width: 768px) {
        .popup {
            width: 90%;
            padding: 20px;
        }

        .popup .close-btn {
            font-size: 20px;
        }

        .popup .info-btn,
        .popup .info-msg {
            font-size: 14px;
        }
    }

    /* Barre de progression fixe en haut */
    #progressBarContainer {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        /* fine */
        background: rgba(0, 0, 0, .08);
        /* léger fond */
        z-index: 99999;
    }

    #progressBar {
        height: 100%;
        width: 0%;
        transition: width .15s linear;
        /* animation fluide */
    }

    #stamp .stamp-svg-layer svg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        display: block;
    }
