/* ===================================
   Base Styles - Styles globaux
   =================================== */

/* ========== BASE ========== */
html {
    font-size: 16px;
}

body {
    font-family: var(--font-secondary);
    font-size: var(--fs-base);
    font-weight: var(--fw-regular);
    line-height: var(--lh-base);
    color: var(--color-black);
    background-color: var(--color-off-white);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

html {
    overflow-x: hidden;
    width: 100%;
}

/* ========== TYPOGRAPHIE ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    color: var(--color-black);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: var(--fs-5xl);
}

h2 {
    font-size: var(--fs-4xl);
}

h3 {
    font-size: var(--fs-3xl);
}

h4 {
    font-size: var(--fs-2xl);
}

h5 {
    font-size: var(--fs-xl);
}

h6 {
    font-size: var(--fs-lg);
}

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

p:last-child {
    margin-bottom: 0;
}

strong, b {
    font-weight: var(--fw-semibold);
    color: var(--color-primary);
}

em, i {
    font-style: italic;
}

/* ========== LIENS ========== */
a {
    color: var(--color-primary);
    transition: color var(--transition-fast);
}

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

/* ========== CONTAINER ========== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ========== SECTIONS ========== */
section {
    padding: var(--space-5xl) 0;
    overflow: hidden;
    position: relative;
}

@media (max-width: 768px) {
    section {
        padding: var(--space-4xl) 0;
    }
}

/* ========== DECORATIVE ELEMENTS ========== */
body::before {
    content: '';
    position: fixed;
    top: 10%;
    right: -200px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--color-secondary-light) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.05;
    filter: blur(100px);
    pointer-events: none;
    animation: float 15s infinite ease-in-out;
    overflow: hidden;
}

body::after {
    content: '';
    position: fixed;
    bottom: 10%;
    left: -250px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--color-primary-light) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.05;
    filter: blur(100px);
    pointer-events: none;
    animation: float 20s infinite ease-in-out reverse;
    overflow: hidden;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ========== SECTION HEADERS ========== */
.section-header {
    text-align: center;
    margin-bottom: var(--space-4xl);
}

.section-title {
    font-family: var(--font-accent);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: transparent;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    margin-bottom: var(--space-lg);
    position: relative;
    display: inline-block;
    letter-spacing: 2px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    border-radius: 50px;
}

.section-divider {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
    margin: 0 auto var(--space-xl);
    border-radius: var(--radius-full);
    position: relative;
    overflow: hidden;
}

.section-divider::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    to {
        left: 100%;
    }
}

.section-subtitle {
    font-family: var(--font-accent);
    font-size: var(--fs-2xl);
    color: var(--color-gray);
    font-weight: var(--fw-regular);
}

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

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

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

.text-primary {
    color: var(--color-primary);
}

.text-secondary {
    color: var(--color-secondary);
}

.text-accent {
    color: var(--color-accent);
}

.text-muted {
    color: var(--color-gray);
}

/* Spacing utilities */
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
.mt-5 { margin-top: var(--space-2xl); }

.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }
.mb-5 { margin-bottom: var(--space-2xl); }

.pt-1 { padding-top: var(--space-sm); }
.pt-2 { padding-top: var(--space-md); }
.pt-3 { padding-top: var(--space-lg); }
.pt-4 { padding-top: var(--space-xl); }
.pt-5 { padding-top: var(--space-2xl); }

.pb-1 { padding-bottom: var(--space-sm); }
.pb-2 { padding-bottom: var(--space-md); }
.pb-3 { padding-bottom: var(--space-lg); }
.pb-4 { padding-bottom: var(--space-xl); }
.pb-5 { padding-bottom: var(--space-2xl); }

/* Display utilities */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Flex utilities */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

/* ========== IMAGES ========== */
.img-fluid {
    width: 100%;
    height: auto;
    display: block;
}

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-contain {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ========== ACCESSIBILITY ========== */
.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;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-white);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    text-decoration: none;
    z-index: var(--z-top);
}

.skip-link:focus {
    top: var(--space-sm);
}

/* ========== SELECTION ========== */
::selection {
    background-color: var(--color-primary-light);
    color: var(--color-white);
}

::-moz-selection {
    background-color: var(--color-primary-light);
    color: var(--color-white);
}