/*
 * ANFPG Impact 6.2.0 — couche de stabilisation de production
 *
 * Ce fichier est chargé EN DERNIER. Il regroupe les règles validées lors de
 * la recette finale afin d'éviter l'empilement de micro-correctifs dans
 * production.css. Toute évolution future d'un composant ci-dessous doit être
 * faite ici comme une modification cohérente du composant complet.
 */

/* 1. Conteneurs éditoriaux vides : ils ne doivent jamais produire une carte. */
.entry-content .anfpg-feature-band:empty,
.entry-content .anfpg-callout:empty,
.entry-content .anfpg-info-card:empty { display: none !important; }

/* 2. Notre organisation : structure native, stable sur tous les écrans. */
.entry-page--notre-organisation .entry-content > .anfpg-longform-blocks,
.entry-page--notre-organisation .entry-content .anfpg-longform-blocks {
  grid-template-columns: 1fr !important;
  max-width: 1240px !important;
  gap: 24px !important;
}
.entry-page--notre-organisation .anfpg-longform-blocks > .anfpg-content-block {
  width: 100% !important;
  max-width: none !important;
}
.entry-page--notre-organisation .anfpg-info-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 28px !important;
  width: 100% !important;
}
.entry-page--notre-organisation .anfpg-info-card {
  min-width: 0 !important;
  padding: 30px 32px !important;
}
.entry-page--notre-organisation .anfpg-info-card h3 {
  font-size: clamp(1.55rem, 2vw, 2.05rem) !important;
  line-height: 1.12 !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}
.entry-page--notre-organisation .anfpg-info-card p {
  font-size: 1rem !important;
  line-height: 1.65 !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}
.entry-page--notre-organisation .anfpg-callout {
  width: 100% !important;
  max-width: none !important;
  margin: 24px 0 32px !important;
  padding: 28px 30px !important;
  background: #f2faf6 !important;
  color: var(--navy-900) !important;
  border: 1px solid rgba(31,157,102,.22) !important;
  border-radius: 22px !important;
  box-shadow: 0 10px 28px rgba(4,19,47,.04) !important;
}
.entry-page--notre-organisation .anfpg-callout h2,
.entry-page--notre-organisation .anfpg-callout h3 {
  color: var(--navy-900) !important;
  opacity: 1 !important;
}
.entry-page--notre-organisation .anfpg-callout p,
.entry-page--notre-organisation .anfpg-callout li,
.entry-page--notre-organisation .anfpg-callout strong {
  color: var(--ink-700) !important;
  opacity: 1 !important;
}
.entry-page--notre-organisation .anfpg-callout p {
  max-width: 900px !important;
  margin-bottom: 18px !important;
}
.entry-page--notre-organisation .anfpg-callout .wp-block-buttons { margin-top: 18px !important; }
.entry-page--notre-organisation .anfpg-callout .wp-block-button__link { color: var(--navy-900) !important; }

@media (min-width: 701px) and (max-width: 1050px) {
  .entry-page--notre-organisation .anfpg-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .entry-page--notre-organisation .anfpg-info-grid > .anfpg-info-card:last-child:nth-child(3) {
    grid-column: 1 / -1;
  }
}
@media (max-width: 700px) {
  .entry-page--notre-organisation {
    padding-top: 40px !important;
    padding-bottom: 36px !important;
  }
  .entry-page--notre-organisation .entry-content { display: block !important; }
  .entry-page--notre-organisation .entry-content > h2 {
    margin: 0 0 18px !important;
    font-size: clamp(1.65rem, 7vw, 2.05rem) !important;
    line-height: 1.15 !important;
  }
  .entry-page--notre-organisation .anfpg-info-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin: 0 0 22px !important;
  }
  .entry-page--notre-organisation .anfpg-info-card {
    padding: 20px !important;
    border-radius: 18px !important;
  }
  .entry-page--notre-organisation .anfpg-info-card h3 {
    margin: 0 0 8px !important;
    font-size: 1.32rem !important;
  }
  .entry-page--notre-organisation .anfpg-info-card p {
    margin: 0 !important;
    font-size: .98rem !important;
    line-height: 1.55 !important;
  }
  .entry-page--notre-organisation .anfpg-callout {
    margin: 20px 0 0 !important;
    padding: 22px 20px !important;
    border-radius: 18px !important;
  }
  .entry-page--notre-organisation .anfpg-callout h2,
  .entry-page--notre-organisation .anfpg-callout h3 {
    margin: 0 0 10px !important;
    font-size: 1.4rem !important;
    line-height: 1.2 !important;
  }
  .entry-page--notre-organisation .anfpg-callout p {
    margin: 0 0 16px !important;
    line-height: 1.55 !important;
  }
  .entry-page--notre-organisation .anfpg-callout .wp-block-buttons { margin: 0 !important; }
}

