/* Base */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.5;
}
a{ color: var(--c-primary); }
a:hover{ color: var(--c-secondary); }

.container{ max-width:1100px; margin:0 auto; padding: 1rem; }
[id]{ scroll-margin-top: calc(var(--header-h) + 12px); }

/* Header */
.site-header{
  position: sticky;
  top: 0;
  z-index: 30;
  background: #E3A35B;
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.header-inner{
  max-width: 1100px;
  margin: 0 auto;
  #padding: .55rem 1rem;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  position: relative;
}
.brand{
  display:flex;
  align-items:center;
  gap:.75rem;
  text-decoration:none;
  color: var(--c-text);
}
.brand-logo{ height: 106px; width:auto; display:block; }
.brand-title{ font-weight: 900; letter-spacing: .2px; }

/* Nav */
.nav-toggle{
  display:none;
  border: 1px solid rgba(0,0,0,.14);
  background: var(--c-surface);
  border-radius: 12px;
  padding: .55rem .75rem;
  font-weight: 900;
  cursor:pointer;
}
.site-nav{
  display:flex;
  gap: .55rem;
  flex-wrap: wrap;
  justify-content:flex-end;
}
.nav-link{
  text-decoration:none;
  padding: .45rem .7rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: .95rem;
}
.nav-link:hover{ background: var(--c-surface); }

/* Hero */
.home-hero img{
  width: 100%;
  height: min(52vh, 520px);
  object-fit: cover;
  object-position: 50% 40%;
  display:block;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.home-intro{
  padding: 1.2rem 0 0;
}
.kicker{
  font-weight: 900;
  color: var(--c-primary);
  text-transform: uppercase;
  letter-spacing: .8px;
  font-size: .85rem;
}
h1{ margin:.35rem 0 .35rem; font-size: clamp(1.6rem, 3vw, 2.4rem); }
.lead{ margin: 0 0 1rem; max-width: 70ch; font-size: 1.05rem; opacity:.95; }

.btn-row{ display:flex; gap:.7rem; flex-wrap:wrap; margin: 1rem 0 0; }
.btn{
  display:inline-block;
  text-decoration:none;
  font-weight: 900;
  padding: .8rem 1.05rem;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.12);
}
.btn-primary{ background: #E3A35B; /* accent */; color: var(--c-text); border: 0; }
.btn-primary:hover{ filter: brightness(.96); }
.btn-ghost{ background: transparent; }
.btn-ghost:hover{ background: var(--c-surface); }

/* Cards */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.2rem 0 2rem;
}
.card{
  background: var(--c-surface);
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 18px;
  padding: 1rem;
}
.card h3{ margin:.2rem 0 .25rem; font-weight: 900; }
.card p{ margin:0; opacity:.95; }
.card img{ width: 110px; height:auto; display:block; margin: 0 auto .6rem; }

/* Candidats */
.candidats-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1rem 0 3rem;
}
.cand-card{
  background: var(--c-surface);
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 18px;
  padding: 1rem;
}
.cand-photo{
  width:100%;
  height: 260px;
  object-fit: cover;
  border-radius: 14px;
  background: #ddd;
    object-position: center 20%;
}
.cand-name{ margin:.75rem 0 .2rem; font-weight: 950; font-size: 1.2rem; }
.cand-meta{ margin: 0 0 .6rem; opacity: .85; font-weight: 700; }
.cand-tags{ display:flex; flex-wrap:wrap; gap:.45rem; margin-top:.75rem; }
.tag{
  background: rgba(0,0,0,.07);
  padding: .25rem .55rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: .85rem;
}

/* Floating widget */
/* Floating widget: always fully visible, pinned bottom-right (handles iOS safe areas)
   If you use a fixed footer, set --footer-h to that footer's height in px. */
