:root {
  --apc-primary: #1F3B82;
  --apc-secondary: #5B57E3;
  --apc-accent: #E56A2E;
  --apc-sage: #8A9B6E;
  --apc-bg: #F7FAFD;
  --apc-surface: #FFFFFF;
  --apc-border: #D9E4F2;
  --apc-text: #22324A;
}

body {
  background: var(--apc-bg);
  color: var(--apc-text);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--apc-primary);
}

a {
  color: var(--apc-primary);
}

a:hover,
a:focus {
  color: var(--apc-secondary);
}

.button,
button,
input[type="submit"],
.elementor-button {
  border-radius: 10px;
  border: 1px solid var(--apc-primary);
  background: var(--apc-primary);
  color: #fff;
}

.button:hover,
button:hover,
input[type="submit"]:hover,
.elementor-button:hover {
  background: #182f67;
  border-color: #182f67;
}

.elementor .titre-mairie {
  color: var(--apc-primary) !important;
}

.home .elementor .titre-mairie {
  color: #ffffff !important;
}

.elementor .titre-mairie .titre-mairie-highlight,
.elementor .titre-mairie-highlight {
  color: var(--apc-secondary) !important;
}

.elementor .titre-portail {
  color: #fff !important;
  background: rgba(31, 59, 130, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  border-radius: 999px !important;
}

.elementor .hero-buttons a,
.elementor .dcv-focus-btn,
.elementor .service-btn--ghost,
.elementor .btn-secondary,
.elementor .adm-btn-outline,
.elementor .tab-button {
  background: var(--apc-surface) !important;
  color: var(--apc-secondary) !important;
  border: 1px solid var(--apc-secondary) !important;
  box-shadow: none !important;
}

.elementor .hero-buttons a:hover,
.elementor .hero-buttons a.active,
.elementor .hero-buttons a.is-active,
.elementor .dcv-focus-btn:hover,
.elementor .service-btn--ghost:hover,
.elementor .btn-secondary:hover,
.elementor .adm-btn-outline:hover,
.elementor .tab-button:hover,
.elementor .tab-button.active,
.elementor .adm-chip:hover {
  border-color: var(--apc-secondary) !important;
  box-shadow: 0 10px 20px rgba(91, 87, 227, 0.2) !important;
}

.elementor .hero-buttons a.active,
.elementor .hero-buttons a.is-active,
.elementor .adm-chip.is-active,
.elementor .tab-button.active {
  background: var(--apc-secondary) !important;
  color: #fff !important;
}

.elementor .hero-buttons a::before,
.elementor .adm-step-num,
.elementor .adm-step-badge,
.elementor .counter-icon {
  background: var(--apc-accent) !important;
  color: #fff !important;
  border-color: var(--apc-accent) !important;
}

.elementor .service-page,
.elementor .services-hub-transition,
.elementor .dcv-page,
.elementor .adm-page,
.elementor .apcto-elected-page,
.elementor .motmaire-page {
  background: var(--apc-bg) !important;
  color: var(--apc-text) !important;
}

.elementor .service-hero,
.elementor .service-card,
.elementor .service-related,
.elementor .hub-card,
.elementor .priority-card,
.elementor .tender-card,
.elementor .marche-card,
.elementor .detail-item,
.elementor .counter-box,
.elementor .stat-card,
.elementor .apcto-member-card,
.elementor .apcto-member-card--featured,
.elementor .apcto-v-card,
.elementor .document-card,
.elementor .card-header,
.elementor .card-body {
  background: var(--apc-surface) !important;
  border: 1px solid var(--apc-border) !important;
  box-shadow: 0 8px 20px rgba(31, 59, 130, 0.08) !important;
}

.elementor .service-kicker,
.elementor .dcv-label,
.elementor .adm-label,
.elementor .detail-label,
.elementor .label {
  color: var(--apc-primary) !important;
}

.elementor .dcv-label::before,
.elementor .adm-label::before,
.elementor .service-kicker::before {
  background: var(--apc-accent) !important;
  opacity: 1 !important;
}

.elementor .service-page h1,
.elementor .service-page h2,
.elementor .services-hub-transition h1,
.elementor .services-hub-transition h2,
.elementor .dcv-page h1,
.elementor .dcv-page h2,
.elementor .adm-page h1,
.elementor .adm-page h2,
.elementor .apcto-elected-page h1,
.elementor .apcto-elected-page h2,
.elementor .motmaire-page h1,
.elementor .motmaire-page h2,
.elementor .main-title {
  color: var(--apc-primary) !important;
}

.elementor .service-btn,
.elementor .action-btn,
.elementor .btn-primary,
.elementor .dcv-btn,
.elementor .adm-btn-primary,
.elementor .marche-card-button,
.elementor .apcto-cta-btn {
  background: var(--apc-primary) !important;
  color: #fff !important;
  border: 1px solid var(--apc-primary) !important;
}

.elementor .service-btn:hover,
.elementor .action-btn:hover,
.elementor .btn-primary:hover,
.elementor .dcv-btn:hover,
.elementor .adm-btn-primary:hover,
.elementor .marche-card-button:hover,
.elementor .apcto-cta-btn:hover {
  background: #182f67 !important;
  border-color: #182f67 !important;
}

.elementor .adm-badge,
.elementor .status-badge,
.elementor .apcto-role-badge {
  border: 1px solid var(--apc-secondary) !important;
  color: var(--apc-secondary) !important;
  background: #fff !important;
}

.elementor .counter-number,
.elementor .stat-number,
.elementor .tender-value,
.elementor .value {
  color: var(--apc-accent) !important;
}

.elementor .adm-meta-pill,
.elementor .detail-value {
  background: #fff !important;
  border: 1px solid #d8d6ff !important;
  color: var(--apc-secondary) !important;
}

.elementor .adm-faq-item[open] summary,
.elementor .accordion-item.active .accordion-header {
  background: #f4f2ff !important;
}

.elementor .adm-faq-item[open] p,
.elementor .accordion-item.active .accordion-content {
  background: #f8f7ff !important;
}

body.page-id-41 .apcto-unified-hero {
  background:
    linear-gradient(120deg, rgba(13, 46, 75, 0.75), rgba(29, 95, 148, 0.62)),
    url('/wp/wp-content/uploads/2026/03/Mot-du-maire-1200x700.png') center 72% / cover no-repeat;
}

body.page-id-43 .apcto-unified-hero {
  background:
    linear-gradient(120deg, rgba(13, 46, 75, 0.75), rgba(29, 95, 148, 0.62)),
    url('/wp/wp-content/uploads/2026/03/ancienne_mairie.jpg') center 42% / cover no-repeat;
}

body.page-id-41 .apcto-unified-hero .apcto-unified-hero__title,
body.page-id-43 .apcto-unified-hero .apcto-unified-hero__title {
  color: #ffffff !important;
}

body.page-id-43 .apcto-cta-strip {
  background: transparent !important;
}

body.page-id-43 .apcto-cta-strip p {
  color: var(--apc-primary) !important;
}

.apcto-news-hero {
  width: min(1240px, calc(100% - 2rem));
  min-height: 240px;
  margin: 14px auto 24px;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(120deg, rgba(13, 46, 75, 0.75), rgba(29, 95, 148, 0.62)),
    url('/wp/wp-content/uploads/2026/03/ACTUALITES.webp') center 42% / cover no-repeat;
  box-shadow: 0 14px 35px rgba(14, 57, 88, 0.12);
  display: flex;
  align-items: flex-end;
  animation: apcHeaderIn 0.9s ease both;
}

.apcto-news-hero .dcv-header-inner {
  width: calc(100% - 4rem);
  margin: 0 auto;
  padding: 24px 0 20px;
  color: #fff;
}

.apcto-news-hero .dcv-breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 1.04rem;
  opacity: 0.92;
  margin-bottom: 8px;
}

