.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    font-family: 'Outfit', sans-serif;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1680px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-text {
    flex: 1;
    font-size: var(--font-size-md);
    color: var(--text-color);
    line-height: 1.6;
}

.cookie-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.cookie-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
    font-size: var(--font-size-sm);
    text-decoration: none;
}

.cookie-btn-primary {
    background: var(--primary-color);
    color: #FFF;
}

.cookie-btn-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.cookie-btn-secondary {
    background: transparent;
    color: var(--primary-color);
}

.cookie-btn-secondary:hover {
    background: var(--light-orange);
}

.cookie-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.cookie-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color 0.3s ease;
    padding: 0.5rem;
    border-radius: 4px;
}

.cookie-link:hover {
    color: var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Modal des préférences */
.cookie-preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-preferences-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-preferences-content {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.cookie-preferences-header {
    margin-bottom: 2rem;
    text-align: center;
}

.cookie-preferences-header h2 {
    font-size: var(--font-size-xl);
    color: var(--text-color);
    margin-bottom: 1rem;
}

.cookie-preferences-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;  /* Augmentation de la taille */
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.3s ease;
    padding: 10px;    /* Ajout de padding pour agrandir la zone cliquable */
    z-index: 10001;   /* Z-index plus élevé */
    width: 40px;      /* Largeur fixe */
    height: 40px;     /* Hauteur fixe */
    display: flex;    /* Centrage du X */
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Forme ronde */
}

.cookie-preferences-close:hover {
    color: var(--primary-color);
    background-color: rgba(0, 0, 0, 0.1); /* Effet de survol */
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    background: var(--light-orange);
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cookie-category-title {
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--text-color);
}

.cookie-category-description {
    font-size: var(--font-size-sm);
    color: #666;
    margin-bottom: 0.5rem;
}

/* Switch toggle */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background-color: var(--primary-color);
}

input:checked + .cookie-slider:before {
    transform: translateX(26px);
}

/* Styles pour les appareils mobiles */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }

    .cookie-links {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}

/* Styles pour l'accessibilité */
.cookie-btn:focus,
.cookie-link:focus,
.cookie-preferences-close:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

[role="dialog"] {
    outline: none;
}

/* Animation d'entrée */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-banner.show {
    animation: slideUp 0.5s ease forwards;
}

.open-cookie-banner-btn {
    padding: 0.2rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 2px solid var(--primary-color);
    background-color: var(--primary-color);
    color: #FFF;
}

.open-cookie-banner-btn:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}
