.med-grid-border{
    border: solid 2px;
}
.med-border {
    border: 1px solid var(--color-grey--20);
}

.med-w--50 {
    width: 50%;
}

.med-border--bleu-macif {
    border-color: var(--color-macif--1);
}
.mds-h1.med-heading,
h1.med-heading{
    margin: 24px 0;
}
.mds-h2.med-heading,
h2.med-heading{
    margin: 20px 0;
}
.mds-h3.med-heading,
h3.med-heading{
    margin: 16px 0;
}
.mds-h4.med-heading,
h4.med-heading{
    margin: 12px 0;
}
.mds-h5.med-heading,
h5.med-heading{
    margin: 8px 0;
}
.mds-h6.med-heading,
h6.med-heading{
    margin: 4px 0;
}

@media (min-width: 900px) {
    .mds-h1.med-heading,
    h1.med-heading{
        margin: 32px 0;
    }
    .mds-h2.med-heading,
    h2.med-heading{
        margin: 24px 0;
    }
    .mds-h3.med-heading,
    h3.med-heading{
        margin: 20px 0;
    }
    .mds-h4.med-heading,
    h4.med-heading{
        margin: 16px 0;
    }
    .mds-h5.med-heading,
    h5.med-heading{
        margin: 12px 0;
    }
    .mds-h6.med-heading,
    h6.med-heading{
        margin: 8px 0;
    }
}
.cke_editable > .mds-link.med-link.mds-link--reverse {
    color: var(--color-use--9);
}

.med-link:not(.mds-link--standalone):not(.mds-link--reverse){
    background-color: transparent;
}

.med-link:not(.mds-link--standalone){
    text-decoration: underline;
}
.med-paragraphe > p {
  margin: 0;
  margin-bottom: 4px;
  margin-top: 4px;
}

@media (min-width: 56.25em) {
  .med-paragraphe > p {
    margin: 0;
    margin-bottom: 8px;
    margin-top: 8px;
  }
}
/* Gestion des espacements pour les listes DS */
ul.mds-list--styled.med-list,
ol.mds-list--styled.med-list{
    padding: 0;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
}
.med-image__figure {
    margin: 0 0 .625rem;
}

.med-image__img-desktop, .med-image__img-mobile {
    margin-bottom: 0.3125rem;
    line-height: 1;
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    border-style: none;
}

.med-image-figure--a-gauche,
.med-image-figure--a-droite,
.med-image-figure--centree{
    display: flex;
}


.med-image-figure--a-gauche {
    justify-content: flex-start;
}

.med-image-figure--a-droite {
    justify-content: flex-end;
}

.med-image-figure--centree {
    justify-content: center;
}
.med-espacementBouton.mds-btn,
a[role="button"].med-bouton.mds-btn{
  margin: 0;
  margin-bottom: 16px;
  margin-top: 16px;
}

@media (min-width: 900px) {
    .med-espacementBouton.mds-btn,
  a[role="button"].med-bouton.mds-btn{
    margin: 0;
    margin-bottom: 20px;
    margin-top: 20px;
  }
}

.mds-container :not(.mds-display--flex) > .mds-display--flex:has(> .med-espacementBouton.mds-btn) + .mds-display--flex:has(> .med-espacementBouton.mds-btn) .med-espacementBouton.mds-btn:only-child,
.mds-container-fluid :not(.mds-display--flex) > .mds-display--flex:has(> .med-espacementBouton.mds-btn) + .mds-display--flex:has(> .med-espacementBouton.mds-btn) .med-espacementBouton.mds-btn:only-child {
    margin-top: 0;
}

.mds-container .mds-display--flex:has(> .med-espacementBouton.mds-btn:only-child) {
  padding-top: 0!important;
  padding-bottom: 0!important;
}
.med-accordion .mds-accordion__item .mds-accordion__body .mds-row{
    justify-content: center;
}

.med-accordion .mds-accordion__item .mds-accordion__body .mds-row figure{
    width: unset;
}

.med-accordion button.mds-collapse__label:focus,
.med-accordion button.mds-collapse__label:focus-visible{
    outline: 2px auto black;
}

.med-footer__accordion{
    max-width: 276px;
}

.med-footer__accordion-desktop .mds-accordion__item{
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.med-footer__accordion-desktop .med-footer__accordion-title{
    color: white;
    font-size: 18px;
    line-height: 24px;
    width: 100%;
    margin-bottom: 0;
    word-break: break-word;
}

.med-footer__accordion-desktop .med-footer__accordion-links,
.med-footer__accordion-mobile.mds-accordion--basic .mds-accordion__item .mds-accordion__body.med-footer__accordion-links{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
}

.med-footer__accordion-desktop .med-footer__accordion-links{
    gap: 16px;
}

.med-footer__accordion-desktop .med-footer__accordion-links a,
.med-footer__accordion-mobile.mds-accordion--basic .mds-accordion__item .mds-accordion__body.med-footer__accordion-links a{
    width: 100%;
    font-size: 16px;
    line-height: 22px;
}

.med-footer__accordion-mobile.mds-accordion--basic .mds-accordion__item .mds-accordion__header button{
    padding-left: 16px;
    padding-right: 16px;
}

.med-footer__accordion-mobile.mds-accordion--basic .mds-accordion__item .mds-accordion__header button p,
.med-footer__accordion-mobile{
    margin-bottom: 0;
}

.med-footer__accordion-mobile button span{
    color: white;
}

.med-accordion{
    margin-bottom: 0;
}

.med-footer__accordion-link>span.mds-icon::before{
    line-height: 22px;
}

.med-footer__accordion-link{
    display: flex;
    flex-wrap: nowrap;
    color: white;
    align-items: flex-start;
    width: 100%;
}
.med-ancre a span{
    color: var(--color-macif--1);
}

.med-ancre a:hover{
    text-decoration: none;
}
sup:has(a) {
    top: auto;
}

/* REMOVE AFTER RESET MDS */
.med-ancre {
    list-style: none;
}
button.scroll-to-top {
    position: fixed!important;
    right: 0;
    bottom: 0;
    z-index: 10;
    margin-right: 32px;
    margin-bottom: 32px;
    opacity: 0;
    transition: all 200ms cubic-bezier(0.2, 0, 0, 1);
    border: 2px solid #0a2d82;
    background-color: var(--color-white);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.1);
}

button.scroll-to-top:hover {
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.15);
}

button.scroll-to-top:focus {
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1), 0 0 0 1px #fff;
}

button.scroll-to-top:disabled {
    cursor: default;
}

@media screen and (max-width: 767px){
    button.scroll-to-top {
        margin-bottom: 76px;
        margin-right: 16px;
    }
}
