/* ============================================================
   RESPONSIVE GLOBAL — chargé en dernier (après styles.css)
   Objectif : textes, images, vidéos et mises en page qui s'adaptent
   à toutes les largeurs d'écran (téléphone, tablette, desktop).
   ============================================================ */

/* ---------- Base : jamais de défilement horizontal ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { max-width: 100%; }
/* `clip` (et non `hidden`) pour ne pas casser le `position: sticky` de la navbar.
   Neutralise aussi les débordements temporaires des animations AOS (fade-left/right). */
body { overflow-x: clip; }
@supports not (overflow: clip) {
  body { overflow-x: hidden; }
}

/* ---------- Médias fluides : images, vidéos, iframes, cartes ---------- */
img, svg, canvas { max-width: 100%; }
img { height: auto; }
video, iframe, embed, object { max-width: 100%; }
video { height: auto; }

/* Vidéo YouTube / iframe 16:9 qui garde son ratio sur tous les écrans */
.ratio > iframe, .ratio > video { width: 100%; height: 100%; }
.video-card iframe, .video-card video { width: 100%; }
.video-card .ratio, .video-card .ratio-16x9 { width: 100%; }

/* Contenu riche saisi depuis l'admin (éditeur Quill) : jamais plus large que l'écran */
.article-content, .offer-description-content, .ql-editor, .pf-body {
  overflow-wrap: anywhere;
  word-break: normal;
}
.article-content img, .offer-description-content img, .ql-editor img {
  max-width: 100% !important; height: auto !important;
}
.article-content iframe, .offer-description-content iframe, .ql-editor iframe,
.article-content video, .offer-description-content video, .ql-editor video {
  max-width: 100% !important;
}
.article-content iframe[src*="youtube"], .article-content iframe[src*="youtu.be"],
.article-content iframe[src*="vimeo"], .article-content .ql-video {
  width: 100%; height: auto; aspect-ratio: 16 / 9;
}
.article-content table, .offer-description-content table, .ql-editor table {
  display: block; max-width: 100%; overflow-x: auto;
}
.article-content pre, .offer-description-content pre { max-width: 100%; overflow-x: auto; }

/* Tableaux Bootstrap : défilement horizontal interne plutôt que débordement de page */
.table-responsive-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Texte : coupe les mots/URL/emails trop longs ---------- */
h1, h2, h3, h4, h5, h6, p, li, a, td, th, .card-title, .card-text, .btn {
  overflow-wrap: break-word;
}
.btn { white-space: normal; }

/* ---------- Titres fluides (clamp : s'adapte en continu à la largeur) ---------- */
h1, .h1 { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.5rem); }
h2, .h2 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2rem); }
h3, .h3 { font-size: clamp(1.25rem, 1rem + 1.1vw, 1.75rem); }
.display-1 { font-size: clamp(2.5rem, 1.6rem + 4vw, 5rem); }
.display-2 { font-size: clamp(2.25rem, 1.5rem + 3.5vw, 4.5rem); }
.display-3 { font-size: clamp(2rem, 1.4rem + 3vw, 4rem); }
.display-4 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.5rem); }
.display-5 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 3rem); }
.display-6 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.5rem); }
.lead { font-size: clamp(1rem, 0.92rem + 0.45vw, 1.25rem); }

.subpage-hero h1 { font-size: clamp(1.75rem, 1.2rem + 2.8vw, 2.5rem); }
.section-title-lg { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.2rem); }
.impact-counter-box h2 { font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem); }
.vision-section-about h2, .vision-section-news h2 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.5rem); }
.vision-section-about p, .vision-section-news p { font-size: clamp(1rem, 0.9rem + 0.5vw, 1.2rem); }
.rf-hero-title { font-size: clamp(2rem, 1.3rem + 3.6vw, 3.6rem); }

/* ---------- Gouttières Bootstrap : évite le débordement des .row.g-4/g-5 ---------- */
@media (max-width: 767.98px) {
  .row.g-4, .row.gx-4 { --bs-gutter-x: 1.25rem; }
  .row.g-5, .row.gx-5 { --bs-gutter-x: 1.25rem; }
  .row.g-5, .row.gy-5 { --bs-gutter-y: 2rem; }
  .row.g-lg-5 { --bs-gutter-x: 1.25rem; }
  .container, .container-fluid, .container-sm, .container-md {
    padding-left: 1rem; padding-right: 1rem;
  }
}

