/**
 * Modale de formulaire de contact
 */

.bwa-team-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bwa-team-modal.active {
    opacity: 1;
    visibility: visible;
}

.bwa-team-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1;
}

.bwa-team-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bwa-team-modal-header {
    flex-shrink: 0;
    padding: 30px 30px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: white;
    border-radius: 16px 16px 0 0;
}

.bwa-team-modal-title {
    margin: 0;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--e-global-color-text);
    line-height: 1.3;
    flex: 1;
}

.bwa-team-modal-representative-name {
    color: #1BB898;
}

.bwa-team-modal-content .bwa-team-modal-header .bwa-team-modal-close {
    flex-shrink: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--e-global-color-text);
    transition: opacity 0.3s ease;
    aspect-ratio: 1;
    padding: 9px ;
    display: flex ;
    justify-content: center;
    align-items: center;
    border-radius: 50% ;
}

.bwa-team-modal-close:hover {
    opacity: 0.7;
}

.bwa-team-modal-close:active {
    opacity: 0.5;
}

.bwa-team-modal-close svg {
    width: 24px;
    height: 24px;
}

.bwa-team-modal-close svg line {
    transition: all 0.3s ease;
}

.bwa-team-modal-close:hover svg .line-1 {
    stroke-dasharray: 22;
    stroke-dashoffset: 22;
    animation: drawLine 0.4s ease-out forwards;
}

.bwa-team-modal-close:hover svg .line-2 {
    stroke-dasharray: 22;
    stroke-dashoffset: 22;
    animation: drawLine 0.4s ease-out 0.1s forwards;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

.bwa-team-modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px;
}

/* Empêcher le scroll du body quand la modale est ouverte */
body.bwa-team-modal-open {
    overflow: hidden !important;
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
}

html.bwa-team-modal-open {
    overflow: hidden !important;
}

/* Style du formulaire dans la modale */
.bwa-team-modal-body .forminator-custom-form[data-design] {
    margin: 0;
    display: block !important; /* Forcer l'affichage du formulaire Forminator principal */
}

/* Cacher les containers Forminator sans attribut data-design (containers générés/dupliqués) */
.bwa-team-modal-body .forminator-custom-form:not([data-design]) {
    display: none !important;
}

.bwa-team-modal-body .forminator-row {
    margin-bottom: 20px;
}

/* Cacher le champ email du représentant (rempli automatiquement) */
.bwa-team-modal-body .hide-representant-e-mail {
    display: none !important;
}

/* Responsive pour la modale */
@media (max-width: 768px) {
    .bwa-team-modal-content {
        max-width: 95%;
        max-height: 95vh;
        border-radius: 12px;
    }

    .bwa-team-modal-header {
        padding: 25px 20px 15px;
        gap: 15px;
    }

    .bwa-team-modal-title {
        font-size: 1.3em;
    }

    .bwa-team-modal-body {
        padding: 25px 20px;
    }

    .bwa-team-modal-close svg {
        width: 20px;
        height: 20px;
    }
}
