/* ============================================
   Code en ligne - Base Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--crt-font);
    font-size: var(--crt-text-base);
    line-height: 1.6;
    color: var(--crt-gray-800);
    background-color: var(--crt-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.crt-theme {
    padding-top: var(--crt-header-height);
}

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

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

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--crt-gray-900);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--crt-text-5xl); }
h2 { font-size: var(--crt-text-4xl); }
h3 { font-size: var(--crt-text-2xl); }
h4 { font-size: var(--crt-text-xl); }

p {
    margin-bottom: var(--crt-space-4);
    color: var(--crt-gray-600);
}

/* Container */
.crt-container {
    width: 100%;
    max-width: var(--crt-container);
    margin: 0 auto;
    padding: 0 var(--crt-space-6);
}

.crt-container-narrow {
    max-width: var(--crt-container-narrow);
}

.crt-container-wide {
    max-width: var(--crt-container-wide);
}

/* Main */
.crt-main {
    min-height: calc(100vh - var(--crt-header-height));
    display: flex;
    flex-direction: column;
}

.crt-main > *:last-child {
    margin-bottom: 0;
}

/* Container medium */
.crt-container-md {
    max-width: 900px;
}

/* Section */
.crt-section {
    padding: var(--crt-space-24) 0;
}

.crt-section-sm {
    padding: var(--crt-space-16) 0;
}

.crt-section-lg {
    padding: var(--crt-space-32) 0;
}

/* Section headers */
.crt-section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--crt-space-16);
}

.crt-section-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--crt-space-2);
    padding: var(--crt-space-1) var(--crt-space-4);
    background: var(--crt-primary-50);
    color: var(--crt-primary);
    border-radius: var(--crt-radius-full);
    font-size: var(--crt-text-sm);
    font-weight: 600;
    margin-bottom: var(--crt-space-4);
    border: 1px solid var(--crt-primary-100);
}

.crt-section-title {
    font-size: var(--crt-text-4xl);
    font-weight: 800;
    margin-bottom: var(--crt-space-4);
    background: var(--crt-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.crt-section-subtitle {
    font-size: var(--crt-text-lg);
    color: var(--crt-gray-500);
    line-height: 1.7;
}

/* Utility classes */
.crt-text-center { text-align: center; }
.crt-text-left { text-align: left; }
.crt-text-gradient {
    background: var(--crt-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.crt-flex { display: flex; }
.crt-flex-center { display: flex; align-items: center; justify-content: center; }
.crt-flex-between { display: flex; align-items: center; justify-content: space-between; }
.crt-gap-2 { gap: var(--crt-space-2); }
.crt-gap-4 { gap: var(--crt-space-4); }
.crt-gap-6 { gap: var(--crt-space-6); }
.crt-gap-8 { gap: var(--crt-space-8); }

.crt-grid { display: grid; gap: var(--crt-space-6); }
.crt-grid-2 { grid-template-columns: repeat(2, 1fr); }
.crt-grid-3 { grid-template-columns: repeat(3, 1fr); }
.crt-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Selection */
::selection {
    background: var(--crt-primary);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--crt-gray-100);
}
::-webkit-scrollbar-thumb {
    background: var(--crt-gray-300);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--crt-gray-400);
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid var(--crt-primary);
    outline-offset: 2px;
    border-radius: var(--crt-radius-sm);
}

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

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

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

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

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

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

@keyframes countUp {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.crt-animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.crt-animate-delay-1 { animation-delay: 0.1s; }
.crt-animate-delay-2 { animation-delay: 0.2s; }
.crt-animate-delay-3 { animation-delay: 0.3s; }
.crt-animate-delay-4 { animation-delay: 0.4s; }
.crt-animate-delay-5 { animation-delay: 0.5s; }
