/* ------------------------------------ *\
  CONTENTS
\* ------------------------------------ */

/**
 * CONTENTS......................Vous le lisez !
 * BASE..........................
 * LAYOUT........................
 * MESSAGE.......................
 * TITLE.........................
 * DESCRIPTION...................
 * CTA...........................
 * NO DESCRIPTION................
 * FOCUS.........................
 * TOGGLE........................
 * COLLAPSED.....................
 * =MEDIAQUERY...................
 */

/* ------------------------------------ *\
  BASE
\* ------------------------------------ */

.amu-alert {
  --amu-alert-fond: #ffb547;
  --amu-alert-texte: #1d1d1b;
  --amu-alert-lisere: #b45309;
  --amu-alert-police-titre: 'ABCMonumentGrotesk-Bold', roboto, 'Helvetica Neue',
    arial, sans-serif;
  --amu-alert-police-texte: 'ABCMonumentGrotesk-Regular', 'Titillium Web',
    'Helvetica Neue', arial, sans-serif;

  position: relative;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  width: 100%;
  background: var(--amu-alert-fond);
  color: var(--amu-alert-texte);
  border-top: 4px solid var(--amu-alert-lisere);
  font-family: inherit;
  text-align: center;
}

.amu-alert *,
.amu-alert *::before,
.amu-alert *::after {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

.amu-alert svg {
  display: inline-block;
  width: auto;
  height: 1em;
  overflow: visible;
  -webkit-box-flex: 0;
      -ms-flex: 0 0 auto;
          flex: 0 0 auto;
}

/* ------------------------------------ *\
  LAYOUT
\* ------------------------------------ */

.amu-alert__interieur {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 64px;
}

.amu-alert__contenu {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  gap: 10px 24px;
}

.amu-alert__contenu[hidden] {
  display: none;
}

/* ------------------------------------ *\
  MESSAGE
\* ------------------------------------ */

.amu-alert__message {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: start;
      -ms-flex-align: start;
          align-items: flex-start;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  gap: 14px;
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.4;
  font-weight: 400;
}

.amu-alert__picto {
  font-size: 2rem;
}

.amu-alert__texte {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-align: start;
      -ms-flex-align: start;
          align-items: flex-start;
  gap: 2px;
  text-align: left;
}

/* ------------------------------------ *\
  TITLE
\* ------------------------------------ */

.amu-alert__titre {
  font-family: var(--amu-alert-police-titre);
  font-synthesis: none;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ------------------------------------ *\
  DESCRIPTION
\* ------------------------------------ */

.amu-alert__description {
  font-family: var(--amu-alert-police-texte);
}

.amu-alert__description p {
  margin: 0;
}

.amu-alert__description a {
  color: inherit;
  text-decoration: underline;
}

/* ------------------------------------ *\
  CTA
\* ------------------------------------ */

.amu-alert__cta,
.amu-alert__cta:visited {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  padding: 10px 18px;
  background: #fff;
  color: var(--amu-alert-texte);
  border: 2px solid var(--amu-alert-texte);
  border-radius: 6px;
  font-family: var(--amu-alert-police-texte);
  font-size: 1rem;
  font-weight: 400;
  text-align: left;
  text-decoration: none;
}

.amu-alert__texte .amu-alert__cta {
  margin-top: 8px;
}

.amu-alert__cta:hover {
  background: var(--amu-alert-texte);
  color: #fff;
}

.amu-alert__fleche {
  margin-left: 0.5em;
  font-size: 0.85em;
  vertical-align: -0.05em;
  -webkit-transition: -webkit-transform 0.15s;
  transition: -webkit-transform 0.15s;
  transition: transform 0.15s;
  transition: transform 0.15s, -webkit-transform 0.15s;
}

.amu-alert__cta:hover .amu-alert__fleche {
  -webkit-transform: translateX(3px);
          transform: translateX(3px);
}

/* ------------------------------------ *\
  NO DESCRIPTION
\* ------------------------------------ */

.amu-alert__message--sans-description {
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}

.amu-alert__message--sans-description .amu-alert__texte {
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
      -ms-flex-direction: row;
          flex-direction: row;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 10px 24px;
}

.amu-alert__message--sans-description .amu-alert__cta {
  margin-top: 0;
}

.amu-alert__message--empile,
.amu-alert__message--empile .amu-alert__texte {
  -webkit-box-align: start;
      -ms-flex-align: start;
          align-items: flex-start;
}

/* ------------------------------------ *\
  FOCUS
\* ------------------------------------ */

.amu-alert__cta:focus-visible,
.amu-alert__bascule:focus-visible {
  outline: 3px solid var(--amu-alert-texte);
  outline-offset: 2px;
}

/* ------------------------------------ *\
  TOGGLE
\* ------------------------------------ */

.amu-alert__bascule {
  position: absolute;
  top: 50%;
  right: 12px;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  gap: 8px;
  min-width: 36px;
  min-height: 36px;
  padding: 0 8px;
  background: transparent;
  color: inherit;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  -webkit-box-shadow: none;
          box-shadow: none;
  cursor: pointer;
}

.amu-alert__libelle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.amu-alert__chevron {
  font-size: 0.875rem;
  -webkit-transition: -webkit-transform 0.15s;
  transition: -webkit-transform 0.15s;
  transition: transform 0.15s;
  transition: transform 0.15s, -webkit-transform 0.15s;
}

/* ------------------------------------ *\
  COLLAPSED
\* ------------------------------------ */

.amu-alert.is-replie .amu-alert__interieur {
  padding-top: 2px;
  padding-bottom: 2px;
}

.amu-alert.is-replie .amu-alert__bascule {
  position: static;
  -webkit-transform: none;
          transform: none;
  margin: 0 auto;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  width: -webkit-max-content;
  width: -moz-max-content;
  width: max-content;
  max-width: 100%;
}

.amu-alert.is-replie .amu-alert__libelle {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  white-space: normal;
}

.amu-alert.is-replie .amu-alert__chevron {
  -webkit-transform: rotate(180deg);
          transform: rotate(180deg);
}

/* ------------------------------------ *\
  =MEDIAQUERY
\* ------------------------------------ */

@media (hover: hover) and (pointer: fine) {
  .amu-alert__bascule:hover {
    background: rgb(0 0 0 / 10%);
  }
}

@media (max-width: 991.98px) {
  .amu-alert__interieur {
    padding: 10px 16px 14px;
  }

  .amu-alert__message {
    padding-right: 36px;
    font-size: 1rem;
    line-height: 1.2rem;
  }

  .amu-alert__message:not(.amu-alert__message--sans-description)
    .amu-alert__titre {
    display: none;
  }

  .amu-alert__cta {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .amu-alert__message--sans-description .amu-alert__texte {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;
  }

  .amu-alert__bascule {
    top: 12px;
    right: 6px;
    -webkit-transform: none;
            transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .amu-alert__fleche,
  .amu-alert__chevron {
    -webkit-transition: none;
    transition: none;
  }
}

@media (forced-colors: active) {
  .amu-alert {
    border-top-color: CanvasText;
    border-bottom: 2px solid CanvasText;
  }
}
