/* ==================== BANNIÈRE COOKIES PRINCIPALE ==================== */

.cookie-banner {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: 600px !important;
    width: calc(100% - 40px) !important;
    background: white !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
    padding: 24px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    z-index: 10000 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: all 0.3s ease !important;
    
    /* Suppression des propriétés problématiques */
    /* backdrop-filter: blur(10px); */
}

.cookie-banner.show {
    opacity: 1 !important;
    pointer-events: all !important;
    animation: slideUp 0.4s ease-out;
}

.cookie-banner.expanded {
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ==================== CONTENU PRINCIPAL ==================== */

.cookie-banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.cookie-banner .cookie-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.cookie-banner-text {
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
}

.cookie-banner-text a {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.cookie-banner-text a:hover {
    border-bottom-color: #8b5cf6;
}

/* ==================== BOUTONS ==================== */

.cookie-banner-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 100px;
}

.cookie-btn-accept {
    background: #8b5cf6;
    color: white;
}

.cookie-btn-accept:hover {
    background: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.cookie-btn-refuse {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.cookie-btn-refuse:hover {
    background: #e5e7eb;
    color: #374151;
}

.cookie-btn-settings {
    background: transparent;
    color: #8b5cf6;
    border: 1px solid #8b5cf6;
}

.cookie-btn-settings:hover {
    background: #8b5cf6;
    color: white;
}

.cookie-btn-back {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.cookie-btn-back:hover {
    background: #e5e7eb;
}

/* ==================== SECTION PARAMÈTRES ==================== */

.cookie-settings {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.cookie-settings.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.cookie-settings h3 {
    color: #374151;
    font-size: 16px;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==================== CATÉGORIES DE COOKIES ==================== */

.cookie-category {
    margin-bottom: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #f3f4f6;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cookie-category-title {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    margin-bottom: 4px;
}

.cookie-category-description {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.cookie-services {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
}

/* ==================== TOGGLE SWITCHES ==================== */

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.toggle-switch.active {
    background: #8b5cf6;
}

.toggle-switch.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch.active::after {
    transform: translateX(20px);
}

/* ==================== BOUTONS PARAMÈTRES ==================== */

.settings-buttons {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== RESPONSIVE MOBILE ==================== */

@media (max-width: 600px) {
    .cookie-banner {
        bottom: 10px;
        width: calc(100% - 20px);
        padding: 20px;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .cookie-banner-buttons,
    .settings-buttons {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }

    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .cookie-category-title {
        margin-bottom: 0;
    }

    .cookie-category-description {
        margin-bottom: 4px;
    }
}

/* ==================== THÈME SOMBRE (OPTIONNEL) ==================== */

@media (prefers-color-scheme: dark) {
    .cookie-banner {
        background: rgba(31, 41, 55, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .cookie-banner-text {
        color: #d1d5db;
    }
    
    .cookie-btn-refuse,
    .cookie-btn-back {
        background: #374151;
        color: #d1d5db;
        border-color: #4b5563;
    }
    
    .cookie-btn-refuse:hover,
    .cookie-btn-back:hover {
        background: #4b5563;
        color: #f9fafb;
    }

    .cookie-settings h3 {
        color: #d1d5db;
    }

    .cookie-category {
        background: #374151;
        border-color: #4b5563;
    }

    .cookie-category-title {
        color: #d1d5db;
    }

    .cookie-category-description {
        color: #9ca3af;
    }
}

/* ==================== UTILITAIRES ==================== */

.cookie-banner .hidden {
    display: none;
}

.cookie-banner .fade-out {
    opacity: 0;
    pointer-events: none;
}