/* 3. Équipe : permanents et bénévoles — 5 / 3 / 1 profils. */
.governance-section--direction .permanent-team-grid,
.governance-section--volunteers .volunteer-team-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  margin-top: 26px;
}
.governance-section--direction .permanent-team-grid__item,
.governance-section--volunteers .volunteer-team-grid__item { min-width: 0; }
.governance-section--direction .permanent-team-grid__item > .governance-member-card,
.governance-section--volunteers .volunteer-team-grid__item > .governance-member-card {
  width: 100%;
  height: 100%;
}
.governance-section--direction .governance-member-card__body,
.governance-section--volunteers .governance-member-card__body { padding: 16px 14px 17px; }
.governance-section--direction .governance-member-card h3,
.governance-section--volunteers .governance-member-card h3 {
  font-size: 1rem;
  line-height: 1.18;
}
.governance-section--direction .governance-member-card__role,
.governance-section--volunteers .governance-member-card__role {
  font-size: .68rem;
  line-height: 1.35;
}
.governance-section--direction .governance-member-card__meta,
.governance-section--volunteers .governance-member-card__meta,
.governance-section--direction .governance-member-card__contact,
.governance-section--volunteers .governance-member-card__contact { font-size: .74rem; }
@media (min-width: 761px) and (max-width: 1199px) {
  .governance-section--direction .permanent-team-grid,
  .governance-section--volunteers .volunteer-team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}
@media (max-width: 760px) {
  .governance-section--direction .permanent-team-grid,
  .governance-section--volunteers .volunteer-team-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 18px;
  }
  .governance-section--direction .governance-member-card__body,
  .governance-section--volunteers .governance-member-card__body { padding: 20px; }
  .governance-section--direction .governance-member-card h3,
  .governance-section--volunteers .governance-member-card h3 { font-size: 1.18rem; }
}

/* 4. Actualités : l'image mise en avant est un média éditorial visible. */
.single-entry--post .single-post-featured-media {
  width: 100%;
  margin: 0 0 34px;
  padding: 0;
}
.single-entry--post .single-post-featured-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  border-radius: 24px;
  object-fit: contain;
  background: #f3f6f9;
  box-shadow: 0 14px 36px rgba(4,19,47,.08);
}
.single-entry--post .single-post-featured-media figcaption {
  margin-top: 9px;
  color: var(--ink-600);
  font-size: .84rem;
  line-height: 1.5;
}
@media (max-width: 680px) {
  .single-entry--post .single-post-featured-media { margin-bottom: 24px; }
  .single-entry--post .single-post-featured-media img { border-radius: 18px; }
}


/* 5. Actualités — vocabulaire Info, rubriques visibles et dernière actualité. */
.news-card__meta,
.news-latest__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 10px;
  color: var(--ink-500);
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .01em;
  text-transform: none;
}
.news-card__category,
.news-latest__category {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e9f7ef;
  color: var(--green-700, #147a50);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .055em;
  text-decoration: none;
  text-transform: uppercase;
}
.news-card__category:hover,
.news-latest__category:hover { background: #dff2e8; color: var(--green-700, #147a50); }
.news-card__meta-separator { color: var(--ink-400); }

.single-entry--post .news-single-rubric {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px 0 15px;
  color: rgba(255,255,255,.9);
  font-size: .86rem;
  font-weight: 750;
}
.single-entry--post .news-single-rubric span {
  color: var(--yellow-500);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.single-entry--post .news-single-rubric a {
  color: #fff;
  text-decoration: none;
}

.news-latest {
  margin: 0 0 54px;
}
.news-latest__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .92fr);
  min-height: 460px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 16px 45px rgba(4,19,47,.08);
}
.news-latest__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(34px, 4.6vw, 64px);
  background: #fff;
  color: var(--ink-800);
}
.news-latest__heading {
  margin: 0 0 24px;
}
.news-latest__heading .eyebrow {
  margin: 0 0 7px;
  color: var(--blue-700);
}
.news-latest__heading h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.04;
}
.news-latest__meta {
  margin-bottom: 14px;
}
.news-latest__content h3 {
  margin: 0 0 16px;
  color: var(--navy-900);
  font-size: clamp(1.65rem, 2.7vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -.025em;
}
.news-latest__content h3 a {
  color: inherit;
  text-decoration: none;
}
.news-latest__content .news-latest__excerpt {
  margin: 0 0 26px;
  color: var(--ink-700);
  font-size: 1rem;
  line-height: 1.7;
}
.news-latest__content .button {
  align-self: flex-start;
}
.news-latest__media {
  display: block;
  min-width: 0;
  min-height: 460px;
  overflow: hidden;
  background: #e9eef5;
}
.news-latest__media img,
.news-latest__media .image-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
  object-position: center;
}
.news-latest + .news-archive__carousel-section { margin-top: 0; }

@media (max-width: 1050px) {
  .news-latest__card {
    grid-template-columns: minmax(0, 1fr) minmax(330px, .9fr);
  }
  .news-latest__content { padding: 34px; }
}
@media (max-width: 820px) {
  .news-latest__card {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .news-latest__media {
    grid-row: 1;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  .news-latest__media img,
  .news-latest__media .image-placeholder {
    min-height: 0;
    height: 100%;
  }
  .news-latest__content { grid-row: 2; }
}
@media (max-width: 680px) {
  .news-latest { margin-bottom: 38px; }
  .news-latest__card { border-radius: 22px; }
  .news-latest__content { padding: 24px 21px 26px; }
  .news-latest__heading { margin-bottom: 18px; }
  .news-latest__heading h2 { font-size: 2rem; }
  .news-latest__content h3 { font-size: 1.55rem; }
  .news-latest__content .button { width: 100%; justify-content: center; }
}
