@import 'variables.css';

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-primary);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
}

a {
  color: inherit;
}

* {
    transition: all 0.2s ease;
}

/* ---------- AOS (Animate On Scroll) ---------- */
/* Distance réduite par rapport aux 100px par défaut d'AOS — effet plus discret,
   et évite tout débordement horizontal sur mobile pour les éléments proches du bord. */
[data-aos="fade-left"] {
    transform: translate3d(40px, 0, 0);
}

[data-aos="fade-right"] {
    transform: translate3d(-40px, 0, 0);
}

/* Filet de sécurité : si prefers-reduced-motion est actif, le contenu reste visible
   immédiatement (pas d'attente d'un scroll), même si aos-init.js ne se charge pas. */
@media (prefers-reduced-motion: reduce) {
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
}

/* ---------- BOUTON FLOTTANT WHATSAPP (présent sur toutes les pages) ---------- */
.whatsapp-fab {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    z-index: 90;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
}

.whatsapp-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.5);
}

.whatsapp-fab:focus-visible {
    outline: 3px solid var(--color-secondary);
    outline-offset: 3px;
}

.whatsapp-fab__pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25D366;
    z-index: -1;
    animation: whatsapp-pulse 2.2s ease-out infinite;
}

@keyframes whatsapp-pulse {
    0% { transform: scale(1); opacity: 0.55; }
    100% { transform: scale(1.8); opacity: 0; }
}

@media (max-width: 640px) {
    .whatsapp-fab {
        right: 1rem;
        bottom: 1rem;
        width: 3.1rem;
        height: 3.1rem;
        font-size: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .whatsapp-fab { transition: none; }
    .whatsapp-fab:hover { transform: none; }
    .whatsapp-fab__pulse { animation: none; display: none; }
}
