/* =========================================================
   Walta — Styles partagés (communs aux 4 pages du site)
   Ce fichier regroupe tout ce qui était dupliqué dans chaque
   <style> inline. Les styles propres à une seule page restent
   dans le <style> de cette page.
   ========================================================= */

body {
    background-color: #050507;
    color: #ffffff;
    overflow-x: hidden;
}

/* --- Fond de grille technique animé --- */
.bg-grid {
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at top, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at top, black 20%, transparent 80%);
    animation: panGrid 4s linear infinite;
    will-change: background-position;
}
@keyframes panGrid { 0% { background-position: 0 0; } 100% { background-position: 0 40px; } }

.glow-core {
    position: absolute; top: -10%; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 900px; height: 600px;
    background: radial-gradient(circle, rgba(16,185,129,0.15) 0%, rgba(5,5,7,0) 65%);
    z-index: 0; pointer-events: none;
}

/* --- Éléments flottants --- */
.floating-element { animation: float 6s ease-in-out infinite; will-change: transform; }
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-12px); } }

/* --- Cartes avec halo qui suit la souris --- */
.mouse-tracking-card {
    position: relative; overflow: hidden;
    background: linear-gradient(180deg, rgba(15, 17, 21, 0.8) 0%, rgba(15, 17, 21, 0.4) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    transition: transform 0.5s, box-shadow 0.5s;
}
.mouse-tracking-card::before {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(16, 185, 129, 0.06), transparent 40%);
    z-index: 0; opacity: 0; transition: opacity 0.5s; pointer-events: none;
}
.mouse-tracking-card::after {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(16, 185, 129, 0.4), transparent 40%);
    z-index: 1; opacity: 0; transition: opacity 0.5s; pointer-events: none;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    padding: 1px; border-radius: inherit;
}
.mouse-tracking-card:hover::before, .mouse-tracking-card:hover::after { opacity: 1; }
.mouse-tracking-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -10px rgba(0,0,0,0.8); }
.card-content { position: relative; z-index: 10; }

.glass-card {
    background: linear-gradient(180deg, rgba(15, 17, 21, 0.8) 0%, rgba(15, 17, 21, 0.4) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    transition: all 0.3s;
}

/* --- Fenêtre de code / terminal --- */
.code-window { background: #090a0c; border: 1px solid #1f2229; border-radius: 16px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.8); }
.code-header {
    background: #0f1115; border-bottom: 1px solid #1f2229; padding: 12px 16px;
    border-radius: 16px 16px 0 0; display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px;
}
.typing-cursor::after { content: '|'; animation: blink 1s step-end infinite; color: #34d399; font-weight: bold; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* --- Texte en dégradé émeraude --- */
.text-gradient-emerald {
    background: linear-gradient(270deg, #34d399, #10b981, #047857, #34d399);
    background-size: 300% 300%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: gradientFlow 5s ease infinite;
}
@keyframes gradientFlow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* --- Halo pulsant sur les CTA principaux --- */
.btn-glow { animation: btnPulse 2s infinite; }
@keyframes btnPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } 70% { box-shadow: 0 0 0 15px rgba(16, 185, 129, 0); } }

/* --- Carrousels défilants (Marquee) ---
   Chaque page avait une distance de défilement différente
   (nombre d'éléments x largeur), donc trois animations distinctes
   plutôt qu'une seule générique. */
@keyframes marqueeIndex { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-200px * 6)); } }
.animate-marquee-index { animation: marqueeIndex 30s linear infinite; }

@keyframes marqueeSolutions { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-250px * 5)); } }
.animate-marquee-solutions { animation: marqueeSolutions 30s linear infinite; }

@keyframes marqueeTech { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-150px * 7)); } }
.animate-marquee-tech { animation: marqueeTech 30s linear infinite; }

/* =========================================================
   Accessibilité — ajouts
   ========================================================= */

/* Focus clavier visible : on ne supprime jamais l'anneau de focus
   sans le remplacer. Les champs/boutons du site utilisent
   focus:outline-none (Tailwind) ; on redonne un anneau propre
   et cohérent avec l'identité de marque pour la navigation clavier. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #34d399;
    outline-offset: 3px;
    border-radius: 4px;
}

/* Lien d'évitement pour lecteurs d'écran / navigation clavier */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 200;
    background: #10b981;
    color: #050507;
    font-weight: 800;
    padding: 0.75rem 1.25rem;
    border-radius: 9999px;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 1rem;
}

/* Bouton "retour en haut" (mobile) */
.back-to-top {
    position: fixed; bottom: 1.5rem; right: 1.5rem; width: 3rem; height: 3rem;
    border-radius: 9999px; background: #0f1115; border: 1px solid #1f2229;
    display: flex; align-items: center; justify-content: center; color: #ffffff;
    z-index: 50; box-shadow: 0 10px 25px rgba(0,0,0,0.4); transition: color 0.2s, border-color 0.2s;
}
.back-to-top:hover { color: #34d399; border-color: #10b981; }

/* Respecter la préférence "réduire les animations" du visiteur */
@media (prefers-reduced-motion: reduce) {
    .bg-grid,
    .floating-element,
    .text-gradient-emerald,
    .btn-glow,
    .typing-cursor::after,
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
