/*
 * DS Tickets — Page d’accueil portail (hero + footer + contact)
 * Wrapper : .ds-home
 */

.ds-home *,
.ds-home *::before,
.ds-home *::after {
  box-sizing: border-box;
}

@keyframes dshFadeUp {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dshScanLine {
  0% {
    transform: translateY(-6px);
    opacity: 0;
  }
  12% {
    opacity: 0.55;
  }
  88% {
    opacity: 0.35;
  }
  100% {
    transform: translateY(640px);
    opacity: 0;
  }
}

@keyframes dshPulseDot {
  0%,
  100% {
    transform: scale(0.78);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

/* Compenser l’espacement que le conteneur Divi/thème ajoute entre le menu et le hero (à ajuster si besoin). */
.ds-home {
  margin-top: -110px;
  --dsh-bg: #06080f;
  --dsh-text: #e8f0ff;
  --dsh-blue: #3aa0ff;
  --dsh-blue-dim: rgba(58, 160, 255, 0.45);
  --dsh-card: linear-gradient(
    155deg,
    rgba(8, 22, 52, 0.92) 0%,
    rgba(4, 12, 28, 0.96) 100%
  );
  --dsh-max: min(1180px, 100%);
  --dsh-header-pad: max(env(safe-area-inset-top, 0px), clamp(64px, 11vw, 84px));
  --dsh-nav-offset: 20px;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Ubuntu,
    "Helvetica Neue",
    sans-serif;
  color: var(--dsh-text);
  background: var(--dsh-bg);
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
}

/* Texture + vignette globale */
.ds-home::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 70% at 12% -5%, rgba(58, 160, 255, 0.12), transparent 42%),
    radial-gradient(circle at 92% 10%, rgba(99, 102, 241, 0.1), transparent 36%),
    linear-gradient(180deg, #0a1020 0%, #06080f 45%, #04060c 100%);
}

.ds-home::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.82;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 72% 55% at 50% 32%, black 42%, transparent 100%);
}

/* ── Vidéo plein cadre ── */
.ds-home__media {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  margin: 0;
  padding: 0;
}

.ds-home__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  filter: saturate(1.06) brightness(0.92);
}

.ds-home__media-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    185deg,
    rgba(6, 8, 15, 0.55) 0%,
    rgba(6, 8, 15, 0.78) 45%,
    rgba(4, 6, 12, 0.94) 100%
  );
}

.ds-home__scan {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  z-index: 55;
  background: linear-gradient(90deg, transparent, rgba(58, 160, 255, 0.5), transparent);
  animation: dshScanLine 6.5s linear infinite;
  opacity: 0.65;
  pointer-events: none;
  margin: 0;
  padding: 0;
}

/* ── Topbar pleine largeur, légèrement descendue du bord ── */
.ds-home__topwrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0;
  padding-top: calc(env(safe-area-inset-top, 0px) + var(--dsh-nav-offset));
  margin: 0;
  height: auto;
  min-height: 0;
}

.ds-home__topbar {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 20px);
  padding: clamp(12px, 2vw, 16px) clamp(16px, 3vw, 32px);
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(4, 10, 26, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.ds-home__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}

.ds-home__logo {
  height: clamp(26px, 4.2vw, 34px);
  width: auto;
  display: block;
  filter: drop-shadow(0 0 12px rgba(58, 160, 255, 0.35));
}

.ds-home__tag {
  font-size: clamp(10px, 2.8vw, 12px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(200, 220, 255, 0.55);
  font-weight: 700;
  white-space: nowrap;
}

.ds-home__burger {
  margin-left: auto;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  color: #fff;
}

.ds-home__burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 2px;
}

.ds-home__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  flex: 1;
}

.ds-home__nav.is-open {
  display: flex;
}

.ds-home__mlink {
  text-decoration: none;
  font-size: clamp(13px, 2.6vw, 14px);
  font-weight: 600;
  color: rgba(230, 240, 255, 0.88);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
  white-space: nowrap;
}

