/*
 * Bandeau d'information importante : structure du composant "Notice"
 * du Système de Design de l'État (DSFR), couleurs du site.
 * Taille de texte identique à .info-banner du thème (1.4rem).
 */

.bm-bandeau[hidden] { display: none; }

.bm-bandeau {
  position: relative;
  z-index: 100;
  padding: 10px 0;
  font-size: 1.4rem;
  line-height: 1.5;
  background: #00428F;
  color: #FFFFFF;
}

.bm-bandeau--travaux { background: #FFDD00; color: #00428F; }
.bm-bandeau--alerte { background: #C4161C; color: #FFFFFF; }


/* Même largeur que .wrap du thème */
.bm-bandeau__container {
  box-sizing: border-box;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

.bm-bandeau__body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

/* Icône : boîte de la hauteur d'une ligne de texte, en haut du bloc => centrée sur la 1re ligne */
.bm-bandeau__icon {
  flex: 0 0 auto;
  display: block;
  width: 1.5em;
  height: 1.5em;
  margin: 0 0.6em 0 0;
  fill: currentColor;
}

.bm-bandeau__text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 16px 0 0;
  padding: 0;
  font-size: inherit;
  line-height: 1.5;
  position: relative;
  top: 0.185em; /* centre optique : les capitales de Josefin Sans sont au-dessus du centre de leur cadre ; mesuré pour les aligner sur l'icône, centrée sur la barre */
}

.bm-bandeau__title { font-weight: 700; }

.bm-bandeau__desc { font-weight: 400; }

.bm-bandeau__link {
  margin-left: 6px;
  color: inherit;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.bm-bandeau__link:hover { text-decoration-thickness: 2px; }

/* Icône "lien externe" (target=_blank) */
.bm-bandeau__external {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-left: 0.25em;
  vertical-align: -0.125em;
  fill: currentColor;
}

.bm-bandeau__close {
  position: relative;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  margin: -4px -5px -4px 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Zone de clic 44 x 44 px sans agrandir le rond de survol */
.bm-bandeau__close::before {
  content: "";
  position: absolute;
  top: -7px;
  right: -7px;
  bottom: -7px;
  left: -7px;
}

.bm-bandeau__close svg { width: 20px; height: 20px; }

.bm-bandeau__close:hover { background: rgba(255, 255, 255, 0.18); }
.bm-bandeau--travaux .bm-bandeau__close:hover { background: rgba(0, 66, 143, 0.12); }

/* Libellé réservé aux lecteurs d'écran */
.bm-bandeau__close-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.bm-bandeau a:focus-visible,
.bm-bandeau__close:focus-visible {
  outline: 3px solid #FFDD00;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #00428F;
}

@media (min-width: 1025px) {
  .bm-bandeau__container { width: 1024px; padding: 0; }
}

@media (min-width: 1400px) {
  .bm-bandeau__container { width: 1200px; }
}
