/* ============================================================
   ADeC SA — index.html (page d'accueil)
   S'appuie sur css/design-system.css (tokens + composants communs)
   Ne redéfinit que la mise en page propre à cette page.
   ============================================================ */

/* ---- Nav ---- */
.home-nav-cta { white-space: nowrap; }

/* ---- Section intro (Qui sommes-nous / présentation) ---- */
.home-intro-media { border-radius: var(--adec-radius-lg); overflow: hidden; box-shadow: var(--adec-shadow-md); }
.home-intro-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-intro-card--brand {
  background: var(--adec-primary);
  color: var(--adec-white);
  display: flex; flex-direction: column; justify-content: center;
}
.home-intro-card--brand .adec-card__title { color: var(--adec-white); }
.home-intro-card--brand a.adec-btn--outline { border-color: rgba(255,255,255,.35); color: var(--adec-white); }
.home-intro-card--brand a.adec-btn--outline:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }

/* ---- Bannière simulation de crédit ---- */
.home-cta-banner {
  position: relative;
  border-radius: var(--adec-radius-lg);
  overflow: hidden;
  background: linear-gradient(120deg, var(--adec-primary-darker) 0%, var(--adec-primary) 65%, var(--adec-primary-dark) 100%);
  padding: var(--adec-sp-5);
  color: #fff;
  isolation: isolate;
}
.home-cta-banner::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(60% 120% at 90% 10%, rgba(176,141,63,0.35), transparent 60%);
  z-index: -1;
}
.home-cta-banner h3 { color: #fff; margin-bottom: .5rem; }
.home-cta-banner p { color: rgba(255,255,255,0.85); max-width: 46ch; margin-bottom: var(--adec-sp-3); }

/* ---- Services (filtres + grille) ---- */
.home-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin: var(--adec-sp-4) 0 var(--adec-sp-5); }
.home-filter-btn {
  border: 1px solid var(--adec-border);
  background: var(--adec-surface);
  color: var(--adec-muted);
  font-size: var(--adec-fs-xs);
  font-weight: 700;
  padding: .55rem 1.2rem;
  border-radius: var(--adec-radius-pill);
  cursor: pointer;
  transition: all var(--adec-t-fast) var(--adec-ease);
}
.home-filter-btn:hover { border-color: var(--adec-primary); color: var(--adec-primary); }
.home-filter-btn.active { background: var(--adec-primary); border-color: var(--adec-primary); color: #fff; }

.home-service-card { padding: 0; overflow: hidden; }
.home-service-card__img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.home-service-card__body { padding: var(--adec-sp-3); }
.home-service-item { display: none; }
.home-service-item.is-shown { display: block; }

/* ---- Compteurs / expérience ---- */
.home-experience-figure {
  width: 190px; height: 190px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--adec-primary) 0deg, var(--adec-primary-tint-1) 0deg);
  margin: 0 auto;
  position: relative;
}
.home-experience-figure::before { content:""; position:absolute; inset:10px; border-radius:50%; background:var(--adec-bg); }
.home-experience-figure span { position: relative; z-index: 1; font-size: var(--adec-fs-2xl); font-weight: 800; color: var(--adec-primary); }

.home-counter-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--adec-sp-3); }
.home-counter { background: var(--adec-surface); border: 1px solid var(--adec-border); border-radius: var(--adec-radius-md); padding: var(--adec-sp-3); text-align: center; }
.home-counter__value { font-size: var(--adec-fs-xl); font-weight: 800; color: var(--adec-primary); }
.home-counter__value .symbol { font-size: 1rem; }
.home-counter__label { font-size: var(--adec-fs-xs); color: var(--adec-muted); margin-top: .25rem; }

/* ---- Team ---- */
.home-team-card { text-align: center; }
.home-team-card__figure { border-radius: var(--adec-radius-lg); overflow: hidden; margin-bottom: var(--adec-sp-2); box-shadow: var(--adec-shadow-sm); }
.home-team-card__figure img { width: 100%; aspect-ratio: 1/1.05; object-fit: cover; display: block; }
.home-team-card__name { font-weight: 700; margin-bottom: .1rem; }
.home-team-card__role { color: var(--adec-muted); font-size: var(--adec-fs-sm); }

