@font-face {
    font-family: Poppins;
    src: url(font/Poppins-Medium.ttf);
}

body {
    font-family: Poppins;
}


.hide-scrollbar {
    overflow: hidden;
}
* {
    padding: 0;
    margin: 0;
}

img {
    object-fit: cover
}

.logo {
    margin-left: 10%;
}

nav {
    background-color: #FFFFFF;
    top: 0;
    width: 100%;
    position: sticky;
    border-bottom: 1px solid #D8D6D6;
    z-index: 1;
    height: 70px;
}

    nav a {
        float: left;
        display: block;
        color: #6E6E6E;
        text-align: center;
        padding: 20px;
        text-decoration: none;
        font-style: normal;
        font-weight: 700;
        font-size: 12px;
    }

        nav a:hover {
            color: black;
        }

.nav a {
    color: white;
    text-decoration: none;
    display: block;
}

.cookie {
    background-color: rgba(26, 42, 164, 0.9);
    bottom: 0;
    width: 100%;
    position: fixed;
    z-index: 1;
}

    .cookie > div {
        padding-top: 30px;
        padding-bottom: 20px;
        padding-left: 10%;
        padding-right: 10%;
    }

#cookie-text {
    max-width: 50%;
}

#cookie-btn {
    font-style: normal;
    font-weight: 700;
    font-size: 12px;
    color: #FFFFFF;
    background-color: transparent;
    border: 2px solid #FFFFFF;
    padding: 10px;
}

#cancel-cookie-btn, #allow-cookie-btn {
    font-style: normal;
    font-weight: 700;
    font-size: 12px;
    color: #1A2AA4;
    background-color: #FFFFFF;
    border: 2px solid #FFFFFF;
    padding: 10px;
}

button, a, nav > img {
    cursor: pointer;
}

#burger {
    display: none;
}

.sidenav {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1;
    top: 0;
    right: 0;
    background-color: #F4F3F3;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
}

    .sidenav a {
        padding: 20px;
        text-decoration: none;
        font-size: 16px;
        color: #3F3F3E;
        display: block;
        transition: 0.3s;
    }

        .sidenav a:hover {
            color: black;
        }

    .sidenav .closebtn {
        position: absolute;
        top: 0;
        right: 10px;
        font-size: 30px;
        margin-left: 100px;
    }

a {
    display: inline-block;
}

.links {
    display: flex;
    align-items: center;
    margin-right: 10%;
}

#goToEvelop {
    background-color: #1A2AA4;
    outline: none;
    border: none;
    color: #F4F3F3;
    font-style: normal;
    font-weight: 700;
    font-size: 12px;
    padding: 12px;
    margin-left: 56px;
}

#discoverEvelop {
    background-color: #009DE0;
    outline: none;
    border: none;
    color: #F4F3F3;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    padding: 12px 60px;
    margin-top: 40px;
    text-decoration: none;
}


section {
    background: #FFFFFF;
    margin: 0;
    scroll-margin-top: 70px;
}

html {
    scroll-behavior: smooth;
}

.flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px
}

h2 {
    font-style: normal;
    font-weight: 600;
    font-size: 40px;
    max-width: 600px;
}

h3 {
    font-style: normal;
    font-weight: 600;
    font-size: 28px;
    max-width: 600px;
}

h4 {
    font-style: normal;
    font-weight: 500;
    font-size: 20px;
    max-width: 600px;
}

.full {
    max-width: 100%;
}

.policy-files-list {
    list-style-type: none;
    margin-top: 5px;
}

.policy-files-list a {
    text-decoration: none;
}

p {
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    max-width: 600px;
}

.bold {
    font-weight: 700
}

.white {
    color: #FFFFFF;
}

.darkGray {
    color: #3F3F3E;
}

.gray {
    color: #6E6D6D
}

.lightGray {
    color: #F4F3F3;
}

.max-width-600 {
    max-width: 600px;
}

.max-width-400 {
    max-width: 400px;
}

#home {
    background-image: url('../assets/Main.png');
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    padding: 120px;
    height: 75vh;
}

#first-bloc {
    background-color: #FFFFFF;
    padding: 100px 10%;
}

#discover h2, h3 {
    margin-bottom: 30px;
}

#discover .container {
    align-items: flex-start;
    margin-top: 60px;
}