.apcto-news-hero .dcv-breadcrumb a {
  color: #deeeff;
  text-decoration: none;
}

.apcto-news-hero .dcv-breadcrumb a:hover {
  text-decoration: underline;
}

.dcv-breadcrumb .apcto-crumb-disabled,
.apcto-unified-hero__crumb .apcto-crumb-disabled,
.apcto-breadcrumb .apcto-crumb-disabled,
.apcto-org-breadcrumb .apcto-crumb-disabled,
.breadcrumb .apcto-crumb-disabled,
.site-breadcrumbs .apcto-crumb-disabled {
  pointer-events: none;
  cursor: default;
  text-decoration: none;
}

.apcto-footer {
  background: #0f1f3a;
  color: #e6edf7;
  padding: 56px 0 24px;
  margin-top: 28px;
}

.apcto-footer__inner {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.apcto-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.apcto-footer__logo {
  text-decoration: none;
  color: #ffffff;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.apcto-footer__logo-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
}

.apcto-footer__logo-subtitle {
  font-size: 1rem;
  color: #c7d6ea;
  font-weight: 500;
  line-height: 1.5;
}

.apcto-footer__social {
  font-size: 0.95rem;
  color: #c7d6ea;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.apcto-footer__social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #d5e0f0;
  font-size: 0.9rem;
}

.apcto-footer__social-line {
  flex-basis: 100%;
}

.apcto-footer__social-icon {
  font-family: "Simple-Line-Icons", "simple-line-icons", "Font Awesome 6 Free", "Font Awesome 5 Free", sans-serif;
  font-size: 1rem;
  line-height: 1;
  color: #d5e0f0;
}

.apcto-footer__social a {
  color: #d5e0f0;
  text-decoration: none;
  font-weight: 600;
}

.apcto-footer__social a:hover {
  color: var(--apc-secondary, #5B57E3);
  text-decoration: underline;
}

.apcto-footer__col h3 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #f5f7ff;
}

.apcto-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.apcto-footer__col a {
  color: #d5e0f0;
  text-decoration: none;
  font-size: 0.98rem;
}

.apcto-footer__col a:hover {
  color: var(--apc-secondary, #5B57E3);
  text-decoration: underline;
}

.apcto-footer__contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #d5e0f0;
  font-size: 0.98rem;
}

.apcto-footer__icon {
  font-size: 1rem;
  line-height: 1.2;
}

.apcto-footer__bottom {
  width: min(1240px, calc(100% - 2rem));
  margin: 26px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #c1cfe3;
  font-size: 0.92rem;
  display: flex;
  justify-content: center;
  text-align: center;
  gap: 12px;
  flex-wrap: wrap;
}

.apcto-footer__sitemap {
  color: #c1cfe3;
  text-decoration: none;
  font-size: 0.92rem;
}

.apcto-footer__sitemap:hover {
  color: var(--apc-secondary, #5B57E3);
  text-decoration: underline;
}

@media (max-width: 1200px) {
  .apcto-footer__inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .apcto-footer {
    padding: 44px 0 20px;
  }
}

.apcto-news-hero h1 {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2.15rem, 4.2vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: #fff;
}

.apcto-news-hero .dcv-subtitle {
  margin: 6px 0 0;
  font-size: clamp(1.18rem, 1.9vw, 1.32rem);
  color: #e7f2ff;
  max-width: 700px;
}

.home .elementor .apcto-news-cta::after {
  content: none !important;
}

.home .elementor a.apcto-shared-cta {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 16px !important;
  color: #2b2f42 !important;
  cursor: pointer !important;
  transition: all .3s ease !important;
  padding: 10px 16px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  text-decoration: none !important;
  font-family: 'Poppins', sans-serif !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

.home .elementor a.apcto-shared-cta:hover {
  background: linear-gradient(135deg, #4D4AD6 0%, #322FA8 100%) !important;
  color: #fff !important;
  transform: translateX(8px) !important;
}

.home .elementor a.apcto-shared-cta .arrow {
  width: 16px !important;
  height: 16px !important;
  fill: currentColor !important;
  transition: transform .3s ease !important;
}

.home .elementor a.apcto-shared-cta:hover .arrow {
  transform: translateX(4px) !important;
}

.home .apcto-home-featured {
  --apc-blue: #1f3b82;
  --apc-violet: #5b57e3;
  --apc-orange: #e56a2e;
  --apc-bg-soft: #f3f6fc;
  --apc-card: #ffffff;
  --apc-border-soft: #d8e1f0;
  --apc-text-main: #1f2f48;
  --apc-text-muted: #496083;
  --apc-shadow-soft: 0 10px 24px rgba(24, 54, 94, 0.08);
  --apc-shadow-hover: 0 16px 30px rgba(24, 54, 94, 0.12);
  --apc-radius-lg: 18px;
  --apc-radius-md: 14px;
  --apc-focus: 0 0 0 3px rgba(91, 87, 227, 0.28);
  padding: 18px 0 8px !important;
  background: transparent !important;
}

.home .apcto-home-featured-inner {
  width: min(1200px, calc(100% - 2.4rem)) !important;
  margin: 0 auto !important;
}

.home .apcto-home-featured .apcto-featured-wrap {
  background: transparent !important;
}

.home .apcto-home-featured .apcto-section-head {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.55rem !important;
  margin-bottom: 0.6rem !important;
}

.home .apcto-home-featured .apcto-section-head h2 {
  margin: 0 !important;
  font-size: 36px !important;
  line-height: 1.15 !important;
  font-family: "Poppins", sans-serif !important;
  font-weight: 700 !important;
  color: #0b2545 !important;
  text-align: center !important;
}

.home .apcto-home-featured .apcto-head-mark {
  width: 60px !important;
  max-width: 60px !important;
  height: 2px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%) !important;
}

.home .apcto-home-featured .apcto-featured-carousel {
  display: grid !important;
  gap: 0.75rem !important;
}

.home .apcto-home-featured .apcto-featured-viewport {
  overflow: hidden !important;
  border-radius: var(--apc-radius-lg) !important;
}

.home .apcto-home-featured .apcto-featured-track {
  display: flex !important;
  transition: transform 0.42s ease !important;
  will-change: transform !important;
}

.home .apcto-home-featured .apcto-featured-slide {
  flex: 0 0 100% !important;
  min-width: 100% !important;
}

.home .apcto-home-featured .apcto-featured-card {
  display: grid !important;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr) !important;
  background: var(--apc-card) !important;
  border: 1px solid var(--apc-border-soft) !important;
  border-radius: var(--apc-radius-lg) !important;
  box-shadow: var(--apc-shadow-soft) !important;
  overflow: hidden !important;
}

.home .apcto-home-featured .apcto-featured-card--no-media {
  grid-template-columns: 1fr !important;
}

.home .apcto-home-featured .apcto-featured-media {
  display: block !important;
  height: clamp(210px, 25vw, 305px) !important;
  min-height: 0 !important;
  background: linear-gradient(140deg, #d5e4ff 0%, #f3f7ff 100%) !important;
}

.home .apcto-home-featured .apcto-featured-media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

.home .apcto-home-featured .apcto-featured-body {
  padding: 1.1rem 1.2rem !important;
  display: grid !important;
  gap: 0.58rem !important;
  align-content: center !important;
  color: var(--apc-text-main) !important;
  font-family: var(--apcto-font-body, "Inter", "Segoe UI", Arial, sans-serif) !important;
}

.home .apcto-home-featured .apcto-featured-body h3 {
  margin: 0 !important;
  font-size: clamp(1.2rem, 1.7vw, 1.55rem) !important;
  line-height: 1.27 !important;
}

.home .apcto-home-featured .apcto-featured-body h3 a {
  text-decoration: none !important;
  color: var(--apc-blue) !important;
}

.home .apcto-home-featured .apcto-featured-body p {
  margin: 0 !important;
  line-height: 1.5 !important;
}

.home .apcto-home-featured .apcto-meta-row {
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
}

.home .apcto-home-featured .apcto-date {
  color: var(--apc-text-muted) !important;
  font-size: 0.8rem !important;
  white-space: nowrap !important;
  margin-left: auto !important;
  padding-left: 0.55rem !important;
  min-width: max-content !important;
  line-height: 1.25 !important;
}

.home .apcto-home-featured .apcto-featured-controls {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.6rem !important;
}

.home .apcto-home-featured .apcto-featured-nav {
  width: 2rem !important;
  height: 2rem !important;
  border-radius: 999px !important;
  border: 1px solid #d4d2ff !important;
  background: #fff !important;
  color: var(--apc-violet) !important;
  font-size: 1.2rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

.home .apcto-home-featured .apcto-featured-nav:hover,
.home .apcto-home-featured .apcto-featured-nav:focus-visible {
  outline: none !important;
  box-shadow: var(--apc-focus) !important;
}

.home .apcto-home-featured .apcto-featured-dots {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
}

.home .apcto-home-featured .apcto-featured-dot {
  width: 0.62rem !important;
  height: 0.62rem !important;
  border-radius: 999px !important;
  border: 1px solid #cfd9ea !important;
  background: #fff !important;
  padding: 0 !important;
  cursor: pointer !important;
}

.home .apcto-home-featured .apcto-featured-dot.is-active,
.home .apcto-home-featured .apcto-featured-dot[aria-current='true'] {
  background: var(--apc-orange) !important;
  border-color: var(--apc-orange) !important;
}

.home .apcto-home-featured .apcto-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.34rem !important;
  padding: 0.22rem 0.52rem !important;
  border-radius: 999px !important;
  border: 1px solid currentColor !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.006em !important;
  background: #fff !important;
  white-space: nowrap !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.home .apcto-home-featured .apcto-badge::before {
  content: '' !important;
  width: 0.39rem !important;
  height: 0.39rem !important;
  border-radius: 999px !important;
  background: currentColor !important;
}

.home .apcto-home-featured .apcto-badge--voirie {
  color: var(--apc-blue) !important;
  background: #eff4ff !important;
}

.home .apcto-home-featured .apcto-badge--urbanisme {
  color: var(--apc-violet) !important;
  background: #f4f2ff !important;
}

.home .apcto-home-featured .apcto-badge--hygiene {
  color: #2f6e57 !important;
  background: #eef9f4 !important;
}

.home .apcto-home-featured .apcto-badge--social {
  color: #8d4d27 !important;
  background: #fff4eb !important;
}

.home .apcto-home-featured .apcto-badge--municipale {
  color: #2a4b7c !important;
  background: #eef2ff !important;
}

.home .apcto-home-featured .apcto-read-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.3rem !important;
  width: fit-content !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  color: var(--apc-blue) !important;
  text-decoration: none !important;
}

.home .apcto-home-featured .apcto-read-link::after {
  content: '→' !important;
  color: var(--apc-orange) !important;
  transition: transform 0.2s ease !important;
}

.home .apcto-home-featured .apcto-read-link:hover::after,
.home .apcto-home-featured .apcto-read-link:focus-visible::after {
  transform: translateX(2px) !important;
}

.home .apcto-home-featured .apcto-reveal {
  opacity: 0 !important;
  transform: translateY(10px) !important;
  transition: opacity 0.35s ease, transform 0.35s ease !important;
}

.home .apcto-home-featured .apcto-reveal.is-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

@media (max-width: 1080px) {
  .home .apcto-home-featured .apcto-featured-card {
    grid-template-columns: 1fr !important;
  }

  .home .apcto-home-featured .apcto-featured-media {
    height: clamp(190px, 41vw, 245px) !important;
  }
}

@media (max-width: 767px) {
  .home .apcto-home-featured {
    padding: 12px 0 4px !important;
  }

  .home .apcto-home-featured-inner {
    width: calc(100% - 1.2rem) !important;
  }

  .home .apcto-home-featured .apcto-section-head {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.46rem !important;
  }

  .home .apcto-home-featured .apcto-head-mark {
    width: 60px !important;
    max-width: 60px !important;
  }

  .home .apcto-home-featured .apcto-featured-media {
    height: 182px !important;
  }

  .home .apcto-home-featured .apcto-featured-body .apcto-meta-row {
    gap: 0.35rem 0.5rem !important;
  }

  .home .apcto-home-featured .apcto-featured-body .apcto-date {
    width: 100% !important;
    margin-left: 0 !important;
    margin-top: 0.12rem !important;
    padding-left: 0 !important;
    white-space: normal !important;
  }

  .home .apcto-home-featured .apcto-featured-nav {
    width: 1.8rem !important;
    height: 1.8rem !important;
    font-size: 1rem !important;
  }

  .home .apcto-home-featured .apcto-section-head h2 {
    font-size: 28px !important;
  }
}

.home .elementor .apcto-marche-main-cta-wrap {
  margin-top: 16px;
  text-align: center;
}

.home .elementor-element-52e03d3,
.home .elementor-element-cf50523,
.home #eael-post-grid-595ee98 {
  display: none !important;
}

.home .elementor .apcto-marche-main-cta {
  text-decoration: none !important;
}

/* Calendrier des evenements (page 1324): tighten stats and align filters/search sizing */
body.page-id-1324 .elementor .dashboard {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
  gap: 1rem !important;
  margin: 1.25rem 0 !important;
}

body.page-id-1324 .elementor .stat-card {
  padding: 0.95rem 1rem !important;
  border-radius: 12px !important;
}

body.page-id-1324 .elementor .stat-number {
  font-size: clamp(1.9rem, 3.4vw, 2.25rem) !important;
  margin-bottom: 0.2rem !important;
  line-height: 1.05 !important;
}

body.page-id-1324 .elementor .stat-label {
  font-size: 0.8rem !important;
  letter-spacing: 0.06em !important;
}

body.page-id-1324 .elementor .search-filter {
  padding: 1rem !important;
  margin-bottom: 1rem !important;
}

body.page-id-1324 .elementor .search-input {
  min-height: 56px !important;
  padding: 0 1rem !important;
  border-radius: 12px !important;
}

body.page-id-1324 .elementor .tabs {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto 1.5rem !important;
  padding: 1rem !important;
  gap: 0.55rem !important;
  min-height: 88px !important;
  align-items: center !important;
  border-radius: 18px !important;
}

body.page-id-1324 .elementor .tab-button {
  min-height: 56px !important;
  padding: 0 1.35rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.55rem !important;
  font-weight: 700 !important;
  border-radius: 14px !important;
  white-space: nowrap !important;
}

body.page-id-1324 .elementor .tab-button::before {
  display: inline-block !important;
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
  font-weight: 900 !important;
  font-size: 0.95rem !important;
  line-height: 1 !important;
}

body.page-id-1324 .elementor .tab-button[data-tab="all"]::before {
  content: "\f00b" !important;
}

body.page-id-1324 .elementor .tab-button[data-tab="upcoming"]::before {
  content: "\f133" !important;
}

body.page-id-1324 .elementor .tab-button[data-tab="today"]::before {
  content: "\f140" !important;
}

body.page-id-1324 .elementor .tab-button[data-tab="past"]::before {
  content: "\f1da" !important;
}

@media (max-width: 768px) {
  body.page-id-1324 .elementor .tabs {
    gap: 0.45rem !important;
  }

  body.page-id-1324 .elementor .tab-button {
    min-height: 50px !important;
    width: 100% !important;
  }
}

@keyframes apcHeaderIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 768px) {
  .apcto-news-hero {
    min-height: 150px;
    border-radius: 18px;
    margin-inline: 10px;
  }

  .apcto-news-hero .dcv-header-inner {
    width: calc(100% - 24px);
  }

  .apcto-news-hero .dcv-breadcrumb {
    font-size: 0.98rem;
    margin-bottom: 4px;
  }
}

.home .mairie-title {
  font-size: clamp(36px, 4.8vw, 60px) !important;
  line-height: 1.08 !important;
}

.home .mairie-subtitle {
  font-size: clamp(24px, 2.6vw, 40px) !important;
  line-height: 1.2 !important;
}

.home .mairie-text {
  font-size: clamp(16px, 1.45vw, 21px) !important;
  line-height: 1.55 !important;
}

.home .mairie-values {
  flex-wrap: wrap !important;
  white-space: normal !important;
  gap: 8px !important;
  margin-bottom: 18px !important;
}

.home .mairie-values li {
  white-space: normal !important;
  text-align: center !important;
}

.home .mairie-cta-wrap {
  margin-top: 10px !important;
}

.home .mairie-button {
  padding: 9px 18px !important;
  font-size: 0.96rem !important;
  border-width: 1.5px !important;
}

@media (min-width: 1025px) {
  .home .elementor-element-e0fc9dd > .e-con-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) !important;
    align-items: center !important;
    column-gap: 14px !important;
  }

  .home .mairie-section {
    text-align: left !important;
    justify-content: flex-start !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .home .mairie-container {
    margin: 0 0 0 -14px !important;
    max-width: 720px !important;
    align-items: flex-start !important;
  }

  .home .mairie-separator {
    margin: 12px 0 24px !important;
  }

  .home .mairie-values {
    justify-content: flex-start !important;
  }

  .home .mairie-cta-wrap {
    text-align: center !important;
    width: 100% !important;
  }

  .home .apcto-crest-fixed-wrap {
    justify-content: flex-end !important;
    padding-right: 22px !important;
  }

.home .apcto-crest-fixed {
  margin-left: auto !important;
  margin-right: 0 !important;
  max-width: none !important;
  animation: apctoCrestIn 0.7s ease both, apctoCrestFloat 5.5s ease-in-out 0.7s infinite;
  will-change: transform, opacity;
}
}

