/**
 * MyAssurBox — Bandeau de consentement cookies
 */

.cookie-banner {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 9999;
    padding: 1rem;
    background: var(--color-primary-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.28);
    color: var(--color-text-light);
    transform: translateY(100%);
    transition: transform 0.35s ease;
}

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

.cookie-banner[hidden] {
    display: none;
}

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

.cookie-banner__title {
    margin: 0 0 0.35rem;
    font-weight: 600;
}

.cookie-banner__desc {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
}

.cookie-banner__desc a {
    color: var(--color-text-light);
    text-decoration: underline;
}

.cookie-banner__actions {
    display: flex;
    flex-shrink: 0;
    gap: 0.75rem;
}

.cookie-banner__btn {
    white-space: nowrap;
}

/* Le bouton « Refuser » doit rester aussi lisible que « Accepter » :
   un refus difficile à voir vicierait le consentement (recommandation CNIL). */
.cookie-banner .btn--outline {
    color: var(--color-text-light);
    border-color: rgba(255, 255, 255, 0.45);
}

.cookie-banner .btn--outline:hover,
.cookie-banner .btn--outline:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--color-text-light);
}

/* Lien « Gérer les cookies » du footer */
.footer__cookie-settings {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 767px) {
    .cookie-banner__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .cookie-banner__actions {
        justify-content: stretch;
    }

    .cookie-banner__btn {
        flex: 1;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-banner {
        transition: none;
    }
}
