/* =====================================================================
   ScreenAds — base commune du site
   (variables, polices, reset, en-tête, pied de page, boutons,
   annotations « craie », révélations au défilement, curseur).
   Esprit : ardoise / enseigne de bistrot / affichage de vitrine.

   À charger sur toutes les pages AVANT la feuille propre à la page,
   puis assets/js/anim.js en defer. Dans le <head>, juste après les CSS :
     <script>document.documentElement.classList.add('js')</script>
   (les éléments data-reveal ne sont masqués qu'en présence de .js).

   ---------------------------------------------------------------------
   JETONS PRINCIPAUX
     Couleurs : --creme (fond papier), --creme-2 (papier plus soutenu),
                --encre (vert bouteille : texte et aplats),
                --moutarde (accent principal), --piment (touche rare),
                --ardoise (sections « ardoise »), --craie (texte sur ardoise),
                --trait (filets fins)
     Polices :  --font-titre (Big Shoulders Display, 800–900, titres)
                --font-texte (Familjen Grotesk, corps et interface)
                --font-main  (Caveat Brush, annotations à la craie, avec parcimonie)
     Divers :   --ombre (ombre portée nette décalée), --ease, --rayon
   Classes utiles : .titre (titre enseigne), .note (annotation manuscrite),
     .lead, .btn (+ .btn-encre, .btn-creme, .btn-sm, .btn-lg), .etiquette,
     section sombre : ajouter .ardoise sur la <section>.

   ---------------------------------------------------------------------
   BALISAGE DE L'EN-TÊTE (à copier tel quel ; sur les pages autres que
   l'accueil, remplacer "#fonctionnement" et "#questions" par
   "index.html#fonctionnement" et "index.html#questions") :

<a class="skip" href="#contenu">Aller au contenu</a>
<header class="site-header" data-header>
  <div class="wrap header-in">
    <a class="logo" href="index.html" aria-label="ScreenAds, accueil">
      <svg class="logo-mark" viewBox="32 19 44 70" aria-hidden="true"><path d="M38 22h32a3 3 0 0 1 3 3v58a3 3 0 0 1-3 3H38a3 3 0 0 1-3-3V25a3 3 0 0 1 3-3z"/><circle cx="54" cy="75" r="6.5"/></svg>
      <span class="logo-word">ScreenAds</span>
    </a>
    <nav class="nav" id="nav" aria-label="Navigation principale">
      <a href="#fonctionnement">Fonctionnement</a>
      <a href="#questions">Questions</a>
      <a class="nav-dl" href="telecharger.html">Télécharger</a>
    </nav>
    <a class="btn btn-sm header-cta" href="telecharger.html">Télécharger</a>
    <button class="menu-toggle" type="button" aria-expanded="false" aria-controls="nav" data-menu-toggle>
      <span class="sr">Ouvrir le menu</span><i></i><i></i>
    </button>
  </div>
</header>
<main id="contenu"> … </main>

   BALISAGE DU PIED DE PAGE :

<footer class="site-footer">
  <div class="wrap footer-in">
    <a class="logo" href="index.html" aria-label="ScreenAds, accueil">
      <svg class="logo-mark" viewBox="32 19 44 70" aria-hidden="true"><path d="M38 22h32a3 3 0 0 1 3 3v58a3 3 0 0 1-3 3H38a3 3 0 0 1-3-3V25a3 3 0 0 1 3-3z"/><circle cx="54" cy="75" r="6.5"/></svg>
      <span class="logo-word">ScreenAds</span>
    </a>
    <p class="footer-sig">ScreenAds — un projet <a href="https://nuxa.lu">Nuxa</a></p>
    <nav class="footer-links" aria-label="Liens du pied de page">
      <a href="telecharger.html">Télécharger</a>
      <a href="https://nuxa.lu">nuxa.lu</a>
    </nav>
    <p class="footer-copy">© <span data-year>2026</span> Nuxa</p>
  </div>
</footer>
   ===================================================================== */

