/* =========================
   SINGLE ENTREPRISE (CSS dédié)
   ========================= */

.sec-detail-entreprises .row-details {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.sec-detail-entreprises .blcLeft {
  flex: 1 1 0;
  min-width: 300px;
}

.sec-detail-entreprises .blcRight {
  width: 327px;
  flex: 0 0 327px;
}

@media (max-width: 991px) {
  .sec-detail-entreprises .row-details {
    flex-direction: column;
  }

  .sec-detail-entreprises .blcRight {
    width: 100%;
    flex: 1 1 auto;
  }
}

/* =========================
   INFO PROJETS - en ligne (2 blocs)
   ========================= */

.sec-detail-entreprises .Info-projets {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  margin: 20px 0 18px;
}

.sec-detail-entreprises .Info-projets .col {
  flex: 1;
  border-top: 2px solid transparent;
  padding-top: 10px;
  text-align: center;
}

.sec-detail-entreprises .Info-projets .col.red {
  border-top-color: #c13133;
}

.sec-detail-entreprises .Info-projets .col.green {
  border-top-color: #3e8950;
}

.sec-detail-entreprises .Info-projets .col h3 {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .6px;
  font-weight: 600;
}

.sec-detail-entreprises .Info-projets .col span {
  display: inline-block;
  margin-top: 6px;
  font-size: 18px;
  font-weight: 700;
}

@media (max-width: 680px) {
  .sec-detail-entreprises .Info-projets {
    flex-direction: column;
    gap: 14px;
  }
}

/* =========================
   Galerie Vanilla (sans slick)
   ========================= */

.td-gallery {
  width: 100%;
  margin-top: 25px;
}

/* ✅ CORRECTION: comme la capture => pas de border-radius */
.sec-detail-entreprises .td-gallery__stage {
  position: relative;
  width: 100%;
  border-radius: 0 !important;
  /* ✅ pas arrondi */
  overflow: hidden;
  background: #000;
  /* évite flash blanc */
}

.td-gallery__viewport {
  overflow: hidden;
  width: 100%;
}

.td-gallery__track {
  display: flex;
  transition: transform 350ms ease;
  will-change: transform;
}

.td-gallery__slide {
  min-width: 100%;
  margin: 0;
}

/* ✅ CORRECTION: image principale un peu plus haute (ajuste si besoin) */
.sec-detail-entreprises .td-gallery__slide img {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
}

/* Prev/Next */
.td-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 3px;
  border: 0;
  cursor: pointer;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 28px;
  line-height: 44px;
  text-align: center;
}

.td-gallery__nav--prev {
  left: 12px;
}

.td-gallery__nav--next {
  right: 12px;
}

.td-gallery__nav:hover {
  background: rgba(0, 0, 0, .65);
}

.td-gallery__nav:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.td-gallery__nav:focus {
  outline: 2px solid #efc94b;
  outline-offset: 2px;
}

/* Dots */
.td-gallery__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
}

.td-gallery__dot {
  width: 10px;
  height: 10px;
  border-radius: 10px;
  border: 1px solid #404244;
  background: transparent;
  cursor: pointer;
}

.td-gallery__dot.is-active {
  background: #c13133;
  border-color: #c13133;
}

/* Thumbs */
.sec-detail-entreprises .td-gallery__thumbs {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}

/* ✅ CORRECTION: miniatures portrait + non-actives fade */
.sec-detail-entreprises .td-gallery__thumb {
  flex: 0 0 auto;
  width: 95px;
  /* plus étroit */
  height: 100px;
  /* plus haut */
  overflow: hidden;

  border: 0 !important;
  border-radius: 0 !important;
  /* ✅ pas arrondi */
  padding: 0;
  background: transparent;
  cursor: pointer;

  opacity: .35;
  /* ✅ fade */
  transform: scale(.98);
  transition: opacity .2s ease, transform .2s ease;
}

.sec-detail-entreprises .td-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ✅ CORRECTION: active = visible + highlight */
.sec-detail-entreprises .td-gallery__thumb.is-active {
  opacity: 1;
  transform: scale(1);
  outline: 2px solid #efc94b;
  /* optionnel */
  outline-offset: 0;
}

/* Social icons align (si tu utilises encore .blc-rs ailleurs) */
.blcRight .blc-rs {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 991px) {
  .sec-detail-entreprises .td-gallery__slide img {
    height: 300px;
  }

  .sec-detail-entreprises .td-gallery__thumb {
    width: 80px;
    height: 110px;
  }
}

