@font-face {
  font-family: "P22 Stanyan";
  src: url("/public/fonts/P22 Stanyan Regular Regular.ttf") format("truetype");
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow";
  src: url("/public/fonts/Barlow-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/public/fonts/SourceSans3-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #050507;
  --void: #0a0a0f;
  --surface: #0f0f18;
  --surface-2: #161622;
  --border: #1e1e2e;
  --border-glow: #2a1a3a;
  --text-primary: #e8e0f0;
  --text-muted: #7a6e8a;
  --text-ghost: #3a3450;
  --accent: #c41e3a;
  --accent-dim: #6b0f1a;
  --accent-glow: rgba(196, 30, 58, 0.15);
  --warning: #d4a017;
  --glitch-1: #00ffff;
  --glitch-2: #ff00ff;
}

html {
  scroll-behavior: smooth;
}
body {
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--black);
}
::-webkit-scrollbar-thumb {
  background: var(--border-glow);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dim);
}

/* accessibilité */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Note Rémi : on garde toujours un outline visible au focus, jamais outline:none tout seul (accessibilité) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* glitch text (s'applique sur un élément avec data-text="...")
.glitch {
  position: relative;
  display: inline-block;
  color: var(--text-primary);
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.85;
  pointer-events: none;
}
.glitch::before {
  color: var(--glitch-1);
  transform: translate(-2px, 0);
  animation: glitch-anim-1 3.5s infinite linear alternate-reverse;
  clip-path: polygon(0 2%, 100% 2%, 100% 33%, 0 33%);
}
.glitch::after {
  color: var(--glitch-2);
  transform: translate(2px, 0);
  animation: glitch-anim-2 2.8s infinite linear alternate-reverse;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}
.glitch:hover::before {
  animation-duration: 0.4s;
}
.glitch:hover::after {
  animation-duration: 0.35s;
}
.glitch.is-active::before {
  animation-duration: 0.25s;
}
.glitch.is-active::after {
  animation-duration: 0.22s;
}

@keyframes glitch-anim-1 {
  0% {
    clip-path: polygon(0 2%, 100% 2%, 100% 5%, 0 5%);
    transform: translate(-2px, 0);
  }
  20% {
    clip-path: polygon(0 15%, 100% 15%, 100% 16%, 0 16%);
    transform: translate(2px, 0);
  }
  40% {
    clip-path: polygon(0 45%, 100% 45%, 100% 47%, 0 47%);
    transform: translate(-1px, 0);
  }
  60% {
    clip-path: polygon(0 60%, 100% 60%, 100% 62%, 0 62%);
    transform: translate(3px, 0);
  }
  80% {
    clip-path: polygon(0 78%, 100% 78%, 100% 80%, 0 80%);
    transform: translate(-2px, 0);
  }
  100% {
    clip-path: polygon(0 92%, 100% 92%, 100% 93%, 0 93%);
    transform: translate(1px, 0);
  }
}
@keyframes glitch-anim-2 {
  0% {
    clip-path: polygon(0 25%, 100% 25%, 100% 30%, 0 30%);
    transform: translate(2px, 0);
  }
  25% {
    clip-path: polygon(0 3%, 100% 3%, 100% 5%, 0 5%);
    transform: translate(-3px, 0);
  }
  50% {
    clip-path: polygon(0 55%, 100% 55%, 100% 58%, 0 58%);
    transform: translate(2px, 0);
  }
  75% {
    clip-path: polygon(0 70%, 100% 70%, 100% 72%, 0 72%);
    transform: translate(-1px, 0);
  }
  100% {
    clip-path: polygon(0 88%, 100% 88%, 100% 92%, 0 92%);
    transform: translate(2px, 0);
  }
} */

/* grain overlay */
/* .fx-grain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
} */

/* scanlines */
/* .fx-scanlines {
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  opacity: 0.04;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(255, 255, 255, 0.5) 3px,
    transparent 4px
  );
} */

/* curseur perso (activé par .cursor-fx ajouté en JS sur le body) */
/* .fx-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  opacity: 0;
  transition: opacity 0.2s ease;
  background:
    linear-gradient(var(--accent), var(--accent)) center / 2px 26px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 26px 2px no-repeat;
  mix-blend-mode: difference;
}
.fx-cursor::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--accent);
  border-radius: 50%;
}
body.cursor-fx {
  cursor: none;
}
body.cursor-fx a,
body.cursor-fx button,
body.cursor-fx input,
body.cursor-fx textarea {
  cursor: none;
}
body.cursor-fx .fx-cursor {
  opacity: 0.9;
} */

/* cartes au survol */
/* .card-fx {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--void));
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
}
.card-fx:hover {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px var(--accent-dim),
    0 8px 40px var(--accent-glow);
  transform: translateY(-3px);
} */

.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  padding: 1rem 2rem;
  border: 1px solid var(--accent);
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.1s ease;
  box-shadow: 0 0 24px var(--accent-glow);
}
.btn-accent:hover {
  background: #e02645;
  box-shadow: 0 0 40px rgba(196, 30, 58, 0.45);
}
.btn-accent:active {
  transform: scale(0.98);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 1rem 2rem;
  border: 1px solid var(--border-glow);
  transition:
    border-color 0.25s ease,
    color 0.25s ease;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 24px var(--accent-glow);
  }
  50% {
    box-shadow: 0 0 44px rgba(196, 30, 58, 0.5);
  }
}
.pulse {
  animation: pulse-glow 2.4s ease-in-out infinite;
}

