/* --- CSS Reset & Variables --- */
:root {
    --primary-color: #0056b3;
    /* Professional Blue */
    --secondary-color: #00a8cc;
    /* Tech Cyan */
    --dark-bg: #1a1a1a;
    --light-bg: #f4f7f6;
    --text-color: #333;
    --text-light: #666;
    --white: #ffffff;
    --spacing-unit: 1rem;
    --border-radius: 4px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

/* --- Typography --- */
h1,
h2,
h3 {
    color: var(--dark-bg);
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

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

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

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: var(--border-radius);
    font-weight: 600;
    border: 2px solid var(--primary-color);
}

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

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

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

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

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    height: 100%;
    display: flex;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
}

.logo img {
    max-height: 100%;
}

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

.nav-links a {
    font-weight: 500;
    color: var(--text-color);
}

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

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 160px 0 100px;
    text-align: center;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.hero p {
    color: #e0e0e0;
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* --- Services Section --- */
.services {
    padding: 80px 0;
    background-color: var(--light-bg);
}

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

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    text-align: center;
}

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

.service-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    display: block;
}

/* --- Why Choose Me --- */
.why-me {
    padding: 80px 0;
    background-color: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    text-align: center;
}

.feature-item h3 {
    margin: 15px 0 10px;
    color: var(--primary-color);
}

/* --- Trust Signals / Testimonials --- */
.testimonials {
    padding: 80px 0;
    background-color: var(--white);
    text-align: center;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    text-align: left;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1rem;
}

.client-name {
    font-weight: 700;
    color: var(--dark-bg);
}

/* --- Partners and certifications section --- */

.partners-certifications {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 80px 0;
    background-color: var(--light-bg);
    text-align: center;
}

.cert-badge {
    background: var(--light-bg);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: 20px 0;
    background: #fff;
    /* Fond blanc pour l'exemple */
}

.carousel-track {
    /* Piste de défilement animée */
    display: flex;
    width: fit-content;
    /* S'adapte à la largeur du contenu */
    animation: scroll 20s linear infinite;
    /* Durée et linéarité */
}

.carousel-container:hover .carousel-track {
    /* Pause de l'animation au survol (optionnel) */
    animation-play-state: paused;
}

.carousel-item {
    /* Carte contenant le logo */
    flex: 0 0 auto;
    width: 150px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 20px;
    /* Espace entre les logos */
    background-color: #f5f5f5;
    border-radius: 8px;
}

.carousel-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /*filter: grayscale(100%);*/
    transition: filter 0.3s ease;
}

.carousel-item:hover img {
    filter: grayscale(0%);
}

/* Définition de l'animation de défilement */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        /* On déplace la piste vers la gauche de la moitié de sa largeur totale
                   (c'est-à-dire la largeur d'une seule série de logos) */
        transform: translateX(calc(-50%));
        /* -50% = moitié de la largeur du contenu*/
    }
}

/* Astuce pour la boucle parfaite sans JS : 
           On duplique le contenu une fois dans le HTML. 
           L'animation déplace la piste de 50% de sa largeur totale. 
           Comme la première moitié est identique à la seconde, 
           le retour au début est instantané et invisible. 
        */

.certifications {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.cert-badge {
    background: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* --- Contact Section --- */
.contact {
    padding: 80px 0;
    background-color: var(--dark-bg);
    color: var(--white);
}

.contact h2 {
    color: var(--white);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.contact-info h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.contact-info p {
    color: #ccc;
    text-align: center;
}

.contact-info table {}

@media (max-width: 1000px) {
    .contact-info {
        flex-direction: column;
        /* Empile les éléments verticalement */
    }

    .contact-info p {
        margin-bottom: 3rem;
    }
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    color: var(--text-color);
}

.contact-table {}

.contact-table td {
    padding-top: 10px;
    padding-bottom: 10px;
    vertical-align: top;
}

.contact-table-icon {
    text-align: center;
    padding-left: 10px;
}

.contact-table-title {
    text-align: left;
    font-weight: bold;
    padding-right: 10px;
}

.contact-table-info {
    text-align: left;
    padding: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

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

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

/* --- Footer --- */
footer {
    background-color: #111;
    color: #777;
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .nav-links {
        display: none;
        /* Simple mobile hide for this demo; ideally use a hamburger menu */
    }

    .hero-btns {
        flex-direction: column;
        align-items: center;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}