/* === 3DClypse Galerie === */

.tdc-gal { max-width: 1280px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.tdc-gal__head { text-align: center; margin: 2rem 0 1.5rem; }
.tdc-gal__title { font-size: clamp(1.75rem, 3vw, 2.5rem); margin: 0 0 .5rem; line-height: 1.15; }
.tdc-gal__sub { color: #555; font-size: 1.05rem; margin: 0; }

.tdc-gal__filters {
  display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center;
  margin: 1.5rem 0 2rem;
}
.tdc-gal__filter {
  background: #f4f4f5; border: 1px solid #e4e4e7; color: #18181b;
  padding: .5rem 1rem; border-radius: 999px; cursor: pointer;
  font-size: .9rem; font-weight: 500; transition: all .15s;
}
.tdc-gal__filter:hover { background: #e4e4e7; }
.tdc-gal__filter.is-active { background: #18181b; color: #fff; border-color: #18181b; }

.tdc-gal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.tdc-gal__item {
  margin: 0; position: relative; overflow: hidden;
  border-radius: 12px; background: #f4f4f5; aspect-ratio: 1/1;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  transition: transform .25s, box-shadow .25s;
}
.tdc-gal__item:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.tdc-gal__item.is-hidden { display: none; }
.tdc-gal__item a { display: block; height: 100%; }
.tdc-gal__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tdc-gal__item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: .75rem .9rem;
  background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0));
  color: #fff;
  opacity: 0; transition: opacity .2s;
}
.tdc-gal__item:hover figcaption { opacity: 1; }
.tdc-gal__name { display: block; font-weight: 600; font-size: .95rem; line-height: 1.2; }
.tdc-gal__cat { display: block; font-size: .78rem; opacity: .85; margin-top: .15rem; }

/* Lightbox */
.tdc-lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.92);
  z-index: 99999; display: flex; align-items: center; justify-content: center;
  flex-direction: column; padding: 2rem;
}
.tdc-lightbox img { max-width: 95vw; max-height: 80vh; border-radius: 6px; }
.tdc-lightbox__cap { color: #fff; margin-top: 1rem; font-size: 1rem; }
.tdc-lightbox__close {
  position: absolute; top: 1rem; right: 1rem; background: transparent;
  border: 0; color: #fff; font-size: 2.5rem; line-height: 1; cursor: pointer;
}

/* === Bloc home === */
.tdc-home { max-width: 1280px; margin: 3rem auto; padding: 0 1rem; }
.tdc-home__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap;
}
.tdc-home__title { font-size: clamp(1.5rem, 2.5vw, 2rem); margin: 0; }
.tdc-home__more { color: #18181b; font-weight: 600; text-decoration: none; }
.tdc-home__more:hover { text-decoration: underline; }
.tdc-home__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.tdc-home__item {
  margin: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 1/1;
  position: relative; box-shadow: 0 1px 3px rgba(0,0,0,.06);
  transition: transform .25s, box-shadow .25s;
}
.tdc-home__item:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.tdc-home__item a { display: block; height: 100%; }
.tdc-home__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tdc-home__item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: .65rem .8rem;
  background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0));
  color: #fff;
}
.tdc-home__name { display: block; font-weight: 600; font-size: .9rem; }
.tdc-home__cat { display: block; font-size: .75rem; opacity: .85; margin-top: .1rem; }

@media (max-width: 600px) {
  .tdc-gal__grid, .tdc-home__grid { grid-template-columns: repeat(2, 1fr); }
  .tdc-gal__item figcaption { opacity: 1; }
}

/* === Carousel marquee home (style historique 3DClypse) === */
.td-marquee-section { width: 100%; padding: 70px 0; background: #ffffff; overflow: hidden; }
.td-marquee-header { text-align: center; margin-bottom: 40px; padding: 0 5%; }
.td-marquee-header .section-label {
  font-size: .75em; font-weight: 700; letter-spacing: 3px;
  color: var(--orange, #f26b2b); text-transform: uppercase; margin-bottom: 10px;
}
.td-marquee-header h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--marine, #0a1628); font-weight: 700; margin-bottom: 8px;
}
.td-marquee-header p { font-size: .88em; color: #888; }
.td-marquee-wrapper {
  position: relative; width: 100%;
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  overflow: hidden;
}
.td-marquee-wrapper + .td-marquee-wrapper { margin-top: 4px; }
.td-track { display: flex; gap: 4px; width: max-content; }
.td-scroll-left { animation: tdScrollLeft 45s linear infinite; }
.td-scroll-right { animation: tdScrollRight 45s linear infinite; }
@keyframes tdScrollLeft  { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes tdScrollRight { 0% { transform: translateX(-50%); } 100% { transform: translateX(0); } }
.td-square { width: 260px; aspect-ratio: 1/1; overflow: hidden; background: #f0f0f0; flex-shrink: 0; }
.td-square img { width: 100%; height: 100%; object-fit: cover; }
.td-cta { display: flex; gap: 16px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.td-btn-insta {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px;
  background: var(--orange, #f26b2b); color: #fff; border-radius: 50px;
  font-size: .82em; font-weight: 700; letter-spacing: 1px; text-decoration: none; transition: .25s;
}
.td-btn-insta:hover { transform: translateY(-2px); opacity: .9; }
.td-btn-devis {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px;
  background: transparent; color: var(--marine, #0a1628);
  border: 2px solid var(--marine, #0a1628); border-radius: 50px;
  font-size: .82em; font-weight: 700; letter-spacing: 1px; text-decoration: none; transition: .25s;
}
.td-btn-devis:hover { background: var(--marine, #0a1628); color: #fff; }
@media (max-width: 768px) {
  .td-square { width: 180px; }
  .td-cta { flex-direction: column; align-items: center; }
}
