/* ===== BANNIÈRE DE CONSENTEMENT RGPD ===== */

/* Overlay de fond */
.cookie-consent-overlay,
#cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    animation: fadeIn 0.3s ease-in-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Bannière principale */
.cookie-consent-banner,
#cookie-consent-banner {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid #e9ecef;
    transform: scale(0.9);
    animation: scaleIn 0.3s ease-out forwards;
}

@keyframes scaleIn {
    to {
        transform: scale(1);
    }
}

/* Header de la bannière */
.cookie-consent-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 24px;
    border-radius: 16px 16px 0 0;
    position: relative;
    overflow: hidden;
}

.cookie-consent-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.4;
    }
}

.cookie-consent-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-consent-title::before {
    content: '🍪';
    font-size: 1.8rem;
}

.cookie-consent-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
}

/* Contenu principal */
.cookie-consent-content {
    padding: 24px;
}

.cookie-consent-description {
    color: #495057;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Catégories de cookies */
.cookie-categories {
    margin-bottom: 24px;
}

.cookie-category {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.cookie-category:hover {
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.cookie-category-header {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-bottom: 1px solid #e9ecef;
}

.cookie-category-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.cookie-category-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.cookie-category-details h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
}

.cookie-category-details p {
    margin: 0;
    font-size: 0.875rem;
    color: #6c757d;
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #28a745;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(24px);
}

.cookie-toggle.disabled .cookie-toggle-slider {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.cookie-toggle.disabled .cookie-toggle-slider:before {
    background-color: #6c757d;
}

/* Boutons d'action */
.cookie-consent-actions {
    display: flex;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 16px 16px;
}

.cookie-consent-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.cookie-consent-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.cookie-consent-btn:hover::before {
    width: 200%;
    height: 200%;
}

.cookie-consent-btn.primary {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.cookie-consent-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

.cookie-consent-btn.secondary {
    background: #6c757d;
    color: white;
}

.cookie-consent-btn.secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.3);
}

.cookie-consent-btn.outline {
    background: transparent;
    color: #007bff;
    border: 2px solid #007bff;
}

.cookie-consent-btn.outline:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
}

/* Lien vers les détails */
.cookie-consent-details-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.cookie-consent-details-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Indicateur de statut */
.cookie-status-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.3s ease-out forwards;
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-consent-overlay {
        padding: 10px;
    }
    
    .cookie-consent-banner {
        max-width: 100%;
        border-radius: 12px;
    }
    
    .cookie-consent-header {
        padding: 20px;
        border-radius: 12px 12px 0 0;
    }
    
    .cookie-consent-title {
        font-size: 1.3rem;
    }
    
    .cookie-consent-content {
        padding: 20px;
    }
    
    .cookie-consent-actions {
        flex-direction: column;
        padding: 20px;
    }
    
    .cookie-consent-btn {
        width: 100%;
    }
}

/* Thème sombre */
@media (prefers-color-scheme: dark) {
    .cookie-consent-banner {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: #ecf0f1;
        border-color: #4a5568;
    }
    
    .cookie-consent-description {
        color: #cbd5e0;
    }
    
    .cookie-category {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .cookie-category-header {
        background: #1a202c;
        border-color: #4a5568;
    }
    
    .cookie-category-details h4 {
        color: #e2e8f0;
    }
    
    .cookie-category-details p {
        color: #a0aec0;
    }
    
    .cookie-consent-actions {
        background: #2d3748;
        border-color: #4a5568;
    }
}

/* Accessibilité */
.cookie-consent-banner:focus-within {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

.cookie-consent-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.cookie-toggle input:focus + .cookie-toggle-slider {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

/* Animation de fermeture */
.cookie-consent-overlay.closing {
    animation: fadeOut 0.3s ease-in-out forwards;
}

.cookie-consent-overlay.closing .cookie-consent-banner {
    animation: scaleOut 0.3s ease-in forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

@keyframes scaleOut {
    to {
        transform: scale(0.9);
    }
}

/* Correction légère pour affichage */
#cookie-consent-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999999;
    max-width: 500px;
    width: 90%;
} 