/**
 * DJ Prestige Sound Chatbot - Styles Clean
 * Version optimisée avec focus sur les performances et l'accessibilité
 */

/* Variables CSS pour une maintenance facile */
:root {
    --chatbot-primary: #D4AF37;
    --chatbot-primary-light: #FFD700;
    --chatbot-dark: #1a1a1a;
    --chatbot-dark-light: #2d2d2d;
    --chatbot-white: #ffffff;
    --chatbot-white-80: rgba(255, 255, 255, 0.8);
    --chatbot-white-05: rgba(255, 255, 255, 0.05);
    --chatbot-black-95: rgba(0, 0, 0, 0.95);
    --chatbot-black-40: rgba(0, 0, 0, 0.4);
    --chatbot-primary-20: rgba(212, 175, 55, 0.2);
    --chatbot-primary-30: rgba(212, 175, 55, 0.3);
    --chatbot-primary-40: rgba(212, 175, 55, 0.4);
    --chatbot-primary-50: rgba(212, 175, 55, 0.5);
    --chatbot-primary-70: rgba(212, 175, 55, 0.7);
    
    --chatbot-shadow-light: 0 4px 20px rgba(0, 0, 0, 0.3);
    --chatbot-shadow-strong: 0 10px 40px rgba(0, 0, 0, 0.5);
    --chatbot-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --chatbot-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset pour éviter les conflits */
.dj-chatbot-button,
.dj-chatbot-widget,
.dj-chatbot-widget * {
    box-sizing: border-box;
}

/* Bouton principal du chatbot */
.dj-chatbot-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chatbot-dark), var(--chatbot-dark-light));
    border: 2px solid var(--chatbot-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    transition: var(--chatbot-transition);
    box-shadow: var(--chatbot-shadow-light);
    user-select: none;
    outline: none;
}

.dj-chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px var(--chatbot-primary-40);
    border-color: var(--chatbot-primary-light);
}

.dj-chatbot-button:focus-visible {
    outline: 2px solid var(--chatbot-primary);
    outline-offset: 2px;
}

.dj-chatbot-button.active {
    background: linear-gradient(135deg, var(--chatbot-primary), var(--chatbot-primary-light));
    border-color: var(--chatbot-primary-light);
}

.dj-chatbot-button i {
    font-size: 24px;
    color: var(--chatbot-primary);
    transition: var(--chatbot-transition);
    pointer-events: none;
}

.dj-chatbot-button.active i {
    color: var(--chatbot-dark);
    transform: rotate(180deg);
}

/* Widget principal */
.dj-chatbot-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 400px;
    height: 600px;
    background: var(--chatbot-black-95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--chatbot-primary-30);
    box-shadow: var(--chatbot-shadow-strong);
    transform: scale(0.9) translateY(50px);
    opacity: 0;
    visibility: hidden;
    transition: var(--chatbot-transition);
    z-index: 9999;
    overflow: hidden;
    font-family: var(--chatbot-font);
    display: flex;
    flex-direction: column;
}

.dj-chatbot-widget.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Header du widget */
.dj-chatbot-header {
    padding: 20px;
    background: var(--chatbot-black-40);
    border-bottom: 1px solid var(--chatbot-primary-20);
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-shrink: 0;
}

/* Sélecteur de langue */
.dj-chatbot-lang-selector {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.dj-chatbot-lang-btn {
    padding: 8px 12px;
    border: 1px solid var(--chatbot-primary-30);
    background: transparent;
    color: var(--chatbot-white);
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    transition: var(--chatbot-transition);
    outline: none;
}

.dj-chatbot-lang-btn:hover,
.dj-chatbot-lang-btn.active {
    background: var(--chatbot-primary-20);
    border-color: var(--chatbot-primary);
    transform: scale(1.05);
}

.dj-chatbot-lang-btn:focus-visible {
    outline: 2px solid var(--chatbot-primary);
    outline-offset: 1px;
}

/* Titre */
.dj-chatbot-title {
    text-align: center;
}

.dj-chatbot-title h3 {
    color: var(--chatbot-primary);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
    line-height: 1.2;
}

.dj-chatbot-title p {
    color: var(--chatbot-white-80);
    font-size: 14px;
    margin: 0;
    line-height: 1.3;
}

/* Boutons de contact rapide */
.dj-chatbot-contact-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.dj-chatbot-contact-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--chatbot-transition);
    font-size: 16px;
    outline: none;
}

.dj-chatbot-contact-btn:focus-visible {
    outline: 2px solid var(--chatbot-primary);
    outline-offset: 2px;
}

.dj-chatbot-contact-btn.phone {
    background: rgba(0, 123, 255, 0.2);
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.3);
}

.dj-chatbot-contact-btn.phone:hover {
    background: rgba(0, 123, 255, 0.3);
    transform: scale(1.1);
}

