/* Anim (anim.art) : feuille de style commune à toutes les pages.
   Style « faille » (Rift Effect) : fond #111111 en sombre, verre lavande en clair, bords cyan
   lumineux, dégradé violet, rose, orange du logo. Thème : celui du système, ou data-theme sur
   <html> (bouton de la barre, choix gardé dans localStorage « anim-theme »). */

/* Anim Rift (police/outils/construire_police.py) : lettres taillées sans arrondi. La version
   cassée en éclats sert aux titres de sections, la version pleine (Solid) aux autres titres, à la
   barre et aux boutons. La plage de graisses empêche le navigateur d'ajouter un faux gras. */
@font-face { font-family: "Anim Rift"; src: url("/assets/polices/anim-rift.woff2") format("woff2");
  font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Anim Rift Solid"; src: url("/assets/polices/anim-rift-solid.woff2") format("woff2");
  font-weight: 100 900; font-display: swap; }
/* Figtree, la police du texte, est servie par le site : rien ne part chez Google Fonts. */
@font-face { font-family: "Figtree"; src: url("/assets/polices/figtree.woff2") format("woff2");
  font-weight: 300 900; font-display: swap; }

:root {
  --fond: #111111; --fond-2: #1c1c1f; --texte: #f0edf7; --doux: #b5adc8;
  --faille: #9ff3ff; --violet: #7350d8; --rose: #e45cb4; --orange: #ff8030;
  --verre: rgba(255, 255, 255, 0.05); --trait: rgb(255 255 255 / 28%);
  --titre: "Anim Rift Solid", system-ui, sans-serif; --corps: "Figtree", system-ui, sans-serif;
  --section: "Anim Rift", "Anim Rift Solid", system-ui, sans-serif;
  --barre: 64px;
  /* Marges de la page, les mêmes que celles de la barre : les sections et le pied vont d'un bord à
     l'autre. Au-delà de 2400 px de contenu (très grands écrans), le contenu se centre. */
  --marge: clamp(16px, 4vw, 40px);
  --bord: max(var(--marge), (100% - 2400px) / 2);
  /* Traits entre les sections et avant le pied, et grande marque du pied : à peine plus clairs que
     le fond en thème sombre, à peine plus foncés en thème clair. */
  --separateur: #161616; --filigrane: #161616;
  /* Boutons : verre blanc et texte sombre en thème sombre, l'inverse en thème clair. */
  --bouton-verre: linear-gradient(160deg, #ffffff, #c9cbd6); --bouton-texte: #111111;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --fond: #f4f0ff; --fond-2: #ffffff; --texte: #1b1233; --doux: #5a4f7a; --faille: #0aa6d6;
    --verre: rgba(115, 80, 216, 0.06); --trait: rgb(27 18 51 / 28%);
    --separateur: #e8e2f8; --filigrane: #e8e2f8;
    --bouton-verre: linear-gradient(160deg, #3b3846, #0c0c0f); --bouton-texte: #ffffff;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --fond: #f4f0ff; --fond-2: #ffffff; --texte: #1b1233; --doux: #5a4f7a; --faille: #0aa6d6;
  --verre: rgba(115, 80, 216, 0.06); --trait: rgb(27 18 51 / 28%);
  --separateur: #e8e2f8; --filigrane: #e8e2f8;
  --bouton-verre: linear-gradient(160deg, #3b3846, #0c0c0f); --bouton-texte: #ffffff;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--barre) + 16px); }
/* Accueil : le début du contenu s'arrête juste sous la barre. L'aimantation du hero est faite par
   js/site.js, sans scroll-snap : avec lui, chaque cran de molette dans le contenu faisait deux pas. */
html.accueil { scroll-padding-top: var(--barre); }
/* Écran de chargement : la place de la barre de défilement est gardée, la largeur ne change pas
   quand elle revient et le logo ne bouge pas. */
html.anim-charge { overflow: hidden; scrollbar-gutter: stable; }
/* position : body est le repère de la couche des éclats flottants (.eclats). */
body { position: relative; margin: 0; background: var(--fond); color: var(--texte); font: 400 1.0625rem/1.6 var(--corps); }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.anim-logo img { width: 100%; height: 100%; }
:focus-visible { outline: 2px solid var(--faille); outline-offset: 3px; }

.evitement { position: fixed; top: 8px; left: 8px; z-index: 60; padding: 0.6rem 1rem; font: 600 1rem/1 var(--titre);
  color: var(--fond); background: var(--faille); text-decoration: none; transform: translateY(-160%); }
.evitement:focus { transform: none; }

/* ------------------------------------------------------------ barre du haut */
/* Posée sur la page ; transparente tout en haut de chaque page (barre--haut, js/site.js) ; sur
   l'accueil, cachée pendant le chargement. */
.barre { position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; align-items: center; gap: 24px;
  height: var(--barre); padding: 0 var(--bord); --marque-taille: 30px;
  background: color-mix(in srgb, var(--fond) 82%, transparent); backdrop-filter: blur(100px);
  border-bottom: 1px solid var(--trait);
  transition: background-color 0.35s, border-color 0.35s, backdrop-filter 0.35s, opacity 0.6s, visibility 0.6s; }
.barre--haut { background: transparent; border-bottom-color: transparent; backdrop-filter: none; }
html.anim-charge .barre { opacity: 0; visibility: hidden; }
.marque { display: flex; align-items: center; gap: 10px; flex-shrink: 0; text-decoration: none; }
/* Logo plat de la barre (anim-logo-plat.svg, écrit par logo/outils/exporter_svg.py) : le SVG sert
   de masque et prend la couleur du texte, claire en thème sombre et foncée en thème clair. */
.logo-plat { width: 34px; height: 34px; flex-shrink: 0; background: var(--texte);
  -webkit-mask: url("/assets/logo/anim-logo-plat.svg") center / contain no-repeat;
  mask: url("/assets/logo/anim-logo-plat.svg") center / contain no-repeat; }
/* « Anim / Shanks Games » : le mot « Anim » (le watermark en minuscules, écrit avec la police
   cassée) et le nom de la page après lui ont la même taille, --marque-taille. */
.marque-mot { font: 400 var(--marque-taille)/1.25 var(--section); color: var(--texte); }
/* Le mot « Anim » partout ailleurs (textes, titres, menus, boutons) : la police cassée, à la taille
   et dans la couleur du texte autour. */
.mot-anim { font-family: var(--section); line-height: 1; }
.fil { min-width: 0; margin-left: -12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font: 600 var(--marque-taille)/1.25 var(--titre); color: var(--doux); }
.fil i { font-style: normal; color: var(--faille); margin-right: 0.35em; }
.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav a { font: 600 0.98rem/1 var(--titre); text-decoration: none; color: var(--doux); white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--texte); }
.nav a[aria-current="page"] { text-decoration: underline 2px var(--faille); text-underline-offset: 6px; }
.icone { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border: 1px solid var(--trait);
  border-radius: 10px; background: var(--verre); color: var(--texte); cursor: pointer; }
.icone svg { width: 20px; height: 20px; }
[data-bouton-theme] .clair, [data-bouton-theme] .sombre { display: none; }
[data-bouton-theme][data-etat="light"] .clair, [data-bouton-theme][data-etat="dark"] .sombre { display: block; }
[data-bouton-theme][data-etat="light"] .auto, [data-bouton-theme][data-etat="dark"] .auto { display: none; }
/* Boutons de la barre (menu, thème, et ceux qui viendront) : l'icône seule, sans cadre ni fond ;
   la zone cliquable reste de 40 px. */
.barre .icone { border-color: transparent; background: none; }
[data-bouton-menu] { display: none; }
/* Les trois traits du bouton du menu deviennent une croix quand le menu est ouvert. */
[data-bouton-menu] path { transform-box: view-box; transform-origin: 12px 12px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s; }
[data-bouton-menu][aria-expanded="true"] path:nth-child(1) { transform: rotate(45deg) translateY(5px); }
[data-bouton-menu][aria-expanded="true"] path:nth-child(2) { opacity: 0; }
[data-bouton-menu][aria-expanded="true"] path:nth-child(3) { transform: rotate(-45deg) translateY(-5px); }

/* ------------------------------------------------------------ écran de chargement et hero (accueil) */
/* Le fond de la page, sous la toile du hero : le logo du chargement est celui du hero. */
.chargeur { position: fixed; inset: 0; z-index: 25; background: var(--fond); opacity: 0; visibility: hidden;
  pointer-events: none; transition: opacity 0.8s ease, visibility 0s linear 0.8s; }
html.anim-charge .chargeur { opacity: 1; visibility: visible; transition: none; }

.hero { position: relative; height: 100vh; height: 100svh; min-height: 460px; overflow: hidden; }
.hero-scene { position: absolute; inset: 0; z-index: 30; }
.hero-toile { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-secours { position: absolute; left: 50%; top: 46%; width: min(46vh, 70vw); transform: translate(-50%, -50%); }
html.anim-charge .hero-secours, .hero--actif .hero-secours { visibility: hidden; }
/* Sans 3D, les liens des projets s'affichent sous le logo ; avec la 3D, les fragments les montrent
   et les liens restent là pour le clavier et les lecteurs d'écran. */
.hero-liens { position: absolute; z-index: 31; left: 16px; right: 16px; bottom: 7vh; display: flex; flex-wrap: wrap;
  justify-content: center; gap: 10px 14px; }
.hero-liens a { font: 600 0.98rem/1 var(--titre); text-decoration: none; padding: 0.7rem 1rem;
  border: 1px solid var(--trait); background: var(--verre); }
.hero--actif .hero-liens { width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0; left: 0; bottom: 0; }
.hero-etiquette { position: absolute; z-index: 35; left: 0; top: 0; margin: 0; pointer-events: none;
  padding: 0.5rem 0.85rem; font: 600 1rem/1 var(--titre); color: var(--texte); white-space: nowrap;
  background: color-mix(in srgb, var(--fond) 80%, transparent); border: 1px solid var(--trait);
  backdrop-filter: blur(8px); opacity: 0; transform: translate(-50%, calc(-100% - 6px)) scale(0.94);
  transition: opacity 0.18s ease, transform 0.18s ease; }
.hero-etiquette--vue { opacity: 1; transform: translate(-50%, calc(-100% - 12px)); }
.hero-etiquette--focus { color: var(--fond); background: var(--faille); }
/* Droits en bas à droite du hero : visibles tout en haut de l'accueil seulement (site.js, la même
   règle que la barre transparente), cachés pendant le chargement. */
.hero-droits { position: absolute; z-index: 32; right: var(--bord); bottom: 20px; margin: 0; font-size: 0.85rem;
  color: var(--doux); pointer-events: none; transition: opacity 0.6s ease, visibility 0s; }
.hero-droits--cache, html.anim-charge .hero-droits { opacity: 0; visibility: hidden;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s; }

/* ------------------------------------------------------------ boutons en éclat de verre */
/* Chaque bouton est une plaque de verre 3D taillée comme un éclat de faille, dessinée sous son
   texte dans sa toile (js/anim-boutons.js) : verre blanc et texte sombre en thème sombre, verre
   sombre et texte blanc en thème clair. Survolé, touché ou atteint au clavier (classe
   bouton--vif), le verre prend les couleurs du logo et le texte passe en blanc : c'est aussi la
   marque du focus. Sans la 3D (avant son chargement, ou sans WebGL2), le même éclat en aplat. */
.bouton { position: relative; z-index: 0; display: inline-block; text-decoration: none; }
.bouton > span { position: relative; z-index: 1; display: block; padding: 0.95rem 1.7rem;
  font: 600 1rem/1 var(--titre); color: var(--bouton-texte); transition: color 0.25s ease; }
.bouton:focus-visible { outline: none; }
.bouton-toile { position: absolute; z-index: 0; display: block; pointer-events: none; }
.bouton:not(.bouton--3d) { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--faille) 45%, transparent)); }
.bouton:not(.bouton--3d) > span { background: var(--bouton-verre);
  clip-path: polygon(0 11px, 12px 0, 100% 0, 100% calc(100% - 17px), calc(100% - 21px) 100%, 9px 100%, 0 calc(100% - 7px)); }
.bouton:not(.bouton--3d):is(:hover, :focus-visible) > span {
  background: linear-gradient(100deg, var(--violet), var(--rose) 55%, var(--orange)); }
.bouton:not(.bouton--3d):is(:hover, :focus-visible) > span, .bouton--vif > span { color: #ffffff;
  text-shadow: 0 1px 3px rgb(17 17 17 / 45%); }
/* Boutons carrés à icône (réseaux du pied de page) : le même verre, en éclat carré ; l'icône prend
   la couleur du texte des boutons. Sans la 3D, un éclat carré en aplat. */
.bouton-icone { position: relative; z-index: 0; color: var(--bouton-texte); transition: color 0.25s ease; }
.bouton-icone > svg { position: relative; z-index: 1; }
.bouton-icone:focus-visible { outline: none; }
.bouton-icone.bouton--3d { border-color: transparent; background: none; }
.bouton-icone:not(.bouton--3d) { border: 0; border-radius: 0; background: var(--bouton-verre);
  clip-path: polygon(0 9px, 9px 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%); }
.bouton-icone:not(.bouton--3d):is(:hover, :focus-visible) {
  background: linear-gradient(135deg, var(--violet), var(--rose) 55%, var(--orange)); }
.bouton-icone:not(.bouton--3d):is(:hover, :focus-visible), .bouton-icone.bouton--vif { color: #ffffff; }
.bouton-icone.bouton--vif > svg { filter: drop-shadow(0 1px 2px rgb(17 17 17 / 45%)); }
.actions { display: flex; flex-wrap: wrap; gap: 16px; }
.section > p + .actions, .section > h2 + .actions { margin-top: 28px; }

/* ------------------------------------------------------------ éclats flottants */
/* Éclats de faille colorés qui flottent derrière le contenu (js/anim-eclats.js). Leur couche
   couvre toute la page, sous le texte, et coupe ce qui en sort ; chaque éclat est une toile que
   le script déplace (parallaxe et flottement). */
.eclats { position: absolute; inset: 0; z-index: -1; overflow: clip; pointer-events: none; }
.eclats canvas { position: absolute; display: block; will-change: transform; transition: opacity 0.8s ease; }

/* ------------------------------------------------------------ séparateurs entre les sections */
/* Un trait simple d'un bord à l'autre de l'écran. */
.separateur { height: 1px; margin: 0; border: 0; background: var(--separateur); }

/* ------------------------------------------------------------ sections */
/* La toile d'un bouton déborde de 20 px pour son halo : rien ne doit élargir la page sur un
   téléphone (même règle sur le pied, .pied). */
main { display: block; overflow-x: clip; }
html:not(.accueil) main { padding-top: var(--barre); }
.section { padding: 72px var(--bord); }
h1, h2, h3, h4 { font-family: var(--titre); font-weight: 700; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
h2 { font-family: var(--section); font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.7rem; }
p { margin: 0; color: var(--doux); max-width: 60ch; }
p + p { margin-top: 16px; }
.section > h2 + p { margin-top: 14px; }
.chapo { font-size: 1.2rem; }

.accroche { text-align: center; padding-top: 88px; }
.accroche h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); max-width: 18ch; margin: 0 auto 18px; }
.accroche p { margin: 0 auto 30px; font-size: 1.15rem; }
.accroche .actions { justify-content: center; }

.apropos { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }

/* Univers de l'accueil : un par ligne, l'image dans un fragment de faille d'un côté et le texte de
   l'autre, en alternance (sur un téléphone, l'image au-dessus du texte). */
.mondes { display: grid; gap: clamp(72px, 9vw, 150px); margin-top: clamp(48px, 6vw, 96px); }
.monde { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(36px, 5vw, 104px);
  align-items: center; }
.monde:nth-child(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.monde:nth-child(even) .fragment { order: 2; }
.monde h3 { margin-bottom: 14px; font-size: clamp(1.9rem, 2.8vw, 2.7rem); }
.monde p { margin-bottom: 28px; font-size: 1.12rem; }

/* Fragment de faille : une image du site (univers de l'accueil, en-têtes des pages, galerie
   d'Anim/ation) dans un éclat de verre 3D (js/anim-fragments.js), comme les fragments du hero. Ses
   proportions viennent d'ici (--ratio, largeur / hauteur) ; sa hauteur reste sous 70 % de la
   fenêtre. Sans la 3D (pas de WebGL2, ou avant son premier dessin), l'image découpée selon le même
   contour (--forme, posé par le script). En 3D, l'image reste dans la page, transparente : son
   texte de remplacement est toujours lu. */
.fragment { --ratio: 1.75; position: relative; display: block; justify-self: center; margin: 0;
  width: min(100%, calc(var(--ratio) * 70vh)); aspect-ratio: var(--ratio); }
.fragment--large { --ratio: 2; }
.fragment--haut { --ratio: 1.12; }
.fragment--portrait { --ratio: 0.8; }
.fragment--carre { --ratio: 1; }
.fragment :is(img, video) { display: block; width: 100%; height: 100%; object-fit: cover;
  clip-path: var(--forme, polygon(4% 10%, 40% 0, 78% 6%, 100% 34%, 95% 88%, 52% 100%, 8% 90%, 0 48%)); }
.fragment:not(.fragment--3d) { filter: drop-shadow(0 0 16px color-mix(in srgb, var(--faille) 35%, transparent)); }
.fragment--3d :is(img, video) { opacity: 0; }
.fragment-toile { position: absolute; display: block; pointer-events: none; }
/* Le texte à côté d'un fragment passe devant sa toile, qui déborde de sa boîte (halo). */
.monde > div, .entete > div { position: relative; z-index: 1; }

/* Cartes (jeux, fonctions du bot) : des cadres droits, sans coin coupé. */
.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 24px; margin-top: 36px; }
.carte { padding: 28px; background: var(--verre); border: 1px solid var(--trait); }
.carte :is(h3, h4) { font-size: 1.4rem; margin-bottom: 8px; }
.carte .bouton { margin-top: 20px; }
.carte.vide { border-style: dashed; }

/* Jeux de l'accueil, rangés par studio : le nom du studio avec son logo, puis ses jeux. Sur un grand
   écran, les studios sont côte à côte ; sinon, l'un sous l'autre. Les cartes gardent la largeur
   d'une colonne, même seules : la liste d'un studio peut s'allonger. */
.jeux { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 640px), 1fr));
  gap: clamp(40px, 5vw, 64px) clamp(24px, 3vw, 48px); margin-top: 36px; }
