/*
Theme Name: Mairie Septeuil
Theme URI: https://mairie-septeuil.fr/
Author: Mairie de Septeuil
Author URI: https://mairie-septeuil.fr/
Description: Thème WordPress mairie responsive pour Septeuil, avec gabarits verrouillés, page d’accueil éditoriale, carrousels, modèles de pages et intégration avec le plugin compagnon MS Administration.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: mairie-septeuil
*/

@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

/* =========================================================
   ORGANISATION DU STYLE
   Nettoyage renforcé du 02/05/2026 : variables regroupées,
   listes de sélecteurs fusionnées avec :is(...), blocs PDF et
   liens accessibles compactés sans modifier les fichiers PHP/JS.
   ========================================================= */

:root{
  --ms-font-heading:"Manrope", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ms-font-body:"Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ms-bg:#f4f5f2;
  --ms-surface:#ffffff;
  --ms-surface-soft:#f7f8f6;
  --ms-text:#5c6c84;
  --ms-text-strong:#253b63;
  --ms-heading:#416f78;
  --ms-green:#799a2b;
  --ms-green-dark:#678522;
  --ms-green-soft:#dfe8ca;
  --ms-orange:#f29400;
  --ms-blue-soft:#d9e5f2;
  --ms-blue-band:#d6e4ef;
  --ms-border:#dce2e8;
  --ms-shadow:0 18px 40px rgba(28,44,72,.10);
  --ms-radius:28px;
  --ms-radius-sm:18px;
  --ms-container:min(1280px, calc(100% - 48px));
  --ms-h1:clamp(2.25rem, 4vw, 4.25rem);
  --ms-h2:clamp(2rem, 3vw, 3.25rem);
  --ms-h3:clamp(1.2rem, 1.9vw, 1.6rem);
  --ms-p:clamp(1rem, 1.2vw, 1.25rem);
  --ms-leading:1.7;
  --ms-card-width:280px;
  --ms-card-width-mobile:clamp(150px, 46vw, 185px);

  /* Liens éditoriaux et focus accessibilité */
  --ms-visible-link:#416F78;
  --ms-visible-link-dark:#2f565e;
  --ms-visible-link-gold:#c0a271;
  --ms-visible-link-bg:rgba(65,111,120,.18);
  --ms-visible-link-bg-hover:rgba(65,111,120,.25);
  --ms-a11y-focus:#416F78;
  --ms-a11y-link:#416F78;
  --ms-a11y-link-dark:#2f565e;
}

*,
*::before,
*::after{box-sizing:border-box;}

html{
  scroll-behavior:smooth;
}


html.ms-a11y-text-down-2{ --ms-accessibility-scale:.88; }
html.ms-a11y-text-down-1{ --ms-accessibility-scale:.94; }
html.ms-a11y-text-up-1{ --ms-accessibility-scale:1.08; }
html.ms-a11y-text-up-2{ --ms-accessibility-scale:1.16; }
html{ --ms-accessibility-scale:1; }

body p,
body li,
body td,
body th,
body label,
body input,
body select,
body textarea,
body .ms-card__title,
body .ms-card__excerpt,
body .ms-social-post__excerpt,
body .ms-publication-card__title,
body .ms-publication-card__excerpt,
body .ms-pdf-item__title,
body .ms-pdf-item__description,
body .ms-footer__text,
body .search-field,
body .primary-menu > li > a{
  font-size:calc(1em * var(--ms-accessibility-scale));
}

html.ms-a11y-readable-font body,
html.ms-a11y-readable-font button,
html.ms-a11y-readable-font input,
html.ms-a11y-readable-font select,
html.ms-a11y-readable-font textarea{
  font-family:Arial, Helvetica, sans-serif;
}
html.ms-a11y-readable-font h1,
html.ms-a11y-readable-font h2,
html.ms-a11y-readable-font h3,
html.ms-a11y-readable-font h4,
html.ms-a11y-readable-font h5,
html.ms-a11y-readable-font h6{
  font-family:Arial, Helvetica, sans-serif;
}

html.ms-a11y-underline-links a{
  text-decoration:underline !important;
  text-underline-offset:.18em;
  text-decoration-thickness:2px;
}

html.ms-a11y-grayscale{
  filter:grayscale(1);
}

html.ms-a11y-high-contrast{
  --ms-bg:#ffffff;
  --ms-surface:#ffffff;
  --ms-surface-soft:#ffffff;
  --ms-text:#111111;
  --ms-text-strong:#000000;
  --ms-heading:#000000;
  --ms-green:#000000;
  --ms-green-dark:#000000;
  --ms-green-soft:#ffffff;
  --ms-orange:#000000;
  --ms-blue-soft:#ffffff;
  --ms-blue-band:#ffffff;
  --ms-border:#000000;
  --ms-shadow:none;
}
html.ms-a11y-high-contrast body,
html.ms-a11y-high-contrast .site-header,
html.ms-a11y-high-contrast .site-footer,
html.ms-a11y-high-contrast .ms-card,
html.ms-a11y-high-contrast .ms-pdf-item,
html.ms-a11y-high-contrast .ms-filter-panel,
html.ms-a11y-high-contrast .ms-a11y-widget__panel,
html.ms-a11y-high-contrast .ms-a11y-widget__tab{
  background:#ffffff !important;
  color:#000000 !important;
  border-color:#000000 !important;
  box-shadow:none !important;
}
html.ms-a11y-high-contrast .primary-menu > li > a,
html.ms-a11y-high-contrast .ms-button,
html.ms-a11y-high-contrast button,
html.ms-a11y-high-contrast input[type=submit]{
  background:#ffffff !important;
  color:#000000 !important;
  border-color:#000000 !important;
}

html.ms-a11y-negative-contrast{
  --ms-bg:#000000;
  --ms-surface:#111111;
  --ms-surface-soft:#161616;
  --ms-text:#f2f2f2;
  --ms-text-strong:#ffffff;
  --ms-heading:#ffffff;
  --ms-green:#ffffff;
  --ms-green-dark:#ffffff;
  --ms-green-soft:#111111;
  --ms-orange:#ffffff;
  --ms-blue-soft:#111111;
  --ms-blue-band:#111111;
  --ms-border:#ffffff;
  --ms-shadow:none;
}
html.ms-a11y-negative-contrast body,
html.ms-a11y-negative-contrast .site-header,
html.ms-a11y-negative-contrast .site-footer,
html.ms-a11y-negative-contrast .ms-card,
html.ms-a11y-negative-contrast .ms-pdf-item,
html.ms-a11y-negative-contrast .ms-filter-panel,
html.ms-a11y-negative-contrast .ms-a11y-widget__panel,
html.ms-a11y-negative-contrast .ms-a11y-widget__tab{
  background:#111111 !important;
  color:#ffffff !important;
  border-color:#ffffff !important;
  box-shadow:none !important;
}
html.ms-a11y-negative-contrast .primary-menu > li > a,
html.ms-a11y-negative-contrast .ms-button,
html.ms-a11y-negative-contrast button,
html.ms-a11y-negative-contrast input[type=submit]{
  background:#111111 !important;
  color:#ffffff !important;
  border-color:#ffffff !important;
}


.ms-a11y-widget{
  --ms-a11y-top:180px;
  position:fixed;
  right:0;
  top:var(--ms-a11y-top);
  z-index:9998;
  display:flex;
  align-items:flex-start;
  pointer-events:none;
}
.ms-a11y-widget *{ pointer-events:auto; }

.ms-a11y-widget__tab{
  width:58px;
  min-width:58px;
  min-height:58px;
  border-radius:18px 0 0 18px;
  border:2px solid #416f78;
  border-right:none;
  background:#416f78;
  color:#fff;
  padding:0;
  box-shadow:0 16px 34px rgba(30,53,73,.16);
  display:grid;
  place-items:center;
}

.ms-a11y-widget__tab-icon{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  font-size:1.45rem;
  line-height:1;
}

.ms-a11y-widget__tab-label,
.ms-a11y-widget__tab-arrow{
  display:none;
}

.ms-a11y-widget__panel{
  width:min(300px, calc(100vw - 70px));
  background:#f6f8f6;
  border:2px solid #416f78;
  border-right:none;
  border-radius:0 0 0 22px;
  box-shadow:0 18px 38px rgba(30,53,73,.16);
  overflow:hidden;
}

.home .ms-a11y-widget__panel{
  width:min(285px, calc(100vw - 70px));
}

.ms-a11y-widget__panel-head{
  padding:18px 18px 10px;
  border-bottom:1px solid rgba(65,111,120,.18);
}

.ms-a11y-widget__panel-head h2{
  margin:0;
  color:#2e636c;
  font-family:var(--ms-font-heading);
  font-size:1.45rem;
  font-weight:800;
  line-height:1.05;
}

.ms-a11y-widget__actions{
  padding:10px 12px 12px;
  display:grid;
  gap:4px;
}

.ms-a11y-widget__actions button,
.ms-a11y-widget__links a{
  width:100%;
  min-height:38px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  padding:0 10px;
  border:none;
  border-radius:12px;
  background:transparent;
  color:#2f2f2f;
  box-shadow:none;
  font-size:.92rem;
  font-weight:600;
  line-height:1.15;
  text-align:left;
}

.ms-a11y-widget__actions button i,
.ms-a11y-widget__links a i{
  width:18px;
  text-align:center;
  color:#416f78;
  font-size:1rem;
  flex:0 0 18px;
}

.ms-a11y-widget__actions button:hover,
.ms-a11y-widget__links a:hover,
.ms-a11y-widget__actions button:focus-visible,
.ms-a11y-widget__links a:focus-visible{
  background:#e7eff0;
  transform:none;
}

.ms-a11y-widget__actions button.is-active{
  background:#d8e7ea;
  color:#24454b;
}

.ms-a11y-widget__links{
  border-top:1px solid rgba(65,111,120,.26);
  padding:10px 12px 12px;
  display:grid;
  gap:2px;
}

@media (max-width: 900px){
  .ms-a11y-widget{
    top:var(--ms-a11y-top);
    bottom:auto;
  }

  .ms-a11y-widget__tab{
    width:54px;
    min-width:54px;
    min-height:54px;
  }

  .ms-a11y-widget__panel{
    width:min(280px, calc(100vw - 64px));
    max-height:min(72vh, 560px);
    overflow:auto;
  }
}

@media (max-width: 640px){
  .ms-a11y-widget{
    top:var(--ms-a11y-top);
    bottom:auto;
  }

  .ms-a11y-widget__tab{
    width:50px;
    min-width:50px;
    min-height:50px;
    border-radius:16px 0 0 16px;
  }

  .ms-a11y-widget__panel{
    width:min(260px, calc(100vw - 58px));
    border-radius:0 0 0 18px;
  }

  .ms-a11y-widget__panel-head{
    padding:16px 16px 10px;
  }

  .ms-a11y-widget__panel-head h2{
    font-size:1rem;
  }

  .ms-a11y-widget__actions,
  .ms-a11y-widget__links{
    padding-inline:10px;
  }

  .ms-a11y-widget__actions button,
  .ms-a11y-widget__links a{
    min-height:36px;
    padding-inline:8px;
    font-size:.88rem;
  }
}

body{
  margin:0;
  background:var(--ms-bg);
  color:var(--ms-text);
  font-family:var(--ms-font-body);
  font-size:16px;
  line-height:var(--ms-leading);
  overflow-x:hidden;
}

body.admin-bar .site-header{
  top:32px;
}

img,
svg,
video,
canvas,
iframe,
object,
embed{
  max-width:100%;
  height:auto;
}

iframe,
embed,
object{
  display:block;
}

a{
  color:inherit;
  text-decoration:none;
}

button,
input,
select,
textarea{
  font:inherit;
}

table{
  width:100%;
  border-collapse:collapse;
  display:block;
  overflow-x:auto;
}

th, td{
  border:1px solid var(--ms-border);
  padding:14px 16px;
  background:#fff;
  white-space:nowrap;
}

.container,
.ms-container{
  width:var(--ms-container);
  margin-inline:auto;
}

.screen-reader-text{
  position:absolute!important;
  clip:rect(1px,1px,1px,1px);
  padding:0!important;
  border:0!important;
  height:1px!important;
  width:1px!important;
  overflow:hidden;
}

.skip-link{
  position:absolute;
  left:16px;
  top:-80px;
  z-index:999;
  background:#fff;
  padding:12px 18px;
  border-radius:12px;
  box-shadow:var(--ms-shadow);
}
.skip-link:focus{
  top:16px;
}

h1,h2,h3,h4,h5,h6{
  color:var(--ms-heading);
  font-family:var(--ms-font-heading);
  font-weight:800;
  line-height:1.12;
  letter-spacing:-0.025em;
  margin:0 0 .75em;
}

h1{font-size:var(--ms-h1);}
h2{font-size:var(--ms-h2);}
h3{font-size:var(--ms-h3);}
h2,h3,h4,h5,h6{letter-spacing:-0.015em;}
h3,h4,h5,h6{font-weight:750;}

p,
li,
blockquote{
  font-size:var(--ms-p);
  line-height:var(--ms-leading);
}

.wp-block-image img,
.entry-content img,
.ms-card-media img,
.ms-flex-main__media img,
.ms-info-block__media img,
.ms-hero,
.ms-hero-fallback{
  border-radius:24px;
}

.entry-content a,
.ms-richtext a,
.ms-legal a,
.ms-credits a,
.ms-accessibility a{
  color:var(--ms-heading);
  text-decoration:underline;
  text-underline-offset:.16em;
}

.entry-content ul,
.entry-content ol{
  padding-left:1.2rem;
}

.ms-button,
.wp-block-button__link,
button,
input[type=submit]{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.55rem;
  min-height:54px;
  padding:0 24px;
  border-radius:999px;
  border:1px solid rgba(65,111,120,.16);
  background:#fff;
  color:var(--ms-heading);
  font-weight:700;
  transition:transform .2s ease, box-shadow .2s ease, color .2s ease, background .2s ease;
  cursor:pointer;
  box-shadow:0 5px 16px rgba(38,60,74,.05);
}
.ms-button:hover,
.wp-block-button__link:hover,
button:hover,
input[type=submit]:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 24px rgba(38,60,74,.10);
}
.ms-button--primary{
  background:var(--ms-green);
  color:#fff;
  border-color:var(--ms-green);
}
.ms-button--primary:hover{
  background:var(--ms-green-dark);
}
.ms-button--ghost{
  background:transparent;
  color:#fff;
  border-color:rgba(255,255,255,.7);
}
.ms-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 18px;
  min-height:46px;
  border-radius:999px;
  background:var(--ms-green-soft);
  color:#5c6d1d;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  font-size:.95rem;
}

/* Header */
.site-header{
  position:sticky;
  top:0;
  z-index:99;
  background:#fff;
  box-shadow:0 2px 0 rgba(117,140,56,.05);
}
.header-top{
  display:grid;
  grid-template-columns:minmax(180px, 280px) minmax(160px, 1fr) auto;
  align-items:center;
  gap:16px;
  padding:20px 0;
}
.header-logo{
  min-width:0;
}
.custom-logo-link,
.site-branding-fallback{
  display:flex;
  align-items:center;
}
.custom-logo{
  max-height:110px;
  width:auto;
}
.site-branding-fallback{
  font-family:var(--ms-font-heading);
  font-size:2rem;
  color:var(--ms-heading);
}

.header-search{
  display:flex;
  justify-content:center;
  min-width:0;
}
.search-form{
  position:relative;
  width:min(420px,100%);
}
.search-form label{
  display:block;
}
.search-field{
  width:100%;
  min-width:0;
  padding:17px 78px 17px 22px;
  border-radius:999px;
  border:1px solid #ccd7de;
  background:#f8fafb;
  color:#475569;
}
.search-submit{
  position:absolute;
  top:50%;
  right:6px;
  transform:translateY(-50%);
  width:46px;
  min-width:46px;
  min-height:46px;
  height:46px;
  padding:0;
  border:none;
  background:var(--ms-green);
  color:#fff;
  border-radius:50%;
  box-shadow:none;
}
.search-submit:hover{
  background:var(--ms-green-dark);
}
.header-contact{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:18px;
  color:var(--ms-green-dark);
  white-space:nowrap;
}
.header-contact a,
.header-contact span{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:700;
}
.header-contact .fa-facebook-f{
  font-size:1rem;
}


