/*** Fixes to the DSFR classes ***/

.fr-header__service-title em {
    font-weight: lighter
}

/*** Fixes to Wagtail/Draftail output ***/
/* cf. https://github.com/wagtail/wagtail/issues/4431 */
p:empty {
    display: none;
}

.flex {
    display: flex;
}
/*** Prefix the classes defined here with cmsfr- ***/

/* Text alignment classes */
.cmsfr-text-left {
    text-align: left !important;
}

.cmsfr-text-center {
    text-align: center !important;
}

.cmsfr-text-right {
    text-align: right !important;
}

.cmsfr-hero {
    background-size: cover;
    background-repeat: no-repeat;
}

.cmsfr-hero-position--center {
    background-position: center;
}

.cmsfr-hero-position--top {
    background-position: top;
}

.cmsfr-hero-position--bottom {
    background-position: bottom;
}

.cmsfr-hero-large {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.cmsfr-hero-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.cmsfr-hero-btns {
    display: flex;
}

.cmsfr-hero-btns--center {
    justify-content: center;
    align-items: center;
}

.cmsfr-hero-btns--left {
    justify-content: left;
    align-items: left;
}

.cmsfr-hero-btns--right {
    justify-content: right;
    align-items: right;
}

.cmsfr-text-content--left {
    text-align: left;
}

.cmsfr-text-content--right {
    text-align: right;
}

.cmsfr-text-content--center {
    text-align: center;
}


.cmsfr-background-dark h1,
.cmsfr-background-dark p,
.cmsfr-background-dark button,
.cmsfr-background-dark ul {
    color: white;
}

/* This style rule prevents user agents from applying a margin-top to the figure tag while complying with dsfr */
.cmsfr-without-margin {
    margin-top: -40px;
}

:root[data-fr-theme=light] .cmsfr-background-dark .fr-btn--secondary {
    background-color: rgba(255, 255, 255, 0.3);
}

.cmsfr-author_card__header {
    flex: 0 0 6rem !important;
    width: 6rem !important;
}

.cmsfr-author-img {
    border-radius: 50%;
    height: 4.5rem !important;
    margin: 1.5rem;
    width: 4.5rem;
}

.cmsfr-vertical_contact_card__header {
    background: var(--background-default-grey);
}

.cmsfr-vertical_contact_card-img {
    border-radius: 50%;
    height: 100%;
    width: 100%;
    margin: auto;
    max-width: 50%;
    aspect-ratio: initial !important;
}

.cmsfr-block-stepper dd {
    padding-left: 0;
}

.cmsfr-stepper__details {
    display: inherit;
    margin-top: 1rem;
    width: 100%;
}

.cmsfr-footer__bottom-extra {
    border-left: 1px solid var(--border-default-grey);
    padding-left: 1em;
    margin-left: 1em;
}

.cmsfr-display__inline {
    display: inline;
}

@media all and (max-width: 575px) {
    .cmsfr-order-mobile__2 {
        order: 2;
}
}

@media all and (min-width: 768px) {
    .cmsfr-order__2 {
        order: 2;
    }
}
.cmsfr-image-focus-left {
    object-position: left;
}

.cmsfr-image-focus-center {
    object-position: center;
}

.cmsfr-image-focus-right {
    object-position: right; 
}

.cmsfr-image-focus-top {
    object-position: top;
}

.cmsfr-image-focus-bottom {
    object-position: bottom;
}

/* Custom styling for multi-select filter tags */
/* Override DSFR default behavior: pressed tags should appear active (colored) */
label.fr-tag[aria-pressed="true"] {
    --text-active-blue-france: var(--text-inverted-blue-france);
    --bg-active-blue-france: var(--background-action-high-blue-france);
    background-color: var(--bg-active-blue-france);
    color: var(--text-active-blue-france);
}

label.fr-tag[aria-pressed="false"] {
    --text-default-grey: var(--text-mention-grey);
    --bg-default-grey: var(--background-contrast-grey);
    background-color: var(--bg-default-grey);
    color: var(--text-default-grey);
}

/* Custom styling for user menu */

.fr-usermenu {
  --rows: 8;
  position: relative
}

.fr-usermenu .fr-usermenu__btn {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5rem;
  max-height: none;
  max-width: 100%;
  min-height: 2.5rem;
  min-height: 3rem;
  overflow: initial;
  padding: .5rem 1rem;
  width: 100%
}

.fr-usermenu .fr-usermenu__btn:before {
  margin-left: -.125rem;
  margin-right: .5rem;
}

.fr-usermenu .fr-usermenu__btn:after,
.fr-usermenu .fr-usermenu__btn:before {
  --icon-size: 1rem;
  background-color: currentColor;
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  height: var(--icon-size);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  vertical-align: calc((.75em - var(--icon-size))*.5);
  width: var(--icon-size)
}

.fr-usermenu .fr-usermenu__btn:after {
  margin-left: auto;
  -webkit-mask-image: url("../dsfr/dist/icons/arrows/arrow-down-s-line.svg");
  mask-image: url("../dsfr/dist/icons/arrows/arrow-down-s-line.svg");
  transition: transform .3s
}

.fr-usermenu .fr-usermenu__btn[aria-expanded=true]:after {
  transform: rotate(-180deg)
}


.fr-usermenu__menu {
  margin: -.25rem 0
}


.fr-usermenu .fr-nav__item {
  align-items: flex-start;
}

.fr-usermenu .fr-nav__item:before {
  content: none
}

.fr-usermenu .fr-menu__list {
  padding: 0;
  width: auto
}

.fr-menu .fr-usermenu__item {
  font-weight: 400;
  height: auto;
  min-height: auto;
  padding: .75rem 1rem;
  text-align: left;
  width: 100%;
}

.fr-usermenu .fr-usermenu__btn[aria-expanded=true] {
  --idle: transparent;
  --hover: var(--background-open-blue-france-hover);
  --active: var(--background-open-blue-france-active);
  background-color: var(--background-open-blue-france);
  color: var(--text-active-blue-france)
}

.fr-usermenu .fr-usermenu__btn[aria-expanded=true]:hover {
  background-color: var(--hover-tint)
}

.fr-usermenu .fr-usermenu__btn[aria-expanded=true]:active {
  background-color: var(--active-tint)
}


.fr-header .fr-header__menu-links .fr-usermenu {
  margin-left: -.5rem;
  margin-right: -.5rem
}

.fr-header .fr-header__menu-links .fr-usermenu__btn {
  padding-left: .5rem;
  padding-right: .5rem
}

@media (min-width:62em) {
 /*! media lg */
  .fr-usermenu .fr-usermenu__btn {
    font-size: .875rem;
    line-height: 1.5rem;
    min-height: auto;
    padding: .25rem .75rem;
    width: auto
  }

  .fr-usermenu .fr-usermenu__btn:after {
    margin-left: .25rem;
    margin-right: -.25rem
  }

  .fr-usermenu .fr-usermenu__btn:before {
    --icon-size: 1rem
  }

  .fr-usermenu__menu {
    margin: -.25rem -1rem
  }

  .fr-usermenu .fr-menu__list {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(var(--rows), auto)
  }

  .fr-btns-group .fr-usermenu__menu {
    margin: -1.25rem -.75rem 0
  }

  .fr-header .fr-header__menu-links .fr-usermenu {
    margin-bottom: -1rem;
    margin-left: 0;
    margin-right: 0
  }
}

@media (-ms-high-contrast:active),
(forced-colors:active) {

  .fr-usermenu .fr-usermenu__btn:after,
  .fr-usermenu .fr-usermenu__btn:before {
    background-color: buttontext;
    forced-color-adjust: none
  }
}


@media (prefers-reduced-motion:reduce) {
  .fr-usermenu .fr-usermenu__btn:after,
  .fr-usermenu__menu {
    transition: none
  }
}

@media (min-width:62em) and (-ms-high-contrast:active),
(min-width:62em) and (forced-colors:active) {

  .fr-usermenu .fr-menu__list {
    border-top: 1px solid
  }
}

@media screen and (min-width:0\0) and (min-resolution:72dpi) {

  .fr-usermenu .fr-usermenu__btn:after,
  .fr-usermenu .fr-usermenu__btn:before {
    background-color: transparent;
    background-repeat: no-repeat;
    background-size: 100%;
    height: 1rem;
    width: 1rem
  }

  .fr-usermenu .fr-usermenu__btn:after {
    background-image: url("../dsfr/dist/icons/arrows/arrow-down-s-line.svg")
  }

  .fr-usermenu .fr-usermenu__btn[aria-expanded=true] {
    background-color: #e3e3fd;
    color: #000091
  }

  .fr-header__tools-links>.fr-usermenu:first-child:last-child .fr-btn {
    background-color: transparent;
    box-shadow: inset 0 0 0 1px #ddd;
    color: #000091
  }

  .fr-header__tools-links>.fr-usermenu:first-child:last-child .fr-btn:hover {
    background-color: rgba(0, 0, 0, .05)
  }

  .fr-header__tools-links>.fr-usermenu:first-child:last-child .fr-btn:active {
    background-color: rgba(0, 0, 0, .1)
  }

  .fr-header__tools-links>.fr-usermenu:first-child:last-child .fr-btn:disabled,
  .fr-header__tools-links>.fr-usermenu:first-child:last-child a.fr-btn:not([href]) {
    background-color: transparent;
    box-shadow: inset 0 0 0 1px #e5e5e5;
    color: #929292
  }

  .fr-header__tools-links>.fr-usermenu:first-child:last-child .fr-btn:disabled:hover,
  .fr-header__tools-links>.fr-usermenu:first-child:last-child a.fr-btn:not([href]):hover {
    background-color: rgba(0, 0, 0, .05)
  }

  .fr-header__tools-links>.fr-usermenu:first-child:last-child .fr-btn:disabled:active,
  .fr-header__tools-links>.fr-usermenu:first-child:last-child a.fr-btn:not([href]):active {
    background-color: rgba(0, 0, 0, .1)
  }
}


@media print {
  .fr-usermenu {
    display: none
  }
}