/* Bannière de gestion des cookies */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    padding: 1.5rem 0;
}

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

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

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-text {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-text p {
    margin: 0;
}

.cookie-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.cookie-text a:hover {
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

.cookie-btn.accept-all {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.cookie-btn.accept-all:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.cookie-btn.reject-all {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.cookie-btn.reject-all:hover {
    background: var(--background-light);
    color: var(--text-primary);
}

.cookie-btn.customize {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

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

/* Modal de personnalisation */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 2rem;
}

.cookie-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cookie-modal.show .cookie-modal-content {
    transform: scale(1);
}

.cookie-modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

.cookie-modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

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

.cookie-category {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.cookie-category:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

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

.cookie-category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    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-color: var(--text-light);
    transition: 0.3s;
    border-radius: 26px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    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(24px);
}

.cookie-toggle.disabled .cookie-toggle-slider {
    background-color: var(--border-color);
    cursor: not-allowed;
}

.cookie-toggle.disabled input {
    cursor: not-allowed;
}

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

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

.cookie-modal-footer .cookie-btn {
    min-width: 120px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        text-align: center;
    }

    .cookie-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .cookie-btn {
        flex: 1;
        min-width: 100px;
    }

    .cookie-modal {
        padding: 1rem;
    }

    .cookie-modal-content {
        max-height: 90vh;
    }

    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

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

    .cookie-modal-footer {
        flex-direction: column;
    }

    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 1rem 0;
    }

    .cookie-content {
        padding: 0 1rem;
    }

    .cookie-text {
        font-size: 0.9rem;
    }

    .cookie-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.85rem;
    }

    .cookie-modal-header {
        padding: 1.5rem 1rem 1rem;
    }

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

    .cookie-modal-footer {
        padding: 1rem 1rem 1.5rem;
    }
}