/* ==========================================================================
   Accueil — hero slider + à la une (design AFECCAV)
   ========================================================================== */

body.afeccav-home-hub {
  --afeccav-header-offset: 168px;
  --afeccav-hero-min: max(300px, calc(100svh - var(--afeccav-header-offset)));
}

body.afeccav-home-hub .mg-fea-area.afeccav-front-main {
  margin: 0;
  padding: 0;
  background: var(--afeccav-ice, #f4f7fb);
}

body.afeccav-home-hub .mg-fea-area.afeccav-front-main .overlay {
  padding: 0;
  margin: 0;
  background: transparent;
}

.afeccav-front-main .container-fluid.afeccav-front-below {
  padding-top: 2.25rem;
  padding-bottom: 2rem;
}

/* —— Hero slider pleine largeur —— */

.afeccav-front-slider-band {
  width: 100%;
  min-height: var(--afeccav-hero-min);
  display: flex;
  flex-direction: column;
  background: var(--afeccav-blue, #202f5b);
}

.afeccav-front-slider {
  width: 100%;
  flex: 1 1 auto;
  min-height: var(--afeccav-hero-min);
}

.afeccav-front-main .afeccav-association-slider {
  width: 100%;
  margin: 0;
  position: relative;
  min-height: var(--afeccav-hero-min);
  height: 100%;
  --afeccav-slider-arrow-size: 2.75rem;
  --afeccav-slider-arrow-gap: 0.75rem;
  --afeccav-slider-arrow-clear: calc(var(--afeccav-gutter, 1rem) + var(--afeccav-slider-arrow-size) + var(--afeccav-slider-arrow-gap));
}

.afeccav-front-main .afeccav-association-slider .owl-wrapper-outer,
.afeccav-front-main .afeccav-association-slider .owl-wrapper,
.afeccav-front-main .afeccav-association-slider .owl-item,
.afeccav-front-main .afeccav-association-slider .owl-item > .item,
.afeccav-front-main .afeccav-association-slider .afeccav-slider-slide,
.afeccav-front-main .afeccav-association-slider .afeccav-slider-slide-link {
  min-height: var(--afeccav-hero-min);
  height: 100%;
}

.afeccav-front-main .afeccav-association-slider .owl-item > .item {
  display: block;
}

.afeccav-front-main .afeccav-association-slider .owl-wrapper-outer {
  overflow: hidden;
  background: var(--afeccav-blue, #202f5b);
}

.afeccav-front-main .afeccav-association-slider .owl-controls {
  position: static;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.afeccav-front-main .afeccav-association-slider .owl-pagination {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1rem;
  margin: 0;
  text-align: center;
  z-index: 4;
  pointer-events: auto;
}

.afeccav-front-main .afeccav-association-slider .owl-page span {
  width: 8px;
  height: 8px;
  margin: 4px 4px;
  background: rgba(255, 255, 255, 0.45) !important;
  opacity: 1 !important;
}

.afeccav-front-main .afeccav-association-slider .owl-page.active span {
  background: #fff !important;
  transform: scale(1.15);
}

.afeccav-front-main .afeccav-association-slider .owl-buttons {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  bottom: auto;
  margin: 0;
  padding: 0 var(--afeccav-gutter, 1rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 4;
  opacity: 1 !important;
}

.afeccav-front-main .afeccav-association-slider .owl-buttons .owl-prev,
.afeccav-front-main .afeccav-association-slider .owl-buttons .owl-next {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  margin: 0 !important;
  opacity: 1 !important;
}

.afeccav-front-main .afeccav-association-slider:hover .owl-buttons .owl-prev,
.afeccav-front-main .afeccav-association-slider:hover .owl-buttons .owl-next {
  left: auto !important;
  right: auto !important;
}

.afeccav-front-main .afeccav-association-slider .owl-buttons div {
  pointer-events: auto;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 2.75rem !important;
  height: 2.75rem !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border: 0 !important;
  box-shadow: var(--afeccav-shadow, 0 4px 24px rgba(32, 47, 91, 0.15));
  color: var(--afeccav-blue, #202f5b) !important;
  font-size: 1.5rem !important;
  line-height: 1 !important;
  opacity: 1 !important;
  transition: transform 0.15s ease, color 0.15s ease;
}

.afeccav-front-main .afeccav-association-slider .owl-buttons div:hover {
  color: var(--afeccav-blue, #202f5b) !important;
  transform: scale(1.06);
}

/* Slides */

.afeccav-slider-slide {
  margin: 0;
  background: var(--afeccav-blue, #202f5b);
}

.afeccav-slider-slide-link {
  display: block;
  color: inherit !important;
  text-decoration: none !important;
}

.afeccav-slider-slide-media {
  position: relative;
  overflow: hidden;
  min-height: var(--afeccav-hero-min, max(300px, calc(100svh - 168px)));
  height: 100%;
  background: var(--afeccav-blue, #202f5b);
}

.afeccav-slider-slide-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.afeccav-slider-slide-media.is-fallback {
  background: linear-gradient(135deg, var(--afeccav-blue-mid, #2a3d6e) 0%, var(--afeccav-blue, #202f5b) 55%, var(--afeccav-blue-dark, #182448) 100%);
}

.afeccav-slider-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 15, 30, 0.95) 0%,
    rgba(10, 15, 30, 0.45) 38%,
    rgba(10, 15, 30, 0.12) 68%,
    rgba(10, 15, 30, 0.02) 100%
  );
}

.afeccav-slider-slide-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 0 2.5rem;
  z-index: 1;
}

.afeccav-slider-slide-body .container-fluid {
  padding-left: var(--afeccav-gutter, 1rem);
  padding-right: var(--afeccav-gutter, 1rem);
}

.afeccav-slider-slide-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
  max-width: 42rem;
}

.afeccav-slider-slide-cat {
  display: inline-block;
  margin-bottom: 0;
  padding: 0.2rem 0.55rem;
  background: var(--afeccav-blue, #202f5b);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.35;
}

.afeccav-slider-slide-title {
  margin: 0 0 0.4rem;
  max-width: 42rem;
  font-family: var(--afeccav-font, 'Montserrat', sans-serif);
  font-size: clamp(1.15rem, 2.6vw, 1.75rem);
  line-height: 1.28;
  font-weight: 700;
  color: #fff;
}

.afeccav-slider-slide-date {
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
}

/* —— Slide d'introduction (réseau de particules) —— */

.afeccav-slider-slide.is-intro {
  background: linear-gradient(
    125deg,
    var(--afeccav-blue-dark, #182448) 0%,
    var(--afeccav-blue, #202f5b) 42%,
    var(--afeccav-blue-mid, #2a3d6e) 100%
  );
}

.afeccav-slider-intro-media {
  background: transparent;
}

.afeccav-slider-intro-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.afeccav-slider-intro-particles__canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.afeccav-slider-intro-overlay {
  z-index: 1;
  background: linear-gradient(
    105deg,
    rgba(10, 15, 30, 0.88) 0%,
    rgba(10, 15, 30, 0.55) 42%,
    rgba(10, 15, 30, 0.18) 68%,
    rgba(10, 15, 30, 0.04) 100%
  );
}

.afeccav-slider-intro-body {
  display: flex;
  align-items: center;
  inset: 0;
  bottom: auto;
  height: 100%;
  padding: clamp(1.5rem, 4vw, 2.75rem) 0;
  z-index: 2;
}

.afeccav-slider-intro-body .container-fluid {
  width: 100%;
}

.afeccav-slider-intro-content {
  position: relative;
  z-index: 2;
  max-width: 36rem;
  margin-left: var(--afeccav-slider-arrow-clear);
  margin-right: var(--afeccav-slider-arrow-clear);
  box-sizing: border-box;
}

.afeccav-slider-intro-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.afeccav-slider-intro-title {
  margin: 0 0 0.65rem;
  font-family: var(--afeccav-font, 'Montserrat', sans-serif);
  font-size: clamp(2rem, 5.5vw, 3.35rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
}

.afeccav-slider-intro-wordmark {
  display: inline-block;
  text-transform: lowercase;
}

.afeccav-slider-intro-tagline {
  margin: 0 0 1rem;
  max-width: 38rem;
  font-size: clamp(0.92rem, 1.8vw, 1.08rem);
  line-height: 1.55;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
}

.afeccav-slider-intro-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.35rem;
  padding: 0;
  list-style: none;
}

.afeccav-slider-intro-pills li {
  margin: 0;
}

.afeccav-slider-intro-pills span {
  display: block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--pill-color, #fff);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.afeccav-slider-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.afeccav-slider-intro-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.55rem 1.15rem;
  border-radius: 4px;
  font-family: var(--afeccav-font, 'Montserrat', sans-serif);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.afeccav-slider-intro-cta.is-primary {
  background: #fff;
  color: var(--afeccav-blue, #202f5b) !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

.afeccav-slider-intro-cta.is-primary:hover {
  transform: translateY(-1px);
  background: var(--afeccav-blue-soft, #e8ebf2);
}

.afeccav-slider-intro-cta.is-secondary {
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08);
}

.afeccav-slider-intro-cta.is-secondary:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

/* —— Section sous le hero —— */

.afeccav-front-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.35rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--afeccav-border-soft, #e8edf5);
}

.afeccav-front-section-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--afeccav-blue, #202f5b);
}

.afeccav-front-section-title {
  margin: 0;
  font-family: var(--afeccav-font, 'Montserrat', sans-serif);
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 700;
  color: var(--afeccav-blue, #202f5b);
}

.afeccav-front-section-more {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--afeccav-blue, #202f5b) !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.afeccav-front-section-more:hover {
  text-decoration: underline !important;
}

/* —— Widgets —— */

.afeccav-front-widgets > [class*="col-"] {
  margin-bottom: 1rem;
}

.afeccav-front-widget {
  height: 100%;
  padding: 1.15rem 1.2rem;
  background: var(--afeccav-surface, #fff);
  border: 1px solid var(--afeccav-border, #d8e2ef);
  border-radius: var(--afeccav-radius, 6px);
  box-shadow: var(--afeccav-shadow, 0 4px 24px rgba(32, 47, 91, 0.06));
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.afeccav-front-widget:hover {
  border-color: #c5d4ea;
  box-shadow: 0 8px 28px rgba(17, 81, 211, 0.1);
}

.afeccav-front-widget.is-highlight {
  background: linear-gradient(160deg, #f0f5ff 0%, #fff 100%);
  border-color: #c5d8f5;
}

.afeccav-front-widget-title {
  margin: 0 0 0.6rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--afeccav-blue-soft, #e8f0fd);
  font-family: var(--afeccav-font, 'Montserrat', sans-serif);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--afeccav-blue, #202f5b);
  line-height: 1.3;
}

.afeccav-front-widget-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.5rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--afeccav-muted, #5a6478);
}

.afeccav-front-widget-meta span {
  padding: 0.12rem 0.5rem;
  border-radius: 3px;
  background: var(--afeccav-blue-soft, #e8f0fd);
  color: var(--afeccav-blue, #202f5b);
}

.afeccav-front-widget-headline {
  margin: 0 0 0.55rem;
  font-size: 0.94rem;
  line-height: 1.45;
  font-weight: 600;
  color: var(--afeccav-text, #2c3448);
}

.afeccav-front-widget-headline a {
  color: inherit !important;
  text-decoration: none !important;
}

.afeccav-front-widget-headline a:hover {
  color: var(--afeccav-blue, #202f5b) !important;
}

.afeccav-front-widget-note {
  margin: 0 0 0.6rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--afeccav-muted, #5a6478);
}

.afeccav-front-widget-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--afeccav-blue, #202f5b) !important;
  text-decoration: none !important;
}

.afeccav-front-widget-link::after {
  content: "→";
  transition: transform 0.15s ease;
}

.afeccav-front-widget-link:hover::after {
  transform: translateX(3px);
}

.afeccav-front-widget-link:hover {
  text-decoration: underline !important;
}

.afeccav-front-widget-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

/* —— Bandeau repères institutionnels —— */

.afeccav-front-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 1.75rem;
  background: var(--afeccav-blue, #202f5b);
  border-radius: var(--afeccav-radius, 6px);
  overflow: hidden;
}

.afeccav-front-stat {
  padding: 1rem 0.85rem;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.afeccav-front-stat:last-child {
  border-right: 0;
}

.afeccav-front-stat-value {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--afeccav-font, 'Montserrat', sans-serif);
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  font-weight: 700;
  color: #fff;
}

.afeccav-front-stat-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.35;
}

/* —— Responsive —— */

@media (max-width: 991px) {
  body.afeccav-home-hub {
    --afeccav-header-offset: 152px;
  }

  .afeccav-slider-intro-overlay {
    background: linear-gradient(
      to top,
      rgba(10, 15, 30, 0.9) 0%,
      rgba(10, 15, 30, 0.5) 50%,
      rgba(10, 15, 30, 0.15) 100%
    );
  }

  .afeccav-slider-intro-body {
    align-items: center;
    padding-bottom: clamp(2rem, 5vh, 3.5rem);
  }

  .afeccav-slider-slide-body {
    padding-bottom: 2.25rem;
  }
}

@media (max-width: 640px) {
  body.afeccav-home-hub {
    --afeccav-header-offset: 136px;
  }

  .afeccav-slider-intro-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .afeccav-slider-intro-cta {
    width: 100%;
  }

  .afeccav-front-main .container-fluid.afeccav-front-below {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .afeccav-front-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .afeccav-front-stat:nth-child(2) {
    border-right: 0;
  }

  .afeccav-front-stat:nth-child(1),
  .afeccav-front-stat:nth-child(2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .afeccav-slider-slide-media {
    min-height: var(--afeccav-hero-min);
  }

  .afeccav-front-main .afeccav-association-slider .owl-buttons div {
    width: 2.35rem !important;
    height: 2.35rem !important;
  }

  .afeccav-front-main .afeccav-association-slider {
    --afeccav-slider-arrow-size: 2.35rem;
    --afeccav-slider-arrow-gap: 0.55rem;
  }
}
