/* ============================================================
   mobile.css — Adaptation téléphone / tablette
   Utilisé par : index.html, services.html, service.html, tarif.html

   Tout est dans des @media (max-width: ...) : le rendu ordinateur
   (> 900px) n'est PAS modifié. Ce fichier est chargé après le <style>
   de chaque page pour pouvoir surcharger ses règles.
   ============================================================ */

/* ── Sécurités générales (petits écrans et tablettes) ───────── */
@media (max-width: 900px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-wrap: break-word; }
  img, video, iframe, svg { max-width: 100%; }

  /* ── Menu burger ────────────────────────────────────────────
     Le menu s'accroche sous le header quelle que soit sa hauteur
     (avant : top:70px fixe, il chevauchait le header de ~116px). */
  .nav-inner { padding: 0 16px; }
  .nav-links {
    position: absolute !important;
    top: 100% !important;
    max-height: calc(100vh - 100px) !important;
    max-height: calc(100dvh - 100px) !important;
    -webkit-overflow-scrolling: touch;
    gap: 0 !important;
    padding: 8px 20px 20px !important;
    align-items: stretch !important;
  }
  .nav-links > a,
  .nav-item-dropdown > a {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #eef1f4;
    font-size: 17px;
  }
  .nav-links a::after { display: none; }
  /* Pastilles crédit d'impôt / qualité, visibles dans le menu ouvert */
  .nav-links a.nav-cta {
    display: flex !important;
    justify-content: center;
    gap: 16px;
    padding: 16px 0 0;
    margin-top: 8px;
    border: none;
    background: none;
    box-shadow: none;
    border-radius: 0;
  }
  .nav-toggle { padding: 10px; margin-right: -10px; }
  #navToggle { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
}

