/*
Theme Name: Tothem
Description: Thème créé à partir de mon front-end personnalisé
Author: Tom Testu
Version: 1.0.0
License: GPL v2 or later
Text Domain: tothem
*/

/* 
=== RESET ET BASE ===
*/

/* Configuration Tailwind CSS */
/* Note: Tailwind CDN est chargé dans index.html */

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

/* Keyframes pour animations sophistiquées */

@import url('assets/css/animations.css');


@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(60px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    0% {
        opacity: 0;
        transform: translateX(-60px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    0% {
        opacity: 0;
        transform: translateX(60px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromTop {
    0% {
        opacity: 0;
        transform: translateY(-100px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotateIn {
    0% {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes wiggle {
    0%, 7%, 14%, 21%, 28%, 35%, 42%, 49%, 56%, 63%, 70%, 77%, 84%, 91%, 98%, 100% {
        transform: translateX(0px);
    }
    4% {
        transform: translateX(-5px);
    }
    11% {
        transform: translateX(5px);
    }
    18% {
        transform: translateX(-5px);
    }
    25% {
        transform: translateX(5px);
    }
}

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

@keyframes heartbeat {
    0%, 50%, 100% {
        transform: scale(1);
    }
    25%, 75% {
        transform: scale(1.1);
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Classes d'animation pour intersection observer */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

.animate-fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-left {
    animation: fadeInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-right {
    animation: fadeInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-top {
    animation: slideInFromTop 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-rotate-in {
    animation: rotateIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Animations de délai pour effet stagger */
.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }
.animate-delay-600 { animation-delay: 0.6s; }

/* Animations continues */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-wiggle {
    animation: wiggle 1s ease-in-out;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.animate-heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* ===== ANIMATIONS DE CARTES PROFESSIONNELLES ===== */

.card-3d {
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    perspective: 1000px;
}

.card-3d:hover {
    transform: rotateY(5deg) rotateX(5deg) translateZ(50px);
    box-shadow: 
        0 40px 80px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.card-hover-lift {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center;
}

.card-hover-lift:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(37, 99, 235, 0.1);
}

.card-morphing {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.card-morphing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.card-morphing:hover::before {
    transform: translateX(100%);
}

.card-morphing:hover {
    border-radius: 20px;
    transform: scale(1.05);
}

/* ===== ANIMATIONS DE NAVIGATION ===== */

.nav-item {
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: linear-gradient(90deg, #2563EB, #10B981);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateX(-50%);
}

.nav-item:hover::after {
    width: 100%;
}

.nav-item:hover {
    transform: translateY(-2px);
}

/* ===== ANIMATIONS DE BOUTONS ===== */

.btn-magnetic {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.btn-magnetic::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

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

.btn-magnetic:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-ripple {
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
}

.btn-ripple::after {
    content: '';
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 1s;
}

.btn-ripple:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* ===== ANIMATIONS DE TEXTE ===== */

.text-gradient-animate {
    background: linear-gradient(-45deg, #2563EB, #10B981, #F59E0B, #EF4444);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.typewriter-effect {
    overflow: hidden;
    border-right: 2px solid #2563EB;
    white-space: nowrap;
    animation: typewriter 3s steps(40) 1s forwards, blink 1s infinite step-end;
}

/* ===== PARALLAX ET SCROLL EFFECTS ===== */

.parallax-element {
    transform: translateZ(0);
    transition: transform 0.1s ease-out;
}

.sticky-reveal {
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2563EB;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 2s linear infinite;
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

/* ===== EFFETS DE PARTICULES ===== */

.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(37, 99, 235, 0.5);
    border-radius: 50%;
    animation: particleFloat 8s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Couleurs personnalisées configurées dans Tailwind config */
.hero-bg {
    background: linear-gradient(rgba(37, 99, 235, 0.8), rgba(37, 99, 235, 0.8)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><rect fill="%23f8fafc" width="1200" height="800"/><rect fill="%23e2e8f0" x="100" y="150" width="300" height="200" rx="10"/><rect fill="%23cbd5e1" x="120" y="170" width="260" height="20" rx="4"/><rect fill="%23cbd5e1" x="120" y="200" width="200" height="15" rx="3"/><rect fill="%232563eb" x="120" y="225" width="80" height="30" rx="6"/><circle fill="%2310b981" cx="500" cy="250" r="50"/><rect fill="%23f59e0b" x="600" y="200" width="150" height="100" rx="8"/></svg>');
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-hover {
    transition: all 0.3s ease;
}

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

.whatsapp-float {
    position: fixed;
    bottom: 15px;
    right: 15px;
    z-index: 1000;
    animation: pulse 2s infinite;
}

@media (min-width: 375px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.05); 
    }
}

.timeline-line {
    background: linear-gradient(to right, #2563EB, #10B981, #F59E0B, #EF4444);
}

.process-bg {
    background: linear-gradient(135deg, #2563EB 0%, #1E40AF 100%);
}

/* Responsive utilities */
@media (max-width: 374px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* Ensure proper text wrapping on small screens */
@media (max-width: 640px) {
    h1, h2, h3 {
        word-wrap: break-word;
        hyphens: auto;
    }
}

/* Improve touch targets on mobile */
@media (max-width: 768px) {
    button, a {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ===== OPTIMISATION MOBILE COMPLÈTE ===== */

/* Neutraliser les conflits Tailwind pour le menu mobile */
@media (max-width: 1024px) {
    /* Réinitialiser complètement les styles space-y de Tailwind */
    #mobileMenu .space-y-4 > * {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    
    #mobileMenu .space-y-3 > * {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
}

/* Header mobile - Forcer la visibilité */
@media (max-width: 1024px) {
    /* Assurer que le body compense le header fixe */
    body {
        padding-top: 0 !important;
    }
    
    header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        background: white !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
        border-bottom: 1px solid #e5e7eb;
        width: 100% !important;
        height: auto !important;
        min-height: 60px !important;
    }
    
    /* Assurer que le logo et burger sont visibles */
    header .container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0.75rem 1rem !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        height: auto !important;
        min-height: 60px !important;
        box-sizing: border-box !important;
    }
    
    /* Logo visible */
    header .font-inter {
        display: block !important;
        font-size: 1.25rem !important;
        font-weight: 700 !important;
        color: #2563eb !important;
    }
    
    /* Style du burger menu */
    header button {
        display: block !important;
        background: none !important;
        border: none !important;
        font-size: 1.25rem !important;
        color: #374151 !important;
        padding: 0.5rem !important;
        z-index: 10000 !important;
        cursor: pointer !important;
    }
    
    /* Masquer nav desktop */
    header nav {
        display: none !important;
    }
    
    /* Masquer boutons desktop */
    header .hidden.md\\:flex {
        display: none !important;
    }
    
    /* Menu mobile styling - Version corrigée */
    #mobileMenu {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        border-top: 1px solid #e5e7eb !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
        z-index: 9998 !important;
        width: 100% !important;
    }
    
    /* Container du menu mobile - respecter la structure existante */
    #mobileMenu .container {
        padding: 1rem !important;
        margin: 0 auto !important;
        max-width: 100% !important;
    }
    
    /* Réinitialiser les styles space-y qui causent des problèmes */
    #mobileMenu .space-y-4 {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }
    
    /* Liens du menu mobile - style propre */
    #mobileMenu .space-y-4 > a {
        display: block !important;
        padding: 1rem 0 !important;
        color: #374151 !important;
        text-decoration: none !important;
        border-bottom: 1px solid #f3f4f6 !important;
        font-weight: 500 !important;
        font-size: 1rem !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        background: transparent !important;
    }
    
    #mobileMenu .space-y-4 > a:hover {
        background: #f9fafb !important;
        color: #2563eb !important;
        padding-left: 0.5rem !important;
        transition: all 0.2s ease !important;
    }
    
    /* Section des boutons dans le menu mobile */
    #mobileMenu .pt-4 {
        padding-top: 1.5rem !important;
        border-top: 2px solid #e5e7eb !important;
        margin-top: 1rem !important;
    }
    
    /* Réinitialiser space-y-3 */
    #mobileMenu .space-y-3 {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    /* Bouton téléphone dans menu mobile */
    #mobileMenu .flex.items-center {
        padding: 0.75rem 0 !important;
        justify-content: flex-start !important;
        margin: 0 !important;
    }
    
    /* Bouton devis dans menu mobile */
    #mobileMenu .space-y-3 button {
        width: 100% !important;
        padding: 1rem !important;
        margin: 0 !important;
        font-size: 1rem !important;
        border-radius: 0.5rem !important;
        font-weight: 600 !important;
    }
    
    /* Hero avec padding pour header */
    .hero-bg {
        padding-top: 80px !important;
    }
}

@media (max-width: 768px) {
    /* Désactiver les animations lourdes sur mobile */
    .parallax-element {
        transform: none !important;
        background-attachment: scroll !important;
    }
    
    .particles-container {
        display: none !important;
    }
    
    /* Simplifier les animations 3D sur mobile */
    .card-3d,
    .card-hover {
        transform: none !important;
        transition: box-shadow 0.3s ease, transform 0.2s ease !important;
    }
    
    .card-3d:hover {
        transform: translateY(-5px) scale(1.02) !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    }
    
    .card-hover-lift:hover {
        transform: translateY(-5px) scale(1.01) !important;
    }
    
    /* Réduire les animations coûteuses */
    .animate-bounce,
    .animate-spin,
    .animate-pulse {
        animation: none !important;
    }
    
    /* Simplifier les boutons magnétiques */
    .btn-magnetic {
        transform: none !important;
    }
    
    .btn-magnetic:hover {
        transform: translateY(-2px) scale(1.02) !important;
    }
    
    /* Hero section mobile optimisé */
    .hero-bg {
        min-height: 100vh;
        padding-top: 80px;
        background-attachment: scroll !important;
        background-position: center center;
        background-size: cover;
    }
    
    /* Badge Google avis optimisé mobile */
    .hero-bg .bg-white.bg-opacity-20 {
        max-width: 280px !important;
        margin: 0 auto !important;
        padding: 0.75rem 1rem !important;
        text-align: center !important;
    }
    
    /* Garder les étoiles en horizontal sur mobile */
    .hero-bg .bg-white.bg-opacity-20 .flex {
        flex-direction: column !important;
        gap: 0.5rem !important;
        align-items: center !important;
    }
    
    /* Forcer les étoiles à rester horizontales */
    .hero-bg .bg-white.bg-opacity-20 .text-yellow-400 {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.25rem !important;
        justify-content: center !important;
        margin-bottom: 0.25rem !important;
    }
    
    /* Texte plus lisible sur mobile */
    .hero-bg h1 {
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
        font-size: clamp(1.5rem, 5vw, 2.5rem) !important;
    }
    
    .hero-bg p {
        line-height: 1.4 !important;
        margin-bottom: 1.5rem !important;
        font-size: clamp(0.9rem, 3vw, 1.1rem) !important;
    }
    
    /* Navigation mobile améliorée */
    #mobileMenu {
        backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, 0.95);
        border-radius: 0 0 15px 15px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    /* Améliorer la performance */
    * {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    /* Réduire les délais d'animation sur mobile */
    .animate-on-scroll[data-animate="bounce-in"],
    .animate-on-scroll[data-animate="scale-in"] {
        animation-duration: 0.4s !important;
        animation-delay: 0s !important;
    }
    
    .animate-on-scroll {
        transform: translateY(20px);
        animation-duration: 0.5s !important;
    }
    
    /* Touch targets appropriés */
    button, a {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
}

/* Optimisations pour très petits écrans */
@media (max-width: 480px) {
    /* Réduire encore plus les animations */
    .animate-on-scroll {
        animation-duration: 0.3s !important;
        animation-delay: 0s !important;
        transform: translateY(15px);
    }
    
    /* Hero ultra simplifié */
    .hero-bg {
        padding: 100px 0 50px 0;
        text-align: center;
    }
    
    .hero-bg h1 {
        font-size: clamp(1.3rem, 6vw, 2rem) !important;
        line-height: 1.1 !important;
    }
    
    .hero-bg p {
        font-size: clamp(0.85rem, 3.5vw, 1rem) !important;
    }
    
    /* Espacements optimisés */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Boutons touch-friendly */
    button,
    .btn-magnetic {
        min-height: 48px !important;
        padding: 14px 24px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
    }
    
    /* Cartes plus compactes */
    .card-hover,
    .card-3d {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Texte plus lisible */
    h2 {
        font-size: clamp(1.2rem, 4vw, 1.8rem) !important;
    }
    
    h3 {
        font-size: clamp(1rem, 3.5vw, 1.4rem) !important;
    }
    
    /* Partenaires de confiance optimisés */
    .grid-cols-2 > div {
        min-height: 80px;
        padding: 0.75rem !important;
    }
    
    .grid-cols-2 > div p {
        font-size: 0.75rem !important;
        line-height: 1.2;
    }
    
    .grid-cols-2 > div .w-8 {
        width: 1.5rem !important;
        height: 1.5rem !important;
    }
    
    .grid-cols-2 > div i {
        font-size: 0.75rem !important;
    }
}

/* Respect des préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}