/* =========================================================================
   AG STUDIOS — Habillage « Matrix » subtil & pro
   Installé en mu-plugin (toujours actif, réversible).
   Direction : palette noire conservée + accent vert Matrix + titres monospace
   + glow léger au survol. Réversible : supprime le dossier mu-plugins/agstudios-matrix.
   ========================================================================= */

/* ---- Police « Share Tech Mono » auto-hébergée (RGPD : zéro appel Google) --
   Auparavant chargée depuis fonts.googleapis.com (l'IP du visiteur partait
   chez Google sans consentement). Le .woff2 (subset latin, v16) est désormais
   servi depuis ce mu-plugin. font-display:swap = pas de FOIT, rendu immédiat
   en fallback monospace puis bascule. */
@font-face {
  font-family: "Share Tech Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/share-tech-mono-latin-400.woff2") format("woff2");
}

:root {
  --mtx-green:      #00ff41;  /* vert phosphore Matrix */
  --mtx-green-soft: #39ff14;  /* variante glow */
  --mtx-green-dim:  rgba(0, 255, 65, 0.55);
  --mtx-green-faint: rgba(0, 255, 65, 0.14);
  --mtx-mono: "Share Tech Mono", "DejaVu Sans Mono", "Courier New", ui-monospace, monospace;
}

/* ---- Titres & labels en monospace (le « code » de Matrix) ------------- */
.wp-block-heading,
.wp-block-site-title,
.wp-block-site-tagline,
.wp-block-navigation .wp-block-navigation-item__content,
.wp-block-button__link {
  font-family: var(--mtx-mono) !important;
  letter-spacing: 0.04em;
}

/* Petit accent vert sous les gros titres de section */
h2.wp-block-heading {
  position: relative;
  text-shadow: 0 0 1px rgba(0, 255, 65, 0.25);
}
h2.wp-block-heading::after {
  content: "";
  display: block;
  width: 2.2rem;
  height: 2px;
  margin-top: 0.5rem;
  background: var(--mtx-green);
  box-shadow: 0 0 8px var(--mtx-green-soft);
  opacity: 0.85;
}
/* Garde le centrage si le titre est centré */
h2.wp-block-heading.has-text-align-center::after { margin-left: auto; margin-right: auto; }

/* ---- Liens : vert Matrix + glow au survol ---------------------------- */
a:not(.wp-block-button__link) {
  color: var(--mtx-green);
  text-decoration-color: var(--mtx-green-dim);
  transition: text-shadow .18s ease, color .18s ease;
}
a:not(.wp-block-button__link):hover {
  color: var(--mtx-green-soft);
  text-shadow: 0 0 8px var(--mtx-green-dim);
}

/* ---- Bouton CTA « ÉCOUTER MES CRÉATIONS » ---------------------------- */
.wp-block-button__link {
  background: transparent !important;
  color: var(--mtx-green) !important;
  border: 1px solid var(--mtx-green) !important;
  box-shadow: 0 0 0 0 var(--mtx-green-faint);
  transition: box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.wp-block-button__link:hover,
.wp-block-button__link:focus {
  background: var(--mtx-green) !important;
  color: #000 !important;
  box-shadow: 0 0 18px var(--mtx-green-dim);
}

/* ---- Cartes / images : liseré vert discret au survol ----------------- */
.wp-block-image,
.wp-block-cover,
figure.wp-block-image {
  transition: box-shadow .2s ease, outline-color .2s ease;
}
.wp-block-image:hover,
figure.wp-block-image:hover {
  box-shadow: 0 0 0 1px var(--mtx-green-faint), 0 0 22px rgba(0, 255, 65, 0.10);
}

/* ---- Sélection de texte en vert (détail cohérent) ------------------- */
::selection { background: var(--mtx-green); color: #000; }

/* ---- Le canvas de pluie de code (injecté par le snippet JS) --------- */
#mtx-rain {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100vh;          /* limité à l'écran d'accueil */
  z-index: 0;
  pointer-events: none;
  /* fond du hero conservé noir ; la pluie s'estompe vers le bas */
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}
/* le contenu passe au-dessus de la pluie */
.wp-site-blocks { position: relative; z-index: 1; }

/* Respecte les préférences d'accessibilité : pas d'animation si demandé.
   (Le JS le gère aussi, ceci est une ceinture de sécurité.) */
@media (prefers-reduced-motion: reduce) {
  #mtx-rain { display: none; }
}
