/* ==========================================================================
   juxta-boost.css : calque d'animations sobres pour juxta-avocats.com
   Ne modifie ni la structure, ni les couleurs, ni les textes du site.
   A placer dans public_html/css/. Pour le retirer : supprimer la ligne
   <link> correspondante dans smarty/templates/index.tpl.
   ========================================================================== */

:root { --jx-red: #82000d; }

/* Selection de texte aux couleurs du reseau */
::selection { background: var(--jx-red); color: #fff; }

/* --------------------------------------------------------------------------
   1. Menu : soulignement qui se dessine au survol (sans toucher aux fleches)
   -------------------------------------------------------------------------- */
#main-nav > li > a {
  background-image: linear-gradient(#fff, #fff);
  background-repeat: no-repeat;
  background-position: 50% calc(100% - 9px);
  background-size: 0 2px;
  transition: background-size .35s cubic-bezier(.2,.7,.2,1), color .25s ease;
}
#main-nav > li:hover > a,
#main-nav > li.select > a { background-size: calc(100% - 44px) 2px; }
#main-nav > li.espace-membre > a { background-image: none; }

/* --------------------------------------------------------------------------
   2. Cartes : reaction douce au survol
   -------------------------------------------------------------------------- */
.content {
  transition: background-color .35s ease, box-shadow .35s ease;
}
.content:hover {
  background-color: rgba(0, 0, 0, .68);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .35);
}

/* Formations : titre et lien reagissent */
.bloc_formations article { transition: background-color .3s ease; border-radius: 4px; }
.bloc_formations article:hover { background-color: rgba(255, 255, 255, .06); }
.bloc_formations .readmore { transition: transform .25s ease, opacity .25s ease; display: inline-block; }
.bloc_formations article:hover .readmore { transform: translateX(6px); }

/* Liste du reseau : glissement au survol */
.liste_reseau li { transition: transform .25s ease, opacity .6s ease; }
.liste_reseau li > a { transition: color .2s ease, letter-spacing .25s ease; }
.liste_reseau li:hover > a { letter-spacing: .02em; }

/* Boutons de contact */
.bloc_gauche .bt_contact,
.bloc_gauche .nous_contacter > a { transition: opacity .25s ease, letter-spacing .25s ease; }
.bloc_gauche .bt_contact:hover { letter-spacing: .03em; }

/* --------------------------------------------------------------------------
   3. Mobile : logo plus compact pour laisser le contenu visible plus haut
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  #logo img { width: 56%; max-width: 240px; height: auto; display: block; margin: 0 auto; }
  .bloc_gauche .bloc_blanc { padding-top: 14px; padding-bottom: 14px; }
}

/* --------------------------------------------------------------------------
   4. Animations d'entree (accueil uniquement). Desactivees si le visiteur a
      demande de reduire les animations dans son systeme.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {

  /* Zoom tres lent sur la photo du pont (ordinateur uniquement) */
  @media (min-width: 768px) {
    body.index .bloc_droit { isolation: isolate; overflow: hidden; }
    body.index .bloc_droit::before {
      content: "";
      position: absolute; top: 0; right: 0; bottom: 0; left: 0;
      z-index: -1;
      background: url(../images/fond_site.jpg) center / cover no-repeat;
      transform-origin: 62% 38%;
      animation: jx-zoom 30s ease-in-out infinite alternate;
      will-change: transform;
    }
  }
  @keyframes jx-zoom { from { transform: scale(1); } to { transform: scale(1.07); } }

  /* Apparition en cascade : seulement si le JavaScript a pris la main */
  html.jx-js body.index .jx-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1),
                background-color .35s ease, box-shadow .35s ease;
  }
  html.jx-js body.index .jx-reveal.jx-in { opacity: 1; transform: none; }

  html.jx-js body.index .liste_reseau li { opacity: 0; transform: translateX(-10px); }
  html.jx-js body.index .bloc_reseau.jx-in .liste_reseau li { opacity: 1; transform: none; }
  html.jx-js body.index .bloc_reseau.jx-in .liste_reseau li:hover { transform: translateX(5px); }
}

/* Reduction des animations demandee : on ne garde que les survols instantanes */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation: none !important; }
}
