/* ========================================
   Reset & Variables
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Couleurs inspirées de CEFii */
    --primary-color: #E63946;
    --primary-dark: #C92A35;
    --primary-light: #FF5964;
    --secondary-color: #4A90E2;
    --accent-color: #FF6B9D;
    --yellow-cefii: #FFC845;
    --yellow-light: #FFD166;
    
    --text-dark: #2C3E50;
    --text-light: #5A6C7D;
    --text-white: #FFFFFF;
    
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-section: #F4F6F9;
    
    /* Typographie */
    --font-main: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Espacements */
    --section-padding: 80px 0;
    --container-max: 1200px;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* ========================================
   Base Styles
   ======================================== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

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

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

/* ========================================
   Header & Navigation
   ======================================== */
#header {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    padding: 15px 0;
}

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

.logo {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.btn-contact {
    background: var(--primary-color);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
}

.btn-contact:hover {
    background: var(--primary-dark);
    color: white;
}

.btn-contact::after {
    display: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    background: linear-gradient(135deg, var(--yellow-cefii) 0%, var(--yellow-light) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-dark);
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease;
    color: var(--text-dark);
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 40px;
    font-weight: 400;
    animation: fadeInUp 0.8s ease 0.2s backwards;
    color: var(--text-dark);
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(230, 57, 70, 0.3);
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--text-dark);
    color: white;
    border-color: var(--text-dark);
}

.btn-secondary:hover {
    background: transparent;
    color: var(--text-dark);
    border-color: var(--text-dark);
    transform: translateY(-3px);
}

.btn-large {
    padding: 18px 45px;
    font-size: 1.1rem;
}

/* ========================================
   Section Headers
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 0 auto 20px;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* ========================================
   About Section
   ======================================== */
.about {
    padding: var(--section-padding);
    background: var(--bg-white);
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.about-text h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    color: white;
    box-shadow: 0 5px 20px rgba(107, 79, 187, 0.3);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.95;
}

.team-values {
    background: var(--bg-section);
    padding: 40px;
    border-radius: 15px;
    border-left: 4px solid var(--primary-color);
}

.team-values h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.6rem;
}

.team-values p {
    color: var(--text-light);
    font-size: 1.05rem;
}

/* ========================================
   Solutions Section
   ======================================== */
.solutions {
    padding: var(--section-padding);
    background: var(--bg-section);
}

.solution-block {
    background: white;
    border-radius: 20px;
    padding: 50px;
    margin-bottom: 40px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.solution-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.solution-block.alternate {
    background: linear-gradient(135deg, rgba(107, 79, 187, 0.05), rgba(74, 144, 226, 0.05));
}

.solution-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: center;
}

.solution-text h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.solution-text p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.solution-features {
    list-style: none;
    margin: 20px 0;
}

.solution-features li {
    padding: 10px 0 10px 30px;
    position: relative;
    color: var(--text-dark);
}

.solution-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.solution-note {
    font-style: italic;
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-top: 20px;
}

.solution-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
    background-color: #FFFFFF;
}

.tech-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(107, 79, 187, 0.3);
}

.opensource-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
}

.os-logo {
    width: 100%;
    max-width: 120px;
    height: auto;
    object-fit: contain;
    filter: grayscale(20%);
    transition: var(--transition);
}

.os-logo:hover {
    filter: grayscale(0%);
    transform: scale(1.1);
}

/* ========================================
   Methodology Section
   ======================================== */
.methodology {
    padding: var(--section-padding);
    background: white;
}

.method-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.method-step {
    text-align: center;
    padding: 30px 20px;
    background: var(--bg-section);
    border-radius: 15px;
    transition: var(--transition);
    position: relative;
}

.method-step::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: var(--transition);
}

.method-step:hover::before {
    opacity: 1;
}

.method-step:hover {
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-10px);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.method-step h4 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.method-step p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
    padding: var(--section-padding);
    background: var(--bg-section);
}

.contact-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    margin-top: 50px;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.contact-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.contact-card h4 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.contact-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
    display: block;
    margin: 10px 0;
}

.contact-link:hover {
    color: var(--primary-dark);
}

.contact-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.contact-address {
    color: var(--text-dark);
    font-weight: 500;
}

.contact-cta {
    display: flex;
    align-items: center;
}

.cta-box {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    padding: 50px 40px;
    border-radius: 20px;
    color: white;
    text-align: center;
    box-shadow: 0 10px 40px rgba(107, 79, 187, 0.3);
}

.cta-box h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.cta-box p {
    margin-bottom: 30px;
    opacity: 0.95;
    font-size: 1.05rem;
}

.cta-box .btn-primary {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

.cta-box .btn-primary:hover {
    background: var(--bg-light);
    transform: translateY(-3px);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 15px;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links h4 {
    margin-bottom: 20px;
    color: white;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

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

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 968px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .about-content,
    .solution-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .method-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .opensource-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 30px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .method-steps {
        grid-template-columns: 1fr;
    }
    
    .solution-block {
        padding: 30px 20px;
    }
    
    .opensource-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 50px 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

/* ========================================
   Performance Optimizations
   ======================================== */
.hero-background {
    will-change: transform;
}

.solution-block,
.contact-card,
.method-step {
    will-change: transform;
}

/* ========================================
   Scroll to Top Button
   ======================================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(230, 57, 70, 0.6);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}
