
@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 {
  /* Couleurs principales */
  --black: #141414;
  --void: #141414;
  --surface: #fcfcfc;
  --surface-2: #f5f5f5;

  /* Bordures */
  --border: #d9d9d9;
  --border-glow: #2f3a3c;

  /* Textes */
  --text-primary: #141414;
  --text-muted: #2f3a3c;
  --text-ghost: #8a8a8a;

  /* Accents */
  --accent: #7a0f0c;
  --accent-dim: #5a0b09;
  --accent-glow: rgba(122, 15, 12, 0.15);

  /* États */
  --warning: #c28a00;

  /* Effets */
  --glitch-1: #2f3a3c;
  --glitch-2: #7a0f0c;
}

/* --- Réinitialisations douces ---------------------------------------- */
html {
  scroll-behavior: smooth;
}
body {
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* Scrollbar thématique */
::-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;
}

/* Focus visible — contour rouge net (jamais d'outline:none sans remplacement) */
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;
}

/* =====================================================================
 *   EFFET 1 — GLITCH TEXT
 *   Duplication via ::before / ::after, décalage clip-path, cyan/magenta.
 *   À appliquer sur un élément contenant 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);
  }
}

/* =====================================================================
 *   EFFET 2 — GRAIN OVERLAY (texture bruit SVG fixe)
 *   ===================================================================== */
/* .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");
 * } */

/* =====================================================================
 *   EFFET 4 — SCAN LINES (lignes horizontales très fines)
 *   ===================================================================== */
/* .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
 *  );
 * } */

/* =====================================================================
 *   EFFET 3 — CURSEUR PERSONNALISÉ (croix de visée rouge)
 *   Activé via JS (.cursor-fx sur body) — masqué sur écrans tactiles.
 *   ===================================================================== */
/* .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;
 * } */

/* =====================================================================
 *   EFFET 6 — HOVER CARDS (border + glow rouge)
 *   ===================================================================== */
.card {
  background: linear-gradient(180deg, #000000, #505050);
  width: 25vw;
  border-radius: 20px;
  border: 1px solid #505050;
  background: linear-gradient(0deg, #000 0%, #201e23 100%);
  padding: 20px;
  height: auto;
}

.card-creneau {
  width: 100% !important;
}

/* Bouton accent avec glow pulsé */
.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);
  background-color: #7a0f0c;
}
.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;
}

/* =====================================================================
 *   EFFET 5 — DISTORSION D'ENTRÉE (état initial avant 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);
}

/* Indicateur de défilement */
@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 : disparition */
.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;
}

.hero {
  background-image: url("/public/img/hero_banner.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Particules hero */
.particle {
  position: absolute;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.25;
  pointer-events: none;
}

/* Texte en dégradé sang */
/* .text-blood {
 *  background: linear-gradient(
 *    180deg,
 *    #fff 0%,
 *    var(--accent) 60%,
 *    var(--accent-dim) 100%
 *  );
 *  -webkit-background-clip: text;
 *  background-clip: text;
 *  color: transparent;
 * } */

/* =====================================================================
 *   RESPECT DES PRÉFÉRENCES DE MOUVEMENT RÉDUIT
 *   ===================================================================== */
@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;
  }
}