/* ── Téléphones et petites tablettes ────────────────────────── */
@media (max-width: 768px) {

  body { font-size: 16px; line-height: 1.7; }

  /* Header plus compact */
  #navbar { padding: 10px 0; }
  #navbar.scrolled { padding: 8px 0; }
  .nav-logo { gap: 8px; }
  .nav-logo-icon { width: 56px; height: 56px; }
  .nav-logo-icon img { width: 100%; height: 100%; object-fit: contain; }
  .nav-logo-text { font-size: 9px; width: 96px; line-height: 1.3; }

  /* Espacements généraux */
  section { padding: 48px 0; }
  .container { padding: 0 20px; }

  /* Titres et textes : les valeurs desktop (58px / 26px) sont trop grandes */
  .section-title { font-size: clamp(28px, 8vw, 36px) !important; margin-bottom: 16px; line-height: 1.2; }
  .section-sub { font-size: 17px; line-height: 1.7; max-width: 100%; }
  .section-label { font-size: 12px; letter-spacing: .1em; }

  /* ── Hero (index) ─────────────────────────────────────────── */
  #hero {
    min-height: 100vh;
    min-height: 100svh;
    padding: 100px 0 48px;
  }
  .hero-inner {
    width: 100%;
    padding: 0 20px !important;
    gap: 0;
  }
  .hero-content { width: 100%; }
  .hero-badge { margin-bottom: 24px; max-width: 100%; }
  .hero-title {
    width: 100% !important;   /* avant : 1100px en dur → faisait déborder toute la page */
    top: 0 !important;
    font-size: clamp(28px, 8vw, 36px);
    line-height: 1.2;
    margin-bottom: 8px;
  }
  .hero-btns {
    bottom: 0 !important;
    margin-top: 28px;
    width: 100%;
    gap: 12px;
  }
  .btn-primary, .btn-secondary {
    padding: 14px 22px;
    font-size: 16px;
    min-height: 48px;
    justify-content: center;
  }

  /* Carte « Suivi personnalisé » : visible sur téléphone (avant : display:none),
     placée sous les boutons au lieu d'être en position absolue */
  .hero-visual { display: block !important; width: 100%; margin-top: 28px; }
  .hero-card-float,
  .hero-card-float.card-1,
  .hero-card-float.card-2,
  .hero-card-float.card-3 {
    position: relative;
    top: auto; right: auto; bottom: auto; left: auto;
    width: fit-content; max-width: 100%; height: auto;
    margin: 0 auto 12px;
    padding: 10px 18px 10px 12px;
    justify-content: center;
    text-align: left;
  }
  .hero-card-icon { width: 44px; height: 44px; flex-shrink: 0; }
  .hero-card-txt strong { font-size: 15px; }
  .hero-card-txt span { font-size: 13px; }

  /* Bandeau image + citation */
  .img-banner { height: 42vh; min-height: 260px; }
  .img-banner-text { padding: 0 20px; }
  .img-banner-text p { font-size: clamp(18px, 5vw, 24px); line-height: 1.4; padding-bottom: 8px; }
  /* Bandeau titre (service.html / tarif.html) : marge gauche de 50px en dur */
  .img-banner > div[style*="z-index:2"] { padding: 0 20px !important; }
  .img-banner > div[style*="z-index:2"] > div { padding-left: 0 !important; }
  .img-banner h1 { font-size: clamp(30px, 9vw, 42px) !important; line-height: 1.1 !important; }

  /* ── À propos / Confiance ─────────────────────────────────── */
  .about-grid, .trust-grid, .contact-grid { gap: 28px; }
  /* Paragraphes avec font-size:26px écrit directement dans le HTML */
  p[style*="font-size: 26px"], p[style*="font-size:26px"] {
    font-size: 17px !important;
    line-height: 1.7 !important;
  }
  .about-value strong { font-size: 19px; }
  .trust-icon { padding: 14px 16px; }
  .trust-icon h3 { font-size: 19px; }
  .trust-body, .trust-body p { font-size: 16px; }
  .trust-illustration { width: 100%; }
  .trust-text { font-size: 16px; margin-top: 32px; }

  /* ── Comment ça marche : espace entre les étapes ─────────── */
  .process-steps { margin-top: 36px; row-gap: 36px; }
  .process-step { padding: 0 8px; }
  .step-num { width: 60px; height: 60px; font-size: 22px; margin-bottom: 16px; }
  .process-step h3 { font-size: 20px; }
  .process-step p { font-size: 16px; }

  /* ── Témoignages ─────────────────────────────────────────── */
  .testimonials-grid { margin-top: 32px; gap: 16px; }
  .testi-card { padding: 22px 20px; }
  .testi-text { font-size: 16px; }

  /* ── Formulaire de contact ───────────────────────────────── */
  .contact-form, .contact-form-wrap { padding: 24px 18px; }
  input, select, textarea { font-size: 16px !important; } /* évite le zoom auto d'iOS */
  input, select, textarea, button { max-width: 100%; }

  /* Animations d'entrée : pas de décalage horizontal (source de scroll latéral) */
  .reveal-left, .reveal-right { transform: translateY(28px); }

  /* ── Tarifs (tarif.html) ─────────────────────────────────── */
  .tarifs-card, .avantages-card { padding: 24px 18px; }
  .tarifs-table thead th { padding: 12px 14px; font-size: 13px; }
  .tarifs-table tbody td { padding: 12px 14px; font-size: 17px; line-height: 1.3; }
  .tarifs-table td.service { white-space: nowrap; }

  /* ── Pages services / service ────────────────────────────── */
  .services-header { margin-bottom: 28px; }

  /* ── Pied de page ────────────────────────────────────────── */
  footer { padding-top: 48px; }
  .footer-grid { gap: 28px; }
  .footer-bottom-links { flex-wrap: wrap; justify-content: center; gap: 8px 16px; }

  /* ── Bouton retour en haut ───────────────────────────────── */
  #btt { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}

/* ── Très petits écrans (≤ 400px : iPhone SE, petits Android) ─ */
@media (max-width: 400px) {
  .container { padding: 0 16px; }
  .hero-inner { padding: 0 16px !important; }
  .nav-logo-icon { width: 48px; height: 48px; }
  .nav-logo-text { width: 84px; font-size: 8px; }
  .step-num { width: 54px; height: 54px; }
}