/* Icône courriel harmonisée : même pictogramme enveloppe partout */
.header-contact [class*="fa-envelope"],
.ms-annuaire-meta [class*="fa-envelope"]{
  font-family:"Font Awesome 6 Free", "Font Awesome 5 Free", Arial, Helvetica, sans-serif !important;
  font-size:1rem;
  font-style:normal;
  font-weight:900;
  line-height:1;
  color:#416f78;
}

.header-contact [class*="fa-envelope"]::before,
.ms-annuaire-meta [class*="fa-envelope"]::before{
  content:"\f0e0" !important;
  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;
}

/* Icône téléphone harmonisée : même pictogramme texte partout */
.header-contact [class*="fa-phone"],
.ms-annuaire-meta [class*="fa-phone"]{
  font-family:Arial, Helvetica, sans-serif !important;
  font-size:1rem;
  font-style:normal;
  font-weight:800;
  line-height:1;
  color:#416f78;
}

.header-contact [class*="fa-phone"]::before,
.ms-annuaire-meta [class*="fa-phone"]::before{
  content:"\260E\FE0E" !important;
  font-family:Arial, Helvetica, sans-serif !important;
  font-variant-emoji:text;
  font-style:normal;
  font-weight:800;
  line-height:1;
  color:#416f78;
}
.header-contact__facebook{
  width:40px;
  height:40px;
  border-radius:50%;
  border:2px solid currentColor;
  justify-content:center!important;
  gap:0!important;
}

.header-nav-wrap{
  background:linear-gradient(90deg, var(--ms-green-dark), var(--ms-green));
}
.nav-container{
  display:flex;
  align-items:center;
  min-height:56px;
  position:relative;
}
.menu-toggle{
  display:none;
  margin-left:auto;
  min-width:48px;
  width:48px;
  height:48px;
  border-radius:12px;
  background:transparent;
  border:1px solid rgba(255,255,255,.25);
  color:#fff;
  box-shadow:none;
}
.menu-toggle__bars{
  display:grid;
  gap:5px;
}
.menu-toggle__bars span{
  display:block;
  width:20px;
  height:2px;
  background:currentColor;
  border-radius:999px;
}

.primary-menu{
  display:flex;
  align-items:center;
  gap:18px;
  list-style:none;
  margin:0;
  padding:0;
  min-height:56px;
}
.primary-menu > li{
  position:relative;
}
.primary-menu > li > a{
  display:flex;
  align-items:center;
  min-height:56px;
  padding:0 4px;
  color:#fff;
  font-weight:800;
  position:relative;
}
.primary-menu > li > a::after{
  content:"";
  position:absolute;
  left:8px;
  right:8px;
  bottom:8px;
  height:4px;
  border-radius:999px;
  background:rgba(255,255,255,.82);
  transform:scaleX(0);
  transform-origin:center;
  transition:transform .22s ease, background .22s ease;
}
.primary-menu > li:hover > a::after,
.primary-menu > li.current-menu-item > a::after,
.primary-menu > li.current-menu-ancestor > a::after{
  transform:scaleX(1);
  background:rgba(255,255,255,.96);
}
.primary-menu .sub-menu{
  position:absolute;
  top:100%;
  left:0;
  min-width:260px;
  list-style:none;
  margin:0;
  padding:12px;
  border-radius:0 0 18px 18px;
  background:#fff;
  box-shadow:var(--ms-shadow);
  opacity:0;
  pointer-events:none;
  transform:translateY(8px);
  transition:all .2s ease;
}
.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}
.primary-menu .sub-menu a{
  display:block;
  padding:10px 14px;
  border-radius:12px;
  color:var(--ms-text-strong);
  font-weight:700;
}
.primary-menu .sub-menu a:hover{
  background:#eef3e1;
  color:var(--ms-green-dark);
}

/* General layout */
.site-main{
  min-height:55vh;
  padding-bottom:72px;
}
.ms-section{
  padding:48px 0 10px;
}
.ms-section__head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:28px;
}
.ms-section__title{
  margin-bottom:0;
}
.ms-section__actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* Hero front */
.ms-front-hero{
  position:relative;
  padding-top:0;
}
.ms-hero-shell{
  position:relative;
}
.ms-hero{
  position:relative;
  min-height:min(72vh, 700px);
  background:#d7dde3 center/cover no-repeat;
  overflow:hidden;
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 720' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0,0H1600V585C1520,605 1410,613 1310,595C1235,581 1190,551 1105,548C1009,545 976,581 885,585C790,589 744,553 646,549C543,545 496,585 392,593C269,602 181,568 86,553C61,549 34,547 0,550V0Z'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 720' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0,0H1600V585C1520,605 1410,613 1310,595C1235,581 1190,551 1105,548C1009,545 976,581 885,585C790,589 744,553 646,549C543,545 496,585 392,593C269,602 181,568 86,553C61,549 34,547 0,550V0Z'/%3E%3C/svg%3E");
  -webkit-mask-size:100% 100%;
  mask-size:100% 100%;
  -webkit-mask-repeat:no-repeat;
  mask-repeat:no-repeat;
}
.ms-hero::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(to top right, rgba(32,51,60,.42) 0%, rgba(32,51,60,.26) 45%, rgba(32,51,60,0) 60%, rgba(32,51,60,0) 100%);
}
.ms-hero-fallback{
  display:flex;
  align-items:flex-end;
  min-height:520px;
  background:linear-gradient(135deg, #cdd8d8, #ebeff1);
  padding:0 0 70px;
}
.ms-front-highlight{
  position:absolute;
  left:50%;
  bottom:32px;
  transform:translateX(-50%);
  width:min(920px, calc(100% - 34px));
  z-index:2;
}
.ms-highlight-card{
  background:rgba(255,255,255,.95);
  backdrop-filter:blur(8px);
  border-radius:36px;
  box-shadow:0 24px 50px rgba(22,35,56,.12);
  padding:32px 32px 34px;
  display:grid;
  grid-template-columns:180px 1fr;
  gap:26px;
}
.ms-highlight-card--fallback{
  grid-template-columns:1fr;
}
.ms-highlight-date{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:4px;
  min-height:186px;
  border-radius:30px;
  background:var(--ms-blue-soft);
  color:#60728d;
  font-family:var(--ms-font-heading);
  font-weight:800;
}
.ms-highlight-date strong{
  font-size:4.2rem;
  line-height:1;
}
.ms-highlight-date span{
  font-size:1.25rem;
  letter-spacing:.03em;
}

.ms-highlight-copy h2{
  margin-bottom:.35em;
}
.ms-highlight-copy p{
  font-size:clamp(1.05rem, 1.7vw, 1.5rem);
  margin:0 0 1.1em;
}
.ms-highlight-copy .ms-button{
  font-size:1.05rem;
}
.ms-home-shortcuts{
  position:relative;
  margin-top:-48px;
  z-index:3;
  padding-bottom:26px;
}
.ms-home-shortcuts__grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(170px, 1fr));
  gap:18px;
  align-items:start;
}
.ms-home-shortcut{
  justify-self:center;
  width:180px;
  min-width:180px;
  height:180px;
  border-radius:50%;
  position:relative;
  background:var(--circle-bg, #d8e4f3);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  box-shadow:0 18px 30px rgba(54,70,92,.10);
  text-align:center;
  color:var(--ms-text-strong);
  transition:transform .2s ease, box-shadow .2s ease;
}
.ms-home-shortcut::before,
.ms-home-shortcut::after{
  content:"";
  position:absolute;
  border-radius:50%;
  inset:-12px;
  border:18px solid rgba(255,255,255,.72);
  pointer-events:none;
}
.ms-home-shortcut::after{
  inset:20px;
  border:3px dashed rgba(255,255,255,.52);
}
.ms-home-shortcut:hover{
  transform:translateY(-4px);
  box-shadow:0 24px 36px rgba(54,70,92,.18);
}
.ms-home-shortcut__inner{
  position:relative;
  z-index:2;
}
.ms-home-shortcut i{
  font-size:1.8rem;
  margin-bottom:8px;
}
.ms-home-shortcut span{
  display:block;
  font-size:1.12rem;
  line-height:1.2;
  font-weight:800;
}

/* Carousel generic */
.ms-carousel{
  position:relative;
}
.ms-carousel__viewport{
  overflow:hidden;
  padding:8px 2px 18px;
}
.ms-carousel__track{
  display:flex;
  gap:24px;
  will-change:transform;
  transition:transform .35s ease;
}
.ms-carousel__slide{
  min-width:calc((100% - 48px) / 3);
  max-width:calc((100% - 48px) / 3);
  flex:0 0 calc((100% - 48px) / 3);
}
.ms-carousel[data-tablet="2"] .ms-carousel__slide{
  transition:min-width .2s ease;
}
.ms-carousel__controls{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin-top:14px;
}
.ms-carousel__arrow{
  width:56px;
  min-width:56px;
  height:56px;
  padding:0;
  border:none;
  border-radius:50%;
  background:var(--ms-green);
  color:#fff;
  box-shadow:none;
}
.ms-carousel__arrow[disabled]{
  opacity:.35;
  cursor:not-allowed;
}
.ms-carousel__dots{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
}
.ms-carousel__dot{
  width:11px;
  height:11px;
  border:none;
  padding:0;
  border-radius:50%;
  background:#c6d1d8;
  box-shadow:none;
}
.ms-carousel__dot.is-active{
  background:var(--ms-heading);
}

.ms-card{
  background:#fff;
  border-radius:32px;
  overflow:hidden;
  box-shadow:var(--ms-shadow);
  height:100%;
}
.ms-card a{
  display:flex;
  flex-direction:column;
  height:100%;
}
.ms-card-media{
  aspect-ratio:16/10;
  overflow:hidden;
}
.ms-card-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .35s ease;
  border-radius:0;
}
.ms-card:hover .ms-card-media img,
.ms-flex-card:hover .ms-flex-card__media img,
.ms-info-block:hover .ms-info-block__media img,
.ms-annuaire-card:hover .ms-annuaire-card__thumb img,
.ms-pdf-item:hover .ms-pdf-item__thumb img,
.ms-kiosque-cover:hover img{
  transform:scale(1.05);
}
.ms-card-body{
  padding:28px 28px 30px;
}
.ms-card h3{
  margin-bottom:.55em;
}
.ms-card p{
  margin:0;
}
.ms-card__meta{
  display:flex;
  align-items:flex-end;
  gap:16px;
  margin-bottom:16px;
}
.ms-event-badge{
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-width:92px;
  min-height:92px;
  border-radius:18px;
  background:var(--ms-heading);
  color:#fff;
  font-weight:800;
  text-transform:uppercase;
  line-height:1.1;
  transition:background .2s ease;
}
.ms-event-badge strong{font-size:1.6rem;}
.ms-event-badge span{font-size:.9rem;}
.ms-card:hover .ms-event-badge{
  background:var(--ms-orange);
}
.ms-card__read{
  margin-top:16px;
  color:var(--ms-heading);
  font-weight:800;
}

/* Dates d’événement multi-jours : début + fin côte à côte */
.ms-card-media .ms-event-badges{
  position:absolute;
  left:14px;
  bottom:14px;
  display:flex;
  align-items:center;
  gap:0;
  z-index:2;
}
.ms-card-media .ms-event-badges .ms-event-badge{
  position:static;
  left:auto;
  bottom:auto;
}
.ms-event-badges__separator{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 10px;
  color:var(--ms-heading);
  font-weight:900;
  font-size:1.05rem;
  line-height:1;
  text-transform:uppercase;
  -webkit-text-stroke:3px #fff;
  paint-order:stroke fill;
  text-shadow:
    0 1px 0 #fff,
    0 -1px 0 #fff,
    1px 0 0 #fff,
    -1px 0 0 #fff,
    0 4px 10px rgba(0,0,0,.22);
}
.ms-event-badge--end{
  background:rgba(96,114,141,.95);
}
.ms-card:hover .ms-event-badges__separator{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 10px;
  color:var(--ms-heading);
  font-weight:900;
  font-size:1.05rem;
  line-height:1;
  text-transform:uppercase;
  -webkit-text-stroke:3px #fff;
  paint-order:stroke fill;
  text-shadow:
    0 1px 0 #fff,
    0 -1px 0 #fff,
    1px 0 0 #fff,
    -1px 0 0 #fff,
    0 4px 10px rgba(0,0,0,.22);
}
.ms-event-badge--end{
  background:rgba(96,114,141,.95);
}
@media (max-width:640px){
  .ms-card-media .ms-event-badges{
    left:12px;
    bottom:12px;
    gap:0;
  }
  .ms-event-badges__separator{
    padding:0 7px;
    font-size:.92rem;
    -webkit-text-stroke:2.5px #fff;
  }
  .ms-card-media .ms-event-badges .ms-event-badge{
    min-width:66px;
    min-height:66px;
    border-radius:13px;
  }
  .ms-card-media .ms-event-badges .ms-event-badge strong{font-size:1.2rem;}
  .ms-card-media .ms-event-badges .ms-event-badge span{font-size:.76rem;}
}

/* Kiosque and social */
.ms-kiosque-social{
  display:grid;
  grid-template-columns:minmax(0, 1.2fr) minmax(320px, .8fr);
  gap:28px;
  align-items:start;
}
.ms-kiosque,
.ms-social-box{
  background:transparent;
}
.ms-kiosque-stage{
  position:relative;
  min-height:580px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px 80px 90px;
}
.ms-kiosque-cover{
  position:absolute;
  top:48%;
  left:50%;
  width:min(34vw, 320px);
  max-width:320px;
  transform:translate(-50%,-50%) scale(.85);
  opacity:0;
  pointer-events:none;
  transition:transform .34s ease, opacity .34s ease;
  text-align:center;
}
.ms-kiosque-cover img{
  width:100%;
  height:auto;
  box-shadow:var(--ms-shadow);
  border-radius:22px;
}
.ms-kiosque-cover figcaption{
  margin-top:20px;
}
.ms-kiosque-cover h3{
  font-size:2rem;
  font-family:var(--ms-font-heading);
  color:#000;
  margin-bottom:.2em;
}
.ms-kiosque-cover p{
  font-size:1rem;
  color:#000;
  margin:0;
}
.ms-kiosque-cover.is-prev{
  opacity:1;
  transform:translate(calc(-50% - 220px), -53%) scale(.82);
  z-index:1;
  pointer-events:auto;
}
.ms-kiosque-cover.is-active{
  opacity:1;
  transform:translate(-50%,-50%) scale(1);
  z-index:3;
  pointer-events:auto;
}
.ms-kiosque-cover.is-next{
  opacity:1;
  transform:translate(calc(-50% + 220px), -53%) scale(.82);
  z-index:1;
  pointer-events:auto;
}
.ms-kiosque-nav{
  position:absolute;
  inset:0;
  pointer-events:none;
}
.ms-kiosque-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  pointer-events:auto;
  width:56px;
  height:56px;
  min-width:56px;
  padding:0;
  border:none;
  border-radius:50%;
  background:var(--ms-green);
  color:#fff;
}
.ms-kiosque-arrow--prev{left:0;}
.ms-kiosque-arrow--next{right:0;}
.ms-kiosque-arrow[disabled]{opacity:.35;}
.ms-kiosque-footer{
  margin-top:-22px;
}

