/**
 * Module Formulaire de Contact - Styles CSS
 * 
 * @author    Energiedin
 * @copyright 2024 Energiedin
 */

/* Section principale */
.ed-contact-section {
    width: 100%;
    margin-top: -22px;
}

.ed-contact-container {
    display: flex;
    flex-wrap: wrap;
    min-height: 500px;
    border-radius: 0px;
}

/* Partie formulaire - fond orange */
.ed-contact-form-wrapper {
    position: relative;
    flex: 1;
    width: 55%;
    padding: 90px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--cs-primary);
}

.ed-contact-form-inner {
    width: 100%;
    max-width: 500px;
}

.ed-contact-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.2;
    color: #ffffff;
}

.ed-contact-subtitle {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
    margin: 0 0 30px 0;
    opacity: 0.95;
    color: #ffffff;
}

/* Formulaire */
.ed-contact-form {
    width: 100%;
}

.ed-form-row {
    margin-bottom: 15px;
}

.ed-form-row-double {
    display: flex;
    gap: 15px;
}

.ed-form-row-double .ed-form-group {
    flex: 1;
}

.ed-form-group {
    width: 100%;
}

.ed-form-control {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: none;
    border-radius: 0px;
    background-color: #ffffff;
    color: #000;
    transition: box-shadow 0.3s ease;
    box-sizing: border-box;
    height: 42px;
}

.ed-form-control::placeholder {
    color: #999;
}

.ed-form-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.ed-form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* reCAPTCHA */
.ed-recaptcha-row {
    margin-bottom: 15px;
}

.ed-recaptcha-row .g-recaptcha {
    transform: scale(1);
    transform-origin: 0 0;
}

@media (max-width: 400px) {
    .ed-recaptcha-row .g-recaptcha {
        transform: scale(0.85);
        transform-origin: 0 0;
    }
}

/* Bouton submit - marron/olive */
.ed-contact-submit-btn {
    width: 100%;
    padding: 15px 30px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 0px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    background-color: #616357;
    color: #ffffff;
}

.ed-contact-submit-btn:active {
    transform: translateY(0);
}

.ed-contact-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Partie carte */
.ed-contact-map-wrapper {
    width: 45%;
    min-height: 400px;
    position: relative;
}

.ed-contact-map-wrapper iframe {
    width: calc(45% + ((100vw - 100%) / 2));
}

#ed-contact-map,
#ed-contact-map-osm {
    width: 100%;
    height: 100%;
    min-height: 500px;
    position: absolute;
    top: 0;
    left: 0;
}

/* Alertes */
#ed-contact-alerts {
    margin-bottom: 20px;
}

.ed-alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.ed-alert-success {
    background-color: rgba(255, 255, 255, 0.95);
    color: #155724;
    border: 1px solid rgba(21, 87, 36, 0.2);
}

.ed-alert-error {
    background-color: rgba(255, 255, 255, 0.95);
    color: #721c24;
    border: 1px solid rgba(114, 28, 36, 0.2);
}

/* Masquer le formulaire de contact par défaut de PrestaShop */
#content-wrapper .contact-form,
#contact .contact-form {
    display: none !important;
}

/* Responsive */
@media (max-width: 992px) {
    .ed-contact-container {
        flex-direction: column;
    }

    .ed-contact-form-wrapper {
        padding: 30px;
    }

    .ed-contact-map-wrapper {
        min-height: 350px;
    }

    #ed-contact-map,
    #ed-contact-map-osm {
        min-height: 350px;
        position: relative;
    }
}

@media (max-width: 576px) {
    .ed-contact-form-wrapper {
        padding: 25px 20px;
    }

    .ed-contact-title {
        font-size: 1.8rem;
    }

    .ed-form-row-double {
        flex-direction: column;
        gap: 15px;
    }

    .ed-form-control {
        padding: 12px 15px;
    }

    .ed-contact-map-wrapper {
        min-height: 300px;
    }

    #ed-contact-map,
    #ed-contact-map-osm {
        min-height: 300px;
    }
}

/* Animation de chargement */
@keyframes ed-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.ed-btn-loading .fa-spinner {
    animation: ed-spin 1s linear infinite;
}

/* Fix pour Leaflet dans PrestaShop */
.leaflet-container {
    font-family: inherit;
}

.leaflet-popup-content-wrapper {
    border-radius: 4px;
}

.leaflet-popup-content {
    margin: 12px 15px;
}
