/* Template flexible : colonnes, cartes, images et CTA */

.ms-flex-main__media img,
.ms-info-block__media img{
border-radius:24px;
}

.ms-flex-card:hover .ms-flex-card__media img,
.ms-info-block:hover .ms-info-block__media img{
transform:scale(1.02);
}

.container.ms-flex{
padding:24px 0 0 !important;
}

.ms-flex-intro{
max-width:78ch;
  margin-bottom:28px;
}

.ms-flex-main{
display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(340px, .95fr);
  gap:36px;
  align-items:start;
  margin-bottom:34px;
}

.ms-flex-main--stack{
display:block;
}

.ms-flex-main--stack .ms-flex-main__media{
margin-bottom:26px;
}

.ms-flex-main__media{
position:relative;
  overflow:visible;
}

.ms-flex-main__media img{
width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
  box-shadow:var(--ms-shadow);
}

.ms-flex-main__band{
position:absolute;
  left:6%;
  right:13%;
  height:70px;
  bottom:-35px;
  background:var(--ms-blue-band);
  border-radius:20px;
  z-index:-1;
}

.ms-flex-main__copy{
min-width:0;
}

.ms-flex-cards{
margin-top:48px;
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  column-gap:24px;
  row-gap:48px;
}

.ms-flex-card{
background:#fff;
  border-radius:28px;
  overflow:hidden;
  box-shadow:var(--ms-shadow);
}

.ms-flex-card a{
display:block;
  height:100%;
}

.ms-flex-card__media{
position:relative;
  overflow:hidden;
}

.ms-flex-card__media img{
width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
  border-radius:0;
  transition:transform .22s ease;
}

.ms-flex-card__body{
padding:20px 22px 26px;
}

.ms-flex-extras{
display:grid;
  gap:72px;
  margin-top:112px;
}

