/* ============================================================
   Adaptation mobile — n'affecte QUE les écrans < 900px.
   Le rendu ordinateur reste strictement inchangé.
   ============================================================ */
@media (max-width: 900px) {
  html, body { max-width: 100%; overflow-x: hidden !important; }
  img, video, iframe, canvas, svg, table { max-width: 100% !important; }
  img { height: auto; }

  .wrap, .container, .inner, main > section > div {
    max-width: 100% !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  /* ---------- Header / navigation ---------- */
  header { padding: 10px 0 !important; }
  header .nav, header .nav.wrap {
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 0 16px !important;
  }
  header .logo, .logo {
    font-size: 1.65rem !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
  }
  header .menu, .menu { display: none !important; }

  .m-burger {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    align-items: center;
    background: transparent; border: 0; padding: 0;
    cursor: pointer; flex: 0 0 auto;
  }
  .m-burger span {
    display: block; width: 24px; height: 2px; border-radius: 2px;
    background: #fff; transition: transform .3s ease, opacity .3s ease, background .3s ease;
  }
  header.scrolled .m-burger span, .m-open .m-burger span { background: #16322F; }
  .m-open .m-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .m-open .m-burger span:nth-child(2) { opacity: 0; }
  .m-open .m-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .m-panel {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: #F4F1EA;
    padding: 84px 22px 40px;
    overflow-y: auto;
    transform: translateY(-100%);
    transition: transform .35s cubic-bezier(.2,.8,.2,1);
    z-index: 900;
  }
  .m-open .m-panel { transform: translateY(0); }
  .m-panel a {
    display: block; padding: 13px 4px; font-size: 1.05rem; font-weight: 600;
    color: #16322F; text-decoration: none; border-bottom: 1px solid rgba(22,50,47,.10);
  }
  .m-panel .m-group-title {
    margin-top: 18px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
    color: #1F7A75; font-weight: 700;
  }
  .m-panel .m-sub a { padding-left: 14px; font-weight: 500; font-size: .98rem; }
  .m-panel .m-cta {
    margin-top: 26px; text-align: center; background: #1F7A75; color: #fff !important;
    border-radius: 30px; border: 0; font-weight: 700;
  }
  body.m-open { overflow: hidden; }

  /* ---------- Grilles : une seule colonne ---------- */
  .split, .cols, .grid, .grid2, .row, .twocol, .layout, .compare, .pillars,
  .values-grid, .sing-row, .project-grid, .foot-grid, .qui-mini-grid, .viager-body,
  .news-grid, .favs-grid, .fund-grid, .specs-grid, .annexes, .charges-layout,
  .sim, .founder-bio, .founder-bio.reverse, .pmodal-card, .stats-collage .stat-row,
  .offers-grid, .cards, .card-grid {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }
  [style*="grid-template-columns"]:not(.thumbs):not(.carousel-slide):not(.carousel-track) {
    grid-template-columns: 1fr !important;
  }
  .thumbs { grid-template-columns: repeat(4, 1fr) !important; }

  /* ---------- Typo & espacements ---------- */
  h1, .page-title { font-size: clamp(1.9rem, 8vw, 2.6rem) !important; white-space: normal !important; line-height: 1.15 !important; }
  h2 { font-size: clamp(1.55rem, 6.2vw, 2.1rem) !important; }
  h3 { font-size: 1.2rem !important; }
  p, li { font-size: 1rem !important; }

  section { padding-left: 0 !important; padding-right: 0 !important; }
  .hero, section.hero {
    min-height: 78vh !important;
    padding: 110px 18px 70px !important;
    background-attachment: scroll !important;
  }
  .hero-content, .hero-inner { transform: none !important; max-width: 100% !important; }
  .hero-btns { flex-wrap: wrap !important; justify-content: center !important; }

  /* ---------- Éléments à largeur fixe ---------- */
  .btn, .cta, button, input, select, textarea { max-width: 100% !important; }
  input, select, textarea { font-size: 16px !important; } /* évite le zoom iOS */
  table { display: block; overflow-x: auto; }

  /* Modales */
  .pmodal-card, .modal, .modal-card { width: calc(100% - 28px) !important; max-height: 88vh !important; overflow-y: auto !important; }

  footer { text-align: center; }
}

@media (max-width:900px){ header .burger, .burger { display:none !important; } }

@media (max-width:900px){
  h1 .line, h1 .line > span, .hero h1 span, .page-title span { white-space: normal !important; }
}

@media (max-width:900px){
  /* Pile de cartes "avantages clés" : recentrée */
  .stack, .cards-stack, .adv-stack { width: 100% !important; max-width: 100% !important; margin: 0 auto !important; }
}
