/**
 * Elementor Contact Popup Styles
 * Version: 1.0.0 - Design Sobre Noir et Blanc
 */

/* Button Styles */
.elementor-contact-popup-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

/* Avatar Styles */
.ecp-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.ecp-avatar {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: block;
    aspect-ratio: 1/1;
}

.ecp-online-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    background: #04DF44;
    border: none;
    border-radius: 50%;
    box-shadow: 0px 0px 0px 4px rgba(0, 223, 69, 0.4);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        box-shadow: 0px 0px 0px 4px rgba(0, 223, 69, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0px 0px 0px 6px rgba(0, 223, 69, 0.2);
        transform: scale(1.05);
    }
}

.ecp-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
    position: relative;
}

.ecp-button:focus {
    outline: 2px solid rgba(0, 0, 0, 0.3);
    outline-offset: 3px;
}

.ecp-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Hide mobile icon on desktop */
.ecp-button-icon-mobile {
    display: none !important;
}

.ecp-button-text {
    position: relative;
}

.ecp-icon-left {
    order: -1;
}

.ecp-icon-right {
    order: 1;
}

/* Popup Overlay */
.ecp-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

.ecp-popup-overlay.ecp-active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ecp-popup-overlay.ecp-visible {
    opacity: 1;
}

/* Popup Content */
.ecp-popup-content {
    position: relative;
    max-width: 600px;
    width: 100%;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
    margin: auto;
}

.ecp-popup-overlay.ecp-visible .ecp-popup-content {
    transform: scale(1) translateY(0);
}

/* Close Button - Outside popup, top right */
.ecp-popup-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #fff;
    transition: all 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 300;
    z-index: 10000;
}

.ecp-popup-close:hover {
    color: #fff;
    opacity: 0.7;
}

/* Popup Header */
.ecp-popup-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.ecp-popup-title {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a1a;
}

.ecp-popup-description {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #666;
}

