/******************************************************
 * Pop-up Brevo - Plaquette Commerciale
 * Page ID 322
 ******************************************************/

/* ========================================
   OVERLAY (Fond sombre)
   ======================================== */

.brevo-popup-overlay {
    /* Positionnement */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99998; /* Sous le header (z-index: 9999) */

    /* Background avec blur */
    background-color: rgba(8, 8, 26, 0.85); /* #08081A avec transparence */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    /* Centrage du container */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;

    /* État initial (caché) */
    opacity: 0;
    visibility: hidden;

    /* Animations */
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* État visible */
.brevo-popup-overlay.is-active {
    opacity: 1;
    visibility: visible;
}


/* ========================================
   CONTAINER (Boîte du pop-up)
   ======================================== */

.brevo-popup-container {
    /* Dimensions */
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;

    /* Position relative pour le bouton fermer */
    position: relative;

    /* Padding */
    padding: 40px 30px 30px 30px;

    /* Background avec dégradé */
    background: linear-gradient(195.98deg, rgba(29, 27, 91, 0.9) -5.8%, rgba(34, 35, 46, 0.9) 67.21%, rgba(92, 92, 92, 0.6) 109.88%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    /* Bordure arrondie */
    border-radius: 8px;

    /* Animation d'entrée */
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

/* Animation d'entrée quand visible */
.brevo-popup-overlay.is-active .brevo-popup-container {
    transform: scale(1);
}


/* ========================================
   BOUTON DE FERMETURE
   ======================================== */

.brevo-popup-close {
    /* Position */
    position: absolute;
    top: 15px;
    right: 15px;

    /* Dimensions */
    width: 32px;
    height: 32px;

    /* Reset du bouton */
    border: none;
    background-color: transparent;
    cursor: pointer;
    padding: 0;

    /* Centrage du SVG */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Couleur et effet */
    color: var(--wp--preset--color--main-0);
    transition: all 0.3s ease;
    border-radius: 50%;
    z-index: 10;
}

.brevo-popup-close:hover {
    color: var(--wp--preset--color--main-500);
    background-color: rgba(255, 232, 102, 0.1);
    transform: rotate(90deg);
}

.brevo-popup-close:focus {
    outline: 2px solid var(--wp--preset--color--main-500);
    outline-offset: 2px;
}


/* ========================================
   TITRE
   ======================================== */

.brevo-popup-title {
    /* Typographie */
    font-size: var(--wp--preset--font-size--x-large);
    font-weight: bold;
    color: var(--wp--preset--color--main-500);
    text-align: center;

    /* Espacement */
    margin: 0 0 20px 0;
    padding-right: 30px; /* Pour éviter le bouton fermer */

    /* Responsive */
    line-height: 1.2;
}


/* ========================================
   WRAPPER DU FORMULAIRE BREVO
   ======================================== */

.brevo-form-wrapper {
    width: 100%;
}


/* ========================================
   SURCHARGE DES STYLES BREVO
   ======================================== */

/* Conteneur principal du formulaire Brevo */
.brevo-form-wrapper .sib-form {
    background-color: transparent !important;
    background-attachment: unset !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 16px !important;
}

.brevo-form-wrapper #sib-container {
    background-color: transparent !important;
    border: none !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    width: 100% !important;
}

.brevo-form-wrapper #sib-form {
    text-align: left !important;
}

/* Blocs de formulaire Brevo */
.brevo-form-wrapper .sib-form-block {
    padding: 0 !important;
    margin-bottom: 15px !important;
}

.brevo-form-wrapper .sib-input {
    width: 100% !important;
}

/* Entry field wrapper */
.brevo-form-wrapper .entry__field {
    background-color: var(--wp--preset--color--bg-main-blue) !important;
    border: 1px solid var(--wp--preset--color--main-800) !important;
    border-radius: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    margin: 0 0 15px 0 !important;
    display: flex !important;
    align-items: center !important;
}

.brevo-form-wrapper .entry__field:focus-within {
    border-color: var(--wp--preset--color--main-500) !important;
    box-shadow: 0 0 0 2px rgba(255, 232, 102, 0.2) !important;
}

/* Champs input Brevo */
.brevo-form-wrapper .input,
.brevo-form-wrapper input[type="text"],
.brevo-form-wrapper input[type="email"] {
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    font-family: 'Raleway', sans-serif !important;
    font-weight: 700 !important;
    line-height: 30px !important;
    color: var(--wp--preset--color--main-0) !important;
    padding: 0.5rem 10px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 40px !important;
    box-shadow: none !important;
    outline: none !important;
    margin: 0 !important;
}

.brevo-form-wrapper .input:focus,
.brevo-form-wrapper input[type="text"]:focus,
.brevo-form-wrapper input[type="email"]:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.brevo-form-wrapper input::placeholder,
.brevo-form-wrapper .input::placeholder {
    color: #dedede !important;
    opacity: 0.7 !important;
    font-family: 'Raleway', sans-serif !important;
}

/* Form entry */
.brevo-form-wrapper .form__entry {
    margin-bottom: 15px !important;
    position: relative !important;
}

/* Labels */
.brevo-form-wrapper .entry__label,
.brevo-form-wrapper label {
    color: var(--wp--preset--color--main-0) !important;
    font-family: 'Raleway', sans-serif !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    margin-bottom: 8px !important;
    display: block !important;
    padding: 0 !important;
}

/* Checkbox RGPD */
.brevo-form-wrapper .sib-optin {
    margin-bottom: 15px !important;
}

.brevo-form-wrapper .entry__choice {
    padding-left: 0 !important;
    text-indent: 0 !important;
    margin-bottom: 8px !important;
    width: 100% !important;
}

.brevo-form-wrapper .entry__choice label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0 !important;
    cursor: pointer !important;
}

