/* --- LE CONTENEUR PRINCIPAL --- */
#whatsapp-widget {
    position: fixed;
    bottom: 14px;
    right: 85px;
    z-index: 9999;
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* --- LA FENÊTRE DE CHAT --- */
.wa-chat-box {
    width: 350px;
    max-width: 85vw;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    margin-bottom: 35px;
    display: none; /* Piloté par JS */
    overflow: hidden;
    animation: wa-slide-in 0.3s ease-out;
}

@keyframes wa-slide-in {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- L'ENTÊTE --- */
.wa-header {
    background: #075e54;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    position: relative;
}

.wa-avatar {
    position: relative;
    margin-right: 12px;
}

.wa-avatar img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
}

.online-dot {
    width: 10px;
    height: 10px;
    background: #4ad504;
    border-radius: 50%;
    position: absolute;
    bottom: 2px;
    right: 2px;
    border: 2px solid #075e54;
}

.wa-header-text strong { 
    display: block; 
    font-size: 15px; 
    font-weight: 600;
}

.wa-header-text p { 
    font-size: 12px; 
    margin: 0; 
    opacity: 0.9; 
}

.wa-close { 
    position: absolute; 
    top: 15px; 
    right: 15px; 
    font-size: 24px; 
    cursor: pointer; 
    opacity: 0.7; 
    line-height: 1; 
    transition: 0.2s;
}
.wa-close:hover { opacity: 1; }

/* --- LE CORPS (Design authentique WhatsApp) --- */
.wa-body {
    padding: 20px;
    background-color: #e5ddd5;
    /* Image de fond officielle WhatsApp */
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    background-repeat: repeat;
    max-height: 300px;
    overflow-y: auto;
}

.wa-message {
    background: white;
    padding: 8px 12px;
    border-radius: 0 8px 8px 8px; /* Angle haut-gauche carré pour la bulle */
    font-size: 14px;
    color: #303030;
    max-width: 90%;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    line-height: 1.4;
}

/* La petite queue de la bulle de message */
.wa-message::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 10px 10px 0;
    border-color: transparent white transparent transparent;
}

.wa-message strong { 
    display: block;
    color: #128c7e; 
    font-size: 12px; 
    margin-bottom: 3px;
}

.wa-time { 
    font-size: 10px; 
    color: #999; 
    display: block;
    text-align: right;
    margin-top: 4px;
}

/* --- LE PIED DE PAGE --- */
.wa-footer { 
    padding: 12px 20px 20px; 
    background: #fff; 
}

.wa-btn-start {
    background: #25d366;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s, transform 0.2s;
}

.wa-btn-start:hover { 
    background: #1ebea5; 
    transform: translateY(-1px); 
}

/* --- LE BOUTON FLOTTANT (LANCEUR) --- */
.wa-launcher {
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    float: right;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.wa-launcher:hover { 
    transform: scale(1.08) rotate(5deg); 
}

.wa-launcher img {
    width: 34px;
    height: 34px;
}

.wa-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ff3b30;
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 2px solid white;
}