/* Social */
.ms-social-panel{
  position:relative;
  background:rgba(255,255,255,.78);
  border-radius:34px;
  box-shadow:var(--ms-shadow);
  overflow:hidden;
  backdrop-filter:blur(6px);
  min-height:640px;
}
.ms-social-tabs{
  display:flex;
  gap:10px;
  padding:28px 28px 0;
}
.ms-social-tab{
  width:86px;
  min-width:86px;
  min-height:94px;
  border:none;
  border-radius:20px 20px 0 0;
  color:#fff;
  box-shadow:none;
  transform:translateY(16px);
  opacity:.72;
}
.ms-social-tab.is-active{
  transform:translateY(0);
  opacity:1;
}
.ms-social-tab[data-network="facebook"]{background:#3344a7;}
.ms-social-tab[data-network="x"]{background:#18a2db;}
.ms-social-tab[data-network="instagram"]{background:#ef8d29;}
.ms-social-tab[data-network="youtube"]{background:#e72b1e;}
.ms-social-tab i{font-size:2rem;}
.ms-social-frame{
  background:#fff;
  border-radius:30px;
  margin:0 28px 28px;
  padding:26px;
  min-height:540px;
  box-shadow:0 15px 30px rgba(43,58,80,.09);
}
.ms-social-post{
  display:none;
}
.ms-social-post.is-active{
  display:block;
}
.ms-social-post__header{
  display:grid;
  grid-template-columns:64px 1fr;
  gap:16px;
  align-items:center;
  margin-bottom:18px;
}
.ms-social-post__avatar{
  width:64px;
  height:64px;
  border-radius:50%;
  background:#f0f4f7;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  color:var(--ms-heading);
}
.ms-social-post__avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.ms-social-post__title{
  font-size:1.1rem;
  font-weight:800;
  color:#3a3f46;
  margin:0;
}
.ms-social-post__subtitle,
.ms-social-post__date{
  font-size:.95rem;
  color:#8b7f8d;
}
.ms-social-post__image{
  margin:18px 0 20px;
  border-radius:0;
  overflow:hidden;
}
.ms-social-post__image img{
  width:100%;
  aspect-ratio:16 / 11;
  object-fit:cover;
  border-radius:0;
}
.ms-social-post__excerpt{
  font-size:1rem;
  color:#808b92;
}
.ms-social-post__actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-top:1px solid #eceef0;
  padding-top:18px;
  margin-top:18px;
  color:#918694;
}
.ms-social-vertical{
  position:absolute;
  right:18px;
  top:50%;
  transform:translateY(-50%);
  display:grid;
  gap:10px;
}
.ms-social-vertical button{
  width:46px;
  min-width:46px;
  height:46px;
  border-radius:50%;
  padding:0;
  border:none;
  background:#eef3e1;
  color:var(--ms-green-dark);
  box-shadow:none;
}
.ms-social-empty{
  padding:34px;
  background:#fff;
  border-radius:30px;
  box-shadow:var(--ms-shadow);
}

/* Content and archives */
.entry-header{
  padding:42px 0 10px;
}
.entry-content,
.ms-richtext,
.ms-legal,
.ms-credits,
.ms-accessibility{
  max-width:82ch;
}
.entry-content{
  padding:12px 0 44px;
}
.entry-content > * + *{
  margin-top:1em;
}
.single-hero{
  margin-top:18px;
  aspect-ratio:16/8;
  overflow:hidden;
  border-radius:30px;
  box-shadow:var(--ms-shadow);
}
.single-hero img{
  width:100%;
  height:100%;
  object-fit:cover;
}


.single-entry__layout{
  display:grid;
  grid-template-columns:minmax(260px, 360px) minmax(0, 1fr);
  gap:30px;
  align-items:start;
  padding:18px 0 44px;
}
.single-entry__content{
  max-width:none;
  padding:0;
}
.single-entry__media{
  position:sticky;
  top:24px;
}
.single-hero--side{
  margin-top:0;
  aspect-ratio:4/5;
}
.single-entry--side-media .entry-header{
  padding-bottom:18px;
}

.ms-archive-group{
  margin:32px 0 50px;
}
.ms-archive-year{
  margin-bottom:18px;
}
.ms-archive-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:24px;
}
.ms-empty{
  padding:28px;
  background:#fff;
  border-radius:24px;
  box-shadow:var(--ms-shadow);
}

/* Flexible template */
.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 .35s 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 .35s ease;
}

/* Démarches */
.ms-demarches{
  padding:44px 0 0;
}
.ms-demarches-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:42px 36px;
}
.ms-demarches-intro{
  margin-bottom:32px;
}
.ms-demarches > .entry-content{
  margin-bottom:32px;
}
.ms-demarche-group{
  min-width:0;
}
.ms-demarche-group__title{
  background:#a7b662;
  color:#fff;
  text-align:center;
  padding:8px 4px;
  margin-bottom:18px;
  font-family:var(--ms-font-heading);
  font-weight:800;
  font-size:clamp(1.4rem,2vw,2.1rem);
}

.ms-demarche-item{
  background:#ececec;
  margin-bottom:8px;
  overflow:hidden;
}
.ms-demarche-item summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:40px;
  padding:0 22px;
  font-weight:700;
  color:#4c4c4c;
  background:#fff;
  text-transform:none;
}
.ms-demarche-item summary::-webkit-details-marker{display:none;}
.ms-demarche-item[open] summary{
  background:#c0a271;
  color:#fff;
}
.ms-demarche-arrow{
  color:currentColor;
  transition:transform .2s ease;
}
.ms-demarche-item[open] .ms-demarche-arrow{
  transform:rotate(180deg);
}
.ms-demarche-content{
  background:#fff;
  padding:18px 22px 22px;
}
.ms-demarche-links{
  display:grid;
  gap:10px;
}
.ms-demarche-links a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:700;
}

/* Elus */
.ms-elus{
  position:relative;
  padding:44px 0 80px;
}
.ms-elus::before{
  content:"";
  position:absolute;
  inset:0;
  background:rgba(255,255,255,.58);
  pointer-events:none;
}
.ms-elus > .container{
  position:relative;
  z-index:1;
}
.ms-elus-hero{
  display:grid;
  grid-template-columns:minmax(380px,.62fr) minmax(0,1fr) auto;
  gap:28px;
  align-items:start;
  margin-bottom:40px;
}
.ms-elus-mayor{
  display:grid;
  grid-template-columns:180px minmax(0,1fr);
  gap:18px;
  align-items:start;
}
.ms-elus-photo{
  width:180px;
  height:220px;
  border-radius:0;
  overflow:hidden;
  background:#ddd;
}
.ms-elus-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.ms-elus-mayor__content{
  min-width:0;
  align-self:start;
}
.ms-elus-mayor__content h3{
  margin:0 0 .45em;
  font-size:var(--ms-h3);
  line-height:1.12;
}
.ms-elus-mayor__role,
.ms-elus-mayor__email{
  margin:.2em 0;
}
.ms-elus-intro{
  max-width:none;
  min-width:0;
  padding-top:0;
}
.ms-elus-intro > *:first-child{
  margin-top:0;
}
.ms-elus-actions{
  display:grid;
  gap:14px;
  justify-items:end;
}
.ms-elus-section{
  margin:36px 0 18px;
}
.ms-elus-section h2{
  font-size:var(--ms-h2);
  font-weight:800;
  margin-bottom:.6em;
}
.ms-elus-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:26px 18px;
  align-items:start;
}
.ms-elus-card{
  min-width:0;
  display:grid;
  gap:10px;
  align-content:start;
}
.ms-elus-card__thumb{
  width:100%;
  aspect-ratio:180 / 220;
  background:#ddd;
  overflow:hidden;
}
.ms-elus-card__thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.ms-elus-card__content{
  min-width:0;
}
.ms-elus-card h3{
  font-size:1.1rem;
  margin:0 0 .35em;
}
.ms-elus-card p{
  font-size:1rem;
  margin:.2em 0;
}

/* Plugin companion frontend */
.ms-annuaire-wrap,
.ms-pdf-archives{
  display:grid;
  gap:26px;
}
.ms-annuaire-category{
  display:grid;
  gap:18px;
}
.ms-annuaire-category__header{
  display:flex;
  align-items:center;
  gap:16px;
  margin-top:40px;
  margin-bottom:8px;
}
.ms-annuaire-category__logo{
  width:80px;
  max-width:80px;
  flex:0 0 80px;
}
.ms-annuaire-grid{
  display:grid;
  grid-template-columns:repeat(var(--ms-annuaire-columns,4), minmax(0,1fr));
  gap:22px;
}
.ms-annuaire-card,
.ms-annuaire-line{
  background:#fff;
  border-radius:22px;
  box-shadow:var(--ms-shadow);
  overflow:hidden;
}
.ms-annuaire-card__thumb{
  height:160px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:#f7f8fa;
}
.ms-annuaire-card__thumb img,
.ms-annuaire-line__thumb img{
  max-width:80px;
  width:auto;
  height:auto;
  object-fit:contain;
}
.ms-annuaire-card__body{
  padding:20px 22px 24px;
}
.ms-annuaire-meta{
  display:grid;
  gap:8px;
}
.ms-annuaire-meta p{
  margin:0;
  font-size:1rem;
}
.ms-annuaire-meta a{
  color:var(--ms-heading);
  text-decoration:underline;
  text-underline-offset:.16em;
}
.ms-annuaire-list{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:20px;
}
.ms-annuaire-line{
  display:grid;
  grid-template-columns:96px 1fr;
  gap:18px;
  padding:18px;
}
.ms-annuaire-line__thumb{
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding-top:4px;
}
.ms-annuaire-no-category{
  margin-top:8px;
}

.ms-social-post-group{display:none;}
.ms-social-post-group.is-active{display:block;}

/* Footer */
.site-footer{
  background:#fff;
  border-top:1px solid rgba(65,111,120,.12);
  padding:28px 0 42px;
}
.site-footer__inner{
  display:flex;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
  color:#6c7b91;
}
.site-footer__menu{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
}
.site-footer__menu a{
  text-decoration:underline;
  text-underline-offset:.16em;
}

/* Search results */
.search-results .entry-summary{
  max-width:75ch;
}

/* WordPress blocks + galleries */
.wp-block-gallery,
.gallery{
  display:grid;
  gap:16px;
}
.alignleft{float:left; margin:0 24px 12px 0;}
.alignright{float:right; margin:0 0 12px 24px;}
.aligncenter{display:block; margin-inline:auto;}
.wp-caption{
  max-width:100%;
}

/* Images alignées WordPress : éviter le texte orphelin à droite/gauche sur mobile */
@media (max-width: 767px){
  .entry-content .alignleft,
  .entry-content .alignright,
  .ms-richtext .alignleft,
  .ms-richtext .alignright,
  .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;
  }

  .entry-content .alignleft img,
  .entry-content .alignright img,
  .ms-richtext .alignleft img,
  .ms-richtext .alignright img,
  .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;
  }
}

/* Utility */
.ms-muted{color:#6e7d93;}
.ms-small{font-size:.95rem;}
.ms-stack{display:grid; gap:16px;}

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


/* Cartes flexibles — espacement des lignes desktop */
@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){
  body{font-size:15px;}
  .header-top{
    grid-template-columns:minmax(150px, 220px) minmax(120px, 1fr) auto;
    gap:12px;
    padding:14px 0;
  }
  .custom-logo{max-height:84px;}
  .header-contact{gap:12px; font-size:.92rem;}
  .primary-menu{gap:12px;}
  .primary-menu > li > a{font-size:.95rem;}
  .ms-front-highlight{bottom:24px;}
  .ms-highlight-card{grid-template-columns:148px 1fr;}
  .ms-carousel__slide{
    min-width:calc((100% - 24px) / 2);
    max-width:calc((100% - 24px) / 2);
    flex-basis:calc((100% - 24px) / 2);
  }
  .ms-kiosque-social{
    grid-template-columns:1fr;
  }
  .ms-social-panel{
    min-height:unset;
  }
  .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;
  }
  .ms-demarches-grid{
    grid-template-columns:1fr;
  }
  .ms-elus-hero{
    grid-template-columns:1fr;
  }
  .ms-elus-mayor{
    grid-template-columns:180px minmax(0,1fr);
  }
  .ms-elus-actions{
    justify-items:start;
    grid-auto-flow:column;
    justify-content:start;
  }
  .ms-elus-grid{grid-template-columns:repeat(2, minmax(0,1fr));}
  .ms-annuaire-grid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }
  .ms-pdf-item{
    grid-template-columns:180px 1fr;
  }
}

@media (max-width: 820px){
  body.admin-bar .site-header{top:46px;}
  .menu-toggle{display:inline-flex;}
  .nav-container{justify-content:flex-end;}
  .primary-navigation{
    position:absolute;
    top:calc(100% + 8px);
    right:0;
    left:0;
    display:none;
  }
  .primary-navigation.is-open{display:block;}
  .primary-navigation .menu-primary-container{
    background:#fff;
    border-radius:0 0 24px 24px;
    box-shadow:var(--ms-shadow);
    overflow:hidden;
  }
  .primary-menu{
    display:block;
    padding:12px;
    min-height:0;
  }
  .primary-menu > li > a{
    min-height:48px;
    color:var(--ms-text-strong);
    padding:0 14px;
    border-radius:14px;
  }
  .primary-menu > li > a::after{
    display:none;
  }
  .primary-menu > li:hover > a,
  .primary-menu > li.current-menu-item > a,
  .primary-menu > li.current-menu-ancestor > a,
  .primary-menu > li:focus-within > a{
    background:linear-gradient(180deg, rgba(228,238,202,.92) 0%, rgba(214,228,174,.92) 100%);
    color:var(--ms-green-dark);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.45);
  }
  .primary-menu .sub-menu{
    position:static;
    opacity:1;
    pointer-events:auto;
    transform:none;
    box-shadow:none;
    padding:4px 0 8px 14px;
    background:transparent;
  }
  .primary-menu .sub-menu a{
    padding:8px 10px;
  }
  .header-top{
    grid-template-columns:auto minmax(110px, 1fr) auto;
  }
  .header-contact a span.ms-contact-label{
    display:none;
  }
  .search-field{
    padding:14px 62px 14px 16px;
    min-height:48px;
  }
  .search-submit{
    width:40px;
    min-width:40px;
    height:40px;
  }
  .ms-highlight-card{
    grid-template-columns:1fr;
    padding:24px;
  }
  .ms-highlight-date{
    min-height:140px;
  }
  .ms-home-shortcuts__grid{
    grid-template-columns:repeat(3, minmax(0,1fr));
  }
  .ms-kiosque-stage{
    min-height:520px;
    padding-inline:60px;
  }
  .ms-kiosque-cover.is-prev{
    transform:translate(calc(-50% - 160px), -53%) scale(.80);
  }
  .ms-kiosque-cover.is-next{
    transform:translate(calc(-50% + 160px), -53%) scale(.80);
  }
  .ms-social-tabs{
    flex-wrap:wrap;
  }
  .ms-social-vertical{
    position:static;
    transform:none;
    grid-auto-flow:column;
    justify-content:center;
    padding-bottom:20px;
  }
}

@media (max-width: 640px){
  :root{
    --ms-container:min(100% - 22px, 100%);
    --ms-radius:22px;
  }
  body.admin-bar .site-header{top:0;}
  .header-top{
    grid-template-columns:auto minmax(90px, 1fr) auto;
    gap:8px;
    padding:10px 0;
  }
  .custom-logo{max-height:58px;}
  .header-contact{
    gap:8px;
    font-size:.82rem;
  }
  .header-contact a,
  .header-contact span{
    gap:5px;
  }
  .header-contact__phone strong{
    display:none;
  }
  .header-contact__phone::after{
    content:none;
    display:none;
  }
  .header-contact__email::after{
    content:none;
    display:none;
  }
  .header-contact__email span,
  .header-contact__phone span{
    display:none;
  }
  .search-form{width:100%;}
  .search-field{
    min-height:42px;
    padding:10px 52px 10px 12px;
    font-size:.9rem;
  }
  .search-submit{
    width:34px;
    min-width:34px;
    height:34px;
    right:4px;
  }
  .ms-hero,
  .ms-hero-fallback{
    min-height:470px;
  }
  .ms-front-highlight{
    bottom:20px;
    width:calc(100% - 18px);
  }
  .ms-highlight-card{
    gap:18px;
    border-radius:28px;
  }
  .ms-highlight-date strong{font-size:3.4rem;}
  .ms-home-shortcuts{
    margin-top:-22px;
  }
  .ms-home-shortcuts__grid{
    grid-template-columns:repeat(2, minmax(0,1fr));
    gap:12px 8px;
  }
  .ms-home-shortcut{
    width:180px;
    min-width:180px;
    height:180px;
  }
  .ms-carousel__slide{
    min-width:100%;
    max-width:100%;
    flex-basis:100%;
  }
  .ms-card-body{
    padding:22px 20px 24px;
  }
  .ms-kiosque-stage{
    min-height:430px;
    padding:12px 46px 80px;
  }
  .ms-kiosque-cover{
    width:min(74vw, 280px);
  }
  .ms-kiosque-cover.is-prev,
  .ms-kiosque-cover.is-next{
    opacity:0;
    pointer-events:none;
  }
  .ms-kiosque-cover.is-active{
    transform:translate(-50%,-52%) scale(1);
  }
  .ms-kiosque-cover h3{
    font-size:1.65rem;
  }
  .ms-social-panel{
    border-radius:28px;
  }
  .ms-social-tabs{
    padding:18px 18px 0;
    gap:8px;
  }
  .ms-social-tab{
    width:70px;
    min-width:70px;
    min-height:72px;
  }
  .ms-social-frame{
    margin:0 18px 18px;
    padding:18px;
    min-height:auto;
  }
  .ms-archive-grid,
  .ms-flex-cards,
  .ms-elus-grid,
  .ms-annuaire-grid,
  .ms-annuaire-list{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }
  .ms-annuaire-line{
    grid-template-columns:1fr;
  }
  .ms-annuaire-line__thumb{
    justify-content:flex-start;
  }
  .ms-pdf-item{
    grid-template-columns:1fr;
  }
  .ms-pdf-item__content{
    padding:0 18px 18px;
  }
  .ms-elus-photo{
    width:100%;
    max-width:180px;
  }
  .site-footer__inner{
    flex-direction:column;
  }
}

