﻿:root {
    --modal-text: #454545;
    --modal-title: #454545;
    --modal-button: #896826;
    --modal-button-hover: #af9051;
    --modal-button-text: #ffffff;
    --modal-button-text-hover: #ffffff;
    --app-safe-area-inset-top: 0px;
    --app-safe-area-inset-bottom:0px;
}

dialog {
    margin: 0;
    padding: 0;
    max-width: none;
    max-height: none;
}


body.modal-open, body:has(.modal-reservation.active) {
    overflow: hidden;
    /*pour safari iOS*/
    touch-action: none;
    /*fin pour safari iOS*/
}

/* The Modal (background) */
.modal-backdrop {
    touch-action: none;
    overscroll-behavior: none;
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(0,0,0,0.24);
    view-transition-name: modal-backdrop;
}

::view-transition-group(modal-backdrop) {
    z-index: 100;
    animation-duration: 0s !important;
}

.modal-backdrop.active {
    display: flex;
}

.modal-reservation {
    overscroll-behavior: none;
    display: none;
    position: fixed;
    z-index: 1060;
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    justify-content: center;
    align-items: center;
    padding-top: 30px;
    padding-top: calc(env(safe-area-inset-top) + 30px);
    padding-top: calc(max(env(safe-area-inset-top), var(--app-safe-area-inset-top)) + 30px);
    padding-bottom: 30px;
    padding-bottom: calc(env(safe-area-inset-bottom) + 30px);
    padding-bottom: calc(max(env(safe-area-inset-bottom), var(--app-safe-area-inset-bottom)) + 30px);
    background: transparent;
    view-transition-name: modal-reservation;
}
::view-transition-group(modal-reservation) {
    z-index: 120;
    animation-duration: 0s !important;
}
/*si filter y'a des modales dans des modales */
.modal-reservation:has(.modal-reservation.active) {
    overflow-y:hidden;
}

.modal-reservation::backdrop {
    opacity:0;
}

.modal-full-screen {
    width: 100%;
    height: 100%;
    height: 100dvh;
    padding:0px;
    margin:0px;
}
.modal-full-screen .modal-reservation-content {
    padding: 0px;
    border: none;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-width: 100%;
    box-shadow: none;
    border-radius: 0px;
    margin: 0px;
}



/*.modal-ensure-full-height {
    position: absolute;
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
}*/







/*filter faut bien target uniquement le direct descendant pour les cas de modales imbriquées*/
.modal-reservation.modal-auto-width > .modal-reservation-content { 
    width: auto;
}

/*filter faut bien target uniquement le direct descendant pour les cas de modales imbriquées*/
.modal-reservation.modal-large-width > .modal-reservation-content {
    width: 1450px;
    max-width:100%;
}

/*filter faut bien target uniquement le direct descendant pour les cas de modales imbriquées*/
.modal-reservation.modal-classic-width > .modal-reservation-content {
    width: 90%;
    max-width: 600px;
}

/*filter faut bien target uniquement le direct descendant pour les cas de modales imbriquées*/
.modal-reservation.modal-auto-width-large-max-width > .modal-reservation-content {
    width: auto;
    max-width: 100%;
}


/*filter faut bien target uniquement le direct descendant pour les cas de modales imbriquées*/
.modal-reservation.modal-auto-max-width {
    padding-bottom: 0px;
    padding-bottom: calc(env(safe-area-inset-bottom) + 0px);
    padding-bottom: calc(max(env(safe-area-inset-bottom), var(--app-safe-area-inset-bottom)) + 0px);
}
.modal-reservation.modal-auto-max-width > .modal-reservation-content {
    min-width:800px;
    width: auto;
    max-width: 100%;
    min-height:82%;
    margin-bottom: unset;
    margin-left: 0px;
    margin-right: 0px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
}


/*filter faut bien target uniquement le direct descendant pour les cas de modales imbriquées*/
.modal-reservation.modal-s-1 {

}