/* ---------- Polices locales (woff2 variables) ---------- */
@font-face {
  font-family: "Big Shoulders Display";
  src: url("../fonts/big-shoulders-display.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Familjen Grotesk";
  src: url("../fonts/familjen-grotesk.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Familjen Grotesk";
  src: url("../fonts/familjen-grotesk-italic.woff2") format("woff2");
  font-weight: 400 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Caveat Brush";
  src: url("../fonts/caveat-brush.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ---------- Variables ---------- */
:root {
  --creme: #F4EDE1;
  --creme-2: #EADFCC;
  --encre: #13362B;
  --encre-doux: #3E5A50;
  --moutarde: #F2B630;
  --piment: #D9432B;
  --ardoise: #1D2B26;
  --craie: #F4EDE1;
  --trait: rgba(19, 54, 43, .2);

  --font-titre: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --font-texte: "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-main: "Caveat Brush", "Comic Sans MS", cursive;

  --ombre-c: var(--encre);
  --ombre: 5px 5px 0 var(--ombre-c);
  --rayon: 6px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.75, 0, .2, 1);
  --ressort: cubic-bezier(.34, 1.56, .64, 1);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --header-h: 68px;
  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--creme);
  color: var(--encre);
  font-family: var(--font-texte);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}
/* grain de papier, très discret */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 300; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.2 0 0 0 0 0.16 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E");
}
img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--moutarde); outline-offset: 3px; }
::selection { background: var(--moutarde); color: var(--encre); }

.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 400; background: var(--moutarde); color: var(--encre); padding: 10px 14px; border: 2px solid var(--encre); font-weight: 700; text-decoration: none; transition: top .3s var(--ease); }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- Typographie commune ---------- */
.titre {
  font-family: var(--font-titre);
  font-weight: 900;
  text-transform: uppercase;
  line-height: .88;
  letter-spacing: -.005em;
}
/* mot surligné au marqueur moutarde (se trace à la révélation) */
.titre em, .surligne {
  font-style: normal;
  background: linear-gradient(transparent 52%, var(--moutarde) 52%, var(--moutarde) 90%, transparent 90%) no-repeat 0 0 / 100% 100%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background-size 1s var(--ease) .55s;
}
.js [data-reveal] .titre em, .js .titre[data-reveal] em { background-size: 0% 100%; }
.js [data-reveal].is-in .titre em, .js .titre[data-reveal].is-in em { background-size: 100% 100%; }

.note { font-family: var(--font-main); font-weight: 400; font-size: 1.6em; line-height: 1; color: var(--piment); }
.lead { color: var(--encre-doux); font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; max-width: 34em; }

/* étiquette de prix (forme découpée) */
.etiquette {
  position: relative; display: inline-flex; align-items: center; gap: .4em;
  padding: .35em .9em .35em 1.4em;
  background: var(--moutarde); color: var(--encre);
  font-weight: 700; font-size: 14px; letter-spacing: .02em;
  clip-path: polygon(.8em 0, 100% 0, 100% 100%, .8em 100%, 0 50%);
}
.etiquette::before { content: ""; position: absolute; left: .55em; top: 50%; width: .32em; height: .32em; margin-top: -.16em; border-radius: 50%; background: var(--creme); }

/* sections ardoise */
.ardoise { background: var(--ardoise); color: var(--craie); --trait: rgba(244, 237, 225, .18); --ombre-c: var(--moutarde); }
.ardoise .lead { color: rgba(244, 237, 225, .78); }
.ardoise .note { color: var(--moutarde); }
.ardoise .titre em { color: var(--moutarde); background: none; }

/* ---------- Boutons : pleins, coins peu arrondis, ombre nette décalée ---------- */
.btn {
  --bg: var(--moutarde); --fg: var(--encre);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 52px; padding: 0 1.5em;
  border: 2px solid var(--encre); border-radius: var(--rayon);
  background: var(--bg); color: var(--fg);
  box-shadow: var(--ombre);
  font-family: var(--font-texte); font-size: 16.5px; font-weight: 700; letter-spacing: .005em;
  text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s;
  -webkit-tap-highlight-color: transparent;
}
.btn .arrow { display: inline-block; transition: transform .35s var(--ressort); }
.btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--ombre-c); }
@media (hover: hover) {
  .btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ombre-c); }
  .btn:hover .arrow { transform: translateX(5px); }
  .btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--ombre-c); }
}
.btn-encre { --bg: var(--encre); --fg: var(--creme); }
.btn-creme { --bg: var(--creme); --fg: var(--encre); }
.btn-sm { min-height: 40px; padding: 0 1.05em; font-size: 15px; --ombre: 3px 3px 0 var(--ombre-c); }
.btn-lg { min-height: 60px; padding: 0 1.8em; font-size: 18px; }

