/* Bandeau du module Bandeau : tout en haut de la page, avant le menu (il défile avec la page, le menu reste collé en haut), ou dans une page avec la row Bandeau.
   Vue : app/Views/Pwa/_banner.php ; script de fermeture et de compte à rebours : pwa-banner.js. Couleurs : --bn-bg (fond) et --bn-text (texte, aussi le fond du bouton) ; --bn-pad : marge intérieure en haut et en bas ;
   --bn-cd-bg et --bn-cd-text : fond des blocs et chiffres du compte à rebours (sans elles : couleurs du bandeau inversées pour les blocs, couleur du texte sinon) ; posées par la vue. */
.pwa-banner { --bn-bg: #0d6efd; --bn-text: #fff; position: relative; background: var(--bn-bg); color: var(--bn-text); font-size: .95rem; line-height: 1.4; }
.pwa-banner[hidden] { display: none; }
.pwa-banner.has-close { padding-right: 2.5rem; }

.pwa-banner-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; padding: var(--bn-pad, 10px) 1.25rem; }
.pwa-banner-text { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Positionnement : à gauche, au centre, à droite, ou justifié (le texte à gauche, le lien ou le bouton à droite) */
.pwa-banner.is-left .pwa-banner-inner { justify-content: flex-start; text-align: left; }
.pwa-banner.is-center .pwa-banner-inner { justify-content: center; text-align: center; }
.pwa-banner.is-right .pwa-banner-inner { justify-content: flex-end; text-align: right; }
.pwa-banner.is-justify .pwa-banner-inner { justify-content: space-between; text-align: left; }
.pwa-banner.is-justify .pwa-banner-text { flex: 1 1 auto; }

.pwa-banner-link { flex: none; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: .15em; }
.pwa-banner-link:hover { text-decoration-thickness: 2px; }

/* Bouton : couleurs inversées, il reste lisible sur n'importe quel fond */
.pwa-banner-btn { flex: none; display: inline-block; padding: .3rem .9rem; border-radius: var(--theme-btn-radius, .5rem); background: var(--bn-text); color: var(--bn-bg); font-weight: 600; text-decoration: none; white-space: nowrap; }
.pwa-banner-btn:hover { opacity: .85; }
.pwa-banner-link:focus-visible, .pwa-banner-btn:focus-visible, .pwa-banner-close:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.pwa-banner-btn:focus-visible { outline-color: var(--bn-text); outline-offset: 3px; }

.pwa-banner-close { position: absolute; top: .25rem; right: .5rem; display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1rem; line-height: 1; cursor: pointer; opacity: .8; }
.pwa-banner-close:hover { opacity: 1; background: rgba(127, 127, 127, .25); }
.pwa-banner-close i { font-weight: var(--theme-icon-weight, 400); }

/* Compte à rebours : entre le texte et le lien ou le bouton (is-inline), ou sur sa propre ligne sous eux (is-wrap, aligné comme le texte) ; les blocs se remplissent par pwa-banner.js */
.pwa-banner-cd { display: flex; flex: none; align-items: center; gap: .4rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pwa-banner-cd[hidden] { display: none; }
.pwa-banner-cd-unit { display: flex; flex-direction: column; align-items: center; }
.pwa-banner-cd-num { font-size: 1.15rem; font-weight: 700; }
.pwa-banner-cd-label { font-size: .65rem; opacity: .85; }
.pwa-banner-cd.is-wrap { order: 1; flex: 0 0 100%; }
.pwa-banner.is-left .pwa-banner-cd.is-wrap, .pwa-banner.is-justify .pwa-banner-cd.is-wrap { justify-content: flex-start; }
.pwa-banner.is-center .pwa-banner-cd.is-wrap { justify-content: center; }
.pwa-banner.is-right .pwa-banner-cd.is-wrap { justify-content: flex-end; }

/* Blocs : un bloc par unité, couleurs du bandeau inversées comme le bouton */
.pwa-banner-cd.is-boxes .pwa-banner-cd-unit { min-width: 3.2rem; padding: .3rem .45rem; border-radius: var(--theme-btn-radius, .5rem); background: var(--bn-cd-bg, var(--bn-text)); color: var(--bn-cd-text, var(--bn-bg)); }

/* Texte : « 2 jours 03 heures… » sur une ligne, le chiffre en gras */
.pwa-banner-cd.is-plain { flex-wrap: wrap; gap: .1rem .7rem; color: var(--bn-cd-text, inherit); }
.pwa-banner-cd.is-plain .pwa-banner-cd-unit { flex-direction: row; align-items: baseline; gap: .25em; }
.pwa-banner-cd.is-plain .pwa-banner-cd-num { font-size: 1em; }
.pwa-banner-cd.is-plain .pwa-banner-cd-label { font-size: 1em; opacity: 1; }

/* Chiffres séparés par deux-points : « 02 : 03 : 15 : 07 », les libellés (s'il y en a) sous les chiffres */
.pwa-banner-cd.is-colon { gap: 0; color: var(--bn-cd-text, inherit); }
.pwa-banner-cd.is-colon .pwa-banner-cd-unit + .pwa-banner-cd-unit { position: relative; margin-left: 1.1rem; }
.pwa-banner-cd.is-colon .pwa-banner-cd-unit + .pwa-banner-cd-unit::before { content: ':'; position: absolute; top: 0; left: -.7rem; font-size: 1.15rem; font-weight: 700; }

/* Bandeau d'une row (à sa place dans la page, aux coins arrondis) ; l'aperçu de la page d'un bandeau dans le manager n'a pas de coins arrondis */
.pwa-banner.is-row { border-radius: .5rem; overflow: hidden; }

@media (max-width: 575.98px) {
	.pwa-banner-inner { padding: var(--bn-pad, 10px) 1rem; }
	/* Petit écran : le justifié passe en colonne, le lien ou le bouton sous le texte */
	.pwa-banner.is-justify .pwa-banner-inner { flex-direction: column; align-items: flex-start; }
	.pwa-banner-cd.is-wrap { flex: none; }
}
