/* ========================================
   TECHMINDS AFRICA — CSS (Base Component)
   Charte: #007BFF, #000, #FFF, #F2F2F2
   ======================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #000;
    background: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    content-visibility: auto;
}

/* Smooth image appearance on load */
img[loading="lazy"] {
    background: #f3f4f6;
    transition: opacity 0.3s ease;
}

.card__img,
.other-card__img {
    aspect-ratio: 3 / 2;
    object-fit: cover;
    background: #e5e7eb;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

/* ===== UTILITIES ===== */
.container {
    max-width: 1152px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-muted {
    color: #4b5563;
    margin-bottom: 16px;
    line-height: 1.7;
}

.text-muted:last-child {
    margin-bottom: 0;
}

.rounded-img {
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    width: 100%;
    object-fit: cover;
}

.section {
    padding: 80px 0;
}

.section__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 24px;
    line-height: 1.2;
}

.section__title--center {
    text-align: center;
    margin-bottom: 48px;
}

/* ===== ANIMATIONS ===== */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate="fade-left"] {
    transform: translateX(30px);
}

[data-animate].animated {
    opacity: 1;
    transform: translate(0, 0);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn--primary {
    background: #2563eb;
    color: #fff;
    padding: 10px 20px;
}

.btn--primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn--white {
    background: #fff;
    color: #2563eb;
    padding: 12px 32px;
    font-weight: 600;
}

.btn--white:hover {
    background: #f0f4ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
}

.btn--sm {
    padding: 10px 20px;
    font-size: 0.875rem;
    border-radius: 10px;
}

.btn--lg {
    padding: 14px 32px;
    font-size: 1rem;
    border-radius: 12px;
}


/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid #e5e7eb;
    transition: box-shadow 0.3s;
}

.navbar.scrolled {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.navbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.navbar__logo {
    display: flex;
    align-items: center;
}

.navbar__logo-img {
    height: 40px;
    width: auto;
}

.navbar__menu {
    display: none;
    gap: 24px;
}

.navbar__link {
    font-size: 0.875rem;
    color: #374151;
    transition: color 0.2s;
}

.navbar__link:hover,
.navbar__link.active {
    color: #2563eb;
}

.navbar__toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.navbar__toggle span {
    width: 22px;
    height: 2px;
    background: #374151;
    border-radius: 2px;
    transition: all 0.3s;
}

.navbar__toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar__toggle.open span:nth-child(2) {
    opacity: 0;
}

.navbar__toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Nav CTA button - hidden on mobile */
.navbar__inner > .btn {
    display: none;
}

@media (min-width: 768px) {
    .navbar__menu {
        display: flex;
    }

    .navbar__toggle {
        display: none;
    }

    .navbar__inner > .btn {
        display: inline-flex;
    }
}

/* Mobile menu open */
.navbar__menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}


/* ========================================
   HERO
   ======================================== */
.hero {
    background: linear-gradient(135deg, #1d4ed8 0%, #000 100%);
    color: #fff;
    padding: 128px 0 96px;
}

.hero__inner {
    display: grid;
    gap: 40px;
    align-items: center;
}

.hero__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 24px;
}

.hero__subtitle {
    font-size: 1.125rem;
    color: #d1d5db;
    line-height: 1.7;
    margin-bottom: 32px;
}

.hero__img {
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    width: 100%;
    object-fit: cover;
    aspect-ratio: 3/2;
}

@media (min-width: 768px) {
    .hero__inner {
        grid-template-columns: 1fr 1fr;
    }

    .hero__title {
        font-size: 3.5rem;
    }
}


/* ========================================
   A PROPOS
   ======================================== */
.apropos {
    background: #fff;
}

.apropos__inner {
    display: grid;
    gap: 40px;
    align-items: center;
}

.apropos__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid #e5e7eb;
}

.apropos__stat {
    text-align: center;
}

.apropos__stat-number {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #2563eb;
    line-height: 1.2;
}

.apropos__stat-label {
    font-size: 0.75rem;
    color: #4b5563;
    font-weight: 500;
}

