/* ==========================================================================
   TBSystems - Feuille de style principale (Bleu & Blanc)
   ⚠️ Le CSS du carousel/héro est dans index.php (pas ici, pour éviter le double)
   ========================================================================== */

:root {
    --navy: #0A2540;
    --navy-light: #123159;
    --blue: #1E5FD9;
    --blue-dark: #164BB0;
    --blue-pale: #EAF1FE;
    --white: #FFFFFF;
    --grey-bg: #F4F7FC;
    --text-dark: #16233A;
    --text-muted: #5B6B85;
    --border-soft: #E1E8F5;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--white);
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, .font-heading {
    font-family: var(--font-heading);
    color: var(--navy);
    font-weight: 700;
}

a { text-decoration: none; }

.container-xl {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.eyebrow {
    display: inline-block;
    color: var(--blue);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.section-underline {
    width: 56px;
    height: 4px;
    background: var(--blue);
    border-radius: 2px;
    margin: 10px 0 20px;
}

/* ---------- Boutons ---------- */
.btn-tb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all .2s ease;
    border: 2px solid transparent;
    cursor: pointer;
}
.btn-tb-primary { background: var(--blue); color: var(--white); }
.btn-tb-primary:hover { background: var(--blue-dark); color: var(--white); }
.btn-tb-outline { background: transparent; border-color: rgba(255,255,255,0.5); color: var(--white); }
.btn-tb-outline:hover { background: rgba(255,255,255,0.12); border-color: var(--white); color: var(--white); }
.btn-tb-outline-navy { background: transparent; border-color: var(--blue); color: var(--blue); }
.btn-tb-outline-navy:hover { background: var(--blue); color: var(--white); }

/* ---------- En-tête fixe ---------- */
.site-header { position: sticky; top: 0; z-index: 999; }

/* ---------- Top bar ---------- */
.topbar {
    background: var(--navy);
    color: rgba(255,255,255,0.85);
    font-size: 0.85rem;
    padding: 8px 0;
}
.topbar a { color: rgba(255,255,255,0.85); }
.topbar a:hover { color: var(--white); }
.topbar .topbar-item { display: inline-flex; align-items: center; gap: 6px; margin-right: 24px; }
.topbar .social-icons a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
    margin-left: 6px; color: var(--white); font-size: 0.8rem;
    transition: background .2s;
}
.topbar .social-icons a:hover { background: var(--blue); }

/* ---------- Navbar ---------- */
.navbar-tb { background: var(--white); padding: 0; box-shadow: 0 2px 14px rgba(10,37,64,0.06); }
.navbar-tb-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.navbar-tb .navbar-brand, .navbar-tb-inner .navbar-brand { display: flex; align-items: center; gap: 12px; }
.logo-mark {
    width: 48px; height: 48px; border-radius: 10px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%);
    color: var(--white); display: flex; align-items: center; justify-content: center;
    font-family: var(--font-heading); font-weight: 800; font-size: 1.15rem;
    letter-spacing: -1px; flex-shrink: 0;
}
.brand-text .brand-name { font-family: var(--font-heading); font-weight: 800; color: var(--navy); font-size: 1.15rem; line-height: 1.1; display: block; }
.brand-text .brand-tagline { color: var(--text-muted); font-size: 0.72rem; display: block; }

.navbar-nav-tb { display: flex; align-items: center; gap: 6px; }
.nav-item-tb { position: relative; }
.nav-link-tb {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--text-dark); font-weight: 600; font-size: 0.95rem;
    padding: 30px 14px; position: relative;
}
.nav-link-tb.active, .nav-link-tb:hover { color: var(--blue); }
.nav-link-tb.active::after {
    content: ''; position: absolute; left: 14px; right: 14px; bottom: 22px;
    height: 2px; background: var(--blue);
}
.mega-arrow { font-size: 0.7rem; transition: transform .2s; }
.nav-item-tb:hover .mega-arrow { transform: rotate(180deg); }
.navbar-tb-actions { display: flex; align-items: center; gap: 14px; }

