/* Styles généraux pour le plugin WooConversion Boost */

.wcb-countdown {
    font-weight: bold;
    color: #e74c3c; /* Rouge pour l'urgence */
    margin-bottom: 15px;
    text-align: center;
    padding: 8px 12px;
    background-color: #fcecec;
    border-radius: 5px;
    border: 1px solid #e74c3c;
    font-size: 1.1em;
}

/* Styles pour le Lecteur Vidéo Flottant */
.wcb-video-player-container {
    position: fixed;
    bottom: 20px;
    left: 20px; /* CHANGEMENT: Positionné à gauche */
    width: 250px; /* Taille par défaut pour le mode mini */
    height: 140px; /* Ratio 16:9 pour 250px de largeur */
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none; /* Caché par défaut, affiché par JS */
    transition: all 0.3s ease-in-out;
}

.wcb-video-player-container.maximized {
    width: 80vw;
    height: 45vw; /* Environ 16:9 pour 80vw de largeur */
    max-width: 900px; /* Limite de taille pour les grands écrans */
    max-height: 506px; /* Ratio 16:9 pour 900px */
    top: 50%;
    left: 50%;
    /* Centrage parfait en mode maximisé */
    transform: translate(-50%, -50%);
    bottom: auto; /* Réinitialiser pour ne pas interférer avec top/left/transform */
    right: auto; /* Réinitialiser */
    border-radius: 12px;
}

.wcb-video-player-container.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(100px); /* Animation de sortie */
}

.wcb-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.wcb-video-wrapper iframe,
.wcb-video-wrapper video {
    width: 100%;
    height: 100%;
    display: block;
}

.wcb-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0); /* Transparent en temps normal */
    cursor: pointer;
    z-index: 1; /* Au-dessus de la vidéo pour capter les clics */
}

.wcb-video-player-container.maximized .wcb-video-overlay {
    display: none; /* Pas d'overlay en mode maximisé */
}

.wcb-video-close,
.wcb-video-toggle-size {
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10; /* Au-dessus de l'overlay */
    transition: background 0.2s ease;
}

.wcb-video-close:hover,
.wcb-video-toggle-size:hover {
    background: rgba(0, 0, 0, 0.7);
}

.wcb-video-close {
    top: 8px;
    right: 8px;
}

.wcb-video-toggle-size {
    /* Positionnement ajusté pour être à côté du bouton de fermeture */
    top: 8px;
    right: 45px; /* Ajustez si besoin pour l'espacement */
    padding: 3px 6px; /* Plus petit pour l'icône SVG */
}

.wcb-video-player-container.maximized .wcb-video-toggle-size {
    top: 15px; /* Ajuster la position en mode maximisé */
    right: 55px; /* Ajuster la position en mode maximisé */
}


/* Icônes SVG pour maximiser/minimiser */
.wcb-video-toggle-size svg {
    width: 20px;
    height: 20px;
}

.wcb-video-toggle-size .minimize-icon {
    display: none;
}

.wcb-video-player-container.maximized .wcb-video-toggle-size .maximize-icon {
    display: none;
}

.wcb-video-player-container.maximized .wcb-video-toggle-size .minimize-icon {
    display: block;
}

/* Bouton déclencheur (pour cacher la vidéo et la rouvrir en mini) */
#wcb-video-trigger-button { /* Sélecteur mis à jour vers l'ID */
    position: fixed;
    bottom: 20px;
    left: 20px; /* CHANGEMENT: Positionné à gauche */
    background: #0073aa; /* Couleur d'accentuation de WordPress */
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    transition: all 0.3s ease-in-out;
    opacity: 0; /* Caché par défaut */
    pointer-events: none; /* N'interagit pas avec la souris */
}

#wcb-video-trigger-button.visible { /* Sélecteur mis à jour vers l'ID */
    opacity: 1;
    pointer-events: auto;
}

#wcb-video-trigger-button svg { /* Sélecteur mis à jour vers l'ID */
    width: 24px;
    height: 24px;
    fill: #fff; /* Pour les icônes de lecture/pause */
}


/* Styles pour le mode Mobile (optionnel, ajuster si besoin) */
@media (max-width: 768px) {
    .wcb-video-player-container {
        width: 180px;
        height: 101px; /* Environ 16:9 */
        bottom: 10px;
        left: 10px; /* CHANGEMENT: Positionné à gauche */
        right: auto; /* S'assurer qu'il n'y a pas de conflit avec right */
    }
    .wcb-video-player-container.maximized {
        width: 95vw;
        height: 53.4375vw; /* 16:9 de 95vw */
    }
    .wcb-video-close,
    .wcb-video-toggle-size {
        width: 25px;
        height: 25px;
        font-size: 16px;
    }
    #wcb-video-trigger-button { /* Sélecteur mis à jour vers l'ID */
        width: 50px;
        height: 50px;
        bottom: 10px;
        left: 10px; /* CHANGEMENT: Positionné à gauche */
        right: auto; /* S'assurer qu'il n'y a pas de conflit avec right */
    }
}

