/**
 * Styles pour le système de consentement aux cookies
 * PsychozAI - Conforme RGPD
 */

/* Banner de consentement principal */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    max-height: 80vh;
    overflow-y: auto;
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-consent-banner.hide {
    transform: translateY(100%);
}

.cookie-banner-content {
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-banner-text h5 {
    color: #333;
    font-weight: 600;
}

.cookie-banner-text p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

/* Notification de succès */
.cookie-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cookie-notification.show {
    transform: translateX(0);
}

.cookie-notification.hide {
    transform: translateX(100%);
}

/* Modal de personnalisation */
.modal-dialog .card {
    border: 1px solid #e9ecef;
    transition: border-color 0.2s ease;
}

.modal-dialog .card:hover {
    border-color: #007bff;
}

.form-check-input:checked {
    background-color: #007bff;
    border-color: #007bff;
}

.form-check-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Badge obligatoire */
.badge.bg-danger {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner-content {
        padding: 1rem;
    }
    
    .cookie-banner-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-banner-actions .btn {
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    .cookie-banner-actions .btn:last-child {
        margin-bottom: 0;
    }
    
    .cookie-notification {
        left: 10px;
        right: 10px;
        top: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .cookie-notification.show {
        transform: translateY(0);
    }
    
    .cookie-notification.hide {
        transform: translateY(-100%);
    }
}

@media (max-width: 576px) {
    .cookie-banner-text h5 {
        font-size: 1.1rem;
    }
    
    .cookie-banner-text p {
        font-size: 0.9rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
}

/* Animation des boutons */
.cookie-banner-actions .btn {
    transition: all 0.2s ease;
}

.cookie-banner-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Styles pour le mode sombre (si supporté) */
@media (prefers-color-scheme: dark) {
    .cookie-consent-banner {
        background: rgba(33, 37, 41, 0.98);
        border-top-color: #495057;
    }
    
    .cookie-banner-text h5 {
        color: #fff;
    }
    
    .cookie-banner-text p {
        color: #ced4da;
    }
    
    .modal-content {
        background-color: #212529;
        color: #fff;
    }
    
    .modal-dialog .card {
        background-color: #343a40;
        border-color: #495057;
        color: #fff;
    }
    
    .modal-dialog .card:hover {
        border-color: #0d6efd;
    }
    
    .alert-info {
        background-color: #0c5460;
        border-color: #0a4c57;
        color: #b3ecf2;
    }
}

/* Animation de pulsation pour attirer l'attention */
@keyframes pulse-banner {
    0% {
        box-shadow: 0 -4px 20px rgba(0, 123, 255, 0.1);
    }
    50% {
        box-shadow: 0 -4px 25px rgba(0, 123, 255, 0.2);
    }
    100% {
        box-shadow: 0 -4px 20px rgba(0, 123, 255, 0.1);
    }
}

.cookie-consent-banner.show {
    animation: pulse-banner 3s ease-in-out infinite;
}

/* Styles pour les icônes */
.cookie-banner-text .bi {
    flex-shrink: 0;
}

/* Lien de gestion des cookies dans le footer */
.cookie-manage-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.cookie-manage-link:hover {
    color: #007bff;
    text-decoration: underline;
}

/* Loading state pour les boutons */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}