/* ══════════════════════════════════════════════════════════════════════════
   AUXÉO — MOBILE FIXES (à enqueue APRÈS auxeo-style-ui.css / nav / guide)
   Cible : auxeoagency.com — viewports ≤ 768 px
   Audit du 2026-05-08 — corrections priorisées par ROI
   ══════════════════════════════════════════════════════════════════════════ */

/* ============================================================
   1. HAMBURGER & NAV MOBILE
   ============================================================ */
@media (max-width: 768px) {

  /* 1.1 — touch target conforme HIG (44×44 minimum) */
  .nav-hamburger {
    width: 44px;
    height: 44px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-hamburger span {
    width: 24px;
    height: 2px;
    background: var(--charbon, #12111F);
    border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease;
    transform-origin: center;
    display: block;
  }

  /* 1.2 — transformation hamburger → X quand .open */
  .nav-hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-hamburger.is-open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .nav-hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* 1.3 — Menu mobile : passage en overlay full-screen */
  .nav-mobile {
    position: fixed !important;
    top: 64px;             /* hauteur du header sticky */
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    overflow-y: auto;
    padding: 24px 24px 96px;
    background: rgba(244, 247, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.2,.8,.2,1);
  }
  .nav-mobile.open {
    transform: translateX(0);
  }
  body.menu-open {
    overflow: hidden;       /* lock scroll en arrière-plan */
  }

  /* 1.4 — Liens lisibles (contraste AA) */
  .nav-mobile a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 8px 0;
    font-family: var(--font-title, "Space Grotesk"), system-ui, sans-serif;
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--charbon, #12111F);
  }
  .nav-mobile-sub a {
    font-weight: 400;
    color: var(--slate, #4A5275);
    font-size: 0.9375rem;
    padding-left: 8px;
  }

  /* 1.5 — CTA primaire en bas du menu (sticky) */
  .nav-mobile .nav-cta-mobile {
    position: sticky;
    bottom: 16px;
    margin-top: 32px;
    width: 100%;
    text-align: center;
    background: var(--indigo-vif, #3D1FBF);
    color: #fff !important;
    font-weight: 600;
    padding: 16px 24px;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(61,31,191,0.32);
  }
  .nav-mobile .nav-cta-mobile:hover { color: #fff !important; }
}

/* ============================================================
   2. HERO — réintégrer la carte Reporting au lieu de la masquer
   ============================================================ */
@media (max-width: 768px) {
  .hero-visual {
    display: block !important;
    margin: 32px 0 0;
    transform: scale(0.92);
    transform-origin: top center;
  }

  /* H1 : balance + line-height plus aéré */
  .hero h1 {
    line-height: 1.15;
    text-wrap: balance;
    letter-spacing: -0.015em;
  }

  /* Sur très petits téléphones, réduire proprement le H1 */
  @media (max-width: 380px) {
    .hero h1 { font-size: 34px; }
    .hero p  { font-size: 16px; }
  }
}

/* ============================================================
   3. CLIENTS SECTION — uniformiser le vide quand pas de logos
   ============================================================ */
.clients-section .clients-empty-note {
  /* utilitaire si la section reste vide en attendant les logos */
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 212, 232, 0.10);
  color: var(--slate, #4A5275);
  font-size: 0.8125rem;
  font-style: italic;
  margin-top: 16px;
}

/* Mur de logos : grille 3 cols desktop / 2 cols mobile, monochrome */
.clients-section .clients-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 32px 24px;
  align-items: center;
  justify-items: center;
  margin: 32px auto 16px;
  max-width: 960px;
}
.clients-section .clients-grid img {
  max-width: 100%;
  max-height: 48px;
  width: auto;
  height: auto;
  filter: grayscale(1) opacity(0.65);
  transition: filter .25s ease, opacity .25s ease;
}
.clients-section .client-logo:hover img {
  filter: grayscale(0) opacity(1);
}

/* État placeholder (avant réception des vrais logos) */
.clients-section .client-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  background: rgba(26, 15, 79, 0.04);
  border: 1px dashed rgba(26, 15, 79, 0.18);
  border-radius: 6px;
  font-family: var(--font-title, "Space Grotesk"), sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--slate-soft, #8892B0);
}

.clients-section .clients-mention-soft {
  display: block;
  margin-top: 16px;
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--slate-soft, #8892B0);
  text-align: center;
}

@media (max-width: 900px) {
  .clients-section .clients-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 560px) {
  .clients-section .clients-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 16px;
  }
  .clients-section .client-logo-placeholder { height: 44px; }
}

/* ============================================================
   4. KPI — hauteurs uniformes, pas de césure
   ============================================================ */
@media (max-width: 700px) {
  .kpi-item {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .kpi-val {
    font-size: clamp(2.25rem, 9vw, 3rem) !important;
    line-height: 1 !important;
    white-space: nowrap;
  }
  .kpi-label {
    font-size: 0.8125rem;
    line-height: 1.4;
    max-width: 14ch;
    text-align: center;
  }
}

/* ============================================================
   5. DIFF SECTION — watermark 01/02/03 correctement contenu
   ============================================================ */
@media (max-width: 900px) {
  .diff-item {
    position: relative;
    overflow: hidden;     /* contient le watermark */
    padding-top: 2.5rem;
  }
  .diff-num {
    /* Le chiffre devient un eyebrow visible plutôt qu'un watermark coupé */
    position: static;
    display: inline-block;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--indigo-vif, #3D1FBF);
    opacity: 1;
    margin-bottom: 0.75rem;
    letter-spacing: 0;
    font-weight: 700;
  }
  .diff-num::after {
    content: "";
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--accent, #00D4E8);
    vertical-align: middle;
    margin-left: 12px;
    transform: translateY(-3px);
  }
}

/* ============================================================
   6. PROCESS — refonte complète en stack vertical avec timeline
   ============================================================ */
@media (max-width: 768px) {
  .process-section {
    padding: 4.5rem 0 !important;
  }
  .process-inner {
    padding: 0 24px !important;
  }

  /* Stack vertical avec ligne verticale connective */
  .process-steps {
    display: flex !important;
    flex-direction: column;
    gap: 0 !important;
    grid-template-columns: 1fr !important;
    margin-top: 2.5rem !important;
    position: relative;
    padding-left: 0;
  }
  .process-line {
    /* On masque la ligne horizontale desktop */
    display: none !important;
  }

  /* Chaque étape en card horizontal : cercle | titre+pill | description */
  .process-step {
    display: grid !important;
    grid-template-columns: 56px 1fr;
    grid-template-rows: auto auto;
    column-gap: 20px;
    row-gap: 8px;
    text-align: left !important;
    padding: 24px 0;
    position: relative;
  }

  /* Ligne verticale qui connecte les cercles */
  .process-step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 25px;             /* aligné sur le centre du cercle 50px */
    top: 78px;              /* sous le cercle */
    bottom: -8px;
    width: 2px;
    background: linear-gradient(180deg,
      rgba(0,212,232,0.4) 0%,
      rgba(61,31,191,0.4) 100%);
  }

  .process-step .step-circle {
    grid-row: 1 / 3;
    grid-column: 1;
    width: 50px !important;
    height: 50px !important;
    margin: 0 !important;
    flex-shrink: 0;
    background: rgba(0,212,232,0.08);
    border: 1.5px solid rgba(0,212,232,0.5);
    color: var(--indigo-vif, #3D1FBF);
    font-weight: 700;
    font-size: 0.95rem;
  }

  .process-step .step-title {
    grid-row: 1;
    grid-column: 2;
    font-size: 1.0625rem !important;
    margin: 0 !important;
    align-self: center;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }

  /* La pill SEMAINE X devient un badge sur la même ligne que le titre */
  .process-step .step-pill,
  .process-step .step-delay,
  .process-step [class*="step-pill"],
  .process-step .step-week {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(61,31,191,0.10);
    color: var(--indigo-vif, #3D1FBF);
    white-space: nowrap;
    line-height: 1.4;
  }

  .process-step .step-desc {
    grid-row: 2;
    grid-column: 2;
    font-size: 0.9375rem !important;
    line-height: 1.6 !important;
    color: var(--slate, #4A5275);
    margin: 0;
  }
}

/* ============================================================
   7. GUIDE ENCART — fix overflow + padding + eyebrow
   ============================================================ */
@media (max-width: 768px) {
  .guide-encart {
    padding: 0 24px !important;
    box-sizing: border-box;
  }
  .guide-encart-inner {
    margin: 0 !important;
    padding: 32px 24px !important;
    border-radius: 16px;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    max-width: 100%;
    overflow: hidden;
  }
  .guide-encart-mockup {
    display: none !important;     /* Le mockup PDF prend trop de place */
  }
  .guide-encart-content {
    width: 100%;
    padding: 0 !important;
  }

  /* Eyebrow uppercase + indigo-vif */
  .guide-encart-tag {
    display: inline-block;
    font-family: var(--font-title, "Space Grotesk"), sans-serif;
    font-size: 0.75rem !important;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--indigo-vif, #3D1FBF) !important;
    margin-bottom: 12px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
  }
  .guide-encart-title {
    font-size: 1.5rem !important;
    line-height: 1.25 !important;
    margin-bottom: 12px !important;
    color: var(--charbon, #12111F);
  }
  .guide-encart-desc {
    font-size: 0.9375rem !important;
    line-height: 1.6 !important;
    color: var(--slate, #4A5275);
    margin-bottom: 24px !important;
  }

  /* Bouton contraint à 100 % du conteneur */
  .guide-encart-inner .btn-primary,
  .guide-encart .btn-primary {
    width: 100%;
    max-width: 100%;
    margin: 0 !important;
    box-sizing: border-box;
    text-align: center;
    justify-content: center;
  }
}

/* ============================================================
   8. SECTIONS — padding-inline cohérent partout
   ============================================================ */
@media (max-width: 768px) {
  .hero,
  .hero > .container,
  .clients-section,
  .clients-section > .container,
  .kpi-section .kpi-inner,
  .about-section,
  .about-inner,
  .services-section,
  .services-inner,
  .diff-section,
  .diff-inner,
  .guarantees-section,
  .guarantees-inner,
  .process-section,
  .process-inner,
  .faq-section,
  .faq-section > .container,
  .cta-section,
  .cta-section > .container {
    padding-left: 24px !important;
    padding-right: 24px !important;
    box-sizing: border-box;
  }
  /* Cap d'une largeur max raisonnable pour les pills/eyebrow */
  .hero .eyebrow-pill,
  .hero [class*="eyebrow"] {
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* ============================================================
   9. ACCESSIBILITÉ — focus visibles, prefers-reduced-motion
   ============================================================ */
.nav-hamburger:focus-visible,
.nav-mobile a:focus-visible,
.guide-encart .btn-primary:focus-visible {
  outline: 2px solid var(--accent, #00D4E8);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .nav-mobile,
  .nav-hamburger span,
  .process-step,
  .hero-visual {
    transition: none !important;
    animation: none !important;
  }
}

/* ============================================================
   10. PAGE SERVICES — fix de l'illustration tronquée
   ============================================================ */
@media (max-width: 768px) {
  .services-page-hero .hero-illustration,
  .services-page-hero [class*="illustration"],
  .services-page-hero img {
    width: 100%;
    height: auto;
    max-height: 340px;
    object-fit: contain;
    margin-top: 24px;
  }
  .services-page-hero {
    min-height: auto !important;
    padding-bottom: 48px !important;
  }
}