@media (max-width: 601px) {
  .sec-detail-entreprises .td-gallery__slide img {
    height: 220px;
  }

  .td-gallery__nav {
    width: 38px;
    height: 38px;
    font-size: 24px;
    line-height: 38px;
  }

  .sec-detail-entreprises .td-gallery__thumb {
    width: 70px;
    height: 95px;
  }
}

/* =========================
   ✅ ASIDE ENTREPRISE (comme la capture)
   logo centré + contacts alignés + icônes espacées
   ========================= */

.sec-detail-entreprises .td-aside-card {
  background: #fff;
  border: 1px solid #e6e6e6;
  padding: 34px 26px;
  text-align: center;
}

/* LOGO */
.sec-detail-entreprises .td-aside-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 26px;
}

.sec-detail-entreprises .td-aside-logo img {
  max-width: 190px;
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* TITRES */
.sec-detail-entreprises .td-aside-title {
  margin: 0 0 18px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.sec-detail-entreprises .td-aside-title--space {
  margin-top: 26px;
}

/* LISTE CONTACTS */
.sec-detail-entreprises .td-aside-contacts {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 260px;
  text-align: left;
}

.sec-detail-entreprises .td-aside-contact {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  align-items: baseline;
  padding: 4px 0;
  line-height: 1.55;
}

.sec-detail-entreprises .td-aside-contact__label {
  color: #444;
  font-weight: 500;
  white-space: nowrap;
}

.sec-detail-entreprises .td-aside-contact__value {
  text-align: right;
  color: #222;
  font-weight: 500;
}

.sec-detail-entreprises .td-aside-contact__value a {
  color: inherit;
  text-decoration: none;
}

.sec-detail-entreprises .td-aside-contact__value a:hover {
  text-decoration: underline;
}

/* RÉSEAUX */
.sec-detail-entreprises .td-aside-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 26px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.sec-detail-entreprises .td-aside-socials .td-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.sec-detail-entreprises .td-aside-socials .td-social-link img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}

@media (max-width: 991px) {
  .sec-detail-entreprises .td-aside-card {
    padding: 28px 20px;
  }

  .sec-detail-entreprises .td-aside-title {
    font-size: 24px;
  }

  .sec-detail-entreprises .td-aside-contacts {
    max-width: 320px;
  }
}

@media (max-width: 520px) {
  .sec-detail-entreprises .td-aside-title {
    font-size: 22px;
  }

  .sec-detail-entreprises .td-aside-socials {
    gap: 18px;
  }
}

/* =========================
   ✅ Projets soutenus - DESIGN comme la capture
   ========================= */

.td-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding-bottom: 70px;
  /* ✅ espace pour le bouton qui déborde */
}

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

@media (max-width: 991px) {
  .td-project-grid {
    grid-template-columns: 1fr;
  }
}

.td-project-card {
  position: relative;
}

.td-project-card__inner {
  position: relative;
  height: 100%;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 0 12px rgba(0, 0, 0, .06);
  overflow: visible;
  /* ✅ on laisse le bouton dépasser */
  padding-bottom: 78px;
  /* ✅ réserve le bouton */
}

.td-project-card__img {
  border-top-left-radius: 25px;
  border-top-right-radius: 25px;
  overflow: hidden;
}

.td-project-card__img img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}

.td-project-card__progress {
  position: relative;
  margin-top: -18px;
  padding: 0 34px 10px;
  z-index: 3;
}

.td-progress {
  --pct: 0;
  position: relative;
  height: 40px;
  padding: 0 18px;
}

.td-progress__bar {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 18px;
  height: 3px;
  background: #e7e2b8;
  border-radius: 50%;
}

.td-progress__fill {
  position: absolute;
  left: 18px;
  top: 20px;
  height: 3px;
  width: calc(clamp(0, var(--pct), 100) * (100% - 36px) / 100);
  background: #efc94b;
  border-radius: 50%;
}

.td-progress__badge {
  position: absolute;
  top: -5px;
  left: calc(18px + (clamp(0, var(--pct), 100) * (100% - 36px) / 100));
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #efc94b;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .10);
}

.td-project-card__content {
  padding: 0 34px 0px;
}

