/* ═══════════════════════════════════════════════════════════════════════
   Acheter Officine — corrections de l'affichage mobile (téléphones)
   Chargée en dernier sur toutes les pages, juste avant </head>.
   Toutes les règles sont dans des media queries : l'affichage ordinateur
   ne change pas. Les !important servent uniquement à passer devant les
   styles écrits directement dans les pages (attributs style="...").
   ═══════════════════════════════════════════════════════════════════════ */

/* Lien vers le simulateur ajouté dans le haut de l'accueil : mobile uniquement */
.hero-estimer-mobile { display: none; }
/* Version courte d'un texte (sans la liste des zones) : mobile uniquement */
.zones-court { display: none; }

@media (max-width: 768px) {

  /* ── 1. Barre d'actions fixe en bas d'écran : « Appeler » | « Prendre RDV »
        (remplace les deux boutons flottants empilés qui cachaient le texte).
        Le contenu garde une marge basse de la hauteur de la barre. ── */
  body:has(.float-cta) { padding-bottom: calc(58px + env(safe-area-inset-bottom)) !important; }
  .float-call,
  .float-cta {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    width: 50% !important;
    height: calc(58px + env(safe-area-inset-bottom)) !important;
    margin: 0 !important;
    padding: 0 10px env(safe-area-inset-bottom) !important;
    border-radius: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    box-shadow: 0 -6px 18px rgba(44, 50, 54, 0.10) !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 70 !important;
  }
  .float-call {
    left: 0 !important;
    right: auto !important;
    background: #FFFFFF !important;
    color: #2C3236 !important;
    border: 0 !important;
    border-top: 1px solid #ECECEC !important;
  }
  .float-call svg { color: #7BA73B; }
  .float-cta {
    right: 0 !important;
    left: auto !important;
    background: #9ECA4F !important;
    color: #2C3236 !important;
    border: 0 !important;
  }
  .float-cta .label-long { display: inline !important; } /* texte « Prendre RDV » des articles, masqué par l'ancien bouton rond */
  body:not(:has(.float-call)) .float-cta { width: 100% !important; }
  /* Bouton « remonter » : petit, à droite, au-dessus de la barre */
  .back-to-top {
    left: auto !important;
    right: 12px !important;
    bottom: calc(70px + env(safe-area-inset-bottom)) !important;
    width: 40px !important;
    height: 40px !important;
  }

  /* ── 2. Menus déroulants de l'ordinateur : retirés sur mobile (le menu
        latéral les remplace). Invisibles mais présents, ils élargissaient
        la page et permettaient de la faire glisser de côté. ── */
  .nav-links .mega { display: none !important; }

  /* ── 3. Espacements : moins de vide en haut des pages et entre les sections ── */
  .page-hero { padding-top: 16px !important; padding-bottom: 12px !important; }
  section.has-particles.particles-bare > .container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  main > section, main > div > section { padding-top: 28px; padding-bottom: 28px; }
  .apropos-hero { padding-top: 12px !important; padding-bottom: 24px !important; }
  .apropos-hero .breadcrumbs { margin-bottom: 16px !important; }
  /* Haut de page : deux boutons identiques vers le même agenda → un seul sur mobile
     (la barre du bas propose déjà « Appeler » et « Prendre RDV ») */
  .page-hero div:has(> .btn-primary[href*="pipedrive.com/scheduler"]) > .btn-secondary[href*="pipedrive.com/scheduler"] { display: none !important; }

  /* ── 4. Blocs dont la marge intérieure est écrite dans la page (56 px…) ── */
  main [style*="padding:56px"], main [style*="padding: 56px"],
  main [style*="padding:48px"], main [style*="padding: 48px"] { padding: 24px 18px !important; }

  /* ── 5. Boutons : le texte passe à la ligne au lieu d'être coupé ── */
  .btn { white-space: normal !important; max-width: 100%; text-align: center; justify-content: center; }

  /* ── 6. Encadrés « Conseils… » / « Pour aller plus loin » en fin de page :
        marge latérale (ils collaient aux bords de l'écran) ── */
  .page-related-articles {
    margin: 24px 16px !important;
    padding: 22px 16px !important;
    border-radius: 14px !important;
  }
  .page-related-articles h2 { font-size: 1.3rem !important; line-height: 1.3; }

  /* ── 7. Vidéos : jamais plus larges que l'écran ── */
  .video-wrap { width: 100% !important; max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }

  /* ── 8. Accueil : une seule mention « Cabinet de transaction de pharmacies »
        et des zones dans le haut de page (le sous-titre vert, sous le texte ;
        le petit titre au-dessus du grand titre est retiré sur mobile),
        haut de page plus compact ; la liste des zones n'est plus répétée
        dans la carte « Expertise terrain » ── */
  .hero .eyebrow { display: none !important; }
  .zones-detail { display: none !important; }
  .zones-court { display: inline !important; }
  .hero { padding-top: 28px !important; padding-bottom: 20px !important; }
  .hero h1 { margin-top: 10px !important; margin-bottom: 14px !important; }
  .hero .hero-sub { margin-bottom: 12px !important; }
  .hero .seo-subtitle { margin: 0 0 18px !important; }
  .hero .hero-ctas { gap: 10px !important; }
  .hero .hero-mini { display: none !important; }
  /* Lien mobile vers le simulateur d'estimation, sous les deux boutons */
  .hero-estimer-mobile {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #2C3236;
    color: #FFFFFF !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none !important;
    text-align: center;
  }
  .hero-estimer-mobile small { display: block; font-family: 'Open Sans', sans-serif; font-weight: 400; font-size: 0.82rem; color: #D7EDB0; }
  .hero-estimer-mobile svg { color: #9ECA4F; flex-shrink: 0; }

  /* ── 9. Accueil : la carte « Estimer mon officine » se distingue des cartes
        de zones (fond vert, bouton), sans texte souligné ── */
  .region-card--estimer,
  .region-card--estimer * { text-decoration: none !important; }
  .region-card--estimer {
    background: #9ECA4F !important;
    border: 0 !important;
    box-shadow: 0 10px 28px -12px rgba(123, 167, 59, 0.6) !important;
  }
  .region-card--estimer .region-card-icon { background: #FFFFFF !important; color: #7BA73B !important; }
  .region-card--estimer .region-card-eyebrow { color: #2C3236 !important; }
  .region-card--estimer h3 { color: #2C3236 !important; }
  .region-card--estimer p { color: #2C3236 !important; }
  .region-card--estimer .region-card-link {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 12px 20px;
    border-radius: 999px;
    background: #2C3236;
    color: #FFFFFF !important;
    font-weight: 700;
  }

  /* ── 10. Avis Google : la ligne « Local Guide · 30 avis · il y a 8 mois »
         passe à la ligne proprement ── */
  .gr-card .gr-meta { display: block; line-height: 1.45; }
  .gr-card .gr-meta span { white-space: nowrap; }

  /* ── 11. Notre histoire : chiffres de David alignés à gauche ── */
  .david-stat { display: flex !important; justify-content: flex-start !important; align-items: baseline !important; gap: 12px !important; text-align: left !important; }
  .david-stat-num { flex: 0 0 auto !important; min-width: 0 !important; }
  .david-stat-label { text-align: left !important; flex: 1 1 auto !important; }
}

@media (max-width: 640px) {
  /* ── 13. Grilles écrites dans les pages (2 ou 3 colonnes) : une seule
         colonne sur téléphone, les cartes ne débordent plus ── */
  main [style*="grid-template-columns"] { grid-template-columns: 1fr !important; gap: 14px !important; }
}
