/* --- Global Fix for Horizontal Scroll --- */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }
    /* --- Optimized WhatsApp Button & Popup --- */
    #wws-layout-6 {
        position: fixed;
        bottom: 30px;
        right: 30px;
        z-index: 99999;
        font-family: 'Source Sans Pro', system-ui, sans-serif;
        opacity: 0;
        visibility: hidden;
        transform: translateY(30px) scale(0.8);
        transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), visibility 0.4s;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    #wws-layout-6.wws-visible {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    /* Button Design */
    .wws-popup__open-btn {
        background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
        color: white !important;
        border-radius: 50px !important;
        width: 55px;
        height: 55px;
        padding: 0 !important;
        font-size: 15px !important;
        font-weight: 600;
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4) !important;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0;
        cursor: pointer;
        transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        border: none;
        position: relative;
        overflow: hidden;
        /* float: right; */
    }

    .wws-popup__open-btn span {
        white-space: nowrap;
        max-width: 0;
        opacity: 0;
        overflow: hidden;
        transition: all 0.3s ease-in-out;
        transition-delay: 0.1s;
    }

    /* Hover expand : desktop uniquement (évite le débordement / dézoom mobile) */
    @media (hover: hover) and (min-width: 768px) {
        .wws-popup__open-btn:hover {
            width: min(320px, calc(100vw - 60px));
            max-width: calc(100vw - 60px);
            transform: translateY(-4px);
            box-shadow: 0 10px 25px rgba(37, 211, 102, 0.6) !important;
            justify-content: flex-start;
            padding-left: 16px !important;
        }

        .wws-popup__open-btn:hover span {
            max-width: 250px;
            opacity: 1;
            margin-left: 10px;
        }
    }

    .wws-popup__open-btn svg {
        width: 24px;
        height: 24px;
        fill: white;
        flex-shrink: 0;
    }

    /* Pulse Animation */
    .wws-popup__open-btn::after {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        border-radius: 50px;
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
        animation: wws-pulse 2s infinite;
        z-index: -1;
    }

    @keyframes wws-pulse {
        0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
        70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
        100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
    }

    /* Popup Animation */
    .wws-popup {
        position: absolute;
        bottom: 68px;
        right: 0;
        width: min(280px, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
        max-height: min(420px, calc(100vh - 110px));
        background: white;
        border-radius: 14px;
        box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.22);
        transform-origin: bottom right;
        transform: scale(0.8) translateY(20px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 100000;
        border: 1px solid rgba(0,0,0,0.05);
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .wws-popup[data-wws-popup-status="1"] {
        transform: scale(1) translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: flex !important;
    }

    /* Flèche (triangle) en bas du popup */
    .wws-popup::after {
        content: '';
        position: absolute;
        bottom: -8px;
        right: 18px;
        left: auto;
        transform: none;
        border-width: 8px 8px 0;
        border-style: solid;
        border-color: white transparent transparent transparent;
        animation: none;
    }

    /* Popup Content Styling */
    .wws-popup__header {
        background: #075E54;
        padding: 10px 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-radius: 14px 14px 0 0;
        flex-shrink: 0;
    }
    .wws-header-title {
        display: flex;
        align-items: center;
        color: white;
        font-weight: 600;
        font-size: 14px;
        gap: 6px;
    }
    .wws-header-title i {
        font-size: 18px;
        margin-right: 0;
    }
    .wws-popup__close-btn {
        color: white;
        cursor: pointer;
        opacity: 0.8;
        transition: 0.2s;
    }
    .wws-popup__close-btn:hover { opacity: 1; transform: scale(1.1); }
    .wws-popup__close-btn svg { width: 14px; height: 14px; fill: currentColor; }

    .wws-popup__body {
        padding: 8px;
        background-color: #ECE5DD;
        background-image: url("https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png");
        background-size: 400px;
        opacity: 0.95;
        overflow-y: auto;
        flex: 1 1 auto;
        min-height: 0;
    }

    .wws-popup__support-about {
        background: #E6FFDA;
        padding: 6px 8px;
        border-radius: 8px;
        margin-bottom: 6px;
        font-size: 12.5px;
        line-height: 1.35;
        color: #4a4a4a;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        position: relative;
    }
    .wws-popup__support-about::after {
        content: ''; position: absolute; left: -6px; top: 8px;
        width: 0; height: 0;
        border-top: 6px solid transparent;
        border-bottom: 6px solid transparent;
        border-right: 6px solid #E6FFDA;
    }

    /* Animation du message de bienvenue */
    .wws-popup__support-about {
        animation: wws-message-appear 0.5s ease-out forwards;
        opacity: 0;
        animation-delay: 0.3s;
    }

    @keyframes wws-message-appear {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .wws-popup__support-person {
        background: white;
        padding: 6px 8px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 5px;
        cursor: pointer;
        transition: all 0.2s;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        text-decoration: none;
        color: inherit;
    }
    .wws-popup__support-person:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.08);
        cursor: pointer;
    }
    .wws-popup__support-person-img-wrapper { position: relative; flex-shrink: 0; }
    .wws-popup__support-person-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
    .wws-popup__support-person-available {
        position: absolute; bottom: 0; right: 0;
        width: 10px; height: 10px;
        background: #25D366;
        border: 2px solid white;
        border-radius: 50%;
    }
    .wws-popup__support-person-away {
        position: absolute; bottom: 0; right: 0;
        width: 10px; height: 10px;
        background: #9ca3af;
        border: 2px solid white;
        border-radius: 50%;
    }
    .wws-popup__support-person-title {
        font-size: 10px;
        color: #6b7280;
        line-height: 1.2;
        margin-bottom: 1px;
    }
    .wws-popup__support-person-title:empty { display: none; }
    .wws-popup__support-person-name { font-weight: 700; font-size: 13px; color: #111; line-height: 1.2; }
    .wws-popup__support-person-status { font-size: 11px; color: #25D366; font-weight: 600; }

    .wws-popup__support-person.is-offline {
        opacity: 0.78;
        cursor: default;
        background: #f4f4f5;
        box-shadow: none;
        pointer-events: auto;
    }
    .wws-popup__support-person.is-offline:hover {
        transform: none;
        box-shadow: none;
        cursor: default;
    }
    .wws-popup__support-person.is-offline .wws-popup__support-person-img {
        filter: grayscale(1);
        opacity: 0.85;
    }
    .wws-popup__support-person.is-offline .wws-popup__support-person-status {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        color: #6b7280;
        background: #e5e7eb;
        border-radius: 999px;
        padding: 1px 7px;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        margin-top: 2px;
    }
    .wws-popup__support-person.is-offline .wws-popup__support-person-status::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #9ca3af;
    }

    /* Form Styling */
    .wws-popup__support-person-form {
        display: none;
        padding: 8px 4px 4px;
    }

    .wws-form-header {
        display: flex;
        align-items: center;
        margin-bottom: 10px;
    }

    .wws-back-btn {
        background: none;
        border: none;
        color: #075E54;
        font-size: 13px;
        cursor: pointer;
        margin-right: 8px;
        padding: 4px;
    }

    .wws-back-btn:hover {
        color: #128C7E;
    }

    .wws-form-header h3 {
        margin: 0;
        font-size: 14px;
        color: #075E54;
    }

    .wws-contact-form {
        max-width: 100%;
    }

    .form-group {
        margin-bottom: 8px;
    }

    .form-group label {
        display: block;
        margin-bottom: 3px;
        font-weight: 600;
        color: #333;
        font-size: 12px;
    }

    .form-group input,
    .form-group textarea {
        width: 100%;
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 13px;
        box-sizing: border-box;
        background: #fff;
        color: #333;
    }

    .form-group textarea {
        resize: vertical;
        min-height: 52px;
        max-height: 90px;
    }

    .wws-submit-btn {
        width: 100%;
        padding: 9px;
        background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: transform 0.2s;
    }

    .wws-submit-btn:hover {
        transform: translateY(-2px);
    }

    /* --- Mobile Responsiveness Optimization --- */
    @media (max-width: 767px) {
        #wws-layout-6 {
            bottom: 16px;
            right: 16px;
            z-index: 99999;
            pointer-events: none;
        }

        #wws-layout-6 > * {
            pointer-events: auto;
        }

        .wws-popup__open-btn {
            display: flex !important;
            align-items: center;
            justify-content: center;
            width: 50px !important;
            max-width: 50px;
            height: 50px !important;
            min-height: 50px;
            padding: 0 !important;
            border-radius: 50% !important;
            box-shadow: 0 5px 20px rgba(37, 211, 102, 0.5) !important;
            text-align: center;
            float: none;
        }
        
        .wws-popup__open-btn span {
            display: none;
        }

        /* Styles for the hidden popup */
        .wws-popup {
            position: absolute;
            bottom: 62px;
            right: 0;
            width: min(280px, calc(100vw - 24px));
            max-width: calc(100vw - 24px);
            max-height: min(380px, calc(100vh - 100px));
            border-radius: 14px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            display: flex;
            flex-direction: column;
            
            transform-origin: bottom right;
            transform: scale(0.9);
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
        }

        .wws-popup[data-wws-popup-status="1"] {
            position: absolute;
            top: auto;
            bottom: 62px;
            left: auto;
            right: 0;
            transform: scale(1) !important;
            transform-origin: bottom right;
            opacity: 1 !important;
            visibility: visible !important;
            display: flex !important;
        }

        .wws-popup::after {
            right: 16px;
            left: auto;
            transform: none;
        }

        .wws-popup__body {
            overflow-y: auto;
            flex-grow: 1;
            -webkit-overflow-scrolling: touch;
        }

        .form-group input, .form-group textarea {
            font-size: 16px;
        }
    }
