/* =============================================================================
 * Banque de dessins Huardo — resources/views/partials/illustrations/*.php
 *
 * Dessins maison, à plat, dans l'univers du carnet : encre marine, jaune huard,
 * papier crème, trait franc. Toutes les couleurs viennent de tokens.css.
 * Les scènes vivent seules (boucles CSS douces) ; leur entrée à l'écran est
 * confiée à mouvement.js. Sans animation préférée : tout est fixe et visible.
 * ============================================================================= */

.illu { display: block; width: 100%; height: auto; max-width: 440px; overflow: visible; }

/* ---- Palette ---------------------------------------------------------------- */
.illu .il-encre   { fill: var(--encre); }
.illu .il-marine  { fill: var(--encre-2); }
.illu .il-nuit    { fill: var(--il-nuit); }
.illu .il-laiton  { fill: var(--huard); }
.illu .il-papier  { fill: var(--papier); }
.illu .il-fond    { fill: var(--papier-2); }
.illu .il-fond-jaune { fill: var(--papier); opacity: .55; }
.illu .il-peau-a  { fill: var(--il-peau-a); }
.illu .il-peau-b  { fill: var(--il-peau-b); }
.illu .il-vert    { fill: var(--stamp-ok); }
.illu .il-rouge   { fill: var(--stamp-danger); }
.illu .il-ciel    { fill: var(--il-ciel); }
.illu .il-batiment { fill: var(--il-batiment); }
.illu .il-vitre   { fill: var(--il-vitre); }
.illu .il-jour    { fill: var(--huard); opacity: .45; }
.illu .il-lune    { fill: var(--il-lueur); }
.illu .il-soleil  { fill: var(--huard); }
.illu .il-etoile  { fill: var(--sur-encre); opacity: .85; }
.illu .il-sol     { fill: var(--encre); }
.illu .il-sol-clair { fill: var(--encre); }
.illu .il-encre-nuit { fill: color-mix(in oklch, var(--il-nuit) 60%, var(--il-batiment)); }
.illu .il-sol-nuit { fill: color-mix(in oklch, var(--il-nuit) 70%, var(--il-ciel)); }
.illu .il-marquage rect { fill: var(--il-ciel); }
.illu .il-ombre   { fill: var(--il-nuit); opacity: .22; }
.illu .il-ligne   { fill: var(--perfo); }
.illu .il-fenetre { fill: var(--il-nuit); opacity: .7; }
.illu .il-fenetre--a, .illu .il-fenetre--b { fill: var(--il-lueur); opacity: 1; }
.illu .il-faisceau, .illu .il-halo { fill: var(--il-lueur); opacity: .3; }
.illu .il-rideau rect { fill: var(--il-batiment); }
.illu .il-cloture rect { fill: var(--il-ciel); }
.illu .il-point   { fill: var(--huard); opacity: .28; }
.illu .il-reperes rect { fill: var(--encre); }
.illu .il-etiquette { font-family: var(--font-mono); font-size: 13px; font-weight: 600; fill: var(--encre); }
.illu .il-etiquette--claire { fill: var(--sur-encre); }

