/* ============================================
   Mandelbrot — Mobile UI
   Interface mobile dédiée — max-width 768px
   La version desktop (style.css) n'est pas touchée.
   ============================================ */

/* Bottom nav : masqué sur desktop, rendu uniquement sur mobile */
.mobile-nav {
  display: none;
}

/* ============================================
   MOBILE INTERFACE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {

  /* ==========================================
     BODY — espace pour la barre basse
     ========================================== */
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  /* ==========================================
     NAVBAR — version épurée mobile
     ========================================== */

  /* Hamburger supprimé, la nav basse prend le relai */
  .navbar__burger {
    display: none !important;
  }

  /* Le <nav> est converti en conteneur inline pour les contrôles.
     On neutralise les règles du dropdown ajoutées dans style.css */
  .navbar__nav {
    position: static !important;
    transform: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    flex-direction: row !important;
    gap: 0.5rem !important;
    flex-shrink: 0;
  }

  /* Les liens de section sont masqués — navigation via la barre basse */
  .navbar__link {
    display: none !important;
  }

  /* Les contrôles (langue + thème) restent visibles dans la navbar */
  .navbar__controls {
    display: flex !important;
    gap: 0.5rem;
  }

  /* ==========================================
     BARRE DE NAVIGATION BASSE
     ========================================== */
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    z-index: 999;
    align-items: stretch;
  }

  .mobile-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--color-text-muted);
    font-family: var(--font-heading);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.15s ease;
    padding: 8px 4px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }

  .mobile-nav__item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .mobile-nav__item span {
    line-height: 1;
    text-align: center;
  }

  .mobile-nav__item:active {
    opacity: 0.6;
  }

  /* Onglet actif */
  .mobile-nav__item--active {
    color: var(--color-accent);
  }

  .mobile-nav__item--active svg {
    transform: translateY(-2px) scale(1.08);
  }

  /* Indicateur d'activité en haut de l'onglet */
  .mobile-nav__item--active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 0 0 3px 3px;
  }

  /* ==========================================
     HERO
     ========================================== */
  .hero {
    min-height: 100svh;
    padding: calc(var(--nav-height) + 1rem) 1.25rem 2.5rem;
    align-items: center;
  }

  .hero__content {
    max-width: 100%;
    padding: 0;
  }

  .hero__logo {
    width: min(200px, 52vw);
    margin: 0 auto 1.75rem;
  }

  .hero__title {
    font-size: clamp(2rem, 8.5vw, 2.6rem);
    margin-bottom: 1rem;
    line-height: 1.2;
  }

  .hero__subtitle {
    font-size: clamp(0.88rem, 3.5vw, 1rem);
    margin-bottom: 2rem;
    line-height: 1.7;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .hero__actions .btn {
    width: 100%;
    max-width: none;
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 14px;
    justify-content: center;
  }

  .hero__stats {
    margin-top: 2.5rem;
    padding-top: 2rem;
    gap: 2rem;
    justify-content: center;
    flex-direction: row;
  }

  .hero__stat {
    flex-direction: column;
    align-items: center;
  }

  .hero__stat-number {
    font-size: 1.6rem;
  }

  .hero__stat-divider {
    width: 1px;
    height: 36px;
  }

  /* Scroll indicator redondant avec la nav basse */
  .hero__scroll {
    display: none;
  }

  /* ==========================================
     SERVICES — Carousel horizontal
     ========================================== */
  .services {
    padding: 4rem 0 4rem;
  }

  .services__grid {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding: 0.5rem 0 1.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

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

  /* Premier et dernier enfant : marges pour aligner avec le container */
  .services__grid > *:first-child {
    margin-left: 0;
    scroll-snap-align: start;
  }

  .services__grid > *:last-child {
    margin-right: 0;
  }

  .service-card {
    flex: 0 0 min(275px, 76vw) !important;
    scroll-snap-align: start;
    padding: 1.75rem 1.5rem !important;
    border-radius: 18px !important;
  }

  .service-card__icon {
    margin-bottom: 1.25rem;
  }

  .service-card h3 {
    font-size: 1rem;
  }

  .service-card p {
    font-size: 0.88rem;
    line-height: 1.7;
  }

  /* ==========================================
     APPROCHE — Timeline verticale
     ========================================== */
  .approach {
    padding: 4rem 0 3rem;
  }

  .approach__timeline {
    flex-direction: column !important;
    gap: 0 !important;
    padding-left: 0;
  }

  .approach__line {
    top: 0 !important;
    bottom: 0 !important;
    left: 21px !important;
    right: auto !important;
    width: 2px !important;
    height: auto !important;
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(77, 163, 255, 0.35) 15%,
      rgba(77, 163, 255, 0.5) 50%,
      rgba(77, 163, 255, 0.35) 85%,
      transparent 100%
    ) !important;
  }

  .approach-step {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 1.25rem !important;
    padding-bottom: 2rem !important;
  }

  .approach-step:last-child {
    padding-bottom: 0 !important;
  }

  .approach-step__number {
    width: 44px !important;
    height: 44px !important;
    font-size: 0.85rem !important;
    flex-shrink: 0 !important;
    margin-bottom: 0 !important;
    position: relative;
    z-index: 1;
  }

  .approach-card {
    text-align: left !important;
    flex: 1;
    padding: 1.25rem 1.5rem !important;
    border-radius: 14px !important;
  }

  .approach-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .approach-card p {
    font-size: 0.88rem !important;
    line-height: 1.65;
    text-align: left !important;
  }

  /* ==========================================
     TECHNOLOGIES
     ========================================== */
  .technologies {
    padding: 4rem 0;
  }

  .tech__bento {
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto !important;
    gap: 0.875rem;
  }

  .tech-card__body {
    padding: 1.5rem !important;
    border-radius: 14px !important;
  }

  /* Le watermark numéro prend trop de place sur mobile */
  .tech-card__num {
    display: none !important;
  }

  .tech-card__desc {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  .tech-card__tags {
    gap: 0.375rem;
  }

  .tech-tag {
    font-size: 0.7rem !important;
    padding: 0.28rem 0.6rem !important;
    border-radius: 6px !important;
  }

  /* ==========================================
     ÉQUIPE
     ========================================== */
  .team {
    padding: 4rem 0;
  }

  .team__grid {
    grid-template-columns: 1fr !important;
    max-width: 380px !important;
    gap: 1.25rem;
  }

  .team-card {
    padding: 2rem 1.75rem;
    border-radius: 20px;
  }

  .team-card__photo {
    width: 110px;
    height: 110px;
  }

  .team-card__name {
    font-size: 1.15rem;
  }

  .team-card__role {
    font-size: 0.85rem;
  }

  .team-card__bio {
    font-size: 0.88rem;
    line-height: 1.75;
  }

  /* ==========================================
     CONTACT
     ========================================== */
  .contact {
    padding: 4rem 0 5rem;
  }

  .contact__grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .contact__info {
    text-align: center;
  }

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

  .contact__promises {
    align-items: center;
  }

  .contact__scope {
    text-align: center;
  }

  .section-title--left {
    text-align: center !important;
  }

  .section-title--left::before {
    margin: 0 auto 1.25rem !important;
  }

  .contact__form {
    padding: 1.75rem 1.5rem !important;
    border-radius: 20px !important;
  }

  /* ==========================================
     SECTION — Titres et sous-titres
     ========================================== */
  .section-title {
    font-size: clamp(1.65rem, 6vw, 2.2rem);
  }

  .section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }

  /* ==========================================
     FOOTER
     ========================================== */
  .footer__top {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  /* ==========================================
     SCROLL PROGRESS
     ========================================== */
  .scroll-progress {
    height: 2px;
  }

}