/* ---- Actualités : reprend les news-* déjà présentes, on les fait hériter du DS ---- */
.news-feature-card, .news-mini-card { background: var(--adec-surface); border: 1px solid var(--adec-border); border-radius: var(--adec-radius-lg); overflow: hidden; box-shadow: var(--adec-shadow-sm); transition: transform var(--adec-t-base) var(--adec-ease), box-shadow var(--adec-t-base) var(--adec-ease); }
.news-feature-card:hover, .news-mini-card:hover { transform: translateY(-4px); box-shadow: var(--adec-shadow-md); }
.news-feature-card { display: flex; height: 100%; }
.news-feature-media { flex: 0 0 42%; }
.news-feature-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-feature-body { padding: var(--adec-sp-4); display: flex; flex-direction: column; justify-content: center; }
.news-mini-card { display: flex; gap: var(--adec-sp-2); margin-bottom: var(--adec-sp-2); }
.news-mini-thumb { flex: 0 0 96px; }
.news-mini-thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--adec-radius-sm); display: block; }
.news-mini-body { padding: var(--adec-sp-2) var(--adec-sp-2) var(--adec-sp-2) 0; }
.news-meta { display: flex; gap: .6rem; align-items: center; margin-bottom: .35rem; }
.news-badge { background: var(--adec-primary-tint-1); color: var(--adec-primary-darker); font-size: .7rem; font-weight: 700; padding: .2rem .6rem; border-radius: var(--adec-radius-pill); text-transform: uppercase; letter-spacing: .04em; }
.news-date { font-size: .75rem; color: var(--adec-muted); }
.news-feature-title, .news-mini-title { font-size: var(--adec-fs-lg); font-weight: 700; margin-bottom: .5rem; }
.news-mini-title { font-size: var(--adec-fs-sm); margin-bottom: .25rem; }
.news-feature-text, .news-mini-text { color: var(--adec-muted); font-size: var(--adec-fs-sm); line-height: 1.6; margin-bottom: .75rem; }
.news-showcase-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: var(--adec-sp-3); margin-bottom: var(--adec-sp-4); }
.news-kicker { color: var(--adec-primary); font-weight: 700; font-size: var(--adec-fs-xs); text-transform: uppercase; letter-spacing: .06em; }
.news-pills { display: flex; gap: .5rem; flex-wrap: wrap; }
.news-pill { background: var(--adec-primary-tint-1); color: var(--adec-primary-darker); font-size: .75rem; font-weight: 700; padding: .3rem .8rem; border-radius: var(--adec-radius-pill); }
.news-showcase-footer { text-align: center; margin-top: var(--adec-sp-4); }

/* ---- Témoignages : légère extension du composant DS ---- */
.home-testimonial { height: 100%; }

/* ---- Agences ---- */
.home-agency-card { padding: 0; overflow: hidden; }
.home-agency-card__img { width: 100%; aspect-ratio: 16/11; object-fit: cover; display: block; }
.home-agency-card__body { padding: var(--adec-sp-3); }
.home-agency-card__title { font-weight: 700; font-size: var(--adec-fs-base); margin-bottom: .35rem; }
.home-agency-card__text { color: var(--adec-muted); font-size: var(--adec-fs-sm); line-height: 1.6; }

/* ---- Contact rapide (téléphone / adresse / email) ---- */
.home-contact-quick { text-align: center; }
.home-contact-quick .adec-card__icon { margin: 0 auto var(--adec-sp-2); }

/* ---- Carte / map ---- */
.home-map { border-radius: var(--adec-radius-lg); overflow: hidden; box-shadow: var(--adec-shadow-sm); }
.home-map iframe { width: 100%; height: 380px; border: 0; display: block; }

/* ---- Footer spécifique page d'accueil (stats + cta) ---- */
.home-footer-top { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--adec-sp-4); align-items: center; margin-bottom: var(--adec-sp-5); padding-bottom: var(--adec-sp-5); border-bottom: 1px solid rgba(255,255,255,0.1); }
.home-footer-stats { display: flex; gap: var(--adec-sp-4); margin-top: var(--adec-sp-3); flex-wrap: wrap; }
.home-footer-stat strong { display: block; font-size: var(--adec-fs-lg); color: var(--adec-accent); }
.home-footer-stat span { font-size: var(--adec-fs-xs); color: rgba(255,255,255,0.6); }
.home-footer-cta { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--adec-radius-lg); padding: var(--adec-sp-4); }
.home-footer-cta h4 { color: #fff; margin-bottom: .5rem; }
.home-footer-cta p { color: rgba(255,255,255,0.7); font-size: var(--adec-fs-sm); margin-bottom: var(--adec-sp-3); }

@media (max-width: 991.98px) {
  .home-footer-top { grid-template-columns: 1fr; }
  .news-feature-card { flex-direction: column; }
  .news-feature-media { flex: none; aspect-ratio: 16/9; }
}

/* ============================================================
   Composants partagés — pages internes
   (noscomptes, financement, fodecc, quisommesnous)
   ============================================================ */

/* Cadre image / vidéo unifié */
.adec-frame { border-radius: var(--adec-radius-lg); overflow: hidden; box-shadow: var(--adec-shadow-md); }
.adec-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adec-frame--video { position: relative; padding-bottom: 56.25%; height: 0; margin-top: var(--adec-sp-3); }
.adec-frame--video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Étapes numérotées (fonctionnement / process) */
.adec-step { display: flex; gap: var(--adec-sp-3); align-items: flex-start; }
.adec-step__number {
  flex: 0 0 56px; height: 56px; width: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--adec-primary); color: #fff;
  font-weight: 800; font-size: var(--adec-fs-lg);
}
.adec-step__title { font-weight: 700; font-size: var(--adec-fs-lg); margin-bottom: .35rem; }
.adec-step__text { color: var(--adec-muted); font-size: var(--adec-fs-sm); line-height: 1.6; }

