/*
 * Page Élus.
 * Chargé uniquement sur le gabarit MS - Élus.
 */

/* Élus — structure et cartes */
.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;
}

.ms-elus-photo,
.ms-elus-card__thumb{
width:180px;
  height:220px;
}

.ms-elus-mayor{
align-items:flex-start;
}

@media (max-width:640px){
.ms-elus-photo,
.ms-elus-card__thumb{
width:100%;
    max-width:180px;
    height:220px;
}
}

/* Élus — espacements du gabarit */
:is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus{
padding:0 0 24px;
}

:is(.page-template-page-templates-template-elus, .page-template-template-elus) .ms-elus > .container{
padding:24px 0 0 !important;
}

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

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

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

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

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

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

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

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

/* Élus — responsive général */
@media (max-width: 1200px){
.ms-elus-grid{
grid-template-columns:repeat(3, minmax(0,1fr));
}
}

@media (max-width: 1024px){
.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));
}
}

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

.ms-elus-photo{
width:100%;
    max-width:180px;
}
}

/* Élus — correctifs mobile et tablette */
: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;
    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;
}
}
