@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #0284c7;
    /* Bleu océan */
    --primary-dark: #0369a1;
    /* Bleu foncé */
    --secondary: #10b981;
    /* Vert émeraude  */
    --dark: #0f172a;
    /* Slate 900 */
    --light: #f8fafc;
    /* Slate 50 */
    --white: #ffffff;
    --text: #334155;
    /* Slate 700 */
    --text-light: #64748b;
    /* Slate 500 */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Outfit', sans-serif;
}

body {
    color: var(--text);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--dark);
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(2, 132, 199, 0.39);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.23);
    color: var(--white);
}

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

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    box-shadow: var(--shadow);
}

.navbar.scrolled .nav-links a {
    color: var(--dark);
}

.navbar.scrolled .logo {
    color: var(--primary);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--white);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--secondary);
}

.navbar.scrolled .nav-links a.active {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

.navbar.scrolled .menu-toggle {
    color: var(--dark);
}

/* Specific to internal pages (not home) where the navbar needs to be solid initially */
body:not(.home) .navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 1rem 5%;
}

body:not(.home) .navbar .nav-links a {
    color: var(--dark);
}

body:not(.home) .navbar .logo {
    color: var(--primary);
}

body:not(.home) .menu-toggle {
    color: var(--dark);
}

body:not(.home) .nav-links a.active {
    color: var(--primary);
}


/* Layout Sections */
section {
    padding: 5rem 5%;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    background: url('assets/images/hero.png') center/cover no-repeat;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    color: var(--white);
}

.hero-subtitle {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--secondary);
    border-radius: 50px;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    animation: fadeUp 1s ease 0.2s both;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--white);
    line-height: 1.1;
    animation: fadeUp 1s ease 0.4s both;
}

.hero-text {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeUp 1s ease 0.6s both;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    animation: fadeUp 1s ease 0.8s both;
}

/* About Short Section */
.about-short {
    background: var(--white);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-content h2 span {
    color: var(--primary);
}

.about-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(2, 132, 199, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.feature-text h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.feature-text p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.about-img {
    position: relative;
}

.about-img img {
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.about-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--white);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.badge-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.badge-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.2;
}

/* Services Overview */
.services-overview {
    background: var(--light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--primary);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(2, 132, 199, 0.1);
    color: var(--primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--primary);
    color: var(--white);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.service-link {
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-link i {
    transition: var(--transition);
}

.service-card:hover .service-link i {
    transform: translateX(5px);
}

/* SECTION */

.produits {
    padding: 4rem 5%;
    background: #f8fafc;
}


/* TITRE */

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2rem;
    color: #1e293b;
}

.section-title span {
    color: #2563eb;
}


/* GRID PRODUITS */

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
}


/* CARD */

.card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}


/* IMAGE */

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}


/* TITRE CARD */

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}


/* TEXTE */

.card p {
    font-size: 0.9rem;
    color: #64748b;
}


/* RESPONSIVE */

@media (max-width:1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width:768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width:480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* Stats Section */
.stats {
    background: var(--primary);
    color: var(--white);
    padding: 4rem 5%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Page Header (for inner pages) */
.page-header {
    height: 40vh;
    min-height: 300px;
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('assets/images/hero.png') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-top: 0;
    padding-top: 80px;
    /* Offset for fixed navbar */
}

.page-header h1 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.breadcrumb {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a {
    color: var(--secondary);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Projects Section */
.projects-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--white);
    position: relative;
    group: hover;
}

.project-img {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 132, 199, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    width: 50px;
    height: 50px;
    background: var(--white);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transform: translateY(20px);
    transition: var(--transition);
}

.project-card:hover .project-link {
    transform: translateY(0);
}

.project-content {
    padding: 1.5rem;
}

.project-category {
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.project-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info {
    background: var(--primary);
    color: var(--white);
    padding: 3rem 2rem;
    border-radius: 15px;
}

.contact-info h3 {
    color: var(--white);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--secondary);
}

.info-item h4 {
    color: var(--white);
    margin-bottom: 0.25rem;
}

.info-item p {
    opacity: 0.9;
}

.contact-form {
    background: var(--white);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 5rem 5% 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-about p {
    margin-top: 1.5rem;
    color: #94a3b8;
}

.footer-socials {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-links h4,
.footer-contact h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #94a3b8;
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer-contact p {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #94a3b8;
}

.footer-contact i {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #64748b;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }

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

    .about-img {
        margin-top: 2rem;
    }

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

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

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 250px;
        background: var(--white);
        flex-direction: column;
        padding-top: 80px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        color: var(--dark) !important;
        font-size: 1.2rem;
    }

    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    .menu-toggle.active {
        color: var(--dark);
    }

    .hero-title {
        font-size: 2.5rem;
    }

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

/* =========================
   MODAL PROJETS
========================= */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.75);
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 900px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    animation: modalShow 0.4s ease;
}

.modal-content img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.modal-body {
    padding: 2rem;
}

/* =========================
   MODAL PRODUIT
========================= */

.product-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 1rem;
}

.product-modal.show {
    display: flex;
}

.product-modal-content {
    background: #fff;
    width: 95%;
    max-width: 750px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 35px 40px;
    border-radius: 16px;
    position: relative;
    animation: modalShow 0.4s ease;
}

.product-modal-content h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--dark);
}

.product-modal .close-modal {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text);
    transition: var(--transition);
}

.product-modal .close-modal:hover {
    color: var(--primary);
}

.product-modal .form-group {
    margin-bottom: 1.2rem;
}

.product-modal .form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: var(--dark);
}

.product-modal .form-group input,
.product-modal .form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.product-modal .form-group input:focus,
.product-modal .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.product-modal .form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.product-modal .form-group input[readonly],
.product-modal .form-group textarea[readonly] {
    background: #f1f5f9;
    color: var(--text-light);
}

.product-modal button[type="submit"] {
    width: 100%;
    padding: 0.9rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.product-modal button[type="submit"]:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.card {
    cursor: pointer;
}

.project-card {
    cursor: pointer;
}

.project-link {
    border: none;
}

@keyframes modalShow {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}