/* ============================================================
   DID32 — Couche « animée » (APERÇU)
   S'ajoute PAR-DESSUS styles-moderne.css, sans rien casser.
   Toutes les animations sont coupées si le visiteur a demandé
   à réduire les animations (réglage système, utile aux seniors).
   ============================================================ */

/* ---------- Barre de progression de lecture ---------- */
.progression-lecture {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  transform-origin: 0 50%;
  transform: scaleX(var(--progression, 0));
  background: linear-gradient(90deg, var(--orange), var(--cyan));
  pointer-events: none;
}

/* ---------- Héro : aurore lumineuse ---------- */
.hero-aurore {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-aurore span {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}
.hero-aurore span:nth-child(1) { width: 520px; height: 520px; left: -120px; top: -160px; background: #2565ff; }
.hero-aurore span:nth-child(2) { width: 420px; height: 420px; right: 8%; top: 20%; background: #4ad8ff; opacity: 0.28; }
.hero-aurore span:nth-child(3) { width: 380px; height: 380px; left: 35%; bottom: -220px; background: #f2801c; opacity: 0.22; }

/* Impulsions de courant sur les pistes de circuit (copies créées par anime.js) */
.hero-circuit .impulsion {
  stroke: #4ad8ff;
  stroke-opacity: 1;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 28 1000;
  stroke-dashoffset: 28;
  filter: drop-shadow(0 0 4px #4ad8ff);
  opacity: 0;
}

/* Titre : soulignement orange qui se dessine sous « Je le répare » */
.hero h1 .accent {
  background-image: linear-gradient(90deg, var(--orange), #ffb066);
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 100% 0.12em;
}

/* Logo : scène avec orbites et inclinaison 3D au survol de la souris */
.hero-logo-scene {
  position: relative;
  display: grid;
  place-items: center;
  width: min(330px, 75%);
  aspect-ratio: 1;
  perspective: 900px;
}
.hero-logo-scene .hero-logo {
  width: 100%;
  transform: rotateX(var(--incl-x, 0deg)) rotateY(var(--incl-y, 0deg));
  transition: transform 0.25s ease-out;
}
.hero-orbite {
  position: absolute;
  inset: -7%;
  border-radius: 50%;
  pointer-events: none;
}
.hero-orbite::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 14px 4px rgba(74, 216, 255, 0.75);
}
.hero-orbite--2 { inset: -15%; }
.hero-orbite--2::before { background: var(--orange); box-shadow: 0 0 14px 4px rgba(242, 128, 28, 0.7); width: 8px; height: 8px; margin-left: -4px; top: -4px; }

/* ---------- Bandeau défilant ---------- */
.bandeau-defilant {
  overflow: hidden;
  background: var(--orange-btn);
  color: #fff;
  padding: 0.9rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.piste-defilante {
  display: flex;
  width: max-content;
  gap: 0;
}
.piste-defilante span {
  font-family: var(--police-titres);
  font-weight: 700;
  font-size: 1.15rem;
  white-space: nowrap;
  padding: 0 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 2.8rem;
}
.piste-defilante span::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  margin-right: -1.4rem;
}

/* ---------- Chiffres clés ---------- */
.chiffres { padding: 3rem 0 0.5rem; }
.grille-chiffres {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.chiffre { display: flex; flex-direction: column; gap: 0.3rem; padding-left: 1rem; border-left: 3px solid var(--bleu-pale); }
.chiffre-valeur {
  font-family: var(--police-titres);
  font-weight: 800;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--nuit-700);
  font-variant-numeric: tabular-nums;
}
.chiffre-texte { color: var(--encre-douce); font-size: 0.95rem; }
@media (min-width: 900px) { .grille-chiffres { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Cartes : halo qui suit la souris ---------- */
.carte-service, .carte-tarif, .item-pourquoi { position: relative; isolation: isolate; }
.carte-service::after, .carte-tarif::after, .item-pourquoi::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(37, 101, 255, 0.13), transparent 70%);
  pointer-events: none;
}
.carte-service--gamer::after { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(74, 216, 255, 0.18), transparent 70%); }
.carte-service:hover::after, .carte-tarif:hover::after, .item-pourquoi:hover::after { opacity: 1; }
.carte-service, .carte-service--gamer { background-clip: padding-box; }

/* ---------- Radar : balayage + villages qui « pingent » ---------- */
.radar-balayage { transform-box: view-box; transform-origin: 230px 200px; opacity: 0; }
.radar-point circle { transform-box: fill-box; transform-origin: center; }

/* ---------- Étapes PC gamer : la ligne se dessine ---------- */
.carte-gamer { border-top-color: transparent; }
.carte-gamer::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), rgba(74, 216, 255, 0.35));
  transform-origin: 0 50%;
}

/* Galerie : liseré néon tournant au survol */
.galerie-item { position: relative; }
.galerie-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--angle, 0deg), transparent 0 60%, var(--cyan) 75%, #8b5cf6 85%, transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.galerie-item:hover::after { opacity: 1; }
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* ---------- Titres de section : apparition par balayage ---------- */
.section-titre.titre-anime { clip-path: inset(0 100% 0 0); }
.section-titre.titre-anime.visible { clip-path: inset(0 0 0 0); transition: clip-path 0.9s cubic-bezier(.2, .7, .2, 1); }

