/* Téléphone et tablette. Couche additive chargée après polish.css:
   mêmes jetons, mêmes composants; seuls l'en-tête, le menu et les marges changent. */

html, body { overflow-x: clip; }
html.menu-locked { overflow: hidden; }

/* Icône du menu: trois traits qui deviennent une croix. */
.menu-toggle { width: 40px; height: 36px; padding: 0; justify-content: center; align-items: center; }
.burger { position: relative; display: block; width: 18px; height: 12px; }
.burger span {
  position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px;
  background: currentColor; transition: transform .2s ease, opacity .15s ease, top .2s ease;
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 5px; }
.burger span:nth-child(3) { top: 10px; }
.menu-open .burger span:nth-child(1) { top: 5px; transform: rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

.nav-mobile-actions { display: none; }

@media (max-width: 1080px) {
  .header-row { gap: 12px; }
  .nav[data-open="1"] {
    position: fixed; top: 58px; left: 0; right: 0; bottom: 0;
    overflow-y: auto; overscroll-behavior: contain;
    padding: 12px 16px calc(24px + env(safe-area-inset-bottom));
    justify-content: flex-start; gap: 2px; border-top: 1px solid var(--border-soft);
    animation: reos-menu-in .18s ease;
  }
  .nav[data-open="1"] > a {
    font-size: 1.02rem; padding: 13px 12px; border-radius: 8px;
    color: var(--text); border-bottom: 1px solid var(--border-soft);
  }
  .nav[data-open="1"] > a:last-of-type { border-bottom: none; }
  .nav[data-open="1"] .nav-mobile-actions {
    display: grid; gap: 10px; margin-top: 18px; padding-top: 18px;
    border-top: 1px solid var(--border);
  }
  .nav .nav-mobile-actions .btn-primary { color: #fff; }
  .nav .nav-mobile-actions .btn-ghost { color: var(--text); }
  .nav-mobile-actions .btn { width: 100%; justify-content: center; height: 46px; font-size: .98rem; }
  .header-actions { margin-left: auto; }
}

@keyframes reos-menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .header-login { display: none; }
  /* Sur petit ecran, l'essai demarre depuis le menu plein ecran. */
  .header-demo-access { display: none; }
  .header-actions { gap: 6px; }
  .locale-picker summary { padding: 6px 8px; }
  .locale-menu { right: -48px; max-width: calc(100vw - 32px); }

  h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); line-height: 1.12; overflow-wrap: anywhere; hyphens: auto; }
  h2 { overflow-wrap: anywhere; hyphens: auto; }
  .lead { font-size: 1.02rem; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .stats { gap: 10px; }

  /* La capture du logiciel ne doit jamais élargir la page. */
  .shot { overflow: hidden; max-width: 100%; }
  .shot-body { overflow-x: auto; }
  .shot-table { min-width: 0; }

  /* Tableaux de contenu: défilement dans leur cadre, pas de la page. */
  .prose table, main table:not(.plan-matrix__table):not(.shot-table) {
    display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  pre, code { white-space: pre-wrap; overflow-wrap: anywhere; }
  img, svg, video, iframe { max-width: 100%; }

  .breadcrumb { flex-wrap: wrap; row-gap: 4px; }
  .breadcrumb span:last-child { max-width: 100%; }
  .cta .btn, .card .btn { max-width: 100%; white-space: normal; }
  .footer-grid { gap: 22px; }
}

@media (max-width: 380px) {
  .header-demo { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Le flou de l'en-tête collant enfermerait le menu plein écran dans ses 58 px. */
.site-header.menu-open { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); }

/* Matrice des forfaits: la colonne des fonctionnalités reste visible pendant le défilement. */
@media (max-width: 720px) {
  .plan-matrix__table { min-width: 560px; }
  .plan-matrix__table col.feature { width: 34%; }
  .plan-matrix__table th[scope=row], .plan-matrix__table thead th:first-child {
    position: sticky; left: 0; z-index: 1; background: var(--surface);
    box-shadow: 1px 0 0 var(--border);
  }
  .plan-matrix__table thead th:first-child { background: var(--surface-2, #f6f7f9); }
}
