body.afeccav-home-hub .mg-tpt-tag-area,
body.afeccav-home-hub .mg-latest-news-sec,
body.afeccav-home-hub .mg-breadcrumb-section {
  display: none;
}

body.afeccav-home-hub #content .col-md-8 {
  flex: 0 0 100%;
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

body.afeccav-home-hub #content aside.col-md-4 {
  display: none;
}

body.afeccav-home-hub #content > .container-fluid {
  padding-left: 0;
  padding-right: 0;
  background: var(--afeccav-ice, #f4f7fb);
}

body.afeccav-home-hub #content .mg-card-box {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.afeccav-home-wrap {
  max-width: none;
  margin: 0;
  padding: 2.5rem var(--afeccav-gutter, 1rem) 3rem;
  color: var(--afeccav-text, #2c3448);
  line-height: 1.65;
  background: var(--afeccav-ice, #f4f7fb);
}

/* —— Hero institutionnel —— */

.afeccav-home-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 0;
  padding: clamp(2rem, 5vw, 3.25rem) clamp(1rem, 4vw, 2.5rem);
  background: linear-gradient(135deg, var(--afeccav-blue-dark, #182448) 0%, var(--afeccav-blue, #202f5b) 48%, var(--afeccav-blue-mid, #2a3d6e) 100%);
  color: #fff;
}

.afeccav-home-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(17, 81, 211, 0.45) 0, transparent 42%),
    radial-gradient(circle at 88% 10%, rgba(255, 255, 255, 0.12) 0, transparent 35%),
    linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.04) 50%, transparent 100%);
  pointer-events: none;
}

.afeccav-home-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -12deg,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 48px
  );
}

.afeccav-home-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
}

.afeccav-home-logo {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.afeccav-home-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.afeccav-home-title {
  margin: 0 0 1rem;
  font-size: clamp(1.45rem, 3.2vw, 2.15rem);
  line-height: 1.22;
  font-weight: 700;
  color: #fff;
}

.afeccav-home-lead {
  margin: 0 0 1.35rem;
  max-width: 52rem;
  font-size: clamp(0.98rem, 1.6vw, 1.08rem);
  color: rgba(255, 255, 255, 0.86);
}

.afeccav-home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.afeccav-home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  border-radius: var(--afeccav-radius, 6px);
  border: 1px solid transparent;
  background: #fff;
  color: var(--afeccav-navy) !important;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.afeccav-home-btn:hover,
.afeccav-home-btn:focus {
  transform: translateY(-1px);
  outline: none;
}

.afeccav-home-btn.is-primary {
  background: var(--afeccav-blue);
  border-color: var(--afeccav-blue);
  color: #fff !important;
}

.afeccav-home-btn.is-primary:hover,
.afeccav-home-btn.is-primary:focus {
  background: var(--afeccav-blue-dark);
  border-color: var(--afeccav-blue-dark);
  color: #fff !important;
}

.afeccav-home-btn.is-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff !important;
}

.afeccav-home-btn.is-ghost:hover,
.afeccav-home-btn.is-ghost:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff !important;
}

/* —— Bandeau chiffres clés —— */

.afeccav-home-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  background: #fff;
  border-bottom: 1px solid var(--afeccav-border);
  box-shadow: 0 8px 24px rgba(32, 47, 91, 0.06);
}

.afeccav-home-stat {
  margin: 0;
  padding: 1.1rem 1rem;
  text-align: center;
  border-right: 1px solid var(--afeccav-border);
}

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

.afeccav-home-stat-value {
  display: block;
  margin-bottom: 0.2rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 800;
  color: var(--afeccav-navy);
  line-height: 1.2;
}

.afeccav-home-stat-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--afeccav-muted);
  line-height: 1.35;
}

/* —— Sections communes —— */

.afeccav-home-pillars,
.afeccav-home-news,
.afeccav-home-spotlight {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.afeccav-home-pillars {
  padding-top: 0;
  padding-bottom: 0.5rem;
}

.afeccav-home-section-head {
  margin: 0 0 1.35rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--afeccav-border-soft, #e8edf5);
}

.afeccav-home-section-head.is-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

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

.afeccav-home-section-lead {
  margin: 0;
  color: var(--afeccav-muted);
  font-size: 0.96rem;
}

.afeccav-home-more {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--afeccav-blue) !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.afeccav-home-more:hover,
.afeccav-home-more:focus {
  text-decoration: underline !important;
}

/* —— Piliers —— */

.afeccav-home-pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.afeccav-home-pillar {
  position: relative;
  margin: 0;
  padding: 1.2rem 1.15rem 1.1rem;
  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: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.afeccav-home-pillar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.15rem;
  right: 1.15rem;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--afeccav-blue);
}

.afeccav-home-pillar[data-pillar="map"]::before {
  background: #2d6cdf;
}

