/* Ouafo — from one page to the next, without a script.

   A page whose water moves (`Water::Calm`, `Water::Plouf`) links this
   file; a page that carries an alert, the emergency page and the error
   pages do not (`Water::Still`). A transition between two documents only
   runs when both ask for it: from or to a still page, the browser simply
   shows the next page, as it always did.

   Between two calm pages, the header stays where it is (it is the same on
   both, it neither fades nor slides, even from the bottom of a long page)
   and the rest of the page changes in a short fade: 0.12 s out, 0.2 s in.
   Nothing waits for it: the browser only starts it once the next page can
   be drawn, and it is over 0.2 s later. With « reduce motion », or in a
   browser that does not know it, nothing changes. Only opacity moves. */

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
  .top {
    view-transition-name: top;
  }
  ::view-transition-group(top) {
    animation: none;
  }
  ::view-transition-old(top) {
    display: none;
  }
  ::view-transition-new(top) {
    animation: none;
  }
  ::view-transition-old(root) {
    animation: 0.12s ease-in both page-out;
  }
  ::view-transition-new(root) {
    animation: 0.2s ease-out both page-in;
  }
}

@keyframes page-out {
  to { opacity: 0; }
}
@keyframes page-in {
  from { opacity: 0; }
}
