/* =========================================================
   PEASY V2 — RESPONSIVE SAFETY LAYER 3.6.0
   Loaded after every page-specific stylesheet.
   Desktop is intentionally untouched.
   ========================================================= */

@media (max-width: 900px) {
  html,
  body.peasy-v2 {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    overflow-x: clip !important;
  }

  body.peasy-v2 *,
  body.peasy-v2 *::before,
  body.peasy-v2 *::after {
    box-sizing: border-box;
    min-width: 0;
  }

  body.peasy-v2 #peasy-v2-main,
  body.peasy-v2 #peasy-v2-main > *,
  body.peasy-v2 .w,
  body.peasy-v2 .w-text,
  body.peasy-v2 .wrap {
    max-width: 100% !important;
  }

  body.peasy-v2 img,
  body.peasy-v2 video,
  body.peasy-v2 iframe {
    max-width: 100% !important;
    height: auto;
  }

  body.peasy-v2 svg {
    max-width: 100%;
  }

  body.peasy-v2 p,
  body.peasy-v2 li,
  body.peasy-v2 h1,
  body.peasy-v2 h2,
  body.peasy-v2 h3,
  body.peasy-v2 h4,
  body.peasy-v2 h5,
  body.peasy-v2 a,
  body.peasy-v2 button,
  body.peasy-v2 code {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  body.peasy-v2 pre {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Global header: logo + menu + CTA remain inside the viewport. */
  body.peasy-v2 .peasy-v2-global-header .nav > .w {
    width: 100% !important;
    max-width: 100% !important;
    padding-inline: 14px !important;
  }

  body.peasy-v2 .peasy-v2-global-header .nav-in {
    width: 100% !important;
    min-height: 64px !important;
    display: grid !important;
    grid-template-columns: minmax(78px, 1fr) 42px minmax(104px, auto) !important;
    align-items: center !important;
    gap: 10px !important;
  }

  body.peasy-v2 .peasy-v2-global-header .nav-logo {
    order: initial !important;
    width: auto !important;
    max-width: 132px !important;
    justify-self: start !important;
    overflow: hidden;
  }

  body.peasy-v2 .peasy-v2-global-header .nav-logo img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 132px !important;
    max-height: 36px !important;
    object-fit: contain !important;
  }

  body.peasy-v2 .peasy-v2-menu-toggle {
    order: initial !important;
    display: inline-flex !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    justify-self: center !important;
    font-size: 21px !important;
  }

  body.peasy-v2 .peasy-v2-global-header .nav-r {
    order: initial !important;
    display: flex !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 132px !important;
    margin: 0 !important;
    justify-self: end !important;
  }

  body.peasy-v2 .peasy-v2-global-header .nav-r > .btn-p {
    width: auto !important;
    min-width: 0 !important;
    max-width: 132px !important;
    min-height: 42px !important;
    height: auto !important;
    padding: 8px 11px !important;
    font-size: 10.5px !important;
    line-height: 1.25 !important;
    text-align: center !important;
    white-space: normal !important;
    justify-content: center !important;
  }

  body.peasy-v2 .peasy-v2-global-header .peasy-v2-global-nav-links {
    width: auto !important;
    left: 14px !important;
    right: 14px !important;
    max-width: none !important;
  }

  /* All fixed desktop grid structures stack safely on tablet/mobile. */
  body.peasy-v2 .hero-g,
  body.peasy-v2 .hero-grid,
  body.peasy-v2 .aa,
  body.peasy-v2 .frise,
  body.peasy-v2 .prog-g,
  body.peasy-v2 .testi-g,
  body.peasy-v2 .profs-g,
  body.peasy-v2 .cat-grid,
  body.peasy-v2 .blog-grid,
  body.peasy-v2 .methode-grid,
  body.peasy-v2 .avantage-grid,
  body.peasy-v2 .ressources-grid,
  body.peasy-v2 .comp-grid,
  body.peasy-v2 .tips-grid,
  body.peasy-v2 .pros-cons,
  body.peasy-v2 .toc-grid,
  body.peasy-v2 .facteurs-grid,
  body.peasy-v2 .deseq-grid,
  body.peasy-v2 .hero-stats,
  body.peasy-v2 .critere-grid,
  body.peasy-v2 .profil-card,
  body.peasy-v2 .prog-grid,
  body.peasy-v2 .testi-grid,
  body.peasy-v2 .cefr-grid,
  body.peasy-v2 .test-pick-grid,
  body.peasy-v2 .alt-section,
  body.peasy-v2 .formule-row,
  body.peasy-v2 .timeline,
  body.peasy-v2 .article-card-grid,
  body.peasy-v2 .grid4,
  body.peasy-v2 .rgrid,
  body.peasy-v2 .compare,
  body.peasy-v2 .roadmap,
  body.peasy-v2 .anatomy,
  body.peasy-v2 .families,
  body.peasy-v2 .sounds,
  body.peasy-v2 .tips,
  body.peasy-v2 .pair,
  body.peasy-v2 .prow,
  body.peasy-v2 .rdv-options-grid,
  body.peasy-v2 [style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.peasy-v2 .aa-div,
  body.peasy-v2 .aa-arr {
    display: none !important;
  }

  body.peasy-v2 .stats-g {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.peasy-v2 .stats-g > [style*="grid-column:1/-1"],
  body.peasy-v2 .stats-g > :first-child {
    grid-column: 1 / -1 !important;
  }

  /* Replace the previous broad [class*=cta] rule with targeted layouts. */
  body.peasy-v2 .cta-quiz,
  body.peasy-v2 .cta-inline,
  body.peasy-v2 .cta-band,
  body.peasy-v2 .cpf-band {
    width: 100% !important;
    max-width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center !important;
  }

  body.peasy-v2 .cta-quiz-wrap,
  body.peasy-v2 .cta-quiz-left,
  body.peasy-v2 .cta-quiz-text,
  body.peasy-v2 .cta-quiz-right,
  body.peasy-v2 .cta-inline-left {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.peasy-v2 .cta-quiz-left,
  body.peasy-v2 .cta-inline-left {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  body.peasy-v2 .cta-quiz-icon {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    flex: 0 0 48px !important;
  }

  body.peasy-v2 .cta-inline-ico {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    flex: 0 0 40px !important;
  }

  body.peasy-v2 .cta-quiz-right .btn-p,
  body.peasy-v2 .cta-inline > .btn-p,
  body.peasy-v2 .cta-inline > .btn-s,
  body.peasy-v2 .cta-band .btn-p,
  body.peasy-v2 .cta-band .btn-s,
  body.peasy-v2 .cta-card .btn,
  body.peasy-v2 .article-final-cta .btn,
  body.peasy-v2 .final .btn {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
    white-space: normal !important;
    text-align: center !important;
  }

  /* Booking modal internals were also affected by [class*=btn]. */
  body.peasy-v2 .peasy-booking-btn {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.peasy-v2 .peasy-booking-btn__glow {
    width: 130px !important;
    max-width: 130px !important;
    height: 90px !important;
  }

  body.peasy-v2 .peasy-booking-btn__inner {
    width: auto !important;
    max-width: calc(100% - 48px) !important;
    flex: 1 1 auto !important;
  }

  body.peasy-v2 .peasy-booking-btn__label,
  body.peasy-v2 .peasy-booking-btn__sub {
    width: auto !important;
    max-width: 100% !important;
    text-align: left !important;
  }

  /* Article learning loops: vertical flow prevents arrows escaping right. */
  body.peasy-v2 .loopwrap {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  body.peasy-v2 .loopwrap .node {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
  }

  body.peasy-v2 .loopwrap .arrowcol {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 30px !important;
    padding: 0 !important;
    justify-content: center !important;
    transform: rotate(90deg) !important;
  }

  /* Tables keep readable columns inside their own horizontal scroller. */
  body.peasy-v2 .peasy-v2-table-scroll,
  body.peasy-v2 .tablewrap {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    border-radius: 12px;
  }

  body.peasy-v2 .peasy-v2-table-scroll > table,
  body.peasy-v2 .tablewrap > table {
    display: table !important;
    width: 100% !important;
    min-width: 560px !important;
    max-width: none !important;
    margin: 0 !important;
  }

  body.peasy-v2 .peasy-v2-table-scroll:focus,
  body.peasy-v2 .tablewrap:focus {
    outline: 2px solid var(--bl, #5170ff);
    outline-offset: 2px;
  }

  /* Tabs and filters can scroll without increasing the document width. */
  body.peasy-v2 .filters,
  body.peasy-v2 .filter-row,
  body.peasy-v2 .niveau-tabs,
  body.peasy-v2 .profil-tabs,
  body.peasy-v2 .test-tabs {
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    padding-bottom: 6px;
  }

  body.peasy-v2 .filter,
  body.peasy-v2 .tag,
  body.peasy-v2 .badge-pill,
  body.peasy-v2 .frise-num,
  body.peasy-v2 .res,
  body.peasy-v2 .ph,
  body.peasy-v2 .lbl {
    width: auto !important;
  }

  body.peasy-v2 .breadcrumb,
  body.peasy-v2 .byline,
  body.peasy-v2 .article-meta {
    max-width: 100%;
    flex-wrap: wrap !important;
  }

  body.peasy-v2 .peasy-v2-global-footer .foot-g {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
}

@media (max-width: 600px) {
  body.peasy-v2 #peasy-v2-main section,
  body.peasy-v2 #peasy-v2-main header,
  body.peasy-v2 #peasy-v2-main footer {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.peasy-v2 .w,
  body.peasy-v2 .w-text,
  body.peasy-v2 .wrap {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.peasy-v2 h1 {
    font-size: clamp(31px, 9.6vw, 39px) !important;
    line-height: 1.12 !important;
  }

  body.peasy-v2 h2 {
    font-size: clamp(25px, 7.8vw, 32px) !important;
    line-height: 1.2 !important;
  }

  body.peasy-v2 h3 {
    font-size: clamp(20px, 6vw, 24px) !important;
    line-height: 1.3 !important;
  }

  body.peasy-v2 .hero h1,
  body.peasy-v2 .hero h1 * {
    font-size: clamp(34px, 10vw, 42px) !important;
  }

  body.peasy-v2 .card,
  body.peasy-v2 .blog-card,
  body.peasy-v2 .article-mini-card,
  body.peasy-v2 .cta-card,
  body.peasy-v2 .cta-quote,
  body.peasy-v2 .quote-cta,
  body.peasy-v2 .article-quiz,
  body.peasy-v2 .article-final-cta,
  body.peasy-v2 .loop,
  body.peasy-v2 .stat {
    max-width: 100% !important;
  }

  body.peasy-v2 .cta-quiz,
  body.peasy-v2 .cta-inline,
  body.peasy-v2 .cta-band-dark,
  body.peasy-v2 .article-final-cta,
  body.peasy-v2 .article-quiz,
  body.peasy-v2 .loop,
  body.peasy-v2 .stat {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  body.peasy-v2 .hero-actions,
  body.peasy-v2 .cta-stack,
  body.peasy-v2 .alex-cta-wrap {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.peasy-v2 .hero-actions .hero-action,
  body.peasy-v2 .cta-stack .btn-p,
  body.peasy-v2 .cta-stack .btn-s,
  body.peasy-v2 .alex-cta-wrap .btn-p,
  body.peasy-v2 .level-secondary-cta {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
    justify-content: center !important;
  }

  body.peasy-v2 .profs-g,
  body.peasy-v2 .testi-g,
  body.peasy-v2 .prog-g,
  body.peasy-v2 .stats-g {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.peasy-v2 .stats-g > * {
    grid-column: auto !important;
  }

  body.peasy-v2 .media-logo-bar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px 16px !important;
    padding: 24px 16px !important;
  }

  body.peasy-v2 .media-logo-item,
  body.peasy-v2 .media-logo-item.media-logo-wide,
  body.peasy-v2 .media-logo-item.media-logo-compact,
  body.peasy-v2 .media-logo-item.media-logo-nrj {
    width: 100% !important;
    max-width: 140px !important;
    margin-inline: auto !important;
  }

  body.peasy-v2 .peasy-v2-global-footer .foot-g {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.peasy-v2 .peasy-v2-global-footer .w {
    padding-inline: 20px !important;
  }

  body.peasy-v2 .wa {
    right: 16px !important;
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    height: 52px !important;
  }
}

@media (max-width: 390px) {
  body.peasy-v2 .peasy-v2-global-header .nav > .w {
    padding-inline: 10px !important;
  }

  body.peasy-v2 .peasy-v2-global-header .nav-in {
    grid-template-columns: minmax(72px, 1fr) 40px minmax(96px, 116px) !important;
    gap: 7px !important;
  }

  body.peasy-v2 .peasy-v2-global-header .nav-logo,
  body.peasy-v2 .peasy-v2-global-header .nav-logo img {
    max-width: 108px !important;
    max-height: 32px !important;
  }

  body.peasy-v2 .peasy-v2-menu-toggle {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }

  body.peasy-v2 .peasy-v2-global-header .nav-r,
  body.peasy-v2 .peasy-v2-global-header .nav-r > .btn-p {
    max-width: 116px !important;
  }

  body.peasy-v2 .peasy-v2-global-header .nav-r > .btn-p {
    padding: 7px 8px !important;
    font-size: 9.5px !important;
  }

  body.peasy-v2 .peasy-v2-global-header .peasy-v2-global-nav-links {
    left: 10px !important;
    right: 10px !important;
  }
}