.afeccav-home-pillar[data-pillar="colloques"]::before {
  background: #3b82c4;
}

.afeccav-home-pillar[data-pillar="annonces"]::before {
  background: #5b8fd9;
}

.afeccav-home-pillar:hover {
  transform: translateY(-3px);
  border-color: #cdd9ee;
  box-shadow: 0 10px 28px rgba(17, 81, 211, 0.1);
}

.afeccav-home-pillar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 0.85rem;
  border-radius: 10px;
  background: var(--afeccav-ice);
  color: var(--afeccav-blue);
}

.afeccav-home-pillar-icon svg,
.afeccav-home-pillar-icon .afeccav-icon {
  width: 1.35rem;
  height: 1.35rem;
}

.afeccav-home-pillar-icon svg {
  fill: currentColor;
}

.afeccav-home-pillar-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--afeccav-navy);
}

.afeccav-home-pillar-desc {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--afeccav-muted);
  line-height: 1.5;
}

.afeccav-home-pillar-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.afeccav-home-pillar-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--afeccav-blue) !important;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none !important;
}

.afeccav-home-pillar-links a::after {
  content: "→";
  font-size: 0.82rem;
  transition: transform 0.15s ease;
}

.afeccav-home-pillar-links a:hover::after,
.afeccav-home-pillar-links a:focus::after {
  transform: translateX(3px);
}

/* —— Spotlight (événement + MAP) —— */

.afeccav-home-spotlight {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.afeccav-home-panel {
  margin: 0;
  padding: 1.2rem 1.15rem;
  background: #fff;
  border: 1px solid var(--afeccav-border);
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(32, 47, 91, 0.05);
}

.afeccav-home-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--afeccav-border);
}

.afeccav-home-panel-title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--afeccav-navy);
}

.afeccav-home-panel-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--afeccav-muted);
}

.afeccav-home-event-card,
.afeccav-home-feature-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.afeccav-home-event-datebox,
.afeccav-home-feature-cover {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 7.5rem;
  min-height: 7.5rem;
  padding: 0.75rem;
  border-radius: 12px;
  text-align: center;
}

.afeccav-home-event-datebox {
  background: linear-gradient(160deg, #eef4ff 0%, #f8fbff 100%);
  border: 1px solid #d8e6fb;
}

.afeccav-home-feature-cover {
  background: linear-gradient(160deg, var(--afeccav-blue, #202f5b) 0%, var(--afeccav-blue-mid, #2a3d6e) 100%);
  color: #fff;
}

.afeccav-home-event-type {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #fff;
  color: var(--afeccav-blue);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.afeccav-home-event-datebox time {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--afeccav-navy);
  line-height: 1.35;
}

.afeccav-home-event-body,
.afeccav-home-feature-body {
  min-width: 0;
  flex: 1;
}

.afeccav-home-event-body h3,
.afeccav-home-feature-body h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
  line-height: 1.4;
}

.afeccav-home-event-body h3 a,
.afeccav-home-feature-body h3 a {
  color: var(--afeccav-navy) !important;
  text-decoration: none !important;
}

.afeccav-home-event-body h3 a:hover,
.afeccav-home-feature-body h3 a:hover {
  color: var(--afeccav-blue) !important;
}

.afeccav-home-event-location {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--afeccav-muted);
}

.afeccav-home-issue-num {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
}

.afeccav-home-issue-year {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.85;
}

.afeccav-home-issue-brand {
  margin-top: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.afeccav-home-feature-articles {
  margin: 0 0 0.85rem;
  padding-left: 1rem;
}

.afeccav-home-feature-articles li {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.afeccav-home-feature-articles a {
  color: var(--afeccav-blue) !important;
  font-weight: 600;
  text-decoration: none !important;
}

.afeccav-home-feature-articles span {
  color: var(--afeccav-muted);
}

.afeccav-home-feature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.afeccav-home-panel-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--afeccav-blue) !important;
  text-decoration: none !important;
}

.afeccav-home-panel-link.is-muted {
  color: var(--afeccav-muted) !important;
}

.afeccav-home-panel-link:hover,
.afeccav-home-panel-link:focus {
  text-decoration: underline !important;
}

/* —— Actualités —— */

.afeccav-home-news {
  padding-bottom: 2rem;
}

.afeccav-home-news-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.afeccav-home-news-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--afeccav-border);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.afeccav-home-news-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #eef4ff 0%, #f8fafc 100%);
  text-decoration: none !important;
}

.afeccav-home-news-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.afeccav-home-news-thumb.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.afeccav-home-news-thumb-fallback {
  color: var(--afeccav-blue);
  opacity: 0.35;
}

.afeccav-home-news-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
  padding: 1rem;
}

.afeccav-home-news-card:hover {
  border-color: #cdd9ee;
  box-shadow: 0 8px 22px rgba(32, 47, 91, 0.07);
}

