/* ==========================================
   IMPERVAL - STYLES.CSS
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0056b3;
    --primary-dark: #003d7a;
    --accent: #ffc107;
    --text: #212529;
    --text-light: #6c757d;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========================================== 
   LANGUAGE SWITCHER
   ========================================== */
.lang-switcher {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 999;
    background: var(--white);
    border-radius: 50px;
    box-shadow: var(--shadow);
    display: flex;
    overflow: hidden;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
}

.lang-btn:hover {
    background: var(--light-bg);
}

.lang-btn.active {
    background: var(--primary);
    color: var(--white);
}

.flag {
    font-size: 1.2rem;
}

/* ========================================== 
   HEADER
   ========================================== */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--accent);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

nav a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
}

/* ========================================== 
   HERO AVEC SLIDER
   ========================================== */
.hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-top: 80px;
    overflow: hidden;
}

/* Slides d'arrière-plan */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 0;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

/* Overlay sombre pour meilleure lisibilité */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 2rem;
    animation: fadeInUp 1s ease;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 300;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent);
    color: var(--text);
}

.btn-primary:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

/* ========================================== 
   FEATURES
   ========================================== */
.features {
    padding: 5rem 0;
    background: var(--light-bg);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* ========================================== 
   ABOUT
   ========================================== */
.about {
    padding: 5rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

.timeline-item {
    margin-bottom: 2rem;
    padding-left: 2rem;
    border-left: 3px solid var(--primary);
}

.timeline-year {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.founder-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.founder-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.founder-info {
    padding: 2rem;
}

.founder-info .title {
    color: var(--accent);
    font-weight: 600;
    margin: 0.5rem 0;
}

.experience-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    margin-top: 1rem;
}

/* ========================================== 
   RÉALISATIONS
   ========================================== */
.realisations {
    padding: 5rem 0;
    background: var(--light-bg);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    background: var(--white);
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: var(--white);
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay h3 {
    margin-bottom: 0.5rem;
}

.project-card.hidden {
    display: none;
}

/* ========================================== 
   CONTACT
   ========================================== */
.contact-section {
    padding: 5rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-info {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    height: fit-content;
}

.contact-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item i {
    color: var(--primary);
    margin-top: 0.3rem;
}

.contact-item a {
    color: var(--primary);
    text-decoration: none;
}

.contact-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-success,
.form-error {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
}

.form-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-success.show,
.form-error.show {
    display: block;
    animation: slideDown 0.3s ease;
}

/* ========================================== 
   FOOTER
   ========================================== */
footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3 {
    color: var(--accent);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent);
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    background: var(--accent);
    color: var(--primary-dark);
}

/* ========================================== 
   SCROLL TO TOP
   ========================================== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 998;
}

.scroll-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

.scroll-top.show {
    display: flex;
}

/* ========================================== 
   ANIMATIONS
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================== 
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: var(--transition);
    }

    nav.active {
        max-height: 500px;
    }

    nav ul {
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }

    nav li {
        border-bottom: 1px solid #e0e0e0;
    }

    nav a {
        display: block;
        padding: 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .lang-switcher {
        top: 90px;
        right: 10px;
        font-size: 0.85rem;
    }

    .lang-btn {
        padding: 0.4rem 0.8rem;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}