.jeux-studio h3 { display: flex; align-items: center; gap: 12px; font-size: 1.45rem; }
.jeux-studio h3 img { width: 46px; height: 46px; margin: -8px -4px; }
.jeux-studio h3 .logo-plat { width: 30px; height: 30px; }
.jeux-studio .cartes { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin-top: 20px; }

.contact a.mail { display: inline-block; margin: 20px 0 28px; font: 700 clamp(1.8rem, 4vw, 2.8rem)/1.1 var(--titre);
  text-decoration: none; color: var(--texte); }
.contact a.mail:hover { color: var(--faille); }
.contact .chapo, .contact-fin { color: var(--texte); }

/* En-tête d'une page de projet : le texte et un fragment de faille. */
.entete { display: grid; grid-template-columns: 6fr 6fr; gap: 56px; align-items: center; padding-top: 56px; }
.entete h1 { margin-bottom: 18px; }
.entete .actions { margin-top: 30px; }
/* Réseaux d'une personne (page Shanks) : les boutons carrés en verre du pied, en ligne. */
.reseaux { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Groupes Roblox de Shanks Games, sous le lien de l'en-tête (js/anim-groupes.js) : un bouton par
   groupe, un petit fragment carré avec son icône et son nom dessous. Le groupe choisi reste allumé
   (js/anim-fragments.js) et son nom est souligné, comme la page en cours dans le menu ; au clavier,
   son nom est encadré. */
.groupes { margin-top: clamp(36px, 4.5vw, 56px); }
.groupes h2 { margin-bottom: 20px; font: 700 1.3rem/1.1 var(--titre); }
.groupes-liste { display: grid; grid-template-columns: repeat(3, minmax(0, 160px)); gap: clamp(14px, 2.4vw, 32px); }
.groupe { display: grid; justify-items: center; gap: 14px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 600 clamp(0.85rem, 3.4vw, 1rem)/1.2 var(--titre); color: var(--doux); text-align: center;
  transition: color 0.25s ease; }
.groupe-nom { white-space: nowrap; }
/* Sans la 3D, une icône sur fond transparent est posée sur un éclat de verre teinté. */
:is(.groupe, .poste) .fragment img { background: color-mix(in srgb, var(--faille) 16%, transparent); }

/* Postes de Shanks (page Shanks) : un lien par équipe, un petit fragment carré avec son logo, puis
   son nom et le poste de Shanks. Survolé ou atteint au clavier, le fragment s'allume
   (js/anim-fragments.js) ; au clavier, le nom est encadré. */
.postes { display: grid; grid-template-columns: repeat(4, minmax(0, 190px)); gap: clamp(20px, 3vw, 48px);
  margin-top: 40px; }
.poste { display: grid; justify-items: center; gap: 4px; text-align: center; text-decoration: none; color: var(--texte); }
.poste .fragment { margin-bottom: 12px; }
.poste-nom { font: 700 clamp(1rem, 3.4vw, 1.2rem)/1.2 var(--titre); white-space: nowrap; transition: color 0.25s ease; }
.poste-role { color: var(--doux); font-size: 0.98rem; }
.poste:hover .poste-nom { color: var(--faille); }
.poste:focus-visible { outline: none; }
.poste:focus-visible .poste-nom { outline: 2px solid var(--faille); outline-offset: 4px; }
.groupe:hover, .groupe[aria-pressed="true"] { color: var(--texte); }
.groupe[aria-pressed="true"] .groupe-nom { text-decoration: underline 2px var(--faille); text-underline-offset: 6px; }
.groupe:focus-visible { outline: none; }
.groupe:focus-visible .groupe-nom { outline: 2px solid var(--faille); outline-offset: 4px; }

/* Galerie de fragments de faille, côte à côte (plus utilisée par une page pour l'instant). */
.galerie { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 56px 40px; margin-top: 52px; }

/* Vidéos d'Anim/ation (js/anim-videos.js) : la vidéo entière dans un cadre droit, 16:9 (9:16 sur
   un téléphone, comme la source choisie), son titre et son genre dessous ; deux par ligne sur un
   grand écran. */
.videos { display: grid; gap: clamp(40px, 5vw, 64px) 32px; margin-top: 44px; }
.video { margin: 0; }
.video video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000000;
  border: 1px solid var(--trait); box-shadow: 0 0 36px -10px color-mix(in srgb, var(--faille) 30%, transparent); }