@media (max-width: 430px){
  .header-top{
    grid-template-columns:auto minmax(72px, 1fr) auto;
  }
  .custom-logo{max-height:48px;}
  .header-contact{font-size:.78rem; gap:6px;}
  .header-contact__facebook{
    width:32px;
    height:32px;
  }
  .ms-home-shortcut{
    width:170px;
    min-width:170px;
    height:170px;
  }
  .ms-home-shortcut span{
    font-size:1rem;
  }
}

/* Header, recherche, accueil et premières surcharges visuelles */
.site-header{
  box-shadow:0 2px 0 rgba(65,111,120,.08);
}
.header-contact,
.header-contact a,
.header-contact span,
.search-submit,
.search-field::placeholder{
  color:#416f78;
}
.search-field{
  color:#416f78;
  border-color:rgba(65,111,120,.22);
}
.search-submit{
  background:#fff;
  border:2px solid #416f78;
  width:46px;
  height:46px;
  min-width:46px;
  min-height:46px;
  aspect-ratio:1/1;
  border-radius:999px;
  flex:0 0 46px;
  transform:translateY(-50%);
}
.search-submit:hover{
  background:#fff;
  color:#416f78;
  transform:translate(-2px,-50%);
}
.header-contact__facebook{
  border-color:#416f78;
}
.primary-menu > li > a{
  padding:0 18px;
  z-index:1;
  isolation:isolate;
}
.primary-menu > li > a::after{
  content:"";
  position:absolute;
  top:8px;
  right:-2px;
  bottom:8px;
  left:-2px;
  border-radius:999px;
  border:2px solid rgba(227,238,205,.42);
  background:linear-gradient(180deg, rgba(179,201,117,.34) 0%, rgba(125,156,43,.18) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 8px 18px rgba(48,66,12,.12);
  opacity:0;
  transform:scale(.94);
  transition:opacity .22s ease, transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
  z-index:-1;
}
.primary-menu > li:hover > a::after,
.primary-menu > li:focus-within > a::after,
.primary-menu > li.current-menu-item > a::after,
.primary-menu > li.current-menu-ancestor > a::after{
  opacity:1;
  transform:scale(1);
  border-color:rgba(239,246,227,.58);
  background:linear-gradient(180deg, rgba(196,216,144,.40) 0%, rgba(128,160,45,.24) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    0 10px 20px rgba(48,66,12,.16);
}
.ms-hero,
.ms-hero-fallback{
  border-radius:0 !important;
}
.ms-front-highlight{
  left:auto;
  right:clamp(18px,4vw,42px);
  bottom:clamp(74px,10vw,102px);
  transform:none;
  width:min(46%, 540px);
  z-index:3;
}
.ms-highlight-card{
  grid-template-columns:108px 1fr;
  gap:18px;
  padding:20px 20px 22px;
  border-radius:26px;
}
.ms-highlight-date{
  min-height:120px;
  border-radius:18px;
}
.ms-highlight-date strong{font-size:2.8rem;}
.ms-highlight-date span{font-size:.94rem;}
.ms-highlight-copy p{
  font-size:1rem;
  line-height:1.55;
}
.ms-highlight-copy .ms-button{
  min-height:44px;
  padding-inline:20px;
}
.ms-home-shortcuts{
  margin-top:-12px;
}
.ms-home-shortcuts__grid{
  align-items:start;
}
.ms-carousel--bullets-only .ms-carousel__controls{
  justify-content:center;
}
.ms-carousel__dots{
  gap:10px;
}
.ms-carousel__dot{
  width:16px;
  height:16px;
  min-width:16px;
  max-width:30px;
  max-height:30px;
  border-radius:50%;
  background:#c9d6d9;
}
.ms-carousel__dot.is-active{
  background:#416f78;
}
.ms-card-media{
  position:relative;
}
.ms-card--event .ms-card-body{
  padding-top:24px;
}
.ms-event-badge{
  position:absolute;
  left:14px;
  bottom:14px;
  min-width:74px;
  min-height:74px;
  border-radius:14px;
  background:rgba(65,111,120,.95);
  box-shadow:0 10px 24px rgba(0,0,0,.18);
  z-index:2;
}
.ms-event-badge strong{font-size:1.35rem;}
.ms-event-badge span{font-size:.82rem;}
.ms-archive-lines{
  display:grid;
  gap:18px;
}
.ms-archive-line{
  background:#fff;
  border-radius:24px;
  overflow:hidden;
  box-shadow:var(--ms-shadow);
}
.ms-archive-line a{
  display:grid;
  grid-template-columns:100px 1fr;
  gap:18px;
  align-items:start;
  padding:18px;
}
.ms-archive-line__media{
  width:100px;
  height:100px;
  position:relative;
  border-radius:18px;
  overflow:hidden;
  background:#eef3f4;
}
.ms-archive-line__media img,
.ms-archive-line__placeholder{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.ms-archive-line__placeholder{background:#eef3f4;}
.ms-event-badge--inline{
  min-width:54px;
  min-height:54px;
  left:8px;
  bottom:8px;
  border-radius:12px;
}
.ms-event-badge--inline strong{font-size:1rem;}
.ms-event-badge--inline span:last-child{display:none;}
.ms-archive-line__body h3{margin-bottom:.3em;}
.ms-archive-line__body p{margin:0;}
.ms-kiosque-stage{
  min-height:560px;
  padding-inline:84px;
}
.ms-kiosque-cover{
  width:min(22vw, 250px);
}
.ms-kiosque-cover:not(.is-active) figcaption{
  opacity:0;
  visibility:hidden;
}
.ms-kiosque-cover.is-prev{
  transform:translate(calc(-50% - 186px), -53%) scale(.78);
}
.ms-kiosque-cover.is-next{
  transform:translate(calc(-50% + 186px), -53%) scale(.78);
}
.ms-kiosque-arrow{
  transform:none !important;
  transition:transform .18s ease, opacity .18s ease, background .18s ease;
}
.ms-kiosque-arrow--prev:hover{transform:translateX(-3px) !important;}
.ms-kiosque-arrow--next:hover{transform:translateX(3px) !important;}
.ms-annuaire-card__thumb,
.ms-annuaire-line__thumb{
  background:#fff;
}
.ms-annuaire-card__thumb{
  min-height:160px;
}
.ms-annuaire-card__thumb img,
.ms-annuaire-line__thumb img,
.ms-annuaire-category__logo img{
  width:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}
.ms-annuaire-card__body{
  padding:0;
}
.ms-annuaire-line__body{
  padding:0;
}
.ms-annuaire-meta{
  gap:0 !important;
}

.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 10px 22px rgba(44,72,91,.10);
}
.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 14px 28px rgba(37,59,99,.08);
  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 18px 34px rgba(37,59,99,.12);
  border-color:rgba(65,111,120,.24);
  text-decoration:none !important;
}
.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-info-block{
  align-items:start;
}
.ms-elus-photo,
.ms-elus-card__thumb{
  width:180px;
  height:220px;
}
.ms-elus-mayor{
  align-items:flex-start;
}
.ms-footer{
  background:linear-gradient(180deg, rgba(65,111,120,.08), rgba(65,111,120,.02) 20%, #fff 20%);
  padding-top:40px;
}
.ms-footer__top{
  background:linear-gradient(135deg, rgba(65,111,120,.95), rgba(96,165,173,.92));
  color:#fff;
  border-radius:28px;
  padding:26px 28px;
  box-shadow:var(--ms-shadow);
  margin-bottom:22px;
}
.ms-footer__title{
  color:#fff;
  margin-bottom:16px;
}
.ms-footer__grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:22px;
}
.ms-footer__col h3{
  color:#fff;
  margin-bottom:.45em;
}
.ms-footer__text p{
  margin:.25em 0;
}
.ms-footer__bottom{
  padding-bottom:14px;
}
.ms-backtotop{
  position:fixed;
  right:18px;
  bottom:18px;
  width:58px;
  height:58px;
  padding:0;
  border:none;
  border-radius:12px;
  background:linear-gradient(135deg, #7bbd46, #67bfd6);
  box-shadow:0 12px 28px rgba(0,0,0,.18);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(8px);
  z-index:120;
}
.ms-backtotop.is-visible{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:none;
}
.ms-backtotop__icon{
  position:relative;
  display:block;
  width:22px;
  height:22px;
  margin:0 auto;
}
.ms-backtotop__icon::before,
.ms-backtotop__icon::after{
  content:"";
  position:absolute;
  top:8px;
  width:16px;
  height:4px;
  background:#111;
  border-radius:999px;
}
.ms-backtotop__icon::before{left:-1px; transform:rotate(-45deg);}
.ms-backtotop__icon::after{right:-1px; transform:rotate(45deg);}

@media (max-width: 1024px){
  .ms-front-highlight{
    width:min(54%, 460px);
    right:20px;
    bottom:64px;
  }
  .ms-highlight-card{
    grid-template-columns:92px 1fr;
    padding:18px;
  }
  .ms-kiosque-cover{
    width:min(26vw, 220px);
  }
  .ms-footer__grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 820px){
  .search-submit{
    width:40px;
    height:40px;
    min-width:40px;
    min-height:40px;
    flex-basis:40px;
  }
  .primary-menu > li > a::after{
    inset:6px 0;
  }
  .ms-front-highlight{
    position:absolute;
    right:16px;
    left:16px;
    width:auto;
    bottom:38px;
  }
  .ms-highlight-card{
    grid-template-columns:1fr;
  }
  .ms-home-shortcuts{
    margin-top:-8px;
  }
  .ms-archive-line a{
    grid-template-columns:100px 1fr;
  }
  .ms-flex-card__band{
    width:86%;
  }
}

@media (max-width: 640px){
  .header-contact{color:#416f78;}
  .search-submit{
    width:34px;
    height:34px;
    min-width:34px;
    min-height:34px;
    flex-basis:34px;
  }
  .ms-front-highlight{
    bottom:20px;
  }
  .ms-highlight-date{
    min-height:92px;
  }
  .ms-home-shortcuts{
    margin-top:-6px;
  }
  .ms-carousel__dot{
    width:14px;
    height:14px;
  }
  .ms-archive-line a,
  .ms-pdf-item{
    grid-template-columns:1fr;
  }
  .ms-archive-line__media{
    width:100px;
    height:100px;
  }
  .ms-event-badge--inline{
    left:8px;
    bottom:8px;
  }
  .ms-kiosque-stage{
    min-height:400px;
    padding:10px 50px 80px;
  }
  .ms-kiosque-cover{
    width:min(66vw, 240px);
  }
  .ms-elus-photo,
  .ms-elus-card__thumb{
    width:100%;
    max-width:180px;
    height:220px;
  }
}


/* Page d’accueil — ajustements du héros, accès rapides, carrousels */
body.home .ms-front-highlight{
  left:auto;
  right:clamp(24px, 4vw, 42px);
  bottom:clamp(96px, 9vw, 122px);
  transform:none;
  width:min(31.5rem, calc(100% - 40px));
  z-index:4;
}
body.home .ms-highlight-card{
  display:grid;
  grid-template-columns:92px minmax(0,1fr);
  align-items:center;
  gap:18px;
  padding:18px 20px;
  border-radius:26px;
}
body.home .ms-highlight-date{
  width:88px;
  min-width:88px;
  min-height:88px;
  aspect-ratio:1 / 1;
  align-self:center;
  justify-self:start;
  padding:10px 8px;
  gap:1px;
  border-radius:18px;
}
body.home .ms-highlight-date strong{
  font-size:2.5rem;
}
body.home .ms-highlight-date span{
  font-size:.88rem;
  line-height:1.05;
}
body.home .ms-highlight-copy{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
}
body.home .ms-highlight-copy .ms-pill{
  margin:0 0 12px;
  align-self:flex-start;
}
body.home .ms-highlight-copy h2,
body.home .ms-highlight-copy h3{
  margin:0 0 .55rem;
  font-size:clamp(1.55rem, 1.65vw, 2rem);
  line-height:1.12;
}
body.home .ms-highlight-copy p{
  margin:0 0 1rem;
  font-size:1rem;
  line-height:1.5;
}
body.home .ms-highlight-copy .ms-button{
  align-self:flex-start;
}
body.home h2.ms-section__title{
  /*font-size: var(--ms-h2) !important;
  line-height: 1.05;
  white-space: nowrap;*/
  font-size: var(--ms-h2) !important;
  line-height: 1.05;
  white-space: nowrap;
  margin-left: 70px;

}
body.home .ms-home-shortcuts{
  position:relative;
  margin-top:-26px;
  padding-bottom:10px;
  z-index:4;
}
body.home .ms-home-shortcuts__grid{
  grid-template-columns:repeat(6, minmax(0,1fr));
  justify-items:center;
  align-items:start;
  column-gap:20px;
  row-gap:20px;
}
body.home .ms-home-shortcut{
  width:172px;
  min-width:172px;
  height:172px;
}
body.home .ms-carousel__controls{
  margin-top:8px;
}
body.home .ms-carousel__dots{
  justify-content:center;
  align-items:center;
  min-height:30px;
  gap:6px;
  row-gap:18px;
}
body.home .ms-carousel__dot{
  width:30px;
  height:30px;
  min-width:30px;
  min-height:30px;
  max-width:30px;
  max-height:30px;
  border-radius:50%;
  background:transparent;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
body.home .ms-carousel__dot::before{
  content:"";
  width:20px;
  height:20px;
  border-radius:50%;
  background:#cfe0e5;
  transition:transform .18s ease, background .18s ease;
}
body.home .ms-carousel__dot.is-active::before{
  background:#5e8b94;
}
body.home .ms-kiosque-stage{
  min-height:600px;
  padding:18px 84px 138px;
}
body.home .ms-kiosque-cover figcaption{
  position:absolute;
  top:calc(100% + 14px);
  left:50%;
  transform:translateX(-50%);
  width:280px;
  margin:0;
  text-align:center;
}
body.home .ms-kiosque-cover h3{
  font-size:1.4rem;
  line-height:1.1;
  margin:0 0 6px;
}
body.home .ms-kiosque-cover p{
  font-size:1rem;
}

@media (max-width: 1024px){
  body.home .ms-front-highlight{
    width:min(27rem, calc(100% - 32px));
    right:20px;
    bottom:80px;
  }
  body.home .ms-home-shortcuts__grid{
    grid-template-columns:repeat(3, minmax(0,1fr));
    column-gap:18px;
    row-gap:40px;
  }
  body.home .ms-home-shortcut{
    width:166px;
    min-width:166px;
    height:166px;
  }
  body.home .ms-kiosque-stage{
    min-height:540px;
    padding:16px 70px 124px;
  }
  body.home .ms-kiosque-cover figcaption{
    width:240px;
  }
}

@media (max-width: 820px){
  body.home .ms-front-highlight{
    position:absolute;
    left:16px;
    right:16px;
    width:auto;
    bottom:56px;
  }
  body.home .ms-highlight-card{
    grid-template-columns:84px minmax(0,1fr);
    gap:16px;
    padding:16px 18px;
  }
  body.home .ms-highlight-date{
    width:84px;
    min-width:84px;
    min-height:84px;
  }
  body.home .ms-home-shortcuts{
    margin-top:-18px;
  }
  body.home .ms-home-shortcuts__grid{
    grid-template-columns:repeat(3, minmax(0,1fr));
    column-gap:14px;
    row-gap:44px;
  }
  body.home .ms-home-shortcut{
    width:154px;
    min-width:154px;
    height:154px;
  }
  body.home .ms-carousel__dots{
    max-width:132px;
    margin-inline:auto;
    row-gap:20px;
  }
  body.home .ms-kiosque-stage{
    min-height:480px;
    padding:16px 58px 116px;
  }
  body.home .ms-kiosque-cover{
    width:min(30vw, 210px);
  }
  body.home .ms-kiosque-cover.is-prev{
    transform:translate(calc(-50% - 120px), -53%) scale(.78);
  }
  body.home .ms-kiosque-cover.is-next{
    transform:translate(calc(-50% + 120px), -53%) scale(.78);
  }
  body.home .ms-kiosque-cover figcaption{
    width:210px;
  }
}

@media (max-width: 640px){
  body.home .ms-front-highlight{
    left:12px;
    right:12px;
    bottom:32px;
  }
  body.home .ms-highlight-card{
    grid-template-columns:78px minmax(0,1fr);
    gap:14px;
    padding:14px 16px;
  }
  body.home .ms-highlight-date{
    width:78px;
    min-width:78px;
    min-height:78px;
    padding:8px 6px;
  }
  body.home .ms-highlight-date strong{
    font-size:2.2rem;
  }
  body.home .ms-highlight-date span{
    font-size:.78rem;
  }
  body.home .ms-highlight-copy .ms-pill{
    margin-bottom:10px;
  }
  body.home .ms-highlight-copy h2,
  body.home .ms-highlight-copy h3{
    font-size:1.35rem;
  }
  body.home h2.ms-section__title,
  body.home .ms-section__title{
    font-size:clamp(2.4rem, 12vw, 3.6rem);
  }
  body.home .ms-home-shortcuts{
    margin-top:-12px;
  }
  body.home .ms-home-shortcuts__grid{
    grid-template-columns:repeat(2, minmax(0,1fr));
    column-gap:14px;
    row-gap:46px;
  }
  body.home .ms-home-shortcut{
    width:148px;
    min-width:148px;
    height:148px;
    padding:20px;
  }
  body.home .ms-home-shortcut::before{
    inset:-10px;
    border-width:14px;
  }
  body.home .ms-home-shortcut::after{
    inset:18px;
  }
  body.home .ms-home-shortcut i{
    font-size:1.6rem;
  }
  body.home .ms-home-shortcut span{
    font-size:1rem;
  }
  body.home .ms-carousel__dots{
    max-width:120px;
    row-gap:22px;
  }
  body.home .ms-kiosque-stage{
    min-height:420px;
    padding:12px 46px 102px;
  }
  body.home .ms-kiosque-cover{
    width:min(64vw, 220px);
  }
  body.home .ms-kiosque-cover figcaption{
    width:200px;
  }
}


/* Page d’accueil — ajustements complémentaires */
body.home .ms-hero-shell{
  position:relative;
}
body.home .ms-front-highlight{
  top:33.333%;
  bottom:auto;
  left:auto;
  right:clamp(24px, 4vw, 42px);
  transform:translateY(-50%);
  width:min(31.5rem, calc(100% - 40px));
  z-index:6;
}
body.home .ms-home-shortcuts{
  position:relative;
  margin-top:clamp(-108px, -7vw, -64px);
  padding-bottom:14px;
  z-index:7;
}
body.home .ms-home-shortcuts .container{
  position:relative;
  z-index:1;
}
body.home .ms-carousel__controls{
  overflow:visible;
}
body.home .ms-carousel__dots{
  display:flex;
  flex-wrap:nowrap;
  justify-content:center;
  align-items:center;
  gap:6px;
  row-gap:0;
  width:fit-content;
  max-width:100%;
  min-height:30px;
  margin-inline:auto;
  white-space:nowrap;
}
body.home .ms-kiosque-cover h3{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:clamp(1rem, 2vw, 1.4rem);
  line-height:1.1;
}

@media (max-width: 1024px){
  body.home .ms-front-highlight{
    top:33.333%;
    right:20px;
    width:min(26rem, calc(100% - 32px));
  }
  body.home .ms-home-shortcuts{
    margin-top:-88px;
  }
  body.home .ms-kiosque-cover h3{
    font-size:clamp(.96rem, 2vw, 1.15rem);
  }
}

@media (max-width: 820px){
  body.home .ms-front-highlight{
    top:33.333%;
    left:16px;
    right:16px;
    width:auto;
    transform:translateY(-50%);
  }
  body.home .ms-home-shortcuts{
    margin-top:-72px;
  }
  body.home .ms-carousel__dots{
    gap:5px;
    padding-inline:8px;
  }
  body.home .ms-kiosque-cover h3{
    font-size:clamp(.92rem, 2.8vw, 1.05rem);
  }
}

@media (max-width: 640px){
  body.home .ms-front-highlight{
    top:33.333%;
    left:12px;
    right:12px;
  }
  body.home .ms-home-shortcuts{
    margin-top:-58px;
  }
  body.home .ms-carousel__dots{
    gap:4px;
    padding-inline:6px;
  }
  body.home .ms-kiosque-cover h3{
    font-size:clamp(.88rem, 3.2vw, 1rem);
  }
}


/* Kiosque — espacement mobile */
@media (max-width: 640px){
  body.home .ms-kiosque-stage{
    min-height: 456px;
    padding-bottom: 122px;
  }
  body.home .ms-kiosque-footer{
    margin-top: /*34px*/50px;
  }
}

@media (max-width: 480px){
  body.home .ms-kiosque-stage{
    /*min-height: 476px;
    padding-bottom: 134px;*/
  min-height:450px;
  padding:18px 84px 138px;
  }
  body.home .ms-kiosque-footer{
    margin-top: 52px;
  }
}


/* Menu principal — état actif, contour et recherche */
.header-nav-wrap{
  background:linear-gradient(90deg, var(--ms-green-dark), var(--ms-green));
}

.header-nav-wrap .nav-container{
  min-height:56px;
}

.header-nav-wrap .primary-menu{
  gap:14px;
}

.header-nav-wrap .primary-menu > li{
  display:flex;
  align-items:center;
}

.header-nav-wrap .primary-menu > li > a{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  margin-block:7px;
  padding:0 18px;
  border-radius:999px;
  color:#fff;
  font-weight:800;
  line-height:1.1;
  isolation:isolate;
  transition:color .2s ease, transform .2s ease;
}

.header-nav-wrap .primary-menu > li > a::after{
  content:none;
}

.header-nav-wrap .primary-menu > li > a::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:999px;
  border:1.5px solid transparent;
  background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
  opacity:0;
  transform:scale(.98);
  transition:opacity .2s ease, transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
  z-index:-1;
}

.header-nav-wrap .primary-menu > li:hover > a::before,
.header-nav-wrap .primary-menu > li:focus-within > a::before,
.header-nav-wrap .primary-menu > li.current-menu-item > a::before,
.header-nav-wrap .primary-menu > li.current-menu-ancestor > a::before,
.header-nav-wrap .primary-menu > li.current_page_item > a::before,
.header-nav-wrap .primary-menu > li.current_page_ancestor > a::before{
  opacity:1;
  transform:scale(1);
  border-color:rgba(238,245,224,.62);
  background:linear-gradient(180deg, rgba(255,255,255,.13) 0%, rgba(255,255,255,.06) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.15),
    0 0 0 1px rgba(92,123,29,.12);
}

.header-nav-wrap .primary-menu > li:hover > a,
.header-nav-wrap .primary-menu > li:focus-within > a,
.header-nav-wrap .primary-menu > li.current-menu-item > a,
.header-nav-wrap .primary-menu > li.current-menu-ancestor > a,
.header-nav-wrap .primary-menu > li.current_page_item > a,
.header-nav-wrap .primary-menu > li.current_page_ancestor > a{
  color:#fff;
}

.header-nav-wrap .primary-menu .sub-menu{
  top:calc(100% + 8px);
}

@media (max-width: 820px){
  .header-nav-wrap .nav-container{
    justify-content:space-between;
    min-height:56px;
  }

  .header-nav-wrap .menu-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:46px;
    min-width:46px;
    height:46px;
    border-radius:12px;
    border:1px solid rgba(255,255,255,.34);
    background:transparent;
    color:#fff;
  }

  .header-nav-wrap .primary-navigation{
    position:absolute;
    top:calc(100% + 8px);
    right:0;
    left:0;
    display:none;
    z-index:30;
  }

  .header-nav-wrap .primary-navigation.is-open{
    display:block;
  }

  .header-nav-wrap .primary-navigation .menu-primary-container{
    background:linear-gradient(90deg, var(--ms-green-dark), var(--ms-green));
    border-radius:0 0 24px 24px;
    box-shadow:var(--ms-shadow);
    overflow:hidden;
  }

  .header-nav-wrap .primary-menu{
    display:block;
    padding:12px;
    min-height:0;
    gap:0;
  }

  .header-nav-wrap .primary-menu > li{
    display:block;
  }

  .header-nav-wrap .primary-menu > li > a{
    display:flex;
    min-height:46px;
    margin:2px 0;
    padding:0 14px;
    border-radius:999px;
    color:#fff;
  }

  .header-nav-wrap .primary-menu > li > a::before{
    inset:0;
    border-color:transparent;
    background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
  }

  .header-nav-wrap .primary-menu > li:hover > a::before,
  .header-nav-wrap .primary-menu > li:focus-within > a::before,
  .header-nav-wrap .primary-menu > li.current-menu-item > a::before,
  .header-nav-wrap .primary-menu > li.current-menu-ancestor > a::before,
  .header-nav-wrap .primary-menu > li.current_page_item > a::before,
  .header-nav-wrap .primary-menu > li.current_page_ancestor > a::before{
    border-color:rgba(238,245,224,.58);
    background:linear-gradient(180deg, rgba(255,255,255,.13) 0%, rgba(255,255,255,.06) 100%);
  }

  .header-nav-wrap .primary-menu .sub-menu{
    position:static;
    opacity:1;
    pointer-events:auto;
    transform:none;
    margin:2px 0 6px;
    padding:4px 0 4px 14px;
    background:transparent;
    box-shadow:none;
    border-radius:0;
  }

  .header-nav-wrap .primary-menu .sub-menu a{
    display:block;
    padding:8px 12px;
    border-radius:14px;
    color:#f7fbf4;
    background:rgba(255,255,255,.05);
  }

  .header-nav-wrap .primary-menu .sub-menu a:hover,
  .header-nav-wrap .primary-menu .sub-menu a:focus{
    background:rgba(255,255,255,.10);
    color:#fff;
  }
}

/* Menu mobile — fond vert et lisibilité */
@media (max-width: 820px){
  .header-nav-wrap .primary-navigation{
    background:linear-gradient(90deg, var(--ms-green-dark), var(--ms-green));
    border-radius:0 0 24px 24px;
    overflow:hidden;
  }

  .header-nav-wrap .primary-navigation .menu-primary-container{
    background:linear-gradient(90deg, var(--ms-green-dark), var(--ms-green));
  }

  .header-nav-wrap .primary-menu{
    background:transparent;
  }

  .header-nav-wrap .primary-menu > li > a{
    color:#fff;
  }

  .header-nav-wrap .primary-menu > li > a::before{
    border-color:transparent;
    background:linear-gradient(180deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,.03) 100%);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
    opacity:1;
    transform:scale(1);
  }

  .header-nav-wrap .primary-menu > li:hover > a::before,
  .header-nav-wrap .primary-menu > li:focus-within > a::before,
  .header-nav-wrap .primary-menu > li.current-menu-item > a::before,
  .header-nav-wrap .primary-menu > li.current-menu-ancestor > a::before,
  .header-nav-wrap .primary-menu > li.current_page_item > a::before,
  .header-nav-wrap .primary-menu > li.current_page_ancestor > a::before{
    border-color:rgba(238,245,224,.62);
    background:linear-gradient(180deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,.07) 100%);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.16),
      0 0 0 1px rgba(92,123,29,.15);
  }

  .header-nav-wrap .primary-menu .sub-menu{
    margin:4px 0 8px;
    padding:4px 0 4px 14px;
    background:transparent;
  }

  .header-nav-wrap .primary-menu .sub-menu a{
    display:block;
    color:#fff;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(238,245,224,.26);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
  }

  .header-nav-wrap .primary-menu .sub-menu a:hover,
  .header-nav-wrap .primary-menu .sub-menu a:focus,
  .header-nav-wrap .primary-menu .sub-menu .current-menu-item > a,
  .header-nav-wrap .primary-menu .sub-menu .current_page_item > a{
    color:#fff;
    background:rgba(255,255,255,.11);
    border-color:rgba(238,245,224,.42);
  }
}


