/* ===============================
   KodeFlux - Styles principaux
   =============================== */

/* ====== Couleurs principales ====== */
:root {
    --brand-light: #5a9edc; /* Bleu clair (Flux) */
    --brand-dark: #244b77; /* Bleu foncé (Kode) */
    --text: #111827; /* Couleur texte standard */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===============================
   NAVBAR
   =============================== */

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: .01em;
    transition: color .3s ease;
}

/* Couleurs par défaut du logo */
.brand-kode {
    color: var(--brand-dark);
}

.brand-flux {
    color: var(--brand-light);
}

/* Accueil : "Kode" blanc, "Flux" bleu clair */
.brand-home .brand-kode {
    color: #fff !important;
}

.brand-home .brand-flux {
    color: var(--brand-light) !important;
}

/* Navbar transparente (accueil) */
.navbar-transparent {
    background: transparent !important;
    box-shadow: none;
    transition: all .3s ease;
}

    .navbar-transparent .nav-link {
        color: #fff !important;
        transition: color .2s ease;
    }

        .navbar-transparent .nav-link:hover,
        .navbar-transparent .nav-link:focus {
            color: var(--brand-light) !important;
        }
    /* Burger blanc */
    .navbar-transparent .navbar-toggler {
        border-color: rgba(255,255,255,.5);
    }

    .navbar-transparent .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

/* Navbar solide (autres pages / hors hero) */
.navbar-solid {
    background-color: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all .3s ease;
}

    .navbar-solid .nav-link {
        color: var(--brand-dark) !important;
        transition: color .2s ease;
    }

        .navbar-solid .nav-link:hover,
        .navbar-solid .nav-link:focus {
            color: var(--brand-light) !important;
        }

/* Liens navbar - base */
.navbar .nav-link {
    padding: .75rem 1rem;
    font-weight: 600;
    font-size: 1rem;
}

/* ===============================
   BOUTONS
   =============================== */

.btn-primary {
    background-color: var(--brand-light);
    border-color: var(--brand-light);
    padding: .7rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: .5rem;
    transition: background-color .3s ease, transform .2s ease;
}

    .btn-primary:hover,
    .btn-primary:focus {
        background-color: #4d91ce;
        border-color: #4d91ce;
        transform: translateY(-2px);
    }

/* ===============================
   TITRES & CARTES
   =============================== */

.section-title {
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--brand-dark);
}

.card {
    border-radius: 1rem;
    box-shadow: 0 3px 10px rgba(0,0,0,.05);
}

/* ===============================
   LOGOS CLIENTS
   =============================== */

.logo-grid img {
    max-height: 64px;
    /* Prevent logo overflow on small screens */
    max-width: 100%;
    height: auto;
    width: auto;
    display: block;
    object-fit: contain;
    opacity: .9;
    filter: grayscale(100%);
    transition: opacity .2s, filter .2s;
}

    .logo-grid img:hover {
        opacity: 1;
        filter: none;
    }

/* Décalage d’ancre pour header fixe */
section[id] {
    scroll-margin-top: 50px;
}

@media (max-width: 992px) {
    section[id] {
        scroll-margin-top: 100px;
    }
}

/* ===============================
   HERO AVEC VIDÉO (ACCUEIL)
   =============================== */

.hero-video {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
}

/* Vidéo plein écran */
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Overlay dégradé pour lisibilité */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(36,75,119,.55) 0%, rgba(90,158,220,.25) 100%);
}

/* Contenu principal du hero */
.hero-inner {
    position: relative;
    z-index: 2;
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 14px rgba(0,0,0,.35);
    animation: fadeUp .9s ease-out both .2s;
}

    .hero-inner h1 {
        font-size: 3.5rem;
        margin-top: 1rem;
    }

    .hero-inner h5 {
        font-size: 1.2rem;
        letter-spacing: .2rem;
        text-transform: uppercase;
        margin-bottom: 1.5rem;
    }

    .hero-inner p {
        font-size: 1.1rem;
        max-width: 600px;
        margin: 0 auto 2rem;
    }

/* Animation d’apparition */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

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

/* ===============================
   ACCESSIBILITÉ
   =============================== */

@media (prefers-reduced-motion: reduce) {
    .hero-video, .hero-bg, .hero-overlay, .hero-inner {
        animation: none !important;
    }
}