/* Trait franc à l'encre, comme les bordures du carnet. */
.illu .il-trait { stroke: var(--encre); stroke-width: 2.5; }
.illu .il-trajet { fill: none; stroke: var(--encre); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 3 9; }
.illu .il-signature { fill: none; stroke: var(--encre); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.illu .il-tampon-cadre { fill: none; stroke: var(--stamp-ok); stroke-width: 3.5; }
.illu .il-coche-verte  { fill: none; stroke: var(--stamp-ok); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.illu .il-coche-encre  { fill: none; stroke: var(--encre); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.illu .il-coche-laiton { fill: none; stroke: var(--huard); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }

/* De nuit, l'uniforme s'éclaircit pour se détacher du ciel. */
.illu--ronde .il-agent .il-marine { fill: var(--il-vitre); }
.illu--ronde .il-agent .il-nuit   { fill: color-mix(in oklch, var(--il-vitre) 55%, var(--il-batiment)); }
.illu--ronde .il-agent .il-encre  { fill: var(--il-nuit); }
.illu--ronde .il-agent .il-papier { fill: var(--il-nuit); }
.illu--ronde .il-ombre { opacity: .5; }
.illu--ronde { max-width: none; width: 100%; height: clamp(250px, 30vw, 400px); overflow: hidden; }

/* ---- Vie des scènes ---------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .illu .il-faisceau { transform-box: fill-box; transform-origin: left center; animation: il-balayage 5s ease-in-out infinite alternate; }
  .illu .il-etoile { animation: il-scintille 3.2s ease-in-out infinite alternate; }
  .illu .il-etoile:nth-child(2n) { animation-delay: -1.4s; }
  .illu .il-etoile:nth-child(3n) { animation-delay: -2.3s; }
  .illu .il-fenetre--a { animation: il-fenetre 7s steps(1) infinite; }
  .illu .il-fenetre--b { animation: il-fenetre 11s steps(1) -4s infinite; }
  .illu .il-point { transform-box: fill-box; transform-origin: center; animation: il-pouls 2.4s ease-in-out infinite alternate; }
  .illu .il-borne--2 .il-point { animation-delay: -1.2s; }
  .illu .il-voyant { animation: il-scintille 1.1s steps(2) infinite; }
  .illu .il-halo { animation: il-halo 4s ease-in-out infinite alternate; }
  .illu .il-barriere { transform-box: fill-box; transform-origin: 4px 7px; animation: il-barriere 6s ease-in-out infinite; }
  .illu .il-flotte { animation: il-flotte 5s ease-in-out infinite alternate; }
  .illu .il-marche { animation: il-marche 9s ease-in-out infinite alternate; }
  .illu .il-tampon { transform-box: fill-box; transform-origin: center; animation: il-tampon 5s cubic-bezier(.2, 1.4, .4, 1) infinite; }
  .illu .il-aiguille { transform-box: view-box; transform-origin: 200px 150px; }
  .illu .il-aiguille--m { animation: il-tour 12s linear infinite; }
  .illu .il-aiguille--h { animation: il-tour 144s linear infinite; }
  .illu .il-piece { animation: il-piece 3.6s cubic-bezier(.5, 0, .9, .6) infinite; }
  .illu .il-eclats { animation: il-eclats 3.6s ease-out infinite; }
  .illu .il-fleche { animation: il-pousse 1.8s ease-in-out infinite alternate; }
  .illu .il-lignes-facture > rect { animation: il-apparait 5s ease-out infinite; }
  .illu .il-lignes-facture > rect:nth-child(n+3) { animation-delay: .35s; }
  .illu .il-lignes-facture > rect:nth-child(n+5) { animation-delay: .7s; }
  .illu .il-signature { stroke-dasharray: 150; animation: il-ecrit 5s ease-in-out infinite; }
  .illu .il-plume { animation: il-plume 5s ease-in-out infinite; }
  .illu .il-bouton { animation: il-scintille 2s ease-in-out infinite alternate; }
}

@keyframes il-balayage { from { transform: rotate(-7deg); } to { transform: rotate(6deg); } }
@keyframes il-halo { from { opacity: .16; } to { opacity: .34; } }
@keyframes il-scintille { from { opacity: .35; } to { opacity: 1; } }
@keyframes il-fenetre { 0%, 55% { opacity: 1; } 56%, 78% { opacity: .15; } 79%, 100% { opacity: 1; } }
@keyframes il-pouls { from { transform: scale(.7); opacity: .5; } to { transform: scale(1.5); opacity: .08; } }
@keyframes il-barriere { 0%, 30%, 100% { transform: rotate(0); } 45%, 80% { transform: rotate(-62deg); } }
@keyframes il-flotte { from { transform: translateY(-5px); } to { transform: translateY(5px); } }
@keyframes il-marche { from { transform: translateX(-60px); } to { transform: translateX(30px); } }
@keyframes il-tampon { 0%, 22% { transform: scale(2.2) rotate(8deg); opacity: 0; } 30% { transform: scale(.92); opacity: 1; } 36%, 100% { transform: scale(1); opacity: 1; } }
@keyframes il-tour { to { transform: rotate(360deg); } }
@keyframes il-piece { 0% { transform: translateY(-34px) rotate(-25deg); opacity: 0; } 16% { opacity: 1; } 55% { transform: translateY(92px) rotate(0); opacity: 1; } 62%, 100% { transform: translateY(104px); opacity: 0; } }
@keyframes il-eclats { 0%, 54% { opacity: 0; transform: translateY(6px); } 62% { opacity: 1; transform: translateY(0); } 80%, 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes il-pousse { from { transform: translateX(-4px); } to { transform: translateX(6px); } }
@keyframes il-apparait { 0%, 8% { opacity: 0; transform: translateX(-10px); } 22%, 100% { opacity: 1; transform: none; } }
@keyframes il-ecrit { 0%, 12% { stroke-dashoffset: 150; } 50%, 100% { stroke-dashoffset: 0; } }
@keyframes il-plume { 0%, 12% { transform: translate(-150px, 104px); } 50% { transform: translate(-64px, 96px); } 65%, 100% { transform: none; } }