.modal-reservation.modal-s-1 > .modal-reservation-content {
    padding-top: 0px;
    padding-right: 0px;
    padding-left: 0px;
    padding-bottom: 0px;
    height: calc(100vh - 30px - 30px);
    height: calc(100vh - (env(safe-area-inset-bottom) + 30px) - (env(safe-area-inset-top) + 30px));
    height: calc(100vh - (max(env(safe-area-inset-bottom), var(--app-safe-area-inset-bottom)) + 30px) - (max(env(safe-area-inset-bottom), var(--app-safe-area-inset-bottom)) + 30px));
    overflow:hidden;
    overflow:clip;
}




.modal-reservation.active {
    display: flex;
}

.modal-reservation .button-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    width: 28px;
    height: 28px;
    background-color: #e6e6e6;
    color: #393939;
    display: flex;
    align-items: center;
    justify-content: center;
    border-width: 2px;
    border-color: #ebebeb;
    border-radius: 30px;
}



.modal-button-close svg {
    width: 18px;
    height: 18px;
}

.modal-reservation-content {
    --modal-horizontal-margin: 20px;
    z-index: 2;
    pointer-events: auto;
    background-color: #ffffff;
    padding: 30px 20px;
    width: calc(100% - (var(--modal-horizontal-margin) * 2));
    max-width: 600px;
    color: var(--modal-text);
    box-shadow: 0px 0px 28px #00000029;
    border-radius: 16px;
    margin-left: var(--modal-horizontal-margin);
    margin-right: var(--modal-horizontal-margin);
    margin-top: auto;
    margin-bottom: auto;
    position: relative;
    transition: opacity 0.2s ease;
}


.modal-reservation-content .modal-reservation-content-padding {
    padding: 30px 20px;
}


.modal-reservation-content .modal-reservation-title {
    color: var(--modal-title);
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    margin-bottom: 20px;
    text-align:center;
}

.modal-reservation-content .modal-reservation-title-v-1 {
    color: #454545;
    font-size: 26px;
    line-height: 1;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: -0.6px;
}


.modal-reservation-content .modal-reservation-title-2 {
    color: var(--modal-title);
    font-size: 20px;
    line-height: 1;
    font-weight: 900;
    margin-bottom: 20px;
    text-align: left;
}


.modal-reservation-content .modal-reservation-alert {
    font-size: 13px;
    line-height: 1;
    font-weight: 200;
    margin-bottom: 25px;
}


.modal-reservation-content form {
    display: grid;
    gap: 20px;
}

.modal-reservation-content .grid-cols-2 {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap:15px;
}

@media(min-width:1024px) {
    .modal-reservation-content {
        padding: 50px 50px;
        border-radius: 16px;
    }

    .modal-reservation-content.modal-reservation-content-small-border-radius {
        border-radius: 4px;
    }

    .container-modal-md {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .modal-reservation-content .modal-reservation-title {
        font-size: 40px;
    }
}




.modal-reservation-content form button {
    justify-content:center;
}


.modal-button-close {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 1;
    width: 28px;
    height: 28px;
    background-color: #e6e6e6;
    display: flex;
    align-items: center;
    justify-content: center;
    border-width: 2px;
    border-color: #ebebeb;
    border-radius: 30px;
}

.modal-button-close svg {
    height: 18px;
    width: 18px;
}

.modal-reservation.modal-animation-appear {
    animation-name: modal-appear;
    animation-duration: 0.35s;
    will-change: opacity;
}


@keyframes modal-appear {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.modal-reservation.modal-animation-appear .modal-reservation-content {
    animation-name: modal-content-appear;
    animation-duration: 0.35s;
/*    will-change: transform; //NE PAS UTILISER CA FOU LA MERDE AVEC LES MODALS IMBRIQUEES DE LADMIN*/

}

@keyframes modal-content-appear {
    0% {
        transform: scale(0.97);
    }

    100% {
        transform: scale(1);
    }
}


.modal-reservation.modal-animation-disappear {
    animation-name: modal-disappear;
    animation-duration: 0.4s;
    will-change: opacity;
}

@keyframes modal-disappear {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}
.modal-reservation.modal-animation-disappear .modal-reservation-content {
    animation-name: modal-content-disappear;
    animation-duration: 0.4s;
    will-change: transform;
}

@keyframes modal-content-disappear {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0.97);
    }
}




