/* Banque de textures — Notre-Dame des Neiges · v1.0 (octobre 2026)
   Motifs au trait 1,25 px, posés ton sur ton derrière une section, comme un filigrane.

   Usage :  <section class="ndn-tex ndn-tex--sable ndn-tex--arches ndn-tex--fade-x">…</section>
            1 classe de base + 1 fond + 1 motif (+ fondu, intensité, échelle facultatifs)

   Chaque SVG est un MASQUE (trait noir sur transparent) : la couleur du trait vient de --tex-ink,
   fixée par la classe de fond. Le motif est peint dans un ::before (aria-hidden de fait, z-index -1)
   et ne capte aucun clic. */

.ndn-tex { position: relative; isolation: isolate; }
.ndn-tex::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background: var(--tex-ink, #DACDBE);
  -webkit-mask-image: var(--tex-img), var(--tex-fade, linear-gradient(#000, #000));
          mask-image: var(--tex-img), var(--tex-fade, linear-gradient(#000, #000));
  -webkit-mask-size: calc(var(--tex-w) * var(--tex-scale, 1)) calc(var(--tex-h) * var(--tex-scale, 1)), 100% 100%;
          mask-size: calc(var(--tex-w) * var(--tex-scale, 1)) calc(var(--tex-h) * var(--tex-scale, 1)), 100% 100%;
  -webkit-mask-repeat: var(--tex-repeat, repeat), no-repeat;
          mask-repeat: var(--tex-repeat, repeat), no-repeat;
  -webkit-mask-position: var(--tex-pos, 0 0), 0 0;
          mask-position: var(--tex-pos, 0 0), 0 0;
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}
/* Navigateurs sans masque CSS : pas de motif, le fond uni reste. */
@supports not ((mask-image: none) or (-webkit-mask-image: none)) { .ndn-tex::before { display: none; } }
@media print { .ndn-tex::before { display: none; } }

/* ---------- Fonds (trait « standard ») ---------- */
.ndn-tex--ivoire { background-color: #F3F2EF; --tex-ink: #E0D9D0; } /* Ivoire */
.ndn-tex--sable { background-color: #ECE3D8; --tex-ink: #DACDBE; } /* Sable */
.ndn-tex--ardoise-clair { background-color: #EEF2F5; --tex-ink: #D9E2E9; } /* Ardoise clair */
.ndn-tex--anthracite { background-color: #33312E; --tex-ink: #42403C; } /* Anthracite */
.ndn-tex--nuit { background-color: #1F1E1C; --tex-ink: #2E2C29; } /* Anthracite nuit */
.ndn-tex--ardoise { background-color: #3D5568; --tex-ink: #4C6478; } /* Ardoise */

/* ---------- Intensité (par défaut : standard) ---------- */
.ndn-tex--ivoire.ndn-tex--discret { --tex-ink: #E9E5DF; }  .ndn-tex--ivoire.ndn-tex--marque { --tex-ink: #D2C8BB; }
.ndn-tex--sable.ndn-tex--discret { --tex-ink: #E3D8CB; }  .ndn-tex--sable.ndn-tex--marque { --tex-ink: #CDBDAA; }
.ndn-tex--ardoise-clair.ndn-tex--discret { --tex-ink: #E4EAEF; }  .ndn-tex--ardoise-clair.ndn-tex--marque { --tex-ink: #C9D6E0; }
.ndn-tex--anthracite.ndn-tex--discret { --tex-ink: #3A3835; }  .ndn-tex--anthracite.ndn-tex--marque { --tex-ink: #4E4B46; }
.ndn-tex--nuit.ndn-tex--discret { --tex-ink: #272523; }  .ndn-tex--nuit.ndn-tex--marque { --tex-ink: #3A3835; }
.ndn-tex--ardoise.ndn-tex--discret { --tex-ink: #445C6F; }  .ndn-tex--ardoise.ndn-tex--marque { --tex-ink: #587085; }

/* ---------- Fondus : le motif s'efface là où se pose le texte ---------- */
.ndn-tex--fade-x  { --tex-fade: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); } /* bords gauche et droit */
.ndn-tex--fade-y  { --tex-fade: linear-gradient(180deg, transparent, #000 60%); }                     /* haut effacé */
.ndn-tex--fade-r  { --tex-fade: linear-gradient(90deg, transparent 30%, #000 85%); }                  /* visible à droite */
.ndn-tex--fade-l  { --tex-fade: linear-gradient(270deg, transparent 30%, #000 85%); }                 /* visible à gauche */
.ndn-tex--fade-b  { --tex-fade: linear-gradient(0deg, transparent 30%, #000 80%); }                   /* visible en haut */
.ndn-tex--fade-corner { --tex-fade: radial-gradient(120% 90% at 100% 100%, #000 20%, transparent 75%); } /* coin bas droit */

/* ---------- Échelle ---------- */
.ndn-tex--s  { --tex-scale: .75; }
.ndn-tex--l  { --tex-scale: 1.5; }
.ndn-tex--xl { --tex-scale: 2; }
@media (max-width: 767px) { .ndn-tex { --tex-scale: .85; } .ndn-tex--l { --tex-scale: 1.25; } .ndn-tex--xl { --tex-scale: 1.5; } }

/* ---------- Motifs (taille d'un module, en px à l'échelle 1) ---------- */
.ndn-tex--ailes { --tex-img: url("ailes.svg"); --tex-w: 100px; --tex-h: 100px; }
.ndn-tex--alpages { --tex-img: url("alpages.svg"); --tex-w: 40px; --tex-h: 24px; }
.ndn-tex--arches { --tex-img: url("arches.svg"); --tex-w: 140px; --tex-h: 170px; }
.ndn-tex--aureoles { --tex-img: url("aureoles.svg"); --tex-w: 96px; --tex-h: 96px; }
.ndn-tex--baies { --tex-img: url("baies.svg"); --tex-w: 40px; --tex-h: 120px; }
.ndn-tex--banche { --tex-img: url("banche.svg"); --tex-w: 120px; --tex-h: 24px; }
.ndn-tex--bulbes { --tex-img: url("bulbes.svg"); --tex-w: 56px; --tex-h: 112px; }
.ndn-tex--charpente { --tex-img: url("charpente.svg"); --tex-w: 96px; --tex-h: 48px; }
.ndn-tex--chene { --tex-img: url("chene.svg"); --tex-w: 240px; --tex-h: 160px; }
.ndn-tex--cirrus { --tex-img: url("cirrus.svg"); --tex-w: 240px; --tex-h: 80px; }
.ndn-tex--clavier { --tex-img: url("clavier.svg"); --tex-w: 84px; --tex-h: 48px; }
.ndn-tex--claviers { --tex-img: url("claviers.svg"); --tex-w: 120px; --tex-h: 60px; }
.ndn-tex--clocher { --tex-img: url("clocher.svg"); --tex-w: 320px; --tex-h: 200px; --tex-repeat: repeat-x; --tex-pos: 0 100%; }
.ndn-tex--contours { --tex-img: url("contours.svg"); --tex-w: 100px; --tex-h: 140px; }
.ndn-tex--corniche { --tex-img: url("corniche.svg"); --tex-w: 48px; --tex-h: 40px; }
.ndn-tex--coupes { --tex-img: url("coupes.svg"); --tex-w: 80px; --tex-h: 96px; }
.ndn-tex--cretes { --tex-img: url("cretes.svg"); --tex-w: 120px; --tex-h: 48px; }
.ndn-tex--croisillons { --tex-img: url("croisillons.svg"); --tex-w: 48px; --tex-h: 48px; }
.ndn-tex--croix { --tex-img: url("croix.svg"); --tex-w: 40px; --tex-h: 40px; }
.ndn-tex--damier { --tex-img: url("damier.svg"); --tex-w: 64px; --tex-h: 64px; }
.ndn-tex--dome { --tex-img: url("dome.svg"); --tex-w: 96px; --tex-h: 72px; }
.ndn-tex--ecailles { --tex-img: url("ecailles.svg"); --tex-w: 24px; --tex-h: 32px; }
.ndn-tex--eclats { --tex-img: url("eclats.svg"); --tex-w: 160px; --tex-h: 160px; }
.ndn-tex--estrade { --tex-img: url("estrade.svg"); --tex-w: 160px; --tex-h: 80px; }
.ndn-tex--flocons { --tex-img: url("flocons.svg"); --tex-w: 120px; --tex-h: 120px; }
.ndn-tex--grisaille { --tex-img: url("grisaille.svg"); --tex-w: 60px; --tex-h: 60px; }
.ndn-tex--lames { --tex-img: url("lames.svg"); --tex-w: 120px; --tex-h: 120px; }
.ndn-tex--losanges { --tex-img: url("losanges.svg"); --tex-w: 120px; --tex-h: 120px; }
.ndn-tex--lumieres { --tex-img: url("lumieres.svg"); --tex-w: 20px; --tex-h: 20px; }
.ndn-tex--medaillon { --tex-img: url("medaillon.svg"); --tex-w: 120px; --tex-h: 120px; }
.ndn-tex--neige { --tex-img: url("neige.svg"); --tex-w: 100px; --tex-h: 100px; }
.ndn-tex--neumes { --tex-img: url("neumes.svg"); --tex-w: 200px; --tex-h: 56px; }
.ndn-tex--nimbe { --tex-img: url("nimbe.svg"); --tex-w: 640px; --tex-h: 640px; --tex-repeat: no-repeat; --tex-pos: 100% 50%; }
.ndn-tex--niveaux { --tex-img: url("niveaux.svg"); --tex-w: 240px; --tex-h: 96px; }
.ndn-tex--oculus { --tex-img: url("oculus.svg"); --tex-w: 64px; --tex-h: 104px; }
.ndn-tex--ondes { --tex-img: url("ondes.svg"); --tex-w: 160px; --tex-h: 60px; }
.ndn-tex--partition { --tex-img: url("partition.svg"); --tex-w: 280px; --tex-h: 72px; }
.ndn-tex--pistes { --tex-img: url("pistes.svg"); --tex-w: 80px; --tex-h: 160px; }
.ndn-tex--plombs { --tex-img: url("plombs.svg"); --tex-w: 240px; --tex-h: 240px; }
.ndn-tex--portail { --tex-img: url("portail.svg"); --tex-w: 40px; --tex-h: 40px; }
.ndn-tex--portee { --tex-img: url("portee.svg"); --tex-w: 240px; --tex-h: 64px; }
.ndn-tex--rangs { --tex-img: url("rangs.svg"); --tex-w: 200px; --tex-h: 24px; }
.ndn-tex--registres { --tex-img: url("registres.svg"); --tex-w: 60px; --tex-h: 64px; }
.ndn-tex--resonance { --tex-img: url("resonance.svg"); --tex-w: 120px; --tex-h: 120px; }
.ndn-tex--rubans { --tex-img: url("rubans.svg"); --tex-w: 200px; --tex-h: 100px; }
.ndn-tex--sapins { --tex-img: url("sapins.svg"); --tex-w: 56px; --tex-h: 72px; }
.ndn-tex--sinus { --tex-img: url("sinus.svg"); --tex-w: 80px; --tex-h: 40px; }
.ndn-tex--soleil { --tex-img: url("soleil.svg"); --tex-w: 120px; --tex-h: 120px; }
.ndn-tex--tirants { --tex-img: url("tirants.svg"); --tex-w: 40px; --tex-h: 40px; }
.ndn-tex--toit { --tex-img: url("toit.svg"); --tex-w: 240px; --tex-h: 140px; }
.ndn-tex--tuyaux { --tex-img: url("tuyaux.svg"); --tex-w: 200px; --tex-h: 150px; }
.ndn-tex--verrieres { --tex-img: url("verrieres.svg"); --tex-w: 200px; --tex-h: 120px; }
.ndn-tex--volutes { --tex-img: url("volutes.svg"); --tex-w: 80px; --tex-h: 80px; }
.ndn-tex--nimbe { --tex-scale: .7; }
