:root {
  --accent: #C9F73A;
  --ground: #0F0B1E;
  --card: #1A1433;
  --card-deep: #2A2250;
  --ink: #F4F1FF;
  --muted: #B9B3D6;
  --line: #4A4274;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--ground);
  background-image: radial-gradient(rgba(244, 241, 255, 0.10) 1.5px, transparent 1.6px);
  background-size: 28px 28px;
  font-family: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--ink); }

.display { font-family: 'Bungee', 'Arial Black', Impact, sans-serif; }

.page {
  min-height: 100vh;
  padding: 40px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

/* ---------- Index / splash ---------- */
.splash {
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4vh, 40px);
  overflow: hidden;
}

.video-wrap {
  position: relative;
  /* 9:16 card that fits both the width and the height of the viewport */
  width: min(400px, 78vw, calc((100dvh - 260px) * 0.5625));
  min-width: 200px;
  aspect-ratio: 9 / 16;
  rotate: -1.5deg;
  animation: float-in 0.8s cubic-bezier(.2, .9, .3, 1.2) both;
}

.video-shadow {
  position: absolute;
  inset: 0;
  transform: translate(6%, 3%) rotate(-0.5deg);
  background: var(--accent);
  border-radius: 28px;
}

.video-frame {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  border: 6px solid var(--ink);
  border-radius: 28px;
  background: repeating-linear-gradient(-45deg, var(--card) 0 22px, var(--card-deep) 22px 44px);
}

.video-frame video {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder shows until the video can play */
.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.4s;
}
.is-playing .video-placeholder { opacity: 0; }