.video figcaption { margin-top: 16px; }
.video h3 { font-size: 1.4rem; margin-bottom: 4px; }
.video p { font-size: 0.98rem; }
@media (min-width: 900px) { .videos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Pages légales : la section va d'un bord à l'autre, le texte garde une ligne lisible (72ch). */
.legal h1 { margin-bottom: 12px; }
.legal h2 { font-size: 1.5rem; margin: 40px 0 12px; }
.legal p, .legal li { max-width: 72ch; color: var(--doux); }
.legal ul { padding-left: 1.2rem; margin: 12px 0 0; }
.legal li + li { margin-top: 8px; }
.legal a { color: var(--texte); text-decoration-color: var(--faille); }
.legal .date { font-size: 0.95rem; }

/* Page introuvable. */
.introuvable { min-height: calc(100vh - var(--barre) - 140px); display: grid; place-content: center; justify-items: center;
  gap: 18px; text-align: center; }
/* Le « 404 » en verre 3D (js/anim-404.js) ; sans 3D, le texte en police cassée reste à sa place. */
.anim-404 { position: relative; display: grid; place-items: center; width: min(760px, 92vw); aspect-ratio: 2.25; }
.anim-404-secours { font: 400 min(15rem, 26vw)/1 var(--section);
  background: linear-gradient(100deg, var(--violet), var(--rose) 55%, var(--orange));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.anim-404--actif .anim-404-secours { visibility: hidden; }
.anim-404-toile { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.introuvable p { margin: 0 auto 12px; }

/* ------------------------------------------------------------ pied de page */
/* Sur le modèle du pied de shanksgames.com : la marque, une phrase et les contacts à gauche, les
   colonnes de liens à droite ; en bas, la grande marque et les droits. */
.pied { --marque-taille: 30px; padding: 72px var(--bord) 40px; color: var(--doux); font-size: 0.95rem;
  overflow-x: clip; }
.pied-haut { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 48px; }
.pied-intro p { max-width: 36ch; margin-top: 16px; }
.pied-reseaux { display: flex; gap: 12px; margin-top: 24px; }
.pied-liens { display: flex; flex-wrap: wrap; gap: 40px clamp(40px, 6vw, 96px); }
.pied-liens > div { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.pied h2 { margin-bottom: 6px; font: 600 1.05rem/1.2 var(--titre); color: var(--texte); }
.pied-liens a { color: var(--doux); text-decoration: none; }
.pied-liens a:hover, .pied-liens a[aria-current="page"] { color: var(--texte); }
.pied-liens a[aria-current="page"] { text-decoration: underline 2px var(--faille); text-underline-offset: 5px; }
.pied-bas { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 48px;
  margin-top: 104px; }
.pied-droits { margin: 0; font-size: 0.9rem; }
/* Grande marque du pied : le logo plat et le mot « Anim » cassé d'un seul tenant
   (anim-watermark-logo.svg, écrit par police/outils/exporter_watermark.py), en masque de la couleur
   --filigrane. */
.pied-marque { flex-shrink: 0; height: clamp(61.5px, 17.3vw, 221px); aspect-ratio: 3.7079; background: var(--filigrane);
  -webkit-mask: url("/assets/logo/anim-watermark-logo.svg") center / contain no-repeat;
  mask: url("/assets/logo/anim-watermark-logo.svg") center / contain no-repeat; }

/* ------------------------------------------------------------ petits écrans et mouvements réduits */
/* Le menu passe dans le bouton dès 960 px : les liens en Anim Rift Solid sont plus larges, et le
   nom de la page doit rester lisible à côté. */
@media (max-width: 960px) {
  .barre { gap: 14px; --marque-taille: 24px; }
  .fil { margin-left: -6px; }
  /* Menu plein écran : il couvre toute la page, de haut en bas, sous la marque et les boutons de la
     barre (z-index -1 dans la barre). Il s'ouvre en se déchirant du haut vers le bas (le bord en
     dents de scie descend), puis les liens montent en cascade ; il se referme vers le haut. */
  .nav { position: absolute; top: 0; left: 0; right: 0; z-index: -1; height: 100vh; height: 100dvh; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0; overflow-y: auto;
    padding: calc(var(--barre) + 24px) var(--bord) 40px; background: var(--fond); visibility: hidden;
    clip-path: polygon(0 0, 100% 0, 100% -6%, 86% -1%, 70% -9%, 52% -3%, 35% -11%, 18% -2%, 0 -8%);
    transition: clip-path 0.35s cubic-bezier(0.64, 0, 0.78, 0), visibility 0s linear 0.35s; }
  .nav[data-ouvert="true"] { visibility: visible;
    clip-path: polygon(0 0, 100% 0, 100% 106%, 86% 111%, 70% 103%, 52% 109%, 35% 101%, 18% 110%, 0 104%);
    transition: clip-path 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
  .nav a { padding: 18px 0; border-bottom: 1px solid var(--separateur);
    font: 600 clamp(2rem, 8vw, 3rem)/1.15 var(--titre); color: var(--texte);
    opacity: 0; transform: translateY(24px); transition: opacity 0.15s, transform 0.15s; }
  .nav a[aria-current="page"] { text-decoration-thickness: 3px; text-underline-offset: 10px; }
  /* --i : place du lien dans le menu, posée par js/site.js. */
  .nav[data-ouvert="true"] a { opacity: 1; transform: none; transition-delay: calc(0.15s + var(--i, 0) * 0.06s);
    transition-property: opacity, transform; transition-duration: 0.4s, 0.55s;
    transition-timing-function: ease, cubic-bezier(0.22, 1, 0.36, 1); }
  html.menu-ouvert { overflow: hidden; }
  [data-bouton-menu] { display: grid; margin-left: auto; }
}
/* Téléphone : la marque rapetisse pour que le nom de la page tienne en entier. */
@media (max-width: 480px) {
  .barre { gap: 10px; --marque-taille: 19px; }
  .barre .logo-plat { width: 30px; height: 30px; }
}
@media (max-width: 760px) {
  .apropos, .monde, .monde:nth-child(even), .entete { grid-template-columns: 1fr; gap: 24px; }
  .monde:nth-child(even) .fragment { order: 0; }
  .entete .fragment { order: -1; }
  .postes { grid-template-columns: repeat(2, minmax(0, 190px)); }
  .video video { aspect-ratio: 9 / 16; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chargeur, .barre, .hero-etiquette, .bouton > span, .bouton-icone, .eclats canvas { transition-duration: 0.01s; }
  .nav, .nav[data-ouvert="true"], .nav a, .nav[data-ouvert="true"] a, [data-bouton-menu] path {
    transition-duration: 0.01s; transition-delay: 0s; }
  .nav a { transform: none; }
  .hero-droits, .hero-droits--cache { transition-duration: 0.01s; transition-delay: 0s; }
}
/* Couleurs forcées (contraste élevé de Windows) : le verre ne se plie pas aux couleurs du système,
   le bouton devient un simple cadre. */
@media (forced-colors: active) {
  .bouton-toile, .eclats, .fragment-toile { display: none; }
  .fragment--3d :is(img, video) { opacity: 1; }
  .bouton > span, .bouton-icone { border: 1px solid ButtonText; }
}
