/* Pages internes : s'appuie sur les variables et composants de style.css (accueil figé) */

/* Bandeau de page */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--green-dark);
  background-image: linear-gradient(90deg, rgba(0, 48, 39, .98) 0%, rgba(0, 48, 39, .92) 45%, rgba(0, 48, 39, .6) 100%), url("../images/bambey/bambey-aerial.webp");
  background-position: center;
  background-size: cover;
}

.page-hero::after {
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  height: 28%;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0, 45, 37, .9));
}

.page-hero-inner {
  position: relative;
  z-index: 2;
  padding-block: 44px 52px;
}

.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.page-breadcrumb a {
  text-decoration: none;
}

.page-breadcrumb a:hover {
  color: var(--gold);
}

.page-breadcrumb i {
  font-size: 9px;
}

.page-breadcrumb span {
  color: var(--gold);
}

.page-hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(36px, 3.35vw, 58px);
  font-weight: 800;
  line-height: 1.08;
  text-transform: uppercase;
}

.page-lead {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.65;
}

/* Sections */
.page-section {
  padding-block: 56px;
  color: var(--text-dark);
  background: #f4f4f1;
}

.page-section--white {
  background: var(--white);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-eyebrow {
  margin: 0 0 9px;
  color: var(--green-main);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  color: var(--green-deep);
  font-family: var(--font-display);
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 700;
  line-height: 1.25;
}

.section-title em {
  color: var(--green-main);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.section-intro {
  margin: 14px 0 0;
  color: #4d5d58;
  font-size: 16px;
  line-height: 1.7;
}

/* Boutons */
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.page-actions--center {
  justify-content: center;
}

.page-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  border: 2px solid var(--green-main);
  border-radius: 4px;
  color: var(--white);
  background: var(--green-main);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.page-button:hover {
  color: var(--green-deep);
  border-color: var(--gold);
  background: var(--gold);
  transform: translateY(-2px);
}

.page-button--outline {
  color: var(--green-main);
  background: transparent;
}

.page-button--gold {
  color: var(--green-deep);
  border-color: var(--gold);
  background: var(--gold);
}

.page-button--gold:hover {
  border-color: var(--gold-hover);
  background: var(--gold-hover);
}

.page-button:disabled {
  opacity: .6;
  cursor: wait;
  transform: none;
}

/* À propos */
.about-layout {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
}

.about-portrait {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  border-radius: 14px;
  background:
    linear-gradient(rgba(0, 55, 45, .08), rgba(0, 55, 45, .2)),
    url("../images/hero/hero-bambey-banner.webp") center / cover no-repeat;
  box-shadow: 0 12px 28px rgba(0, 37, 30, .14);
}

.about-portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: cover;
  object-position: center top;
  filter: drop-shadow(0 5px 8px rgba(0, 27, 22, .28));
}

.about-portrait span {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 14px;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border: 3px solid var(--white);
  border-radius: 50%;
  color: var(--green-deep);
  background: var(--gold);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-4deg);
}

.about-content p {
  margin: 16px 0 0;
  color: #34443f;
  font-size: 16px;
  line-height: 1.75;
}

.about-quote {
  margin: 26px 0 0;
  padding: 20px 24px;
  border-left: 4px solid var(--gold);
  border-radius: 0 12px 12px 0;
  color: var(--white);
  background: var(--green-main);
}

.about-quote p {
  margin: 0;
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.55;
}

