/**
 * LeBonCoworking - Base CSS (Design Tokens & Foundations)
 *
 * @version 1.0.0
 *
 * Contenu :
 * 1. @font-face
 * 2. Variables CSS (Design Tokens)
 * 3. Reset & Base
 * 4. Typography
 * 5. Utilities
 * 6. Animations
 * 7. Responsive Typography
 * 8. Print
 */

/* ==========================================================================
   1. @font-face
   ========================================================================== */

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   2. Variables CSS (Design Tokens)
   ========================================================================== */

:root {
    /* Couleurs principales */
    --lbcw-primary: #1a5ba8;
    --lbcw-primary-dark: #144a8a;
    --lbcw-primary-light: #2d7bd8;
    --lbcw-primary-rgb: 26, 91, 168;

    --lbcw-accent: #f58220;
    --lbcw-accent-dark: #d96f10;
    --lbcw-accent-light: #ff9a40;
    --lbcw-accent-rgb: 245, 130, 32;

    /* Couleurs neutres */
    --lbcw-white: #ffffff;
    --lbcw-gray-50: #f9fafb;
    --lbcw-gray-100: #f3f4f6;
    --lbcw-gray-200: #e5e7eb;
    --lbcw-gray-300: #d1d5db;
    --lbcw-gray-400: #9ca3af;
    --lbcw-gray-500: #6b7280;
    --lbcw-gray-600: #4b5563;
    --lbcw-gray-700: #374151;
    --lbcw-gray-800: #1f2937;
    --lbcw-gray-900: #111827;
    --lbcw-black: #0a0a0a;

    /* Couleurs semantiques */
    --lbcw-success: #10b981;
    --lbcw-success-light: #d1fae5;
    --lbcw-warning: #f59e0b;
    --lbcw-warning-light: #fef3c7;
    --lbcw-error: #ef4444;
    --lbcw-error-light: #fee2e2;
    --lbcw-info: #3b82f6;
    --lbcw-info-light: #dbeafe;

    /* Typographie */
    --lbcw-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --lbcw-font-size-xs: 0.75rem;    /* 12px */
    --lbcw-font-size-sm: 0.875rem;   /* 14px */
    --lbcw-font-size-base: 1rem;     /* 16px */
    --lbcw-font-size-lg: 1.125rem;   /* 18px */
    --lbcw-font-size-xl: 1.25rem;    /* 20px */
    --lbcw-font-size-2xl: 1.5rem;    /* 24px */
    --lbcw-font-size-3xl: 1.875rem;  /* 30px */
    --lbcw-font-size-4xl: 2.25rem;   /* 36px */
    --lbcw-font-size-5xl: 3rem;      /* 48px */

    --lbcw-font-weight-normal: 400;
    --lbcw-font-weight-medium: 500;
    --lbcw-font-weight-semibold: 600;
    --lbcw-font-weight-bold: 700;

    --lbcw-line-height-tight: 1.25;
    --lbcw-line-height-normal: 1.5;
    --lbcw-line-height-relaxed: 1.75;

    /* Espacements */
    --lbcw-space-1: 0.25rem;   /* 4px */
    --lbcw-space-2: 0.5rem;    /* 8px */
    --lbcw-space-3: 0.75rem;   /* 12px */
    --lbcw-space-4: 1rem;      /* 16px */
    --lbcw-space-5: 1.25rem;   /* 20px */
    --lbcw-space-6: 1.5rem;    /* 24px */
    --lbcw-space-8: 2rem;      /* 32px */
    --lbcw-space-10: 2.5rem;   /* 40px */
    --lbcw-space-12: 3rem;     /* 48px */
    --lbcw-space-16: 4rem;     /* 64px */
    --lbcw-space-20: 5rem;     /* 80px */
    --lbcw-space-24: 6rem;     /* 96px */

    /* Bordures */
    --lbcw-radius-sm: 0.25rem;   /* 4px */
    --lbcw-radius-md: 0.5rem;    /* 8px */
    --lbcw-radius-lg: 0.75rem;   /* 12px */
    --lbcw-radius-xl: 1rem;      /* 16px */
    --lbcw-radius-2xl: 1.5rem;   /* 24px */
    --lbcw-radius-full: 9999px;

    /* Ombres */
    --lbcw-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --lbcw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --lbcw-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --lbcw-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --lbcw-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Transitions */
    --lbcw-transition-fast: 150ms ease;
    --lbcw-transition-base: 200ms ease;
    --lbcw-transition-slow: 300ms ease;

    /* Z-index */
    --lbcw-z-dropdown: 100;
    --lbcw-z-sticky: 200;
    --lbcw-z-fixed: 300;
    --lbcw-z-modal-backdrop: 400;
    --lbcw-z-modal: 500;
    --lbcw-z-tooltip: 600;

    /* Containers */
    --lbcw-container-sm: 640px;
    --lbcw-container-md: 768px;
    --lbcw-container-lg: 1024px;
    --lbcw-container-xl: 1280px;
    --lbcw-container-2xl: 1400px;
}