/* lien souligné animé */
.lien {
  color: inherit; text-decoration: none; font-weight: 600;
  background: linear-gradient(var(--moutarde), var(--moutarde)) 0 100% / 100% .3em no-repeat;
  transition: background-size .35s var(--ease);
}
@media (hover: hover) { .lien:hover { background-size: 100% 100%; } }

/* ---------- En-tête ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  transition: transform .5s var(--ease), background-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { background: var(--creme); box-shadow: 0 2px 0 var(--encre); }
.site-header.is-hidden { transform: translateY(-110%); }
.header-in { height: 100%; display: flex; align-items: center; gap: 28px; }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--encre); margin-right: auto; }
.logo-mark { width: 17px; height: 27px; flex: none; transition: transform .5s var(--ressort); }
.logo-mark path { fill: none; stroke: currentColor; stroke-width: 6; }
.logo-mark circle { fill: var(--moutarde); stroke: currentColor; stroke-width: 2.5; transform-origin: 54px 75px; }
.logo-word { font-family: var(--font-titre); font-weight: 900; font-size: 26px; line-height: 1; text-transform: uppercase; letter-spacing: .01em; }
@media (hover: hover) {
  .logo:hover .logo-mark { transform: rotate(-10deg); }
  .logo:hover .logo-mark circle { animation: pastille .8s var(--ressort); }
}
@keyframes pastille { 40% { transform: scale(1.6); } }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  position: relative; text-decoration: none; color: var(--encre); font-size: 15.5px; font-weight: 600;
  padding: 2px 2px;
  background: linear-gradient(var(--moutarde), var(--moutarde)) 0 88% / 0 .38em no-repeat;
  transition: background-size .35s var(--ease);
}
@media (hover: hover) { .nav a:hover { background-size: 100% .38em; } }
.nav .nav-dl { display: none; }

.menu-toggle { display: none; width: 44px; height: 44px; margin-right: -8px; position: relative; }
.menu-toggle i { position: absolute; left: 11px; right: 11px; height: 2.5px; background: var(--encre); transition: transform .45s var(--ease); }
.menu-toggle i:nth-of-type(1) { top: 17px; }
.menu-toggle i:nth-of-type(2) { top: 25px; }
.menu-toggle[aria-expanded="true"] i:nth-of-type(1) { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] i:nth-of-type(2) { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 760px) {
  .header-in { gap: 10px; }
  .menu-toggle { display: block; }
  .nav {
    position: fixed; left: 0; right: 0; top: var(--header-h); z-index: -1;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 6px var(--gutter) 30px;
    background: var(--encre);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path .55s var(--ease-io), visibility 0s .55s;
  }
  .nav a {
    padding: 12px 0; border-bottom: 2px solid rgba(244, 237, 225, .15); background: none;
    font-family: var(--font-titre); font-weight: 900; font-size: 46px; line-height: 1; text-transform: uppercase; color: var(--creme);
    transform: translateY(18px); opacity: 0; transition: transform .55s var(--ease), opacity .55s var(--ease), color .2s;
  }
  .nav .nav-dl { display: block; color: var(--moutarde); }
  .site-header.menu-open { background: var(--creme); box-shadow: 0 2px 0 var(--encre); transform: none; }
  .site-header.menu-open .nav { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .55s var(--ease-io), visibility 0s; }
  .site-header.menu-open .nav a { transform: none; opacity: 1; transition-delay: .1s; }
  .site-header.menu-open .nav a:nth-child(2) { transition-delay: .16s; }
  .site-header.menu-open .nav a:nth-child(3) { transition-delay: .22s; }
}
@media (max-width: 360px) { .header-cta { display: none; } }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--ardoise); color: rgba(244, 237, 225, .75); padding: 44px 0 calc(44px + env(safe-area-inset-bottom)); font-size: 15px; }
.footer-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; }
.site-footer .logo { color: var(--creme); margin-right: 0; }
.footer-sig { margin-right: auto; }
.footer-sig a, .footer-links a { color: var(--creme); font-weight: 600; text-decoration: none; background: linear-gradient(var(--moutarde), var(--moutarde)) 0 100% / 0 2px no-repeat; transition: background-size .35s var(--ease), color .2s; }
.footer-links { display: flex; gap: 22px; }
@media (hover: hover) { .footer-sig a:hover, .footer-links a:hover { background-size: 100% 2px; color: var(--moutarde); } }
.footer-copy { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .footer-in { flex-direction: column; align-items: flex-start; }
  .footer-sig { margin-right: 0; }
}

/* ---------- Révélations au défilement (pilotées par anim.js) ----------
   data-reveal="up | fade | left | right | scale | pop | clip | line | mask"  */