.brevo-form-wrapper .checkbox,
.brevo-form-wrapper .checkbox_tick_positive {
    background: var(--wp--preset--color--bg-main-blue) !important;
    border: 1px solid var(--wp--preset--color--main-800) !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    display: inline-block !important;
    height: 1.2em !important;
    width: 1.2em !important;
    min-width: 1.2em !important;
    position: relative !important;
    vertical-align: middle !important;
    margin-right: 10px !important;
    flex-shrink: 0 !important;
}

.brevo-form-wrapper .input_replaced {
    opacity: 0 !important;
    position: absolute !important;
    z-index: -1 !important;
    width: 0 !important;
    height: 0 !important;
}

.brevo-form-wrapper .input_replaced:checked + .checkbox_tick_positive,
.brevo-form-wrapper .input_replaced:checked + .checkbox {
    background: var(--wp--preset--color--main-500) !important;
    border-color: var(--wp--preset--color--main-500) !important;
}

.brevo-form-wrapper .checkbox_tick_positive::before {
    border-color: var(--wp--preset--color--main-1000) !important;
    border-style: solid !important;
    border-width: 0 2px 2px 0 !important;
    bottom: 2px !important;
    content: "" !important;
    left: 50% !important;
    margin-left: -25% !important;
    position: absolute !important;
    top: 1px !important;
    transform: rotate(45deg) !important;
    transform-origin: 80% 45% !important;
    width: 50% !important;
}

.brevo-form-wrapper .entry__choice span {
    color: var(--wp--preset--color--main-0) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    font-family: 'Raleway', sans-serif !important;
    display: inline !important;
}

.brevo-form-wrapper .entry__choice span p {
    display: inline !important;
    margin: 0 !important;
    color: var(--wp--preset--color--main-0) !important;
}

.brevo-form-wrapper .entry__specification {
    color: var(--wp--preset--color--main-0) !important;
    opacity: 0.7 !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    font-family: 'Raleway', sans-serif !important;
    display: block !important;
    max-width: 100% !important;
}

.brevo-form-wrapper .entry__choice a,
.brevo-form-wrapper .entry__specification a {
    color: var(--wp--preset--color--main-500) !important;
    text-decoration: underline !important;
    transition: color 0.3s ease !important;
}

.brevo-form-wrapper .entry__choice a:hover,
.brevo-form-wrapper .entry__specification a:hover {
    color: var(--wp--preset--color--main-300) !important;
}

/* Bouton de soumission */
.brevo-form-wrapper .sib-form-block__button,
.brevo-form-wrapper button[type="submit"],
.brevo-form-wrapper input[type="submit"] {
    background-color: var(--wp--preset--color--main-500) !important;
    color: var(--wp--preset--color--main-1000) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.8rem 1rem !important;
    font-family: 'Raleway', sans-serif !important;
    font-weight: bold !important;
    font-size: 17px !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: visible !important;
    z-index: 1 !important;
    text-align: center !important;
    display: inline-block !important;
    min-height: 40px !important;
    line-height: normal !important;
    box-shadow: none !important;
}