.ms-flex-buttons{
display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.ms-info-block{
display:grid;
  grid-template-columns:minmax(0,.8fr) minmax(240px,.45fr);
  gap:22px;
  align-items:center;
  background:#d8e4f3;
  border-radius:30px;
  box-shadow:var(--ms-shadow);
  overflow:hidden;
}

.ms-info-block__content{
padding:26px 28px;
}

.ms-info-block__media{
overflow:hidden;
  height:100%;
}

.ms-info-block__media img{
width:100%;
  height:100%;
  min-height:220px;
  object-fit:cover;
  border-radius:0;
  transition:transform .22s ease;
}

.ms-flex-main{
align-items:start;
}

.ms-flex-main__media img{
border-radius:28px;
}

.ms-flex-main__band{
display:none !important;
}

.ms-flex-main--image-right .ms-flex-main__copy,
.ms-flex-main--image-left .ms-flex-main__copy{
align-self:start;
}

.ms-flex-cards{
gap:28px 24px;
}

.ms-flex-card{
overflow:visible;
  background:transparent;
  box-shadow:none;
}

.ms-flex-card a{
display:block;
}

.ms-flex-card__media{
position:relative;
  border-radius:28px;
  overflow:visible;
}

.ms-flex-card__media img{
border-radius:28px;
  display:block;
}

.ms-flex-card__band{
position:absolute;
  left:0;
  bottom:-24px;
  width:78%;
  background:#dce8f4;
  padding:14px 16px;
  border-radius:0;
  box-shadow:0 6px 14px rgba(44,72,91,.08);
}

.ms-flex-card__band h3,
.ms-flex-card__body h3{
margin:0;
  font-size:1.12rem;
}

.ms-flex-card__body{
margin-top:16px;
  padding:0;
}

.ms-flex-buttons{
display:grid;
  gap:14px;
  justify-items:center;
  align-items:start;
  width:100%;
}

.ms-flex-cta{
width:min(100%, 620px);
  margin-inline:auto;
  display:grid;
  grid-template-columns:74px minmax(0, 1fr) auto;
  align-items:center;
  gap:16px;
  padding:16px 18px;
  border-radius:22px;
  border:1px solid rgba(65,111,120,.16);
  background:linear-gradient(180deg, #ffffff 0%, #f8faf8 100%);
  box-shadow:0 8px 18px rgba(37,59,99,.07);
  text-decoration:none !important;
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.ms-flex-cta:hover{
transform:translateY(-2px);
  box-shadow:0 10px 22px rgba(37,59,99,.10);
  border-color:rgba(65,111,120,.24);
  text-decoration:none;
}

.ms-flex-cta__icon{
width:74px;
  height:74px;
  border-radius:20px;
  display:grid;
  place-items:center;
  background:linear-gradient(180deg, rgba(121,154,43,.20) 0%, rgba(121,154,43,.10) 100%);
  color:var(--ms-heading);
  flex:0 0 74px;
}

.ms-flex-cta__icon svg,
.ms-flex-cta__arrow svg{
width:36px;
  height:36px;
  display:block;
  stroke:currentColor;
  stroke-width:1.8;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.ms-flex-cta__body{
min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.ms-flex-cta__eyebrow{
display:block;
  margin:0;
  color:var(--ms-green-dark);
  font-size:.8rem;
  font-weight:700;
  line-height:1.2;
}

.ms-flex-cta__title{
display:block;
  color:var(--ms-heading);
  font-size:clamp(1.02rem, 1.8vw, 1.7rem);
  font-weight:800;
  line-height:1.08;
  text-wrap:balance;
}

.ms-flex-cta__arrow-wrap{
display:flex;
  align-items:center;
  justify-content:center;
  padding-left:14px;
  border-left:1px solid rgba(65,111,120,.14);
}

.ms-flex-cta__arrow{
width:46px;
  height:46px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:rgba(121,154,43,.14);
  color:var(--ms-heading);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55);
}

.ms-flex-cta__arrow svg{
width:22px;
  height:22px;
}

@media (max-width:900px){
.ms-flex-cta{
width:min(100%, 560px);
    grid-template-columns:62px minmax(0, 1fr) auto;
    gap:14px;
    padding:14px 16px;
    border-radius:20px;
}

.ms-flex-cta__icon{
width:62px;
    height:62px;
    border-radius:18px;
    flex-basis:62px;
}

.ms-flex-cta__icon svg{
width:31px;
    height:31px;
}

.ms-flex-cta__title{
font-size:clamp(1rem, 3vw, 1.45rem);
}

.ms-flex-cta__arrow-wrap{
padding-left:12px;
}

.ms-flex-cta__arrow{
width:42px;
    height:42px;
}
}

@media (max-width:540px){
.ms-flex-extras{
gap:48px;
    margin-top:88px;
}

.ms-flex-cta{
width:min(100%, 100%);
    grid-template-columns:54px minmax(0, 1fr);
    gap:12px;
    padding:13px 14px;
    border-radius:18px;
}

.ms-flex-cta__icon{
width:54px;
    height:54px;
    border-radius:16px;
    flex-basis:54px;
}

.ms-flex-cta__icon svg{
width:27px;
    height:27px;
}

.ms-flex-cta__eyebrow{
font-size:.74rem;
}

.ms-flex-cta__title{
font-size:1rem;
}

.ms-flex-cta__arrow-wrap{
grid-column:2;
    justify-self:end;
    padding-left:0;
    padding-top:2px;
    border-left:none;
}

.ms-flex-cta__arrow{
width:38px;
    height:38px;
}

.ms-flex-cta__arrow svg{
width:18px;
    height:18px;
}
}

.ms-flex-main{
display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:48px;
  align-items:start;
  margin-bottom:36px;
}

.ms-flex-main--stack{
grid-template-columns:1fr;
  gap:24px;
  margin-bottom:36px;
}

.ms-flex-main__media,
.ms-flex-main__copy,
.ms-flex-intro,
.ms-flex-main__content{
min-width:0;
}

.ms-flex-main__media--fullwidth,
.ms-flex-intro--fullwidth,
.ms-flex-main__copy--fullwidth{
width:100%;
  max-width:none;
}

.ms-flex-main__media img,
.ms-flex-main__media--fullwidth img{
width:100%;
  height:450px;
  display:block;
  object-fit:cover;
  object-position:center center;
  border-radius:28px;
}

.ms-flex-main--image-right .ms-flex-main__copy{
width:100%;
  max-width:none;
  align-self:start;
}

.ms-flex-main--image-right .ms-flex-intro{
max-width:none;
  width:100%;
  margin:0;
}

.ms-flex-main--image-right .ms-flex-main__content{
width:100%;
}

.ms-flex-intro--fullwidth{
margin:0;
}

.ms-flex-main__copy--fullwidth{
width:100%;
  max-width:none;
}

.ms-flex-main__copy--fullwidth > :first-child,
.ms-flex-main__content > :first-child,
.ms-flex-intro > :first-child,
.ms-flex-intro--fullwidth > :first-child{
margin-top:0;
}

.ms-flex-main__copy--fullwidth > :last-child,
.ms-flex-main__content > :last-child,
.ms-flex-intro > :last-child,
.ms-flex-intro--fullwidth > :last-child{
margin-bottom:0;
}

.ms-flex-cards{
margin-top:64px;
}

@media (max-width: 1024px){
.ms-flex-cards{
margin-top:56px;
}

.ms-flex-main,
.ms-flex-main--image-right,
.ms-flex-main--stack{
grid-template-columns:1fr;
    gap:24px;
    margin-bottom:32px;
}

.ms-flex-main__media img,
.ms-flex-main__media--fullwidth img{
height:380px;
}
}

@media (max-width: 640px){
.ms-flex-cards{
margin-top:48px;
}

.ms-flex-main__media img,
.ms-flex-main__media--fullwidth img{
height:280px;
}
}

.ms-info-block{
align-items:start;
}

@media (max-width:820px){
.ms-flex-card__band{
width:86%;
}
}

.ms-flex > .entry-header{
padding-top:21px;
  padding-bottom:10px;
}

.ms-flex > .entry-header h1{
margin-top:0;
  margin-bottom:.55em;
}

@media (max-width: 1024px){
.ms-flex > .entry-header{
padding-top:18px;
}
}

@media (max-width: 640px){
.ms-flex > .entry-header{
padding-top:14px;
    padding-bottom:8px;
}
}

@media (max-width: 1200px){
.ms-flex-cards{
column-gap:24px;
    row-gap:48px;
}
}

@media (max-width: 767px){
.ms-flex-main__copy .alignleft,
.ms-flex-main__copy .alignright,
.ms-flex-intro .alignleft,
.ms-flex-intro .alignright{
float:none;
    display:block;
    width:100%;
    max-width:100%;
    margin:0 0 1.5rem;
}

.ms-flex-main__copy .alignleft img,
.ms-flex-main__copy .alignright img,
.ms-flex-intro .alignleft img,
.ms-flex-intro .alignright img{
width:100%;
    height:auto;
    display:block;
}
}

@media (max-width: 1200px){
.ms-flex-cards{
grid-template-columns:repeat(3, minmax(0,1fr));
}
}

@media (min-width: 1025px){
.ms-flex-cards{
row-gap:48px;
}

.ms-flex-card{
margin-bottom:24px;
}

.ms-flex-card__band{
bottom:-20px;
}
}

@media (max-width: 1024px){
.ms-flex-main{
grid-template-columns:1fr;
}

.ms-flex-cards{
grid-template-columns:repeat(2, minmax(0,1fr));
}

.ms-info-block{
grid-template-columns:1fr;
}
}

@media (max-width: 640px){
.ms-flex-cards{
grid-template-columns:repeat(2, minmax(0,1fr));
}
}

.ms-flex-intro{
width:100%;
  max-width:none !important;
  min-width:0;
}

:is(.entry-content, .ms-flex-main, .ms-richtext, .ms-demarche-content, .ms-legal, .ms-credits, .ms-accessibility) a:focus-visible{
outline:3px solid var(--ms-visible-link-gold) !important;
  outline-offset:4px;
  box-shadow:0 0 0 4px rgba(192,162,113,.22);
}

:is(.entry-content, .ms-flex-main, .ms-richtext, .ms-demarche-content, .ms-legal, .ms-credits) a[target="_blank"]:not(:has(img))::after{
content:" ↗";
  font-size:.85em;
  font-weight:800;
}

:is(.entry-content, .ms-flex-main, .ms-richtext, .ms-demarche-content, .ms-legal, .ms-credits) a[href$=".pdf"]:not(.ms-pdf-item__link):not(:has(img)){
display:inline-flex;
  align-items:center;
  gap:.45em;
  margin:.25em 0;
  padding:.42em .7em;
  color:var(--ms-visible-link-dark);
  background:#fff;
  border:1px solid rgba(65,111,120,.35);
  border-left:5px solid var(--ms-visible-link);
  border-radius:10px;
  box-shadow:0 4px 12px rgba(28,62,68,.08);
  background-image:none;
}

:is(.entry-content, .ms-flex-main, .ms-richtext, .ms-demarche-content, .ms-legal, .ms-credits) a[href$=".pdf"]:not(.ms-pdf-item__link):not(:has(img))::before{
content:"PDF";
  font-size:.72em;
  line-height:1;
  letter-spacing:.04em;
  background:var(--ms-visible-link-gold);
  color:#fff;
  padding:.25em .38em;
  border-radius:5px;
}

:is(.entry-content, .ms-flex-main, .ms-richtext, .ms-demarche-content) a[href^="mailto:"]:not(:has(img))::before{
content:" ";
  font-family:"Font Awesome 6 Free", "Font Awesome 5 Free", Arial, Helvetica, sans-serif !important;
  font-style:normal;
  font-weight:900;
  line-height:1;
  color:#416f78;
}

:is(.entry-content, .ms-flex-main, .ms-richtext, .ms-demarche-content) a.ms-phone-link[href^="tel:"]:not(:has(img))::before{
content:"☎︎ ";
  font-family:Arial, Helvetica, sans-serif !important;
  font-variant-emoji:text;
  font-style:normal;
  font-weight:800;
  line-height:1;
  color:#416f78;
}

html.ms-a11y-underline-links :is(.entry-content, .ms-flex-main, .ms-richtext, .ms-demarche-content, .ms-legal, .ms-credits, .ms-accessibility) a{
text-decoration:underline !important;
  text-decoration-thickness:2px !important;
  text-underline-offset:4px !important;
}

.ms-flex-cta{
min-height:44px;
  min-width:44px;
}

.ms-flex-card{
position:relative;
}

.ms-flex-card:focus-within{
outline:3px solid var(--ms-a11y-focus) !important;
  outline-offset:4px;
  border-radius:14px;
}

.ms-flex-card a{
text-decoration:none;
}

.ms-flex-main--photo-hero{
gap:32px;
}

.ms-flex-hero-photo{
position:relative;
  overflow:hidden;
  border-radius:28px;
  box-shadow:0 10px 26px rgba(0,0,0,.10);
  background:#bd7676;
}

.ms-flex-hero-photo img{
position:relative;
  z-index:1;
  width:100%;
  height:450px;
  display:block;
  object-fit:cover;
  object-position:center center;
  border-radius:0 !important;
}

.ms-flex-hero-photo__overlay{
position:absolute;
  inset:0;
  z-index:2;
  background:linear-gradient(90deg, rgba(0,0,0,.64) 0%, rgba(0,0,0,.42) 46%, rgba(0,0,0,.10) 100%);
  pointer-events:none;
}

.ms-flex-hero-photo__content{
position:absolute;
  left:0;
  bottom:0;
  z-index:3;
  width:min(720px, 68%);
  padding:clamp(28px, 5vw, 60px) clamp(28px, 5vw, 72px);
  color:#fff;
  transform:none;
}

.ms-flex-hero-photo__content,
.ms-flex-hero-photo__content *{
color:#fff !important;
}

.ms-flex-hero-photo__content > :first-child{
margin-top:0;
}

.ms-flex-hero-photo__content > :last-child{
margin-bottom:0;
}

.ms-flex-hero-photo__content h2,
.ms-flex-hero-photo__content h3{
margin:0 0 18px;
  font-size:clamp(2rem, 3.2vw, 3.8rem);
  line-height:1.05;
  text-shadow:0 2px 14px rgba(0,0,0,.28);
}

.ms-flex-hero-photo__content p{
max-width:600px;
  margin:0 0 1em;
  font-size:clamp(1rem, 1.2vw, 1.25rem);
  line-height:1.6;
  text-shadow:0 2px 12px rgba(0,0,0,.25);
}

.ms-flex-hero-photo__content a{
color:#fff !important;
  text-decoration:underline;
  text-underline-offset:4px;
}

@media (max-width:1024px){
.ms-flex-hero-photo img{
height:380px;
}

.ms-flex-hero-photo__content{
width:min(620px, 78%);
    padding:38px clamp(24px, 5vw, 56px);
}
}

@media (max-width:640px){
.ms-flex-hero-photo{
border-radius:22px;
}

.ms-flex-hero-photo img{
height:320px;
}

.ms-flex-hero-photo__overlay{
background:linear-gradient(180deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.46) 100%);
}

.ms-flex-hero-photo__content{
width:100%;
    top:auto;
    bottom:0;
    transform:none;
    padding:34px 26px;
}
}

@media (max-width: 767px){
.ms-flex .wp-block-button__link,
.ms-flex a.wp-block-button__link{
width: auto !important;

    min-width: 220px !important;

    max-width: 90vw !important;

    height: auto !important;

    min-height: 56px !important;

    border-radius: 999px !important;

    padding: 12px 28px !important;

    display: inline-flex !important;

    align-items: center !important;

    justify-content: center !important;

    gap: 10px !important;

    white-space: normal !important;

    word-break: normal !important;

    overflow-wrap: normal !important;

    line-height: 1.25 !important;

    text-align: center !important;
}

.ms-flex .wp-block-button{
width: auto !important;

    display: flex !important;

    justify-content: center !important;
}
}