/* ====== Fond blanc pour toutes les sections sauf le hero ====== */
.section-white {
    background: #fff;
}

/* A propos : texte centré + plus petit + largeur contenue */
.about-text {
    max-width: 820px;
    font-size: 1rem; /* un peu plus petit que fs-5 */
    line-height: 1.65;
}

/* ====== Services : titre visible, description au survol ====== */
.service-card {
    cursor: default;
    transition: transform .2s ease, box-shadow .2s ease;
}

    .service-card .service-title {
        color: var(--brand-dark);
        font-weight: 700;
    }

    .service-card .service-desc {
        margin-top: .75rem;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        transition: opacity .2s ease, max-height .25s ease;
    }

    .service-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0,0,0,.08);
    }

        .service-card:hover .service-desc {
            opacity: 1;
            max-height: 200px; /* assez pour 2–3 lignes */
        }

/* (Option mobile) : toujours visible au touch (pas de hover) */
@media (hover: none) {
    .service-card .service-desc {
        opacity: 1;
        max-height: 200px;
    }
}

/* ====== Centrage des titres des sections ====== */
.section-title {
    text-align: center;
}

/* ====== Fond blanc global pour sections hors hero ====== */
.section-white {
    background: #fff;
}

/* ====== Tailles/rythme comme tes captures ====== */
/* Titres de sections plus petits */
.section-title.section-title-sm {
    font-size: 1.75rem; /* ~28px */
    font-weight: 700;
    color: var(--brand-dark);
    letter-spacing: .01em;
}

@media (min-width: 992px) {
    .section-title.section-title-sm {
        font-size: 2rem;
    }
    /* ~32px sur desktop */
}

/* Paragraphe introductif (lead) plus discret */
.section-lead {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    color: #4b5563; /* gris doux */
}

.lead-sm {
    font-size: .98rem;
}
/* petit */
.about-text {
    font-size: .98rem;
}
/* A propos plus petit */

/* ====== Services en style “caps + espacement lettres”, desc. au survol ====== */
.service-card {
    border: 1px solid #eef2f7;
    padding: 3rem 2rem;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.service-title {
    text-transform: uppercase;
    letter-spacing: .22em;
    font-size: .95rem;
    font-weight: 700;
    color: #6b7280; /* gris moyen */
}

.service-desc {
    margin-top: 1rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    color: #4b5563;
    transition: opacity .25s ease, max-height .25s ease;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
    border-color: var(--brand-light);
}

    .service-card:hover .service-desc {
        opacity: 1;
        max-height: 200px;
    }

/* Mobile : toujours visible (pas de hover) */
@media (hover:none) {
    .service-desc {
        opacity: 1;
        max-height: 200px;
    }
}

/* ====== Clients : titre & texte plus petits ====== */
#clients .section-title.section-title-sm {
    margin-bottom: .75rem;
}

#clients .section-lead.lead-sm {
    margin-bottom: 2rem;
}

/* ====== Contact : titres & texte réduits ====== */
#contact .section-title.section-title-sm {
    margin-bottom: .5rem;
}

#contact .section-lead.lead-sm {
    margin-bottom: 2rem;
}

#contact p {
    font-size: .95rem;
}

/* === CLIENTS : logos en couleur (pas de gris) === */
#clients .logo-grid img {
    max-height: 64px; /* ajuste 52–80px selon tes images */
    /* Prevent logo overflow on small screens */
    max-width: 100%;
    height: auto;
    width: auto;
    display: block;
    object-fit: contain;
    opacity: 1 !important;
    filter: none !important;
    transition: transform .2s ease, box-shadow .2s ease;
}

    #clients .logo-grid img:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0,0,0,.06);
    }

    /* Si tu avais une règle globale en gris, on la neutralise ici */
    #clients .logo-grid img:hover {
        filter: none !important;
    }

/* === CONTACT : infos sur une seule ligne, responsive === */
.contact-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between; /* espace égal entre les 3 blocs */
    gap: 18px 28px;
    margin: .75rem auto 2rem;
    max-width: 1000px;
}

.ci-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #4b5563;
    font-weight: 600;
    letter-spacing: .04em;
}

    .ci-item a {
        color: inherit;
        text-decoration: none;
    }

        .ci-item a:hover {
            color: var(--brand-dark);
        }

