/* GB2C : animations sobres. Tout est désactivé si l'appareil demande moins de mouvement. */
@keyframes monte { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes filet { from { width: 0; } to { width: 56px; } }
@keyframes page-entre { from { opacity: 0; } to { opacity: 1; } }

html { --decalage: 0s; scroll-behavior: smooth; }
html.avec-intro { --decalage: 2.3s; }
html.passe { --decalage: 0s; }

/* Ouverture : le logo apparaît en grand puis se dilue */
.intro { display: none; position: fixed; inset: 0; z-index: 1000; background: #121212; place-items: center; cursor: pointer; }
html.avec-intro .intro { display: grid; animation: intro-sortie 1.2s ease 2.1s forwards; }
html.passe .intro { display: none; }
.intro img { width: min(640px, 78vw); height: auto; opacity: 0; animation: intro-logo 2.1s ease forwards, intro-dilue 1.2s ease 2.1s forwards; }
@keyframes intro-logo { 0% { opacity: 0; transform: scale(.94); filter: blur(8px); } 40% { opacity: 1; transform: scale(1); filter: blur(0); } 100% { opacity: 1; transform: scale(1.03); filter: blur(0); } }
@keyframes intro-dilue { from { opacity: 1; transform: scale(1.03); filter: blur(0); } to { opacity: 0; transform: scale(1.18); filter: blur(16px); } }
@keyframes intro-sortie { to { opacity: 0; visibility: hidden; } }

/* Accueil : mise en place du contenu */
.js main > .logo { animation: monte 1.1s ease backwards; animation-delay: var(--decalage); }
.js .descriptif { animation: monte 1s ease backwards; animation-delay: calc(var(--decalage) + .3s); }
.js .descriptif .filet { animation: filet 1s ease backwards; animation-delay: calc(var(--decalage) + .5s); }
.js .entrees { animation: monte 1s ease backwards; animation-delay: calc(var(--decalage) + .6s); }
.js .appel-direct { animation: monte 1s ease backwards; animation-delay: calc(var(--decalage) + .85s); }

/* Pages intérieures : le titre entre élément par élément */
.js .hero .wrap > * > * { animation: monte .9s ease backwards; }
.js .hero .wrap > * > *:nth-child(1) { animation-delay: .05s; }
.js .hero .wrap > * > *:nth-child(2) { animation-delay: .2s; }
.js .hero .wrap > * > *:nth-child(3) { animation-delay: .35s; }
.js .hero .wrap > * > *:nth-child(4) { animation-delay: .5s; }
.js .hero .wrap > * > *:nth-child(5) { animation-delay: .65s; }

/* Apparition au défilement */
.js .reveal { opacity: 0; }
.js .reveal.visible { opacity: 1; animation: monte .9s ease backwards; animation-delay: var(--rd, 0s); }

/* Changement de page : simple fondu */
.js body { animation: page-entre .6s ease backwards; }
html.quitte body { opacity: 0; transition: opacity .25s ease; }

/* Motif du bandeau (flèche A→Z, bouclier) : tracé, puis légère vie */
@keyframes pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes tourne { to { transform: rotate(360deg); } }
@keyframes respire { 0%, 100% { opacity: .35; } 50% { opacity: .6; } }
.hero .orn circle[r="196"], .hero .orn circle[r="150"], .hero .orn circle[r="104"] { transform-box: view-box; transform-origin: 210px 210px; animation: respire 6s ease-in-out infinite; }
.hero .orn circle[r="196"] { animation-delay: 0s; } .hero .orn circle[r="150"] { animation-delay: 1.5s; } .hero .orn circle[r="104"] { animation-delay: 3s; }
.hero .orn path:not(.trace):not([d^="M14"]) { stroke-dasharray: 120; stroke-dashoffset: 120; animation: trace 1s ease-out 2.2s forwards; }
.hero .orn g[fill="#E8CD8A"] circle { transform-box: fill-box; transform-origin: center; animation: pop .6s ease backwards; }
.hero .orn g[fill="#E8CD8A"] circle:nth-child(1) { animation-delay: .1s; }
.hero .orn g[fill="#E8CD8A"] circle:nth-child(2) { animation-delay: 2.4s; }
.hero .orn text { animation: page-entre 1s ease backwards; }
.hero .orn text:nth-of-type(1) { animation-delay: .3s; } .hero .orn text:nth-of-type(2) { animation-delay: 2.5s; }

/* Survols */
.entree { transition: border-color .25s ease, background .25s ease, transform .35s ease, box-shadow .35s ease; }
.entree:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(0,0,0,.4); }
.btn { transition: background .25s ease, color .25s ease, transform .25s ease, border-color .25s ease; }
.btn:hover { transform: translateY(-2px); }
header.site { transition: box-shadow .35s ease; }
html.defile header.site { box-shadow: 0 10px 28px rgba(0,0,0,.28); }
.domaines li, .triptyque article { transition: background .3s ease, transform .35s ease; }
.triptyque article:hover { transform: translateY(-3px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro { display: none !important; }
  .js .reveal { opacity: 1 !important; animation: none !important; }
  .hero .orn *, .hero .orn path:not(.trace) { animation: none !important; stroke-dashoffset: 0 !important; }
  .js body { animation: none !important; }
  html.quitte body { opacity: 1; transition: none; }
  .js main > .logo, .js .descriptif, .js .descriptif .filet, .js .entrees, .js .appel-direct, .js .hero .wrap > * > * { animation: none !important; }
  .entree:hover, .btn:hover, .triptyque article:hover { transform: none; }
}