.about-quote cite {
  display: block;
  margin-top: 12px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

/* Cartes de valeurs */
.feature-grid {
  display: grid;
  gap: 18px;
}

.feature-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
  padding: 26px 24px;
  border: 1px solid rgba(0, 61, 49, .1);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 10px 22px rgba(0, 37, 30, .1);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.page-section--white .feature-card {
  background: #f4f4f1;
}

.feature-card:hover {
  box-shadow: 0 16px 30px rgba(0, 37, 30, .16);
  transform: translateY(-3px);
}

.feature-icon,
.feature-picto {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 16px;
  border-radius: 50%;
}

.feature-icon {
  color: var(--white);
  background: var(--green-main);
  font-size: 26px;
}

.feature-card--red .feature-icon {
  background: var(--red);
}

.feature-picto img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feature-card h3 {
  margin: 0 0 8px;
  color: var(--green-deep);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.feature-card--red h3 {
  color: var(--red);
}

.feature-card p {
  margin: 0;
  color: #4d5d58;
  font-size: 15px;
  line-height: 1.65;
}

/* Programmes */
.programme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  scroll-margin-top: 20px;
}

.programme-card {
  scroll-margin-top: 20px;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 24px;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, #004b3c, #00382e);
  box-shadow: 0 12px 28px rgba(0, 37, 30, .14);
}

.programme-card:target {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.programme-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
}

.programme-card-head strong {
  font-family: var(--font-display);
  font-size: 26px;
}

.programme-card-head i {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(249, 185, 21, .42);
  border-radius: 50%;
  font-size: 20px;
}

.programme-card h3 {
  margin: 14px 0 8px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
}

.programme-card p {
  margin: 0;
  color: rgba(255, 255, 255, .76);
  font-size: 14px;
  line-height: 1.65;
}

.programme-card ul {
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .14);
  list-style: none;
}

.programme-card li {
  position: relative;
  padding: 3px 0 3px 22px;
  font-size: 14px;
  line-height: 1.5;
}

.programme-card li::before {
  position: absolute;
  top: 6px;
  left: 0;
  color: var(--gold);
  content: "\F26E";
  font-family: "bootstrap-icons";
  font-size: 14px;
}

.page-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 26px 0 0;
  padding: 14px 18px;
  border: 1px solid rgba(0, 61, 49, .12);
  border-radius: 10px;
  color: #34443f;
  background: var(--white);
  font-size: 14px;
  line-height: 1.55;
}

.page-note i {
  color: var(--green-main);
  font-size: 18px;
}

/* Bandeau d'appel */
.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 34px;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, #004b3c, #00382e);
  box-shadow: 0 12px 28px rgba(0, 37, 30, .14);
}

.cta-band h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 700;
}

.cta-band p {
  margin: 0;
  color: rgba(255, 255, 255, .8);
  font-size: 15px;
}

/* États vides (actualités, agenda) */
.empty-state {
  max-width: 720px;
  margin-inline: auto;
  padding: 44px 32px;
  border: 1px solid rgba(0, 61, 49, .1);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 10px 22px rgba(0, 37, 30, .1);
  text-align: center;
}

.empty-icon {
  width: 72px;
  height: 72px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  color: var(--white);
  background: var(--green-main);
  font-size: 32px;
}

.empty-state h2,
.empty-state h3 {
  margin: 0 0 10px;
  color: var(--green-deep);
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
}