.play-icon {
  width: 28%;
  aspect-ratio: 1;
  border: 5px solid var(--ink);
  border-radius: 50%;
  position: relative;
}
.play-icon::after {
  content: "";
  position: absolute;
  left: 38%;
  top: 28%;
  width: 34%;
  height: 44%;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.placeholder-label {
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: clamp(12px, 1.6vw, 18px);
}

.sound-toggle {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: rgba(15, 11, 30, 0.7);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.15s;
}
.sound-toggle svg { width: 22px; height: 22px; }
.sound-toggle .icon-sound { display: none; }
.sound-toggle[aria-pressed="true"] .icon-sound { display: block; }
.sound-toggle[aria-pressed="true"] .icon-muted { display: none; }
.is-playing .sound-toggle { opacity: 1; pointer-events: auto; }
.sound-toggle:active { transform: scale(0.92); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  font-family: 'Bungee', 'Arial Black', Impact, sans-serif;
  letter-spacing: 0.08em;
  background: var(--accent);
  color: var(--ground);
  border: 4px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: translate .12s ease, box-shadow .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: var(--ground); }
.btn:focus-visible { outline: 4px solid var(--ink); outline-offset: 6px; }
.btn:disabled { opacity: 0.6; cursor: progress; }

.btn-enter {
  width: min(460px, 86vw);
  font-size: clamp(30px, 6vw, 52px);
  line-height: 1;
  padding: clamp(18px, 3.2vh, 30px) 24px;
  box-shadow: 0 12px 0 var(--ink);
  rotate: 1.5deg;
  animation: float-in 0.8s 0.15s cubic-bezier(.2, .9, .3, 1.2) both;
}
.btn-enter:hover { translate: 0 4px; box-shadow: 0 8px 0 var(--ink); }
.btn-enter:active { translate: 0 12px; box-shadow: 0 0 0 var(--ink); }

@keyframes float-in {
  from { opacity: 0; translate: 0 24px; }
  to   { opacity: 1; translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .video-wrap, .btn-enter { animation: none; }
}

.btn-small {
  font-size: 18px;
  letter-spacing: 0.06em;
  padding: 14px 28px;
  min-height: 56px;
  box-shadow: 0 6px 0 var(--ink);
}
.btn-small:hover { translate: 0 3px; box-shadow: 0 3px 0 var(--ink); }
.btn-small:active { translate: 0 6px; box-shadow: 0 0 0 var(--ink); }

.caption {
  margin: 0;
  font-size: clamp(11px, 1.5vw, 16px);
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Header ---------- */
.site-header {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.wordmark {
  text-decoration: none;
  font-family: 'Bungee', 'Arial Black', Impact, sans-serif;
  font-size: 24px;
  letter-spacing: 0.04em;
  color: var(--accent);
  rotate: -2deg;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  min-height: 44px;
}

/* ---------- Objets ---------- */
.intro {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.intro h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 88px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
.intro p {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
  max-width: 56ch;
}

.notice {
  width: 100%;
  max-width: 1200px;
  margin: 0;
  padding: 16px 20px;
  border: 3px solid var(--accent);
  border-radius: 16px;
  font-weight: 700;
  color: var(--accent);
}
.notice[hidden] { display: none; }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 40px 32px;
}

.empty {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 18px;
  color: var(--muted);
  text-align: center;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  background: var(--card);
  border: 4px solid var(--ink);
  border-radius: 24px;
  box-shadow: 10px 10px 0 var(--accent);
  transition: translate .15s ease;
}
.card:hover { translate: 0 -6px; }
.card:nth-child(6n+1) { rotate: -1deg; }
.card:nth-child(6n+2) { rotate: 1.2deg; }
.card:nth-child(6n+3) { rotate: -0.6deg; }
.card:nth-child(6n+4) { rotate: 0.8deg; }
.card:nth-child(6n+5) { rotate: -1.4deg; }
.card:nth-child(6n+6) { rotate: 0.5deg; }

.card figure {
  margin: 0;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  background-color: var(--card-deep);
  background-image: repeating-linear-gradient(135deg, rgba(244, 241, 255, 0.05) 0 14px, transparent 14px 28px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card figure span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.card h2 { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.card p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; white-space: pre-line; }
.card time { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #7F78A3; }

/* ---------- Ajouter ---------- */
.form-card {
  width: 100%;
  max-width: 640px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: var(--card);
  border: 4px solid var(--ink);
  border-radius: 28px;
  box-shadow: 14px 14px 0 var(--accent);
  rotate: -0.6deg;
}
.form-card h1 { margin: 0; font-size: clamp(30px, 5vw, 48px); line-height: 1; }
.form-card .lead { margin: 0; font-size: 16px; color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 10px; }
.field > label, .field > .label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.input, .textarea {
  width: 100%;
  padding: 14px 18px;
  font: inherit;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  background: var(--ground);
  border: 3px solid var(--line);
  border-radius: 16px;
}
.input { min-height: 56px; }
.textarea { line-height: 1.45; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #7F78A3; }
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(244, 241, 255, 0.12);
}

.drop {
  position: relative;
  width: 100%;
  min-height: 180px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  background-color: var(--ground);
  background-image: repeating-linear-gradient(135deg, rgba(244, 241, 255, 0.04) 0 14px, transparent 14px 28px);
  border: 3px dashed #7F78A3;
  border-radius: 16px;
  cursor: pointer;
  overflow: hidden;
}
.drop:hover, .drop.is-over { border-color: var(--accent); }
.drop strong { font-size: 16px; font-weight: 700; }
.drop small { font-size: 13px; color: var(--muted); }
.drop.has-photo { padding: 0; border-style: solid; border-color: var(--accent); }
.drop.has-photo > :not(.drop-preview) { display: none; }
.drop-preview { display: none; width: 100%; max-height: 360px; object-fit: contain; }
.drop.has-photo .drop-preview { display: block; }
#photo:focus-visible + .drop, .drop:focus-within { outline: 4px solid var(--ink); outline-offset: 4px; }

.form-error {
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 92, 92, 0.12);
  border: 2px solid #FF7A7A;
  color: #FFB3B3;
  font-weight: 700;
}
.form-error[hidden] { display: none; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.btn-submit {
  align-self: flex-start;
  font-size: 22px;
  padding: 16px 40px;
  min-height: 64px;
  box-shadow: 0 8px 0 var(--ink);
  rotate: 1deg;
}
.btn-submit:hover { translate: 0 3px; box-shadow: 0 3px 0 var(--ink); }
.btn-submit:active { translate: 0 6px; box-shadow: 0 0 0 var(--ink); }

/* ---------- Small screens ---------- */
@media (max-width: 520px) {
  .page { padding: 24px 16px 64px; gap: 36px; }
  .site-header .btn-small { font-size: 15px; padding: 12px 20px; min-height: 48px; }
  .wordmark { font-size: 20px; }
  .form-card { padding: 22px 18px; box-shadow: 8px 8px 0 var(--accent); }
  .btn-submit { align-self: stretch; }
  .card { box-shadow: 8px 8px 0 var(--accent); }
}
