/* Le coin réflexif — v2
   Conçu sur la même architecture que Programmes v1. */

.site-header.home-header {
  background: #ffffff !important;
}

.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 0 9px;
  border: 0;
  background: transparent;
  color: #1e2a37;
  font: inherit;
  cursor: pointer;
}

.nav-dropdown-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--home-green);
  transform: translateX(-50%);
  transition: width 180ms ease;
}

.nav-dropdown:hover .nav-dropdown-toggle::after,
.nav-dropdown:focus-within .nav-dropdown-toggle::after,
.nav-dropdown-toggle.is-current::after {
  width: 100%;
}

.nav-dropdown-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 50%;
  min-width: 245px;
  padding: 9px 0;
  border: 1px solid var(--home-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(23, 55, 95, 0.10);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.home-header .nav-dropdown-menu a {
  display: block;
  padding: 10px 18px;
  color: var(--home-text);
  white-space: nowrap;
}

.home-header .nav-dropdown-menu a::after {
  display: none;
}

.home-header .nav-dropdown-menu a:hover,
.home-header .nav-dropdown-menu a:focus-visible,
.home-header .nav-dropdown-menu a.is-current {
  background: var(--home-hero-blue);
  color: var(--home-navy);
}

.service-kicker {
  margin: 0 0 14px;
  color: var(--home-green-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* Hero */
.reflexive-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(320px, 0.9fr);
  gap: clamp(38px, 6vw, 88px);
  align-items: center;
  padding: clamp(54px, 7vw, 92px) clamp(28px, 6vw, 92px)
           clamp(112px, 11vw, 150px);
  background: var(--home-hero-blue);
}

.reflexive-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -2%;
  right: -2%;
  bottom: -1px;
  height: clamp(46px, 5.5vw, 78px);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100' preserveAspectRatio='none'%3E%3Cpath d='M0 58 C180 88 330 36 520 58 C720 82 845 98 1015 64 C1095 48 1150 50 1200 61 L1200 100 L0 100 Z' fill='%23fbfaf7'/%3E%3C/svg%3E")
    bottom center / 100% 100% no-repeat;
  pointer-events: none;
}

.reflexive-hero-copy {
  max-width: 810px;
}

.reflexive-hero h1 {
  max-width: 850px;
  margin: 0;
  color: var(--home-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 4.35vw, 4.85rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.reflexive-accent {
  display: block;
  width: 44px;
  height: 2px;
  margin: 20px 0 24px;
  background: var(--home-green);
}

.reflexive-hero-copy > p:last-child {
  max-width: 700px;
  margin: 0;
  font-size: clamp(1rem, 1.18vw, 1.12rem);
  line-height: 1.72;
}

.reflexive-hero-visual {
  position: relative;
  z-index: 0;
}

.reflexive-hero-visual img {
  display: block;
  width: min(100%, 530px);
  height: auto;
  margin-inline: auto;
  transform: translateX(calc(-22% - 50px)) scale(1.90);
  transform-origin: center center;
}

/* Ressources */
.resources-section {
  padding: clamp(76px, 9vw, 118px) clamp(28px, 6vw, 92px)
           clamp(90px, 10vw, 132px);
  background: var(--home-paper);
}

.resources-heading {
  max-width: 820px;
  margin: 0 auto clamp(52px, 6vw, 78px);
  text-align: center;
}

.resources-heading h2 {
  margin: 0;
  color: var(--home-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 3.2vw, 3.2rem);
  font-weight: 400;
  line-height: 1.15;
}

.resources-heading .reflexive-accent {
  margin-left: auto;
  margin-right: auto;
}

.resources-heading p {
  max-width: 680px;
  margin: 0 auto;
  color: var(--home-muted);
  line-height: 1.7;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(26px, 3.5vw, 46px);
  max-width: 1220px;
  margin: 0 auto;
}

.resource-card {
  position: relative;
  border: 1px solid var(--home-line);
  border-radius: 22px;
  padding: clamp(30px, 4vw, 52px);
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(23, 55, 95, 0.05);
}

.resource-card-featured {
  grid-column: 1 / -1;
  width: min(100%, 850px);
  justify-self: center;
}

.resource-type {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  color: var(--home-green-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.resource-type img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.resource-card h3 {
  max-width: 720px;
  margin: 0 0 28px;
  color: var(--home-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 400;
  line-height: 1.14;
}

.resource-summary,
.resource-more-content p {
  max-width: 760px;
  font-size: 1rem;
  line-height: 1.76;
}

.resource-summary {
  margin: 0;
}

/* Voir plus / Voir moins */
.resource-more {
  margin-top: 22px;
}

.resource-more summary {
  display: inline-flex;
  list-style: none;
  align-items: center;
  color: var(--home-navy);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.resource-more summary::-webkit-details-marker {
  display: none;
}

.resource-more summary:hover,
.resource-more summary:focus-visible {
  color: var(--home-green-dark);
}

.resource-more .label-less {
  display: none;
}

.resource-more[open] .label-more {
  display: none;
}

.resource-more[open] .label-less {
  display: inline;
}

.resource-more-content {
  max-width: 770px;
  padding-top: 22px;
}

.resource-more-content p {
  margin: 0;
}

/* Téléchargement */
.resource-actions {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--home-line);
}

.resource-download-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--home-navy);
  font-weight: 700;
  text-decoration: none;
}

.resource-download-link:hover,
.resource-download-link:focus-visible {
  color: var(--home-green-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.reflexive-discovery {
  margin-top: 0;
}

@media (max-width: 900px) {
  .reflexive-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 112px;
  }

  .reflexive-hero-visual {
    max-width: 560px;
    margin-inline: auto;
  }

  .reflexive-hero-visual img {
    transform: scale(1.08);
    transform-origin: center center;
  }

  .resources-grid {
    grid-template-columns: 1fr;
  }

  .resource-card-featured {
    grid-column: auto;
    width: 100%;
  }
}

@media (max-width: 700px) {
  .nav-dropdown {
    width: 100%;
    display: block;
  }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: flex-start;
    padding: 8px 0;
  }

  .nav-dropdown-toggle::after {
    left: 0;
    transform: none;
  }

  .nav-dropdown:hover .nav-dropdown-toggle::after,
  .nav-dropdown:focus-within .nav-dropdown-toggle::after,
  .nav-dropdown-toggle.is-current::after {
    width: 48px;
  }

  .nav-dropdown-menu {
    position: static;
    min-width: 0;
    padding: 4px 0 4px 18px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }

  .nav-dropdown.is-open .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu {
    display: block;
  }

  .home-header .nav-dropdown-menu a {
    padding: 8px 0;
    white-space: normal;
  }

  .reflexive-hero,
  .resources-section {
    padding-left: 22px;
    padding-right: 22px;
  }

  .reflexive-hero h1 {
    font-size: clamp(2.35rem, 10vw, 3.45rem);
  }

  .reflexive-hero-visual img {
    transform: none;
  }

  .resource-card {
    border-radius: 18px;
    padding: 28px 24px;
  }

  .resource-card h3 {
    font-size: clamp(1.8rem, 8vw, 2.45rem);
  }
}


/* Infolettre — variation du bandeau standard
   Même structure et même vague; seul le fond devient un vert doux. */
.newsletter-discovery {
  background: #e5ecd9;
}

/* Correction ciblée : sous-menu dans le flux à 390 px. */
@media (max-width: 700px) {
  .main-nav .nav-dropdown { width: 100%; min-width: 0; }
  .main-nav .nav-dropdown-menu {
    position: static; left: 0; right: auto; top: auto;
    width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box;
    margin: 0; padding: 4px 0 4px 18px;
    transform: none !important;
  }
  .main-nav .nav-dropdown-menu a { white-space: normal; overflow-wrap: anywhere; }
}
