﻿/* ─── DM2 page ───────────────────────────────────────── */

.dm2-panel-desc, .dm2-intro__desc {
  text-align: justify;
}

img[src*="dm2_logo"] { border-radius: 22%; }

/* ─ Shared layout ─ */
.dm2-section-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 clamp(24px, 6vw, 48px);
}

.dm2-section-title--lower { text-transform: none; }

.dm2-section-title {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-align: center;
  margin-bottom: 48px;
}

/* ─ Hero ─ */
.dm2-hero {
  position: relative;
  margin-top: var(--nav-height);
  height: clamp(340px, 55vw, 680px);
  overflow: hidden;
}

.dm2-hero__bg {
  position: absolute;
  inset: 0;
  background: url('../images/dm2/header/dm2-header-bg.png') center / cover no-repeat;
}


/* ─ Machine centrée dans le hero ─ */
.hero-machine {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  max-width: 90%;
  max-height: 75%;
  object-fit: contain;
  z-index: 2;
}

/* ─ Hero logo superposé ─ */
.hero-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 50%;
  max-height: 50%;
  width: auto;
  height: auto;
  z-index: 3;
  object-fit: contain;
}

.hero-logo--promo {
  max-width: 120%;
  max-height: 50%;
}

.hero-logo--tall {
  max-width: none;
  max-height: 40%;
  top: 12.5%;
  transform: translate(-50%, 0);
}

.dm2-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.dm2-hero__logo {
  height: clamp(100px, 18vw, 160px);
  width: auto;
  filter: drop-shadow(0 0 24px rgba(255,255,255,0.07));
}

.dm2-hero__sub {
  font-size: clamp(0.75rem, 1.8vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dm2-hero__cta {
  margin-top: 12px;
  display: inline-block;
  padding: 12px 32px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.dm2-hero__cta:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.06);
}

.dm2-hero__scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: var(--text-muted);
  opacity: 0.4;
  animation: dm2-bounce 2s ease-in-out infinite;
}

.dm2-hero__scroll-hint svg { width: 22px; height: 22px; }

@keyframes dm2-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ─ Intro ─ */
.dm2-intro {
  padding: 96px 0;
  background: var(--bg);
}

.dm2-intro__inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.dm2-intro__title {
  font-size: clamp(1.4rem, 2.8vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.dm2-intro__desc {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 620px;
}

.dm2-appstore-btn {
  display: inline-block;
  transition: opacity 0.2s, transform 0.2s;
}

.dm2-appstore-btn img {
  height: 52px;
  width: auto;
  display: block;
}

.dm2-appstore-btn:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

/* ─ Transitions entre sections ─ */
.dm2-intro,
.dm2-videos,
.dm2-features,
.dm2-screenshots,
.dm2-demos,
.dm2-specs {
  position: relative;
}

/* Transitions centrées sur la jonction entre sections */
.dm2-videos::before,
.dm2-demos::before,
.dm2-specs::before,
.dm2-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 5;
}

.dm2-videos::before    { background: none; }
.dm2-demos::before     { background: none; }
.dm2-specs::before     { background: none; }
.dm2-footer::before    { background: none; }

/* ─ Screenshots carousel ─ */
.dm2-screenshots {
  background: #060606;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 5vh, 64px) 0 clamp(24px, 4vh, 48px);
  position: relative;
}

.dm2-screenshots::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, #000, transparent);
  pointer-events: none;
  z-index: 1;
}

/* ─ Showcase alternating ─ */
.dm2-screenshots {
  padding-bottom: clamp(48px, 8vh, 96px);
}

.dm2-screenshots .dm2-section-title {
  margin-top: 32px;
}

