/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--blanc);
    padding: 30px;
    border-radius: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    z-index: 9999;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-banner.show {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Overlay */
.cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-overlay.show {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Préférences Modal */
.cookie-preferences {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--blanc);
    padding: 30px;
    border-radius: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10000;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-preferences.show {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Titre et texte */
.cookie-banner__title,
.cookie-preferences__title {
    font-family: 'Raleway', sans-serif;
    font-size: 2rem;
    color: var(--vert-texte);
    margin-bottom: 20px;
}

.cookie-banner__text {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--vert-texte);
    margin-bottom: 25px;
    line-height: 1.5;
}

.cookie-banner__link {
    color: var(--vert-menu);
    text-decoration: underline;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cookie-banner__link:hover {
    color: var(--vert-menu);
    text-decoration: none;
}

/* Boutons communs */
.cookie-banner__buttons,
.cookie-preferences__actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Style de base pour tous les boutons */
.cookie-banner__button,
.cookie-preferences__button {
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--vert-texte);
    border: none;
    min-width: 140px;
    text-align: center;
    white-space: nowrap;
}

/* Boutons de la bannière principale */
.cookie-banner__button--accept,
.cookie-banner__button--manage {
    background-color: var(--vert-texte);
    color: var(--blanc);
}

/* Boutons des préférences */
.cookie-preferences__actions {
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.cookie-preferences__button--accept {
    background-color: var(--vert-texte);
    color: var(--blanc);
}

.cookie-preferences__button--reject {
    background-color: var(--blanc);
    color: var(--vert-texte);
    border: 1px solid var(--vert-texte);
}

.cookie-preferences__button--save {
    background-color: var(--blanc);
    color: var(--vert-texte);
    text-decoration: none;
    border: 1px solid var(--vert-texte);
}

/* Effets hover */
.cookie-banner__button:hover,
.cookie-preferences__button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Catégories */
.cookie-category {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.02);
    cursor: pointer;
}

.cookie-category__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-category__title {
    font-family: 'Raleway', sans-serif;
    font-size: 1.1rem;
    color: var(--vert-texte);
    margin: 0;
    padding-right: 20px;
}

.cookie-category__content {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--vert-texte);
    margin-top: 10px;
    display: none;
    line-height: 1.5;
}

.cookie-category.expanded .cookie-category__content {
    display: block;
}

/* Switch */
.cookie-category__toggle {
    position: relative;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-category__toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cookie-category__slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #E8E8E8;
    transition: .3s ease;
    border-radius: 24px;
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
}

.cookie-category__slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cookie-category__toggle input:checked + .cookie-category__slider {
    background-color: #86C389;
}

.cookie-category__toggle input:checked + .cookie-category__slider:before {
    transform: translateX(22px);
}

.cookie-category__toggle input:disabled + .cookie-category__slider {
    background-color: #86C389;
    opacity: 1;
    cursor: not-allowed;
}

/* Ajustement du conteneur de catégorie */
.cookie-category {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    background: #F8F8F8;
    cursor: default;
}

.cookie-category__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.cookie-category__toggle {
    pointer-events: auto;
    z-index: 2;
}

/* Flèche indicatrice sur les catégories */
.cookie-category__title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-category__arrow {
    display: inline-block;
    transform: rotate(0deg);
    transition: transform 0.2s ease;
    font-weight: 700;
    color: var(--vert-texte);
}

.cookie-category.expanded .cookie-category__arrow {
    transform: rotate(180deg);
}

/* Bouton fermer */
.cookie-preferences__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--vert-texte);
    cursor: pointer;
    padding: 5px;
    position: absolute;
    top: 20px;
    right: 20px;
}

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

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Media Queries */
@media (max-width: 576px) {
    .cookie-banner {
        bottom: 10px;
        justify-content: center;
        text-align: start;
        width: 90%;
        max-width: 90%;
        max-height: 60%;
        border-radius: 16px;
        padding: 20px;
        line-height: 1.4;
    }

    .cookie-banner__title {
        font-size: 1.4rem;
    }

    .cookie-banner__text {
        font-size: 0.8rem;
    }

    /* .cookie-preferences {
        bottom: 10px;
        justify-content: center;
        text-align: start;
        width: 90%;
        max-width: 90%;
        max-height: 100%;
        border-radius: 16px;
        padding: 20px;
        line-height: 1.4;
    } */
    .cookie-preferences__actions {
        flex-direction: row;
        gap: 2px;
    }

    /* Style de base pour tous les boutons */
    .cookie-banner__button
     {
        font-size: 0.6rem;
        margin: 2px;
        max-width: 100%;
        padding-left: 4px;
        padding-right: 4px;
        white-space: nowrap;
    }
    .cookie-preferences__button
    {
        font-size: 0.6rem;
        margin: 2px;
        max-width: 70%;
        min-width: 100px;
        padding-left: 4px;
        padding-right: 4px;
        white-space: nowrap;
    }
}