/* ==========================================================================
   3. Reset & Base
   ========================================================================== */

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

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

body {
    font-family: var(--lbcw-font-family);
    font-size: var(--lbcw-font-size-base);
    line-height: var(--lbcw-line-height-normal);
    color: var(--lbcw-gray-800);
    background-color: var(--lbcw-white);
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--lbcw-primary);
    text-decoration: none;
    transition: color var(--lbcw-transition-fast);
}

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

/* ==========================================================================
   4. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--lbcw-font-weight-bold);
    line-height: var(--lbcw-line-height-tight);
    color: var(--lbcw-gray-900);
    margin-top: 0;
}

h1 { font-size: var(--lbcw-font-size-4xl); }
h2 { font-size: var(--lbcw-font-size-3xl); }
h3 { font-size: var(--lbcw-font-size-2xl); }
h4 { font-size: var(--lbcw-font-size-xl); }
h5 { font-size: var(--lbcw-font-size-lg); }
h6 { font-size: var(--lbcw-font-size-base); }

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

.lbcw-text-gradient {
    background: linear-gradient(135deg, var(--lbcw-primary), var(--lbcw-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   5. Utilities
   ========================================================================== */

.lbcw-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.lbcw-text-center { text-align: center; }
.lbcw-text-left { text-align: left; }
.lbcw-text-right { text-align: right; }

.lbcw-mt-0 { margin-top: 0; }
.lbcw-mb-0 { margin-bottom: 0; }
.lbcw-mt-4 { margin-top: var(--lbcw-space-4); }
.lbcw-mb-4 { margin-bottom: var(--lbcw-space-4); }
.lbcw-mt-8 { margin-top: var(--lbcw-space-8); }
.lbcw-mb-8 { margin-bottom: var(--lbcw-space-8); }

.lbcw-hidden { display: none !important; }
.lbcw-visible { display: block !important; }

/* ==========================================================================
   6. Animations
   ========================================================================== */

@keyframes lbcw-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.lbcw-animate-fade-in {
    animation: lbcw-fade-in 0.3s ease;
}

.lbcw-animate-slide-up {
    animation: lbcw-slide-up 0.4s ease;
}

.lbcw-animate-pulse {
    animation: lbcw-pulse 2s infinite;
}

/* Intersection Observer animations */
.lbcw-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.lbcw-reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   7. Responsive Typography
   ========================================================================== */

@media (max-width: 1024px) {
    :root {
        --lbcw-font-size-4xl: 2rem;
        --lbcw-font-size-5xl: 2.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --lbcw-font-size-3xl: 1.5rem;
        --lbcw-font-size-4xl: 1.75rem;
        --lbcw-font-size-5xl: 2rem;
    }
}

/* ==========================================================================
   8. Print
   ========================================================================== */

@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }

    img {
        page-break-inside: avoid;
    }

    h2, h3 {
        page-break-after: avoid;
    }

    p {
        orphans: 3;
        widows: 3;
    }
}
