/* ============================================================
   UniHeberg — Correctifs mobile / responsive globaux
   Chargé en DERNIER : override uniquement.
   ============================================================ */

/* ── Base : plus de scroll horizontal ── */
html, body { max-width: 100%; overflow-x: hidden; }
img, video, canvas, iframe, svg { max-width: 100%; }
table { max-width: 100%; }

/* ── NAVBAR ─────────────────────────────────────────────── */
/* Le menu desktop disparaît dès 1100px : le burger doit apparaître au même
   point (avant, entre 901px et 1100px, il n'y avait aucun menu). */
@media (max-width: 1100px) {
  .hamburger { display: block !important; }
  header nav { height: 64px; padding: 0 16px; }
  header nav > .logo { font-size: 16px; }
  .mobile-menu { top: 64px; }
}
@media (max-width: 480px) {
  header nav { padding: 0 12px; }
  header nav > .logo { font-size: 15px; }
  header nav > .logo .logo-mark { width: 24px; height: 24px; }
}

/* Menu mobile : plein écran, scrollable, pas de contenu coupé */
@media (max-width: 1100px) {
  .mobile-menu {
    width: 100%;
    max-width: 100%;
    height: calc(100dvh - 64px);
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 40px;
  }
  .mobile-link { padding: 12px 14px; font-size: 14px; }
  .mobile-link .nav-icon-img { width: 20px; height: 20px; }
  .mobile-auth { display: flex; gap: 10px; padding: 8px 12px; }
  .mobile-auth a { flex: 1; text-align: center; }
  body.menu-open { overflow: hidden; }
}

/* ── HUB (guides & documentation) ───────────────────────── */
/* Le titre et le chapô ne partagent plus la même ligne : ça décalait la mise
   en page (« hébergement » / « documentation » collés au texte de droite). */
.hub-head {
  display: block;
}
.hub-head > div:first-child { margin-bottom: 18px; }
.hub-lede {
  max-width: 620px;
  margin: 0;
  text-align: left;
}
@media (max-width: 900px) {
  .hub-hero { padding: 104px 0 34px; }
  .hub-wrap { padding: 0 16px; }
  .hub-title { font-size: clamp(1.6rem, 7vw, 2.6rem); }
  .hub-lede { font-size: 14px; }
  .hub-breadcrumb { margin-bottom: 18px; font-size: 12px; }
  .hub-section { padding: 40px 0 0; }
  .hub-section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hub-cats { grid-template-columns: 1fr; }
  .hub-feature { display: block; }
  .hub-feature-media { min-height: 160px; }
}

/* ── Grilles génériques ─────────────────────────────────── */
@media (max-width: 900px) {
  .hub-grid, .hub-cards, .guide-grid, .doc-grid,
  .prod-grid, .feat-grid, .feat-grid-3, .pricing-grid,
  .reviews-grid, .security-grid, .eco-grid, .blog-preview-grid,
  .mail-grid, .ddos-grid, .fid-grid, .aff-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 900px) {
  .os-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .stats-row { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── Typo & sections ────────────────────────────────────── */
@media (max-width: 600px) {
  h1 { font-size: clamp(1.6rem, 7.2vw, 2.6rem); line-height: 1.08; overflow-wrap: break-word; }
  h2 { font-size: clamp(1.4rem, 6.5vw, 2rem); line-height: 1.15; }
  h3 { font-size: 1.15rem; }
  p, li { font-size: 14.5px; }
  .wrap, .hub-wrap, .container { padding-left: 16px; padding-right: 16px; }
  .section, .hub-section { padding-top: 44px; padding-bottom: 44px; }
  .hero, .page-hero { padding-left: 16px; padding-right: 16px; }
}

/* ── Boutons / CTA ──────────────────────────────────────── */
@media (max-width: 600px) {
  .btn-purple, .btn-ghost, .hero-actions a, .cta-btns a {
    width: 100%; max-width: 340px; justify-content: center; text-align: center;
  }
  .hero-actions, .cta-btns { flex-direction: column; align-items: center; gap: 10px; }
}

/* ── Tableaux comparatifs : scroll horizontal propre ────── */
@media (max-width: 900px) {
  .cmp-table, .guide-table, .table-wrap, .hub-table,
  table.comparatif, .responsive-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table { font-size: 13px; }
  th, td { padding: 8px 10px !important; white-space: nowrap; }
}

/* ── Articles guides / documentation ────────────────────── */
@media (max-width: 1000px) {
  .doc-layout, .article-layout, .hub-article {
    display: block !important;
  }
  .doc-sidebar, .article-toc, .hub-toc {
    position: static !important;
    width: 100% !important;
    margin-bottom: 24px;
  }
}
@media (max-width: 600px) {
  pre, code { font-size: 12.5px; }
  pre { overflow-x: auto; }
}

/* ── Configurateurs ─────────────────────────────────────── */
@media (max-width: 900px) {
  .cfg-layout, .configurator, .mc-cfg, .ht-cfg {
    grid-template-columns: 1fr !important;
    display: grid !important;
  }
  .cfg-summary, .cfg-sticky { position: static !important; }
}

/* ── Footer ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  footer .footer-grid, .footer-inner {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 26px;
  }
}
@media (max-width: 520px) {
  footer .footer-grid, .footer-inner { grid-template-columns: 1fr !important; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}

/* ── Confort tactile ────────────────────────────────────── */
@media (hover: none) {
  a, button { -webkit-tap-highlight-color: rgba(155,109,255,0.18); }
  .mobile-link, .nav-btn, .nav-login { min-height: 44px; display: flex; align-items: center; }
}