@media (min-width: 768px) and (max-width: 1024px) {
  .home .elementor-element-e0fc9dd > .e-con-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr) !important;
    align-items: center !important;
    column-gap: 10px !important;
  }

  .home .mairie-section {
    text-align: left !important;
    justify-content: flex-start !important;
    padding: 20px 10px 8px !important;
  }

  .home .mairie-container {
    margin: 0 0 0 -4px !important;
    max-width: 100% !important;
    align-items: flex-start !important;
  }

  .home .mairie-separator {
    margin: 10px 0 18px !important;
  }

  .home .mairie-values {
    justify-content: flex-start !important;
  }

  .home .mairie-cta-wrap {
    text-align: center !important;
    width: 100% !important;
  }

  .home .apcto-crest-fixed-wrap {
    justify-content: flex-end !important;
    padding-right: 8px !important;
    min-height: 220px !important;
  }

  .home .apcto-crest-fixed {
    width: min(70%, 300px) !important;
    margin-left: auto !important;
    animation: apctoCrestIn 0.7s ease both, apctoCrestFloat 5.5s ease-in-out 0.7s infinite;
  }
}

@media (max-width: 767px) {
  .home .elementor-element-e0fc9dd > .e-con-inner {
    display: grid !important;
    grid-template-columns: 1fr !important;
    row-gap: 10px !important;
  }

  .home .mairie-section {
    text-align: center !important;
    justify-content: center !important;
    padding: 18px 12px 8px !important;
  }

  .home .mairie-container {
    margin: 0 auto !important;
    max-width: 100% !important;
    align-items: center !important;
  }

  .home .mairie-separator {
    margin: 10px auto 14px !important;
  }

  .home .mairie-values {
    justify-content: center !important;
  }

  .home .mairie-values li {
    font-size: 11px !important;
    padding: 6px 9px !important;
  }

  .home .mairie-cta-wrap {
    text-align: center !important;
    width: 100% !important;
  }

  .home .mairie-button {
    padding: 8px 14px !important;
    font-size: 0.9rem !important;
  }

  .home .apcto-crest-fixed-wrap {
    justify-content: center !important;
    padding-right: 0 !important;
    min-height: 170px !important;
  }

  .home .apcto-crest-fixed {
    width: min(60%, 230px) !important;
    margin: 0 auto !important;
  }
}

