/*
  Hackathon Unaite x Deezer
  Identité : deezerbrand.com
  - Palette primaire dominante : Deezer Purple, noir, blanc.
  - Palette secondaire par touches (orange, teal, acid), jamais plus de 30 % chacune.
  - Deezer Sans Narrow ExtraBold pour les titres, NaN Metrify Narrow pour le texte.
  - Le "beat" (ellipses oblongues) comme seul motif graphique.
*/

@font-face {
  font-family: "Deezer Sans Narrow";
  src: url("/fonts/DeezerSans-Narrow-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Metrify Narrow";
  src: url("/fonts/MetrifyNarrow-Medium.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Metrify Narrow";
  src: url("/fonts/MetrifyNarrow-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --purple: #a238ff;
  --black: #000000;
  --white: #ffffff;
  --orange: #ff673d;
  --teal: #96f9f3;
  --acid: #fcff60;
  --accent: var(--purple);
  --soft: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.22);

  --display: "Deezer Sans Narrow", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --text: "Metrify Narrow", "Helvetica Neue", Arial, sans-serif;

  --gutter: 1.25rem;
  --nav-h: 3.25rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -999rem;
  top: 0.5rem;
  z-index: 20;
  background: var(--white);
  color: var(--black);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}
.skip:focus {
  left: 0.5rem;
}

/* Information en attente */
.tbd {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 0.1rem 0.65rem 0.15rem;
  border: 1px dashed color-mix(in srgb, currentColor 55%, transparent);
  border-radius: 999px;
  font-family: var(--text);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.85;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
  padding: 0.7rem 1.3rem 0.7rem 1.1rem;
  background: var(--white);
  color: var(--black);
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.button:hover {
  background: var(--purple);
}
.icon-discord {
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  background: currentColor;
  -webkit-mask: url("/assets/discord.svg") center / contain no-repeat;
  mask: url("/assets/discord.svg") center / contain no-repeat;
}

/* Barre d'ancres */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  height: var(--nav-h);
  padding-left: var(--gutter);
  background: var(--black);
  border-bottom: 1px solid var(--line);
}
.nav-home {
  flex: none;
  display: flex;
  padding: 0.25rem;
  margin-right: 0.25rem;
}
.nav-links {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding-right: var(--gutter);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nav-links::-webkit-scrollbar {
  display: none;
}
.nav-links a {
  display: block;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}
.nav-links a:hover {
  background: rgba(255, 255, 255, 0.14);
}
.nav-links a[aria-current="true"] {
  background: var(--purple);
  color: var(--black);
}

/* 1. En-tête */
.hero {
  padding-block: 1.75rem 3.5rem;
  overflow: hidden;
}

.lockup {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.lockup img {
  display: block;
  height: auto;
}
.lockup-sep {
  width: 1px;
  height: 1.75rem;
  background: var(--white);
}
.lockup-partner {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1,
h2,
.track h3,
.day h3,
.statement,
.next-time {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.005em;
}

h1 {
  margin-top: 2rem;
  font-size: clamp(3rem, 16.2vw, 8rem);
  line-height: 0.86;
}
.h1-line {
  display: block;
}

/* Le beat : une rangée d'ellipses, hauteurs posées par main.js */
.beat {
  display: flex;
  align-items: center;
  height: clamp(3.75rem, 17vw, 11rem);
  margin-top: 1.25rem;
  margin-inline: calc(var(--gutter) * -1);
}
.beat i {
  flex: 1 1 0;
  height: calc(var(--h) * 100%);
  background: var(--purple);
  border-radius: 50%;
  transform-origin: center;
  animation: beat 2.4s ease-in-out var(--d) infinite alternate;
}
@keyframes beat {
  from {
    transform: scaleY(1);
  }
  to {
    transform: scaleY(var(--to));
  }
}

.hero-grid {
  display: grid;
  gap: 1.75rem;
  margin-top: 1.5rem;
}
.lead {
  font-size: 1.25rem;
  line-height: 1.4;
  max-width: 34ch;
  text-wrap: balance;
}
.hero-date,
.hero-discord {
  margin-top: 1rem;
  color: var(--soft);
}
.hero-date {
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 700;
}
.hero-discord .button {
  display: flex;
  width: fit-content;
}

/* Prochaine étape : un "container" beat pour un message court */
.next {
  order: -1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 15rem;
  padding: 3.25rem 1.75rem;
  background: var(--acid);
  color: var(--black);
  text-decoration: none;
  -webkit-mask: radial-gradient(ellipse 78% 50% at 50% 50%, #000 98%, transparent 100%) center / 1.7rem 100% round;
  mask: radial-gradient(ellipse 78% 50% at 50% 50%, #000 98%, transparent 100%) center / 1.7rem 100% round;
}
.next-label {
  font-weight: 700;
}
.next-time {
  font-size: clamp(3rem, 14vw, 4.75rem);
  line-height: 0.9;
  margin-block: 0.2rem 0.5rem;
}
.next-title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  max-width: 24ch;
}
.next:focus-visible .next-title,
.next:hover .next-title {
  text-decoration: underline;
}

/* Sections */
.section {
  padding-block: 3.5rem;
  border-top: 1px solid var(--line);
}
#tracks,
#prix {
  --accent: var(--acid);
}
#ressources,
#aide {
  --accent: var(--teal);
}
#sur-place {
  --accent: var(--orange);
}
/* Une "expression sonore" par section : un petit beat dans la couleur de la section */
h2::before {
  content: "";
  display: block;
  width: 4.5rem;
  height: 2.25rem;
  margin-bottom: 1rem;
  --dot: radial-gradient(ellipse closest-side, var(--accent) 96%, transparent);
  background:
    var(--dot) 0% 50% / 16.67% 45% no-repeat,
    var(--dot) 20% 50% / 16.67% 80% no-repeat,
    var(--dot) 40% 50% / 16.67% 100% no-repeat,
    var(--dot) 60% 50% / 16.67% 65% no-repeat,
    var(--dot) 80% 50% / 16.67% 90% no-repeat,
    var(--dot) 100% 50% / 16.67% 55% no-repeat;
  animation: mark 0.9s ease-in-out infinite alternate;
}
/* Chaque section bat à son propre rythme */
#tracks h2::before {
  animation-duration: 0.7s;
}
#ressources h2::before {
  animation-duration: 1.1s;
  animation-delay: -0.4s;
}
#sur-place h2::before {
  animation-duration: 0.8s;
  animation-delay: -0.2s;
}
#rendu h2::before {
  animation-duration: 1.25s;
}
#prix h2::before {
  animation-duration: 0.6s;
  animation-delay: -0.3s;
}
#aide h2::before {
  animation-duration: 1s;
  animation-delay: -0.6s;
}
@keyframes mark {
  to {
    background-size:
      16.67% 95%,
      16.67% 40%,
      16.67% 60%,
      16.67% 100%,
      16.67% 45%,
      16.67% 85%;
  }
}
h2 {
  font-size: clamp(3rem, 13vw, 6rem);
  line-height: 0.86;
}
.section-lead {
  margin-top: 1rem;
  max-width: 52ch;
  font-size: 1.125rem;
  color: var(--soft);
}

