/* Mouvement de /agents-ia/. Tout vit sous html.am-intro (avant la première image) ou html.am-js (module chargé).
   Lot 1 seulement : les règles du lot 2 de la section 9.2 (FAQ, flèche au survol, canaux, étapes) attendent le feu
   vert de Darius (écart E34). */
@property --am-eye{syntax:'<number>';inherits:true;initial-value:1}
@property --am-head-y{syntax:'<percentage>';inherits:true;initial-value:0%}
@property --am-head-r{syntax:'<angle>';inherits:true;initial-value:0deg}
@property --am-gaze-x{syntax:'<percentage>';inherits:true;initial-value:0%}
@property --am-gaze-y{syntax:'<percentage>';inherits:true;initial-value:0%}
@property --am-relais{syntax:'<number>';inherits:true;initial-value:0}
@property --am-x{syntax:'<length>';inherits:false;initial-value:0px}
@property --am-y{syntax:'<length>';inherits:false;initial-value:0px}
@property --am-s{syntax:'<number>';inherits:false;initial-value:1}
/* Témoin de la feuille, lu par le module au démarrage : sans lui, le module reste inerte (écart E77). */
@property --am-pret{syntax:'<number>';inherits:false;initial-value:0}
:root{--am-pret:1}

/* Robot du hero : propriétés individuelles, composées avec le transform d'agents.js. */
:is(html.am-intro,html.am-js) .ag-robot-head{translate:0 var(--am-head-y);rotate:calc(var(--am-head-r) + var(--am-relais) * 6deg)}
:is(html.am-intro,html.am-js) .ag-robot-eyes{translate:calc(var(--am-gaze-x) + var(--am-relais) * 4%) calc(var(--am-gaze-y) + var(--am-relais) * 10%);scale:1 var(--am-eye)}

/* Avant la première image : deux cartes, la réponse, deux fils. Rien d'autre. Sans transition : dans un navigateur à
   froid, une passe de style a lieu avant les feuilles, et la transition .3s des cartes en faisait un fondu de 1 vers 0
   visible ; au retrait de la classe (filet), leur fondu revient (écart E78). */
@media (min-width:901px){
 html.am-intro .ag-robot-scene{--am-eye:.08;--am-head-y:3%}
 html.am-intro :is(.ag-robot-knowledge,.ag-robot-voice,.ag-robot-answer){opacity:0;transition:none}
 html.am-intro .ag-robot-connections>g:first-of-type>path:not(:nth-child(3)),
 html.am-intro .ag-robot-connections>g:last-of-type>circle:not(:nth-child(3)){opacity:0}
}
.ag-robot-scene:is([data-am-intro=waiting],[data-am-intro=entering]) .ag-robot-card{transition:none}

/* Gestes par élément : GSAP n'écrit que --am-x, --am-y, --am-s. */
html.am-js :is(.ag-robot-knowledge,.ag-robot-voice,.ag-robot-answer,.aov-benefits .aov-icon>.icon,.aov-control .aov-icon,.aov-closing>.ag-button>.icon:last-child,.am-ring){translate:var(--am-x) var(--am-y);scale:var(--am-s)}
html.am-js .aov-benefits article:first-child .aov-icon>.icon{transform-origin:25% 85%}

/* Le temps d'un récit, ce qui s'anime a son propre calque : opacité et déplacement passent au compositeur au lieu de
   repeindre le grand calque de .aov-flow à chaque image (écart E45). Rien de tout cela n'existe au repos. */
.am-ring,.am-halo{will-change:opacity}
.am-fx{will-change:transform}
html.am-js [data-motion-state=entering] :is(.aov-icon,.aov-icon>.icon,.ag-button>.icon:last-child){will-change:transform}
.ag-robot-scene:is([data-am-intro=waiting],[data-am-intro=entering]) :is(.ag-robot-card,.ag-robot-answer){will-change:opacity,transform}
.ag-robot-scene[data-am-intro=entering] :is(.ag-robot-connections,.ag-robot-head){will-change:transform}

/* Hôtes des calques de lumière du lot 1, et eux seuls : les pastilles du lot 2 (canaux, hébergement) ne reçoivent ni
   position ni isolation (écart E68). */