.floating-widget{
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + var(--footer-h, 0px) + 12px);
  width: min(360px, calc(100vw - 32px));
  z-index: 60;
  max-height: calc(100vh - 32px - env(safe-area-inset-top));
  /* When the widget is collapsed, keep enough height so the toggle button doesn't sit on the footer */
  min-height: 56px;
}
.fw-backdrop{ display:none; }
.fw-minimize{
  position:absolute;
  top: 12px;
  right: 12px;
  z-index: 3;

  width: 44px;
  height: 44px;

  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,.12);
  color: inherit;

  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor:pointer;
}
.fw-minimize:hover{ background: rgba(0,0,0,.22); }
.fw-inner{
  max-height: calc(100vh - 140px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--c-surface);
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);

  /* animation open/close */
  transform-origin: bottom right;
  transition: opacity .18s ease, transform .18s ease, max-height .22s ease;
}
.fw-inner.is-collapsed{
  max-height: 0;
  opacity: 0;
  transform: translateY(10px) scale(.98);
  pointer-events: none;
  border-width: 0;
}
.fw-block{
  padding: 12px 12px 14px;
  border-top: 1px solid rgba(0,0,0,.08);
}
.fw-block:first-child{ border-top: 0; }
.fw-title{
  font-size: .82rem;
  font-weight: 950;
  color: var(--c-primary);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 8px;
}
.fw-cand{ display:flex; gap:10px; align-items:center; }
.fw-avatar{ width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background:#ddd; }
.fw-name{ font-weight: 950; }
.fw-sub{ font-size: .9rem; opacity: .85; font-weight: 700; }
.fw-focus{ display:flex; gap:10px; align-items:flex-start; }
.fw-icon{ width: 44px; height: auto; border-radius: 10px; }
.fw-focus-title{ font-weight: 950; margin-bottom: 4px; }
.fw-snippet{ font-size: .92rem; line-height: 1.25rem; margin: 8px 0 10px; opacity: .95; }
.fw-btn{
  display:inline-block;
  background: #E3A35B; /* accent */;
  color: var(--c-text);
  text-decoration:none;
  font-weight: 950;
  padding: .55rem .8rem;
  border-radius: 12px;
}
.fw-btn:hover{ filter: brightness(.96); }

/* Mobile: widget en mode popup (bottom sheet) */
@media (max-width: 740px){
  .floating-widget{
    left: 16px;
    right: 16px;
    bottom: calc(max(16px, env(safe-area-inset-bottom)) + var(--footer-h, 0px) + 12px);
    width: auto;
    max-height: none;
    pointer-events: auto;
  }

  .fw-backdrop{
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.38);
    z-index: 58;
  }
  .floating-widget.is-open .fw-backdrop{ display:block; }

  /* Contenu en popup (bottom sheet) */
  .fw-inner{
    max-height: min(70vh, calc(100vh - 140px));
  }

}

