/* ==================================
   RESET & VARIABLES
================================== */

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

:root {
    --primary-color: #27ae60;    /* Green */
    --secondary-color: #002670;  /* Dark Blue (updated from #3498db) */
    --tertiary-color: #ffffff;   /* White */
    --accent-color: #ffffff;     /* White */
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #7f8c8d;
    --white: #fff;
    --transition: all 0.3s ease;

    --bg-light: #ffffff;
    --bg-dark: #121212;
    --text-light-mode: #333;
    --text-dark-mode: #f5f5f5;
    --card-bg-light: #ecf0f1;
    --card-bg-dark: #1e1e1e;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.5);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

/* ==================================
   DARK MODE
================================== */

body.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-dark-mode);
}

body.dark-mode .header,
body.dark-mode .footer,
body.dark-mode .contact-info,
body.dark-mode .contact-form,
body.dark-mode .project-info,
body.dark-mode .service-card,
body.dark-mode .about {
    background-color: var(--bg-dark);
    color: var(--text-dark-mode);
}

body.dark-mode .hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-mode .section-title,
body.dark-mode .logo h1,
body.dark-mode .service-card h3,
body.dark-mode .project-info h3,
body.dark-mode .about-content h2,
body.dark-mode .contact-info h3,
body.dark-mode .footer-section h3 {
    color: var(--primary-color); /* garde le vert comme accent */
}

body.dark-mode .text-light,
body.dark-mode .stat-label,
body.dark-mode .project-info p,
body.dark-mode .service-card p,
body.dark-mode .footer-section p,
body.dark-mode .contact-info p {
    color: #aaa;
}

body.dark-mode .nav-link {
    color: #ddd;
}

body.dark-mode .nav-link::after {
    background-color: var(--secondary-color);
}

body.dark-mode .social-links a {
    background-color: #2d2d2d;
    color: var(--primary-color);
}

body.dark-mode .social-links a:hover {
    background-color: var(--secondary-color);
}

body.dark-mode .hero-content p {
    color: #bbb;
}

body.dark-mode .stat-number {
    color: var(--secondary-color);
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
    background-color: #2d2d2d;
    border-color: #444;
    color: var(--text-dark-mode);
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 38, 112, 0.3);
}

body.dark-mode .subscribe-form input {
    background-color: #2d2d2d;
    color: var(--text-dark-mode);
}

body.dark-mode .subscribe-form button {
    background-color: var(--secondary-color);
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
}

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

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

ul {
    list-style: none;
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==================================
   BUTTONS & TITLES
================================== */

.btn,
.btn-small {
    display: inline-block;
    text-align: center;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.btn {
    padding: 12px 30px;
    background-color: var(--secondary-color);
    color: var(--white);
    font-size: 1rem;
}

.btn:hover {
    background-color: #001a4d;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-small {
    padding: 8px 20px;
    font-size: 0.9rem;
    background-color: var(--light-color);
    color: var(--dark-color);
}

.btn-small:hover {
    background-color: #d5dbdb;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
}

/* ==================================
   HEADER
================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 0;
}

.logo-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--dark-color);
    font-weight: 600;
    position: relative;
    padding: 5px 0;
}

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

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

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

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--dark-color);
    transition: var(--transition);
}


/* ==================================
   HEADER - CONTAINER FLEX
================================== */

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
    position: relative;
}

/* Aligner le toggle à droite, à côté du menu */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 20px;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-color);
    transition: var(--transition);
    width: 40px;
    height: 40px;
}

.theme-toggle:hover {
    background-color: var(--light-color);
}

body.dark-mode .theme-toggle {
    color: var(--text-dark-mode);
}

body.dark-mode .theme-toggle:hover {
    background-color: #2d2d2d;
}

/* Sur mobile, on le place en dessous du hamburger */
@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .nav {
        order: 3;
        width: 100%;
        margin-top: 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .theme-toggle {
        margin-top: 15px;
        margin-left: 0;
        order: 4;
    }
}

/* ==================================
   HERO
================================== */

.hero {
    padding: 150px 0 100px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-content {
    flex: 1;
}

.hero-content h2 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
}