#discover .logos {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

#policy {
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    text-decoration-line: underline;
    color: #6E6D6D;
    margin-top: 10px;
}

#second-bloc {
    background-color: #F4F3F3;
    padding: 100px 10%;
}

.elem {
    background-color: #FFFFFF;
    width: 30%;
    padding: 30px;
}

#second-bloc .flex {
    align-items: stretch;
}

.white-triangle {
    position: absolute;
    width: 0px;
    height: 0px;
    border-style: solid;
    border-width: 30px;
    border-color: #FFFFFF transparent transparent transparent;
    margin-left: calc(50% - 30px);
}

.gray-triangle {
    position: absolute;
    width: 0px;
    height: 0px;
    border-style: solid;
    border-width: 30px;
    border-color: #F4F3F3 transparent transparent transparent;
    margin-left: calc(50% - 30px);
}

#functioning {
    background-color: #1C75BC;
    padding: 100px 10%;
    text-align: center;
}

    #functioning .flex {
        align-items: stretch;
    }

    #functioning p {
        margin-top: 20px;
    }

#switch-btn-container {
    display: flex;
    justify-content: center;
}

.switch-btn {
    margin: 80px -3px;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid #FFFFFF;
    padding: 10px 20px;
    background-color: transparent;
    color: #FFFFFF;
}

    .switch-btn.selected {
        background-color: #FFFFFF;
        color: #1C75BC;
    }

.display-none {
    display: none;
}

.item {
    width: 20%;
    text-align: left;
}

#contact {
    text-align: center;
    padding: 100px 10%;
}

    #contact h2, p {
        margin-bottom: 30px;
    }

form {
    padding: 30px;
}

.success {
    background-color: rgba(0, 168, 114, 0.5);
    margin-bottom: 20px;
    padding: 10px;
}

    .success:empty {
        display: none;
    }

.errors > ul > li {
    background-color: rgba(230, 83, 15, 0.85);
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 13.5px;
    line-height: 1.4;
    transition: opacity 0.25s ease;
}

.errors > ul > li:not([hidden]) {
    animation: fadeInError 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInError {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.errors > ul {
    list-style: none;
}


.input-container {
    background-color: #F4F3F3;
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0px 18px;
    width: 100%;
    margin-bottom: 20px;
}

.input-field {
    border: none;
    outline: none;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    height: 40px;
    width: 100%;
    margin-left: 18px;
    background-color: transparent;
}

#toggle-password {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 8px 0 8px 8px;
    border: 0;
    background: transparent;
    color: #6E6D6D;
}

#toggle-password svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.form-icon, #arrow {
    width: 20px;
}

textarea {
    font-family: inherit;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    background-color: #F4F3F3;
    border: none;
    padding: 10px;
    width: 100%;
    height: 100px;
}

#submit {
    background-color: #1A2AA4;
    outline: none;
    border: none;
    color: #F4F3F3;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    padding: 12px 28px;
    margin-top: 30px;
}

#rgpd {
    font-style: normal;
    font-weight: 400;
    font-size: 10px;
    text-align: start;
    color: #878686;
    padding: 0px 30px;
}

footer {
    background-color: #1A2AA4;
    padding: 30px;
}

    footer .links a {
        color: #FFFFFF;
        text-decoration: none;
        font-style: normal;
        font-weight: 700;
        font-size: 12px;
        float: left;
        display: block;
        padding: 30px;
    }

    footer p {
        color: #D8D6D6;
        font-style: normal;
        font-weight: 400;
        font-size: 12px;
        text-align: center;
        margin-top: 20px;
        max-width: 100%;
    }

/* LOGIN */
#login-first-bloc, #forgot-pwd-first-bloc, #reset-pwd-first-bloc {
    background-image: url('../assets/Login.svg');
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    height: calc(100vh - 70px);
    width: 50%
}

#login-page {
    gap: 0;
}

    #login-first-bloc > h2, #forgot-pwd-first-bloc > h2, #reset-pwd-first-bloc > h2 {
        margin: 40px;
    }