/* Archives et agenda — ajustements de liste */
.ms-card__location{
  margin:.12rem 0 .5rem;
  font-size:.98rem;
  line-height:1.45;
  color:#5d7088;
}
.ms-archive-lines--publication{
  gap:18px;
}
.ms-archive-line--publication .ms-archive-line__media{
  background:#fff;
  border:1px solid rgba(65,111,120,.12);
}
.ms-archive-line--publication .ms-archive-line__media img{
  object-fit:contain;
  background:#fff;
  padding:6px;
}
.ms-archive-line__meta{
  margin:0;
  color:#5d7088;
}
.ms-archive-line__meta--event-date{
  margin-top:.18rem;
  font-weight:700;
  color:var(--ms-heading);
}
.ms-event-single-meta{
  display:grid;
  gap:6px;
  margin:0 0 22px;
  padding:0 0 16px;
  max-width:42rem;
  border-bottom:3px solid var(--ms-heading);
  border-radius:0;
  background:transparent;
  color:var(--ms-heading);
}
.ms-event-single-meta p{
  margin:0;
  font-size:1.08rem;
  line-height:1.35;
}
.ms-event-single-meta strong{
  font-weight:800;
}
@media (max-width: 640px){
  .ms-archive-line--publication .ms-archive-line__media{
    width:100px;
    height:100px;
  }
}


@media (max-width: 860px){
  .single-entry__layout{
    grid-template-columns:1fr;
    gap:22px;
  }
  .single-entry__media{
    position:static;
  }
  .single-hero--side{
    aspect-ratio:16/9;
  }
}


/* Footer — mise en page principale */
.ms-footer{
  background:linear-gradient(90deg, var(--ms-green-dark), var(--ms-green));
  padding:32px 0 8px;
  color:#fff;
  border-top:none;
}

.ms-footer__container{
  width:min(1120px, calc(100% - 36px));
  margin-inline:auto;
}

.ms-footer__title{
  margin:0 0 18px;
  color:#fff;
  font-size:clamp(2rem, 2.1vw, 2.5rem);
  text-align:center;
}

.ms-footer__grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:16px;
  align-items:stretch;
}

.ms-footer__card{
  min-height:108px;
  padding:16px 18px;
  border-radius:12px;
  background:linear-gradient(180deg, rgba(255,255,255,.13) 0%, rgba(255,255,255,.07) 100%);
  border:1px solid rgba(238,245,224,.20);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.09);
}

.ms-footer__card h3{
  margin:0 0 8px;
  color:#fff;
  font-size:1rem;
  font-family:var(--ms-font-body);
  font-weight:700;
  line-height:1.2;
}

.ms-footer__text,
.ms-footer__text p,
.ms-footer__text li,
.ms-footer__text a,
.ms-footer__text label,
.ms-footer__text input{
  color:rgba(255,255,255,.92);
  font-size:.95rem;
  line-height:1.45;
}

.ms-footer__text p{
  margin:.18em 0;
}

.ms-footer__text--newsletter{
  min-height:52px;
}

.ms-footer__text input[type="email"],
.ms-footer__text input[type="text"],
.ms-footer__text input[type="search"]{
  width:100%;
  min-height:40px;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.10);
}

