/* MERM Design System - CSS Complet */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ==================== RESET ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ==================== VARIABLES ==================== */
:root {
    --color-red: #E63946;           /* Rouge MERM (logo) */
    --color-blue: #1B5E75;          /* Bleu MERM (logo) */
    --color-gold: #F4A900;          /* Or MERM (logo) */
    --color-navy: #1A1F35;          /* Navy support */
    --color-cream: #F5F0EB;         /* Cream backgrounds */
    --color-teal: #2D5F5F;          /* Teal support */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-4: 1rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;
    --spacing-12: 3rem;
    --spacing-16: 4rem;
}

/* ==================== BODY & HTML ==================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--color-navy);
    background-color: var(--color-cream);
    line-height: 1.6;
}

/* ==================== TYPOGRAPHY ==================== */
.display-font {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

h4 {
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

a {
    color: var(--color-burgundy);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-gold);
}

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

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }

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

/* ==================== COLORS - TEXT ==================== */
.text-white { color: white; }
.text-cream { color: var(--color-cream); }
.text-navy { color: var(--color-navy); }
.text-gray-200 { color: #e5e7eb; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }

.accent-gold { color: var(--color-gold); }
.accent-red { color: var(--color-red); }
.accent-blue { color: var(--color-blue); }
.accent-burgundy { color: #8B1538; }
.accent-navy { color: var(--color-navy); }
.accent-teal { color: var(--color-teal); }

/* ==================== COLORS - BACKGROUND ==================== */
.bg-white { background-color: white; }
.bg-cream { background-color: var(--color-cream); }
.bg-gold { background-color: var(--color-gold); }
.bg-red { background-color: var(--color-red); }
.bg-blue { background-color: var(--color-blue); }
.bg-burgundy { background-color: #8B1538; }
.bg-navy { background-color: var(--color-navy); }
.bg-teal { background-color: var(--color-teal); }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-green-100 { background-color: #dcfce7; }
.bg-green-800 { background-color: #166534; }

/* ==================== LAYOUT ==================== */
.container {
    width: 100%;
    max-width: 100%;
}

.max-w-7xl {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
}

.max-w-6xl {
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
}

.max-w-4xl {
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* ==================== PADDING ==================== */
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.pt-4 { padding-top: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.pt-8 { padding-top: 2rem; }

.pb-3 { padding-bottom: 0.75rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-8 { padding-bottom: 2rem; }

/* ==================== MARGIN ==================== */
.m-0 { margin: 0; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mt-20 { margin-top: 5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }

/* ==================== FLEXBOX ==================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* ==================== GRID ==================== */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }

/* ==================== DISPLAY ==================== */
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.hidden { display: none; }

@media (min-width: 768px) {
    .md\:hidden { display: none; }
    .md\:flex { display: flex; }
    .md\:grid { display: grid; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ==================== BORDERS ==================== */
.border { border: 1px solid #e5e7eb; }
.border-l-4 { border-left: 4px solid; }
.border-t { border-top: 1px solid #e5e7eb; }
.border-b { border-bottom: 1px solid #e5e7eb; }
.border-b-4 { border-bottom: 4px solid; }
.border-gold { border-color: var(--color-gold); }
.border-red { border-color: var(--color-red); }
.border-blue { border-color: var(--color-blue); }
.border-burgundy { border-color: #8B1538; }
.border-gray-200 { border-color: #e5e7eb; }
.rounded { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8125rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--color-red);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-gold);
    color: var(--color-navy);
    box-shadow: 0 4px 12px rgba(244, 169, 0, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-burgundy);
    border: 2px solid var(--color-burgundy);
}

.btn-secondary:hover {
    background-color: var(--color-burgundy);
    color: white;
}

/* ==================== SHADOWS ==================== */
.shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1); }

/* ==================== UTILITIES ==================== */
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-50 { z-index: 50; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }
.transition { transition: all 0.3s ease; }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }

/* ==================== ASPECT RATIO ==================== */
.aspect-video {
    aspect-ratio: 16 / 9;
}

/* ==================== SPACING ==================== */
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-8 > * + * { margin-top: 2rem; }

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

.h-12 { height: 3rem; }
.w-auto { width: auto; }

/* ==================== CAROUSEL ==================== */
.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    min-width: 100%;
    flex: 0 0 100%;
}

.carousel-controls {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-dot.active {
    background-color: var(--color-red);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(230, 57, 70, 0.7);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 5;
    transition: background-color 0.3s ease;
}

.carousel-btn:hover {
    background-color: rgba(230, 57, 70, 1);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

/* ==================== CARDS ==================== */
.card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* ==================== FORMS ==================== */
input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 0.95rem;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-red);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 767px) {
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .py-16 { padding-top: 2rem; padding-bottom: 2rem; }
    .py-20 { padding-top: 3rem; padding-bottom: 3rem; }

    .grid {
        grid-template-columns: 1fr;
    }
}