/* NOUVEAUX STYLES pour la barre de progression de livraison gratuite */
.wcb-free-shipping-bar-container {
    background-color: #f0f0f0; /* Fond de la barre */
    border-radius: 8px;
    height: 30px; /* Hauteur de la barre */
    margin: 20px auto; /* Centrer la barre */
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
    width: 100%; /* Prend toute la largeur disponible */
    max-width: 600px; /* Limite la largeur sur les grands écrans */
}

.wcb-free-shipping-bar-progress {
    height: 100%;
    width: 0%; /* Largeur initiale, sera animée par JS */
    background-color: #ff6347; /* Couleur de base (rouge orangé) */
    border-radius: 8px;
    transition: width 0.5s ease-in-out, background-image 0.5s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
}

.wcb-free-shipping-bar-message {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333; /* Couleur du texte */
    font-weight: bold;
    font-size: 0.95em;
    text-shadow: 0 1px 1px rgba(255,255,255,0.7);
    z-index: 2; /* Au-dessus de la barre de progression */
}

/* Bouton WhatsApp */
.wcb-whatsapp-button {
    display: inline-flex; /* Pour centrer le texte et l'icône */
    align-items: center;
    justify-content: center;
    background-color: #25d366; /* Vert WhatsApp */
    color: #ffffff;
    padding: 12px 25px;
    border-radius: 50px; /* Bouton arrondi */
    text-decoration: none;
    font-weight: bold;
    font-size: 1.05em;
    margin-top: 20px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.wcb-whatsapp-button:hover {
    background-color: #1da851; /* Vert plus foncé au survol */
    transform: translateY(-2px); /* Léger effet de soulèvement */
    color: #ffffff; /* S'assurer que le texte reste blanc */
}
.wcb-whatsapp-button::before {
    content: '💬'; /* Icône de bulle de discussion */
    margin-right: 8px;
    font-size: 1.2em;
}

/* Message IA dynamique */
.wcb-ia-message {
    font-style: italic;
    color: #555;
    background-color: #f7f7f7;
    border-left: 4px solid #3498db; /* Bordure bleue */
    padding: 10px 15px;
    margin-top: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 0.95em;
}

/* NOUVEAUX STYLES pour les notifications de ventes en direct */
#wcb-live-sales-notifications-container {
    position: fixed;
    bottom: 20px;
    right: 20px; /* Reste à droite */
    z-index: 9999;
    pointer-events: none; /* Permet de cliquer à travers le conteneur vide */
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Alignement à droite */
}

.wcb-live-sale-notification {
    pointer-events: auto; /* Active les événements de souris sur la notification elle-même */
    background: #ffffff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 10px;
    border-radius: 8px;
    max-width: 320px;
    display: flex;
    align-items: center;
    gap: 10px; /* Espace entre image et texte */
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%); /* Commence hors de l'écran à droite */
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, visibility 0.4s ease-out;
    font-family: sans-serif;
    line-height: 1.4;
    color: #333;
    /* margin-bottom: 10px; Commenté car on affiche une seule notif à la fois */
}

.wcb-live-sale-notification.show { /* CORRECTION ICI: Changé de .is-visible à .show */
    opacity: 1;
    visibility: visible;
    transform: translateX(0); /* Glisse en place */
}

.wcb-live-sale-notification img {
    width: 60px; /* Taille de l'image plus grande */
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0; /* Empêche l'image de rétrécir */
}

.wcb-live-sale-notification .wcb-notification-content {
    flex-grow: 1; /* Permet au contenu de prendre l'espace restant */
    font-size: 0.95em;
}
.wcb-live-sale-notification .wcb-notification-content strong {
    color: #0073aa; /* Couleur pour le nom du produit */
}

/* Bouton de fermeture pour la notification */
.wcb-live-sale-notification .wcb-close-notification {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #999;
    padding: 2px;
    line-height: 1;
    margin-left: auto; /* Aligne à droite */
}
.wcb-live-sale-notification .wcb-close-notification:hover {
    color: #333;
}

/* Media Queries pour la responsivité */
@media (max-width: 768px) {
    #wcb-live-sales-notifications-container {
        bottom: 10px;
        right: 10px;
        left: 10px; /* Étend le conteneur sur toute la largeur */
        align-items: center; /* Centre les notifications sur mobile */
    }
    .wcb-live-sale-notification {
        max-width: calc(100% - 20px); /* Prend presque toute la largeur sur mobile */
        margin-left: auto;
        margin-right: auto;
    }
    .wcb-countdown,
    .wcb-free-shipping,
    .wcb-ia-message {
        margin-left: 5px;
        margin-right: 5px;
    }
    .wcb-whatsapp-button {
        display: block; /* Prend toute la largeur sur mobile */
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
}
