@font-face {
  font-family: 'Bradford';
  src: url('../fonts/BradfordLL-Medium.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

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

body {
  background: #000;
  width: 100vw;
  overflow-x: hidden;
}

/* ── Slideshow ── */

#slideshow {
  position: fixed;
  inset: 0;
  z-index: 0;
  filter: blur(20px) brightness(0.4);
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
}

.slide.active {
  opacity: 1;
}

/* ── Blocs narratifs ── */

#blocks {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.block {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'Bradford', serif;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.05em;
  line-height: 1.5;
  filter: blur(30px);
  opacity: 0.6;
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.block p {
  margin: 0;
  padding: 0;
}

/* ── Survol des mots ── */

.mot-hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-style: dotted;
  text-decoration-color: rgba(255, 255, 255, 0.5);
}

/* ── Images RVB au survol ── */

#word-image-wrapper {
  position: fixed;
  top: 50vh;
  left: 50vw;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#word-image-wrapper.visible {
  opacity: 1;
}

#word-image-wrapper img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  max-width: 80vw;
  max-height: 80vh;
  mix-blend-mode: screen;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.6s ease;
}

/* ── Glitch texte block-4 ── */

#block-4 .block-text {
  position: relative;
  display: inline-block;
}

#block-4 .block-text::before,
#block-4 .block-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-family: 'Bradford', serif;
  font-size: inherit;
  letter-spacing: 0.05em;
  line-height: 1.5;
  text-align: center;
}

#block-4 .block-text::before {
  color: rgb(255, 0, 80);
  mix-blend-mode: screen;
  animation: text-glitch-r 3s ease-in-out infinite;
}

#block-4 .block-text::after {
  color: rgb(0, 150, 255);
  mix-blend-mode: screen;
  animation: text-glitch-b 4s ease-in-out infinite;
}

@keyframes text-glitch-r {
  0%   { transform: translate(0px, 0px); opacity: 0; }
  30%  { opacity: 1; }
  50%  { transform: translate(6px, -2px); }
  70%  { opacity: 1; }
  100% { transform: translate(0px, 0px); opacity: 0; }
}

@keyframes text-glitch-b {
  0%   { transform: translate(0px, 0px); opacity: 0; }
  30%  { opacity: 1; }
  50%  { transform: translate(-5px, 2px); }
  70%  { opacity: 1; }
  100% { transform: translate(0px, 0px); opacity: 0; }
}

/* ── Bouton corriger ── */

#cta-button {
  margin-top: 1rem;
  font-family: 'Bradford', serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: #000;
  background: #fff;
  border: none;
  padding: 0.9rem 2.5rem;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  border-radius: 2rem;
}

#cta-button:hover {
  background: transparent;
  color: #fff;
  outline: 1px solid #fff;
}

/* ── Écran réparation ── */

#repair-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2rem;
}

#repair-screen.active {
  display: flex;
}

/* Image de fond de l'écran réparation — derrière tout */
#repair-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
   transition: filter 1.2s ease;
}

/* Texte indicatif — au dessus de l'image */
#repair-hint {
  position: relative;
  z-index: 110;
  font-family: 'Bradford', serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.1em;
  text-align: center;
  pointer-events: none;
}

/* Bouton retour — au dessus de tout */
#repair-back {
  position: fixed;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  font-family: 'Bradford', serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 0.9rem 2.5rem;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  border-radius: 2rem;
}

#repair-back:hover {
  background: #fff;
  color: #000;
}

/* ── Overlay resize ── */

#resize-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
}

#resize-overlay.active {
  opacity: 1;
  transition: opacity 0.15s ease-in;
}

#resize-overlay:not(.active) {
  transition: opacity 0.4s ease-out;
}
@media (max-width: 768px) {
  .block {
    font-size: 1.2rem;
    line-height: 1.6;
    padding: 1.5rem;
  }


  #repair-hint {
    font-size: 0.75rem;
  }
}
.repair-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.repair-slide.active {
  opacity: 1;
}
#blocks {
  -webkit-overflow-scrolling: auto;
}

.block {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}