#login-second-bloc, #forgot-pwd-second-bloc, #reset-pwd-second-bloc {
    width: 50%;
    padding: 5%;
    box-sizing: border-box;
}

    #login-second-bloc > form, #signup-second-bloc > form, #forgot-pwd-second-bloc > form, #reset-pwd-second-bloc > form {
        padding: 0;
    }

        #login-second-bloc > form > .input-container, #signup-second-bloc > form > .input-container, #forgot-pwd-second-bloc > form > .input-container, #reset-pwd-second-bloc > form > .input-container {
            width: auto;
        }

#forgot-pwd {
    color: #1C75BC;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    text-decoration-line: underline;
    right: 10%;
    position: absolute;
}

#submit-login {
    background-color: #1A2AA4;
    outline: none;
    border: none;
    border-radius: 6px;
    color: #F4F3F3;
    font-style: normal;
    font-family: Poppins, sans-serif;
    font-weight: 600;
    font-size: 16px;
    padding: 14px 20px;
    margin-top: 50px;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: background-color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 14px rgba(26, 42, 164, 0.2);
}

#submit-login:hover:not(:disabled) {
    background-color: #131f7a;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26, 42, 164, 0.32);
}

#submit-login:active:not(:disabled) {
    transform: translateY(0);
}

#submit-login.is-loading,
#submit-login:disabled {
    opacity: 0.85;
    cursor: wait;
}

/* SIGNUP */
#signup-first-bloc {
    background-image: url('../assets/creationdecompte.svg');
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    height: calc(100vh - 70px);
    width: 50%
}

#signup-second-bloc {
    padding: 0% 10%;
    width: 40%
}

    #signup-second-bloc > h3 {
        margin-top: 20px;
    }

    #signup-second-bloc > form > h4 {
        margin-bottom: 20px;
    }

.checkbox-container {
    display: flex;
    margin: 30px 0;
}

    .checkbox-container > p {
        margin-top: 4px;
    }

.checkbox {
    min-width: 30px;
    min-height: 30px;
    width: 30px;
    height: 30px;
    margin-left: 0px;
    margin-right: 10px;
    accent-color: #1A2AA4;
}

#submit-signup {
    background-color: #1A2AA4;
    outline: none;
    border: none;
    color: #F4F3F3;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    padding: 12px;
    width: 100%
}


/* PRIVACY POLICY */
#privacyPolicyPage, #faqPage, #legalNoticePage, #policyServicePage {
    padding: 2% 10%;
}

.underline {
    text-decoration: underline;
}

/* FAQ */
#faqPage > h4 {
    margin-bottom: 10px;
    margin-top: 20px;
}

.accordion {
    background-color: #F4F3F3;
    color: #444;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 14px;
    transition: 0.4s;
    margin-bottom: 10px;
}

    .active,
    .accordion:hover {
        background-color: #eee;
    }

    .accordion:after {
        content: '\002B';
        color: #777;
        font-weight: bold;
        float: right;
        margin-left: 5px;
    }

.active:after {
    content: "\2212";
}

.panel {
    padding: 10px;
    display: none;
    overflow: hidden;
}

table {
    font-family: arial, sans-serif;
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 30px;
}

td,
th {
    border: 1px solid #F4F3F3;
    text-align: left;
    padding: 8px;
    width: 30%
}

tr:nth-child(even) {
    background-color: #F4F3F3;
}

.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.ml-3, .mx-3 {
    margin-left: 1rem !important;
}

.mb-2, .my-2 {
    margin-bottom: 0.5rem !important;
}

.alert-danger {
    color: #73231d;
    background-color: #f8dad7;
    border-color: #f6cbc7;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.text-primary {
    color: #233b90 !important;
}