/* ---------- Animations AOS : sur mobile, apparition verticale (pas de glissement latéral) ---------- */
@media (max-width: 767.98px) {
  [data-aos]:not(.aos-animate) { transform: translate3d(0, 24px, 0) !important; }
}

/* ---------- Typographie corps de texte sur téléphone ---------- */
@media (max-width: 767.98px) {
  /* Le texte justifié crée de grands vides entre les mots sur colonne étroite */
  .text-justify, [style*="text-align: justify"], [style*="text-align:justify"],
  .rf-intro-text, .rf-mv-card p, .rf-list-item p, .rf-split-text, .dir-bio p,
  .profile-bio, .ql-align-justify {
    text-align: left !important;
  }
}
@media (max-width: 575.98px) {
  body { font-size: 0.97rem; }
  .article-content { font-size: 1rem !important; line-height: 1.7 !important; text-align: left !important; }
  .lead { line-height: 1.55; }
  .py-5 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
  .p-5 { padding: 1.75rem !important; }
  .p-4 { padding: 1.25rem !important; }
  .display-1, .display-2, .display-3, .display-4 { line-height: 1.15; }
}

/* ---------- Navbar ---------- */
.navbar-brand img { max-width: 140px; height: auto; }
@media (max-width: 991.98px) {
  .navbar-collapse { max-height: calc(100vh - 70px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .navbar .dropdown-menu { min-width: 0; box-shadow: none; animation: none; background: #f8fbf8; margin-bottom: .5rem; }
  .navbar-nav .nav-link { padding: .65rem 1rem; }
  .navbar .dropdown-item { white-space: normal; padding: .6rem 1rem; }
  .navbar-nav .nav-link::after { display: none; }
}
@media (max-width: 575.98px) {
  .navbar-brand img { max-width: 115px; }
}

/* ---------- Sous-navigation (onglets) : défilement horizontal doux ---------- */
.sub-tabs-nav { top: var(--nav-h, 70px); }
.sub-tabs-nav .nav {
  flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.sub-tabs-nav .nav::-webkit-scrollbar { display: none; }
.sub-tabs-nav .nav-link { white-space: nowrap; }
@media (max-width: 575.98px) {
  .sub-tabs-nav .nav-link { padding: .8rem 1rem; font-size: .9rem; }
}

/* ---------- Hero des sous-pages ---------- */
@media (max-width: 767.98px) {
  .subpage-hero { padding: 48px 0 36px; }
  .subpage-hero::before { width: 240px; height: 240px; }
  .breadcrumb { flex-wrap: wrap; font-size: .85rem; }
}

/* ---------- Hero d'accueil (carrousel) : hauteur adaptée aux petits écrans ---------- */
@supports (height: 100svh) {
  .carousel-section, .carousel-img { height: calc(100svh - var(--nav-h)); }
}
@media (max-width: 575.98px) {
  .carousel-section, .carousel-img { min-height: 380px; }
}

/* ---------- Photos : cadrage cohérent plutôt que déformation ---------- */
.card-img-top, .news-img, .img-cover { object-fit: cover; }
.img-fluid { max-width: 100%; height: auto; }
@media (max-width: 767.98px) {
  .activity-horizontal img { min-height: 0 !important; height: 220px !important; }
  .activity-horizontal .p-5 { padding: 1.5rem !important; }
  .news-img-wrapper { height: 200px; }
  .vision-with-img .vision-img img { width: 100%; }
}
/* Badge flottant sur image : ne sort pas du cadre */
@media (max-width: 575.98px) {
  .vision-badge { max-width: calc(100% - 2rem); margin: 1rem !important; }
}

/* ---------- Cartes / grilles ---------- */
@media (max-width: 575.98px) {
  .valeurs-container { gap: 14px; }
  .valeur { width: 104px; height: 104px; }
  .donation-appeal { padding: 1.75rem 1.25rem; border-radius: 16px; }
  .impact-counter-box { padding: 1.25rem; }
  .timeline-content { padding: 14px 16px !important; }
  .timeline-content h5 { font-size: 1.1rem; }
  .partner-card { height: 100px; padding: 12px; }
}

/* ---------- Lisibilité : pas de texte minuscule sur téléphone ---------- */
@media (max-width: 575.98px) {
  .badge { font-size: .75rem; }
  small, .small { font-size: .85rem; }
  .dir-fact small { font-size: .75rem; }
  .dir-date span { font-size: .72rem; }
  .impact-card-overlay p { font-size: .78rem; }
}

/* ---------- Boutons groupés : s'empilent proprement ---------- */
@media (max-width: 575.98px) {
  .btn-lg { padding: .7rem 1.4rem; font-size: 1.05rem; }
  .d-flex.gap-3 > .btn, .hero-buttons > .btn { flex: 1 1 100%; }
}

/* ---------- Formulaires ---------- */
input, select, textarea { max-width: 100%; }
@media (max-width: 575.98px) {
  /* 16px minimum : empêche le zoom automatique d'iOS au focus */
  .form-control, .form-select, input, select, textarea { font-size: 16px; }
}

/* ---------- Modales (don, etc.) ---------- */
@media (max-width: 575.98px) {
  .modal-dialog { margin: .75rem; max-width: calc(100% - 1.5rem); }
  .modal-body { padding: 1rem; }
}

/* ---------- Carte de contact : moins haute que large sur mobile/tablette ---------- */
@media (max-width: 991.98px) {
  .contact-map.ratio { --bs-aspect-ratio: 75%; min-height: 280px; height: auto !important; }
}
@media (max-width: 575.98px) {
  .contact-map.ratio { --bs-aspect-ratio: 90%; }
}

/* ---------- Cartes Leaflet / Google Maps ---------- */
.leaflet-container { max-width: 100%; }
@media (max-width: 767.98px) {
  #map, .map-container, .leaflet-container { min-height: 320px; }
}

/* ---------- Pied de page ---------- */
@media (max-width: 767.98px) {
  .footer .col, .footer [class*="col-"] { margin-bottom: 1.25rem; }
  .footer p, .footer a { font-size: .9rem; word-break: break-word; }
}

/* ---------- Impression / accessibilité : réduit les animations ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============================================================
   ACCUEIL — bandeau d'impact (icône à gauche, titre à droite)
   ============================================================ */
.impact-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 18px 45px rgba(6, 63, 14, .18);
  border-bottom: 4px solid var(--secondary-orange);
}
.impact-item {
  display: flex; align-items: center; gap: .9rem;
  padding: 1.25rem 1.4rem; min-width: 0;
  border-right: 1px solid #e8efe9;
  transition: background .25s ease;
}
.impact-item:last-child { border-right: 0; }
.impact-item:hover { background: #f4faf5; }
.impact-item-icon {
  flex: none; width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--dark-green), #2fa34a);
  color: #fff; font-size: 1.45rem;
  box-shadow: 0 6px 14px rgba(9, 135, 27, .28);
}
.impact-item:nth-child(even) .impact-item-icon {
  background: linear-gradient(135deg, var(--secondary-orange), #ff9500);
  box-shadow: 0 6px 14px rgba(255, 92, 0, .28);
}
.impact-item-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.impact-item-text strong {
  font-family: var(--rf-font-display, inherit); font-weight: 800;
  font-size: 1.55rem; color: var(--rf-green-deep, #0a2b0f); white-space: nowrap;
}
.impact-item-text span {
  font-size: .82rem; font-weight: 600; color: #5b6b5e; margin-top: .15rem;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (max-width: 991.98px) {
  .impact-strip { grid-template-columns: repeat(2, 1fr); }
  .impact-item:nth-child(2) { border-right: 0; }
  .impact-item:nth-child(-n+2) { border-bottom: 1px solid #e8efe9; }
}
@media (max-width: 575.98px) {
  .impact-strip { border-radius: 14px; }
  .impact-item { gap: .6rem; padding: .8rem .7rem; }
  .impact-item-icon { width: 38px; height: 38px; border-radius: 10px; font-size: 1.05rem; }
  .impact-item-text strong { font-size: 1.1rem; }
  .impact-item-text span { font-size: .68rem; }
}

/* ============================================================
   ACCUEIL — "Ensemble, nous pouvons faire plus" (montants de don)
   ============================================================ */
.donate-band {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 2rem;
  padding: 2.5rem 2.75rem; border-radius: 22px; color: #fff;
  background: radial-gradient(circle at 100% 0%, rgba(255, 92, 0, .35) 0, transparent 45%),
              linear-gradient(135deg, #0a2b0f 0%, #063f0e 55%, #09871b 130%);
  box-shadow: 0 20px 50px rgba(6, 63, 14, .25);
}
.donate-band::after {
  content: ""; position: absolute; width: 260px; height: 260px; right: -80px; bottom: -110px;
  border-radius: 50%; border: 36px solid rgba(255, 255, 255, .05); pointer-events: none;
}
.donate-band > * { position: relative; z-index: 1; }
.donate-band-label {
  display: inline-block; margin: 0 0 .8rem; padding: .3rem .8rem; border-radius: 50px;
  background: rgba(255, 92, 0, .18); color: #ffb37a;
  font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.donate-band-title { font-weight: 800; font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem); color: #fff; margin-bottom: .6rem; }
.donate-band-desc { margin: 0; color: #cfe0d2; line-height: 1.6; font-size: 1rem; }
.donate-band-actions { display: flex; flex-direction: column; gap: .9rem; }
.donate-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.donate-amount {
  padding: .85rem .25rem; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .08); color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .28);
  font-family: var(--rf-font-display, inherit); font-weight: 800; font-size: 1.2rem;
  transition: all .2s ease;
}
.donate-amount:hover, .donate-amount:focus-visible {
  background: var(--secondary-orange); border-color: var(--secondary-orange);
  transform: translateY(-3px); box-shadow: 0 8px 18px rgba(255, 92, 0, .4); outline: 0;
}
.donate-other {
  display: flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1rem; border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, var(--secondary-orange), #ff9500);
  color: #fff; font-weight: 700; font-size: 1rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.donate-other:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 92, 0, .45); }
@media (max-width: 991.98px) {
  .donate-band { grid-template-columns: 1fr; gap: 1.25rem; padding: 2rem 1.75rem; }
}
@media (max-width: 575.98px) {
  .donate-band { padding: 1.4rem 1.1rem; border-radius: 16px; gap: 1rem; }
  .donate-band-label { font-size: .66rem; margin-bottom: .55rem; }
  .donate-band-desc { font-size: .88rem; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .donate-amounts { gap: .4rem; }
  .donate-amount { padding: .6rem 0; font-size: 1rem; border-radius: 10px; }
  .donate-other { padding: .7rem 1rem; font-size: .92rem; }
}

/* ============================================================
   ACCUEIL — domaines d'intervention (icône à gauche, titre à droite)
   ============================================================ */
.domain-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.domain-item {
  display: flex; align-items: center; gap: .9rem; min-width: 0;
  padding: 1rem 1.1rem; background: #fff; border-radius: 16px;
  border: 1px solid #e3ece5; border-bottom: 3px solid transparent;
  box-shadow: 0 4px 14px rgba(6, 63, 14, .06);
  color: var(--rf-ink, #17241a); text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.domain-item:hover, .domain-item:focus-visible {
  transform: translateY(-4px); color: var(--rf-ink, #17241a); outline: 0;
  box-shadow: 0 14px 30px rgba(6, 63, 14, .15); border-bottom-color: var(--secondary-orange);
}
.domain-item-icon {
  flex: none; width: 50px; height: 50px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--dark-green), #2fa34a);
  color: #fff; font-size: 1.4rem; box-shadow: 0 6px 14px rgba(9, 135, 27, .25);
  transition: background .25s ease;
}
.domain-item:nth-child(even) .domain-item-icon {
  background: linear-gradient(135deg, var(--secondary-orange), #ff9500);
  box-shadow: 0 6px 14px rgba(255, 92, 0, .25);
}
.domain-item-title {
  flex: 1; min-width: 0; font-weight: 700; font-size: .95rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.domain-item-arrow { flex: none; color: var(--secondary-orange); opacity: 0; transform: translateX(-6px); transition: all .25s ease; }
.domain-item:hover .domain-item-arrow { opacity: 1; transform: none; }
@media (max-width: 1199.98px) { .domain-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767.98px) { .domain-grid { grid-template-columns: repeat(2, 1fr); gap: .65rem; } }
@media (max-width: 575.98px) {
  .domain-item { gap: .55rem; padding: .7rem .65rem; border-radius: 12px; }
  .domain-item-icon { width: 36px; height: 36px; border-radius: 10px; font-size: 1.05rem; }
  .domain-item-title { font-size: .78rem; }
  .domain-item-arrow { display: none; }
}

/* ============================================================
   PAGES DOMAINE (work-domain.php) — "Ce que nous faisons"
   ============================================================ */
.wd-icon { width: 64px; height: 64px; background: linear-gradient(135deg, var(--dark-green), #2fa34a); box-shadow: 0 8px 18px rgba(9,135,27,.28); }
.wd-heading { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-bottom: 1.6rem; text-align: center; }
.wd-heading h3 { margin: 0; font-weight: 800; color: var(--dark-green); }
.wd-heading::before, .wd-heading::after { content: ""; flex: 0 1 60px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--dark-green), var(--secondary-orange)); }
.wd-heading span { display: none; }

/* Chiffres clés du domaine */
.wd-stats { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.wd-stat { flex: 1 1 110px; padding: .8rem 1rem; border-radius: 14px; background: #f1f8f2; border-left: 4px solid var(--secondary-orange); text-align: left; }
.wd-stat strong { display: block; font-family: var(--rf-font-display, inherit); font-size: 1.5rem; font-weight: 800; color: var(--rf-green-deep, #0a2b0f); line-height: 1.1; }
.wd-stat span { font-size: .8rem; font-weight: 600; color: #5b6b5e; }

/* Image du domaine */
.wd-figure { position: relative; border-radius: 22px; overflow: hidden; box-shadow: 0 18px 45px rgba(6,63,14,.2); aspect-ratio: 4 / 3; max-height: 440px; }
.wd-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-figure::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,63,14,.55), transparent 45%); pointer-events: none; }
.wd-figure-tag { position: absolute; z-index: 1; left: 1rem; bottom: 1rem; display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem; border-radius: 50px; background: #fff; color: var(--dark-green); font-weight: 700; font-size: .85rem; box-shadow: 0 6px 16px rgba(0,0,0,.2); }

/* Actions numérotées */
.wd-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.wd-action { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; background: #fff; border: 1px solid #e3ece5; border-radius: 16px; box-shadow: 0 4px 14px rgba(6,63,14,.06); transition: transform .25s ease, box-shadow .25s ease; }
.wd-action:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(6,63,14,.14); }
.wd-action-num { flex: none; width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-family: var(--rf-font-display, inherit); font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--dark-green), #2fa34a); box-shadow: 0 6px 14px rgba(9,135,27,.25); }
.wd-action:nth-child(even) .wd-action-num { background: linear-gradient(135deg, var(--secondary-orange), #ff9500); box-shadow: 0 6px 14px rgba(255,92,0,.25); }
.wd-action p { margin: 0; font-weight: 600; line-height: 1.4; }

/* Projet phare : image + contenu */
.wd-flagship { display: grid; grid-template-columns: 1fr 1.1fr; background: #fff; border-radius: 22px; overflow: hidden; border: 1px solid #e3ece5; box-shadow: 0 18px 45px rgba(6,63,14,.14); }
.wd-flagship-media { position: relative; display: block; min-height: 320px; }
.wd-flagship-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wd-flagship-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,63,14,.45), transparent 50%); }
.wd-flagship-badge { position: absolute; z-index: 1; top: 1rem; left: 1rem; display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .9rem; border-radius: 50px; background: var(--secondary-orange); color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 6px 14px rgba(255,92,0,.4); }
.wd-flagship-body { padding: 2rem 2.2rem; display: flex; flex-direction: column; justify-content: center; border-left: 5px solid var(--secondary-orange); }
.wd-flagship-body h4 { font-weight: 800; font-size: clamp(1.15rem, 1rem + .6vw, 1.5rem); line-height: 1.3; margin-bottom: .8rem; }
.wd-meta { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.wd-meta li { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem; border-radius: 50px; background: #f1f8f2; color: var(--dark-green); font-size: .82rem; font-weight: 700; }
.wd-flagship-text { color: #4d5a4f; line-height: 1.7; margin-bottom: 1.4rem; }
.wd-flagship-body .btn { align-self: flex-start; }

/* Autres projets */
.wd-projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.wd-project { display: flex; flex-direction: column; background: #fff; border: 1px solid #e3ece5; border-radius: 18px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 4px 14px rgba(6,63,14,.07); transition: transform .25s ease, box-shadow .25s ease; }
.wd-project:hover { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(6,63,14,.16); color: inherit; }
.wd-project-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.wd-project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.wd-project:hover .wd-project-media img { transform: scale(1.06); }
.wd-project-body { display: flex; flex-direction: column; gap: .4rem; padding: 1rem 1.15rem 1.15rem; flex: 1; }
.wd-project-body strong { font-size: 1rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wd-project-period, .wd-project-zone { font-size: .8rem; font-weight: 600; color: #5b6b5e; }
.wd-project-period i, .wd-project-zone i { color: var(--secondary-orange); margin-right: .4rem; }
.wd-project-cta { margin-top: auto; padding-top: .4rem; font-weight: 700; font-size: .88rem; color: var(--dark-green); }

@media (max-width: 991.98px) {
  .wd-actions { grid-template-columns: repeat(2, 1fr); }
  .wd-flagship { grid-template-columns: 1fr; }
  .wd-flagship-media { min-height: 0; aspect-ratio: 16 / 9; }
  .wd-flagship-body { border-left: 0; border-top: 5px solid var(--secondary-orange); padding: 1.5rem; }
  .wd-projects { grid-template-columns: repeat(2, 1fr); }
  .wd-figure { aspect-ratio: 16 / 10; }
}
@media (max-width: 575.98px) {
  .wd-heading::before, .wd-heading::after { flex-basis: 24px; }
  .wd-heading h3 { font-size: 1.2rem; }
  .wd-actions { grid-template-columns: 1fr; gap: .65rem; }
  .wd-action { padding: .8rem .9rem; gap: .8rem; border-radius: 13px; }
  .wd-action-num { width: 38px; height: 38px; border-radius: 10px; font-size: .9rem; }
  .wd-action p { font-size: .92rem; }
  .wd-stat { padding: .6rem .75rem; flex-basis: 90px; }
  .wd-stat strong { font-size: 1.2rem; }
  .wd-flagship { border-radius: 16px; }
  .wd-flagship-body { padding: 1.15rem; }
  .wd-flagship-body .btn { align-self: stretch; text-align: center; }
  .wd-projects { grid-template-columns: 1fr; gap: .9rem; }
  .wd-project { flex-direction: row; border-radius: 14px; }
  .wd-project-media { flex: 0 0 38%; aspect-ratio: auto; min-height: 120px; }
  .wd-project-body { padding: .8rem; }
  .wd-project-body strong { font-size: .9rem; -webkit-line-clamp: 4; line-clamp: 4; }
}

/* Projet sans image : cadre neutre (jamais l'image d'un autre projet) */
.wd-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.85); font-size: 3.5rem; background: linear-gradient(135deg, #0a2b0f, #09871b 70%, #2fa34a); }
.wd-project-media { position: relative; }
.wd-project-media .wd-noimg { font-size: 2.2rem; }

/* ============================================================
   PARTAGE — icônes rondes (fiche projet + détail actualité)
   ============================================================ */
.pf-share { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; align-items: center; }
.pf-share span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #5d6d63; font-weight: 700; margin-right: .3rem; }
.pf-share a, .pf-share button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #e3ebe6; background: #fff; color: #17241a; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; transition: all .2s; cursor: pointer; padding: 0; }
.pf-share a:hover, .pf-share button:hover { background: var(--dark-green); color: #fff; border-color: var(--dark-green); }
.news-share { margin: 2.5rem 0; padding-top: 1.5rem; border-top: 1px solid #e3ebe6; }
