/* ================================================================
   ANRDI COPYRIGHT (c) 2026 — ALL RIGHTS RESERVED - AUTHOR: LYAM
================================================================ */

/* ── FONDAUX TYPOGRAPHIQUES (Apple + Stripe + Linear) ─────────────────── */
:root {
    /* Font Stack Premium */
    --font-display: "SF Pro Display", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "SF Mono", "JetBrains Mono", "Fira Code", monospace;

    /* Type Scale (Apple/Stripe inspired) */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg: 1.125rem;    /* 18px */
    --text-xl: 1.25rem;     /* 20px */
    --text-2xl: 1.5rem;     /* 24px */
    --text-3xl: 1.875rem;   /* 30px */
    --text-4xl: 2.25rem;    /* 36px */
    --text-5xl: 3rem;       /* 48px */
    --text-6xl: 3.75rem;    /* 60px */

    /* Line Heights (Apple readability) */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    /* Letter Spacing (Linear precision) */
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;
}

/* ── PALETTE DE COULEURS PREMIUM (Stripe + Apple + Nike) ───────────────── */
:root {
    /* Primary Blue (Institutional + Trust) */
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-300: #93c5fd;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --blue-900: #1e3a8a;
    --blue-950: #172554;

    /* Navy (Authority + Depth) */
    --navy-50: #f0f4ff;
    --navy-100: #e0e7ff;
    --navy-200: #c7d2fe;
    --navy-300: #a5b4fc;
    --navy-400: #818cf8;
    --navy-500: #6366f1;
    --navy-600: #4f46e5;
    --navy-700: #4338ca;
    --navy-800: #3730a3;
    --navy-900: #312e81;
    --navy-950: #1e1b4b;

    /* Gray Scale (Apple/Stripe neutral palette) */
    --gray-50: #fafafa;
    --gray-100: #f4f4f5;
    --gray-200: #e4e4e7;
    --gray-300: #d4d4d8;
    --gray-400: #a1a1aa;
    --gray-500: #71717a;
    --gray-600: #52525b;
    --gray-700: #3f3f46;
    --gray-800: #27272a;
    --gray-900: #18181b;
    --gray-950: #09090b;

    /* Semantic Colors (Stripe clarity) */
    --success-50: #f0fdf4;
    --success-100: #dcfce7;
    --success-500: #22c55e;
    --success-600: #16a34a;
    --success-700: #15803d;

    --warning-50: #fffbeb;
    --warning-100: #fef3c7;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --warning-700: #b45309;

    --error-50: #fef2f2;
    --error-100: #fee2e2;
    --error-500: #ef4444;
    --error-600: #dc2626;
    --error-700: #b91c1c;

    --info-50: #f0f9ff;
    --info-100: #e0f2fe;
    --info-500: #0ea5e9;
    --info-600: #0284c7;
    --info-700: #0369a1;

    /* Brand Colors (Nike bold + Apple elegance) */
    --brand-primary: var(--blue-600);
    --brand-secondary: var(--navy-700);
    --brand-accent: var(--blue-400);
    --brand-dark: var(--navy-950);
    --brand-light: var(--blue-50);

    /* Surface Colors (Apple depth) */
    --surface-primary: #ffffff;
    --surface-secondary: var(--gray-50);
    --surface-tertiary: var(--gray-100);
    --surface-elevated: #ffffff;
    --surface-overlay: rgba(0, 0, 0, 0.4);
}

/* ── ESPACEMENTS (Apple generous spacing + 8px grid) ───────────────────── */
:root {
    --space-0: 0;
    --space-px: 1px;
    --space-0_5: 0.125rem;  /* 2px */
    --space-1: 0.25rem;     /* 4px */
    --space-1_5: 0.375rem;  /* 6px */
    --space-2: 0.5rem;      /* 8px */
    --space-2_5: 0.625rem;  /* 10px */
    --space-3: 0.75rem;     /* 12px */
    --space-3_5: 0.875rem;  /* 14px */
    --space-4: 1rem;        /* 16px */
    --space-5: 1.25rem;     /* 20px */
    --space-6: 1.5rem;      /* 24px */
    --space-7: 1.75rem;     /* 28px */
    --space-8: 2rem;        /* 32px */
    --space-9: 2.25rem;     /* 36px */
    --space-10: 2.5rem;     /* 40px */
    --space-11: 2.75rem;    /* 44px */
    --space-12: 3rem;       /* 48px */
    --space-14: 3.5rem;     /* 56px */
    --space-16: 4rem;       /* 64px */
    --space-20: 5rem;       /* 80px */
    --space-24: 6rem;       /* 96px */
    --space-28: 7rem;       /* 112px */
    --space-32: 8rem;       /* 128px */
    --space-36: 9rem;       /* 144px */
    --space-40: 10rem;      /* 160px */
    --space-44: 11rem;      /* 176px */
    --space-48: 12rem;      /* 192px */
    --space-52: 13rem;      /* 208px */
    --space-56: 14rem;      /* 224px */
    --space-60: 15rem;      /* 240px */
    --space-64: 16rem;      /* 256px */
    --space-72: 18rem;      /* 288px */
    --space-80: 20rem;      /* 320px */
    --space-96: 24rem;      /* 384px */
}

/* ── BORDER RADIUS (Apple subtle + Linear modern) ──────────────────────── */
:root {
    --radius-none: 0;
    --radius-sm: 0.25rem;    /* 4px */
    --radius-base: 0.375rem; /* 6px */
    --radius-md: 0.5rem;     /* 8px */
    --radius-lg: 0.75rem;    /* 12px */
    --radius-xl: 1rem;       /* 16px */
    --radius-2xl: 1.5rem;    /* 24px */
    --radius-3xl: 2rem;      /* 32px */
    --radius-full: 9999px;
}