/* ==================================
   SERVICES
================================== */

.services {
    padding: 100px 0;
    background-color: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

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

.service-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* ==================================
   ABOUT
================================== */

.about {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.about .container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-content {
    flex: 1;
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-image img {
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 300px;
  	object-fit: scale-down;
}

.stats {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
}

/* ==================================
   PROJECTS
================================== */

.projects {
    padding: 100px 0;
    background-color: var(--white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.project-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

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

.project-card img {
    width: 100%;
    height: 200px !important;
    object-fit: scale-down;
}

.project-info {
    padding: 20px;
    background-color: var(--white);
}

.project-info h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.project-info p {
    color: var(--text-light);
    margin-bottom: 15px;
}

/* ==================================
   CONTACT
================================== */

.contact {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.contact-container {
    display: flex;
    gap: 50px;
    margin-top: 50px;
}

.contact-info {
    flex: 1;
    padding: 30px;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

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

.contact-info p {
    margin-bottom: 30px;
    color: var(--text-light);
}

.contact-method {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-method i {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--light-color);
    border-radius: 50%;
    color: var(--primary-color);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.contact-form {
    flex: 1;
    padding: 30px;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 38, 112, 0.1);
}

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

/* ==================================
   FOOTER
================================== */

.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 70px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-section p {
    margin-bottom: 20px;
    color: #bdc3c7;
}

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

.footer-section ul li a {
    color: #bdc3c7;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.subscribe-form {
    display: flex;
    margin-top: 20px;
}

.subscribe-form input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px 0 0 5px;
}

.subscribe-form button {
    padding: 0 15px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: var(--transition);
}

.subscribe-form button:hover {
    background-color: #001a4d;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
    font-size: 0.9rem;
}



/* Bouton toggle thème */
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--dark-color);
    cursor: pointer;
    margin-left: 20px;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: var(--transition);
}

body.dark-mode .theme-toggle {
    color: var(--text-dark-mode);
}

.theme-toggle:hover {
    background-color: var(--light-color);
}

body.dark-mode .theme-toggle:hover {
    background-color: #2d2d2d;
}


/* ==================================
   ICONES SVG INLINE
================================== */

.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    vertical-align: middle;
}

.icon-database,
.icon-chart-line,
.icon-robot,
.icon-cloud,
.icon-graduation-cap,
.icon-lightbulb,
.icon-map-marker-alt,
.icon-phone,
.icon-envelope,
.icon-twitter,
.icon-linkedin,
.icon-facebook,
.icon-paper-plane,
.icon-moon,
.icon-sun {
    color: var(--secondary-color);
}

body.dark-mode .icon-database,
body.dark-mode .icon-chart-line,
body.dark-mode .icon-robot,
body.dark-mode .icon-cloud,
body.dark-mode .icon-graduation-cap,
body.dark-mode .icon-lightbulb,
body.dark-mode .icon-map-marker-alt,
body.dark-mode .icon-phone,
body.dark-mode .icon-envelope,
body.dark-mode .icon-twitter,
body.dark-mode .icon-linkedin,
body.dark-mode .icon-facebook,
body.dark-mode .icon-paper-plane,
body.dark-mode .icon-moon,
body.dark-mode .icon-sun {
    color: var(--secondary-color);
}
/* ==================================
   RESPONSIVE
================================== */

@media (max-width: 992px) {
    .hero .container,
    .about .container {
        flex-direction: column;
    }
    
    .hero-content,
    .hero-image,
    .about-content,
    .about-image {
        flex: none;
        width: 100%;
    }
    
    .hero-content {
        margin-bottom: 50px;
        text-align: center;
    }
    
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .about-image {
        order: -1;
        margin-bottom: 50px;
    }
    
    .contact-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .nav-list {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        flex-direction: column;
        background-color: var(--white);
        text-align: center;
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        gap: 0;
    }
    
    .nav-list.active {
        left: 0;
    }
    
    .nav-list li {
        margin: 15px 0;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stats {
        justify-content: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 120px 0 80px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .service-card {
        padding: 20px;
    }
    
    .stat-item {
        min-width: 100px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
}