/* Tags / partenaires */
.adec-tag {
  display: inline-flex; align-items: center;
  padding: .55rem 1.1rem; border-radius: var(--adec-radius-pill);
  background: var(--adec-surface); border: 1px solid var(--adec-border);
  font-size: var(--adec-fs-sm); font-weight: 600; color: var(--adec-ink);
}

/* Card "info" (fiche d'identité, valeurs) — kicker + titre + texte */
.adec-info-card span.adec-eyebrow { display: block; margin-bottom: .5rem; }

/* Statement / mission (bloc citation institutionnelle) */
.adec-statement {
  border-left: 3px solid var(--adec-accent);
  padding-left: var(--adec-sp-3);
  font-size: var(--adec-fs-lg);
  color: var(--adec-ink);
  line-height: 1.6;
}

/* Section sombre réutilisable (alterne avec le fond clair) */
.adec-section-dark { background: var(--adec-ink); color: rgba(255,255,255,0.82); }
.adec-section-dark h2, .adec-section-dark .adec-step__title { color: #fff; }
.adec-section-dark .adec-eyebrow { color: var(--adec-accent); }
.adec-section-dark p { color: rgba(255,255,255,0.7); }

.adec-section-soft { background: var(--adec-primary-tint-1); }

/* ============================================================
   Galerie dynamique + Lightbox (utilisée sur FODECC, réutilisable
   sur n'importe quelle page via [data-gallery])
   ============================================================ */
.adec-gallery { column-count: 3; column-gap: 1rem; }
.adec-gallery__item {
  display: block; break-inside: avoid; margin-bottom: 1rem;
  border-radius: var(--adec-radius-md); overflow: hidden;
  box-shadow: var(--adec-shadow-sm); position: relative; cursor: zoom-in;
}
.adec-gallery__item img { width: 100%; display: block; transition: transform var(--adec-t-slow) var(--adec-ease); }
.adec-gallery__item:hover img { transform: scale(1.05); }
.adec-gallery__item__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(26,19,16,0.55), transparent 50%);
  opacity: 0; transition: opacity var(--adec-t-base) var(--adec-ease);
  display: flex; align-items: flex-end; padding: .9rem;
}
.adec-gallery__item:hover .adec-gallery__item__overlay { opacity: 1; }
.adec-gallery__item__overlay i { color: #fff; font-size: 1.2rem; }

@media (max-width: 767.98px) { .adec-gallery { column-count: 2; } }
@media (max-width: 480px) { .adec-gallery { column-count: 1; } }

.adec-lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(15,10,8,0.94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--adec-t-base) var(--adec-ease), visibility var(--adec-t-base);
  padding: 1.5rem;
}
.adec-lightbox.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.adec-lightbox img {
  max-width: min(90vw, 1000px); max-height: 85vh;
  border-radius: var(--adec-radius-md);
  box-shadow: var(--adec-shadow-lg);
  animation: adecFadeUp .35s var(--adec-ease);
}
.adec-lightbox__close, .adec-lightbox__prev, .adec-lightbox__next {
  position: absolute;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.12); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; cursor: pointer;
  transition: background var(--adec-t-fast) var(--adec-ease);
}
.adec-lightbox__close:hover, .adec-lightbox__prev:hover, .adec-lightbox__next:hover { background: rgba(255,255,255,0.25); }
.adec-lightbox__close { top: 1.5rem; right: 1.5rem; }
.adec-lightbox__prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.adec-lightbox__next { right: 1.5rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 575.98px) {
  .adec-lightbox__prev { left: .5rem; }
  .adec-lightbox__next { right: .5rem; }
  .adec-lightbox__close { top: .75rem; right: .75rem; }
}
