/* ==========================================================================
   ANIMATIONS — reprises à l'identique du site Wix (relevées sur lafee13.com,
   novembre 2026) : mêmes effets, durées, délais, courbes, distances et
   déclenchement (élément visible à 15 %, une seule fois). Rien ne bouge si le
   visiteur a demandé moins d'animations dans son système.
   Fonctionnement : chaque élément animé reçoit ici son « animation » en pause ;
   js/layout.js ajoute .wx-in quand il entre à l'écran (lecture), puis .wx-done
   à la fin (l'animation est retirée, l'élément retrouve son état normal).
   ========================================================================== */
:root {
  --wx-sine: cubic-bezier(.445, .05, .55, .95);      /* easeInOutSine (Wix par défaut) */
  --wx-sine-in: cubic-bezier(.47, 0, .745, .715);    /* easeInSine */
  --wx-cubic: cubic-bezier(.645, .045, .355, 1);     /* easeInOutCubic */
  --wx-cubic-in: cubic-bezier(.55, .055, .675, .19); /* easeInCubic */
}

@keyframes wx-fade { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes wx-float {
  0% { opacity: 0; animation-timing-function: step-end; }
  .0001% { opacity: 0; transform: translate(var(--wx-x, 0px), var(--wx-y, 0px)); }
  100% { opacity: 1; transform: translate(0, 0); }
}
@keyframes wx-glide {
  0% { opacity: 0; animation-timing-function: step-end; }
  .0001% { opacity: 1; transform: translate(var(--wx-x, 0px), var(--wx-y, 0px)); }
  100% { opacity: 1; transform: translate(0, 0); }
}
@keyframes wx-spin { .0001% { scale: .98; rotate: -90deg; } 100% { scale: 1; rotate: 0deg; } }
@keyframes wx-expand { .0001% { transform: scale(.8); } 100% { transform: scale(1); } }
@keyframes wx-grow { .0001% { transform: translate(0, 20%) scale(.8); } 100% { transform: translate(0, 0) scale(1); } }
@keyframes wx-blur { 0% { filter: blur(6px); } 100% { filter: blur(0); } }
@keyframes wx-shutters {
  0% { opacity: 0; animation-timing-function: step-end; }
  .0001% { opacity: 1; clip-path: polygon(0% 0%, 0% 100%, 0% 100%, 0% 0%, 16% 0%, 16% 100%, 16% 100%, 16% 0%, 33% 0%, 33% 100%, 33% 100%, 33% 0%, 50% 0%, 50% 100%, 50% 100%, 50% 0%, 66% 0%, 66% 100%, 66% 100%, 66% 0%, 83% 0%, 83% 100%, 83% 100%, 83% 0%); }
  100% { clip-path: polygon(0% 0%, 0% 100%, 16% 100%, 16% 0%, 16% 0%, 16% 100%, 38% 100%, 38% 0%, 33% 0%, 33% 100%, 66% 100%, 66% 0%, 50% 0%, 50% 100%, 99% 100%, 99% 0%, 66% 0%, 66% 100%, 138% 100%, 138% 0%, 83% 0%, 83% 100%, 183% 100%, 183% 0%); }
}
@keyframes wx-breathe {
  0% { animation-timing-function: cubic-bezier(.39, .575, .565, 1); transform: translate3d(0, 0, 0); }
  25% { animation-timing-function: var(--wx-sine); transform: translate3d(0, 15px, 0); }
  75% { animation-timing-function: var(--wx-sine-in); transform: translate3d(0, -15px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* Effet par élément : data-wx (toutes tailles), data-wx-t (tablette 751–1000 px) et
   data-wx-m (téléphone ≤ 750 px) l'emportent sur data-wx. La classe .wx-js est posée
   sur <html> dès le début du chargement : l'élément est donc caché dès le premier
   affichage, sans apparaître puis disparaître. Sans JavaScript, tout reste visible. */
@media (prefers-reduced-motion: no-preference) {
  .wx-js [data-wx="fade"] { animation: wx-fade 1.2s var(--wx-sine); }
  .wx-js [data-wx="fade-delay"] { animation: wx-fade 1.2s var(--wx-sine) 1s; }
  .wx-js [data-wx="float-up"] { --wx-x: 0px; --wx-y: 60px; animation: wx-float 1.2s var(--wx-sine); }
  .wx-js [data-wx="float-left"] { --wx-x: -60px; --wx-y: 0px; animation: wx-float 1.2s var(--wx-sine); }
  .wx-js [data-wx="fade-spin"] { animation: wx-fade 1.078s var(--wx-cubic-in), wx-spin 1.1s var(--wx-cubic); }
  .wx-js [data-wx="glide-left"] { --wx-x: -100%; --wx-y: 0px; animation: wx-glide 1.2s var(--wx-cubic); }
  .wx-js [data-wx="fade-expand"] { animation: wx-fade 1.2s linear, wx-expand 1.2s var(--wx-cubic); }
  .wx-js [data-wx="glide-down-fade"] { --wx-x: 0px; --wx-y: -217px; animation: wx-glide 1.2s var(--wx-cubic), wx-fade 1.2s var(--wx-sine); }
  .wx-js [data-wx="fade-grow"] { animation: wx-fade .96s var(--wx-cubic), wx-grow 1.2s var(--wx-cubic); }
  .wx-js [data-wx="fade-blur"] { animation: wx-fade 1.4s var(--wx-sine-in), wx-blur 2s linear; }
  .wx-js [data-wx="fade-blur-shutters"] { animation: wx-blur 2s linear, wx-shutters 2s var(--wx-sine-in), wx-fade 1.4s var(--wx-sine-in); }
  .wx-js [data-wx="breathe"] { animation: wx-breathe 5s linear infinite; }
  .wx-js [data-wx="none"] { animation: none; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 751px) and (max-width: 1000px) {
  .wx-js [data-wx-t="fade"] { animation: wx-fade 1.2s var(--wx-sine); }
  .wx-js [data-wx-t="fade-delay"] { animation: wx-fade 1.2s var(--wx-sine) 1s; }
  .wx-js [data-wx-t="float-up"] { --wx-x: 0px; --wx-y: 60px; animation: wx-float 1.2s var(--wx-sine); }
  .wx-js [data-wx-t="float-left"] { --wx-x: -60px; --wx-y: 0px; animation: wx-float 1.2s var(--wx-sine); }
  .wx-js [data-wx-t="fade-spin"] { animation: wx-fade 1.078s var(--wx-cubic-in), wx-spin 1.1s var(--wx-cubic); }
  .wx-js [data-wx-t="glide-left"] { --wx-x: -100%; --wx-y: 0px; animation: wx-glide 1.2s var(--wx-cubic); }
  .wx-js [data-wx-t="fade-expand"] { animation: wx-fade 1.2s linear, wx-expand 1.2s var(--wx-cubic); }
  .wx-js [data-wx-t="glide-down-fade"] { --wx-x: 0px; --wx-y: -217px; animation: wx-glide 1.2s var(--wx-cubic), wx-fade 1.2s var(--wx-sine); }
  .wx-js [data-wx-t="fade-grow"] { animation: wx-fade .96s var(--wx-cubic), wx-grow 1.2s var(--wx-cubic); }
  .wx-js [data-wx-t="fade-blur"] { animation: wx-fade 1.4s var(--wx-sine-in), wx-blur 2s linear; }
  .wx-js [data-wx-t="fade-blur-shutters"] { animation: wx-blur 2s linear, wx-shutters 2s var(--wx-sine-in), wx-fade 1.4s var(--wx-sine-in); }
  .wx-js [data-wx-t="breathe"] { animation: wx-breathe 5s linear infinite; }
  .wx-js [data-wx-t="none"] { animation: none; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 750px) {
  .wx-js [data-wx-m="fade"] { animation: wx-fade 1.2s var(--wx-sine); }
  .wx-js [data-wx-m="fade-delay"] { animation: wx-fade 1.2s var(--wx-sine) 1s; }
  .wx-js [data-wx-m="float-up"] { --wx-x: 0px; --wx-y: 60px; animation: wx-float 1.2s var(--wx-sine); }
  .wx-js [data-wx-m="float-left"] { --wx-x: -60px; --wx-y: 0px; animation: wx-float 1.2s var(--wx-sine); }
  .wx-js [data-wx-m="fade-spin"] { animation: wx-fade 1.078s var(--wx-cubic-in), wx-spin 1.1s var(--wx-cubic); }
  .wx-js [data-wx-m="glide-left"] { --wx-x: -100%; --wx-y: 0px; animation: wx-glide 1.2s var(--wx-cubic); }
  .wx-js [data-wx-m="fade-expand"] { animation: wx-fade 1.2s linear, wx-expand 1.2s var(--wx-cubic); }
  .wx-js [data-wx-m="glide-down-fade"] { --wx-x: 0px; --wx-y: -217px; animation: wx-glide 1.2s var(--wx-cubic), wx-fade 1.2s var(--wx-sine); }
  .wx-js [data-wx-m="fade-grow"] { animation: wx-fade .96s var(--wx-cubic), wx-grow 1.2s var(--wx-cubic); }
  .wx-js [data-wx-m="fade-blur"] { animation: wx-fade 1.4s var(--wx-sine-in), wx-blur 2s linear; }
  .wx-js [data-wx-m="fade-blur-shutters"] { animation: wx-blur 2s linear, wx-shutters 2s var(--wx-sine-in), wx-fade 1.4s var(--wx-sine-in); }
  .wx-js [data-wx-m="breathe"] { animation: wx-breathe 5s linear infinite; }
  .wx-js [data-wx-m="none"] { animation: none; }
}
@media (prefers-reduced-motion: no-preference) {
  /* En attente : en pause sur la 1re image (invisible) jusqu'à l'entrée à l'écran (.wx-in),
     puis retirée une fois finie (.wx-done). */
  .wx-js [data-wx]:not(.wx-in) { animation-play-state: paused; }
  .wx-js [data-wx]:not(.wx-done) { animation-fill-mode: backwards; }
  .wx-js [data-wx].wx-done { animation: none; }
}

/* En-tête : glisse vers le haut quand on descend, revient quand on remonte (js/layout.js) */
.site-header.is-scrolled-away { transform: translateY(-100%); }
@media (prefers-reduced-motion: no-preference) {
  .site-header { transition: transform .3s linear; }
}

/* Changement de page : fondu de sortie puis fondu d'entrée, 0,7 s chacun (transition « OutIn » de Wix) */
@keyframes wx-page-out { to { opacity: 0; } }
@keyframes wx-page-in { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition { background: #fff; }
  ::view-transition-old(root) { animation: wx-page-out .7s cubic-bezier(.22, 1, .36, 1) both; }
  ::view-transition-new(root) { animation: wx-page-in .7s cubic-bezier(.64, 0, .78, 0) .7s both; }
}
