/* Notes manuscrites du bureau de verre (notes-manuscrites.js) — 23/11/2026.
   Stylo bleu, fluo jaune, soulignement « feutre » de l'accueil, trait barré framboise.
   Rien ici ne prend les clics. */
#mh-notes-manuscrites{position:fixed;inset:0;z-index:3;pointer-events:none;overflow:hidden;
 --mh-nm-encre:#1f4ea5;--mh-nm-taille:clamp(20px,calc(1vw + 11px),28px);
 -webkit-user-select:none;user-select:none;transition:opacity .3s}
#mh-notes-manuscrites *{pointer-events:none!important}
#mh-notes-manuscrites.mh-nm-endormi{opacity:0}
/* Pendant un défilement : caché tout de suite, sans fondu (le texte ne glisse jamais sous une note). */
#mh-notes-manuscrites.mh-nm-defile{opacity:0;transition:none}
.mh-nm-traits{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.mh-nm-croquis{filter:drop-shadow(0 0 1px rgba(255,255,255,.95)) drop-shadow(0 0 2.5px rgba(255,255,255,.75))}
.mh-nm-g{transition:opacity .35s}
.mh-nm-g path,.mh-nm-croquis path,.mh-nm-croquis circle{fill:none;stroke:var(--mh-nm-encre);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.mh-nm-g .mh-nm-encre{stroke-width:var(--epais,2.6)}
/* Halo blanc sous la flèche : un trait plus large dessous plutôt qu'un filtre (Safari). */
.mh-nm-g .mh-nm-halo{stroke:#fff;stroke-opacity:.8;stroke-width:calc(var(--epais,2.6) * 1px + 3.4px)}
.mh-nm-croquis .plein{fill:var(--mh-nm-encre);stroke-width:1}
.mh-nm-croquis .pointille{stroke-width:1.8;stroke-dasharray:2.5 4.5}
.mh-nm-croquis text{fill:var(--mh-nm-encre);stroke:none;font:700 15px/1 'Caveat du classeur','Bradley Hand','Segoe Print',cursive}
.mh-nm-note{position:absolute;margin:0;box-sizing:border-box;color:var(--mh-nm-encre);
 font:700 var(--mh-nm-taille)/1.06 'Caveat du classeur','Bradley Hand','Segoe Print',cursive;letter-spacing:.004em;
 text-align:left;white-space:normal;transform:rotate(var(--incl,0deg));transition:opacity .35s;
 text-shadow:0 0 1px #fff,0 0 2px #fff,0 0 6px rgba(255,255,255,.9),0 0 12px rgba(255,255,255,.55)}
.mh-nm-texte{margin:0;overflow-wrap:normal;-webkit-hyphens:none;hyphens:none}
.mh-nm-signe{display:block;margin:.14em .2em 0 0;font-size:.66em;text-align:right;opacity:.86}
.mh-nm-croquis{display:block;width:112px;height:auto;margin:0 0 1px;overflow:visible}
/* Croquis : le dessin à gauche, sa légende à droite. */
.mh-nm-note[data-genre=croquis]{display:flex;align-items:center;gap:.3em}
.mh-nm-note[data-genre=croquis] .mh-nm-croquis{flex:none;width:104px;margin:0}
.mh-nm-note[data-genre=croquis] .mh-nm-texte{flex:1 1 auto;min-width:0}
.mh-nm-cache{opacity:0!important}

/* Les trois marques sont des fonds : elles suivent le texte, même coupé sur deux lignes. */
.mh-nm-fluo,.mh-nm-feutre,.mh-nm-barre{background-repeat:no-repeat;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0 .1em;margin:0 -.1em}
.mh-nm-fluo,.mh-nm-feutre{text-shadow:0 0 1px rgba(255,255,255,.7)}
.mh-nm-fluo{background-position:0 74%;background-size:100% 76%;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 24' preserveAspectRatio='none'%3E%3Cpath d='M1 7C18 4 44 6 62 4S90 3 99 5L98 19C80 21 56 18 38 20S10 21 2 19Z' fill='%23ffe83a' fill-opacity='.8'/%3E%3Cpath d='M4 10C30 8 66 10 96 8L95 16C66 18 32 15 5 17Z' fill='%23ffd21f' fill-opacity='.34'/%3E%3C/svg%3E")}
.mh-nm-feutre{background-position:0 100%;background-size:100% .44em;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 14' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='f' x1='0' x2='1' y1='0' y2='0'%3E%3Cstop offset='0' stop-color='%23ffcb31'/%3E%3Cstop offset='.33' stop-color='%23ffbf37'/%3E%3Cstop offset='1' stop-color='%23ff7390'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M1 4.5C30 1.6 70 2.6 99 1.2L98 8.6C68 10.2 33 9.8 2 11.2Z' fill='url(%23f)' fill-opacity='.9'/%3E%3Cpath d='M5 13.1C40 11.8 70 12.5 97 11.4' fill='none' stroke='%2386545d' stroke-width='1.3' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E")}
.mh-nm-barre{background-position:0 60%;background-size:100% 64%;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'%3E%3Cpath d='M0 10.5C25 8.6 55 11.4 100 7.6' fill='none' stroke='%23c13b56' stroke-width='2.3' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M1 14C34 11.2 66 13 99 9.8' fill='none' stroke='%23c13b56' stroke-opacity='.85' stroke-width='1.8' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E")}
.mh-nm-barre .mh-nm-mot{opacity:.8}

/* Coup de fluo sur l'enseigne « Choisis ta classe » (téléphone, s'il manque de place pour la flèche). */
.mh-nm-fluo-seul{position:absolute;opacity:.6;
 background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 24' preserveAspectRatio='none'%3E%3Cpath d='M1 7C18 4 44 6 62 4S90 3 99 5L98 19C80 21 56 18 38 20S10 21 2 19Z' fill='%23ffe83a'/%3E%3C/svg%3E") 0 0/100% 100% no-repeat}

@media print{#mh-notes-manuscrites{display:none!important}}
@media (prefers-reduced-motion:reduce){#mh-notes-manuscrites,.mh-nm-g,.mh-nm-note{transition:none!important}}
@media (max-width:699px){
 #mh-notes-manuscrites{--mh-nm-taille:17px}
 .mh-nm-signe,.mh-nm-texte br{display:none}
 .mh-nm-note[data-genre=croquis] .mh-nm-croquis{width:72px}
}

/* Le geste du stylo : seulement si l'élève n'a pas demandé moins d'animations. */
@media (prefers-reduced-motion:no-preference){
 /* Le masque déborde un peu du mot : les lettres penchées ne sont pas rognées pendant le geste. */
 .mh-nm-anime .mh-nm-mot{padding:0 .16em;margin:0 -.16em;
  -webkit-mask:linear-gradient(90deg,#000 40%,transparent 60%) 100% 50%/250% 300% no-repeat;
  mask:linear-gradient(90deg,#000 40%,transparent 60%) 100% 50%/250% 300% no-repeat;
  animation:mh-nm-ecrire .2s linear var(--r,0s) forwards}
 /* Une animation par marque : pas de variable dans les images clés (Safari plus ancien). */
 .mh-nm-anime .mh-nm-fluo{animation:mh-nm-fluo .36s cubic-bezier(.3,.1,.3,1) var(--r,0s) both}
 .mh-nm-anime .mh-nm-feutre{animation:mh-nm-feutre .36s cubic-bezier(.3,.1,.3,1) var(--r,0s) both}
 .mh-nm-anime .mh-nm-barre{animation:mh-nm-barre .3s cubic-bezier(.3,.1,.3,1) var(--r,0s) both}
 .mh-nm-anime .mh-nm-tracer{stroke-dasharray:var(--l) var(--g);stroke-dashoffset:var(--l);
  animation:mh-nm-tracer var(--d,.4s) cubic-bezier(.45,.05,.35,1) var(--r,0s) forwards}
 .mh-nm-anime .mh-nm-apparait{animation:mh-nm-apparaitre .3s ease-out var(--r,0s) both}
 .mh-nm-anime .mh-nm-fluo-seul{animation:mh-nm-balayer .45s cubic-bezier(.3,.1,.3,1) .25s both}
}
@keyframes mh-nm-ecrire{to{-webkit-mask-position:0 50%;mask-position:0 50%}}
@keyframes mh-nm-fluo{from{background-size:0 76%}to{background-size:100% 76%}}
@keyframes mh-nm-feutre{from{background-size:0 .44em}to{background-size:100% .44em}}
@keyframes mh-nm-barre{from{background-size:0 64%}to{background-size:100% 64%}}
@keyframes mh-nm-tracer{to{stroke-dashoffset:0}}
@keyframes mh-nm-apparaitre{from{opacity:0}}
@keyframes mh-nm-balayer{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}