/* MOBILE */
@media only screen and (max-width: 1040px) {

    .hide-scrollbar {
        overflow: auto
    }

    .logo {
        margin-left: 2%;
    }

    nav {
        height: 100px;
    }

        nav a {
            padding: 10px;
            font-size: 16px;
        }

    .links > a {
        display: none;
    }

    .links {
        margin-right: 2%;
    }

    h2 {
        font-size: 38px;
    }

    #burger {
        display: block;
        font-size: 30px;
        padding-right: 20px;
        padding-left: 30px;
    }

    #goToEvelop {
        padding: 20px;
        margin-left: 0%;
    }

    .cookie > div {
        display: block;
    }

    #cookie-text {
        max-width: 100%
    }

    .switch-btn {
        padding: 20px;
    }

    #home, #contact {
        padding: 20px;
    }

    #discoverEvelop {
        padding: 20px 60px;
    }

    .illustration {
        margin-top: 20px;
    }

    h3, p {
        max-width: 100%;
    }

    #discover .container, form .flex, footer .flex {
        display: block;
    }

    #first-bloc > h2 {
        max-width: 200px;
    }

    .elem {
        width: 80%;
        margin-bottom: 20px;
    }

    #sender, #recipient {
        flex-wrap: wrap;
    }

    .item {
        max-width: 45%;
        width: auto
    }

    .input-container {
        width: auto
    }

    textarea {
        height: 200px;
        width: calc(100% - 20px)
    }

    button > .flex {
        display: flex;
    }

    footer .links {
        flex-wrap: wrap;
    }

        footer .links a {
            padding: 10px
        }

    #login-page, #signup-page, #forgot-pwd-page, #reset-pwd-page {
        display: block;
    }

    #login-first-bloc, #signup-first-bloc, #forgot-pwd-first-bloc, #reset-pwd-first-bloc {
        height: 50vh;
        width: 100%
    }

    #login-second-bloc, #signup-second-bloc, #forgot-pwd-second-bloc, #reset-pwd-second-bloc {
        padding: 0;
        width: 100%;
        scroll-margin-top: 70px;
    }

        #login-second-bloc > p, #forgot-pwd-second-bloc > p, #reset-pwd-second-bloc > p {
            margin: 0 10%;
        }

        #login-second-bloc > h3, #login-second-bloc > form, #signup-second-bloc > form, #forgot-pwd-second-bloc > h3, #forgot-pwd-second-bloc > form, #reset-pwd-second-bloc > h3, #reset-pwd-second-bloc > form {
            margin: 10%;
        }

        #login-second-bloc > h3 {
            scroll-margin-top: 80px;
        }

        #signup-second-bloc > img, #signup-second-bloc > h3, #signup-second-bloc > p {
            margin: 2% 10%;
        }

        #signup-second-bloc > img {
            margin-top: 30px;
        }

    td, th {
        padding: 4px;
        font-size: 12px;
        width: auto
    }
    .alert {
        position: relative;
        padding: 0.75rem 1.25rem;
        margin-bottom: 1rem;
        border: 1px solid transparent;
        border-radius: 0.25rem;
    }
    .ml-3, .mx-3 {
        margin-left: 1rem !important;
    }

    .mb-2, .my-2 {
        margin-bottom: 0.5rem !important;
    }
    .alert-danger {
        color: #73231d;
        background-color: #f8dad7;
        border-color: #f6cbc7;
    }
    .alert-info {
        color: #0c5460;
        background-color: #d1ecf1;
        border-color: #bee5eb;
    }
    .alert-warning {
        color: #856404;
        background-color: #fff3cd;
        border-color: #ffeeba;
    }
    .text-primary {
        color: #233b90 !important;
    }
}

/* ==========================================================================
   MODAL EXPIRATION & CHARGEMENT E-VELOP
   ========================================================================== */

body.modal-open {
    overflow: hidden;
}

/* Banner de succès sur la page de connexion */
.home-success-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-left: 4px solid #10B981;
    color: #065F46;
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 500;
    animation: bannerSlideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.home-success-banner[hidden] {
    display: none !important;
}

.success-banner-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: #10B981;
}