.ds-home__mlink:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.ds-home__mlink--primary {
  background: linear-gradient(135deg, #1a6cd4, #3aa0ff);
  border-color: rgba(100, 180, 255, 0.35);
  color: #fff;
  box-shadow: 0 8px 24px rgba(58, 160, 255, 0.28);
}

.ds-home__mlink--primary:hover {
  filter: brightness(1.06);
}

.ds-home__mlink--ghost {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

/* Hero : prend l’espace utile sous la topbar (flex) sans Hauteur forcée évite une bande morte avant le footer */
.ds-home__hero {
  position: relative;
  z-index: 10;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--dsh-max);
  margin: 0 auto;
  padding: calc(var(--dsh-header-pad) + var(--dsh-nav-offset) + clamp(6px, 1.5vw, 12px)) clamp(16px, 3.5vw, 32px)
    clamp(12px, 3vw, 22px);
  animation: dshFadeUp 0.72s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Réserve verticale min. pour garder une bonne mise en avant (sans combiner avec margin-top:auto sur le footer) */
@media (min-height: 480px) {
  .ds-home__hero {
    min-height: min(560px, calc(100vh - 9rem));
  }
}

.ds-home__hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(260px, 0.72fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  width: 100%;
}

.ds-home__title {
  margin: 0;
  font-size: clamp(1.35rem, 3.2vw + 0.65rem, 2.55rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #fff;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .ds-home__title {
    white-space: normal;
    font-size: clamp(1.15rem, 4.2vw + 0.4rem, 1.55rem);
  }
}

.ds-home__title-accent {
  background: linear-gradient(120deg, #aed7ff 0%, var(--dsh-blue) 50%, #9db5ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ds-home__lead {
  margin: clamp(14px, 2.8vw, 22px) 0 0;
  font-size: clamp(14px, 2.5vw + 0.05rem, 18px);
  line-height: 1.62;
  color: rgba(210, 225, 255, 0.82);
  max-width: 42ch;
}

.ds-home__cta-row {
  margin-top: clamp(22px, 4vw, 36px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ds-home__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  font-family: inherit;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    filter 0.15s;
}

.ds-home__btn:focus-visible {
  outline: 2px solid var(--dsh-blue);
  outline-offset: 3px;
}

.ds-home__btn--solid {
  background: linear-gradient(135deg, #1a6cd4, #3aa0ff);
  border-color: rgba(100, 180, 255, 0.4);
  color: #fff;
  box-shadow: 0 10px 34px rgba(58, 160, 255, 0.32);
}

.ds-home__btn--solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(58, 160, 255, 0.45);
}

.ds-home__btn--outline {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(240, 248, 255, 0.95);
}

.ds-home__btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.ds-home__btn--quiet {
  background: transparent;
  border-color: rgba(58, 160, 255, 0.28);
  color: rgba(200, 225, 255, 0.92);
}

.ds-home__btn--quiet:hover {
  border-color: rgba(58, 160, 255, 0.5);
  background: rgba(58, 160, 255, 0.08);
}

/* Vignette cadre assistant (.ds-home__jarvis) */
.ds-home__jarvis {
  position: relative;
  justify-self: end;
  width: min(100%, 400px);
  aspect-ratio: 1 / 1.05;
}

.ds-home__jarvis-ring {
  position: absolute;
  inset: auto;
  border-radius: 50%;
  border: 1px solid rgba(58, 160, 255, 0.22);
  pointer-events: none;
}

.ds-home__jarvis-ring--1 {
  inset: 4%;
  animation: dshPulseDot 5s ease-in-out infinite;
  opacity: 0.85;
}

.ds-home__jarvis-ring--2 {
  inset: 10%;
  border-color: rgba(99, 102, 241, 0.15);
}

.ds-home__jarvis-ring--3 {
  inset: 16%;
  border-color: rgba(58, 160, 255, 0.1);
}

.ds-home__jarvis-hole {
  position: absolute;
  inset: clamp(28px, 7vw, 44px);
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(58, 160, 255, 0.25);
  background: radial-gradient(circle at 50% 20%, rgba(30, 80, 140, 0.35), rgba(4, 10, 24, 0.92));
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 28px 60px rgba(0, 0, 0, 0.5);
}

.ds-home__jarvis-hole video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
}

.ds-home__jarvis-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  z-index: 2;
  pointer-events: none;
  border: 1.5px solid rgba(58, 160, 255, 0.45);
  opacity: 0.55;
}

.ds-home__jarvis-corner--tl {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
  border-radius: 8px 0 0 0;
}

.ds-home__jarvis-corner--br {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
  border-radius: 0 0 8px 0;
}

.ds-home__jarvis-badge {
  position: absolute;
  bottom: clamp(14px, 3vw, 22px);
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(220, 235, 255, 0.95);
  background: rgba(4, 12, 28, 0.75);
  border: 1px solid rgba(58, 160, 255, 0.3);
  backdrop-filter: blur(8px);
  z-index: 3;
  white-space: nowrap;
}

/* ── Footer — suit le hero sans bande résiduelle flex (pas de margin-top:auto) ── */
.ds-home__footer {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  margin-top: 0;
  background: #03060d;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: clamp(20px, 4vw, 28px) clamp(16px, 3vw, 28px)
    max(20px, env(safe-area-inset-bottom, 0));
}

.ds-home__footer-inner {
  max-width: var(--dsh-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, auto) 1fr minmax(0, auto);
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
}

.ds-home__footer-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  opacity: 0.92;
}

.ds-home__footer-brand:hover {
  opacity: 1;
}

.ds-home__footer-brand img {
  height: clamp(22px, 3.6vw, 28px);
  width: auto;
  display: block;
  filter: drop-shadow(0 0 8px rgba(58, 160, 255, 0.2));
}

.ds-home__footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
}

.ds-home__footer-nav a {
  font-size: clamp(12px, 2.4vw, 13px);
  font-weight: 500;
  color: rgba(190, 210, 245, 0.65);
  text-decoration: none;
  transition: color 0.15s ease;
}

