/* ==================== VARIABLES CSS ==================== */
:root {
    --header-height: 3.5rem;

    /* Couleurs */
    --first-color: #007BFF; /* Bleu vibrant */
    --first-color-alt: #0056b3;
    --title-color: #1A202C; /* Gris très foncé pour les titres */
    --text-color: #4A5568; /* Gris moyen pour le texte */
    --body-color: #FFFFFF; /* Fond blanc */
    --container-color: #F7FAFC; /* Gris très clair pour les fonds de section */

    /* Polices et typographie */
    --body-font: 'Poppins', sans-serif;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;

    /* Poids de la police */
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semi-bold: 600;

    /* Marges */
    --mb-0-5: .5rem;
    --mb-1: 1rem;
    --mb-1-5: 1.5rem;
    --mb-2: 2rem;

    /* z-index */
    --z-tooltip: 10;
    --z-fixed: 100;
}

/* Responsive typography */
@media screen and (min-width: 968px) {
    :root {
        --h1-font-size: 3rem;
        --h2-font-size: 2rem;
        --h3-font-size: 1.5rem;
        --normal-font-size: 1rem;
    }
}

/* ==================== BASE ==================== */
*, ::before, ::after {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden; /* And also add this line */
}

h1, h2, h3 {
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
}

ul {
    list-style: none;
}

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

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

/* ==================== CLASSES RÉUTILISABLES ==================== */
.container {
    max-width: 1024px;
    margin-left: var(--mb-1-5);
    margin-right: var(--mb-1-5);
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.section {
    padding: 4.5rem 0 2rem;
}

.section__title {
    font-size: var(--h2-font-size);
    text-align: center;
    margin-bottom: var(--mb-2);
}

.section__subtitle {
    display: block;
    text-align: center;
    color: var(--first-color);
    font-weight: var(--font-medium);
    margin-bottom: var(--mb-0-5);
}

/* ==================== HEADER & NAV ==================== */
.header {
    width: 100%;
    background-color: transparent;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    transition: .4s;
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
    font-size: 1.25rem;
    /* Add flex properties to vertically center the logo */
    display: flex;
    align-items: center;
}

/* New rule to style the logo image */
.nav__logo img {
    /* Logo image height (4rem) is slightly larger than the mobile navbar (var(--header-height) is 3.5rem) for visual emphasis */
    width: auto; /* Maintain aspect ratio */
    height: 3rem;
}

/* .nav__logo span {
    color: var(--first-color);
} */

.nav__toggle, .nav__close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--title-color);
}

@media screen and (max-width: 767px) {
    .nav__menu {
        position: fixed;
        background-color: var(--body-color);
        top: 0;
        right: -100%;
        width: 100%;
        height: 100%;
        padding: 4rem 2rem;
        transition: .4s;
    }
}

.nav__list {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 2rem;
}

.nav__link {
    color: var(--title-color);
    font-weight: var(--font-medium);
    transition: .3s;
}

.nav__link:hover, .active-link {
    color: var(--first-color);
    }

    /* Style spécial pour le lien Portail Client */
    .nav__link--portal {
        background: linear-gradient(90deg, #007BFF 0%, #00C6FF 100%);
        color: #fff !important;
        border-radius: 0.5rem;
        padding: 0.5rem 1.25rem;
        font-weight: var(--font-semi-bold);
        box-shadow: 0 2px 8px rgba(0,123,255,0.10);
        transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    }
    .nav__link--portal:hover {
        background: linear-gradient(90deg, #0056b3 0%, #007BFF 100%);
        color: #fff !important;
        box-shadow: 0 4px 16px rgba(0,123,255,0.18);
}

.nav__close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
}

/* Afficher le menu mobile */
.show-menu {
    right: 0;
}

/* Style du header au défilement */
.scroll-header {
    background-color: var(--body-color);
    box-shadow: 0 1px 4px hsla(0, 4%, 15%, .1);
}

/* ==================== ACCUEIL (HERO) ==================== */
.home {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, hsla(0, 0%, 100%, 0.1), hsla(206, 100%, 97%, 0.5));
}

.home__container {
    text-align: center;
}

.home__title {
    font-size: var(--h1-font-size);
    line-height: 1.2;
    margin-bottom: var(--mb-1);
}

.home__title .highlight {
    color: var(--first-color);
}

.home__description {
    max-width: 600px;
    margin: 0 auto var(--mb-2);
}

