/* ==========================================================================
   PADC — motifs de fond du portail
   Couche décorative fixe, derrière tout le contenu (html porte la couleur
   de fond, body::before est libre). Motifs évoquant l'archivage : boîte
   d'archives, dossier, feuillet. Dérive lente ; désactivée si l'utilisateur
   préfère réduire les animations.
   ========================================================================== */

html { background: var(--fond); }

body { background: transparent; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23aeddd3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' opacity='.42'%3E%3Cpath d='M8 22h48'/%3E%3Crect x='12' y='22' width='40' height='30' rx='3'/%3E%3Cpath d='M26 22v30M38 22v30'/%3E%3Cpath d='M28 13h8M32 13v9'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M8 20a5 5 0 0 1 5-5h13l7 7h18a5 5 0 0 1 5 5v22a5 5 0 0 1-5 5H13a5 5 0 0 1-5-5z' fill='%23d6eee9' fill-opacity='.55'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23c2e2da' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' opacity='.5'%3E%3Cpath d='M18 8h20l10 10v38H18z'/%3E%3Cpath d='M38 8v10h10'/%3E%3Cpath d='M25 30h16M25 38h16M25 46h11'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(ellipse 90% 65% at 75% -10%, rgba(174, 221, 211, 0.16), transparent 62%);
  background-repeat: repeat, repeat, repeat, no-repeat;
  background-size: 460px 460px, 300px 300px, 340px 340px, 100% 100%;
  background-position: 0 0, 90px 150px, 260px 40px, 0 0;
  animation: motifs-derive 120s linear infinite;
}

/* Dérive très lente des tuiles : le fond respire sans distraire. */
@keyframes motifs-derive {
  from { background-position: 0 0, 90px 150px, 260px 40px, 0 0; }
  to   { background-position: 460px 230px, -140px 450px, -80px 380px, 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}

@media print {
  body::before { display: none; }
}