.ds-home__footer-nav a:hover {
  color: rgba(240, 248, 255, 0.95);
}

.ds-home__footer-copy {
  margin: 0;
  font-size: clamp(11px, 2.2vw, 12px);
  color: rgba(150, 175, 215, 0.5);
  text-align: right;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .ds-home__footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: clamp(14px, 3vw, 20px);
  }

  .ds-home__footer-nav {
    justify-content: center;
  }

  .ds-home__footer-copy {
    text-align: center;
    max-width: 22rem;
  }
}

@media (max-width: 980px) {
  .ds-home__hero-grid {
    grid-template-columns: 1fr;
  }

  .ds-home__jarvis {
    justify-self: center;
    max-width: 340px;
  }
}

@media (max-width: 720px) {
  .ds-home__burger {
    display: inline-flex;
  }

  .ds-home__nav {
    display: none;
    position: absolute;
    left: clamp(14px, 3.2vw, 28px);
    right: clamp(14px, 3.2vw, 28px);
    top: calc(100% + 10px);
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(6, 18, 45, 0.95);
    backdrop-filter: blur(14px);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5);
    z-index: 60;
  }

  .ds-home__nav.is-open {
    display: flex;
  }

  .ds-home__mlink {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .ds-home__cta-row {
    flex-direction: column;
  }

  .ds-home__btn {
    width: 100%;
  }
}

@media (min-width: 320px) {
  .ds-home {
    font-size: 16px;
  }
}

/* Modale contact — hors flux lorsque fermée (aucune hauteur / marge résiduelle dans le flux) */
#dsh-contact-overlay.dsh-contact-overlay:not(.dsh-contact-overlay--open) {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: none;
  visibility: hidden;
}

#dsh-contact-overlay.dsh-contact-overlay:not(.dsh-contact-overlay--open) .dsh-contact-box {
  display: none;
}

/* Ouvert : couche fullscreen (padding réappliqué ici uniquement) */
#dsh-contact-overlay.dsh-contact-overlay.dsh-contact-overlay--open {
  visibility: visible;
  display: flex !important;
  position: fixed;
  inset: 0;
  z-index: 2147483640;
  align-items: center;
  justify-content: center;
  height: auto !important;
  max-height: none !important;
  margin: 0;
  padding: 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  overflow: auto;
  background: rgba(2, 8, 18, 0.86);
  backdrop-filter: blur(12px);
}

#dsh-contact-overlay.dsh-contact-overlay.dsh-contact-overlay--open .dsh-contact-box {
  display: block;
}

.dsh-contact-box {
  position: relative;
  width: min(520px, 94vw);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(8, 22, 52, 0.96), rgba(4, 12, 28, 0.98));
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  color: #e8f0ff;
}

.dsh-contact-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(58, 160, 255, 0.55), transparent);
  animation: dshScanLine 5.2s linear infinite;
  pointer-events: none;
}

.dsh-contact-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(58, 160, 255, 0.45);
  pointer-events: none;
  opacity: 0.55;
}

.dsh-contact-corner--tl {
  top: 12px;
  left: 12px;
  border-right: none;
  border-bottom: none;
  border-radius: 8px 0 0 0;
}

.dsh-contact-corner--br {
  bottom: 12px;
  right: 12px;
  border-left: none;
  border-top: none;
  border-radius: 0 0 8px 0;
}

.dsh-contact-body {
  padding: 22px 24px 20px;
  font-family: inherit;
}

.dsh-contact-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.dsh-contact-title {
  font-weight: 800;
  font-size: 17px;
  color: #fff;
}

.dsh-contact-sub {
  font-size: 12px;
  color: rgba(200, 220, 255, 0.6);
  margin-top: 4px;
}

.dsh-contact-x {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.dsh-contact-x:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dsh-field {
  margin-bottom: 12px;
}

.dsh-field label {
  display: block;
  font-size: 12px;
  color: rgba(200, 220, 255, 0.65);
  margin-bottom: 6px;
}

.dsh-field input,
.dsh-field textarea {
  width: 100%;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.95);
  color: #0b1224;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.dsh-field textarea {
  resize: vertical;
  min-height: 100px;
}

.dsh-submit {
  width: 100%;
  border-radius: 12px;
  background: linear-gradient(135deg, #1a6cd4, #3aa0ff);
  border: none;
  color: #fff;
  padding: 14px;
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(58, 160, 255, 0.3);
  transition: transform 0.15s;
  margin-top: 4px;
}

.dsh-submit:hover {
  transform: translateY(-1px);
}

.dsh-contact-err {
  display: none;
  margin-top: 10px;
  font-size: 13px;
  color: #ff8787;
  text-align: center;
}

.dsh-contact-ok {
  display: none;
  text-align: center;
  padding: 24px 0 12px;
}

.dsh-contact-ok-icon {
  font-size: 42px;
  margin-bottom: 12px;
}