.lang-switch { display: flex; border: 1px solid var(--border-soft); border-radius: 6px; overflow: hidden; }
.lang-switch a { padding: 6px 12px; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.lang-switch a.active { background: var(--blue); color: var(--white); }
.lang-switch-topbar { border-color: rgba(255,255,255,0.25); margin-left: 16px; }
.lang-switch-topbar a { color: rgba(255,255,255,0.75); padding: 4px 10px; }
.lang-switch-topbar a.active { background: var(--blue); color: var(--white); }
.lang-switch-mobile { align-self: flex-start; }

/* ---------- Méga-menu ---------- */
.mega-dropdown {
    position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 380px; background: var(--white); border-radius: 12px;
    box-shadow: 0 22px 50px rgba(10,37,64,0.16);
    border: 1px solid var(--border-soft);
    opacity: 0; visibility: hidden; transition: all .22s ease; z-index: 1000;
}
.mega-dropdown-wide { width: 640px; }
.nav-item-tb:hover .mega-dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega-inner { padding: 20px; }
.mega-header { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border-soft); color: var(--blue); }
.mega-header i { font-size: 1.2rem; }
.mega-header h3 { font-size: 1rem; margin: 0; color: var(--navy); }
.mega-links { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.mega-links-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
.mega-links li a { display: flex; align-items: flex-start; gap: 10px; padding: 10px 8px; border-radius: 8px; color: var(--text-dark); transition: background .15s; }
.mega-links li a:hover { background: var(--blue-pale); color: var(--blue); }
.mega-links li a i { font-size: 1rem; color: var(--blue); margin-top: 2px; flex-shrink: 0; }
.mega-links li a span { display: flex; flex-direction: column; gap: 2px; }
.mega-links li a strong { font-size: 0.85rem; font-weight: 600; line-height: 1.25; }
.mega-links li a small { font-size: 0.75rem; color: var(--text-muted); }
.mega-footer-link { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-soft); color: var(--blue); font-weight: 600; font-size: 0.88rem; }

/* ---------- Menu mobile ---------- */
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 34px; height: 34px; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--navy); transition: all .25s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav { display: none; flex-direction: column; background: var(--white); border-top: 1px solid var(--border-soft); padding: 10px 24px 20px; }
.mobile-nav.open { display: flex; }
.mobile-link { padding: 12px 0; font-weight: 600; color: var(--text-dark); border-bottom: 1px solid var(--border-soft); }
.mobile-accordion { border-bottom: 1px solid var(--border-soft); }
.mobile-accordion-btn { width: 100%; background: none; border: none; display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-weight: 600; font-size: 0.95rem; color: var(--text-dark); cursor: pointer; }
.mobile-accordion-btn i { transition: transform .2s; font-size: 0.8rem; }
.mobile-accordion-btn.open i { transform: rotate(180deg); }
.mobile-accordion-panel { max-height: 0; overflow: hidden; transition: max-height .25s ease; display: flex; flex-direction: column; }
.mobile-accordion-panel.open { max-height: 900px; padding-bottom: 10px; }
.mobile-accordion-panel a { padding: 8px 0 8px 14px; font-size: 0.88rem; color: var(--text-muted); border-left: 2px solid var(--border-soft); }
.mobile-accordion-panel a:hover { color: var(--blue); border-left-color: var(--blue); }

@media (max-width: 991px) {
    .navbar-nav-tb { display: none; }
    .navbar-tb-actions .btn-tb-primary.d-lg-inline-flex { display: none !important; }
    .nav-toggle { display: flex; }
}

/* ---------- Services (accueil) ---------- */
.services-section { padding: 90px 0; background: var(--white); }
.service-card {
    background: var(--white); border: 1px solid var(--border-soft); border-radius: 12px;
    padding: 26px 18px; height: 100%; display: flex; flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(10,37,64,0.09); border-color: transparent; }
.service-icon {
    width: 50px; height: 50px; border-radius: 12px; background: var(--blue-pale);
    color: var(--blue); display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem; margin-bottom: 16px;
}
.service-card h3 { font-size: 0.98rem; margin-bottom: 8px; line-height: 1.3; }
.service-card p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 14px; flex-grow: 1; }
.service-card .learn-more { color: var(--blue); font-weight: 600; font-size: 0.82rem; margin-top: auto; }
.service-card .learn-more i { transition: transform .2s; }
.service-card:hover .learn-more i { transform: translateX(4px); }

/* Carte de service AVEC photo (uploadée depuis l'admin) */
.service-card.has-photo { padding: 0; overflow: hidden; }
.service-card.has-photo .service-card-photo {
    width: 100%; height: 190px; background-size: cover; background-position: center;
    background-color: var(--blue-pale); border-radius: 0; margin-bottom: 0;
}
.service-card.has-photo .service-card-body { padding: 20px 18px; }
.service-card.has-photo .service-icon {
    margin-top: -34px; position: relative; z-index: 2;
    box-shadow: 0 8px 20px rgba(10,37,64,0.18); border: 3px solid var(--white);
}

