/* =====================================================
   STYLE GLOBAL STF — Bleu clair moderne + blanc
   Version optimisée + dark mode auto
   ===================================================== */

/* Thème LIGHT */
:root {
    --blue: #00c8ff;
    --blue-soft: #9ce9ff;
    --blue-dark: #005f7a;

    --white: #ffffff;
    --grey: #f5f7fa;

    --text-dark: #0d1b2a;
    --text-light: #e6f7ff;

    --radius: 14px;
    --radius-sm: 8px;

    --shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
    --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.1);

    --speed: 300ms;
    --easing: cubic-bezier(.22, .68, .37, 1);
    --font: "Poppins", sans-serif;

    background: var(--grey);
}

/* Mode sombre automatique */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #0f172a;
        --grey: #0b1120;
        --text-dark: #dbeafe;
        --text-light: #e0f7ff;
        --shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
        --blue-soft: #67d8ff;
    }
}

/* RESET & BASE */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--grey);
    color: var(--text-dark);
    line-height: 1.6;
    transition: background var(--speed), color var(--speed);
}

img {
    max-width: 100%;
    border-radius: var(--radius-sm);
}

/* HEADER */
header {
    background: var(--white);
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 999;
}

/* NAVBAR */
.nav {
    position: sticky;
    top: 0;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(0, 60, 150, 0.25);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(0, 120, 255, .25);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #d9ecff;
    font-weight: 500;
    transition: color var(--speed);
}

.nav-links a:hover { color: white; }

/* MEGA MENU */
.dropdown { position: relative; }

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;

    padding: 1.2rem;
    background: rgba(0, 40, 100, .95);
    backdrop-filter: blur(15px);

    border-radius: 10px;
    border: 1px solid rgba(100, 180, 255, .30);
    box-shadow: 0 10px 25px rgba(0, 20, 50, 0.4);

    display: flex;
    flex-direction: column;
    gap: .8rem;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .3s ease, transform .3s ease;
}

.dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu a {
    text-decoration: none;
    color: #e6f7ff;
    padding: .5rem 0;
    transition: .25s;
}

.mega-menu a:hover {
    color: white;
    transform: translateX(4px);
}

/* VERSION MOBILE AMÉLIORÉE */
@media(max-width: 850px) {
    .nav {
        flex-direction: column;
        width: 100%;
        gap: .6rem;
        padding: 1rem;
    }

    .nav-links {
        width: 100%;
        flex-direction: column;
        gap: 0.8rem;
    }

    .mega-menu {
        position: static;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background: rgba(0, 80, 180, .15);
        border: none;
        box-shadow: none;
        padding-left: 1rem;
    }
}

/* HERO */
.hero {
    height: 70vh;
    background: linear-gradient(to bottom, rgba(34, 41, 43, 0.3), rgba(0,200,255,0.1)),
                url("les logo/22.png") center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    color: var(--white);
    text-shadow: 0 3px 10px rgba(0,0,0,0.4);
    max-width: 700px;
    padding: 0 1rem;
}

.hero h2 {
    font-size: 2.7rem;
    margin-bottom: .7rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* BUTTONS */
.btn-primary,
.btn-secondary {
    padding: .8rem 1.6rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--speed);
}

.btn-primary {
    background: var(--blue);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-3px);
    background: var(--blue-soft);
}

.btn-secondary {
    border: 2px solid var(--blue);
    color: var(--blue-dark);
}

.btn-secondary:hover {
    background: var(--blue);
    color: white;
}

/* SECTIONS */
section {
    padding: 3rem 1.5rem;
    max-width: 1200px;
    margin: auto;
}

h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1.2rem;
    color: var(--blue-dark);
}

/* ====== PRODUITS SIDE-BY-SIDE ====== */
.products-grid {
    display: flex;
    flex-wrap: wrap;          /* passe sur la ligne suivante si écran trop petit */
    gap: 20px;                /* espace entre produits */
    justify-content: center;  /* centre les produits horizontalement */
    margin-top: 20px;
}

.products-grid .product {
    flex: 0 1 180px;          /* largeur fixe mais responsive */
    text-align: center;
}

.products-grid .product img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* Responsive */
@media (max-width: 700px) {
    .products-grid .product {
        flex: 0 1 140px;
    }

    .products-grid .product img {
        height: 140px;
    }
}

@media (max-width: 500px) {
    .products-grid .product {
        flex: 0 1 120px;
    }

    .products-grid .product img {
        height: 120px;
    }
}


/* FOOTER */
footer {
    background: var(--white);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
    margin-top: 3rem;
    color: var(--blue-dark);
}  