/* Tobile Landing Page - Styles personnalisés */

/* Variables CSS personnalisées */
:root {
    --tobile-blue: #0ea5e9;
    --tobile-blue-dark: #0284c7;
    --tobile-blue-light: #38bdf8;
    --tobile-navy: #1e40af;
    --tobile-orange: #f59e0b;
    --tobile-green: #10b981;
    --tobile-gray: #6b7280;
    --tobile-dark: #1f2937;

    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);

    --border-radius: 12px;
    --border-radius-lg: 20px;
    --transition: all 0.3s ease;
}

/* Améliorations générales */
body {
    scroll-behavior: smooth;
}

/* Hero Section améliorée */
.hero-section {
    background: linear-gradient(135deg, var(--tobile-blue) 0%, var(--tobile-navy) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.05) 0%, transparent 50%);
    animation: heroFloat 20s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-20px, -20px) rotate(1deg); }
    66% { transform: translate(20px, -10px) rotate(-1deg); }
}

/* Cards et composants */
.card-tobile {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    border: none;
    overflow: hidden;
    position: relative;
}

.card-tobile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--tobile-blue), var(--tobile-orange));
    transform: scaleX(0);
    transition: var(--transition);
}

.card-tobile:hover::before {
    transform: scaleX(1);
}

.card-tobile:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

/* Feature icons avec animations améliorées */
.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--tobile-blue), var(--tobile-navy));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 20px;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    overflow: hidden;
}

.feature-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.feature-icon:hover::before {
    left: 100%;
}

.feature-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.4);
}

/* Effet de pulsation pour les statistiques */
.stat-number {
    position: relative;
    display: inline-block;
}

.stat-number::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: statPulse 3s infinite;
}

@keyframes statPulse {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

.feature-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, var(--tobile-blue), var(--tobile-orange));
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}

.card-tobile:hover .feature-icon::after {
    opacity: 1;
}

/* Boutons améliorés */
.btn-tobile-primary {
    background: linear-gradient(135deg, var(--tobile-blue), var(--tobile-navy));
    border: none;
    color: white;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 50px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-tobile-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition);
}

.btn-tobile-primary:hover::before {
    left: 100%;
}

.btn-tobile-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
    color: white;
}

/* Animations d'entrée */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

/* Navigation améliorée */
.navbar-tobile {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    transition: var(--transition);
}

.navbar-tobile.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--tobile-blue), var(--tobile-navy));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Images avec effet hover */
.img-hover {
    transition: var(--transition);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.img-hover:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

/* Stats counters */
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--tobile-orange), #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Floating elements */
.floating-element {
    animation: float 6s ease-in-out infinite;
    position: absolute;
    z-index: 10;
}

.floating-element:nth-child(even) {
    animation-delay: 3s;
    animation-direction: reverse;
}

/* Testimonials (si nécessaire plus tard) */
.testimonial-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--tobile-blue);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Footer amélioré */
.footer-tobile {
    background: linear-gradient(135deg, var(--tobile-dark) 0%, #111827 100%);
    position: relative;
}

.footer-tobile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--tobile-blue), var(--tobile-orange), var(--tobile-green));
}

/* Responsive améliorations */
@media (max-width: 768px) {
    .hero-section {
        min-height: 90vh;
        padding-top: 120px;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .btn-tobile-primary {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .hero-section h1 {
        font-size: 2.5rem !important;
    }

    .card-3d:hover {
        transform: none; /* Désactiver l'effet 3D sur mobile */
    }

    .floating-particles {
        display: none; /* Masquer les particules sur mobile pour les performances */
    }
}

@media (max-width: 576px) {
    .section-padding {
        padding: 60px 0;
    }

    .card-tobile {
        margin-bottom: 2rem;
    }

    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .section-padding {
        padding: 3rem 0;
    }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-particles,
    .particle,
    .feature-icon:hover,
    .card-3d:hover {
        animation: none !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    .bg-light {
        background-color: #f8fafc !important;
    }

    .text-muted {
        color: #6b7280 !important;
    }

    .auto-dark {
        background-color: #1a202c;
        color: #e2e8f0;
    }

    .auto-dark .card-tobile {
        background: #2d3748;
        border: 1px solid #4a5568;
    }

    .auto-dark .text-muted {
        color: #a0aec0 !important;
    }
}

/* Effets de parallaxe légers */
.parallax-light {
    transform: translateY(0);
    transition: transform 0.1s ease-out;
}

/* Print styles */
@media print {
    .navbar-tobile,
    .btn,
    .floating-element {
        display: none !important;
    }

    .hero-section {
        background: white !important;
        color: black !important;
    }
}

/* Effets de glassmorphism */
.glass-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Effet parallaxe */
.parallax-section {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Particules flottantes */
.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    top: 0;
    left: 0;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: float-particle 15s infinite linear;
}

.particle:nth-child(odd) {
    animation-duration: 20s;
    animation-delay: -5s;
}

.particle:nth-child(even) {
    animation-duration: 25s;
    animation-delay: -10s;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Effet de morphing sur les boutons */
.btn-morph {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-morph::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.btn-morph:hover::before {
    width: 300px;
    height: 300px;
}

/* Révélation progressive du texte */
.text-reveal {
    overflow: hidden;
    position: relative;
}

.text-reveal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--tobile-blue);
    transform: translateX(-100%);
    transition: transform 0.8s ease;
}

.text-reveal.revealed::before {
    transform: translateX(100%);
}

/* Cartes avec effet de profondeur 3D */
.card-3d {
    transform-style: preserve-3d;
    transition: all 0.5s ease;
}

.card-3d:hover {
    transform: rotateY(10deg) rotateX(10deg) translateZ(20px);
}

.card-3d::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: -10px;
    bottom: -10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: inherit;
    z-index: -1;
    transform: translateZ(-50px);
    transition: all 0.5s ease;
}

.card-3d:hover::before {
    transform: translateZ(-100px);
    opacity: 0.8;
}

/* Performance - GPU acceleration pour les animations importantes */
.card-tobile,
.feature-icon,
.btn-morph,
.glass-card {
    will-change: transform;
    transform: translateZ(0);
}

/* Amélioration du contraste pour l'accessibilité */
.btn-outline-light:focus,
.btn-light:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.5);
}

/* Indicateur de chargement pour les images */
.loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