@media (min-width: 768px) {
    .apropos__inner {
        grid-template-columns: 1fr 1fr;
    }
}


/* ========================================
   POSITIONNEMENT
   ======================================== */
.positionnement {
    background: #f9fafb;
}

.positionnement__inner {
    display: grid;
    gap: 40px;
    align-items: center;
}

.positionnement__list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.positionnement__list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9375rem;
    color: #374151;
    font-weight: 500;
}

@media (min-width: 768px) {
    .positionnement__inner {
        grid-template-columns: 1fr 1fr;
    }
}


/* ========================================
   SERVICES / EXPERTISE
   ======================================== */
.services {
    background: #f9fafb;
}

.services__subtitle {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 48px;
}

.text-center {
    text-align: center;
}

.services__grid {
    display: grid;
    gap: 28px;
}

@media (min-width: 768px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Service card — clean minimal style */
.card--service {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card--service:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.card--service .card__img {
    height: 220px;
    width: 100%;
    object-fit: cover;
    display: block;
}

.card--service .card__body {
    padding: 24px 24px 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card--service .card__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 10px;
    line-height: 1.3;
}

.card--service .card__text {
    font-size: 0.875rem;
    line-height: 1.7;
    color: #4b5563;
    margin: 0 0 16px;
}

.card--service .card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    margin-top: auto;
    transition: gap 0.25s ease, color 0.25s ease;
}

.card--service .card__link:hover {
    color: #1d4ed8;
    gap: 10px;
}

.card--service .card__link svg {
    transition: transform 0.25s ease;
}

.card--service .card__link:hover svg {
    transform: translateX(2px);
}

/* ===== CARDS (shared) ===== */
.card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.card__img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.card__body {
    padding: 24px;
}

.card__title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 8px;
    color: #000;
}

.card__text {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ===== Formation card badge ===== */
.card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    z-index: 2;
}

.card__badge--green {
    background: #22c55e;
    color: #fff;
}

.card__badge--blue {
    background: #2563eb;
    color: #fff;
}

.card--formation .card__text {
    margin-bottom: 16px;
}

/* Formation card as link */
a.card--link {
    display: block;
    color: inherit;
    text-decoration: none;
}

a.card--link,
a.card--link:visited,
a.card--link:active {
    color: inherit;
}

a.card--link .card__title,
a.card--link:visited .card__title {
    color: #000;
}

a.card--link:hover .card__title {
    color: #2563eb;
}


/* ========================================
   FORMATIONS
   ======================================== */
.formations {
    background: #f3f4f6;
    overflow: hidden;
}

.formations .container {
    margin-bottom: 0;
}

/* ===== CAROUSEL ===== */
.carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 0 0 24px;
}

.carousel__track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 8px 24px 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel__track::-webkit-scrollbar {
    display: none;
}

.carousel__track .card {
    flex: 0 0 calc((100% - 20px) / 2);
    scroll-snap-align: start;
    min-width: 240px;
}

/* Card body flex layout for uniform height */
.carousel__track .card--formation {
    display: flex;
    flex-direction: column;
}

.carousel__track .card--formation .card__img {
    flex-shrink: 0;
}

.carousel__track .card--formation .card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.carousel__track .card--formation .card__text {
    flex: 1;
}

.carousel__track .card--formation .btn {
    align-self: flex-start;
    margin-top: auto;
}

@media (min-width: 768px) {
    .carousel__track {
        padding: 8px max(24px, calc((100% - 1152px) / 2 + 24px)) 16px;
    }

    .carousel__track .card {
        flex: 0 0 calc((min(1152px, 100vw - 48px) - 60px) / 4);
        min-width: 200px;
    }
}

.carousel__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 24px 0;
}

.carousel__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: #fff;
    cursor: pointer;
    color: #374151;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.carousel__btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.carousel__btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.carousel__dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.carousel__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.25s ease;
}

.carousel__dot--active {
    background: #2563eb;
    width: 24px;
    border-radius: 4px;
}

.formations .card {
    background: #fff;
}


/* ========================================
   APPROCHE
   ======================================== */