.ms-footer__text .wpcf7-submit,
.ms-footer__text button,
.ms-footer__text input[type="submit"]{
  min-height:38px;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid rgba(238,245,224,.30);
  background:linear-gradient(180deg, rgba(255,255,255,.13) 0%, rgba(255,255,255,.06) 100%);
  color:#fff;
}

.ms-footer__bottom{
  display:flex;
  justify-content:center;
  align-items:center;
  padding:22px 0 2px;
}

.ms-footer__menu,
.ms-footer__menu .menu,
.ms-footer__menu-list,
.ms-footer__menu-list--fallback{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:18px;
  flex-wrap:wrap;
  margin:0;
  padding:0;
  list-style:none;
}

.ms-footer__menu a,
.ms-footer__menu .menu a,
.ms-footer__menu-list a{
  color:rgba(255,255,255,.92);
  font-size:.8rem;
  line-height:1.2;
  text-decoration:none;
}

.ms-footer__menu a:hover,
.ms-footer__menu a:focus,
.ms-footer__menu .menu a:hover,
.ms-footer__menu .menu a:focus,
.ms-footer__menu-list a:hover,
.ms-footer__menu-list a:focus{
  text-decoration:underline;
  text-underline-offset:.16em;
}

@media (max-width: 900px){
  .ms-footer__grid{
    grid-template-columns:1fr;
  }

  .ms-footer__card{
    min-height:unset;
  }
}

@media (max-width: 640px){
  .ms-footer{
    padding-top:24px;
  }

  .ms-footer__container{
    width:min(100% - 24px, 100%);
  }

  .ms-footer__title{
      font-size:1.8rem;
  }

  .ms-footer__grid{
    gap:12px;
  }

  .ms-footer__card{
    padding:14px 14px 15px;
    border-radius:12px;
  }

  .ms-footer__bottom{
    padding-top:18px;
  }

  .ms-footer__menu,
  .ms-footer__menu .menu,
  .ms-footer__menu-list,
  .ms-footer__menu-list--fallback{
    gap:12px;
  }

  .ms-footer__menu a,
  .ms-footer__menu .menu a,
  .ms-footer__menu-list a{
    font-size:.76rem;
  }
}


/* Footer — bas de page recentré */
.ms-footer__bottom{
  width:100%;
  text-align:center;
}

.ms-footer__menu{
  width:100%;
}

.ms-footer__menu-list,
.ms-footer__menu-list--fallback{
  width:100%;
  justify-content:center;
  text-align:center;
}

.ms-footer__menu-list a,
.ms-footer__menu-list--fallback a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

@media (max-width: 640px){
  .ms-footer__menu-list,
  .ms-footer__menu-list--fallback{
    row-gap:10px;
    column-gap:14px;
  }
}


/* Template flexible — image, texte et alignements */
.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;
  }
}

/* Template flexible — espacement du titre */
.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;
  }
}


/* Template flexible — espacement des cartes sur lignes multiples */
@media (max-width: 1200px){
  .ms-flex-cards{
    column-gap:24px;
    row-gap:48px;
  }
}


/* Modèles de pages — espacement aligné avec le template flexible */
:is(.page-template-page-templates-template-demarches, .page-template-template-demarches, .page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus{
  padding:0 0 24px;
}

:is(.page-template-page-templates-template-demarches, .page-template-template-demarches) .container.ms-demarches,
:is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus > .container,
:is(.page-template-page-templates-template-mentions-legales, .page-template-template-mentions-legales, .page-template-page-templates-template-credits, .page-template-template-credits, .page-template-page-templates-template-accessibilite, .page-template-template-accessibilite) .site-main > .container{
  padding:24px 0 0 !important;
}

:is(.page-template-page-templates-template-demarches, .page-template-template-demarches, .page-template-page-templates-template-elus, .page-template-template-elus, .page-template-page-templates-template-mentions-legales, .page-template-template-mentions-legales, .page-template-page-templates-template-credits, .page-template-template-credits, .page-template-page-templates-template-accessibilite, .page-template-template-accessibilite) .entry-header{
  padding-top:21px;
  padding-bottom:10px;
}

:is(.page-template-page-templates-template-demarches, .page-template-template-demarches, .page-template-page-templates-template-elus, .page-template-template-elus, .page-template-page-templates-template-mentions-legales, .page-template-template-mentions-legales, .page-template-page-templates-template-credits, .page-template-template-credits, .page-template-page-templates-template-accessibilite, .page-template-template-accessibilite) .entry-header h1{
  margin-top:0;
  margin-bottom:.55em;
}

:is(.page-template-page-templates-template-demarches, .page-template-template-demarches, .page-template-page-templates-template-elus, .page-template-template-elus, .page-template-page-templates-template-mentions-legales, .page-template-template-mentions-legales, .page-template-page-templates-template-credits, .page-template-template-credits, .page-template-page-templates-template-accessibilite, .page-template-template-accessibilite) .entry-content{
  padding-top:12px;
  padding-bottom:20px;
}

@media (max-width:1024px){
  :is(.page-template-page-templates-template-demarches, .page-template-template-demarches, .page-template-page-templates-template-elus, .page-template-template-elus, .page-template-page-templates-template-mentions-legales, .page-template-template-mentions-legales, .page-template-page-templates-template-credits, .page-template-template-credits, .page-template-page-templates-template-accessibilite, .page-template-template-accessibilite) .entry-header{
    padding-top:18px;
  }
}

@media (max-width:640px){
  :is(.page-template-page-templates-template-demarches, .page-template-template-demarches) .container.ms-demarches,
  :is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus > .container,
  :is(.page-template-page-templates-template-mentions-legales, .page-template-template-mentions-legales, .page-template-page-templates-template-credits, .page-template-template-credits, .page-template-page-templates-template-accessibilite, .page-template-template-accessibilite) .site-main > .container{
    padding-top:18px !important;
  }

  :is(.page-template-page-templates-template-demarches, .page-template-template-demarches, .page-template-page-templates-template-elus, .page-template-template-elus, .page-template-page-templates-template-mentions-legales, .page-template-template-mentions-legales, .page-template-page-templates-template-credits, .page-template-template-credits, .page-template-page-templates-template-accessibilite, .page-template-template-accessibilite) .entry-header{
    padding-top:14px;
    padding-bottom:8px;
  }

  :is(.page-template-page-templates-template-demarches, .page-template-template-demarches, .page-template-page-templates-template-elus, .page-template-template-elus, .page-template-page-templates-template-mentions-legales, .page-template-template-mentions-legales, .page-template-page-templates-template-credits, .page-template-template-credits, .page-template-page-templates-template-accessibilite, .page-template-template-accessibilite) .entry-content{
    padding-bottom:16px;
  }

  :is(.page-template-page-templates-template-demarches, .page-template-template-demarches, .page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus{
    padding-bottom:18px;
  }
}


/* Bloc déplacé dans assets/css/pdf-publications.css : Archives PDF — filtres */

/* Largeur globale — harmonisation avec le template flexible */
.entry-content,
.ms-richtext,
.ms-legal,
.ms-credits,
.ms-accessibility,
.search-results .entry-summary,
.ms-flex-intro{
  width:100%;
  max-width:none !important;
  min-width:0;
}

:is(.entry-content, .ms-richtext, .ms-legal, .ms-credits, .ms-accessibility) > :first-child{
  margin-top:0;
}

:is(.entry-content, .ms-richtext, .ms-legal, .ms-credits, .ms-accessibility) > :last-child{
  margin-bottom:0;
}

/* Neutralise les contraintes de largeur que WordPress peut réinjecter sur certains blocs */
:is(.entry-content, .ms-richtext, .ms-legal, .ms-credits, .ms-accessibility)
:is(.is-layout-constrained, .wp-block-post-content, [class*="__inner-container"]){
  max-width:none !important;
  width:100%;
}

/* ===== Aucun soulignement par défaut sur tous les liens ===== */
body a,
body a:hover,
body a:focus,
body a:active,
body a:visited{
  text-decoration:none !important;
  text-underline-offset:0 !important;
  text-decoration-thickness:initial !important;
}

/* ===== Soulignement uniquement si l’accessibilité l’active ===== */
html.ms-a11y-underline-links body a,
html.ms-a11y-underline-links body a:hover,
html.ms-a11y-underline-links body a:focus,
html.ms-a11y-underline-links body a:active,
html.ms-a11y-underline-links body a:visited{
  text-decoration:underline !important;
  text-underline-offset:.18em !important;
  text-decoration-thickness:2px !important;
}

/* Navigation bas de page — parent / suivant */
.ms-page-paginage-nav{
  margin:42px 0 0;
  padding:22px 0 0;
  border-top:1px solid rgba(65,111,120,.16);
}

.ms-page-paginage-nav__inner{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:18px;
  align-items:stretch;
}

.ms-page-paginage-nav__link{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:62px;
  padding:14px 20px;
  border:1px solid rgba(65,111,120,.16);
  border-radius:999px;
  background:linear-gradient(180deg, #ffffff 0%, #f7faf8 100%);
  color:var(--ms-heading);
  text-decoration:none !important;
  box-shadow:0 8px 24px rgba(38,60,74,.07);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}

.ms-page-paginage-nav__link:hover,
.ms-page-paginage-nav__link:focus{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(38,60,74,.12);
  border-color:rgba(65,111,120,.28);
  color:var(--ms-heading);
  text-decoration:none !important;
}

.ms-page-paginage-nav__link--parent{
  justify-content:flex-start;
}

.ms-page-paginage-nav__link--next{
  justify-content:flex-end;
  text-align:right;
}

.ms-page-paginage-nav__title{
  display:block;
  font-size:1rem;
  line-height:1.35;
  font-weight:700;
  color:var(--ms-heading);
}

.ms-page-paginage-nav__icon{
  width:18px;
  height:18px;
  flex:0 0 18px;
  color:var(--ms-green);
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.ms-page-paginage-nav__icon svg{
  display:block;
  width:18px;
  height:18px;
}

@media (max-width: 900px){
  .ms-page-paginage-nav__inner{
    grid-template-columns:1fr;
  }

  .ms-page-paginage-nav__link,
  .ms-page-paginage-nav__link--next{
    justify-content:flex-start;
    text-align:left;
  }
}

/* Annuaire — réglages finaux */


/* Lignes */
.ms-annuaire-line{
  gap:0 !important;
}

.ms-annuaire-line__thumb{
  background:#fff;
  width:96px;
  min-width:96px;
  max-width:96px;
  height:96px;
  min-height:96px;
  max-height:96px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.ms-annuaire-line__thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
}

.ms-annuaire-line__body{
  padding:0;
  margin-left:1rem !important;
}

.ms-annuaire-line__body h3{
  font-size:1.02rem;
  line-height:1.2;
  margin-bottom:.35em;
}

.ms-annuaire-meta{
  gap:0 !important;
}

/* Cartouches */
.ms-annuaire-grid{
  display:grid !important;
  grid-template-columns:repeat(3, 400px) !important;
  justify-content:start !important;
  gap:22px !important;
}

.ms-annuaire-card{
  display:grid;
  grid-template-columns:96px minmax(0, 1fr);
  column-gap:16px;
  row-gap:0;
  align-items:start;
  width:400px !important;
  min-width:400px !important;
  max-width:400px !important;
  padding:14px 18px 14px 14px;
  background:#fff;
  border-radius:30px;
  overflow:hidden;
  box-sizing:border-box !important;
}

.ms-annuaire-card__thumb{
  width:96px;
  min-width:96px;
  max-width:96px;
  height:96px;
  min-height:96px;
  max-height:96px;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  align-self:start;
  padding:0;
  margin:0;
  background:#fff;
  overflow:hidden;
  border-radius:18px;
}

.ms-annuaire-card__thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
}

.ms-annuaire-card__body{
  align-self:start;
  min-width:0;
  padding:0;
  margin:0;
  font-size:1.08rem;
  line-height:1.45;
}

.ms-annuaire-card__body h3{
  font-size:1.08rem;
  line-height:1.2;
  margin:0 0 6px 0;
}

/* 2 colonnes tablette */
@media (max-width: 1291px){
  .ms-annuaire-grid{
    grid-template-columns:repeat(2, 400px) !important;
  }
}

/* 1 colonne mobile */
@media (max-width: 991px){
  .ms-annuaire-grid{
    grid-template-columns:1fr !important;
  }

  .ms-annuaire-card{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
  }
}

/* =========================================================
   MS - Liens visibles et accessibles dans les contenus
   Ajout isolé : ne modifie pas les menus, boutons, cartes, footer,
   module accessibilité, pagination, annuaire ou composants déjà stylés.
   ========================================================= */


:is(.entry-content, .ms-flex-main, .ms-richtext, .ms-demarche-content, .ms-legal, .ms-credits, .ms-accessibility) a:not(.wp-block-button__link):not(.wp-element-button):not(.ms-flex-cta):not(.ms-page-paginage-nav__link):not(.ms-pdf-item__link):not(.ms-annuaire-card):not(.ms-annuaire-card__thumb):not([class*="menu"]):not([class*="button"]):not(:has(img)){
  color:var(--ms-visible-link);
  font-weight:700;
  text-decoration:none !important;
  background:linear-gradient(to top, var(--ms-visible-link-bg) 42%, transparent 42%);
  border-radius:3px;
  padding:0 .08em;
  transition:background-color .2s ease, color .2s ease, box-shadow .2s ease, outline-color .2s ease;
}

:is(.entry-content, .ms-flex-main, .ms-richtext, .ms-demarche-content, .ms-legal, .ms-credits, .ms-accessibility) a:not(.wp-block-button__link):not(.wp-element-button):not(.ms-flex-cta):not(.ms-page-paginage-nav__link):not(.ms-pdf-item__link):not(.ms-annuaire-card):not(.ms-annuaire-card__thumb):not([class*="menu"]):not([class*="button"]):not(:has(img)):hover{
  color:var(--ms-visible-link-dark);
  background:var(--ms-visible-link-bg-hover);
  text-decoration:none !important;
}

/* Focus clavier : volontairement très visible pour le RGAA */
:is(.entry-content, .ms-flex-main, .ms-richtext, .ms-demarche-content, .ms-legal, .ms-credits, .ms-accessibility) a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible,
.wp-element-button:focus-visible,
input[type="submit"]: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);
}

/* Liens externes : indication discrète de sortie du site */
: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;
}

/* Liens PDF simples insérés dans un contenu éditorial */
: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;
}

/* Liens courriel dans les textes : icône enveloppe harmonisée */
:is(.entry-content, .ms-flex-main, .ms-richtext, .ms-demarche-content) a[href^="mailto:"]:not(:has(img))::before{
  content:"\f0e0\00A0";
  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;
}

/* Téléphone : icône uniquement sur les liens validés par le thème
   (.ms-phone-link), afin d’éviter les faux positifs sur les prix,
   budgets, années, codes postaux ou autres nombres.
   La variation FE0E et font-variant-emoji forcent l’affichage texte,
   y compris sur tablette et mobile. */
:is(.entry-content, .ms-flex-main, .ms-richtext, .ms-demarche-content) a.ms-phone-link[href^="tel:"]:not(:has(img))::before{
  content:"\260E\FE0E\00A0";
  font-family:Arial, Helvetica, sans-serif !important;
  font-variant-emoji:text;
  font-style:normal;
  font-weight:800;
  line-height:1;
  color:#416f78;
}
/* Annuaire : téléphone et courriel possèdent déjà leurs icônes Font Awesome
   dans le shortcode. On neutralise les icônes automatiques du thème. */
.ms-annuaire-meta a[href^="tel:"]:not(:has(img))::before,
.ms-annuaire-meta a[href^="mailto:"]:not(:has(img))::before{
  content:none !important;
  display:none !important;
}


/* Classes optionnelles utilisables à la main dans l’éditeur */
a.ms-link-pill{
  display:inline;
  color:var(--ms-visible-link-dark) !important;
  background:#e9f3f4 !important;
  padding:.08em .42em !important;
  border-radius:999px !important;
  font-weight:700;
  text-decoration:none !important;
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
}

a.ms-link-arrow::after{
  content:" ›";
  font-weight:900;
}

/* Le mode accessibilité déjà présent dans le thème garde la priorité */
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;
}

