/* ==========================================
   MOBILE OVERRIDES (<= 768px)
   Objectif : rendre le site lisible et fluide sur smartphone
   - sans casser le desktop
   ========================================== */

@media (max-width: 768px) {
  /* --- HERO : titre un peu plus bas --- */
  .hero-content { padding-top: 92px !important; }
  .hero-title  { margin-top: 60px !important; }

  /* --- Compteurs : en colonne --- */
  .stats-container {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  .stats-section { padding: 2.25rem 1rem !important; }

  /* --- Carousel logos partenaires : visible sur mobile --- */
  .logo-marquee-container {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Accélérer la rotation du carrousel partenaires (x3) */
  .logo-track { animation-duration: 8.3s !important; }

  /* --- Hero cards : garder la video, cacher les vignettes images --- */
  .hero-cards {
    position: relative !important;
    height: auto !important;
    margin-top: 2.25rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    align-items: center !important;
  }

  .card-1,
  .card-3 {
    display: none !important;
  }

  /* la video (card centrale) reste visible et prend la largeur */
  .card-2 {
    position: relative !important;
    width: calc(100% - 2rem) !important;
    max-width: 560px !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
  }

  .card-2 video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  /* --- QUI SOMMES-NOUS : SVG centré --- */
  .ai-features-section { padding: 56px 0 28px !important; }

  .ai-features-section .engagement-card-wrapper {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 22px 16px !important;
    align-items: start !important;
  }

  .ai-features-section .tower-column {
    position: static !important;
    top: auto !important;
  }

  .svg-container {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  /* SVG injecté dans #svgDisplay */
  #svgDisplay {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  #svgDisplay svg {
    width: 100% !important;
    max-width: 340px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
  }

  /* --- IMPORTANT : masquer le descriptif "page" au-dessus de Qui sommes nous --- */
  .it-chart-controls,
  #pageTitle,
  #pageDescription {
    display: none !important;
  }

  /* Pagination du carousel : éviter qu'elle disparaisse ou déborde */
  .carousel-pagination {
    gap: 1rem !important;
    margin-top: 1.25rem !important;
    padding-top: 1.25rem !important;
  }

  /* Flèches (orange/bleu) : taille proche du numéro de page */
  .carousel-pagination .pagination-btn {
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
  }
  .carousel-pagination .pagination-btn svg {
    width: 26px !important;
    height: 26px !important;
    display: block;
  }

  /* --- Réduire le grand blanc entre "Qui sommes-nous" et "Nos services" --- */
  .three-phase-overlap-section {
    padding-top: 20px !important;
    padding-bottom: 70px !important;
  }

  /* --- NOS SERVICES : pleine largeur, plus d'effet "murs" --- */
  .three-phase-overlap-section .section-container-wide {
    padding: 0 !important;
  }

  .three-phase-overlap-section .phase-block {
    position: relative !important;
    top: auto !important;
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .three-phase-overlap-section .phase-content {
    padding: 26px 18px 18px !important;
    width: 100% !important;
    max-width: none !important;
  }

  .three-phase-overlap-section .phase-title {
    font-size: 1.9rem !important;
  }

  .three-phase-overlap-section .phase-description {
    max-width: none !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }

  /* ===========================
     NOS SERVICES — FOND D'ECRAN (mobile only)
     Objectif : voir le fond comme le reste du site
     =========================== */
  .three-phase-overlap-section {
    position: relative !important;
    overflow: hidden !important;
    background: transparent !important; /* laisse passer le fond global */
  }

  /* Si la section est "plate" sur mobile, on recrée un fond similaire */
  .three-phase-overlap-section::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    pointer-events: none !important;

    background:
      radial-gradient(1200px 600px at 50% -10%, rgba(255,255,255,.10), transparent 55%),
      linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  }

  /* contenu au-dessus du fond */
  .three-phase-overlap-section > * {
    position: relative !important;
    z-index: 1 !important;
  }

  /* ===========================
     MOBILE – SUPPRESSION IMAGES SERVICES (DEFINITIF)
     =========================== */
  .phase-block .phase-image,
  .phase-block .service-image,
  .phase-block img {
    display: none !important;
  }

  /* Le contenu texte prend toute la largeur */
  .phase-content,
  .service-content {
    width: 100% !important;
    max-width: 100% !important;
  }
}
@media (max-width: 768px) {

  /* ===========================================
     NOS SERVICES — TRANSPARENCE TOTALE DES VIGNETTES
     =========================================== */

  .three-phase-overlap-section .phase-block,
  .three-phase-overlap-section .phase-content,
  .three-phase-overlap-section .phase-card,
  .three-phase-overlap-section .service-card,
  .three-phase-overlap-section .service-item,
  .three-phase-overlap-section .service-box,
  .three-phase-overlap-section .phase-inner,
  .three-phase-overlap-section .phase-surface {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }

  /* Supprime aussi tout fond blanc injecté via pseudo-élément */
  .three-phase-overlap-section .phase-block::before,
  .three-phase-overlap-section .phase-block::after,
  .three-phase-overlap-section .phase-content::before,
  .three-phase-overlap-section .phase-content::after {
    content: none !important;
    background: transparent !important;
  }

  /* Sécurité ultime : inline styles */
  .three-phase-overlap-section [style*="background"],
  .three-phase-overlap-section [style*="background-color"] {
    background: transparent !important;
    background-color: transparent !important;
  }
}