.td-project-card__title {
  font-size: 22px;
  font-family: var(--f2);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 12px;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

@media (max-width: 600px) {
  .td-project-card__title {
    font-size: 20px;
  }
}

.sec-project.details .td-project-grid .td-project-card__content,
.sec-project.details .td-project-grid .td-project-card__content * {
  text-transform: none !important;
}

.td-project-card__excerpt {
  margin: 0 0 18px;
  line-height: 1.8;
  color: #3a3a3a;
}

.td-project-card__stats {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
}

.td-project-card__stat .s-title-item {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #2a2a2a;
  margin-bottom: 6px;
}

.td-project-card__stat .amount {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .2px;
}

.td-project-card__stat--objectif .amount {
  color: #3e8950;
}

.td-project-card__stat--releve .amount {
  color: #efc94b;
}

a.btn.td-project-btn,
.td-project-btn {
  position: absolute;
  left: 50%;
  bottom: -26px;
  transform: translateX(-50%);
  width: 60%;
  max-width: 250px;

  padding: 25px 18px !important;
  border-radius: 0 !important;

  background: #f3f3f3 !important;
  color: #1f1f1f !important;

  text-transform: uppercase;
  letter-spacing: .6px;
  font-weight: 800;
  font-size: 13px;

  display: flex !important;
  align-items: center;
  justify-content: center;

  line-height: 1 !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

a.btn.td-project-btn:hover {
  background: #c13133 !important;
  border-color: #c13133 !important;
  color: #fff !important;
}

.td-project-card__img {
  position: relative;
  z-index: 1;
}

.td-project-card__progress {
  z-index: 3;
}

/* =========================
   ✅ ENTREPRISE : cacher chevrons + dots dans la galerie
   ========================= */

.sec-detail-entreprises .td-gallery__nav {
  display: none !important;
}

.sec-detail-entreprises .td-gallery__dots {
  display: none !important;
}

/* =============================
   SECTION VIDÉOS ENTREPRISE
   (2 vidéos par rangée)
   + Cover background + Play centré
   + Modal
   ============================= */

.sec-videos-entreprise {
  padding: 60px 0;
}

.td-video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.td-video-card {
  background: #f5f5f5;
  /* tu peux garder 1px si tu veux */
  overflow: hidden;
  transition: transform .3s ease;
}

.td-video-card:hover {
  transform: translateY(-6px);
}

/* ✅ MEDIA (cover) */
.td-video-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;

  background-color: #000;
  /* fallback */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ✅ overlay léger pour lisibilité */
.td-video-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .10), rgba(0, 0, 0, .45));
  pointer-events: none;
  z-index: 1;
}

/* Si jamais tu injectes iframe/video DIRECT dans la card */
.td-video-card__media iframe,
.td-video-card__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}

/* ✅ Bouton overlay sur toute la zone */
.td-video-open {
  position: absolute;
  inset: 0;
  z-index: 2;
  /* ✅ au-dessus du ::after */
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  /* ✅ évite décalage */
  margin: 0;
  background: transparent;
  cursor: pointer;
}

/* ✅ Play au CENTRE (comme la capture) */
.td-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: 76px;
  height: 76px;
  border-radius: 999px;

  /* style capture */
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.20);

  /* on masque le caractère ▶ (on dessine le triangle en CSS) */
  font-size: 0;
  line-height: 0;

  display: block;
  pointer-events: none;
  /* ✅ le clic reste sur le bouton */
}

/* Triangle play */
.td-video-play::before {
  content: "";
  position: absolute;
  left: 52%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid rgba(0, 0, 0, 0.65);
}

/* Hover : petit zoom comme une vraie UI */
.td-video-card:hover .td-video-play {
  transform: translate(-50%, -50%) scale(1.06);
}

/* CONTENT */
.td-video-card__content {
  padding: 20px;
}

.td-video-card__title {
  font-size: 20px;
  margin: 0 0 10px;
}

.td-video-card__desc {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* Responsive */
@media (max-width: 992px) {
  .td-video-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

@media (max-width: 600px) {
  .sec-videos-entreprise {
    padding: 40px 0;
  }

  .td-video-play {
    width: 64px;
    height: 64px;
  }

  .td-video-play::before {
    border-top-width: 10px;
    border-bottom-width: 10px;
    border-left-width: 16px;
  }
}

/* =============================
   MODAL VIDEO (POPUP)
   ============================= */

.td-video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.td-video-modal.is-open {
  display: block;
}

.td-video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.td-video-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1000px, 92vw);
  margin: 6vh auto;
  background: #000;
  border-radius: 12px;
  /* tu peux mettre 1px si tu veux */
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.td-video-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 2;
}

.td-video-modal__close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.td-video-modal__content {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.td-video-modal__content iframe,
.td-video-modal__content video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Optionnel: lock scroll */
html.is-modal-open,
html.is-modal-open body {
  overflow: hidden;
}