/**
 * ================================================================
 * MARKETFLOW PRO - STYLESHEET v4.0 
 * Design System Premium avec Animations Avancées
 * ================================================================
 */

/* ============================================================
   VARIABLES CSS - Palette Améliorée
   ============================================================ */
:root {
    /* Palette Primaire - Bleu vibrant */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    /* Palette Secondaire - Violet */
    --secondary-500: #8b5cf6;
    --secondary-600: #7c3aed;
    --secondary-700: #6d28d9;

    /* Accent - Cyan */
    --accent-400: #22d3ee;
    --accent-500: #06b6d4;
    --accent-600: #0891b2;

    /* Gris - Plus de nuances */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Couleurs Sémantiques */
    --success-light: #d1fae5;
    --success: #10b981;
    --success-dark: #059669;
    --error-light: #fee2e2;
    --error: #ef4444;
    --error-dark: #dc2626;
    --warning-light: #fef3c7;
    --warning: #f59e0b;
    --warning-dark: #d97706;
    --info: #3b82f6;

    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;

    /* Texte */
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --text-inverse: #ffffff;

    /* Espacements */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Ombres - Plus variées */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);

    /* Ombres colorées */
    --shadow-primary: 0 10px 25px -5px rgb(59 130 246 / 0.3);
    --shadow-secondary: 0 10px 25px -5px rgb(139 92 246 / 0.3);
    --shadow-accent: 0 10px 25px -5px rgb(6 182 212 / 0.3);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Gradients Modernes */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #8b5cf6 0%, #8b5cf6 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-sunset: linear-gradient(135deg, #8b5cf6 0%, #fee140 100%);
    --gradient-ocean: linear-gradient(135deg, #2e3192 0%, #1bffff 100%);
    --gradient-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-mesh: radial-gradient(at 40% 20%, #667eea 0px, transparent 100%),
        radial-gradient(at 40% 20%, rgba(102, 126, 234, 0.6), transparent 60%),
        radial-gradient(at 80% 0%, rgba(199, 21, 133, 0.6), transparent 60%),
        radial-gradient(at 0% 80%, rgba(123, 31, 162, 0.6), transparent 60%);
}

/* Mode Sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1f2937;
        --bg-secondary: #111827;
        --bg-tertiary: #0f172a;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-tertiary: #9ca3af;
    }
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection {
    background: var(--primary-200);
    color: var(--primary-900);
}

/* ============================================================
   TYPOGRAPHIE AMÉLIORÉE
   ============================================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: var(--space-4);
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
}

a:hover {
    color: var(--primary-700);
}

/* Effet underline animé */
a.link-animated {
    display: inline-block;
}

a.link-animated::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform var(--transition-base);
}

a.link-animated:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    background-size: 200% auto;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.container-lg {
    max-width: 1440px;
}

.container-sm {
    max-width: 960px;
}

/* Grid System Responsive */
.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
}

/* Animation d'entrée pour les grids */
.grid>* {
    animation: fadeInUp 0.6s ease-out backwards;
}

.grid>*:nth-child(1) {
    animation-delay: 0.1s;
}

.grid>*:nth-child(2) {
    animation-delay: 0.2s;
}

.grid>*:nth-child(3) {
    animation-delay: 0.3s;
}

.grid>*:nth-child(4) {
    animation-delay: 0.4s;
}

.grid>*:nth-child(5) {
    animation-delay: 0.5s;
}

.grid>*:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Flexbox */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-center {
    justify-content: center;
    align-items: center;
}

.flex-between {
    justify-content: space-between;
    align-items: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-2 {
    gap: var(--space-2);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.gap-8 {
    gap: var(--space-8);
}

/* ============================================================
   NAVIGATION - Glass Morphism
   ============================================================ */
nav {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    transition: all var(--transition-base);
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

nav .container {
    padding: var(--space-4);
}

nav a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    position: relative;
    display: inline-block;
}

nav a:hover {
    color: var(--primary-600);
    background: var(--primary-50);
    transform: translateY(-2px);
}

nav a.active {
    color: var(--primary-600);
    font-weight: 600;
}

/* Indicateur actif */
nav a.active::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--gradient-primary);
    border-radius: 50%;
}

/* ============================================================
   CARDS - Design Premium
   ============================================================ */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Gradient border animé */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-slow);
}

/* Glow effect */
.card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-slow);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-2xl), var(--shadow-primary);
    border-color: rgba(59, 130, 246, 0.2);
}

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

.card:hover::after {
    opacity: 1;
}

/* Card avec glassmorphism */
.card-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ============================================================
   PRODUCT CARDS - Premium avec Micro-interactions
   ============================================================ */
.product-card {
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-2xl), var(--shadow-primary);
    border-color: rgba(59, 130, 246, 0.2);
}

/* Container image avec animations */
.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Zoom et rotation subtile */
.product-card:hover .product-image-container img {
    transform: scale(1.15) rotate(2deg);
}

/* Overlay gradient dynamique */
.product-image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.7) 0%,
            transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-card:hover .product-image-container::after {
    opacity: 1;
}

/* Badge "New" ou "Sale" */
.product-badge {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-lg);
    z-index: 10;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Contenu produit */
.product-content {
    padding: var(--space-5);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.product-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-600);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-fast);
    margin: 0;
}