.empty-state p {
  max-width: 520px;
  margin: 0 auto;
  color: #4d5d58;
  font-size: 16px;
  line-height: 1.65;
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.contact-card {
  padding: 32px;
  border: 1px solid rgba(0, 61, 49, .1);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 10px 22px rgba(0, 37, 30, .1);
}

.contact-card--info {
  color: var(--white);
  background: linear-gradient(135deg, #004b3c, #00382e);
}

.contact-card--info h2 {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.contact-field--wide,
.contact-consent,
.contact-actions {
  grid-column: 1 / -1;
}

.contact-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 700;
}

.contact-form .form-control {
  padding: 11px 14px;
  border-color: rgba(0, 61, 49, .22);
  border-radius: 6px;
}

.contact-form .form-control:focus {
  border-color: var(--green-main);
  box-shadow: 0 0 0 .2rem rgba(0, 80, 63, .18);
}

.contact-form .form-control[aria-invalid="true"] {
  border-color: var(--red);
}

.contact-consent {
  margin: 0;
  color: #65716d;
  font-size: 12px;
  line-height: 1.5;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.contact-feedback {
  min-height: 24px;
  flex: 1 1 220px;
  font-size: 13px;
}

.contact-feedback .alert {
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
}

.contact-details {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-details li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-details i {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(249, 185, 21, .42);
  border-radius: 50%;
  color: var(--gold);
  font-size: 19px;
}

.contact-details span {
  display: block;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-details a,
.contact-details p {
  margin: 2px 0 0;
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-details a:hover {
  color: var(--gold);
}

/* Adaptation */
@media (max-width: 991.98px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-portrait {
    max-width: 380px;
    min-height: 380px;
  }

  .about-portrait img {
    min-height: 380px;
  }

  .feature-grid--3,
  .programme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .page-hero-inner {
    padding-block: 32px 40px;
  }

  .page-section {
    padding-block: 40px;
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
    padding: 26px 22px;
  }

  .contact-card {
    padding: 24px 20px;
  }
}

@media (max-width: 575.98px) {
  .feature-grid--3,
  .programme-grid,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .page-actions .page-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-button,
  .feature-card {
    transition: none;
  }

  .page-button:hover,
  .feature-card:hover {
    transform: none;
  }
}

/* Actualités et agenda (contenus du backoffice) */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0, 61, 49, .1);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 10px 22px rgba(0, 37, 30, .1);
}

.news-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.news-video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--green-deep);
}

.news-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.news-card-body {
  padding: 20px 22px 24px;
}

.news-date {
  color: var(--red);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.news-card h3 {
  margin: 8px 0 8px;
  color: var(--green-deep);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
}

.news-card p {
  margin: 0 0 10px;
  color: #4d5d58;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.news-more summary {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--green-main);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.news-more summary:hover {
  color: var(--red);
}

.event-list {
  display: grid;
  gap: 14px;
}

.event-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 18px 22px;
  border: 1px solid rgba(0, 61, 49, .1);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 10px 22px rgba(0, 37, 30, .1);
}

.event-date {
  display: grid;
  place-items: center;
  padding: 10px 0;
  border-radius: 10px;
  color: var(--green-deep);
  background: var(--gold);
  font-family: var(--font-display);
  text-align: center;
  text-transform: uppercase;
}

.event-date strong {
  font-size: 28px;
  line-height: 1;
}

.event-date span {
  font-size: 12px;
  font-weight: 800;
}

.event-body h3 {
  margin: 0 0 4px;
  color: var(--green-deep);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
}

.event-meta {
  margin: 0 0 8px;
  color: var(--green-main);
  font-size: 14px;
  font-weight: 600;
}

.event-description {
  margin: 0;
  color: #4d5d58;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

@media (max-width: 991.98px) {
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .news-grid {
    grid-template-columns: 1fr;
  }

  .event-item {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }
}

/* Page d'une actualité */
.news-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--green-main);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.news-link::after {
  content: " \2192";
}

.news-link:hover {
  color: var(--red);
}

.news-card h3 a {
  color: inherit;
  text-decoration: none;
}

.article-card {
  max-width: 820px;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid rgba(0, 61, 49, .1);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 10px 22px rgba(0, 37, 30, .1);
}

.article-card .page-actions {
  margin: 0;
  padding: 0 32px 32px;
}

/* Couverture d'une actualité : un paysage remplit la largeur (rogné en 16:9), toute autre image (portrait, carré, affiche)
   est affichée en entier sur un fond clair : rien n'est jamais coupé. */
.article-cover--wide .article-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 30%;
}

.article-cover--mat {
  padding: 22px;
  text-align: center;
  background: var(--ivory);
}

.article-cover--mat .article-image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 540px;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 37, 30, .18);
}

.article-text {
  padding: 28px 32px 8px;
}

.article-text p {
  margin: 0 0 18px;
  color: #34443f;
  font-size: 17px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
  .article-text {
    padding: 22px 20px 4px;
  }

  .article-card .page-actions {
    padding: 0 20px 24px;
  }
}

/* Photos de Bambey */
.page-hero--city {
  background-image: linear-gradient(90deg, rgba(0, 48, 39, .97) 0%, rgba(0, 48, 39, .88) 42%, rgba(0, 48, 39, .35) 100%), url("../images/bambey/bambey-city.webp");
  background-position: center 40%;
}

.page-hero--market {
  background-image: linear-gradient(90deg, rgba(0, 48, 39, .97) 0%, rgba(0, 48, 39, .88) 42%, rgba(0, 48, 39, .4) 100%), url("../images/bambey/bambey-market.webp");
  background-position: center 55%;
}

