/* Cookie Banner */
.cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    max-width: 900px;
    width: calc(100% - 40px);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 25px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.cookie-consent.show {
    transform: translateX(-50%) translateY(0);
}

.cookie-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.cookie-content {
    width: 100%;
}

.cookie-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
}

.cookie-description {
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 0;
}

.cookie-link {
    color: #1776d2;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cookie-link:hover {
    color: #b27a42;
    gap: 8px;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.cookie-consent .btn {
    padding: 12px 28px;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: none;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.btn-accept {
    background: #1776d2;
    color: #ffffff;
}

.btn-accept:hover {
    background: #1776d2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 115, 190, 0.4);
}

.btn-customize {
    background: #b27a42;
    color: white;
}

.btn-customize:hover {
    background: #8f6235;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(178, 122, 66, 0.4);
}

.btn-decline {
    background: rgb(226, 20, 20);
    color: white;
    border: 2px solid white;
}

.btn-decline:hover {
    background: white;
    color: #1776d2;
    transform: translateY(-2px);
}

/* Modal de personnalisation */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

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

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

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: linear-gradient(135deg, #1776d2 0%, #1776d2 100%);
    color: white;
    padding: 30px;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.modal-header h2 {
    font-size: 26px;
    margin-bottom: 10px;
    color: white;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.cookie-category {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    transition: all 0.3s;
}

.cookie-category:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.category-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-top: 10px;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    flex-shrink: 0;
}

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

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

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

input:checked + .toggle-slider {
    background: #1776d2;
}

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

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

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.btn-modal {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-save {
    background: #1776d2;
    color: white;
}

.btn-save:hover {
    background: #1776d2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 115, 190, 0.4);
}

.btn-cancel {
    background: #e9ecef;
    color: #333;
}

.btn-cancel:hover {
    background: #dee2e6;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-consent {
        bottom: 10px;
        width: calc(100% - 20px);
        padding: 20px;
    }

    .cookie-title {
        font-size: 20px;
    }

    .cookie-description {
        font-size: 14px;
    }

    .cookie-buttons {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .cookie-consent .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    .modal-content {
        margin: 10px;
        max-height: 85vh;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-header h2 {
        font-size: 22px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        flex-direction: column;
        padding: 15px 20px;
    }

    .btn-modal {
        width: 100%;
    }

    .category-title {
        font-size: 16px;
    }
}