.approche {
    background: #fff;
}

.approche__grid {
    display: grid;
    gap: 24px;
}

@media (min-width: 768px) {
    .approche__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.approche__step {
    position: relative;
    background: #f9fafb;
    border-radius: 16px;
    overflow: hidden;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.approche__step:hover {
    transform: translateY(-6px);
}

.approche__img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.approche__img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.approche__number {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
    background: #2563eb;
    border-radius: 10px;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.approche__label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    padding: 16px;
    color: #000;
}

/* Hide number on hover to avoid overlap with overlay text */
.approche__step:hover .approche__number {
    opacity: 0;
}

/* Overlay on image hover */
.approche__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 12px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.approche__step:hover .approche__overlay {
    opacity: 1;
}

/* Touch devices: tap to reveal */
@media (hover: none) {
    .approche__step:active .approche__overlay,
    .approche__step:focus-within .approche__overlay {
        opacity: 1;
    }
}

.approche__overlay-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.approche__overlay-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   CLIENTS / REFERENCES
   ======================================== */
.clients {
    background: #fff;
}

.clients__inner {
    display: grid;
    gap: 40px;
    align-items: center;
}

@media (min-width: 768px) {
    .clients__inner {
        grid-template-columns: 1fr 1fr;
    }
}

.clients__quote {
    background: #f9fafb;
    padding: 24px;
    border-radius: 12px;
    font-style: italic;
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-top: 24px;
    border-left: 4px solid #2563eb;
}


/* ========================================
   CONTACT SECTION
   ======================================== */
.contact-section {
    background: #f9fafb;
}

.contact__subtitle {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 48px;
}

.contact__grid {
    display: grid;
    gap: 40px;
    align-items: start;
}

@media (min-width: 768px) {
    .contact__grid {
        grid-template-columns: 1fr 1.2fr;
    }
}

/* Contact Info */
.contact__info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact__info-block {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact__info-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    border-radius: 12px;
}

.contact__info-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 2px;
}

.contact__info-text {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.6;
}

.contact__socials {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 8px;
}

.btn--whatsapp {
    background: #22c55e;
    color: #fff;
}

.btn--whatsapp:hover {
    background: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Contact Form */
.contact__form {
    background: #fff;
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form__label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
}

.form__input {
    padding: 12px 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #000;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form__input::placeholder {
    color: #9ca3af;
}

.form__input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form__textarea {
    resize: vertical;
    min-height: 120px;
}

.form__submit {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
}

@media (max-width: 767px) {
    .contact__form {
        padding: 24px;
    }
}


/* ========================================
   WHATSAPP FLOATING BUTTON
   ======================================== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #22c55e;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
    z-index: 999;
    transition: transform 0.2s, box-shadow 0.2s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(34, 197, 94, 0.5);
}


/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: #000;
    color: #fff;
    font-size: 0.875rem;
}

.footer__inner {
    display: grid;
    gap: 40px;
    padding: 56px 0 40px;
}

@media (min-width: 768px) {
    .footer__inner {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer__logo {
    height: 36px;
    width: auto;
    margin-bottom: 12px;
    filter: brightness(0) invert(1);
}

.footer__tagline {
    font-size: 0.8125rem;
    color: #9ca3af;
    line-height: 1.6;
    max-width: 280px;
}

.footer__heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer__links a {
    font-size: 0.8125rem;
    color: #9ca3af;
    transition: color 0.2s;
}

.footer__links a:hover {
    color: #fff;
}

.footer__bottom {
    border-top: 1px solid #1f2937;
    padding: 20px 24px;
    text-align: center;
    color: #6b7280;
    font-size: 0.75rem;
}


/* ========================================
   RESPONSIVE (small screens)
   ======================================== */
@media (max-width: 767px) {
    .hero {
        padding: 100px 0 64px;
    }

    .hero__title {
        font-size: 2rem;
    }

    .section {
        padding: 56px 0;
    }

    .section__title {
        font-size: 1.5rem;
    }

    .services__grid {
        grid-template-columns: 1fr;
    }

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