
.mars-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    overflow: hidden;
    opacity: 0;
    z-index: 1050;
    overscroll-behavior: contain;
    text-align: left;
    font-family: "Open Sans", 'Trebuchet MS', 'Verdana', sans-serif;
}

.mars-modal-dialog {
    position: relative;
    width: unset;
    max-width: unset;
    margin: auto;
    pointer-events: none;
    transform: translate(0, 0);
    max-height: min(var(--size_720px), 100vh); /*max-height de 720px mais 100% de l'écran si sa hauteur est inférieure à 720px*/
}

.mars-modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: var(--background-modal);
    background-clip: padding-box;
    border-radius: var(--size_8px);
    pointer-events: auto;
    outline: 0;
    font-style: normal;
    font-weight: 400;
    font-size: var(--size_16px);
    line-height: 160%;
    color: var(--text-default);
    width: calc(100vw - 2rem);
    max-width: var(--size_624px);
    max-height: calc(100% - 1rem);
}

.mars-modal-header {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    padding: var(--size_24px) var(--size_24px) var(--size_16px);
}

.mars-modal-body {
    padding-left: var(--size_24px);
    padding-right: var(--size_24px);
    padding-bottom: var(--size_24px);
}

.mars-modal-body li {
    margin-left: var(--size_2px); /*affichage complet de la bullet*/
}

.mars-modal-body-wrapper {
    max-height: calc(100vh - 6.25rem);
    overflow-y: auto;
    scrollbar-color: var(--background-decorative-prime) var(--background-base);
}

.mars-modal-header button.btn-close {
    font-weight: 400;
    font-size: var(--size_16px);
    line-height: 160%;
    display: flex;
    padding: 0;
    background: none;
    border: none;
    gap: var(--size_8px);
    align-self: end;
    margin-bottom: var(--size_8px);
    align-items: center;
}

.mars-modal-header button.btn-close .mars-icon {
    color: var(--icon-default);
    width: var(--size_10px);
    height: var(--size_10px);
    display: block;
    transform: translateY(var(--size_1px));
}

.mars-modal-title {
    font-weight: 700;
    font-size: var(--size_24px);
    line-height: 140%;
    color: var(--text-decorative-prime);
}

.mars-modal-title.hidden {
    display: none !important;
}

.mars-modal.modal-show {
    display: flex;
    align-items: center;
    opacity: 1;
}

.mars-modal-confirmation button.btn-close {
    margin-bottom: var(--size_62px);
}

.mars-modal-confirmation .mars-modal-header > *:not(.btn-close):not(:last-child) {
    margin-bottom: var(--size_16px);
}

.mars-modal-confirmation .mars-modal-confirmation-icon {
    width: var(--size_80px);
    height: var(--size_80px);
    color: var(--icon-action);
    margin: auto;
}

.mars-modal-confirmation .mars-modal-confirmation-icon.unvisible-icon {
    display: none;
}

.mars-modal-confirmation .mars-modal-title {
    text-align: center;
}

.mars-modal-confirmation .mars-modal-body-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--size_16px);
    padding-bottom: var(--size_56px);
}

.mars-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-modal-layer);
    z-index: 1045;
    transition: opacity 0.5s, z-index 0.5s;
    opacity: 0;
}

.mars-modal-backdrop.show-backdrop {
    display: block;
    opacity: 1;
}

@media (max-width: 47.99em) {

    .mars-modal-dialog {
        max-width: 100%;
        position: fixed;
        bottom: 0;
        max-height: 60%;
        display: flex;
        flex-direction: row;
        justify-content: center;
    }

    .mars-modal-content {
        border-radius: var(--size_8px) var(--size_8px) 0 0;
        max-width: 100%;
        max-height: 100%;
        width: 100vw;
    }

    .mars-modal-title {
        font-size: var(--size_20px);
        line-height: 130%;
    }

    .mars-modal-confirmation .mars-modal-header > *:not(.btn-close):not(.mars-modal-confirmation-icon) {
        padding: 0 var(--size_24px);
    }

    .mars-modal-confirmation button.btn-close {
        margin-bottom: var(--size_40px);
    }

    .mars-modal-confirmation .mars-modal-body-wrapper {
        padding-left: var(--size_24px);
        padding-right: var(--size_24px);
    }

}

/* Styles pour les focus-gards invisibles */
.modal-focus-guard {
    display: block;
    width: var(--size_1px);
    height: var(--size_1px);
    overflow: hidden;
    opacity: 0;
}

.mars-modal-contrib .mars-modal {
    position: relative;
    border-radius: 8px;
    border-radius: 0.5rem;
    box-shadow: 0px 4px 20px rgba(0, 144, 166, 0.16);
    box-shadow: 0px 0.25rem 1.25rem rgba(0, 144, 166, 0.16);
    margin: var(--size_24px);
    opacity: 1;
    display: block;
    top: unset;
    left: unset;
    bottom: unset;
    right: unset;
    overflow: auto;
    overscroll-behavior: none;
    z-index: 0;
    width: var(--size_624px);
}

.mars-modal-contrib .mars-modal-dialog {
    max-height: unset;
}

.mars-modal-contrib .mars-modal-body-wrapper {
    max-height: unset;
}

.mars-modal-open {
    overflow: hidden;
}
