/* ============================================================
   Catalogue d'effets (Document 2 v2, §7.2). Chargé en dernier.
   Toutes les durées viennent des jetons --motion-* (design-tokens.css) ; le mouvement
   n'est écrit que sous html[data-motion="full"]. En « Réduites », seuls les fondus
   courts restent ; en « Aucune », rien ne bouge (règles globales de design-tokens.css).
   ============================================================ */
/* --- Boutons : appui (échelle 0,98) et survol (fond) --- */
.btn {
  transition: background-color var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    transform var(--motion-instant) var(--ease-standard);
}
html[data-motion="full"] .btn:active:not(:disabled):not([aria-disabled="true"]) { transform: scale(.98); }
/* --- Cartes : survol (ombre --shadow-md et élévation de 1 px) --- */
.wfe-list-card,.asset-card,.screen-card {
  transition: box-shadow var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}
.wfe-list-card:hover,.asset-card:hover,.screen-card-link:hover { box-shadow: var(--shadow-md); }
html[data-motion="full"] .wfe-list-card:hover,html[data-motion="full"] .asset-card:hover,html[data-motion="full"] .screen-card-link:hover { transform: translateY(-1px); }
/* --- Focus clavier : l'anneau de 2 px apparaît en fondu --- */
html[data-motion="full"] :focus-visible { animation: motion-focus-in var(--motion-instant) var(--ease-enter); }
@keyframes motion-focus-in { from { outline-color: transparent; } }
/* --- Menus déroulants : apparition depuis l'ancrage (shell.css), fermeture plus rapide --- */
#projectSwitcherPanel { transform-origin: top left; }
/* --- Modales : fond en fondu, boîte de 0,98 à 1 ; fermeture en --motion-exit --- */
html[data-motion="full"] .modal-overlay.active { animation: motion-fade-in var(--motion-base) var(--ease-enter); }
html[data-motion="full"] .modal-overlay.active > .modal,
html[data-motion="full"] .cwr-confirm-overlay.active .cwr-confirm-modal { animation: motion-dialog-in var(--motion-base) var(--ease-enter); }
.modal-overlay.is-leaving {
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-exit) var(--ease-exit);
}
@keyframes motion-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes motion-dialog-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: scale(1); } }
/* --- Palette de commandes : échelle 0,98 → 1, le résultat sélectionné glisse --- */
html[data-motion="full"] .a7-palette-overlay[aria-hidden="false"] { animation: motion-fade-in var(--motion-fast) var(--ease-enter); }
html[data-motion="full"] .a7-palette-overlay[aria-hidden="false"] .a7-palette { animation: motion-dialog-in var(--motion-fast) var(--ease-enter); }
.a7-palette-results { position: relative; }
.a7-palette-item.selected { background: transparent; }
.a7-palette-highlight {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  border-radius: 4px;
  background: var(--color-surface-active);
  pointer-events: none;
  opacity: 0;
  transition: transform var(--motion-fast) var(--ease-standard), height var(--motion-fast) var(--ease-standard), opacity var(--motion-fast) var(--ease-standard);
}
.a7-palette-highlight.is-visible { opacity: 1; }
.a7-palette-item > * { position: relative; }
/* --- Listes et grilles : cascade de 20 ms par élément (12 au plus), au premier affichage --- */
html[data-motion="full"] .motion-cascade > * { animation: motion-item-in var(--motion-base) var(--ease-enter) both; }
.motion-cascade > :nth-child(2) { animation-delay: calc(1 * var(--motion-stagger)); }
.motion-cascade > :nth-child(3) { animation-delay: calc(2 * var(--motion-stagger)); }
.motion-cascade > :nth-child(4) { animation-delay: calc(3 * var(--motion-stagger)); }
.motion-cascade > :nth-child(5) { animation-delay: calc(4 * var(--motion-stagger)); }
.motion-cascade > :nth-child(6) { animation-delay: calc(5 * var(--motion-stagger)); }
.motion-cascade > :nth-child(7) { animation-delay: calc(6 * var(--motion-stagger)); }
.motion-cascade > :nth-child(8) { animation-delay: calc(7 * var(--motion-stagger)); }
.motion-cascade > :nth-child(9) { animation-delay: calc(8 * var(--motion-stagger)); }
.motion-cascade > :nth-child(10) { animation-delay: calc(9 * var(--motion-stagger)); }
.motion-cascade > :nth-child(11) { animation-delay: calc(10 * var(--motion-stagger)); }
.motion-cascade > :nth-child(n+12) { animation-delay: calc(11 * var(--motion-stagger)); }
@keyframes motion-item-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* --- Coche qui se trace (copie réussie, réglage enregistré) --- */
.motion-check { width: 14px; height: 14px; flex: none; vertical-align: -2px; }
.motion-check path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
html[data-motion="full"] .motion-check path { animation: motion-check-draw var(--motion-base) var(--ease-enter) both; }
@keyframes motion-check-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.is-copied { display: inline-flex; align-items: center; gap: 4px; }
/* --- Canvas : nouvelle connexion (l'arête se dessine), port d'arrivée aimanté --- */
html[data-motion="full"] .wfe-edge-line.is-new { stroke-dasharray: 1; animation: motion-edge-draw var(--motion-base) var(--ease-enter) both; }
@keyframes motion-edge-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.wfe-port.is-magnet { transform: scale(1.45); box-shadow: 0 0 0 4px color-mix(in srgb, var(--port-color, var(--color-port-default)) 25%, transparent); }
/* --- Paramètres : indicateur « Enregistré » --- */
.settings-saved { display: inline-flex; align-items: center; gap: 4px; }