.dj-chatbot-contact-btn.email {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.dj-chatbot-contact-btn.email:hover {
    background: rgba(220, 53, 69, 0.3);
    transform: scale(1.1);
}

.dj-chatbot-contact-btn.whatsapp {
    background: rgba(37, 211, 102, 0.2);
    color: #25D366;
    border: 1px solid rgba(37, 211, 102, 0.3);
}

.dj-chatbot-contact-btn.whatsapp:hover {
    background: rgba(37, 211, 102, 0.3);
    transform: scale(1.1);
}

/* Contenu scrollable */
.dj-chatbot-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dj-chatbot-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--chatbot-primary-50) transparent;
}

/* Scrollbar personnalisée */
.dj-chatbot-scroll::-webkit-scrollbar {
    width: 6px;
}

.dj-chatbot-scroll::-webkit-scrollbar-track {
    background: var(--chatbot-white-05);
    border-radius: 3px;
}

.dj-chatbot-scroll::-webkit-scrollbar-thumb {
    background: var(--chatbot-primary-50);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.dj-chatbot-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--chatbot-primary-70);
}

/* Sections de contenu */
.dj-chatbot-section {
    margin-bottom: 25px;
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}

.dj-chatbot-section:nth-child(1) { animation-delay: 0.1s; }
.dj-chatbot-section:nth-child(2) { animation-delay: 0.2s; }
.dj-chatbot-section:nth-child(3) { animation-delay: 0.3s; }

.dj-chatbot-section h4 {
    color: var(--chatbot-primary);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 15px 0;
    padding: 0 5px;
}

/* Liens de navigation */
.dj-chatbot-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dj-chatbot-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--chatbot-white-05);
    border: 1px solid var(--chatbot-primary-20);
    border-radius: 10px;
    color: var(--chatbot-white) !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--chatbot-transition);
    line-height: 1.4;
    outline: none;
}

.dj-chatbot-link:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--chatbot-primary-40);
    transform: translateX(5px);
    color: var(--chatbot-primary) !important;
}

.dj-chatbot-link:focus-visible {
    outline: 2px solid var(--chatbot-primary);
    outline-offset: 1px;
}

.dj-chatbot-link i {
    font-size: 16px;
    width: 16px;
    text-align: center;
    color: inherit;
    flex-shrink: 0;
}

/* Spacer pour permettre le scroll jusqu'en bas */
.dj-chatbot-spacer {
    height: 50px;
    flex-shrink: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation de pulsation pour le bouton */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 var(--chatbot-primary-40); }
    70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.dj-chatbot-button.pulse {
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dj-chatbot-widget {
        width: 380px;
        height: 580px;
    }
}

@media (max-width: 768px) {
    .dj-chatbot-widget {
        width: 350px;
        height: 550px;
        right: 15px;
        bottom: 80px;
    }
    
    .dj-chatbot-button {
        right: 15px;
        bottom: 15px;
        width: 55px;
        height: 55px;
    }
    
    .dj-chatbot-button i {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .dj-chatbot-widget {
        width: calc(100vw - 20px);
        max-width: 320px;
        height: 520px;
        right: 10px;
        left: 10px;
    }
    
    .dj-chatbot-header {
        padding: 15px;
        gap: 12px;
    }
    
    .dj-chatbot-scroll {
        padding: 15px;
    }
    
    .dj-chatbot-title h3 {
        font-size: 16px;
    }
    
    .dj-chatbot-title p {
        font-size: 13px;
    }
    
    .dj-chatbot-link {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .dj-chatbot-section {
        margin-bottom: 20px;
    }
}

@media (max-width: 360px) {
    .dj-chatbot-widget {
        width: calc(100vw - 10px);
        right: 5px;
        left: 5px;
    }
    
    .dj-chatbot-header {
        padding: 12px;
    }
    
    .dj-chatbot-scroll {
        padding: 12px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .dj-chatbot-widget {
        border: 2px solid var(--chatbot-primary);
        background: #000000;
    }
    
    .dj-chatbot-link {
        border: 1px solid var(--chatbot-primary);
    }
    
    .dj-chatbot-lang-btn {
        border: 1px solid var(--chatbot-primary);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .dj-chatbot-button,
    .dj-chatbot-widget,
    .dj-chatbot-link,
    .dj-chatbot-lang-btn,
    .dj-chatbot-contact-btn {
        transition: none;
    }
    
    .dj-chatbot-section {
        animation: none;
        opacity: 1;
    }
    
    .dj-chatbot-button.pulse {
        animation: none;
    }
}

/* Dark mode improvements */
@media (prefers-color-scheme: dark) {
    .dj-chatbot-widget {
        background: rgba(0, 0, 0, 0.98);
        border-color: var(--chatbot-primary-40);
    }
}

/* Print styles */
@media print {
    .dj-chatbot-button,
    .dj-chatbot-widget {
        display: none !important;
    }
}