.ci-icon {
    width: 28px;
    height: 28px;
    stroke: var(--brand-light);
    fill: none;
    stroke-width: 2;
}

/* Réduction sur petits écrans : on garde l’alignement mais on laisse passer à la ligne */
@media (max-width: 576px) {
    .contact-inline {
        justify-content: center;
    }

    .ci-item {
        min-width: 260px;
        justify-content: center;
    }
}
/* === Formulaire contact : style "souligné" + bouton sombre === */
.contact-form .cf-label {
    display: block;
    font-size: .95rem;
    letter-spacing: .06em;
    color: #9aa3af; /* gris doux */
    margin-bottom: .35rem;
}

.contact-form .cf-input {
    border: 0;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    padding: .55rem 0;
    background: transparent;
    box-shadow: none;
}

    .contact-form .cf-input:focus {
        outline: none;
        border-bottom-color: var(--brand-light);
        box-shadow: none;
    }

.btn-send {
    background: #333;
    color: #fff;
    border: 0;
    padding: .9rem 1.9rem;
    font-weight: 700;
    letter-spacing: .18em;
    border-radius: .5rem;
}

    .btn-send:hover {
        background: #1f2937;
        color: #fff;
    }

/* === Ligne d'infos (tél / adresse / mail) en une ligne === */
.contact-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px 28px;
    margin: .75rem auto 2rem;
    max-width: 1000px;
}

.ci-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #4b5563;
    font-weight: 600;
    letter-spacing: .04em;
}

    .ci-item a {
        color: inherit;
        text-decoration: none;
    }

        .ci-item a:hover {
            color: var(--brand-dark);
        }

.ci-icon {
    width: 28px;
    height: 28px;
    stroke: var(--brand-light);
    fill: none;
    stroke-width: 2;
}

@media (max-width:576px) {
    /* Mobile: chaque info sur sa ligne + centré */
    .contact-inline {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    /* FIX : icône + texte collés et centrés (annule min-width qui casse tout) */
    .ci-item {
        min-width: 0 !important; /* annule le 260px si présent ailleurs */
        width: fit-content !important; /* largeur = contenu */
        max-width: 92vw; /* évite le débordement */
        margin-left: auto;
        margin-right: auto;
        display: grid; /* alignement nickel */
        grid-template-columns: 28px auto; /* icône | texte */
        column-gap: 12px;
        align-items: center;
        justify-content: center;
        text-align: left;
    }

    .ci-icon {
        flex: 0 0 28px; /* garde une largeur fixe */
    }

    .ci-item a,
    .ci-item span {
        display: block;
        word-break: break-word;
    }
}

.contact-inline {
    margin: 1rem auto 4rem; /* top | sides | bottom */
}

@media (min-width: 992px) {
    .contact-inline {
        margin-bottom: 5rem;
    }
    /* ~64px */
}

/* ====== Formulaire compact ====== */
.contact-form.compact {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

    /* labels + petits */
    .contact-form.compact .cf-label {
        font-size: .85rem;
        margin-bottom: .15rem;
        letter-spacing: .05em;
    }

    /* champs + fins */
    .contact-form.compact .cf-input {
        padding: .35rem 0; /* hauteur réduite */
        font-size: .95rem; /* texte plus petit */
        border-bottom-width: 1px;
    }

    /* espaces verticaux réduits */
    .contact-form.compact .row {
        --bs-gutter-y: .75rem;
    }

    .contact-form.compact .text-end {
        margin-top: .75rem !important;
    }

    /* textarea plus compact */
    .contact-form.compact textarea.cf-input {
        min-height: 120px;
    }

/* bouton plus petit */
.btn-send.btn-sm {
    padding: .6rem 1.2rem;
    font-size: .85rem;
    letter-spacing: .12em;
    border-radius: .45rem;
}

/* Plus d'espace entre les logos (row Bootstrap) */
#clients .logo-grid {
    --bs-gutter-x: 5rem; /* horizontal */
    --bs-gutter-y: 5rem; /* vertical */
}

/* Option : un peu moins serré sur mobile */
@media (max-width: 576px) {
    #clients .logo-grid {
        --bs-gutter-x: 2rem;
        --bs-gutter-y: 2rem;
    }
}

