﻿/* ---------------------------------------------------------
   FOND - COUVRE TOUTE LA PAGE
--------------------------------------------------------- */

.error-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999998;
    background-color: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease, visibility 180ms ease;
}

    .error-modal-backdrop.is-visible {
        opacity: 1;
        visibility: visible;
    }


/* ---------------------------------------------------------
   OVERLAY - CENTRAGE DANS LE VIEWPORT
--------------------------------------------------------- */

.error-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease, visibility 180ms ease;
}

    .error-modal-overlay.is-visible {
        opacity: 1;
        visibility: visible;
    }


/* ---------------------------------------------------------
   MODAL
--------------------------------------------------------- */

.error-modal {
    position: relative;
    width: 100%;
    max-width: 430px;
    margin: 0;
    padding: 30px 30px 28px;
    box-sizing: border-box;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background-color: #fff;
    color: #222;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    text-align: center;
    transform: scale(0.96);
    transition: transform 180ms ease;
}

.error-modal-overlay.is-visible .error-modal {
    transform: scale(1);
}


/* ---------------------------------------------------------
   BOUTON FERMER
--------------------------------------------------------- */

.error-modal-close {
    position: absolute;
    top: 8px;
    right: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #999;
    font-family: Arial, sans-serif;
    font-size: 23px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease;
}

    .error-modal-close:hover {
        background-color: #f1f1f1;
        color: #444;
    }


/* ---------------------------------------------------------
   ICÔNE D'ERREUR
--------------------------------------------------------- */

.error-modal-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    background-image: url('../Images/error.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}


/* ---------------------------------------------------------
   TITRE
--------------------------------------------------------- */

.error-modal-title {
    margin-bottom: 8px;
    color: #222;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
}


/* ---------------------------------------------------------
   MESSAGE
--------------------------------------------------------- */

.error-modal-message {
    max-width: 360px;
    margin: 0 auto;
    color: #6f6f6f;
    font-size: 14px;
    line-height: 1.55;
}


/* ---------------------------------------------------------
   DARK MODE
--------------------------------------------------------- */

body.dark-mode .error-modal-backdrop {
    background-color: rgba(0, 0, 0, 0.65);
}

body.dark-mode .error-modal {
    border-color: #444;
    background-color: #1f1f1f;
    color: #e6e6e6;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
}

body.dark-mode .error-modal-close {
    color: #aaa;
}

    body.dark-mode .error-modal-close:hover {
        background-color: #333;
        color: #eee;
    }

body.dark-mode .error-modal-title {
    color: #eee;
}

body.dark-mode .error-modal-message {
    color: #aaa;
}


/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */

@media (max-width: 600px) {

    .error-modal-overlay {
        padding: 15px;
    }

    .error-modal {
        max-width: none;
        padding: 27px 22px 25px;
        border-radius: 10px;
    }

    .error-modal-icon {
        width: 46px;
        height: 46px;
        margin-bottom: 14px;
    }

    .error-modal-title {
        font-size: 17px;
    }

    .error-modal-message {
        font-size: 13px;
    }
}