.afeccav-home-news-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.afeccav-home-news-cat {
  display: inline-block;
  align-self: flex-start;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--afeccav-blue);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.afeccav-home-news-card time {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--afeccav-muted);
}

.afeccav-home-news-card h3 {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.4;
}

.afeccav-home-news-card h3 a {
  color: var(--afeccav-navy) !important;
  text-decoration: none !important;
}

.afeccav-home-news-card h3 a:hover {
  color: var(--afeccav-blue) !important;
}

.afeccav-home-news-card p {
  margin: 0;
  flex: 1;
  font-size: 0.86rem;
  color: var(--afeccav-muted);
  line-height: 1.5;
}

.afeccav-home-news-read {
  margin-top: 0.25rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--afeccav-blue) !important;
  text-decoration: none !important;
}

/* —— Derniers numéros MAP —— */

.afeccav-home-map-issues {
  padding-bottom: 2rem;
}

.afeccav-home-map-issues-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.afeccav-home-map-issue-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--afeccav-border);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.afeccav-home-map-issue-card.is-latest {
  border-color: #cdd9ee;
  box-shadow: 0 6px 20px rgba(32, 47, 91, 0.06);
}

.afeccav-home-map-issue-card:hover {
  border-color: #cdd9ee;
  box-shadow: 0 8px 22px rgba(32, 47, 91, 0.07);
}

.afeccav-home-map-issue-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 6.5rem;
  padding: 1rem;
  background: linear-gradient(160deg, var(--afeccav-blue, #202f5b) 0%, var(--afeccav-blue-mid, #2a3d6e) 100%);
  color: #fff;
  text-align: center;
}

.afeccav-home-map-issue-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  padding: 1rem;
}

.afeccav-home-map-issue-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--afeccav-muted);
}

.afeccav-home-map-issue-title {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.4;
}

.afeccav-home-map-issue-title a {
  color: var(--afeccav-navy) !important;
  text-decoration: none !important;
}

.afeccav-home-map-issue-title a:hover,
.afeccav-home-map-issue-title a:focus {
  color: var(--afeccav-blue) !important;
}

.afeccav-home-map-issue-count {
  margin: 0;
  font-size: 0.86rem;
  color: var(--afeccav-muted);
}

.afeccav-home-map-issue-link {
  margin-top: auto;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--afeccav-blue) !important;
  text-decoration: none !important;
}

/* —— Bandeau institutionnel —— */

.afeccav-home-institution {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  max-width: none;
  margin: 2rem 0 0;
  padding: 1.5rem 1.35rem;
  border-radius: var(--afeccav-radius, 6px);
  background: linear-gradient(135deg, var(--afeccav-blue, #202f5b) 0%, var(--afeccav-blue-mid, #2a3d6e) 100%);
  border: 0;
  color: #fff;
}

.afeccav-home-institution-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.afeccav-home-institution-lead {
  margin: 0;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  line-height: 1.55;
}

.afeccav-home-institution-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.afeccav-home-institution .afeccav-home-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff !important;
}

.afeccav-home-institution .afeccav-home-btn.is-primary {
  background: var(--afeccav-blue, #202f5b);
  border-color: var(--afeccav-blue, #202f5b);
}

/* —— Responsive —— */

@media (max-width: 1024px) {
  .afeccav-home-pillars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .afeccav-home-map-issues-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .afeccav-home-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .afeccav-home-hero-brand {
    display: flex;
    justify-content: center;
  }

  .afeccav-home-hero-actions {
    justify-content: center;
  }

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

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

  .afeccav-home-stat:nth-child(1),
  .afeccav-home-stat:nth-child(2) {
    border-bottom: 1px solid var(--afeccav-border);
  }

  .afeccav-home-spotlight {
    grid-template-columns: 1fr;
  }

  .afeccav-home-event-card,
  .afeccav-home-feature-card {
    flex-direction: column;
  }

  .afeccav-home-event-datebox,
  .afeccav-home-feature-cover {
    width: 100%;
    min-height: auto;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
  }

  .afeccav-home-institution {
    flex-direction: column;
    align-items: flex-start;
  }

  .afeccav-home-institution-actions {
    width: 100%;
  }

  .afeccav-home-institution-actions .afeccav-home-btn {
    flex: 1;
  }
}

@media (max-width: 640px) {
  .afeccav-home-pillars-grid,
  .afeccav-home-news-grid,
  .afeccav-home-map-issues-grid {
    grid-template-columns: 1fr;
  }

  .afeccav-home-stats {
    grid-template-columns: 1fr;
  }

  .afeccav-home-stat {
    border-right: 0;
    border-bottom: 1px solid var(--afeccav-border);
  }

  .afeccav-home-stat:last-child {
    border-bottom: 0;
  }

  .afeccav-home-hero-actions,
  .afeccav-home-institution-actions {
    flex-direction: column;
  }

  .afeccav-home-btn {
    width: 100%;
  }
}