/* ---------- About band ---------- */
.about-band { background: var(--grey-bg); padding: 70px 0; }
.about-card { display: flex; flex-wrap: wrap; align-items: stretch; background: var(--white); border-radius: 16px; overflow: hidden; box-shadow: 0 24px 55px rgba(10,37,64,0.14); }
.about-card-text { flex: 1 1 360px; background: var(--navy); color: var(--white); padding: 46px 42px; display: flex; flex-direction: column; justify-content: center; }
.about-card-text .eyebrow { color: #6FA0FF; }
.about-card-text h2 { color: var(--white); font-size: 1.7rem; }
.about-card-text p { color: rgba(255,255,255,0.78); margin-bottom: 24px; font-size: 0.95rem; }
.about-card-photo {
    flex: 0 0 260px; min-height: 220px;
    background-size: cover; background-position: center;
    background-color: var(--navy-light);
    display: flex; align-items: center; justify-content: center;
}
.about-card-stats { flex: 1 1 420px; display: flex; align-items: center; justify-content: space-around; flex-wrap: wrap; gap: 20px; padding: 30px 24px; }
.stat-pill { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; min-width: 100px; }
.stat-pill .stat-icon { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--blue); display: flex; align-items: center; justify-content: center; color: var(--blue); font-size: 1.4rem; }
.stat-pill .stat-number { font-family: var(--font-heading); font-weight: 800; font-size: 1.7rem; color: var(--navy); line-height: 1; }
.stat-pill .stat-label { color: var(--text-muted); font-size: 0.8rem; }

@media (max-width: 767px) {
    .about-card { flex-direction: column; border-radius: 14px; }
    .about-card-photo { flex-basis: 200px; min-height: 200px; }
    .about-card-stats { justify-content: space-between; padding: 26px 18px; }
    .stat-pill { min-width: 40%; }
}

/* ---------- CTA ---------- */
.cta-band { background: linear-gradient(120deg, var(--blue-dark), var(--navy)); padding: 60px 0; text-align: center; }
.cta-band h2 { color: var(--white); margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,0.8); max-width: 600px; margin: 0 auto 28px; }

/* ---------- Valeurs ---------- */
.values-section { padding: 80px 0; background: var(--white); }
.value-card { text-align: center; padding: 30px 16px; height: 100%; }
.value-icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: var(--blue-pale); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.value-card h3 { font-size: 1rem; margin-bottom: 8px; }
.value-card p { color: var(--text-muted); font-size: 0.86rem; line-height: 1.55; }

/* ---------- Management / équipe ---------- */
.team-section { padding: 80px 0; background: var(--grey-bg); }
.team-card { text-align: center; }
.team-photo {
    width: 140px; height: 140px; margin: 0 auto 18px; border-radius: 50%;
    background-size: cover; background-position: center; background-color: var(--blue-pale);
    border: 4px solid var(--white); box-shadow: 0 10px 26px rgba(10,37,64,0.12);
    display: flex; align-items: center; justify-content: center; position: relative;
}
.team-photo-fallback { font-size: 2.6rem; color: var(--blue); opacity: 0.5; }
.team-card h3 { font-size: 1.02rem; margin-bottom: 4px; }
.team-card p { color: var(--blue); font-size: 0.85rem; font-weight: 600; }

/* ---------- Footer ---------- */
.footer-tb { background: var(--navy); color: rgba(255,255,255,0.7); padding: 70px 0 0; }
.footer-tb h5 { color: var(--white); font-size: 1rem; margin-bottom: 20px; }
.footer-tb p, .footer-tb li { color: rgba(255,255,255,0.65); font-size: 0.92rem; }
.footer-tb ul { list-style: none; padding: 0; margin: 0; }
.footer-tb ul li { margin-bottom: 12px; line-height: 1.5; }
.footer-tb ul li a { color: rgba(255,255,255,0.65); }
.footer-tb ul li a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 50px; padding: 22px 0; font-size: 0.85rem; text-align: center; color: rgba(255,255,255,0.5); }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08); color: var(--white); margin-right: 8px; }
.footer-social a:hover { background: var(--blue); }
/* ---------- Logo image (navbar + footer) : PETIT et FIN ---------- */
.logo-img {
    height: 42px;              /* petit */
    width: auto;
    max-width: 120px;          /* pas trop large */
    object-fit: contain;       /* garde les proportions, ne déforme pas */
    flex-shrink: 0;
    border-radius: 50%;        /* arrondi si logo circulaire */
}

/* Fond blanc discret dans le footer (fond navy) */
.footer-logo-wrap {
    background: var(--white);
    border-radius: 50%;        /* cercle blanc autour du logo */
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.footer-logo-wrap .logo-img {
    height: 40px;
    max-width: 110px;
}

