/* ========================================
   SYSTÈME DE GESTION DES COOKIES RGPD
   ======================================== */

/* Bandeau cookies principal */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
   background: linear-gradient(45deg, var(--accent-gold), var(--accent-red));
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    animation: slideUp 0.5s ease-in-out 0.5s forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

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

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

.cookie-consent-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.95;
    line-height: 1.5;
}

.cookie-consent-text a {
    color: white;
    text-decoration: underline;
    font-weight: bold;
}

.cookie-consent-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-consent-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cookie-consent-btn-accept {
    background: white;
    color: #667eea;
}

.cookie-consent-btn-accept:hover {
    background: #f7fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cookie-consent-btn-customize {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cookie-consent-btn-customize:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cookie-consent-btn-refuse {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.cookie-consent-btn-refuse:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.05);
}

/* Modal de personnalisation */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cookie-modal.active {
    display: flex;
}

.cookie-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cookie-modal-header {
   background: linear-gradient(45deg, var(--accent-gold), var(--accent-red));
    color: white;
    padding: 2rem;
    border-radius: 12px 12px 0 0;
}

.cookie-modal-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
}

.cookie-modal-header p {
    margin: 0;
    opacity: 0.95;
}

.cookie-modal-body {
    padding: 2rem;
}

.cookie-category {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

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

.cookie-category-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.2rem;
}

.cookie-toggle {
    position: relative;
    width: 50px;
    height: 26px;
}

.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: #cbd5e0;
    border-radius: 26px;
    transition: 0.3s;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: #667eea;
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-category-description {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.cookie-category-required {
    display: inline-block;
    background: #ffc107;
    color: #856404;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-top: 0.5rem;
}

.cookie-modal-footer {
    padding: 1.5rem 2rem;
    background: #f7fafc;
    border-radius: 0 0 12px 12px;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.cookie-modal-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cookie-modal-btn-save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cookie-modal-btn-save:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.cookie-modal-btn-cancel {
    background: #e2e8f0;
    color: #4a5568;
}

.cookie-modal-btn-cancel:hover {
    background: #cbd5e0;
}

/* Bouton de gestion des cookies (coin de la page) */
.cookie-settings-trigger {
    position: fixed;
    bottom: 20px;
    left: 20px;
 background: linear-gradient(45deg, var(--accent-gold), var(--accent-red));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    z-index: 9999;
    transition: all 0.3s;
    display: none;
}

.cookie-settings-trigger.visible {
    display: block;
}

.cookie-settings-trigger:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.cookie-settings-trigger:before {
    content: "🍪";
    margin-right: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 1rem;
    }
    
    .cookie-consent-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cookie-consent-actions {
        width: 100%;
    }
    
    .cookie-consent-btn {
        flex: 1;
        text-align: center;
    }
    
    .cookie-modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .cookie-modal-header {
        padding: 1.5rem;
    }
    
    .cookie-modal-body {
        padding: 1.5rem;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .cookie-modal-btn {
        width: 100%;
    }
    
    .cookie-settings-trigger {
        bottom: 10px;
        left: 10px;
        font-size: 0.85rem;
        padding: 0.6rem 1.2rem;
    }
}
