/*** 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);
}