/* 2. Planning */
.days {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.25rem;
}
.day h3 {
  font-size: 2rem;
  line-height: 1;
  color: var(--accent);
}
.steps {
  margin-top: 0.5rem;
}
.step {
  display: grid;
  grid-template-columns: 7.25rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.step-time {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.625rem;
  line-height: 1;
  text-transform: uppercase;
}
.step-body {
  font-weight: 700;
}
.step-body small {
  display: block;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--soft);
}
.step-body .tbd {
  display: table;
}
.step-open .step-time {
  color: rgba(255, 255, 255, 0.5);
}
.step.is-past {
  opacity: 0.45;
}
.step.is-next {
  margin-inline: -0.75rem;
  padding-inline: 0.75rem;
  background: var(--acid);
  color: var(--black);
  border-bottom-color: transparent;
  border-radius: 0.75rem;
}
.step.is-next small {
  color: inherit;
}

/* 3. Tracks */
.tracks {
  display: grid;
  gap: 1rem;
  margin-top: 2.25rem;
}
.track {
  min-width: 0;
  padding: 1.75rem 1.5rem 2rem;
  border-radius: 1.75rem;
  color: var(--black);
}
.track-purple {
  background: var(--purple);
}
.track-teal {
  background: var(--teal);
}
.track-kind {
  font-weight: 700;
}
.track h3 {
  margin-top: 0.5rem;
  font-size: clamp(1.7rem, 8.3vw, 4.25rem);
  line-height: 0.88;
  overflow-wrap: break-word;
}
.track-what {
  margin-top: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}
.track h4 {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--black);
  font-size: 1rem;
}
.track ul {
  margin-top: 0.4rem;
}
.track li {
  padding-block: 0.55rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.22);
  line-height: 1.35;
}
.track-desc {
  margin-top: 1rem;
  font-size: 1.125rem;
  line-height: 1.4;
}
.track-more {
  display: inline-block;
  margin-top: 1.25rem;
  font-weight: 700;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 2px;
}