.page-hero--universite {
  background-image: linear-gradient(90deg, rgba(0, 48, 39, .97) 0%, rgba(0, 48, 39, .88) 42%, rgba(0, 48, 39, .4) 100%), url("../images/bambey/bambey-universite.webp");
  background-position: center 45%;
}

.photo-banner {
  position: relative;
  isolation: isolate;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--white);
  background: var(--green-dark);
}

.photo-banner img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-banner::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(0, 45, 37, .05) 20%, rgba(0, 45, 37, .88) 100%);
}

.photo-banner-text {
  padding-block: 40px;
}

.photo-banner-eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.photo-banner-title {
  max-width: 760px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.photo-card {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: var(--green-dark);
  box-shadow: 0 10px 22px rgba(0, 37, 30, .14);
}

.photo-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 400ms ease;
}

.photo-card:hover img {
  transform: scale(1.04);
}
.contact-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin-bottom: 22px;
  border-radius: 10px;
  object-fit: cover;
}

@media (max-width: 991.98px) {
  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .photo-grid {
    grid-template-columns: 1fr;
  }

  .photo-banner {
    min-height: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-card img {
    transition: none;
  }

  .photo-card:hover img {
    transform: none;
  }
}

/* Section photo + texte (programmes) */
.split-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}

.split-section {
  padding-block: 28px;
}

.split-feature-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 3;
  border-radius: 14px;
  object-fit: cover;
  object-position: center 42%;
  box-shadow: 0 12px 28px rgba(0, 37, 30, .16);
}

.split-feature-text p {
  margin: 14px 0 0;
  color: #34443f;
  font-size: 17px;
  line-height: 1.75;
}

.check-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding: 6px 0 6px 30px;
  color: var(--green-deep);
  font-weight: 600;
}

.check-list li::before {
  position: absolute;
  top: 8px;
  left: 0;
  color: var(--green-main);
  content: "\F26E";
  font-family: "bootstrap-icons";
  font-size: 18px;
}

@media (max-width: 991.98px) {
  .split-section {
    padding-block: 40px;
  }

  .split-feature {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .split-feature-media img {
    aspect-ratio: 16 / 9;
  }
}

/* Parcours d'Abdou Diop : chiffres clés, frise chronologique, engagements */
.fact-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 36px;
  overflow: hidden;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, #004b3c, #00382e);
  box-shadow: 0 12px 28px rgba(0, 37, 30, .14);
}

.fact {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 22px 24px;
  border-left: 1px solid rgba(255, 255, 255, .14);
}

.fact:first-child {
  border-left: 0;
}

.fact strong {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.fact span {
  color: rgba(255, 255, 255, .86);
  font-size: 14px;
  line-height: 1.45;
}

.timeline {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.timeline::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 148px;
  width: 2px;
  content: "";
  background: rgba(0, 80, 63, .22);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 34px;
  margin-bottom: 16px;
}

.timeline-item::before {
  position: absolute;
  top: 24px;
  left: 142px;
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border: 3px solid var(--white);
  border-radius: 50%;
  content: "";
  background: var(--gold);
  box-shadow: 0 0 0 2px var(--green-main);
}

.timeline-year {
  justify-self: end;
  padding-top: 20px;
  color: var(--green-main);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  text-align: right;
  text-transform: uppercase;
}

.timeline-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid rgba(0, 61, 49, .1);
  border-radius: 12px;
  background: var(--ivory);
}

.timeline-card > i {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--green-main);
  font-size: 20px;
}

.timeline-card h3 {
  margin: 0 0 2px;
  color: var(--green-deep);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
}

.timeline-card p {
  margin: 0;
  color: #4d5d58;
  font-size: 15px;
  line-height: 1.55;
}

.role-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.role-list li {
  position: relative;
  padding: 7px 0 7px 20px;
  color: #34443f;
  font-size: 15px;
  line-height: 1.5;
}

.role-list li::before {
  position: absolute;
  top: 15px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  content: "";
  background: var(--gold);
}