.dm2-showcase {
  max-width: 1000px;
  margin: 48px auto 0;
  padding: 0 clamp(24px, 6vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.showcase-item {
  display: flex;
  align-items: center;
  gap: 56px;
}

.showcase-item--reverse {
  flex-direction: row-reverse;
}

.showcase-img {
  flex: 1.2;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

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

.showcase-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.showcase-num-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.showcase-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(0, 147, 228, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: rgba(0, 147, 228, 0.65);
  line-height: 1;
}

.showcase-title {
  font-family: 'DINCondensed', sans-serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  margin: 0;
  line-height: 1;
}

.showcase-desc {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.52);
  text-align: justify;
}

@media (max-width: 768px) {
  .showcase-item,
  .showcase-item--reverse {
    flex-direction: column-reverse;
  }

  .dm2-showcase { gap: 56px; }

  .dm2-bg {
    object-position: left center;
  }
}

/* ─ Video carousel ─ */
.dm2-videos {
  padding: 80px 0 96px;
  background: #161616;
}

.video-carousel {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 72px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 6px 24px rgba(0,0,0,0.3);
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.video-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s, border-color 0.2s;
  z-index: 10;
}

.video-btn svg { width: 18px; height: 18px; }

.video-btn:hover {
  background: rgba(0,0,0,0.8);
  border-color: rgba(255,255,255,0.45);
}

.video-btn--prev { left: 12px; }
.video-btn--next { right: 12px; }

.video-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.video-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-dots .dot.active {
  background: #fff;
  width: 22px;
}


/* ─ Panel dots navigation ─ */
.dm2-panel-dots {
  position: absolute;
  right: clamp(16px, 3vw, 40px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 10;
}

.dm2-panel-dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.55);
  transition: background 0.25s, height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dm2-panel-dot.active {
  background: #fff;
  height: 22px;
}

/* ─ Features sticky scroll ─ */
.dm2-features {
  /* height = 4 × 100vh, posé par JS */
  position: relative;
  background: #000;
}

.dm2-features__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

/* ── Fonds ── */
.dm2-bg-layer {
  position: absolute;
  inset: 0;
}

.dm2-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0;
  filter: blur(4px);
  transform: scale(1.02);
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}

.dm2-bg.active { opacity: 1; }

.dm2-bg--soft {
  filter: none;
}

[data-index="0"] .dm2-panel-title,
[data-index="1"] .dm2-panel-title,
[data-index="2"] .dm2-panel-title {
  white-space: nowrap;
}

/* Pure Data — overlay masqué, texte négatif sur fond clair/sombre */
.dm2-features__sticky:has([data-index="1"].active) .dm2-features__overlay {
  opacity: 0;
}

[data-index="1"] .dm2-panel-tag,
[data-index="1"] .dm2-panel-title,
[data-index="1"] .dm2-panel-desc {
  color: #111;
  -webkit-text-stroke: 3px #fff;
  paint-order: stroke fill;
}

[data-index="1"] .dm2-panel-tag {
  color: #0093e4;
  -webkit-text-stroke: 0;
  paint-order: normal;
}

.dm2-bg--invert {
  filter: invert(1) brightness(0.55) blur(4px);
  object-fit: contain;
  background: #05050f;
}

.dm2-bg--flip {
  filter: blur(2px);
  transform: scale(1.02) scaleX(-1);
}

/* ── Overlay global ── */
.dm2-features__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Panels texte ── */
.dm2-panel-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 0 10%;
  pointer-events: none;

  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.dm2-panel-content.active {
  opacity: 1;
  pointer-events: auto;
}

/* Panel Pure Data — texte à droite */
.dm2-panel-content--right {
  justify-content: flex-end;
}

/* Panel Ableton Link — texte gauche + logo droite */
.dm2-panel-content--link {
  justify-content: space-between;
  align-items: center;
}

/* ── Texte interne (stagger fade) ── */
.dm2-panel-text {
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dm2-panel-tag-line {
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(24px);
  opacity: 0;
  transition: opacity 0.6s ease 0.05s, transform 0.6s ease 0.05s;
}

.dm2-panel-tag {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0093e4;
}

.dm2-panel-tag-appname {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  order: -1;
  color: #0093e4;
}

.dm2-panel-title {
  font-family: 'DINCondensed', sans-serif;
  font-size: clamp(2.4rem, 4.8vw, 3.8rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  margin: 0;
  line-height: 1.08;
  transform: translateY(24px);
  opacity: 0;
  transition: opacity 0.65s ease 0.18s, transform 0.65s ease 0.18s;
}

.dm2-panel-desc {
  font-size: 1.2rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.7);
  margin: 0;
  transform: translateY(24px);
  opacity: 0;
  transition: opacity 0.65s ease 0.32s, transform 0.65s ease 0.32s;
}

/* Déclenche le stagger quand le panel devient actif */
.dm2-panel-content.active .dm2-panel-tag-line,
.dm2-panel-content.active .dm2-panel-title,
.dm2-panel-content.active .dm2-panel-desc,
.dm2-panel-content.active .dm2-link-logo {
  opacity: 1;
  transform: translateY(0);
}

/* Ableton Link badge */
.dm2-link-logo {
  flex-shrink: 0;
  width: 200px;
  height: auto;
  border-radius: 10px;
  display: block;
  transform: translateY(24px);
  opacity: 0;
  transition: opacity 0.65s ease 0.42s, transform 0.65s ease 0.42s;
}

/* ─ Demos ─ */
.dm2-demos {
  padding: 80px 0 96px;
  background: #161616;
}

.soundcloud-wrapper {
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 6px 24px rgba(0,0,0,0.3);
}

/* ─ Specifications ───────────────────────────────────── */
.dm2-specs {
  padding: 80px 0 96px;
  background: #060606;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 40px;
  margin-top: 48px;
}

.specs-heading {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #0093e4;
  margin: 0 0 12px;
  padding-top: 28px;
  text-align: left;
}

.specs-col:first-child .specs-heading:first-child,
.specs-col:nth-child(2) .specs-heading:first-child,
.specs-col:nth-child(3) .specs-heading:first-child {
  padding-top: 0;
  border-top: none;
}

.specs-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.specs-list li {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  padding-left: 14px;
  position: relative;
  text-align: left;
}

.specs-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: rgba(255,255,255,0.4);
}

.specs-note {
  margin-top: 48px;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.45);
  text-align: center;
  font-style: italic;
}