/* ---------- Étoiles des avis : elles s'allument une à une ---------- */
.avis-etoiles .etoile { display: inline-block; }

/* ============================================================
   ANIMATIONS — uniquement si le mouvement est autorisé
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .hero-aurore span:nth-child(1) { animation: aurore-1 18s ease-in-out infinite alternate; }
  .hero-aurore span:nth-child(2) { animation: aurore-2 22s ease-in-out infinite alternate; }
  .hero-aurore span:nth-child(3) { animation: aurore-3 26s ease-in-out infinite alternate; }

  .hero-circuit .impulsion { animation: courant 4.5s linear infinite; animation-delay: var(--delai, 0s); }

  .hero h1 .accent { animation: souligner 1s 0.9s cubic-bezier(.2, .7, .2, 1) both; }

  .hero-orbite { animation: orbite 14s linear infinite; }
  .hero-orbite--2 { animation-duration: 22s; animation-direction: reverse; }
  .hero-logo-scene .hero-logo { animation: none; }
  .hero-logo-scene { animation: flotter 6.5s ease-in-out 1.4s infinite; }

  .piste-defilante { animation: defiler 40s linear infinite; }
  .bandeau-defilant:hover .piste-defilante { animation-play-state: paused; }

  .radar-balayage { opacity: 1; animation: balayer 6s linear infinite; }
  .radar-point circle { animation: ping 6s linear infinite; animation-delay: var(--ping, 0s); }

  .carte-gamer::before { transform: scaleX(0); transition: transform 0.9s cubic-bezier(.2, .7, .2, 1) 0.2s; }
  .carte-gamer.visible::before { transform: scaleX(1); }

  .galerie-item:hover::after { animation: tourner 3s linear infinite; }

  .btn-orange { position: relative; overflow: hidden; }
  .btn-orange::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    animation: reflet 5s ease-in-out infinite;
    pointer-events: none;
  }

  .avis-etoiles .etoile { opacity: 0.15; transform: scale(0.4); transition: opacity 0.4s ease, transform 0.5s cubic-bezier(.3, 1.6, .5, 1); }
  .avis-etoiles.visible .etoile { opacity: 1; transform: none; }
  .avis-etoiles.visible .etoile:nth-child(2) { transition-delay: 0.12s; }
  .avis-etoiles.visible .etoile:nth-child(3) { transition-delay: 0.24s; }
  .avis-etoiles.visible .etoile:nth-child(4) { transition-delay: 0.36s; }
  .avis-etoiles.visible .etoile:nth-child(5) { transition-delay: 0.48s; }
}

@keyframes aurore-1 { to { transform: translate(180px, 120px) scale(1.15); } }
@keyframes aurore-2 { to { transform: translate(-160px, 80px) scale(0.85); } }
@keyframes aurore-3 { to { transform: translate(-200px, -90px) scale(1.2); } }
@keyframes courant {
  0%   { stroke-dashoffset: 28; opacity: 0; }
  5%   { opacity: 1; }
  60%  { opacity: 1; }
  75%  { stroke-dashoffset: -600; opacity: 0; }
  100% { stroke-dashoffset: -600; opacity: 0; }
}
@keyframes souligner { from { background-size: 0 0.12em; } to { background-size: 100% 0.12em; } }
@keyframes orbite { to { transform: rotate(360deg); } }
@keyframes defiler { to { transform: translateX(-50%); } }
@keyframes balayer { to { transform: rotate(360deg); } }
@keyframes ping {
  0%   { transform: scale(1.9); fill: var(--cyan); }
  12%  { transform: scale(1); fill: var(--bleu); }
  100% { transform: scale(1); fill: var(--bleu); }
}
@keyframes tourner { to { --angle: 360deg; } }
@keyframes reflet {
  0%, 70% { left: -60%; }
  100%    { left: 130%; }
}

@media (max-width: 720px) {
  .hero-logo-scene { width: min(55%, 210px); }
  .hero-logo-scene .hero-logo { width: 100%; }
  .bandeau-defilant { padding: 0.7rem 0; }
  .piste-defilante span { font-size: 1rem; }
}

/* ============================================================
   GALERIE PC GAMER — ventilateurs qui tournent, écrans animés
   (calques créés par anime.js, superposés aux visuels)
   ============================================================ */
.galerie-effets {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: transform 0.45s ease;   /* suit le zoom de l'image au survol */
}
.galerie-item:hover .galerie-effets { transform: scale(1.04); }