/* état initial avant l'animation d'entrée (anime.js) */
.reveal {
  opacity: 0;
  transform: translateY(24px) skewY(1.5deg);
}
.reveal.is-revealed {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.6s ease,
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scroll-bounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(8px);
    opacity: 1;
  }
}
.scroll-indicator {
  animation: scroll-bounce 1.8s ease-in-out infinite;
}

/* flash messages */
.flash-msg {
  animation: flash-in 0.35s ease both;
}
@keyframes flash-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.flash-msg.flash-out {
  animation: flash-out 0.4s ease forwards;
}
@keyframes flash-out {
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* accordéon FAQ */
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.accordion-item.open .accordion-body {
  max-height: 600px;
}
.accordion-item.open .accordion-icon {
  transform: rotate(45deg);
}
.accordion-icon {
  transition: transform 0.3s ease;
}

/* particules hero */
.particle {
  position: absolute;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.25;
  pointer-events: none;
}

.text-blood {
  background: linear-gradient(
    180deg,
    #fff 0%,
    var(--accent) 60%,
    var(--accent-dim) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* prefers-reduced-motion : on coupe les anims */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .glitch::before,
  .glitch::after {
    display: none;
  }
  .fx-grain,
  .fx-scanlines {
    display: none;
  }
  body.cursor-fx {
    cursor: auto;
  }
  body.cursor-fx .fx-cursor {
    display: none;
  }
}

/* split-flap countdown */
#amathia-countdown {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.splitflap-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.splitflap-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.splitflap-digits {
  display: flex;
  gap: 0.2rem;
}
.splitflap-digit {
  position: relative;
  width: 2.2rem;
  height: 3rem;
  perspective: 200px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.splitflap-digit .half {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  background: var(--surface-2);
}
.splitflap-digit .half.top {
  top: 0;
  align-items: flex-end;
  border-bottom: 1px solid var(--accent);
  border-radius: 4px 4px 0 0;
}
.splitflap-digit .half.bottom {
  bottom: 0;
  align-items: flex-start;
  border-radius: 0 0 4px 4px;
}
.splitflap-digit .half span {
  line-height: 3rem;
  height: 3rem;
  display: block;
}
.splitflap-digit .flip-top,
.splitflap-digit .flip-bottom {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  background: var(--surface-2);
  backface-visibility: hidden;
}
.splitflap-digit .flip-top {
  top: 0;
  align-items: flex-end;
  transform-origin: bottom;
  border-bottom: 1px solid var(--accent);
  border-radius: 4px 4px 0 0;
  animation: flip-down 0.15s ease-in forwards;
}
.splitflap-digit .flip-bottom {
  bottom: 0;
  align-items: flex-start;
  transform-origin: top;
  transform: rotateX(90deg);
  border-radius: 0 0 4px 4px;
  animation: flip-up 0.15s ease-out 0.15s forwards;
}
.splitflap-digit .flip-top span,
.splitflap-digit .flip-bottom span {
  line-height: 3rem;
  height: 3rem;
  display: block;
}
@keyframes flip-down {
  from {
    transform: rotateX(0);
  }
  to {
    transform: rotateX(-90deg);
  }
}
@keyframes flip-up {
  from {
    transform: rotateX(90deg);
  }
  to {
    transform: rotateX(0);
  }
}
.splitflap-sep {
  font-family: "Unbounded", sans-serif;
  color: var(--accent);
  font-size: 1.4rem;
  align-self: center;
  padding-bottom: 1rem;
}
.splitflap-done {
  font-family: "Unbounded", sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--accent);
}