/* Footer */
.site-footer{
  margin-top: 3rem;
  padding: 10px 0;
  background: #E3A35B; /* accent */; /* orange vif – boutons */
  border-top: 1px solid rgba(0,0,0,.08);
}
.footer-grid{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-title{ font-weight: 950; }
.footer-muted{ opacity: .8; }
.footer-links{ display:flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a{ font-weight: 900; text-decoration:none; }
.footer-links a:hover{ text-decoration:underline; }

/* Mobile */
@media (max-width: 820px){
  .brand-logo{ height: 56px; }
  .brand-title{ display:none; }
  .nav-toggle{ display:inline-block; }
  .site-nav{
    display:none;
    position:absolute;
    right: 1rem;
    top: calc(var(--header-h) - 6px);
    background: var(--c-bg);
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 16px;
    padding: .6rem;
    box-shadow: 0 18px 40px rgba(0,0,0,.18);
    flex-direction: column;
    width: min(260px, calc(100vw - 2rem));
  }
  .site-nav.is-open{ display:flex; }

  /* Header links are white on the orange bar; ensure dropdown menu links stay readable */
  .site-nav .nav-link{ color: var(--c-text); }
}

.fw-event-title{ font-weight: 950; margin-bottom: 4px; }


/* Brand watermark overlay (inner pages only) */
.page-inner::before{
  content:"";
  position: fixed;
  top: calc(var(--header-h) + 12px);
  right: -40px;
  width: min(520px, 72vw);
  height: min(520px, 72vw);
  background-image: url("/assets/img/brand/logo.png");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: .07;
  pointer-events: none;
  z-index: 0;
}
.site-main{ position: relative; z-index: 1; }





/* Emphasized center CONTACT in footer */
.footer-contact{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .6px;
  font-size: .85rem;
  border: 1px solid rgba(18,32,42,.18);
  background: rgba(255,255,255,.65);
  box-shadow: 0 6px 14px rgba(0,0,0,.06);
  color: var(--c-text);
}

.footer-contact:hover{
  background: rgba(255,255,255,.8);
  border-color: rgba(18,32,42,.26);
}

.footer-contact-icon{
  font-size: 1rem;
  line-height: 1;
}

@media (max-width: 740px){
  .footer-left{ display:none; }
  .footer-links{ display:none; }
  .footer-line{ justify-content: center; }
}

:root{
  /* Footer sizing is content-driven; keep this for any layout offsets */
  --footer-safe-area: 80px;

  --footer-h: 0px; /* default; used to offset fixed footer if needed */
}


/* Footer: fixed but auto-height (no clipping) */
.site-footer{
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;           /* important: allow content to define height */
  padding: 10px 0;        /* compact: ~10px around buttons */
  background: #E3A35B;    /* accent */
  border-top: 1px solid rgba(0,0,0,.08);
  z-index: 50;
}

.site-footer .container{
  height: auto;
  padding: 0 .75rem;
}

/* Prevent the fixed footer from covering page content */
body{
  padding-bottom: var(--footer-safe-area);
}

.site-footer a{
  color: var(--c-text);
  text-decoration: none;
  opacity: .85;
}
.site-footer a:hover{ opacity: 1; }

/* Reserve space so content isn't hidden by footer */
.site-main{
  padding-bottom: calc(var(--footer-h) + 8px);
}

/* Move floating widget above footer to avoid overlap */
/* Footer layout: 3-column grid, no overlap */
.footer-line{
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  gap: 1rem;
  height: 100%;
}

.footer-left{
  justify-self: start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .8rem;
  font-weight: 700;
}

.footer-links{
  justify-self: end;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.footer-links a{
  font-size: .8rem;
  font-weight: 700;
}

/* Emphasized center CONTACT */
.footer-contact{
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .22rem .75rem;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: .6px;
  font-size: .85rem;
  line-height: 1;
  border: 1px solid rgba(18,32,42,.18);
  background: rgba(255,255,255,.65);
  box-shadow: 0 6px 14px rgba(0,0,0,.06);
  white-space: nowrap;
  opacity: 1; /* don't fade like other links */
}

.footer-contact:hover{
  background: rgba(255,255,255,.8);
  border-color: rgba(18,32,42,.26);
}

.footer-contact-icon{
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

/* Tablet: hide left text first */
@media (max-width: 980px){
  .footer-left{ display:none; }
  .footer-line{ grid-template-columns: auto auto; }
  .footer-contact{ justify-self: start; }
  .footer-links{ justify-self: end; }
}

/* Mobile: CONTACT only */
@media (max-width: 740px){
  .footer-links{ display:none; }
  .footer-line{ grid-template-columns: 1fr; justify-items: center; }
  .footer-contact{ justify-self: center; }
}



/* Footer pills (Contact / Soutiens) */
.footer-center{
  display:flex;
  align-items: center;
  justify-content: center;
}

.footer-center .footer-pill {
  font-size: 18px;
  font-weight: normal;
}
.footer-center .footer-pill-icon {
  color: #ffcf00;
  font-weight: bold;
}

.footer-pill svg{
  display:block;
  padding-top: 0;
}
.footer-pill{
  height: 40px;
  display: inline-flex;
  margin-left: 10px;
  margin-right: 10px;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .22rem .75rem;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: .55px;
  font-size: .82rem;
  line-height: 1;
  border: 1px solid rgba(18,32,42,.18);
  background: rgba(255,255,255,.55);
  box-shadow: 0 6px 14px rgba(0,0,0,.05);
  white-space: nowrap;
  opacity: 1;
}

.footer-pill:hover{
  background: rgba(255,255,255,.75);
  border-color: rgba(18,32,42,.26);
}

.footer-pill--primary{
  background: rgba(255,255,255,.78);
}

/* Social: fixed-size button, larger icon without changing button size */
.footer-pill.social-link{
  width: 40px;
  min-width: 40px;
  padding: 0;
}
.footer-pill.social-link svg{
  width: 26px;
  height: 26px;
}

.footer-pill-icon{
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

/* Right links spacing (mix of pill + text link) */
.footer-links{
  align-items: center;
}
.footer-links a:not(.footer-pill){
  font-size: .8rem;
  font-weight: 700;
}


/* Contact form multi-select */
.form-checks{
  display: grid;
  gap: .4rem;
  padding: .35rem .45rem;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.55);
}
.check{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
}
.check input{ transform: translateY(1px); }
.form-label{ font-weight: 900; }
.form-help{ font-size: .85rem; opacity: .75; margin-top: -.2rem; margin-bottom: .35rem; }


/* Footer contrast on orange */
.site-footer,
.site-footer a{
  color: #fff;
}
.site-footer a{ opacity: .95; }
.site-footer a:hover{ opacity: 1; }

.footer-pill{
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.45);
  color: #fff;
}
.footer-pill:hover{
  background: rgba(255,255,255,.28);
  border-color: rgba(255,255,255,.65);
}

/* Header contrast on accent */
.site-header,
.site-header a{
  color: #fff;
}

/* Footer contrast on accent */
.site-footer,
.site-footer a{ color:#fff; }
.site-footer a{ opacity:.95; }
.site-footer a:hover{ opacity:1; }

/* Footer social icons */
.footer-social{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-left: .65rem;
}
.footer-social a{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.45);
  color: #fff;
  opacity: 1;
}
.footer-social a:hover{
  background: rgba(255,255,255,.28);
  border-color: rgba(255,255,255,.65);
}
.footer-social svg{ width: 16px; height: 16px; display:block; }


.social-link:hover{ opacity:1; transform:translateY(-1px); }
.social-link svg{ fill:currentColor; }

.lettre-candidature {
  max-width: 800px;
  margin: auto;
  line-height: 1.6;
}

.lettre-candidature ul {
  margin-left: 20px;
}

.lettre-candidature .appel-vote {
  margin-top: 30px;
  text-align: center;
  font-size: 1.2em;
}

/* Base : ajoute une "place" pour l’icône avant chaque H2 */
.programme h2 {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-left: 0; /* on gère l'espacement via le gap */
}

/* L’icône */
.programme h2::before {
  content: "";
  width: 1.6em;
  height: 1.6em;
  flex: 0 0 1.6em;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Responsive : un peu plus petit sur mobile */
@media (max-width: 600px) {
  .programme h2::before {
    width: 1.3em;
    height: 1.3em;
    flex-basis: 1.3em;
  }
}



/* Mobile */
@media (max-width: 600px) {
  .programme h2::before {
    width: 2em;
    height: 2em;
    flex-basis: 2em;
    background-size: 65%;
  }
}

.programme h2#sportif::before    { background-image: url("../../assets/img/icon/sportif.png"); }
.programme h2#routier::before    { background-image: url("../../assets/img/icon/routier.png"); }
.programme h2#batiments::before  { background-image: url("../../assets/img/icon/batiments.png"); }
.programme h2#ecole::before      { background-image: url("../../assets/img/icon/ecole.png"); }
.programme h2#social::before     { background-image: url("../../assets/img/icon/social.png"); }
.programme h2#projets::before    { background-image: url("../../assets/img/icon/projets.png"); }
.programme h2#culture::before    { background-image: url("../../assets/img/icon/culture.png"); }
.programme h2#associatif::before { background-image: url("../../assets/img/icon/associatif.png"); }
.programme h2#finances::before   { background-image: url("../../assets/img/icon/finance.png"); }
.programme h2#securite::before   { background-image: url("../../assets/img/icon/securite.png"); }
.programme h2#cimetiere::before  { background-image: url("../../assets/img/icon/cimetiere.png"); }
.programme h2#ecologie::before   { background-image: url("../../assets/img/icon/ecologie.png"); }
.programme h2#commerces::before   { background-image: url("../../assets/img/icon/commerces.png"); }
.programme h2#communication::before   { background-image: url("../../assets/img/icon/communication.png"); }
.programme h2#sante::before   { background-image: url("../../assets/img/icon/sante.png"); }
.programme h2#urbanisme::before   { background-image: url("../../assets/img/icon/urbanisme.png"); }
/* Base */
.bilan h2, .programme h2 {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* Icône */
.bilan h2::before, .programme h2::before  {
  content: "";
  width: 2.4em;
  height: 2.4em;
  flex: 0 0 2.4em;

  background-repeat: no-repeat;
  background-position: center;
  background-size: 60%;

  border-radius: 50%;
  background-color: #F4E1C0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Mobile */
@media (max-width: 600px) {
  .bilan h2::before {
    width: 2em;
    height: 2;
  }
}