.product-card:hover .product-title {
    color: var(--primary-600);
}

.product-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: var(--space-4);
    border-top: 1px solid var(--gray-200);
}

.product-price {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.price-current {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-600);
    line-height: 1;
}

.price-old {
    font-size: 1rem;
    color: var(--text-tertiary);
    text-decoration: line-through;
}

/* Rating stars */
.product-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.star {
    color: #fbbf24;
}

/* Quick actions (apparaissent au hover) */
.product-actions {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-2);
    opacity: 0;
    transition: all var(--transition-base);
}

.product-card:hover .product-actions {
    bottom: calc(100% - 50px);
    opacity: 1;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.action-btn:hover {
    transform: scale(1.1);
    background: var(--primary-600);
    color: white;
}

/* ============================================================
   BOUTONS - Design System Complet
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Effet shine */
.btn::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;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    box-shadow: var(--shadow-xl), var(--shadow-primary);
    transform: translateY(-2px) scale(1.02);
    color: white;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.93) 0%, rgba(99, 102, 241, 0.93) 50%, rgba(139, 92, 246, 0.93) 100%);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    box-shadow: var(--shadow-xl), var(--shadow-secondary);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-600);
    color: var(--primary-600);
}

.btn-outline:hover {
    background: var(--primary-600);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--primary-600);
}

.btn-ghost:hover {
    background: var(--primary-50);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: var(--success-dark);
    box-shadow: 0 10px 25px -5px rgb(16 185 129 / 0.3);
}

/* Tailles */
.btn-xs {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-xl {
    padding: 1.25rem 2.5rem;
    font-size: 1.25rem;
}

/* Bouton avec icône */
.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

/* ============================================================
   HERO SECTION - Moderne avec Mesh Gradient
   ============================================================ */
.hero {
    background: var(----primary-300);
    position: relative;
    padding: var(--space-20) 0;
    text-align: center;
    overflow: hidden;
}

/* Mesh gradient background */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-mesh);
    opacity: 0.5;
    animation: meshMove 20s ease-in-out infinite;
    background-size: 200% 200%;
    background-position: 0% 0%;
}

@keyframes meshMove {

    0%,
    100% {
        background-position: 0% 0%;
    }

    25% {
        background-position: 100% 0%;
    }

    50% {
        background-position: 100% 100%;
    }

    75% {
        background-position: 0% 100%;
    }
}

/* Cercles flottants */
.hero::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.25) 0%, rgba(102, 126, 234, 0.05) 100%);
    border-radius: 50%;
    animation: float 25s ease-in-out infinite;
    filter: blur(80px);
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(20px, -20px) rotate(45deg);
    }

    66% {
        transform: translate(-10px, 10px) rotate(90deg);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    margin-bottom: var(--space-6);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.375rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto var(--space-8);
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* Stats section dans hero */
.hero-stats {
    display: flex;
    gap: var(--space-8);
    justify-content: center;
    margin-top: var(--space-12);
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ============================================================
   BADGES & LABELS
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
}

.badge-primary {
    background: var(--primary-100);
    color: var(--primary-700);
}

.badge-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.badge-success {
    background: var(--success-light);
    color: var(--success-dark);
}

.badge-error {
    background: var(--error-light);
    color: var(--error-dark);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning-dark);
}

.badge-gradient {
    background: var(--gradient-primary);
    color: white;
}

/* ============================================================
   SECTIONS
   ============================================================ */
section {
    padding: var(--space-16) 0;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-12);
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-100);
    color: var(--primary-700);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-4);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-4);
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

/* Scroll reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ============================================================
   UTILITAIRES
   ============================================================ */
/* Texte */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Marges */
.mt-4 {
    margin-top: var(--space-4);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mt-12 {
    margin-top: var(--space-12);
}

.mt-16 {
    margin-top: var(--space-16);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mb-12 {
    margin-bottom: var(--space-12);
}

.mb-16 {
    margin-bottom: var(--space-16);
}

/* Padding */
.p-4 {
    padding: var(--space-4);
}

.p-6 {
    padding: var(--space-6);
}

.p-8 {
    padding: var(--space-8);
}

/* Largeurs */
.w-full {
    width: 100%;
}

.max-w-screen {
    max-width: 100vw;
}

/* Display */
.hidden {
    display: none;
}

.block {
    display: block;
}

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

/* Position */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

/* Z-index */
.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.z-50 {
    z-index: 50;
}

/* Opacité */
.opacity-0 {
    opacity: 0;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-100 {
    opacity: 1;
}

/* Curseur */
.cursor-pointer {
    cursor: pointer;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    :root {
        --space-16: 3rem;
        --space-20: 4rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .hero-cta {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 var(--space-3);
    }

    section {
        padding: var(--space-12) 0;
    }
}

/* ============================================================
   DARK MODE SUPPORT
   ============================================================ */
@media (prefers-color-scheme: dark) {
    .card {
        background: var(--bg-primary);
        border-color: rgba(255, 255, 255, 0.1);
    }

    nav {
        background: rgba(31, 41, 55, 0.7);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
}

/* ============================================================
   PERFORMANCE & ACCESSIBILITY
   ============================================================ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible pour accessibilité */
*:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Amélioration du contraste pour accessibilité */
@media (prefers-contrast: high) {
    :root {
        --text-secondary: var(--gray-800);
        --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.2);
    }
}