html.am-js :is(.aov-benefits .aov-three .aov-icon,.aov-control .aov-three .aov-icon,.aov-identity-list summary .aov-icon,.ag-robot-knowledge .ag-knowledge-row:not(.ag-knowledge-row~.ag-knowledge-row),.ag-robot-answer>span,.ag-robot-card-title){position:relative;isolation:isolate}
.am-ring,.am-halo{position:absolute;pointer-events:none;opacity:0}
.am-ring{inset:-6px;border-radius:24px;border:1px solid #e6b8b573;box-shadow:0 0 0 1px #bea7ee1f,0 0 22px 2px #bea7ee33}
.aov-identity-list summary .aov-icon>.am-ring{border-radius:18px}
/* Fermeture : une lueur douce pré-rendue sous le bouton, au lieu d'un anneau qu'on prenait pour un focus clavier
   (écart E65). Aucun contour, aucune ombre : un dégradé radial pêche vers lilas, dont seule l'opacité s'anime. Sous
   701 px, sous un bouton pleine largeur, teinté pêche, sans blanc ni lilas clair (écart E76). */
.aov-closing>.am-ring{inset:auto;z-index:-1;border:0;border-radius:0;box-shadow:none;background:radial-gradient(closest-side,#f3b49cd9,#e6b8b5a6 48%,#bea7ee73 76%,#bea7ee00)}
@media (max-width:700px){.aov-closing>.am-ring{background:radial-gradient(closest-side,#f3b49cb3,#f3b49c73 50%,#e6a08a33 78%,#e6a08a00)}}
/* Halo d'accusé de réception du hero, renforcé pour se lire à l'échelle 1:1 (écart E64). */
.am-halo{inset:0;z-index:-1;border-radius:inherit;background:radial-gradient(120% 140% at 30% 50%,#e6b8b570,#bea7ee52 60%,#bea7ee14);box-shadow:inset 0 0 0 1px #e6b8b58c}
.ag-robot-card-title>.am-halo{inset:-5px -7px;border-radius:12px}

/* Comètes : construction du film (agents-film.css l.115-118), cœur presque blanc (écart E73) : la tête se lit comme une
   lumière plus claire que tout ce qu'elle traverse, corps blanc du robot compris. */
.am-fx{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:1}
.am-pulse path{fill:none;stroke-linecap:round}
.am-trail{stroke:#cdb8f4;stroke-width:2;stroke-dasharray:1 1;stroke-dashoffset:1px;opacity:0}
.am-glow{stroke:#ffd0bb;stroke-width:10;opacity:0}
.am-core{stroke:#fffaf5;stroke-width:3.5;opacity:0}

/* Ouverture des details de l'identité : changement d'état voulu par le visiteur. */
@keyframes am-open{from{opacity:0;translate:0 -4px}}
@keyframes am-fade{from{opacity:0}}
@media (prefers-reduced-motion:no-preference){
 html.am-js .aov-identity-list details[open]>p{animation:am-open .24s cubic-bezier(.16,1,.3,1) backwards}
 html.am-js .aov-identity-list summary>.icon{transition:transform .24s cubic-bezier(.16,1,.3,1)}
}
@media (prefers-reduced-motion:reduce){
 html.am-js body.ag-page .aov-identity-list details[open]>p{animation:am-fade .15s cubic-bezier(.16,1,.3,1) backwards!important}
}

/* Fermeture : tant que le module ne l'a pas monté, le compagnon paraît endormi, yeux et visière éteints ; son réveil
   (ac-wake, remplissage backwards) part de cet état au lieu d'éteindre des yeux déjà vus (écart E41). */
@media screen and (prefers-reduced-motion:no-preference){
 html.am-js .aov-closing[data-am-wake=pending] .ac-root[data-motion=static] :is(.ac-eyes,.ac-visor){opacity:0}
}

/* Bouton de pause des compagnons : cliquable, anneau de focus gardé dans le cadre en overflow:clip, sans chevaucher
   le titre. L'anneau qui s'affiche est celui de la page (agents.css : 2 px à 5 px du bouton, il l'emporte sur celui du
   compagnon) : il dépasse de 7 px, d'où 8 px en bas et à droite (écart E46). */
html.am-js :is(.aov-identity-art,.aov-closing-art) .ac-pause{pointer-events:auto;bottom:8px;right:8px}
@media (max-width:700px){html.am-js .aov-identity-art .ac-pause{bottom:24px}}