/* ─ Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .dm2-section-inner { padding: 0 clamp(16px, 5vw, 24px); }

  .dm2-hero { height: clamp(240px, 56vw, 440px); }

  .hero-logo { max-width: 65%; max-height: 40%; }
  .hero-logo--tall { max-height: 20%; }

  .video-carousel {
    padding: 0 clamp(16px, 5vw, 24px);
    padding-bottom: 56px;
  }

  .video-btn {
    top: auto;
    bottom: 0;
    transform: none;
  }

  .video-btn--prev { left: clamp(16px, 5vw, 24px); }
  .video-btn--next { right: clamp(16px, 5vw, 24px); }

  .video-dots {
    position: absolute;
    bottom: 9px;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
  }

  .specs-grid { grid-template-columns: 1fr; gap: 0; }
  .specs-col + .specs-col { margin-top: 36px; }

  .dm2-panel-text { max-width: 100%; }

  .dm2-panel-title { font-size: 2rem; }

  .dm2-link-logo { width: 140px; }

  .dm2-intro { padding: 64px 0; }

  .dm2-videos { padding: 60px 0 72px; }

  .dm2-demos { padding: 60px 0 72px; }

  .dm2-panel-content {
    padding: 0 28px 64px;
    flex-direction: column;
    justify-content: center !important;
    gap: 36px;
    align-items: flex-start !important;
  }

  /* Dots en bas au centre, horizontaux */
  .dm2-panel-dots {
    top: auto;
    bottom: 16px;
    right: 50%;
    transform: translateX(50%);
    flex-direction: row;
    gap: 10px;
  }

  .dm2-panel-dot {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    transition: background 0.25s, width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .dm2-panel-dot.active {
    width: 22px;
    height: 6px;
  }

}

@media (max-width: 480px) {
  .hero-logo--tall { max-height: 14%; }

  .video-carousel { padding: 0 16px; padding-bottom: 52px; }

  .video-btn { width: 36px; height: 36px; }
  .video-btn--prev { left: 16px; }
  .video-btn--next { right: 16px; }

  .video-btn svg { width: 15px; height: 15px; }

  .dm2-panel-content { padding: 16px 20px 48px; }

  .dm2-panel-title { font-size: 1.6rem; }
}

/* ─ DM2 indicateur navbar ─────────────────────────────── */
.nav-page-indicator {
  color: #0093e4;
}
























