/* ——— WAF responsive — couche globale (mobile-first patches) ——— */

:root {
  --waf-pad-x: clamp(12px, 3vw, 28px);
  --waf-touch: 48px;
}

.waf-shell {
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
  min-height: 100dvh;
}

.waf-brand {
  min-width: 0;
  max-width: min(100%, 62vw);
}
.waf-brand-text {
  min-width: 0;
  overflow: hidden;
}
.waf-brand-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waf-main,
.el-main,
.ops-main,
.pods-main,
.live-main,
.signal-main,
.pulse-main,
.tribu-main,
.accueil-shell main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Media / embeds */
.waf-shell img,
.waf-shell video,
.waf-shell canvas,
.waf-shell svg,
.waf-shell iframe {
  max-width: 100%;
}

/* Panels / forms */
.mab-panel {
  max-width: 100%;
}
.mab-field,
.mab-input,
textarea.mab-input,
select.mab-input {
  max-width: 100%;
}

/* ——— ≤1100 : nav burger déjà dans waf.css ——— */

/* ——— ≤900 ——— */
@media (max-width: 900px) {
  .lp-cal-days {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .live-top,
  .live-below {
    grid-template-columns: 1fr !important;
  }
  .waf-cards {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  }
}

/* ——— ≤760 ——— */
@media (max-width: 760px) {
  .waf-main,
  .el-main,
  .ops-main,
  .pods-main {
    padding-left: var(--waf-pad-x);
    padding-right: var(--waf-pad-x);
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  }

  .waf-hero-brand,
  .signal-hero h1,
  .pulse-hero h1,
  .tribu-hero h1,
  .el-hero h1 {
    word-break: break-word;
    overflow-wrap: anywhere;
    letter-spacing: 0.08em;
  }

  .waf-auth-actions,
  .accueil-cta,
  .accueil-join-actions,
  .freq-actions,
  .ops-row,
  .pods-toolbar,
  .pods-player-row,
  .m-links,
  .tribu-form-actions,
  .el-auth-actions,
  .live-gate-actions,
  .live-temp-actions,
  .live-hls-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .waf-auth-actions .mab-btn,
  .accueil-cta .mab-btn,
  .accueil-join-actions .mab-btn,
  .freq-actions .mab-btn,
  .ops-row .mab-btn,
  .pods-toolbar .mab-btn,
  .pods-toolbar .mab-input,
  .pods-player-row .mab-btn,
  .m-links .mab-btn,
  .tribu-form-actions .mab-btn,
  .el-form .mab-btn[type="submit"],
  .live-gate-actions .mab-btn,
  .live-temp-actions .mab-btn {
    width: 100%;
    min-height: var(--waf-touch);
    justify-content: center;
  }

  .waf-inline-form,
  .el-row,
  .tribu-form-row,
  .pulse-req-form,
  .live-req-form,
  .signal-opts {
    grid-template-columns: 1fr !important;
  }

  .waf-pack-grid,
  .waf-cards,
  .ops-checks,
  .ops-stats {
    grid-template-columns: 1fr !important;
  }

  .waf-list-item {
    flex-direction: column;
    align-items: stretch;
  }
  .waf-list-item .mab-btn,
  .waf-list-item a.mab-btn {
    width: 100%;
    justify-content: center;
  }

  .waf-admin-row {
    grid-template-columns: 1fr !important;
  }

  .waf-tabs {
    margin-left: calc(var(--waf-pad-x) * -0.25);
    margin-right: calc(var(--waf-pad-x) * -0.25);
    padding-left: 4px;
    padding-right: 4px;
  }
  .waf-tab {
    min-height: 40px;
  }

  .waf-chip-grid {
    gap: 8px;
  }
  .waf-chip {
    min-height: 40px;
  }

  .signal-stage {
    grid-template-columns: 1fr !important;
    justify-items: center;
    text-align: center;
  }
  .signal-transport {
    width: 100%;
  }
  .signal-transport .mab-btn {
    min-height: var(--waf-touch);
  }
  .signal-play {
    width: 100%;
    flex: 1 1 100%;
  }

  .pulse-grid {
    grid-template-columns: 1fr !important;
  }

  .pods-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pods-detail-head {
    grid-template-columns: 72px 1fr !important;
  }

  .live-np-controls .mab-btn {
    flex: 1 1 calc(50% - 8px);
    min-height: var(--waf-touch);
  }
  .live-vol {
    width: 100%;
  }
  .live-vol input {
    width: 100%;
    min-width: 0;
  }

  .accueil-prog-list {
    grid-template-columns: 1fr !important;
  }
  .accueil-showcase-panel {
    grid-template-columns: 1fr !important;
  }
}

/* ——— ≤560 ——— */
@media (max-width: 560px) {
  .lp-cal-days {
    grid-template-columns: 1fr !important;
  }

  .pulse-chat-form,
  .live-chat-form {
    grid-template-columns: 1fr !important;
  }
  .pulse-chat-form .mab-btn,
  .pulse-chat-form .mab-input,
  .live-chat-form .mab-btn,
  .live-chat-form .mab-input {
    width: 100%;
    min-height: var(--waf-touch);
  }

  .live-np {
    grid-template-columns: 56px 1fr !important;
  }
  .live-np-controls .mab-btn {
    flex: 1 1 100%;
    width: 100%;
  }

  .signal-transport .mab-btn {
    flex: 1 1 100%;
  }

  .waf-android-promo {
    grid-template-columns: 1fr !important;
  }
  .waf-android-promo-actions .mab-btn {
    flex: 1 1 auto;
    width: 100%;
  }

  .accueil-cta {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ——— ≤420 ——— */
@media (max-width: 420px) {
  .waf-brand-text span {
    display: none;
  }
  .pods-grid {
    grid-template-columns: 1fr;
  }
  .waf-hero-brand {
    font-size: clamp(1.1rem, 7vw, 1.45rem);
    letter-spacing: 0.06em;
  }
}

/* Prefers reduced motion already in design-system */
@media (prefers-reduced-motion: reduce) {
  .mab-live-pulse,
  a.mab-live-pulse {
    animation: none !important;
  }
}
