/* =========================================================
   Animations du site public : entrée de l'accueil, apparition au défilement,
   bouton WhatsApp. Désactivées pour les visiteurs qui demandent moins de mouvement.
   ========================================================= */
@keyframes rise   { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes fade   { from { opacity: 0; } to { opacity: 1; } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes pulse  {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, .55); }
    70%  { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
@keyframes heroGlow {
    0%, 100% { opacity: .25; }
    50%      { opacity: .9; }
}

@media (prefers-reduced-motion: no-preference) {
    /* Introduction : la barre du haut, le logo, puis le titre, le sous-titre et la recherche */
    .topbar { animation: fade .6s ease both; }
    .main-nav .navbar-brand img { animation: dropIn .7s cubic-bezier(.2, .7, .2, 1) .1s both; }
    .main-nav .navbar-nav > li { animation: fade .6s ease .25s both; }

    .hero-title  { animation: rise .85s cubic-bezier(.2, .7, .2, 1) .15s both; }
    .hero-sub    { animation: rise .85s cubic-bezier(.2, .7, .2, 1) .35s both; }
    .search-box  { animation: rise .9s  cubic-bezier(.2, .7, .2, 1) .55s both; }
    .page-head h1 { animation: rise .7s cubic-bezier(.2, .7, .2, 1) .1s both; }
    .page-head p  { animation: rise .7s cubic-bezier(.2, .7, .2, 1) .25s both; }

    /* Halo lumineux lent derrière le titre de l'accueil */
    .hero::before {
        content: ''; position: absolute; inset: 0;
        background: radial-gradient(ellipse 45% 70% at 80% 25%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0));
        pointer-events: none; animation: heroGlow 8s ease-in-out infinite;
    }

    /* Bouton WhatsApp : petite pulsation qui attire l'oeil */
    .wa-float { animation: pulse 2.6s ease-out 2.5s infinite; }

    /* Apparition douce au défilement (la classe .motion est ajoutée par motion.js) */
    .motion .reveal {
        opacity: 0; transform: translateY(26px);
        transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
        transition-delay: var(--d, 0ms);
    }
    .motion .reveal.in { opacity: 1; transform: none; }
}
