:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #5c5c5c;
  --accent: #e10600;
  --film: #111111;
  --film-frame: #f4f4f4;
  --film-hole: #ffffff;
  --pellicule-h: clamp(2.25rem, 5.5vw, 3.75rem);
  --frame-w: clamp(2.75rem, 7vw, 4.5rem);
  --hole-size: clamp(0.38rem, 1.1vw, 0.58rem);
  --hole-gap: clamp(0.55rem, 1.6vw, 0.95rem);
  --contact-h: 2rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

/* —— Pellicule —— */
.pellicule {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 10;
  height: var(--pellicule-h);
  overflow: hidden;
  background: var(--film);
  pointer-events: none;
}

.pellicule--top {
  top: env(safe-area-inset-top, 0px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

.pellicule--top::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: env(safe-area-inset-top, 0px);
  background: var(--film);
}

.pellicule--bottom {
  bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.pellicule--bottom::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: env(safe-area-inset-bottom, 0px);
  background: var(--film);
}

.pellicule__track {
  display: flex;
  width: max-content;
  height: 100%;
  will-change: transform;
}

.pellicule__track--left {
  animation: film-scroll-left 28s linear infinite;
}

.pellicule__track--right {
  animation: film-scroll-right 28s linear infinite;
}

.pellicule__band {
  flex-shrink: 0;
  height: 100%;
  width: 100vw;
  min-width: 40rem;
  background-color: var(--film);
  background-image:
    /* perforations haut */
    radial-gradient(
      circle closest-side at 50% 50%,
      var(--film-hole) 0 68%,
      transparent 70%
    ),
    /* perforations bas */
    radial-gradient(
      circle closest-side at 50% 50%,
      var(--film-hole) 0 68%,
      transparent 70%
    ),
    /* cadres */
    linear-gradient(
      to right,
      transparent 0,
      transparent 0.28rem,
      var(--film-frame) 0.28rem,
      var(--film-frame) calc(100% - 0.28rem),
      transparent calc(100% - 0.28rem)
    );
  background-size:
    var(--frame-w) var(--hole-size),
    var(--frame-w) var(--hole-size),
    var(--frame-w) calc(100% - (var(--hole-size) * 2 + var(--hole-gap) * 1.6));
  background-position:
    0 calc(var(--hole-gap) * 0.45),
    0 calc(100% - var(--hole-gap) * 0.45),
    0 center;
  background-repeat: repeat-x;
}

@keyframes film-scroll-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes film-scroll-right {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

/* —— Contenu central —— */
.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  padding:
    calc(var(--pellicule-h) + env(safe-area-inset-top, 0px) + 1.25rem)
    1.25rem
    calc(
      var(--pellicule-h) + var(--contact-h) + env(safe-area-inset-bottom, 0px) +
        1.25rem
    );
  text-align: center;
}

.logo {
  width: min(320px, 72vw);
  max-width: 100%;
  height: auto;
  display: block;
  animation: rise-in 0.9s ease-out both;
}

.title {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1.5rem, 5.5vw, 3.25rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
  max-width: 18ch;
  animation: rise-in 0.9s ease-out 0.15s both;
}

.subtitle {
  font-size: clamp(0.9rem, 2.4vw, 1.1rem);
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.02em;
  animation: rise-in 0.9s ease-out 0.28s both;
}

.subtitle::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
  animation: blink 1.6s ease-in-out infinite;
}

.contact {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--pellicule-h) + env(safe-area-inset-bottom, 0px));
  z-index: 9;
  height: var(--contact-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0 1rem;
  font-size: clamp(0.75rem, 2vw, 0.875rem);
  color: var(--muted);
  background: var(--bg);
  text-align: center;
  flex-wrap: wrap;
}

.contact a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact a:hover,
.contact a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
  outline: none;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(1.1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

/* Tablette */
@media (min-width: 768px) {
  :root {
    --pellicule-h: clamp(2.75rem, 5vw, 3.5rem);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  :root {
    --pellicule-h: 3.75rem;
    --frame-w: 4.75rem;
  }

  .pellicule__track--left {
    animation-duration: 36s;
  }

  .pellicule__track--right {
    animation-duration: 36s;
  }
}

/* Très petits écrans */
@media (max-width: 380px) {
  .stage {
    gap: 0.85rem;
  }

  .logo {
    width: min(240px, 78vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pellicule__track--left,
  .pellicule__track--right,
  .logo,
  .title,
  .subtitle,
  .subtitle::before {
    animation: none;
  }

  .pellicule__track--right {
    transform: translateX(-25%);
  }
}
