/* Styles pour le consentement cookie conforme au RGPD */
/* Compatible avec le thème global (variables CSS) */

/* Bandeau de consentement */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--container-background);
    border-top: 3px solid var(--primary-color);
    box-shadow: 0 -4px 20px var(--container-shadow);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    padding: 25px;
    font-family: 'Quicksand', sans-serif;
}

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

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .cookie-banner-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cookie-banner-text h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 700;
}

.cookie-banner-text p {
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

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

/* Boutons */
.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Quicksand', sans-serif;
    box-shadow: 0 2px 4px var(--container-shadow);
}

.cookie-btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.cookie-btn-primary:hover {
    background-color: var(--button-hover-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--container-shadow);
}

.cookie-btn-secondary {
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.cookie-btn-secondary:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
}

/* Modal de paramètres */
.cookie-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow-y: auto;
    font-family: 'Quicksand', sans-serif;
}

.cookie-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-modal-content {
    background-color: var(--container-background);
    margin: 20px;
    padding: 35px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px var(--container-shadow);
    border: 2px solid var(--border-color);
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 20px;
}

.cookie-modal-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.cookie-modal-close {
    font-size: 32px;
    cursor: pointer;
    color: var(--text-secondary);
    background: none;
    border: none;
    padding: 0;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.cookie-modal-close:hover {
    color: var(--primary-color);
    background-color: var(--bg-color);
}

.cookie-modal-body {
    margin-bottom: 30px;
}

/* Options de cookies */
.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 15px;
    background-color: var(--bg-color);
    transition: all 0.3s ease;
}

.cookie-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.cookie-option-info h4 {
    margin: 0 0 8px 0;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.cookie-option-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

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

.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: #bdc3c7;
    transition: 0.3s;
    border-radius: 28px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    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: var(--primary-color);
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background-color: var(--primary-color);
    opacity: 0.7;
    cursor: not-allowed;
}

.cookie-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 25px;
    border-top: 2px solid var(--border-color);
}

/* Bouton de paramètres flottant */
.cookie-settings-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 22px;
    z-index: 9998;
    box-shadow: 0 4px 15px var(--container-shadow);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Quicksand', sans-serif;
}

.cookie-settings-btn:hover {
    background-color: var(--button-hover-color);
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 20px var(--container-shadow);
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-banner-buttons {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
    
    .cookie-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .cookie-toggle {
        margin-left: 0;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }
    
    .cookie-settings-btn {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

/* Animation d'apparition */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

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

.cookie-banner.show {
    animation: slideUp 0.3s ease;
}

.cookie-modal.show {
    animation: fadeIn 0.3s ease;
}