/* ==================== BOUTONS ==================== */
.button {
    display: inline-block;
    background-color: var(--first-color);
    color: white;
    padding: 1rem 1.75rem;
    border-radius: .5rem;
    font-weight: var(--font-medium);
    transition: .3s;
    border: none;
    cursor: pointer;
}

.button:hover {
    background-color: var(--first-color-alt);
    transform: translateY(-2px);
}

.button--flex {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.button--full {
    width: 100%;
}

/* ==================== SERVICES ==================== */
.services__container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service__card {
    background-color: var(--container-color);
    padding: 2.5rem 2rem;
    border-radius: .75rem;
    text-align: center;
    transition: .3s;
    border: 1px solid #E2E8F0;
}

.service__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px hsla(206, 98%, 40%, 0.1);
}

.service__icon {
    font-size: 2.5rem;
    color: var(--first-color);
    margin-bottom: var(--mb-1);
}

.service__icon i {
    width: 48px;
    height: 48px;
}

.service__title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-5);
}

/* ==================== GATELOGIX ==================== */
#gatelogix {
    background-color: var(--container-color);
}

.gatelogix__container {
    align-items: center;
}

.gatelogix__title {
    text-align: left;
}

.gatelogix__subtitle {
    font-size: var(--h3-font-size);
    font-weight: var(--font-regular);
    margin-bottom: var(--mb-1-5);
    color: var(--title-color);
}

.gatelogix__description {
    margin-bottom: var(--mb-2);
}

.gatelogix__features {
    display: grid;
    gap: 1.5rem;
}

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

.feature__icon {
    color: var(--first-color);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature__icon i {
    width: 24px;
    height: 24px;
}

.feature__item h4 {
    margin-bottom: .25rem;
    font-size: var(--normal-font-size);
}

.feature__item p {
    font-size: var(--small-font-size);
    color: var(--text-color);
}


/* ==================== À PROPOS ==================== */
.about__container {
    align-items: center;
}

.about__image {
    border-radius: .75rem;
    overflow: hidden;
}

.about__data p {
    margin-bottom: var(--mb-1);
}


/* ==================== CONTACT ==================== */
#contact {
    background-color: var(--container-color);
}

.contact__description {
    margin-bottom: var(--mb-1-5);
}

.contact__info {
    display: grid;
    gap: 1rem;
    margin-bottom: var(--mb-2);
}
.contact__info div {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.form__group {
    margin-bottom: var(--mb-1-5);
}

.form__group label {
    display: block;
    margin-bottom: .25rem;
    font-weight: var(--font-medium);
    color: var(--title-color);
}

.form__group input,
.form__group textarea {
    width: 100%;
    padding: .75rem 1rem;
    border: 1px solid #CBD5E0;
    border-radius: .5rem;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    outline: none;
    transition: .3s;
}

.form__group input:focus,
.form__group textarea:focus {
    border-color: var(--first-color);
    box-shadow: 0 0 0 3px hsla(206, 98%, 40%, 0.2);
}

/* ==================== FOOTER ==================== */
.footer {
    padding: 2rem 0;
    background-color: var(--title-color);
    color: #A0AEC0;
}

.footer__container {
    text-align: center;
    font-size: var(--small-font-size);
}

/* ==================== MEDIA QUERIES ==================== */
/* Pour les appareils moyens (tablettes) */
@media screen and (min-width: 768px) {
    body {
        margin: 0;
    }

    .nav {
        height: calc(var(--header-height) + 1.5rem);
    }

    .nav__toggle, .nav__close {
        display: none;
    }

    .nav__list {
        flex-direction: row;
        gap: 2.5rem;
    }

    .section {
        padding: 6rem 0 2rem;
    }

    .home {
        padding: 10rem 0 5rem;
    }

    .home__container {
        text-align: left;
    }

    .home__data {
        max-width: 80%;
    }

    .gatelogix__container,
    .about__container,
    .contact__container {
        grid-template-columns: repeat(2, 1fr);
    }

    .gatelogix__title,
    #contact .section__title {
        text-align: left;
    }

    .nav__logo img {
        height: calc(var(--header-height));
    }
}

/* Pour les grands appareils (ordinateurs de bureau) */
@media screen and (min-width: 1024px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }

    .home__container {
        max-width: 900px;
    }
    
    .gatelogix__container {
        gap: 5rem;
    }
}