/* Contact List */
.ecp-contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Contact Item */
.ecp-contact-item {
    display: block;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.ecp-contact-item > a {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
}

.ecp-contact-item:hover {
    background: #f0f0f0;
    border-color: #ccc;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ecp-contact-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.ecp-contact-item:hover .ecp-contact-icon {
    background: #333;
    color: #fff;
    border-color: #333;
    transform: scale(1.05);
}

.ecp-contact-icon svg {
    display: block;
}

/* Icon Specific Styles - Monochrome */
.ecp-icon-phone,
.ecp-icon-whatsapp,
.ecp-icon-email,
.ecp-icon-address {
    /* Tous les icônes ont le même style sobre */
}

.ecp-contact-info {
    flex: 1;
    min-width: 0;
}

.ecp-contact-label {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
}

.ecp-contact-value {
    font-size: 16px;
    line-height: 1.5;
    word-break: break-word;
    font-weight: 500;
    color: #333;
}

.ecp-contact-value a {
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 600;
    display: inline-block;
    color: #1a1a1a;
}

.ecp-contact-value a:hover {
    color: #000;
    text-decoration: underline;
}

/* Address Specific Styles */
.ecp-contact-address {
    flex-direction: column;
    align-items: flex-start;
}

.ecp-contact-address .ecp-contact-info {
    width: 100%;
}

.ecp-contact-address .ecp-contact-value {
    white-space: pre-line;
}

.ecp-map-container {
    margin-top: 12px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.ecp-map-container iframe {
    display: block;
    width: 100%;
    filter: grayscale(1);
}

/* Responsive Styles - Mobile */
@media (max-width: 768px) {
    /* Mobile Floating Button Mode */
    .elementor-contact-popup-wrapper.mobile-floating .ecp-avatar-wrapper {
        display: none !important;
    }

    .elementor-contact-popup-wrapper.mobile-floating {
        position: fixed;
        z-index: 9998;
    }

    .elementor-contact-popup-wrapper.mobile-floating .ecp-button {
        width: 49px;
        height: 49px;
        border-radius: 50% !important;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        background: #3a3a3a;
        border: none;
        position: relative;
    }

    .elementor-contact-popup-wrapper.mobile-floating .ecp-button-text {
        display: none;
    }

    /* Hide desktop icon on floating mobile */
    .elementor-contact-popup-wrapper.mobile-floating .ecp-button-icon-desktop {
        display: none !important;
    }

    /* Show mobile icon on floating mobile */
    .elementor-contact-popup-wrapper.mobile-floating .ecp-button-icon-mobile {
        display: inline-flex !important;
        font-size: 32px;
        color: #fff;
    }

    .elementor-contact-popup-wrapper.mobile-floating .ecp-button-icon-mobile svg {
        width: 28px;
        height: 28px;
    }

    /* Badge on floating button for mobile */
    .elementor-contact-popup-wrapper.mobile-floating .ecp-button::after {
        content: '';
        position: absolute;
        bottom: 2px;
        right: 2px;
        width: 10px;
        height: 10px;
        background: #04DF44;
        border-radius: 50%;
        box-shadow: 0px 0px 0px 3px rgba(0, 223, 69, 0.4);
        animation: pulse-badge 2s ease-in-out infinite;
    }

    /* Mobile Normal Mode - Keep avatar hidden but button stays normal */
    .elementor-contact-popup-wrapper.mobile-normal .ecp-avatar-wrapper {
        display: none !important;
    }

    /* Position: Bottom Right (default) */
    .mobile-pos-bottom-right {
        bottom: 20px;
        right: 20px;
    }

    /* Position: Bottom Left */
    .mobile-pos-bottom-left {
        bottom: 20px;
        left: 20px;
    }

    /* Position: Top Right */
    .mobile-pos-top-right {
        top: 20px;
        right: 20px;
    }

    /* Position: Top Left */
    .mobile-pos-top-left {
        top: 20px;
        left: 20px;
    }

    /* Popup styles */
    .ecp-popup-content {
        padding: 30px 20px;
        max-width: 100%;
        margin: 0;
        border-radius: 6px;
    }

    .ecp-popup-title {
        font-size: 24px;
        padding-right: 40px;
    }

    .ecp-popup-description {
        font-size: 14px;
    }

    .ecp-contact-item > a {
        padding: 15px 16px;
        gap: 14px;
    }

    .ecp-contact-icon {
        width: 42px;
        height: 42px;
    }

    .ecp-contact-icon svg {
        width: 18px;
        height: 18px;
    }

    .ecp-contact-label {
        font-size: 10px;
    }

    .ecp-contact-value {
        font-size: 15px;
    }

    .ecp-popup-overlay {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .ecp-popup-content {
        padding: 25px 16px;
    }

    .ecp-popup-title {
        font-size: 22px;
    }

    .ecp-contact-item {
        padding: 0px;
        gap: 12px;
    }

    .ecp-contact-icon {
        width: 40px;
        height: 40px;
    }

    .ecp-contact-icon svg {
        width: 16px;
        height: 16px;
    }
}

/* Accessibility */
.ecp-popup-overlay:focus {
    outline: none;
}

.ecp-popup-close:focus {
    outline: 2px solid #333;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .ecp-popup-overlay {
        display: none !important;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    .ecp-popup-content {
        background: #1a1a1a;
        color: #e0e0e0;
    }

    .ecp-popup-title {
        color: #fff;
    }

    .ecp-popup-description {
        color: #b0b0b0;
    }

    .ecp-popup-header {
        border-bottom-color: #333;
    }

    .ecp-contact-item {
        background: #252525;
        border-color: #333;
    }

    .ecp-contact-item:hover {
        background: #2a2a2a;
        border-color: #444;
    }

    .ecp-contact-icon {
        background: #1a1a1a;
        color: #e0e0e0;
        border-color: #444;
    }

    .ecp-contact-item:hover .ecp-contact-icon {
        background: #fff;
        color: #1a1a1a;
        border-color: #fff;
    }

    .ecp-contact-label {
        color: #888;
    }

    .ecp-contact-value {
        color: #e0e0e0;
    }

    .ecp-contact-value a {
        color: #fff;
    }

    .ecp-popup-close {
        background: transparent;
        border: none;
        color: #fff;
    }

    .ecp-popup-close:hover {
        background: transparent;
        color: #fff;
        opacity: 0.8;
    }

    .ecp-map-container {
        border-color: #333;
    }
}
