/* ============================================================
   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; }
}

/* ---------- ANCIEN FOOTER (.footer) — gardé pour les pages qui n'ont pas migré ---------- */
.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; }

/* ---------- NOUVEAU FOOTER RICHE (.site-footer) ---------- */
.site-footer {
  background-color: #f7f7f7;
  color: #111;
  padding: 3.5rem 2rem 1.5rem;
  margin-top: 4rem;
  border-top: 1px solid #ececec;
  font-size: 0.9rem;
}
.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
}
.site-footer-col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  margin-bottom: 1rem;
}
.site-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.site-footer-col a {
  color: #111;
  text-decoration: none;
  transition: color 0.2s ease;
}
.site-footer-col a:hover {
  color: #888;
}
.site-footer-brand .site-footer-logo {
  height: 24px;
  width: auto;
  margin-bottom: 0.9rem;
  opacity: 0.9;
}
.site-footer-brand .site-footer-tagline {
  color: #777;
  line-height: 1.55;
  font-size: 0.85rem;
  margin: 0;
}
.site-footer-bottom {
  max-width: 1200px;
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid #ececec;
  text-align: center;
  font-size: 0.8rem;
  color: #888;
}
.site-footer-bottom p { margin: 0; }
.site-footer-bottom a { color: #888; text-decoration: none; }
.site-footer-bottom a:hover { color: #111; }

@media (max-width: 800px) {
  .site-footer { padding: 2.5rem 1.5rem 1.5rem; }
  .site-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .site-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 500px) {
  .site-footer-inner { grid-template-columns: 1fr; }
}

/* ---------- BANDEAU COOKIES RGPD ---------- */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 9999;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.18);
  border: 1px solid #ececec;
  padding: 1.1rem 1.3rem;
  max-width: 720px;
  margin: 0 auto;
  animation: cb-up 0.4s ease-out;
}
@keyframes cb-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cookie-banner-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cookie-banner-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
  color: #111;
}
.cookie-banner-text {
  font-size: 0.83rem;
  color: #555;
  line-height: 1.5;
  margin: 0;
  max-width: 460px;
}
.cookie-banner-text a {
  color: #111;
  text-decoration: underline;
}
.cookie-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}
.cookie-btn {
  padding: 0.55rem 1.2rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.cookie-btn-reject {
  background: transparent;
  color: #555;
  border-color: #ddd;
}
.cookie-btn-reject:hover { background: #f5f5f5; }
.cookie-btn-accept {
  background: #111;
  color: #fff;
}
.cookie-btn-accept:hover { background: #333; }
@media (max-width: 600px) {
  .cookie-banner { left: 8px; right: 8px; bottom: 8px; padding: 1rem; }
  .cookie-banner-actions { margin-left: 0; width: 100%; }
  .cookie-btn { flex: 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; }
}
