/**
 * PURE SPACE NETT - Améliorations CSS
 * Animations et styles supplémentaires
 */

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes bounce-subtle {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.animate-slide-in {
    animation: slide-in 0.4s ease-out;
}

.animate-fade-in {
    animation: fade-in 0.6s ease-out;
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

.animate-bounce-subtle {
    animation: bounce-subtle 2s ease-in-out infinite;
}

/* ==========================================
   SCROLL REVEAL
   ========================================== */

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   AMÉLIORATIONS DE LISIBILITÉ
   ========================================== */

/* Amélioration du contraste sur les liens */
a:focus-visible {
    outline: 3px solid #0ea5e9;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Amélioration du focus sur les boutons */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #0ea5e9;
    outline-offset: 2px;
}

/* ==========================================
   TRANSITIONS FLUIDES
   ========================================== */

a, button, .transition {
    transition: all 0.3s ease;
}

/* Effet hover sur les cartes de services */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ==========================================
   FORMULAIRE - AMÉLIORATIONS
   ========================================== */

/* Bordures fluides au focus */
input:focus,
select:focus,
textarea:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    transition: all 0.2s ease;
}

/* État d'erreur */
input.error,
select.error,
textarea.error {
    border-color: #ef4444;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ==========================================
   RESPONSIVE - AMÉLIORATIONS
   ========================================== */

/* Meilleur espacement sur mobile */
@media (max-width: 640px) {
    .hero-bg {
        padding-top: 8rem;
        padding-bottom: 4rem;
    }
    
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
}

/* ==========================================
   ACCESSIBILITÉ
   ========================================== */

/* Mode à contraste élevé */
@media (prefers-contrast: high) {
    body {
        background-color: #ffffff;
    }
    
    .bg-primary {
        background-color: #0369a1 !important;
    }
}

/* Réduction de mouvement pour les utilisateurs qui le préfèrent */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   IMPRESSION
   ========================================== */

@media print {
    nav,
    footer,
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        text-decoration: underline;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* ==========================================
   UTILITAIRES PERSONNALISÉS
   ========================================== */

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Dégradé de texte */
.gradient-text {
    background: linear-gradient(135deg, #0ea5e9 0%, #1e3a8a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================
   LOADING SPINNER
   ========================================== */

.spinner {
    border: 3px solid rgba(14, 165, 233, 0.1);
    border-top-color: #0ea5e9;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   BADGES ET TAGS
   ========================================== */

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    background-color: #0ea5e9;
    color: white;
}

/* ==========================================
   SCROLLBAR PERSONNALISÉE (Webkit)
   ========================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================
   SÉLECTION DE TEXTE
   ========================================== */

::selection {
    background-color: #0ea5e9;
    color: white;
}

::-moz-selection {
    background-color: #0ea5e9;
    color: white;
}
