/* ========== RESET & VARIABLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --rouge-primary: #c62828;
    --rouge-dark: #8e0000;
    --rouge-light: #ef5350;
    --jaune-primary: #f9a825;
    --jaune-dark: #c77800;
    --jaune-light: #ffd95a;
    --gris-bg: #fefcf5;
    --gris-card: #ffffff;
    --texte-dark: #1e1e2a;
    --texte-gris: #4a5568;
    --shadow-sm: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 20px 35px -12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 25px 40px -12px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.definition-samma {
    background: rgba(255, 215, 0, 0.1);
    border-left: 4px solid var(--gold, #f5a623);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    margin: 0.5rem 0 1rem 0;
    border-radius: 0 12px 12px 0;
    font-weight: 500;
    color: #1e2a3e;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gris-bg);
    color: var(--texte-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========== TYPOGRAPHIE ========== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--rouge-primary), var(--jaune-primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ========== NAVIGATION ========== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--jaune-primary);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--rouge-primary), var(--jaune-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
}

.logo span {
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--jaune-light);
    color: var(--rouge-dark);
    padding: 0.2rem 0.8rem;
    border-radius: 40px;
    display: inline-block;
    margin-top: 0.25rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    font-weight: 600;
    color: var(--texte-dark);
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rouge-primary), var(--jaune-primary));
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--rouge-primary);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--rouge-primary);
    background: none;
    border: none;
    padding: 0.5rem;
}

/* ========== BOUTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 60px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--rouge-primary), var(--rouge-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(198, 40, 40, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(198, 40, 40, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--rouge-primary);
    color: var(--rouge-primary);
}

.btn-outline:hover {
    background: var(--rouge-primary);
    color: white;
    transform: translateY(-2px);
}

/* ========== HERO SECTION ========== */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 6rem 0 4rem;
    background: linear-gradient(125deg, #fff9ef 0%, #ffffff 70%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(249, 168, 37, 0.1) 0%, rgba(249, 168, 37, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-grid {
    display: flex;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1;
    min-width: 280px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--jaune-primary), var(--jaune-light));
    color: var(--rouge-dark);
    padding: 0.4rem 1.2rem;
    border-radius: 60px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--texte-gris);
    margin-bottom: 2rem;
    max-width: 90%;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat {
    text-align: left;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--rouge-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--texte-gris);
}

.hero-visual {
    flex: 1;
    min-width: 280px;
    position: relative;
}

.floating-card {
    background: white;
    border-radius: 32px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border-top: 6px solid var(--jaune-primary);
    text-align: center;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Réduction du mouvement pour l'accessibilité */
@media (prefers-reduced-motion: reduce) {
    .floating-card {
        animation: none;
    }
}

/* ========== SECTIONS GÉNÉRIQUES ========== */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--texte-gris);
    max-width: 600px;
    margin: 0 auto;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--rouge-primary), var(--jaune-primary));
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ========== CARTES ========== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--gris-card);
    padding: 2rem;
    border-radius: 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-bottom-color: var(--jaune-primary);
}

.card:focus-visible {
    outline: 2px solid var(--rouge-primary);
    outline-offset: 2px;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--jaune-light), #fff3e0);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.card-icon i {
    font-size: 1.8rem;
    color: var(--rouge-primary);
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.card p {
    color: var(--texte-gris);
}

/* ========== SECTION CHIFFRES ========== */
.stats-gradient {
    background: linear-gradient(135deg, var(--rouge-primary), var(--rouge-dark));
    color: white;
    border-radius: 48px;
    margin: 2rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
    text-align: center;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 24px;
    transition: var(--transition);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.stat-number-lg {
    font-size: 3rem;
    font-weight: 800;
}

/* ========== TIMELINE ========== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--rouge-primary), var(--jaune-primary));
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -0.45rem;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--jaune-primary);
    border-radius: 50%;
    border: 2px solid var(--rouge-primary);
}

/* ========== GALERIE ========== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.gallery-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: var(--transition);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(198, 40, 40, 0.8), rgba(249, 168, 37, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay,
.gallery-item:focus .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-img,
.gallery-item:focus .gallery-img {
    transform: scale(1.05);
}

/* ========== FOOTER ========== */
footer {
    background: #1a1a2a;
    color: #cddfd6;
    padding: 3rem 0 2rem;
    border-top: 5px solid var(--jaune-primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo h2 {
    color: white;
    margin-bottom: 0.5rem;
}

.footer-logo p {
    color: #a0a0b0;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--jaune-primary);
    margin-bottom: 1rem;
}

.footer-links a {
    display: block;
    color: #cddfd6;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--jaune-primary);
    transform: translateX(5px);
}

.footer-contact p {
    margin-bottom: 0.5rem;
}

.footer-contact i {
    color: var(--jaune-primary);
    width: 25px;
    display: inline-block;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0a0b0;
    font-size: 0.85rem;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Réduction du mouvement */
@media (prefers-reduced-motion: reduce) {
    .fade-in-up {
        animation: none;
        opacity: 1;
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        max-width: 320px;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        gap: 1rem;
        padding: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow-md);
        z-index: 999;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .hero-text h1 {
        font-size: 2.2rem;
    }
    
    .hero-text p {
        max-width: 100%;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .hero-grid {
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== UTILITAIRES ========== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}