@keyframes apctoCrestIn {
  from {
    opacity: 0;
    transform: translateX(28px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes apctoCrestFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home .apcto-crest-fixed {
    animation: none !important;
  }
}

@media (max-width: 1300px) {
  .home .elementor-element-e0fc9dd > .e-con-inner {
    display: grid !important;
    grid-template-columns: 1fr !important;
    row-gap: 10px !important;
  }

  .home .mairie-section {
    text-align: center !important;
    justify-content: center !important;
    padding: 18px 12px 8px !important;
  }

  .home .mairie-container {
    margin: 0 auto !important;
    max-width: 100% !important;
    align-items: center !important;
  }

  .home .mairie-separator {
    margin: 10px auto 14px !important;
  }

  .home .mairie-values {
    justify-content: center !important;
  }

  .home .mairie-values li {
    font-size: 11px !important;
    padding: 6px 9px !important;
  }

  .home .mairie-cta-wrap {
    text-align: center !important;
    width: 100% !important;
  }

  .home .mairie-button {
    padding: 8px 14px !important;
    font-size: 0.9rem !important;
  }

  .home .apcto-crest-fixed-wrap {
    justify-content: center !important;
    padding-right: 0 !important;
    min-height: 170px !important;
  }

  .home .apcto-crest-fixed {
    width: min(60%, 230px) !important;
    margin: 0 auto !important;
  }

  .home .marche-cards-section {
    padding: 18px 12px 20px !important;
  }

  .home .marche-cards-section .marche-cards-grid {
    grid-template-columns: 1fr !important;
  }

  .home .marche-cards-section .marche-card {
    padding: 18px 16px !important;
  }

  .home .marche-cards-section .marche-card-footer {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
  }

  .home .marche-cards-section .marche-status {
    margin-left: 0 !important;
  }
}

@media (max-width: 1200px) {
  .home .apcto-vote-wrap {
    max-width: 760px !important;
  }

  .home .apcto-vote-head {
    text-align: center !important;
  }

  .home .apcto-vote-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .home .apcto-v-card.is-center {
    grid-column: auto !important;
  }

  .home .apcto-v-card img,
  .home .apcto-v-card.is-center img {
    aspect-ratio: 16 / 10 !important;
  }
}

/* -----------------------------------------------------------------------------
   Service pages unifier (Voirie-like system)
   These service pages are built via Elementor HTML widgets and share `.service-page`.
   Placed here because `apc-palette-overrides.css` is loaded site-wide.
----------------------------------------------------------------------------- */

.service-page {
  background: var(--apc-bg) !important;
  color: var(--apc-text) !important;
  font-family: var(--apcto-font-body, "Inter", "Segoe UI", Arial, sans-serif) !important;
  padding: 0 0 3.2rem !important;
}

.service-page .dcv-header {
  width: min(1240px, calc(100% - 2rem)) !important;
  min-height: 240px !important;
  margin: 14px auto 24px !important;
  border-radius: 22px !important;
  overflow: hidden !important;
  box-shadow: 0 14px 35px rgba(14, 57, 88, 0.12) !important;
}

.service-page .dcv-header-inner {
  width: calc(100% - 4rem) !important;
  margin: 0 auto !important;
  padding: 24px 0 20px !important;
}

.service-page .dcv-header h1 {
  font-family: var(--apcto-font-heading, "Fraunces", Georgia, serif) !important;
  letter-spacing: 0.01em !important;
}

.service-page .dcv-subtitle {
  font-family: var(--apcto-font-body, "Inter", "Segoe UI", Arial, sans-serif) !important;
  max-width: 760px !important;
}

.service-page .service-grid,
.service-page .pu-section,
.service-page .pu-mission-carousel,
.service-page .pu-shell,
.service-page .pu-section > * {
  width: min(1220px, calc(100% - 2rem));
  margin-left: auto !important;
  margin-right: auto !important;
}

.service-page .service-grid {
  margin-top: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.service-page .service-card,
.service-page .pu-intro-box,
.service-page .pu-mission-card,
.service-page .pu-importance,
.service-page .pu-actions,
.service-page .pu-infos,
.service-page .pu-related {
  background: var(--apc-surface) !important;
  border: 1px solid var(--apc-border) !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 24px rgba(24, 54, 94, 0.08) !important;
}

.service-page .service-card {
  padding: 18px !important;
}

.service-page .service-card h2,
.service-page .pu-title,
.service-page .pu-section h2,
.service-page .pu-section h3 {
  font-family: var(--apcto-font-heading, "Fraunces", Georgia, serif) !important;
  color: var(--apc-primary) !important;
  letter-spacing: 0.012em;
}

.service-page .service-card p,
.service-page .pu-section p,
.service-page .pu-section li {
  color: var(--apc-text) !important;
}

@media (max-width: 1080px) {
  .service-page .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  .service-page .dcv-header {
    min-height: 210px !important;
    border-radius: 16px !important;
    margin: 10px auto 16px !important;
    width: calc(100% - 1rem) !important;
  }

  .service-page .dcv-header-inner {
    width: calc(100% - 1.8rem) !important;
    padding: 16px 0 14px !important;
  }

  .service-page .service-grid {
    grid-template-columns: 1fr !important;
  }

  .service-page .service-card {
    padding: 16px !important;
  }
}

.home .apcto-vote-old {
  padding: clamp(30px, 4vw, 48px) 14px clamp(34px, 4.5vw, 56px) !important;
  margin-bottom: 24px !important;
}

.home .apcto-vote-wrap {
  max-width: 1160px !important;
}

.home .apcto-vote-head {
  margin: 0 auto 20px !important;
}

.home .apcto-vote-title {
  font-size: clamp(28px, 3.2vw, 36px) !important;
  line-height: 1.16 !important;
}

.home .apcto-vote-desc {
  font-size: clamp(15px, 1.4vw, 17px) !important;
  line-height: 1.55 !important;
}

.home .apcto-vote-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: stretch !important;
}

.home .apcto-v-card {
  height: 100% !important;
  border-radius: 14px !important;
}

.home .apcto-v-card img {
  width: 100% !important;
  height: auto !important;
  object-fit: cover !important;
}

.home .apcto-v-body {
  padding: 13px !important;
}

.home .apcto-v-body h3 {
  font-size: 15px !important;
  line-height: 1.3 !important;
}

.home .apcto-v-body p {
  font-size: 14px !important;
  line-height: 1.48 !important;
}

@media (max-width: 1100px) and (min-width: 768px) {
  .home .apcto-vote-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .home .apcto-v-card.is-center {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 767px) {
  .home .apcto-vote-old {
    padding: 28px 12px 34px !important;
    margin-bottom: 18px !important;
  }

  .home .apcto-vote-head {
    margin-bottom: 16px !important;
  }

  .home .apcto-vote-title {
    font-size: 27px !important;
  }

  .home .apcto-vote-desc {
    font-size: 15px !important;
  }

  .home .apcto-vote-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .home .apcto-v-card.is-center {
    grid-column: auto !important;
  }

  .home .apcto-v-card img,
  .home .apcto-v-card.is-center img {
    aspect-ratio: 16 / 10 !important;
  }

  .home .apcto-v-body {
    padding: 12px !important;
  }

  .home .apcto-vote-cta {
    margin-top: 14px !important;
  }
}

.home .marche-cards-section {
  background: linear-gradient(180deg, #f3f7ff 0%, #edf3ff 100%) !important;
  border: 1px solid #d9e4f2 !important;
  border-radius: 24px !important;
  padding: 24px 20px 26px !important;
}

.home .marche-cards-section .marche-cards-grid {
  gap: 16px !important;
  align-items: stretch !important;
}

.home .marche-cards-section .marche-cards-header {
  margin-bottom: 20px !important;
}

.home .marche-cards-section .marche-card {
  position: relative !important;
  overflow: hidden !important;
  background: linear-gradient(165deg, #ffffff 0%, #f7faff 100%) !important;
  border: 1px solid #d6e3f5 !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 28px rgba(22, 42, 94, 0.12) !important;
  padding: 22px 22px 18px !important;
}

.home .marche-cards-section .marche-card::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 0 auto 0 !important;
  height: 4px !important;
  background: linear-gradient(90deg, var(--apc-secondary), var(--apc-accent)) !important;
}

.home .marche-cards-section .marche-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 18px 34px rgba(22, 42, 94, 0.16) !important;
}

.home .marche-cards-section .marche-card-title {
  margin-bottom: 12px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  min-height: 2.5em !important;
}

.home .marche-cards-section .marche-card-description {
  margin-bottom: 12px !important;
  line-height: 1.5 !important;
}

.home .marche-cards-section .marche-card-details {
  margin-bottom: 14px !important;
}

.home .marche-cards-section .marche-card-footer {
  margin-top: auto !important;
  display: grid !important;
  grid-template-columns: max-content max-content !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

.home .marche-cards-section .marche-card-button {
  min-width: 170px !important;
  padding: 10px 16px !important;
  border-radius: 12px !important;
  justify-content: center !important;
  box-shadow: 0 10px 22px rgba(22, 42, 94, 0.22) !important;
  text-decoration: none !important;
}

.home .marche-cards-section .marche-status {
  margin-left: auto !important;
  white-space: nowrap !important;
}

.home .elementor-element-undefined-2735bf2 .elementor-heading-title {
  font-size: 36px !important;
  line-height: 1.15 !important;
}

.home #eael-post-grid-595ee98 .eael-entry-title,
.home #eael-post-grid-595ee98 .eael-entry-title a {
  font-size: 20px !important;
  line-height: 1.25 !important;
}

.home #eael-post-grid-595ee98 .apcto-news-thumb-fallback {
  width: 100% !important;
  height: 220px !important;
  display: grid !important;
  place-items: center !important;
  background: linear-gradient(145deg, #e5ecfa 0%, #cfddf5 100%) !important;
  color: #1b3b6f !important;
  font-family: "Poppins", sans-serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
}

@media (max-width: 767px) {
  .home .marche-cards-section {
    padding: 18px 12px 20px !important;
  }

  .home .marche-cards-section .marche-card {
    padding: 18px 16px !important;
  }

  .home .marche-cards-section .marche-card-footer {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
  }

  .home .marche-cards-section .marche-status {
    margin-left: 0 !important;
  }

  .home .elementor-element-undefined-2735bf2 .elementor-heading-title {
    font-size: 28px !important;
  }

  .home #eael-post-grid-595ee98 .apcto-news-thumb-fallback {
    height: 180px !important;
  }
}

@media (max-width: 1024px) and (min-width: 768px) {
  .home .elementor-element-undefined-2735bf2 .elementor-heading-title {
    font-size: 32px !important;
  }

  .home #eael-post-grid-595ee98 .apcto-news-thumb-fallback {
    height: 200px !important;
  }
}

/* Final Responsive Tuning: Mairie block */
@media (min-width: 1025px) {
  .home .elementor-element-e0fc9dd > .e-con-inner {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr) !important;
    column-gap: 8px !important;
  }

  .home .mairie-section {
    width: 100% !important;
    padding: 16px 0 6px !important;
  }

  .home .mairie-container {
    width: 100% !important;
    max-width: 860px !important;
    margin: 0 0 0 -26px !important;
    min-height: 0 !important;
    display: block !important;
  }

  .home .mairie-values {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 7px !important;
    white-space: nowrap !important;
  }

  .home .mairie-values li {
    font-size: 12px !important;
    padding: 6px 9px !important;
    white-space: nowrap !important;
  }

  .home .mairie-cta-wrap {
    display: block !important;
    text-align: center !important;
    margin-top: 14px !important;
    padding-top: 0 !important;
  }

  .home .mairie-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .home .apcto-crest-fixed-wrap {
    min-height: 260px !important;
    padding-right: 28px !important;
  }

  .home .apcto-crest-fixed {
    width: min(96%, 520px) !important;
    max-width: 520px !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .home .mairie-container {
    width: 100% !important;
    margin: 0 !important;
    min-height: 0 !important;
    display: block !important;
  }

  .home .mairie-values {
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

  .home .mairie-cta-wrap {
    margin-top: 14px !important;
    padding-top: 0 !important;
  }

  .home .apcto-crest-fixed-wrap {
    min-height: 230px !important;
    padding-right: 14px !important;
  }

  .home .apcto-crest-fixed {
    width: min(84%, 400px) !important;
    max-width: 400px !important;
  }
}

@media (max-width: 767px) {
  .home .mairie-container {
    min-height: 0 !important;
    display: block !important;
  }

  .home .mairie-values {
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  .home .mairie-cta-wrap {
    margin-top: 12px !important;
    padding-top: 0 !important;
  }

  .home .apcto-crest-fixed {
    max-width: 230px !important;
  }
}

/* Home crest lock: keep the emblem visually balanced with the mairie copy. */
@media (min-width: 1025px) {
  .home .apcto-crest-fixed-wrap {
    justify-content: center !important;
    min-height: 300px !important;
    padding-right: 0 !important;
  }

  .home .apcto-crest-fixed {
    width: clamp(260px, 24vw, 360px) !important;
    max-width: 360px !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .home .apcto-crest-fixed-wrap {
    justify-content: center !important;
    min-height: 250px !important;
    padding-right: 0 !important;
  }

  .home .apcto-crest-fixed {
    width: clamp(210px, 38vw, 300px) !important;
    max-width: 300px !important;
  }
}

@media (max-width: 767px) {
  .home .apcto-crest-fixed-wrap {
    justify-content: center !important;
    min-height: 190px !important;
    padding-right: 0 !important;
  }

  .home .apcto-crest-fixed {
    width: clamp(170px, 62vw, 240px) !important;
    max-width: 240px !important;
  }
}

/* Home mairie CTA: keep centered without changing the section grid flow. */
.home .mairie-section .mairie-cta-wrap {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  text-align: center !important;
}

/* Home mairie section: compact sizing */
@media (min-width: 1025px) {
  .home .elementor-element-e0fc9dd {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  .home .mairie-title {
    font-size: clamp(30px, 3.8vw, 50px) !important;
  }

  .home .mairie-subtitle {
    font-size: clamp(20px, 2.2vw, 32px) !important;
    margin-bottom: 8px !important;
  }

  .home .mairie-text {
    font-size: clamp(15px, 1.2vw, 18px) !important;
    line-height: 1.42 !important;
  }

  .home .mairie-values {
    margin-bottom: 12px !important;
    gap: 6px !important;
  }

  .home .mairie-cta-wrap {
    margin-top: 8px !important;
  }

  .home .apcto-crest-fixed-wrap {
    min-height: 220px !important;
  }

  .home .apcto-crest-fixed {
    width: clamp(210px, 21vw, 300px) !important;
    max-width: 300px !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .home .elementor-element-e0fc9dd {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  .home .mairie-subtitle {
    margin-bottom: 6px !important;
  }

  .home .mairie-values {
    margin-bottom: 10px !important;
  }

  .home .mairie-cta-wrap {
    margin-top: 6px !important;
  }

  .home .apcto-crest-fixed-wrap {
    min-height: 200px !important;
  }

  .home .apcto-crest-fixed {
    width: clamp(190px, 32vw, 260px) !important;
    max-width: 260px !important;
  }
}

@media (max-width: 767px) {
  .home .mairie-section {
    padding-top: 10px !important;
    padding-bottom: 4px !important;
  }

  .home .mairie-values {
    margin-bottom: 8px !important;
  }

  .home .mairie-cta-wrap {
    margin-top: 4px !important;
  }

  .home .apcto-crest-fixed-wrap {
    min-height: 150px !important;
  }

  .home .apcto-crest-fixed {
    width: clamp(150px, 52vw, 200px) !important;
    max-width: 200px !important;
  }
}

/* Home mairie refinements: longer text lines + smaller CTA button */
@media (min-width: 1025px) {
  .home .elementor-element-e0fc9dd > .e-con-inner {
    grid-template-columns: minmax(0, 1fr) minmax(290px, 360px) !important;
    column-gap: 12px !important;
  }

  .home .mairie-container {
    width: 100% !important;
    max-width: 1120px !important;
    margin-left: 0 !important;
  }

  .home .mairie-text {
    max-width: 100% !important;
  }

  .home .apcto-crest-fixed {
    width: clamp(240px, 21vw, 300px) !important;
    max-width: 300px !important;
  }
}

.home .mairie-button {
  padding: 7px 14px !important;
  font-size: 0.9rem !important;
  border-width: 1.25px !important;
  border-radius: 999px !important;
}

/* Header parents with dropdown: visual non-click state, submenu links stay active. */
#site-navigation-wrap .menu-item-has-children > a.apcto-parent-link-disabled,
#mobile-dropdown .menu-item-has-children > a.apcto-parent-link-disabled,
.sidr-class-menu-item-has-children > a.apcto-parent-link-disabled {
  cursor: default !important;
}

/* Home mairie CTA as contextual text link under paragraph (not button style). */
.home .mairie-cta-wrap.apcto-inline-link-wrap {
  margin-top: 6px !important;
  margin-bottom: 14px !important;
  width: 100% !important;
  display: block !important;
  text-align: left !important;
}

.home .mairie-button.apcto-inline-link {
  display: inline !important;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #1f3b82 !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}

.home .mairie-button.apcto-inline-link:hover,
.home .mairie-button.apcto-inline-link:focus-visible {
  color: #4d4ad6 !important;
  background: none !important;
  border: 0 !important;
}

@media (max-width: 767px) {
  .home .mairie-cta-wrap.apcto-inline-link-wrap {
    text-align: center !important;
  }
}

/* Desktop header dropdowns: keep submenu directly under its own menu item with spacing. */
@media (min-width: 1281px) {
  #site-navigation-wrap {
    --apc-dropdown-offset: 36px;
  }

  #site-navigation-wrap .dropdown-menu > li.menu-item-has-children,
  #site-navigation-wrap .dropdown-menu > li.dropdown {
    position: relative !important;
  }

  #site-navigation-wrap .dropdown-menu > li.menu-item-has-children::after,
  #site-navigation-wrap .dropdown-menu > li.dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: var(--apc-dropdown-offset);
  }

  #site-navigation-wrap .dropdown-menu > li.menu-item-has-children > .sub-menu,
  #site-navigation-wrap .dropdown-menu > li.dropdown > .sub-menu {
    left: 0 !important;
    right: auto !important;
    top: calc(100% + var(--apc-dropdown-offset)) !important;
    margin-top: 0 !important;
  }
}

/* Hide header search icon (desktop + mobile). */
#site-header .search-toggle-li,
#site-header .search-toggle-li > a,
#site-header .ast-search-menu-icon,
#site-header .astra-search-icon,
#site-header .ast-header-search,
#site-header .ast-header-search-wrap,
#mobile-dropdown .search-toggle-li,
#mobile-dropdown .ast-search-menu-icon,
.sidr-class-search-toggle,
.sidr-class-search-toggle-li {
  display: none !important;
}

/* Marches publics (page 35): enforce enhanced portal cards even if old class names are cached */
body.page-id-35 .dcv-header {
  background: linear-gradient(120deg, rgba(13, 46, 75, 0.75), rgba(29, 95, 148, 0.62)), url('/wp/wp-content/uploads/2026/03/marches-publics.png') center 20% / cover no-repeat, url('/wp-content/uploads/2026/03/marches-publics.png') center 20% / cover no-repeat !important;
}

body.page-id-35 .mp-tenders-section,
body.page-id-35 .tenders-section {
  background: #f3f6fb !important;
}

body.page-id-35 .mp-card,
body.page-id-35 .tender-card {
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

body.page-id-35 .mp-card:hover,
body.page-id-35 .tender-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14) !important;
}

body.page-id-35 .mp-status-badge,
body.page-id-35 .status-badge {
  border: 0 !important;
  border-radius: 999px !important;
  padding: 0.28rem 0.62rem !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
}

body.page-id-35 .status-open {
  background: #dcfce7 !important;
  color: #166534 !important;
}

body.page-id-35 .status-closed {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
}

body.page-id-35 .status-cancelled {
  background: #e5e7eb !important;
  color: #4b5563 !important;
}

body.page-id-35 .detail-grid,
body.page-id-35 .meta-grid {
  gap: 10px !important;
}

body.page-id-35 .detail-item,
body.page-id-35 .meta-chip {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

body.page-id-35 .detail-label,
body.page-id-35 .meta-label {
  color: #64748b !important;
  font-size: 0.74rem !important;
}

body.page-id-35 .detail-value,
body.page-id-35 .meta-value {
  color: #0f172a !important;
  font-size: 0.86rem !important;
  font-weight: 700 !important;
}

body.page-id-35 .mp-action-btn,
body.page-id-35 .action-btn {
  border-radius: 10px !important;
  box-shadow: none !important;
}