/* ── SHADOWS (Apple depth + Stripe elevation) ──────────────────────────── */
:root {
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-2xl: 0 35px 60px -15px rgba(0, 0, 0, 0.3);

    /* Colored shadows (Nike bold) */
    --shadow-blue: 0 10px 40px -10px rgba(37, 99, 235, 0.3);
    --shadow-navy: 0 10px 40px -10px rgba(30, 58, 138, 0.3);
    --shadow-success: 0 10px 40px -10px rgba(34, 197, 94, 0.3);
    --shadow-error: 0 10px 40px -10px rgba(239, 68, 68, 0.3);

    /* Inner shadows (Apple depth) */
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

    /* Focus ring (Stripe accessibility) */
    --shadow-focus: 0 0 0 3px rgba(37, 99, 235, 0.4);
    --shadow-focus-error: 0 0 0 3px rgba(239, 68, 68, 0.4);
}

/* ── TRANSITIONS (Linear fluid animations) ───────────────────────────────── */
:root {
    --duration-instant: 50ms;
    --duration-fast: 150ms;
    --duration-base: 250ms;
    --duration-slow: 400ms;
    --duration-slower: 600ms;
    --duration-slowest: 800ms;

    --ease-linear: linear;
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);

    /* Linear signature smooth */
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth-in: cubic-bezier(0.32, 0, 0.67, 0);
    --ease-smooth-out: cubic-bezier(0.33, 1, 0.68, 1);
}

/* ── Z-INDEX SCALE (Figma layer system) ─────────────────────────────────── */
:root {
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ── LAYOUT (Service Public clarity + Airbnb grid) ─────────────────────── */
:root {
    --container-xs: 20rem;    /* 320px */
    --container-sm: 24rem;    /* 384px */
    --container-md: 28rem;    /* 448px */
    --container-lg: 32rem;    /* 512px */
    --container-xl: 36rem;    /* 576px */
    --container-2xl: 42rem;   /* 672px */
    --container-3xl: 48rem;   /* 768px */
    --container-4xl: 56rem;   /* 896px */
    --container-5xl: 64rem;   /* 1024px */
    --container-6xl: 72rem;   /* 1152px */
    --container-7xl: 80rem;   /* 1280px */
    --container-full: 100%;

    --header-height: 80px;
    --header-height-scrolled: 68px;
    --sidebar-width: 280px;
}

/* ── GRADIENTS (Nike bold + Apple subtle) ───────────────────────────────── */
:root {
    --gradient-primary: linear-gradient(135deg, var(--blue-600) 0%, var(--navy-700) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--navy-600) 0%, var(--blue-800) 100%);
    --gradient-accent: linear-gradient(135deg, var(--blue-400) 0%, var(--blue-600) 100%);
    --gradient-dark: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-950) 100%);
    --gradient-light: linear-gradient(135deg, var(--blue-50) 0%, var(--blue-100) 100%);
    --gradient-radial: radial-gradient(ellipse at center, var(--blue-500) 0%, var(--navy-700) 100%);
    --gradient-mesh: 
        radial-gradient(at 40% 20%, rgba(37, 99, 235, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(30, 58, 138, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(37, 99, 235, 0.08) 0px, transparent 50%),
        radial-gradient(at 80% 50%, rgba(30, 58, 138, 0.06) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(37, 99, 235, 0.1) 0px, transparent 50%);
}

/* ── BACKDROP BLUR (Apple glassmorphism) ───────────────────────────────── */
:root {
    --backdrop-blur-xs: blur(2px);
    --backdrop-blur-sm: blur(4px);
    --backdrop-blur-base: blur(8px);
    --backdrop-blur-md: blur(12px);
    --backdrop-blur-lg: blur(16px);
    --backdrop-blur-xl: blur(24px);
    --backdrop-blur-2xl: blur(40px);
    --backdrop-blur-3xl: blur(64px);
}

/* ── BREAKPOINTS (Notion responsive) ───────────────────────────────────── */
:root {
    --breakpoint-xs: 480px;
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES (Tailwind-inspired for rapid development)
══════════════════════════════════════════════════════════════════════════ */

/* Container */
.container {
    width: 100%;
    max-width: var(--container-7xl);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-6);
    padding-right: var(--space-6);
}

@media (max-width: 768px) {
    .container {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }
}

/* Typography utilities */
.text-display {
    font-family: var(--font-display);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-tight);
}

.text-body {
    font-family: var(--font-body);
    font-weight: var(--font-normal);
    line-height: var(--leading-relaxed);
}

.text-mono {
    font-family: var(--font-mono);
}

/* Gradient text (Nike bold) */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Glass effect (Apple) */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: var(--backdrop-blur-lg);
    -webkit-backdrop-filter: var(--backdrop-blur-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: var(--backdrop-blur-lg);
    -webkit-backdrop-filter: var(--backdrop-blur-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* Focus visible (Stripe accessibility) */
*:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* Selection (Apple style) */
::selection {
    background-color: var(--blue-200);
    color: var(--navy-900);
}

::-moz-selection {
    background-color: var(--blue-200);
    color: var(--navy-900);
}

/* Scrollbar (Linear clean) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS (Linear fluid + Apple subtle)
══════════════════════════════════════════════════════════════════════════ */

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

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

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(-5%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Animation utilities */
.animate-fade-in {
    animation: fadeIn var(--duration-base) var(--ease-out);
}

.animate-fade-in-up {
    animation: fadeInUp var(--duration-base) var(--ease-smooth);
}

.animate-fade-in-down {
    animation: fadeInDown var(--duration-base) var(--ease-smooth);
}

.animate-scale-in {
    animation: scaleIn var(--duration-base) var(--ease-smooth);
}

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

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