/**
 * Bandeau d'annonce en haut de page (menu « Bandeau » de l'administration).
 *
 * Chargé uniquement quand le bandeau est actif. Toutes les couleurs viennent
 * des variables générées par theme.json.
 */

.lola-banner {
    background: var(--wp--preset--color--primary-dark);
    color: var(--wp--preset--color--base);
    font-size: 0.875rem;
    line-height: 1.45;
}

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

.lola-banner--gold {
    background: var(--wp--preset--color--secondary);
    color: var(--wp--preset--color--contrast);
}

.lola-banner--pink {
    background: var(--wp--preset--color--accent);
    color: var(--wp--preset--color--contrast);
}

/* Le message reste centré sur la page : la croix est sortie du flux et une
   marge égale de chaque côté lui réserve sa place. */
.lola-banner__inner {
    position: relative;
    max-width: var(--wp--style--global--wide-size);
    margin-inline: auto;
    padding: 0.6rem 2.75rem;
}

.lola-banner__message {
    margin: 0;
    text-align: center;
    text-wrap: balance;
}

.lola-banner__message strong,
.lola-banner__message b {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.lola-banner__link {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    white-space: nowrap;
    transition: text-decoration-thickness var(--lola-transition);
}

.lola-banner__link:hover {
    color: inherit;
    text-decoration-thickness: 2px;
}

.lola-banner__close {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-end: 0.5rem;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color var(--lola-transition);
}

.lola-banner__close:hover {
    background: color-mix(in srgb, currentColor 14%, transparent);
}

/* Le contour doré du thème disparaîtrait sur le fond doré : on suit la
   couleur du texte, lisible sur les trois fonds. */
.lola-banner :focus-visible {
    outline-color: currentColor;
}

@media (max-width: 600px) {
    .lola-banner {
        font-size: 0.8125rem;
    }

    .lola-banner__inner {
        padding-inline: 1rem 2.75rem;
    }

    .lola-banner__message {
        text-align: start;
    }
}
