/* ============================================
   DETECTME FRONT - MODERN DESIGN SYSTEM
   Basé sur le design de l'app mobile
   ============================================ */

/* ============================================
   1. CSS RESET & BASE
   ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* ============================================
   2. DESIGN TOKENS (CSS Variables)
   ============================================ */

:root {
    /* === Colors === */
    --color-bg-primary: #0a0a0f;
    --color-bg-secondary: #13131a;
    --color-bg-tertiary: #1a1a24;

    --color-surface-1: rgba(255, 255, 255, 0.03);
    --color-surface-2: rgba(255, 255, 255, 0.05);
    --color-surface-3: rgba(255, 255, 255, 0.08);

    --color-border-subtle: rgba(255, 255, 255, 0.06);
    --color-border-medium: rgba(255, 255, 255, 0.1);
    --color-border-strong: rgba(255, 255, 255, 0.15);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
    --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    --gradient-hero: linear-gradient(135deg, rgba(244, 63, 94, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);

    /* Brand Colors */
    --color-primary: #f43f5e;
    --color-primary-light: #fb7185;
    --color-primary-dark: #e11d48;

    --color-secondary: #3b82f6;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;

    /* Text Colors */
    --color-text-primary: #ffffff;
    --color-text-secondary: rgba(255, 255, 255, 0.8);
    --color-text-tertiary: rgba(255, 255, 255, 0.5);
    --color-text-muted: rgba(255, 255, 255, 0.3);

    /* === Spacing === */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 40px;
    --space-9: 48px;
    --space-10: 64px;

    /* === Typography === */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;

    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* === Border Radius === */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* === Shadows === */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 24px rgba(244, 63, 94, 0.4);
    --shadow-glow-lg: 0 0 40px rgba(244, 63, 94, 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.34, 1.56, 0.64, 1);

    /* === Z-Index === */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
}

/* ============================================
   3. BASE STYLES
   ============================================ */

body {
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    min-height: 100vh;
}

/* Background avec gradients subtils */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at top, rgba(244, 63, 94, 0.08), transparent 50%),
        radial-gradient(ellipse at bottom, rgba(59, 130, 246, 0.08), transparent 50%),
        var(--color-bg-primary);
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   4. COMPONENTS
   ============================================ */

/* Cards */
.modern-card {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    backdrop-filter: blur(10px);
    transition: all var(--transition-base);
}

.modern-card:hover {
    background: var(--color-surface-3);
    border-color: var(--color-border-medium);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn-primary {
    background: var(--gradient-primary);
    color: var(--color-text-primary);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-semibold);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--color-surface-2);
    color: var(--color-text-primary);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-semibold);
    border: 1px solid var(--color-border-medium);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.btn-secondary:hover {
    background: var(--color-surface-3);
    border-color: var(--color-border-strong);
}

/* Sections */
.section {
    padding: var(--space-10) 0;
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
    line-height: var(--line-height-tight);
}

.section-subtitle {
    font-size: var(--font-size-xl);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
    max-width: 800px;
}

/* Hero Section */
.hero-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: var(--space-10) 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(244, 63, 94, 0.15), transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(59, 130, 246, 0.15), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

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

.hero-title {
    font-size: clamp(var(--font-size-4xl), 5vw, var(--font-size-6xl));
    font-weight: var(--font-weight-extrabold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-6);
    line-height: var(--line-height-tight);
    background: linear-gradient(135deg, #ffffff 0%, #f43f5e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
    max-width: 700px;
    line-height: var(--line-height-relaxed);
}

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

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

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

.modern-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

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

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-6);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-8);
    }
}

/* ============================================
   5. UTILITIES
   ============================================ */

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: var(--color-surface-2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border-subtle);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

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

/* ============================================
   6. RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .section {
        padding: var(--space-8) 0;
    }
    
    .section-title {
        font-size: var(--font-size-3xl);
    }
    
    .hero-section {
        min-height: 80vh;
        padding: var(--space-8) 0;
    }
}