/* 4. Ressources */
.resources {
  margin-top: 2.25rem;
  border-top: 2px solid var(--white);
}
.resource {
  display: grid;
  gap: 0.35rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.resource h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1;
  text-transform: uppercase;
}
.resource-links {
  color: var(--soft);
}
.resource-links a {
  color: var(--white);
  font-weight: 700;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  margin-right: 1rem;
}
.resource-links a:hover {
  color: var(--accent);
}
.resource-links .tbd {
  margin-top: 0;
}
.resource-links .button {
  margin: 0;
  padding: 0.55rem 1.1rem;
  color: var(--black);
  text-decoration: none;
}
.resource-links .button:hover {
  background: var(--accent);
  color: var(--black);
}
.resource pre {
  margin: 0.5rem 0 0;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  font-size: 0.875rem;
}
.callout {
  margin-top: 1.5rem;
  padding-left: 1rem;
  border-left: 4px solid var(--accent);
  max-width: 60ch;
}

/* 5. Sur place, 8. Aide */
.facts {
  display: grid;
  gap: 1.75rem 2rem;
  margin-top: 2.25rem;
}
.fact dt {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1;
  text-transform: uppercase;
  color: var(--accent);
}
.fact dd {
  margin-top: 0.4rem;
  max-width: 44ch;
}
.fact .tbd {
  display: table;
  margin-top: 0.5rem;
}

/* 6. Règles et rendu */
.split {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.25rem;
}
.split h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1;
  text-transform: uppercase;
  color: var(--accent);
}
.split p {
  margin-top: 0.75rem;
  max-width: 44ch;
}
.rules {
  margin-top: 0.75rem;
  border-top: 2px solid var(--white);
}
.rules li {
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.rules-detail li {
  font-weight: 400;
}
.rules-detail strong {
  display: block;
  font-weight: 700;
}

/* 7. Prix */
.podium {
  display: grid;
  gap: 0;
  margin-top: 2.25rem;
}
.podium li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}
.podium-rank {
  font-weight: 700;
}
.podium-rank sup {
  font-size: 0.65em;
}
.podium-amount {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.75rem, 12vw, 4rem);
  line-height: 0.9;
}
.podium-first .podium-amount {
  font-size: clamp(3.75rem, 17vw, 6.5rem);
  color: var(--accent);
}

/* 8. Aide : mentors */
.sub {
  margin-top: 2.25rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1;
  text-transform: uppercase;
  color: var(--accent);
}
.sub-lead {
  margin-top: 0.4rem;
}
.mentors {
  display: grid;
  margin-top: 1rem;
}
.mentors li {
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.mentors strong {
  display: block;
  font-size: 1.25rem;
}
.mentors span {
  color: var(--soft);
}

/* Pied de page */
.footer {
  padding-block: 2.5rem 3.5rem;
  border-top: 1px solid var(--line);
}
.footer p + p {
  margin-top: 1rem;
}
.partner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--soft);
}
.partner img {
  display: block;
}
.footer-meta {
  font-size: 0.9375rem;
  color: var(--soft);
}

/* Tablette et plus : deux colonnes */
@media (min-width: 48rem) {
  :root {
    --gutter: 2.5rem;
  }
  body {
    font-size: 1.25rem;
  }
  .nav-links {
    gap: 0.5rem;
  }
  .hero {
    padding-block: 2.5rem 5rem;
  }
  .beat {
    height: clamp(6rem, 11vw, 8.5rem);
  }
  h1 {
    font-size: clamp(5rem, 12.2vw, 9.7rem);
  }
  .next {
    order: 0;
  }
  .hero-grid {
    grid-template-columns: 1fr minmax(20rem, 26rem);
    align-items: center;
    gap: 3rem;
    margin-top: 2.5rem;
  }
  .lead {
    font-size: 1.5rem;
  }
  .section {
    padding-block: 5rem;
  }
  .days,
  .tracks,
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 3rem;
  }
  .tracks {
    gap: 1.5rem;
  }
  .track {
    padding: 2.25rem 2.25rem 2.5rem;
  }
  .track h3 {
    font-size: clamp(1.7rem, 3.7vw, 3.35rem);
  }
  .resource {
    grid-template-columns: 17rem 1fr 1.1fr;
    gap: 1.5rem;
    align-items: baseline;
  }
  .facts {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 3rem;
  }
  .mentors {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 3rem;
  }
  .podium {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 3rem;
    align-items: end;
  }
  .podium li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-block: 0 1.25rem;
    border-bottom: 2px solid var(--white);
  }
}

@media (min-width: 68rem) {
  .facts,
  .split {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Écran projeté au réfectoire */
@media (min-width: 110rem) {
  html {
    font-size: 125%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .beat i,
  h2::before {
    animation: none;
  }
}