.js [data-reveal] { --rd: 0ms; transition: opacity .8s var(--ease) var(--rd), transform .9s var(--ease) var(--rd), clip-path 1s var(--ease-io) var(--rd); }
.js [data-reveal="up"]    { opacity: 0; transform: translateY(32px); }
.js [data-reveal="fade"]  { opacity: 0; }
.js [data-reveal="left"]  { opacity: 0; transform: translateX(-40px); }
.js [data-reveal="right"] { opacity: 0; transform: translateX(40px); }
.js [data-reveal="scale"] { opacity: 0; transform: scale(.9); }
.js [data-reveal="pop"]   { opacity: 0; transform: scale(.6) rotate(-8deg); transition-timing-function: var(--ressort); }
.js [data-reveal="line"]  { transform: scaleX(0); transform-origin: left; }
.js [data-reveal="clip"]  { clip-path: inset(0 100% 0 0); }
.js [data-reveal].is-in   { opacity: 1; transform: none; }
/* seul "clip" anime clip-path ; une fois fini (.is-done) on le retire pour ne pas couper ombres et débords */
.js [data-reveal="clip"].is-in { clip-path: inset(0 0 0 0); }
.js [data-reveal="clip"].is-done { clip-path: none; }

/* titres découpés en mots (data-split) : chaque mot monte derrière un masque */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .22em .04em .08em; margin: -.22em -.04em -.08em; }
.w > .wi { display: inline-block; will-change: transform; }
.js [data-reveal="mask"] { opacity: 1; transform: none; }
.js [data-reveal="mask"] .wi { transform: translateY(105%); transition: transform .9s var(--ease); transition-delay: calc(var(--rd) + var(--i, 0) * 60ms); }
.js [data-reveal="mask"].is-in .wi { transform: none; }

/* traits dessinés à la main (svg[data-draw]) : anim.js règle la longueur */
.js [data-draw] path { transition: stroke-dashoffset 1.2s var(--ease) var(--rd, 0ms); }

/* ---------- Curseur vivant (pointeur fin uniquement) ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 2px solid var(--encre); transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background-color .3s, opacity .3s; opacity: 0; }
.cursor.is-on { opacity: 1; }
.cursor.is-hover { width: 60px; height: 60px; margin: -30px 0 0 -30px; background: rgba(242, 182, 48, .45); }
.cursor-dot { position: fixed; left: 0; top: 0; z-index: 201; pointer-events: none; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--encre); opacity: 0; transition: opacity .3s; }
.cursor-dot.is-on { opacity: 1; }

/* ---------- Mouvement réduit : tout reste lisible, rien ne bouge ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .js [data-reveal] .wi { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .js [data-reveal] .titre em, .js .titre[data-reveal] em { background-size: 100% 100% !important; }
  .js [data-draw] path { stroke-dashoffset: 0 !important; }
  .cursor, .cursor-dot { display: none; }
}