.brevo-form-wrapper .sib-form-block__button:hover,
.brevo-form-wrapper button[type="submit"]:hover,
.brevo-form-wrapper input[type="submit"]:hover {
    background-color: var(--wp--preset--color--main-300) !important;
    box-shadow: 0px 4px 12px rgba(255, 232, 102, 0.4) !important;
}

.brevo-form-wrapper .sib-form-block__button:focus,
.brevo-form-wrapper button[type="submit"]:focus {
    box-shadow: 0 0 0 2px rgba(255, 232, 102, 0.3) !important;
    outline: none !important;
}

/* Messages d'erreur et de succès Brevo */
.brevo-form-wrapper .sib-form-message-panel {
    border-radius: 8px !important;
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    font-size: 14px !important;
    padding: 12px 15px !important;
    font-family: 'Raleway', sans-serif !important;
    display: none !important;
    border: 1px solid !important;
    width: 100% !important;
    max-width: 100% !important;
}

.brevo-form-wrapper .sib-form-message-panel--active {
    display: block !important;
}

.brevo-form-wrapper #error-message {
    color: var(--wp--preset--color--main-0) !important;
    background-color: rgba(255, 73, 73, 0.2) !important;
    border-color: #ff4949 !important;
}

.brevo-form-wrapper #success-message {
    background-color: rgba(19, 206, 102, 0.2) !important;
    border-color: #13ce66 !important;
    color: var(--wp--preset--color--main-0) !important;
}

.brevo-form-wrapper .sib-form-message-panel__text {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

.brevo-form-wrapper .sib-form-message-panel__inner-text {
    color: var(--wp--preset--color--main-0) !important;
    font-family: 'Raleway', sans-serif !important;
    line-height: 1.5 !important;
}

.brevo-form-wrapper .sib-icon {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
    fill: var(--wp--preset--color--main-0) !important;
}

.brevo-form-wrapper .sib-notification__icon {
    height: 1.5em !important;
    width: 1.5em !important;
}

/* Errors par champ */
.brevo-form-wrapper .entry__error {
    display: none !important;
    color: #ff4949 !important;
    background-color: rgba(255, 73, 73, 0.1) !important;
    border-radius: 4px !important;
    padding: 8px 10px !important;
    margin-top: 5px !important;
    font-size: 13px !important;
    font-family: 'Raleway', sans-serif !important;
}

/* Loader / Spinner Brevo */
.brevo-form-wrapper .progress-indicator {
    background: transparent !important;
}

.brevo-form-wrapper .progress-indicator__icon {
    fill: var(--wp--preset--color--main-500) !important;
}

.brevo-form-wrapper .sib-hide-loader-icon {
    display: none !important;
}

/* Hidden fields */
.brevo-form-wrapper .input--hidden {
    display: none !important;
}

/* reCAPTCHA container */
.brevo-form-wrapper .g-recaptcha-v3 {
    display: none !important;
}


/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablettes (max-width: 780px) */
@media screen and (max-width: 780px) {
    .brevo-popup-container {
        padding: 35px 25px 25px 25px;
        max-height: 85vh;
    }

    .brevo-popup-title {
        font-size: var(--wp--preset--font-size--large);
        margin-bottom: 20px;
        padding-right: 25px;
    }
}

/* Mobiles (max-width: 600px) */
@media screen and (max-width: 600px) {
    .brevo-popup-overlay {
        padding: 15px;
    }

    .brevo-popup-container {
        padding: 30px 20px 20px 20px;
        max-height: 80vh;
    }

    .brevo-popup-title {
        font-size: var(--wp--preset--font-size--medium);
        margin-bottom: 15px;
        padding-right: 20px;
    }

    .brevo-popup-close {
        top: 10px;
        right: 10px;
        width: 28px;
        height: 28px;
    }
}

/* Petits mobiles (max-width: 400px) */
@media screen and (max-width: 400px) {
    .brevo-form-wrapper .sib-form-block__button,
    .brevo-form-wrapper button[type="submit"],
    .brevo-form-wrapper input[type="submit"] {
        font-size: 15px !important;
        padding: 0.7rem 0.8rem !important;
    }
}


/* ========================================
   SCROLLBAR PERSONNALISÉE
   ======================================== */

.brevo-popup-container::-webkit-scrollbar {
    width: 8px;
}

.brevo-popup-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.brevo-popup-container::-webkit-scrollbar-thumb {
    background: var(--wp--preset--color--main-500);
    border-radius: 4px;
}

.brevo-popup-container::-webkit-scrollbar-thumb:hover {
    background: var(--wp--preset--color--main-300);
}