/* Démarches — ancres dans les accordéons */
.ms-demarche-content [id]{
  scroll-margin-top:240px;
}

/* =========================================================
   ACCESSIBILITÉ — SOCLE GLOBAL RGAA AJOUTÉ
   Complément non destructif : liens, focus, cartes, boutons.
   ========================================================= */


a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible{
  outline:3px solid var(--ms-a11y-focus) !important;
  outline-offset:3px !important;
  box-shadow:0 0 0 4px rgba(65,111,120,.22) !important;
}

button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.wp-block-button__link,
.wp-element-button,
.ms-flex-cta,
.ms-premium-button,
.ms-annuaire-submit,
.ms-filter-panel__toggle{
  min-height:44px;
  min-width:44px;
}

.wp-block-button__link,
.wp-element-button{
  background:#416f78;
  color:#fff !important;
  border:1px solid rgba(65,111,120,.25);
  border-radius:999px;
  font-weight:700;
  text-decoration:none !important;
  transition:transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.wp-block-button__link:hover,
.wp-block-button__link:focus-visible,
.wp-element-button:hover,
.wp-element-button:focus-visible{
  background:#355f67;
  color:#fff !important;
  text-decoration:none !important;
  box-shadow:0 6px 18px rgba(0,0,0,.16);
  transform:translateY(-1px);
}

.ms-flex-card,
.ms-annuaire-card,
.ms-publication-card,
.ms-elu-card,
.ms-pdf-document-card,
.ms-pdf-item{
  position:relative;
}

.ms-flex-card:focus-within,
.ms-annuaire-card:focus-within,
.ms-publication-card:focus-within,
.ms-elu-card:focus-within,
.ms-pdf-document-card:focus-within,
.ms-pdf-item:focus-within{
  outline:3px solid var(--ms-a11y-focus) !important;
  outline-offset:4px;
  border-radius:14px;
}

.ms-flex-card a,
.ms-annuaire-card a,
.ms-publication-card a,
.ms-elu-card a,
.ms-pdf-document-card a,
.ms-pdf-item a{
  text-decoration:none;
}

.ms-demarche-item summary:hover,
.ms-demarche-item summary:focus-visible{
  box-shadow:inset 0 0 0 2px #416f78;
}

.sr-only{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}

.sr-only:focus{
  position:static !important;
  width:auto !important;
  height:auto !important;
  margin:0 !important;
  padding:.75rem 1rem !important;
  clip:auto !important;
  white-space:normal !important;
  background:#fff;
  color:#1f1f1f;
  z-index:99999;
}

.skip-link:focus,
.skip-link:focus-visible{
  top:0;
  left:1rem;
  outline:3px solid var(--ms-a11y-focus) !important;
  outline-offset:3px !important;
}

@media (max-width:640px){
  .wp-block-buttons{
    flex-direction:column;
    align-items:stretch;
  }

  .wp-block-button,
  .wp-block-button__link,
  .wp-element-button{
    width:100%;
    text-align:center;
  }
}

/* Bloc déplacé dans assets/css/pdf-publications.css : Archives PDF et Publications — rendu final consolidé */

/* Annuaire — titre de catégorie H3 */
body .ms-annuaire-category__header > h3{
  margin:0 !important;
  color:var(--ms-heading) !important;
  font-family:var(--ms-font-heading) !important;
  font-size:var(--ms-h3) !important;
  line-height:1.12 !important;
  font-weight:700 !important;
}

#marche,
#food-trucks,
#commerce-services,
#annuaire-sante,
#bus-pmi,
#oxyjeunes{
  scroll-margin-top:240px;
}

/* Archives — pagination et choix du nombre d’éléments */
.ms-archive-toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  margin:0 0 22px;
  padding:10px 0;
}

.ms-archive-toolbar__label{
  font-size:clamp(.95rem,1vw,1.05rem);
  font-weight:700;
  color:#416F78;
}

.ms-archive-toolbar__select{
  min-width:86px;
  padding:8px 34px 8px 12px;
  border:1px solid rgba(65,111,120,.35);
  border-radius:999px;
  background:#fff;
  color:#416F78;
  font-size:1rem;
  font-weight:700;
  line-height:1.2;
  cursor:pointer;
}

.ms-archive-toolbar__button{
  padding:8px 16px;
  border:0;
  border-radius:999px;
  background:#416F78;
  color:#fff;
  font-weight:700;
  cursor:pointer;
}

.ms-archive-pagination{
  margin:34px 0 10px;
}

.ms-archive-pagination ul{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
  margin:0;
  padding:0;
  list-style:none;
}

.ms-archive-pagination li{
  margin:0;
  padding:0;
}

.ms-archive-pagination .page-numbers{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  height:38px;
  padding:0 12px;
  border:1px solid rgba(65,111,120,.35);
  border-radius:999px;
  background:#fff;
  color:#416F78;
  text-decoration:none;
  font-weight:700;
  line-height:1;
}

.ms-archive-pagination .page-numbers.current{
  background:#416F78;
  border-color:#416F78;
  color:#fff;
}

.ms-archive-pagination a.page-numbers:is(:hover, :focus-visible){
  background:rgba(65,111,120,.08);
  border-color:#416F78;
  outline:none;
}

@media (max-width:640px){
  .ms-archive-toolbar{
    justify-content:flex-start;
    flex-wrap:wrap;
  }

  .ms-archive-pagination .page-numbers{
    min-width:34px;
    height:34px;
    padding:0 10px;
    font-size:.95rem;
  }
}

/* Template flexible — texte sur photo héros */
.ms-flex-main--photo-hero{
  gap:32px;
}
.ms-flex-hero-photo{
  position:relative;
  overflow:hidden;
  border-radius:28px;
  box-shadow:0 18px 45px rgba(0,0,0,.12);
  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;
  }
}

/* =========================================================
   CORRECTIF CONTACT / SIGNALER UN PROBLÈME
   → garder uniquement le cadre intérieur
   → supprimer le point décoratif en haut à droite
   À placer en fin de style.css
   ========================================================= */

/* 1) On neutralise complètement le wrapper extérieur */
:is(.entry-content, .ms-richtext, .ms-flex-main__copy, .ms-flex-intro) .fluentform{
  margin:clamp(24px, 4vw, 44px) 0;
  padding:0 !important;
  background:transparent !important;
  border:none !important;
  border-radius:0 !important;
  box-shadow:none !important;
  position:relative;
}

/* 2) On supprime tous les éléments décoratifs éventuels du wrapper */
:is(.entry-content, .ms-richtext, .ms-flex-main__copy, .ms-flex-intro) .fluentform::before,
:is(.entry-content, .ms-richtext, .ms-flex-main__copy, .ms-flex-intro) .fluentform::after{
  content:none !important;
  display:none !important;
}

/* 3) On applique le style uniquement au vrai formulaire intérieur */
:is(.entry-content, .ms-richtext, .ms-flex-main__copy, .ms-flex-intro) .fluentform .frm-fluent-form{
  position:relative;
  margin:0;
  padding:clamp(24px, 4vw, 42px);
  background:linear-gradient(135deg, #ffffff 0%, #f7f8f6 100%);
  border:1px solid rgba(65,111,120,.18);
  border-left:7px solid var(--ms-green, #799a2b);
  border-radius:32px;
  box-shadow:0 22px 52px rgba(28,44,72,.11);
}

/* 4) On supprime aussi le point décoratif éventuel sur le formulaire intérieur */
:is(.entry-content, .ms-richtext, .ms-flex-main__copy, .ms-flex-intro) .fluentform .frm-fluent-form::before,
:is(.entry-content, .ms-richtext, .ms-flex-main__copy, .ms-flex-intro) .fluentform .frm-fluent-form::after{
  content:none !important;
  display:none !important;
}

/* 5) Responsive */
@media (max-width: 780px){
  :is(.entry-content, .ms-richtext, .ms-flex-main__copy, .ms-flex-intro) .fluentform .frm-fluent-form{
    padding:22px 18px;
    border-radius:24px;
    border-left-width:5px;
  }
}

@media (max-width: 520px){
  :is(.entry-content, .ms-richtext, .ms-flex-main__copy, .ms-flex-intro) .fluentform .frm-fluent-form{
    padding:20px 14px;
    border-radius:22px;
  }
}

/* =========================================================
   COMPLIANZ — LIEN ET ONGLET COOKIES
   Accès de gestion du consentement harmonisé avec le thème.
   ========================================================= */

.ms-footer-cookie-link{
  color:#416F78;
  font-weight:700;
  text-decoration:underline;
  text-underline-offset:.18em;
}

.ms-footer-cookie-link:hover,
.ms-footer-cookie-link:focus-visible{
  color:#2f565e;
}

.cmplz-manage-consent{
  left:auto !important;
  right:16px !important;
  bottom:0 !important;
  background:#416F78 !important;
  color:#fff !important;
  border-radius:18px 18px 0 0 !important;
  padding:8px 14px !important;
  font-size:.82rem !important;
  font-weight:700 !important;
  box-shadow:0 -8px 22px rgba(0,0,0,.18) !important;
  opacity:.72;
  z-index:9999;
  transform:translateY(calc(100% - 14px));
  transition:transform .22s ease, opacity .22s ease, background .22s ease;
}

.cmplz-manage-consent:hover,
.cmplz-manage-consent:focus,
.cmplz-manage-consent:focus-visible{
  opacity:1;
  background:#2f565e !important;
  transform:translateY(0);
}

@media (max-width:900px){
  .cmplz-manage-consent{
    right:12px !important;
    bottom:0 !important;
    padding:7px 12px !important;
    font-size:.78rem !important;
    transform:translateY(calc(100% - 12px));
  }

  .cmplz-manage-consent:hover,
  .cmplz-manage-consent:focus,
  .cmplz-manage-consent:focus-visible{
    transform:translateY(0);
  }
}

@media (max-width:640px){
  .cmplz-manage-consent{
    right:10px !important;
    bottom:0 !important;
    padding:6px 10px !important;
    font-size:.74rem !important;
    transform:translateY(calc(100% - 10px));
  }

  .cmplz-manage-consent:hover,
  .cmplz-manage-consent:focus,
  .cmplz-manage-consent:focus-visible{
    transform:translateY(0);
  }
}

.cmplz-links.cmplz-documents {
  display: none !important;
}

/* =========================================================
   PAGE DE MAINTENANCE — VERSION MODERNE / PREMIUM
   ========================================================= */

.ms-maintenance-page {
  min-height: 100vh;
  background: #102b31;
  color: #1f2f33;
}

.ms-maintenance {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 3.5vw, 36px) 18px;
  overflow: hidden;
  isolation: isolate;
}

.ms-maintenance__bg,
.ms-maintenance__overlay {
  position: absolute;
  inset: 0;
}

.ms-maintenance__bg {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.015);
  filter: saturate(0.94) contrast(1.03);
}

.ms-maintenance__overlay {
  background:
    linear-gradient(135deg, rgba(7, 30, 36, 0.54) 0%, rgba(25, 65, 72, 0.34) 45%, rgba(9, 30, 36, 0.26) 100%),
    radial-gradient(circle at 52% 6%, rgba(255, 255, 255, 0.16), transparent 30%),
    radial-gradient(circle at 15% 82%, rgba(65, 111, 120, 0.20), transparent 34%);
}

.ms-maintenance__inner {
  position: relative;
  z-index: 2;
  width: min(100%, 790px);
  display: grid;
  gap: 16px;
  justify-items: center;
}

.ms-maintenance__brand {
  padding: 9px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow: 0 16px 40px rgba(5, 25, 30, 0.16);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
}

.ms-maintenance__brand img {
  display: block;
  max-width: min(210px, 56vw);
  max-height: 82px;
  width: auto;
  height: auto;
}

.ms-maintenance__card {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.54));
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  backdrop-filter: blur(12px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 30px;
  box-shadow:
    0 22px 55px rgba(4, 22, 27, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  padding: clamp(22px, 3vw, 32px);
  text-align: center;
}

.ms-maintenance__card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0, rgba(65, 111, 120, 0.36) 50%, transparent 100%) top center / 48% 3px no-repeat,
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.46), transparent 30%);
}