/* Ventilateur : 3 pales de lumière qui tournent, fondues dans la photo */
.fan-anime {
  position: absolute;
  border-radius: 50%;
  overflow: hidden;
  mix-blend-mode: screen;
  opacity: 0.75;
}
.fan-anime i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg,
    rgba(255, 255, 255, 0) 0deg,
    rgba(215, 190, 255, 0.05) 50deg,
    rgba(240, 225, 255, 0.55) 95deg,
    rgba(255, 255, 255, 0) 120deg);
  -webkit-mask: radial-gradient(circle, transparent 16%, #000 30%, #000 60%, transparent 71%);
  mask: radial-gradient(circle, transparent 16%, #000 30%, #000 60%, transparent 71%);
  filter: blur(1px);
}
/* Anneau lumineux de la pompe (watercooling) : une lueur fait le tour */
.anneau-pompe { opacity: 0.9; }
.anneau-pompe i {
  background: conic-gradient(from 0deg, rgba(255, 255, 255, 0) 0deg, rgba(235, 210, 255, 0.9) 50deg, rgba(255, 255, 255, 0) 100deg);
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 63%, #000 70%, transparent 75%);
  mask: radial-gradient(circle, transparent 58%, #000 63%, #000 70%, transparent 75%);
}

/* Écran de jeu : particules lumineuses qui montent + reflet qui balaie */
.ecran-anime { position: absolute; inset: 0; mix-blend-mode: screen; }
.ecran-anime i { position: absolute; inset: 0; }
.ecran-jeu i {
  bottom: auto;
  height: 200%;
  background:
    radial-gradient(6px 6px at 20% 40%, rgba(140, 255, 230, 0.95), transparent 70%),
    radial-gradient(4px 4px at 35% 15%, rgba(200, 160, 255, 0.95), transparent 70%),
    radial-gradient(6px 6px at 55% 70%, rgba(140, 255, 230, 0.85), transparent 70%),
    radial-gradient(4px 4px at 70% 30%, rgba(255, 200, 255, 0.95), transparent 70%),
    radial-gradient(6px 6px at 85% 85%, rgba(140, 255, 230, 0.85), transparent 70%),
    radial-gradient(4px 4px at 45% 55%, rgba(200, 160, 255, 0.95), transparent 70%),
    radial-gradient(4px 4px at 62% 92%, rgba(255, 255, 255, 0.8), transparent 70%),
    radial-gradient(4px 4px at 28% 75%, rgba(255, 255, 255, 0.8), transparent 70%);
  background-size: 100% 50%;
}
.ecran-jeu::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%);
  transform: translateX(-100%);
}
/* Écran de bureau : le fond d'écran ondule doucement */
.ecran-bureau { mix-blend-mode: multiply; }
.ecran-bureau i {
  background: linear-gradient(115deg,
    rgba(255, 255, 255, 0) 0%, rgba(150, 120, 230, 0.35) 20%, rgba(255, 255, 255, 0) 40%,
    rgba(120, 140, 230, 0.3) 60%, rgba(255, 255, 255, 0) 80%, rgba(150, 120, 230, 0.35) 100%);
  background-size: 300% 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .fan-anime i { animation: tourner-fan var(--vitesse, 1.1s) linear infinite; }
  .anneau-pompe i { animation-duration: 2.8s; }
  .ecran-jeu i { animation: particules 7s linear infinite; }
  .ecran-jeu::after { animation: reflet-ecran 6s ease-in-out infinite; }
  .ecran-bureau i { animation: onduler 9s ease-in-out infinite alternate; }
}
@keyframes tourner-fan { to { transform: rotate(360deg); } }
@keyframes particules { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes reflet-ecran { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes onduler { from { background-position: 0% 0; } to { background-position: 100% 0; } }

/* ---------- Scintillements du médaillon (sur les 2 éclats du logo) ---------- */
.scintillement {
  position: absolute;
  z-index: 2;
  width: 15%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  background:
    radial-gradient(circle, rgba(240, 252, 255, 0.95) 0 4%, rgba(127, 224, 255, 0.45) 12%, transparent 30%),
    linear-gradient(90deg, transparent 0 48%, rgba(170, 235, 255, 0.85) 50%, transparent 52% 100%) center / 100% 4% no-repeat,
    linear-gradient(0deg, transparent 0 48%, rgba(170, 235, 255, 0.85) 50%, transparent 52% 100%) center / 4% 100% no-repeat;
  -webkit-mask: radial-gradient(circle, #000 0 10%, transparent 50%);
  mask: radial-gradient(circle, #000 0 10%, transparent 50%);
}
@media (prefers-reduced-motion: no-preference) {
  .scintillement { animation: scintiller 3.6s ease-in-out infinite; }
  .scintillement--2 { animation-delay: 1.8s; }
}
@keyframes scintiller {
  0%, 70%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(0deg); }
  80%           { opacity: 0.9; transform: translate(-50%, -50%) scale(1.1) rotate(20deg); }
  90%           { opacity: 0.35; transform: translate(-50%, -50%) scale(0.8) rotate(35deg); }
}