/* Animation Shake pour erreurs */
@keyframes shakeErrorAnim {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.shake-error {
    animation: shakeErrorAnim 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Modal Backdrop */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

/* Modal Dialog */
.modal-dialog,
.modal-dialog * {
    box-sizing: border-box;
}

.modal-dialog {
    background: #FFFFFF;
    border-radius: 16px;
    width: 100%;
    max-width: 490px;
    padding: 36px 32px;
    box-sizing: border-box;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.06);
    transform: scale(0.92) translateY(16px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.modal-content-step {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.modal-backdrop.is-open .modal-dialog {
    transform: scale(1) translateY(0);
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #F4F3F3;
    color: #6E6D6D;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
    outline: none;
}

.modal-close:hover {
    background: #E2E8F0;
    color: #1A2AA4;
    transform: rotate(90deg);
}

/* Icones et Badges */
.modal-icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 12px;
}

.modal-icon-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    position: relative;
}

.modal-icon-circle.expired-pulse {
    background: #FEF2F2;
    color: #EF4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    animation: pulseExpired 2s infinite;
}

.modal-icon-circle.success-pulse {
    background: #ECFDF5;
    color: #10B981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulseSuccess 2s infinite;
}

@keyframes pulseExpired {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 14px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes pulseSuccess {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 14px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.modal-header-icon {
    width: 34px;
    height: 34px;
}

.modal-security-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: #FEE2E2;
    color: #DC2626;
}

.modal-security-pill.success-pill {
    background: #D1FAE5;
    color: #065F46;
}

/* Titres et textes */
.modal-heading {
    font-size: 22px;
    font-weight: 700;
    color: #1E293B;
    text-align: center;
    margin-bottom: 10px;
    margin-top: 4px;
}

.modal-description {
    font-size: 13.5px;
    line-height: 1.55;
    color: #64748B;
    text-align: center;
    margin-bottom: 18px;
    max-width: 100%;
}

.modal-subhint {
    font-size: 12.5px;
    color: #64748B;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Boite d'info */
.modal-info-box {
    background: #F0F9FF;
    border-left: 3px solid #009DE0;
    border-radius: 6px;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12.5px;
    color: #0369A1;
    line-height: 1.45;
    text-align: left;
    margin-bottom: 22px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.info-box-icon {
    flex-shrink: 0;
    color: #009DE0;
    margin-top: 2px;
}

/* Formulaire dans la modale */
.modal-form {
    padding: 0;
    margin-bottom: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.modal-form-group {
    margin-bottom: 18px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.modal-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
    text-align: left;
}

.modal-input-box {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 52px;
    padding: 0 16px !important;
    margin-bottom: 4px;
    border: 1.5px solid #E2E8F0;
    background-color: #F8FAFC;
    border-radius: 8px;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.modal-input-box:focus-within {
    border-color: #1A2AA4;
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(26, 42, 164, 0.12);
}

.modal-input-box .form-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.modal-input-box .input-field {
    box-sizing: border-box !important;
    flex: 1 1 auto;
    min-width: 0;
    width: 100% !important;
    height: 100%;
    margin-left: 12px !important;
    margin-right: 0 !important;
    padding: 0 !important;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    color: #1E293B;
}

.modal-input-error {
    color: #DC2626;
    font-size: 12px;
    font-weight: 500;
    margin-top: 6px;
    text-align: left;
}

.modal-input-error[hidden] {
    display: none !important;
}

/* Boutons de la modale */
.modal-btn-primary {
    background-color: #1A2AA4;
    color: #FFFFFF;
    font-family: Poppins, sans-serif;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    padding: 14px 20px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 14px rgba(26, 42, 164, 0.25);
    outline: none;
}

.modal-btn-primary:hover:not(:disabled) {
    background-color: #131f7a;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(26, 42, 164, 0.35);
}

.modal-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.modal-btn-primary.is-loading,
.modal-btn-primary:disabled {
    opacity: 0.85;
    cursor: wait;
}

.modal-btn-secondary {
    background-color: #F1F5F9;
    color: #334155;
    font-family: Poppins, sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    padding: 12px 20px;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.modal-btn-secondary:hover {
    background-color: #E2E8F0;
    color: #1E293B;
}

.btn-arrow-icon {
    transition: transform 0.2s ease;
}

.modal-btn-primary:hover .btn-arrow-icon {
    transform: translateX(4px);
}

/* Footer certificat */
.modal-footer-certif {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    color: #94A3B8;
    text-align: center;
}

/* Spinner */
.btn-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: btnSpinAnim 0.75s linear infinite;
    flex-shrink: 0;
}

.btn-spinner[hidden] {
    display: none !important;
}

@keyframes btnSpinAnim {
    to { transform: rotate(360deg); }
}

@keyframes bannerSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation Checkmark */
.modal-checkmark-svg {
    width: 44px;
    height: 44px;
    stroke: #10B981;
    stroke-width: 3.5;
    stroke-miterlimit: 10;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke: #10B981;
    fill: none;
    animation: checkCircle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: checkStroke 0.35s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards;
}

@keyframes checkCircle {
    0% { stroke-dashoffset: 166; }
    100% { stroke-dashoffset: 0; }
}

@keyframes checkStroke {
    0% { stroke-dashoffset: 48; }
    100% { stroke-dashoffset: 0; }
}

/* Barre de progression retour auto */
.modal-redirect-timer {
    margin: 20px 0 16px 0;
}

.timer-bar {
    height: 4px;
    background: #E2E8F0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.timer-bar-fill {
    height: 100%;
    background: #10B981;
    width: 0%;
    animation: timerProgress 2.8s linear forwards;
}

@keyframes timerProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.timer-text {
    font-size: 11.5px;
    color: #94A3B8;
    display: block;
    text-align: center;
}

/* Responsive Modal */
@media only screen and (max-width: 600px) {
    .modal-dialog {
        padding: 28px 20px;
        border-radius: 14px;
    }

    .modal-heading {
        font-size: 19px;
    }

    .modal-description {
        font-size: 13px;
    }
}

/* ==========================================================================
   MODALE D'ACCUEIL E-VELOP
   ========================================================================== */

body.welcome-locked {
    overflow: hidden;
}

.welcome-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.welcome-backdrop.is-closing {
    opacity: 0;
    visibility: hidden;
}

.welcome-dialog {
    background: #FFFFFF;
    border-radius: 20px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px 36px 32px;
    box-sizing: border-box;
    position: relative;
    box-shadow:
        0 30px 60px -12px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 80px rgba(26, 42, 164, 0.15);
    animation: welcomeDialogIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

.welcome-dialog *,
.welcome-dialog *::before,
.welcome-dialog *::after {
    box-sizing: border-box;
}

@keyframes welcomeDialogIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(24px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Header */
.welcome-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.welcome-logo {
    margin-left: 0;
}

.welcome-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: linear-gradient(135deg, #EEF2FF, #DBEAFE);
    color: #1A2AA4;
}

/* Enveloppe animée */
.welcome-icon-area {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.welcome-envelope {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(26, 42, 164, 0.3);
    animation: welcomeEnvPulse 2.5s ease-in-out infinite;
}

.welcome-envelope-svg {
    width: 48px;
    height: 48px;
}

@keyframes welcomeEnvPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(26, 42, 164, 0.25); }
    50% { box-shadow: 0 0 0 16px rgba(26, 42, 164, 0); }
}

/* Titre */
.welcome-title {
    font-size: 24px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 10px;
    line-height: 1.3;
    max-width: 100%;
}

.welcome-subtitle {
    font-size: 14px;
    color: #64748B;
    line-height: 1.55;
    margin-bottom: 24px;
    max-width: 100%;
}

/* Étapes */
.welcome-steps {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
}

.welcome-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: #F8FAFC;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    transition: border-color 0.2s, background-color 0.2s;
}

.welcome-step:hover {
    border-color: #C7D2FE;
    background: #F5F7FF;
}

.welcome-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1A2AA4, #1C75BC);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.welcome-step p {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    margin: 0;
    max-width: 100%;
}

/* Texte de pied */
.welcome-footer-text {
    font-size: 13px;
    color: #64748B;
    line-height: 1.5;
    margin-bottom: 24px;
    font-style: italic;
    max-width: 100%;
}

/* Bouton CTA */
.welcome-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #1A2AA4 0%, #1C75BC 100%);
    color: #FFFFFF;
    font-family: Poppins, sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s, filter 0.3s;
    box-shadow: 0 6px 20px rgba(26, 42, 164, 0.35);
    outline: none;
    position: relative;
    overflow: hidden;
}

.welcome-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.welcome-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(26, 42, 164, 0.45);
    filter: brightness(1.05);
}

.welcome-cta-btn:hover::before {
    left: 100%;
}

.welcome-cta-btn:active {
    transform: translateY(0);
}

/* Certif footer */
.welcome-certif {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 10.5px;
    color: #94A3B8;
    margin-top: 16px;
}

/* Responsive */
@media only screen and (max-width: 600px) {
    .welcome-dialog {
        padding: 28px 20px 24px;
        border-radius: 16px;
    }

    .welcome-title {
        font-size: 20px;
    }

    .welcome-step {
        padding: 12px;
    }

    .welcome-cta-btn {
        font-size: 14px;
        padding: 14px 20px;
    }
}