@media (max-width: 991.98px) {
  .fact-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fact:nth-child(3) {
    border-left: 0;
  }

  .fact:nth-child(n + 3) {
    border-top: 1px solid rgba(255, 255, 255, .14);
  }
}

@media (max-width: 575.98px) {
  .fact-strip {
    grid-template-columns: 1fr;
  }

  .fact {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, .14);
  }

  .fact:first-child {
    border-top: 0;
  }

  .timeline::before {
    left: 7px;
  }

  .timeline-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding-left: 32px;
  }

  .timeline-item::before {
    top: 2px;
    left: 1px;
  }

  .timeline-year {
    justify-self: start;
    padding-top: 0;
    text-align: left;
  }
}

/* Galerie d'une actualité, affiche d'un rendez-vous */
.news-card img {
  object-position: center 30%;
}

.article-gallery {
  padding: 8px 32px 28px;
}

.article-gallery h2 {
  margin: 0 0 16px;
  color: var(--green-deep);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
}

.masonry {
  columns: 3;
  column-gap: 14px;
}

.masonry-item {
  display: block;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 12px;
  break-inside: avoid;
  background: var(--ivory);
  box-shadow: 0 8px 18px rgba(0, 37, 30, .12);
}

.masonry-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 400ms ease;
}

.masonry-item:hover img {
  transform: scale(1.04);
}

.event-item--poster {
  grid-template-columns: 76px minmax(0, 1fr) 160px;
}

.event-poster {
  display: block;
  align-self: start;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0, 37, 30, .14);
}

.event-poster img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 767.98px) {
  .masonry {
    columns: 2;
  }

  .article-gallery {
    padding: 4px 20px 22px;
  }

  .event-item--poster {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .event-item--poster .event-poster {
    grid-column: 1 / -1;
    max-width: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .masonry-item img {
    transition: none;
  }

  .masonry-item:hover img {
    transform: none;
  }
}

/* Agenda : rendez-vous passés */
.agenda-past-title {
  margin: 38px 0 16px;
  color: var(--green-deep);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
}

.event-item--past .event-date {
  color: var(--white);
  background: var(--green-main);
}

.event-body .news-link {
  margin-top: 6px;
}

/* Section photo + texte inversée (photo à droite) */
.split-feature--reverse {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
}

.split-feature--reverse .split-feature-media img {
  object-position: center 40%;
}

@media (max-width: 991.98px) {
  .split-feature--reverse {
    grid-template-columns: 1fr;
  }

  .split-feature--reverse .split-feature-media {
    order: -1;
  }
}

/* Tablette : équilibre des grilles et des blocs (audit 768 / 820 / 1024 px) */
.cta-band .page-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Un nombre impair de cartes en 2 colonnes : la dernière occupe toute la largeur (pas de trou) */
@media (min-width: 576px) and (max-width: 991.98px) {
  .feature-grid--3 > :last-child:nth-child(odd),
  .programme-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* À propos : sur tablette, le portrait reste à côté du texte au lieu de laisser un grand vide */
@media (min-width: 700px) and (max-width: 991.98px) {
  .about-layout {
    grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
    align-items: start;
    gap: 36px;
  }

  .about-portrait {
    max-width: none;
    min-height: 0;
  }

  .about-portrait img {
    min-height: 0;
    aspect-ratio: 3 / 4;
  }
}

@media (max-width: 699.98px) {
  .about-portrait {
    margin-inline: auto;
  }
}

/* Une seule actualité : carte horizontale sur toute la largeur (au lieu d'une colonne seule avec un grand vide) */
@media (min-width: 576px) {
  .news-grid > .news-card:only-child {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: stretch;
  }

  .news-grid > .news-card:only-child > img {
    flex: 0 0 42%;
    width: 42%;
    height: auto;
    min-height: 260px;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center 30%;
  }

  .news-grid > .news-card:only-child > .news-video {
    flex: 0 0 42%;
    align-self: center;
  }

  .news-grid > .news-card:only-child .news-card-body {
    flex: 1 1 auto;
    align-self: center;
    padding: 28px 32px;
  }

  .news-grid > .news-card:only-child h3 {
    font-size: 24px;
  }
}