.ms-maintenance__eyebrow {
  position: relative;
  margin: 4px 0 8px;
  color: #416f78;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.ms-maintenance__card h1 {
  position: relative;
  margin: 0 0 12px;
  color: #17383e;
  font-size: clamp(1.9rem, 2.8vw, 2.55rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.ms-maintenance__text {
  position: relative;
  max-width: 610px;
  margin: 0 auto;
  color: #30474b;
  font-size: clamp(0.96rem, 1.12vw, 1.04rem);
  line-height: 1.72;
}

.ms-maintenance__text p:last-child {
  margin-bottom: 0;
}

.ms-maintenance__contacts {
  position: relative;
  margin-top: 20px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(8px) saturate(112%);
  backdrop-filter: blur(8px) saturate(112%);
  text-align: left;
}

.ms-maintenance__contacts h2 {
  margin: 0 0 13px;
  color: #17383e;
  font-size: clamp(1.08rem, 1.45vw, 1.28rem);
  letter-spacing: -0.01em;
}

.ms-maintenance__contacts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ms-maintenance__contact-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #2d4549;
  line-height: 1.52;
  box-shadow: 0 8px 20px rgba(9, 35, 41, 0.06);
}

.ms-maintenance__contact-label {
  display: block;
  margin-bottom: 4px;
  color: #416f78;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.ms-maintenance__contact-item a {
  color: #15363c;
  font-weight: 750;
  text-decoration: none;
}

.ms-maintenance__contact-item a:hover,
.ms-maintenance__contact-item a:focus-visible {
  color: #416f78;
  text-decoration: underline;
}

.ms-maintenance__actions {
  position: relative;
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.ms-maintenance__facebook {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(145deg, #2384ff, #1669df);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.30);
  box-shadow:
    0 12px 24px rgba(24, 119, 242, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  font-size: 1.08rem;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.ms-maintenance__facebook:hover,
.ms-maintenance__facebook:focus-visible {
  color: #fff;
  filter: brightness(1.04);
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow:
    0 16px 30px rgba(24, 119, 242, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

@media (max-width: 760px) {
  .ms-maintenance__inner {
    width: min(100%, 680px);
  }

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

@media (max-width: 640px) {
  .ms-maintenance {
    padding: 16px 12px 22px;
  }

  .ms-maintenance__inner {
    gap: 13px;
  }

  .ms-maintenance__brand {
    padding: 8px 13px;
    border-radius: 17px;
  }

  .ms-maintenance__brand img {
    max-width: min(190px, 62vw);
    max-height: 74px;
  }

  .ms-maintenance__card {
    padding: 20px 14px;
    border-radius: 24px;
  }

  .ms-maintenance__card h1 {
    font-size: clamp(1.85rem, 9vw, 2.3rem);
  }

  .ms-maintenance__contacts {
    padding: 13px;
    border-radius: 18px;
  }

  .ms-maintenance__contact-item {
    padding: 11px 12px;
  }
}

/* =========================================================
   PLAN DU SITE — rendu éditorial en colonnes
   Style strictement limité au template Plan du site.
   ========================================================= */
.ms-sitemap-page{
  padding:clamp(34px, 4.4vw, 58px) 0 clamp(54px, 6vw, 86px);
  background:var(--ms-bg);
}

.ms-sitemap-page .ms-sitemap-container{
  width:var(--ms-container);
  max-width:1280px;
  margin:0 auto;
}

.ms-sitemap-page .ms-sitemap-header{
  margin:0;
}

.ms-sitemap-page .ms-sitemap-nav{
  display:block;
}

.ms-sitemap-page .ms-sitemap-home-row,
.ms-sitemap-page .ms-sitemap-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  column-gap:clamp(44px, 6.4vw, 92px);
}

.ms-sitemap-page .ms-sitemap-home-row{
  row-gap:clamp(38px, 5vw, 58px);
  margin-bottom:clamp(54px, 7vw, 88px);
}

.ms-sitemap-page .ms-sitemap-grid{
  row-gap:clamp(52px, 6vw, 82px);
  align-items:start;
}

.ms-sitemap-page .ms-sitemap-card{
  min-width:0;
  padding:0;
  margin:0;
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
}

.ms-sitemap-page .ms-sitemap-card__head{
  display:block;
  margin:0 0 15px;
  padding:0 0 10px;
  border-bottom:3px solid var(--ms-orange);
}

.ms-sitemap-page .ms-sitemap-card h2{
  margin:0;
  color:var(--ms-heading);
  font-family:inherit;
  font-size:clamp(1.58rem, 2vw, 2.05rem);
  font-weight:700;
  line-height:1.14;
  letter-spacing:-.025em;
}

.ms-sitemap-page .ms-sitemap-card h2 a,
.ms-sitemap-page .ms-sitemap-card h2 span{
  color:inherit;
  text-decoration:none;
}

.ms-sitemap-page .ms-sitemap-card h2 a:hover,
.ms-sitemap-page .ms-sitemap-card h2 a:focus-visible{
  color:var(--ms-visible-link-dark);
  text-decoration:none;
}

.ms-sitemap-page .ms-sitemap-list{
  list-style:none;
  margin:0;
  padding:0;
}

.ms-sitemap-page .ms-sitemap-list li{
  position:relative;
  margin:.46rem 0;
  padding-left:1.75rem;
  color:var(--ms-text);
}

.ms-sitemap-page .ms-sitemap-list li::before{
  content:"➜";
  position:absolute;
  left:0;
  top:.04em;
  width:1.2em;
  height:1.2em;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--ms-heading);
  font-size:.88em;
  font-weight:900;
  line-height:1;
  transform:rotate(-8deg);
  transition:transform .18s ease, color .18s ease;
}

.ms-sitemap-page .ms-sitemap-list li:hover::before,
.ms-sitemap-page .ms-sitemap-list li:focus-within::before{
  color:var(--ms-orange);
  transform:translateX(4px) rotate(-8deg);
}

.ms-sitemap-page .ms-sitemap-list a,
.ms-sitemap-page .ms-sitemap-list span{
  color:var(--ms-text);
  font-size:clamp(1.05rem, 1.24vw, 1.22rem);
  font-weight:500;
  line-height:1.28;
  text-decoration:none;
}

.ms-sitemap-page .ms-sitemap-list a:hover,
.ms-sitemap-page .ms-sitemap-list a:focus-visible{
  color:var(--ms-heading);
  text-decoration:none;
}

.ms-sitemap-page .ms-sitemap-list .ms-sitemap-list{
  margin:.42rem 0 .16rem;
  padding-left:.15rem;
}

.ms-sitemap-page .ms-sitemap-list--depth-1 li,
.ms-sitemap-page .ms-sitemap-list--depth-2 li{
  margin:.34rem 0;
  padding-left:1.55rem;
}

.ms-sitemap-page .ms-sitemap-list--depth-1 li::before,
.ms-sitemap-page .ms-sitemap-list--depth-2 li::before{
  content:"↗";
  top:.09em;
  font-size:.78em;
  color:rgba(65,111,120,.72);
}

.ms-sitemap-page .ms-sitemap-list--depth-1 a,
.ms-sitemap-page .ms-sitemap-list--depth-1 span,
.ms-sitemap-page .ms-sitemap-list--depth-2 a,
.ms-sitemap-page .ms-sitemap-list--depth-2 span{
  font-size:clamp(.96rem, 1.05vw, 1.08rem);
  color:rgba(92,108,132,.96);
}

.ms-sitemap-page .ms-sitemap-card__empty,
.ms-sitemap-page .ms-sitemap-card__note{
  display:none;
}

@media (max-width:1024px){
  .ms-sitemap-page .ms-sitemap-home-row,
  .ms-sitemap-page .ms-sitemap-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    column-gap:clamp(30px, 5vw, 56px);
  }
}

@media (max-width:720px){
  .ms-sitemap-page{
    padding:28px 0 54px;
  }

  .ms-sitemap-page .ms-sitemap-container{
    width:min(100% - 32px, 640px);
  }

  .ms-sitemap-page .ms-sitemap-home-row,
  .ms-sitemap-page .ms-sitemap-grid{
    grid-template-columns:1fr;
    row-gap:36px;
  }

  .ms-sitemap-page .ms-sitemap-home-row{
    margin-bottom:42px;
  }

  .ms-sitemap-page .ms-sitemap-card__head{
    margin-bottom:12px;
    padding-bottom:9px;
    border-bottom-width:2px;
  }

  .ms-sitemap-page .ms-sitemap-card h2{
    font-size:clamp(1.45rem, 7vw, 1.8rem);
  }

  .ms-sitemap-page .ms-sitemap-list li{
    margin:.5rem 0;
  }
}


/* Annuaire — accordéon horaires
   Ajout fonctionnel : conserve les styles existants de l'image, du titre,
   des coordonnées et du texte des horaires.
   Le bouton +/- est ancré dans la zone coordonnées, au niveau de la ligne
   du site internet : il ne suit donc pas l'agrandissement du cadre. */
.ms-annuaire-card--has-hours,
.ms-annuaire-line--has-hours{
  position:relative;
}

.ms-annuaire-hours-control{
  display:flex;
  justify-content:flex-end;
  align-items:flex-start;
  height:0;
  margin:0;
  overflow:visible;
}

.ms-annuaire-hours-toggle{
  position:relative;
  z-index:2;
  flex:0 0 auto;
  width:30px;
  min-width:30px;
  max-width:30px;
  height:30px;
  min-height:30px;
  max-height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:0;
  padding:0;
  border:1px solid rgba(65,111,120,.28);
  border-radius:999px;
  background:#fff;
  color:#416F78;
  font:inherit;
  font-weight:700;
  line-height:1;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(0,0,0,.08);
  transform:translateY(calc(-100% - 8px));
  transition:color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.ms-annuaire-hours-toggle:hover,
.ms-annuaire-hours-toggle:focus-visible{
  color:#2f565e;
  border-color:#416F78;
  box-shadow:0 4px 12px rgba(0,0,0,.08);
  transform:translateY(calc(-100% - 8px));
}

.ms-annuaire-hours[hidden]{
  display:none !important;
}


/* =========================================================
   FRONT PAGE — À LA UNE DE REPLI SANS DÉPLACEMENT
   Cas où aucun événement principal à venir n'est disponible.
   Objectif : conserver le bloc en place, garder sa hauteur minimale
   et empêcher les retours à la ligne sur le libellé et le titre.
   ========================================================= */
body.home .ms-highlight-card--fallback{
  grid-template-columns:minmax(0, 1fr);
  min-height:190px;
}

body.home .ms-highlight-card--fallback .ms-highlight-copy--fallback{
  grid-column:1 / -1;
  min-width:0;
  justify-content:center;
}

body.home .ms-highlight-card--fallback .ms-highlight-fallback-label{
  display:inline-flex;
  align-self:flex-start;
  width:max-content;
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

body.home .ms-highlight-card--fallback .ms-highlight-fallback-title{
  display:block;
  width:100%;
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

body.home .ms-highlight-card--fallback .ms-highlight-fallback-text{
  margin-bottom:0;
}

@media (max-width: 820px){
  body.home .ms-highlight-card--fallback{
    min-height:176px;
  }
}

@media (max-width: 640px){
  body.home .ms-highlight-card--fallback{
    min-height:164px;
  }
}

.ms-numeros-ecoute {
  background: #d8e4f3;
  padding: 24px;
  border-radius: 18px;
}

.ms-numeros-ecoute h3 {
  margin: 0 0 20px 0;
}

.ms-numeros-ecoute-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.ms-numeros-ecoute-col p {
  margin: 0 0 10px 0;
}

.ms-numeros-ecoute-col p:not(:first-child) {
  margin-top: 22px;
}

.ms-numeros-ecoute-col ul {
  margin: 0;
  padding-left: 18px;
}

.ms-numeros-ecoute-col li {
  margin-bottom: 6px;
}

/* Tablette : 2 colonnes */
@media (max-width: 991px) {
  .ms-numeros-ecoute-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile : 1 colonne */
@media (max-width: 640px) {
  .ms-numeros-ecoute {
    padding: 20px;
  }

  .ms-numeros-ecoute-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}
/* =========================================================
   ACCUEIL — WIDGET SMOOTH BALLOON
   Remplace le module réseaux maison par une zone de widget administrable.
   ========================================================= */
.ms-front-widget-box--smooth-balloon {
  min-width: 0;
}

.ms-front-widget--smooth-balloon {
 /* background: #fff;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 16px 34px rgba(30, 53, 73, .10);
  overflow: hidden;*/
  background: none;
  border-radius: 24px;
  padding: 18px;
  /*! box-shadow: 0 16px 34px rgba(30, 53, 73, .10); */
  overflow: hidden;

}

.ms-front-widget--smooth-balloon .widget,
.ms-front-widget--smooth-balloon .ms-front-widget__item {
  /*margin: 0;*/
  margin-left: 60px;
  width: 350px;
  margin-top: 20px;
}

.ms-front-widget--smooth-balloon iframe {
  max-width: 100%;
}

.ms-front-widget-empty {
  background: #d8e4f3;
  border-radius: 18px;
  padding: 18px;
}


@media (max-width: 767px) {

  .ms-flex .wp-block-button__link,

  .ms-flex a.wp-block-button__link,

  .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,

  .wp-block-button {

    width: auto !important;

    display: flex !important;

    justify-content: center !important;

  }

}
/* Correctif module élus : tablette en 2 colonnes, mobile en 1 colonne avec photo + texte */
:is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus-grid,
:is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus-card,
:is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus-card__content,
:is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus-card__content *{
  min-width:0;
  box-sizing:border-box;
}

:is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus-card__content p,
:is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus-card__content a,
:is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus-mayor__content p,
:is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus-mayor__content a{
  max-width:100%;
  overflow-wrap:anywhere;
  word-break:normal;
}

@media (min-width:768px) and (max-width:1024px){
  :is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus-grid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }
}

@media (max-width:767px){
  :is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus-grid{
    grid-template-columns:1fr !important;
    gap:28px;
  }

  :is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus-card{
    grid-template-columns:112px minmax(0,1fr);
    gap:14px;
    align-items:start;
  }

  :is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus-card__thumb{
    width:112px;
    aspect-ratio:180 / 220;
  }

  :is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus-card h3{
    font-size:clamp(1.25rem, 5.8vw, 1.75rem);
    line-height:1.12;
  }

  :is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus-card p{
    font-size:clamp(1rem, 4.8vw, 1.25rem);
    line-height:1.35;
  }
}

@media (max-width:380px){
  :is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus-card{
    grid-template-columns:96px minmax(0,1fr);
    gap:12px;
  }

  :is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus-card__thumb{
    width:96px;
  }
}

/* =========================================================
   Optimisation affichage immédiat des images principales
   20/05/2026
   ========================================================= */
.ms-hero--image{
  background:none !important;
  isolation:isolate;
}

.ms-hero__image{
  position:absolute;
  inset:0;
  z-index:0;
  display:block;
  width:100%;
  height:100% !important;
  max-width:none;
  object-fit:cover;
  object-position:center;
  border-radius:0 !important;
}

.ms-hero--image::before{
  z-index:1;
}


/* =========================================================
   H1 — signature orange robuste, sans ::after ni background
   Une vraie image inline est ajoutée en JS puis placée derrière
   le texte : elle suit la dernière ligne sans recouvrir les lettres.
   ========================================================= */
body:not(.home) :is(.entry-header h1, h1.entry-title, h1.page-title).ms-h1-signature{
  background:none !important;
  background-image:none !important;
  padding-right:0 !important;
  width:auto !important;
  max-width:100%;
  display:block !important;
  overflow:visible;
  isolation:isolate;
}

body:not(.home) :is(.entry-header h1, h1.entry-title, h1.page-title).ms-h1-signature::before,
body:not(.home) :is(.entry-header h1, h1.entry-title, h1.page-title).ms-h1-signature::after{
  content:none !important;
  display:none !important;
}

body:not(.home) :is(.entry-header h1, h1.entry-title, h1.page-title) .ms-h1-text{
  position:relative;
  z-index:2;
  display:inline;
}

body:not(.home) :is(.entry-header h1, h1.entry-title, h1.page-title) .ms-h1-mark{
  position:relative;
  z-index:1;
  display:inline-block;
  width:clamp(36px, 4vw, 62px);
  height:auto;
  margin-left:-0.10em;
  transform:translateY(50%) scale(.5);
  transform-origin:left center;
  vertical-align:baseline;
  pointer-events:none;
  opacity:.7;
}

@media (max-width:640px){
  body:not(.home) :is(.entry-header h1, h1.entry-title, h1.page-title) .ms-h1-mark{
    width:clamp(30px, 10vw, 48px);
    margin-left:-0.08em;
    transform:translateY(50%) scale(.5);
    transform-origin:left center;
  }
}

/* =========================================================
   PAGE 404 PERSONNALISÉE
   ========================================================= */

.ms-404-page{
  background:#fff;
  color:#1f2f33;
  overflow:hidden;
}

.ms-404-container,
.ms-404-hero__inner{
  width:min(1180px, calc(100% - 40px));
  margin:0 auto;
}

.ms-404-hero{
  position:relative;
  padding:44px 0 10px;
  min-height:430px;
}

.ms-404-hero::before{
  content:"";
  position:absolute;
  z-index:0;
  left:0;
  right:38px;
  top:92px;
  height:315px;
  background:#416f78;
  border-radius:0 28px 28px 0;
}

.ms-404-hero::after{
  content:"";
  position:absolute;
  z-index:0;
  top:-74px;
  right:-76px;
  width:280px;
  height:280px;
  border:10px solid rgba(65,111,120,.22);
  border-left-color:transparent;
  border-bottom-color:transparent;
  border-radius:50%;
  pointer-events:none;
}

.ms-404-hero__inner{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(420px, 520px);
  gap:clamp(28px, 5vw, 70px);
  align-items:center;
}

.ms-404-hero__text{
  position:relative;
  z-index:2;
  color:#fff;
  max-width:560px;
  padding-top:58px;
}

.ms-404-hero__text h1{
  margin:0 0 18px;
  color:#fff;
  font-size:clamp(2.2rem, 4vw, 3.25rem);
  line-height:1.05;
  font-weight:800;
}

.ms-404-hero__text p{
  margin:0;
  max-width:560px;
  color:rgba(255,255,255,.94);
  font-size:clamp(1.05rem, 1.8vw, 1.32rem);
  line-height:1.45;
}

.ms-404-hero__media{
  position:relative;
  z-index:3;
  margin:0;
  border-radius:24px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 22px 45px rgba(25,50,55,.18);
}

.ms-404-hero__media img{
  display:block;
  width:100%;
  height:clamp(300px, 31vw, 370px);
  object-fit:cover;
}

.ms-404-content{
  padding:18px 0 70px;
}

.ms-404-container{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:clamp(22px, 4vw, 42px);
  align-items:center;
}

.ms-404-code{
  font-size:clamp(4.8rem, 10vw, 8.5rem);
  line-height:.9;
  font-weight:900;
  color:rgba(65,111,120,.16);
}

.ms-404-actions{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
}

.ms-404-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:0 22px;
  border-radius:999px;
  background:#799a2b;
  color:#fff;
  font-weight:800;
  text-decoration:none;
}

.ms-404-btn:hover{
  background:#678522;
  color:#fff;
}

.ms-404-hero__media--empty{
  min-height:clamp(300px, 31vw, 370px);
}

.ms-404-hero__placeholder{
  width:100%;
  height:clamp(300px, 31vw, 370px);
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.34), transparent 38%),
    linear-gradient(135deg, rgba(65,111,120,.18), rgba(16,40,92,.08));
}

@media (max-width: 980px){
  .ms-404-hero{
    padding-top:24px;
    min-height:auto;
  }

  .ms-404-hero::before{
    right:0;
    top:0;
    height:100%;
    border-radius:0;
  }

  .ms-404-hero__inner{
    grid-template-columns:1fr;
    padding:36px 0;
  }

  .ms-404-hero__text{
    padding-top:0;
  }

  .ms-404-container{
    grid-template-columns:1fr;
    text-align:center;
  }

  .ms-404-actions{
    justify-content:center;
  }

  .ms-404-hero__media--empty,
  .ms-404-hero__placeholder{
    min-height:clamp(220px, 48vw, 330px);
    height:clamp(220px, 48vw, 330px);
  }
}
