/* ============================================================
   MAIN.CSS — Styles partagés par toutes les pages.

   Contient pour l'instant :
     - Scroll smooth global
     - Styles de la barre de navigation fixe (.fixed-nav)
     - Styles du footer (.footer)
     - Styles des icônes sociales flottantes (.floating-socials)

   Les autres styles propres à chaque page restent inline dans la
   page elle-même (extraction progressive page par page).
   ============================================================ */

/* Scroll fluide pour les ancres internes (#section) */
html {
  scroll-behavior: smooth;
}

/* ---------- REVEAL ON SCROLL ---------- */
/* Ajouter class="reveal" à un élément pour le faire apparaître en fondu quand on scroll dessus.
   Le reveal se déclenche À CHAQUE fois que l'élément entre dans le viewport (pas qu'une fois). */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.9s cubic-bezier(.22,.61,.36,1), transform 0.9s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Variante "fort" pour les sections : translation + léger zoom */
.reveal.reveal-strong {
  opacity: 0;
  transform: translateY(60px) scale(0.97);
}
.reveal.reveal-strong.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
/* Variantes directionnelles */
.reveal.from-left  { transform: translateX(-48px); }
.reveal.from-right { transform: translateX(48px); }
.reveal.from-left.visible,
.reveal.from-right.visible { transform: translateX(0); }

/* Désactive le reveal à l'intérieur des modales / lightbox (sinon contenu invisible quand on ouvre) */
.modal .reveal,
.lightbox .reveal,
.modal-content .reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Respecte la préférence "réduire les animations" du système */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none !important; transition: none; }
}

/* ---------- NAV FIXE ---------- */
.fixed-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  height: 60px;
  box-sizing: border-box;
}
.fixed-nav.visible { transform: translateY(0); }
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 28px; width: auto; }
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  height: 100%;
}
.nav-links a {
  color: #000;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  height: 100%;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #ccc;
  transition: width 0.3s ease;
}
.nav-links a:hover::after { width: 100%; }

@media (max-width: 768px) {
  .fixed-nav {
    flex-direction: column;
    padding: 15px 15px 0;
    height: auto;
    gap: 8px;
    padding-top: 20px;
  }
  .nav-logo img { height: 20px; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.75rem; }
}

/* ---------- FOOTER ---------- */
.footer {
  text-align: center;
  padding: 40px 20px;
  box-sizing: border-box;
  background-color: #ffffff;
  color: #000000;
  margin-top: 40px;
}
.footer-logo {
  display: block;
  margin: 0 auto 15px auto;
  max-width: 200px;
  width: auto;
  height: 20px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}
.footer-logo:hover { opacity: 1; }

/* ---------- ICÔNES SOCIALES FLOTTANTES ---------- */
.floating-socials {
  position: fixed;
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 999;
  /* Apparition en fondu (la 1ère seconde) */
  opacity: 0;
  animation: fsAppear 0.6s 0.4s ease-out forwards;
}
@keyframes fsAppear {
  from { opacity: 0; transform: translateY(-50%) translateX(20px); }
  to   { opacity: 1; transform: translateY(-50%) translateX(0); }
}

.fs-link {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.10);
  transition: transform 0.28s cubic-bezier(.22,.61,.36,1),
              box-shadow 0.28s ease,
              background-color 0.28s ease;
  text-decoration: none;
}
.fs-link img {
  width: 22px;
  height: 22px;
  filter: grayscale(100%);
  opacity: 0.65;
  transition: filter 0.28s ease, opacity 0.28s ease;
  pointer-events: none;
}
.fs-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}
.fs-link:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* Tooltip discret : juste le texte en noir, pas de fond */
.fs-link::before {
  content: attr(data-tip);
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  color: #111;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.fs-link:hover::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Au survol : icône en couleur d'origine (pas de fond coloré, pas de blanc) */
.fs-link:hover img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

/* Mobile : icônes un peu plus petites, plus en bas */
@media (max-width: 768px) {
  .floating-socials {
    top: auto;
    bottom: 16px;
    right: 16px;
    transform: none;
    gap: 10px;
    animation: none;
    opacity: 1;
  }
  .fs-link { width: 40px; height: 40px; }
  .fs-link img { width: 18px; height: 18px; }
  /* Pas de tooltip sur mobile (inutile) */
  .fs-link::before, .fs-link::after { display: none; }
}
