/**
 * Learnifi — patch mobile SAFE (additif uniquement)
 * Règles UNIQUEMENT dans @media (max-width: …).
 * Ne modifie AUCUN style desktop hors media query.
 * Chargé en dernier pour corriger overflow / tap / stack sans casser le desktop.
 */

/* ── Base anti-débordement (téléphone / petite tablette) ── */
@media (max-width: 767.98px) {
  html {
    overflow-x: clip;
  }
  body {
    overflow-x: clip;
    max-width: 100vw;
  }

  img,
  video,
  svg,
  canvas,
  iframe {
    max-width: 100%;
    height: auto;
  }

  /* Tableaux larges : scroll horizontal local, pas de casser la page */
  .table-responsive,
  .dataTables_wrapper,
  .lf-table-scroll,
  .org-page .table-responsive,
  .content-page .table-responsive {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table.table {
    max-width: none;
  }

  /* Boutons / liens principaux : cible tactile mini */
  .btn,
  .org-btn-primary,
  .lf-login-submit,
  .lf-ofw-btn--primary,
  a.udemy-btn-primary,
  button.udemy-btn-primary {
    min-height: 44px;
  }

  /* Inputs : taille tactile confortable sans changer le look desktop */
  .lf-login-landing .form-control,
  .lf-signup-page .form-control,
  .lf-ofw .form-control,
  .lf-ofw input[type="text"],
  .lf-ofw input[type="email"],
  .lf-ofw input[type="password"],
  .lf-ofw input[type="tel"] {
    min-height: 44px;
    font-size: 16px; /* évite zoom iOS sur focus */
  }
}

/* ── Login / Signup / Wizard action ── */
@media (max-width: 575.98px) {
  .lf-login-landing .lf-login-container {
    padding: 0.75rem 0.65rem 1.25rem;
  }

  .lf-login-landing .lf-login-panel {
    padding: 1.15rem 0.95rem 1.25rem !important;
  }

  .lf-login-landing .lf-login-card-title {
    font-size: 1.28rem;
    line-height: 1.25;
  }

  .lf-login-landing .lf-login-card-sub {
    font-size: 0.8125rem;
  }

  /* Prénom / Nom : stack sur très petit écran (col-6 trop étroit) */
  .lf-login-landing .lf-login-panel .row > .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .lf-login-role-pills a,
  .lf-login-role-pills .lf-login-role-pill,
  .lf-login-landing .lf-login-role-pills a {
    min-height: 44px;
  }

  .lf-login-landing .lf-toggle-pw {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Promo top bar : texte moins dense */
  .lf-promo-bar,
  .top-promo,
  .lf-announcement-bar,
  [class*="promo-banner"] {
    font-size: 0.75rem;
    line-height: 1.35;
  }
}

/* ── Accueil public ── */
@media (max-width: 767.98px) {
  /* Contient le gutter Bootstrap négatif sans toucher au desktop */
  .home-learnifi .container,
  .home-9 .container,
  section .container {
    overflow-x: clip;
  }

  /* Accueil + LPs : gutter g-5 Bootstrap (sans dépendre d’un wrapper .home-9) */
  .row.g-5,
  .row.align-items-center.g-5,
  .row.g-5.align-items-center,
  .row.g-5.align-items-start,
  .row.g-5.flex-lg-row-reverse {
    --bs-gutter-x: 1rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
  }

  .row.g-5 > [class*="col"],
  .row.align-items-center.g-5 > [class*="col"],
  .row.g-5.align-items-center > [class*="col"],
  .row.g-5.align-items-start > [class*="col"],
  .row.g-5.flex-lg-row-reverse > [class*="col"] {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    max-width: 100%;
  }

  /* Tableaux front : scroll local */
  .lf-comparison-wrap,
  .compare-2-table,
  .compare-card .compare-2-table,
  .lf-sc-table-wrap,
  section.compare-card {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .compare-2-table .table,
  .compare-card table.table {
    min-width: 640px;
  }
}

@media (max-width: 575.98px) {
  .home-learnifi h1,
  .home-9 h1,
  .lf-hero h1 {
    font-size: clamp(1.45rem, 6.2vw, 1.85rem);
    line-height: 1.2;
    word-break: break-word;
  }

  .lf-hero-cta,
  .home-learnifi .btn,
  .home-9 a.btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Shell OF : compléments prudents (lf-org-responsive-mep.css reste la base) ── */
@media (max-width: 991.98px) {
  body[data-user-role="organisation"] .form-card,
  body[data-user-role="organisation"] .card,
  body[data-user-role="organisation"] .lf-org-hub-hero,
  body[data-user-role="organisation"] .org-panel {
    max-width: 100%;
  }

  body[data-user-role="organisation"] .btn-group {
    flex-wrap: wrap;
    max-width: 100%;
  }
}

@media (max-width: 767.98px) {
  body[data-user-role="organisation"] .lf-org-hub-hero h1,
  body[data-user-role="organisation"] .lf-org-hub-hero .h1,
  body[data-user-role="organisation"] .page-title,
  body[data-user-role="organisation"] h1.header-title {
    font-size: 1.35rem;
    line-height: 1.25;
    word-break: break-word;
  }

  body[data-user-role="organisation"] .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  body[data-user-role="organisation"] .page-title-box .page-title-right,
  body[data-user-role="organisation"] .lf-toolbar,
  body[data-user-role="organisation"] .org-toolbar {
    width: 100%;
    margin-top: 0.5rem;
  }
}

@media (max-width: 575.98px) {
  body[data-user-role="organisation"] .badge {
    max-width: 100%;
    white-space: normal;
  }

  /* Rappels deferred dashboard : stack action / texte */
  body[data-user-role="organisation"] .lf-of-dash-banner__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }
  body[data-user-role="organisation"] .lf-of-dash-banner__row-label {
    flex: 1 1 100%;
  }
  body[data-user-role="organisation"] .lf-of-dash-banner__row .org-btn-outline,
  body[data-user-role="organisation"] .lf-of-dash-banner__row .lf-of-dash-banner__dismiss {
    flex: 1 1 auto;
    min-height: 40px;
  }

  /* Annuaire / CRM table : cadre scroll */
  body[data-user-role="organisation"] .lfann-wrap,
  body[data-user-role="organisation"] .lfann-table-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  body[data-user-role="organisation"] .lfann-table {
    max-width: none;
  }
}

/* ── LP / pages marketing ── */
@media (max-width: 767.98px) {
  .lp-btn-primary,
  .lf-btn-green,
  .sp-cta-btn-green,
  .lp-btn-white,
  .lp-btn-outline-purple,
  .sp-cta-btn-outline {
    width: 100%;
    max-width: 100%;
    text-align: center;
    justify-content: center;
    box-sizing: border-box;
  }

  .mafile-lp,
  .sales-funnel,
  .lp-section {
    max-width: 100%;
    overflow-x: clip;
  }

  .sales-funnel .container,
  .sales-funnel .row {
    max-width: 100%;
  }

  .maf-included-box,
  .sp-form-card-body,
  .maf-faq-item,
  .maf-testi-card {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .sp-form-card-header {
    padding: 1rem 1.1rem !important;
  }

  /* Tableau comparatif tarifs : déjà wrap scrollable — forcer le cadre */
  .lf-cmp-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ── Radar / Ma File / chips filtres ── */
@media (max-width: 767.98px) {
  body[data-user-role="organisation"] .lf-cfa-cockpit__seg,
  body[data-user-role="organisation"] .lf-ma-file-stats,
  body[data-user-role="organisation"] .lf-radar-filters,
  body[data-user-role="organisation"] .lf-file-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    max-width: 100%;
  }

  body[data-user-role="organisation"] .lf-cfa-cockpit__seg-btn,
  body[data-user-role="organisation"] .lf-ma-file-stat {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
  }

  body[data-user-role="organisation"] .lf-radar-card,
  body[data-user-role="organisation"] .lf-ma-file-card,
  body[data-user-role="organisation"] .lf-file-item {
    max-width: 100%;
  }
}

/* ── Facturation / finance / crédits ── */
@media (max-width: 767.98px) {
  body[data-user-role="organisation"] .lf-finance-hub-tabs,
  body[data-user-role="organisation"] .lf-students-hub-tabs,
  body[data-user-role="organisation"] .nav-tabs,
  body[data-user-role="organisation"] .lf-abn-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-width: 100%;
  }

  body[data-user-role="organisation"] .lf-finance-hub-tabs .nav-link,
  body[data-user-role="organisation"] .lf-students-hub-tabs a,
  body[data-user-role="organisation"] .lf-abn-tabs [role="tab"] {
    flex: 1 1 auto;
    text-align: center;
    white-space: normal;
  }

  body[data-user-role="organisation"] .lf-org-page--factures,
  body[data-user-role="organisation"] .lf-org-page--credits,
  body[data-user-role="organisation"] .lf-buy-credits {
    max-width: 100%;
    overflow-x: clip;
  }
}

/* ── Communication / Qualiopi / paramétrage ── */
@media (max-width: 767.98px) {
  body[data-user-role="organisation"] .lf-org-page--communication-hub,
  body[data-user-role="organisation"] .lf-param-hub,
  body[data-user-role="organisation"] .lf-org-page--qualiopi {
    max-width: 100%;
    overflow-x: clip;
  }

  body[data-user-role="organisation"] .lf-ew-page-row,
  body[data-user-role="organisation"] .org-wizard-shell,
  body[data-user-role="organisation"] .lf-ew-shell {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* ── Sessions / calendrier / filtres ── */
@media (max-width: 767.98px) {
  body[data-user-role="organisation"] .lf-sess-filters,
  body[data-user-role="organisation"] .organisation-session-filters,
  body[data-user-role="organisation"] .filters-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  body[data-user-role="organisation"] .lf-sess-filters select,
  body[data-user-role="organisation"] .lf-sess-filters .form-select,
  body[data-user-role="organisation"] .organisation-session-filters .form-control,
  body[data-user-role="organisation"] .organisation-session-filters .form-select {
    width: 100%;
    max-width: 100%;
  }
}

/* ── Espace stagiaire (frontend connecté) ── */
@media (max-width: 767.98px) {
  .lf-student-page--home,
  .lf-student-unified-design,
  .mc-content,
  .sh-main,
  .lf-stu-home-main {
    max-width: 100%;
    overflow-x: clip;
  }

  .lf-student-unified-design .sh-layout,
  .lf-student-page--home .sh-layout {
    flex-direction: column;
  }

  .mc-content .row > [class*="col-"],
  .sh-main .row > [class*="col-"] {
    max-width: 100%;
  }

  .sh-continue-card,
  .sh-stat-card,
  .sh-teaser-card,
  .mc-course-card {
    max-width: 100%;
  }
}

@media (max-width: 575.98px) {
  .lf-student-unified-design h1,
  .lf-student-page--home h1,
  .mc-content h1 {
    font-size: 1.35rem;
    line-height: 1.25;
    word-break: break-word;
  }

  .lf-journey-btn-primary,
  .sh-resume-cta,
  .mc-content .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Header public / menu hamburger ── */
@media (max-width: 767.98px) {
  .navbar,
  .menubar,
  header.header {
    max-width: 100vw;
  }

  .btn-bar,
  .mobile-menu-btn,
  button.navbar-toggler {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ── Formulaires généraux (forgot password, contact, FAQ) ── */
@media (max-width: 575.98px) {
  .form-control,
  .form-select,
  input.form-control,
  select.form-control,
  textarea.form-control {
    font-size: 16px; /* anti-zoom iOS — n’affecte pas desktop */
  }

  .forgot-password-form .btn,
  .contact-form .btn,
  .faq-page .btn {
    width: 100%;
    min-height: 44px;
  }
}

/* ── Catalogue OF / chips domaines ── */
@media (max-width: 767.98px) {
  body[data-user-role="organisation"] .lf-courses-catalog [role="navigation"],
  body[data-user-role="organisation"] .lf-catalog-domains,
  body[data-user-role="organisation"] .lf-courses-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body[data-user-role="organisation"] .lf-course-card,
  body[data-user-role="organisation"] .lf-courses-catalog .card {
    max-width: 100%;
  }
}

/* ── Commercial / formateur shells (même prudence) ── */
@media (max-width: 991.98px) {
  body[data-user-role="commercial"] .form-card,
  body[data-user-role="commercial"] .card,
  body[data-user-role="formateur"] .form-card,
  body[data-user-role="formateur"] .card {
    max-width: 100%;
  }
}

/* ── Packs crédits / buy credits ── */
@media (max-width: 767.98px) {
  body[data-user-role="organisation"] .lf-buy-intro,
  body[data-user-role="organisation"] .lf-credit-packs,
  body[data-user-role="organisation"] .lf-buy-recap {
    max-width: 100%;
  }

  body[data-user-role="organisation"] .lf-credit-pack-card,
  body[data-user-role="organisation"] [class*="lf-buy"] .card {
    max-width: 100%;
  }
}

/* ── Wizard inscription / steppers / hub tabs ── */
@media (max-width: 767.98px) {
  body[data-user-role="organisation"] .lf-students-hub-tabs,
  body[data-user-role="organisation"] [aria-label*="Étapes"],
  body[data-user-role="organisation"] .lf-ew-steps,
  body[data-user-role="organisation"] .org-wizard-steps {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    gap: 0.35rem;
    padding-bottom: 4px;
  }

  body[data-user-role="organisation"] .lf-ew-page--shell,
  body[data-user-role="organisation"] .org-wizard-shell {
    max-width: 100%;
  }
}

/* ── Tunnel post-signup OF (demarrage/formation · stagiaire · pret) ── */
@media (max-width: 991.98px) {
  body.lf-of-demarrage-shell .lf-act-main h1,
  body.lf-of-demarrage-shell .lf-act-sub,
  body[data-lf-view="demarrage_action"] .lf-act-main h1,
  body[data-lf-view="demarrage_action"] .lf-act-sub {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body.lf-of-demarrage-shell .lf-act-shell,
  body[data-lf-view="demarrage_action"] .lf-act-shell {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.lf-of-demarrage-shell .lf-act-grid,
  body[data-lf-view="demarrage_action"] .lf-act-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 767.98px) and (min-width: 521px) {
  body.lf-of-demarrage-shell .lf-act-grid,
  body[data-lf-view="demarrage_action"] .lf-act-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* =============================================================================
 * Suite CDC §6 — tablette 768 + V2 public + V3 stagiaire + V4 com/form
 * Additif @media only · 2026-08-11
 * ============================================================================= */

/* ── 6.1 / global : tablette ≤991.98 — touch 16/44 générique ── */
@media (max-width: 991.98px) {
  /* Public / ads / auth */
  .lf-login-landing .form-control,
  .lf-signup-page .form-control,
  .lf-ofw .form-control,
  .lf-login-landing input[type="text"],
  .lf-login-landing input[type="email"],
  .lf-login-landing input[type="password"],
  .lf-login-landing input[type="tel"],
  .lf-signup-page input[type="text"],
  .lf-signup-page input[type="email"],
  .lf-signup-page input[type="password"],
  .lf-signup-page input[type="tel"],
  .lf-public-form input.form-control,
  .lf-public-form select.form-control,
  .lf-public-form textarea.form-control,
  form.contact-form .form-control,
  .shopping-cart .form-control,
  .payment-form .form-control {
    font-size: 16px !important;
    min-height: 44px !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .lf-login-submit,
  .lf-signup-page .btn-primary,
  .lf-ofw-btn--primary,
  a.udemy-btn-primary,
  button.udemy-btn-primary,
  .lf-public-menubar .btn,
  .home-learnifi .btn,
  .lp-btn-primary,
  .lf-btn-green,
  .sp-cta-btn-green,
  .tarifs-page .btn,
  .contact-us .btn {
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  /* Stagiaire MC */
  .mc-nav a,
  .mc-nav .mc-link,
  .mc-main .btn,
  .mc-main .org-btn-primary,
  .mc-main a.btn,
  .student-mc .btn,
  .lf-student-panel .btn {
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  .mc-main input.form-control,
  .mc-main select.form-control,
  .mc-main textarea.form-control,
  .student-mc input.form-control,
  .student-mc select.form-control {
    font-size: 16px !important;
    min-height: 44px !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  /* Commercial + formateur (backend content) */
  body[data-user-role="commercial"] .content-page input.form-control,
  body[data-user-role="commercial"] .content-page select.form-control,
  body[data-user-role="commercial"] .content-page textarea.form-control,
  body[data-user-role="formateur"] .content-page input.form-control,
  body[data-user-role="formateur"] .content-page select.form-control,
  body[data-user-role="formateur"] .content-page textarea.form-control,
  body[data-user-role="commercial"] .lfc-root input.form-control,
  body[data-user-role="commercial"] .lfc-root select.form-control {
    font-size: 16px !important;
    min-height: 44px !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  body[data-user-role="commercial"] .content-page .btn,
  body[data-user-role="commercial"] .content-page .org-btn-primary,
  body[data-user-role="commercial"] .content-page .org-btn-outline,
  body[data-user-role="commercial"] .lfc-btn,
  body[data-user-role="formateur"] .content-page .btn,
  body[data-user-role="formateur"] .content-page .org-btn-primary,
  body[data-user-role="formateur"] .content-page .org-btn-outline {
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  body[data-user-role="commercial"] .content-page .table-responsive,
  body[data-user-role="formateur"] .content-page .table-responsive,
  .mc-main .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

/* ── V2 LP / blog : anti-overflow tablette ── */
@media (max-width: 991.98px) {
  .mafile-lp,
  .lp-section,
  [class*="lp-"] .container,
  .blog-details,
  .courses-page,
  .course-page,
  .tarifs-page {
    max-width: 100% !important;
    overflow-x: clip;
  }

  .lf-cmp-table-wrap,
  .blog-list .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Cookie banner EU + CTA publics génériques */
  #cookieConsentContainer .btn,
  #cookieConsentContainer button {
    min-height: 44px !important;
    min-width: 44px !important;
    font-size: 16px !important;
    padding: 10px 16px !important;
    box-sizing: border-box !important;
  }

  /* Newsletter / recherche header / contact / blog */
  footer input[type="email"],
  footer input[type="text"],
  header input[type="search"],
  header input[type="text"],
  .newsletter input,
  .footer-subscribe input,
  .search-box input,
  .blog-search input,
  input.form-control,
  select.form-control,
  textarea.form-control,
  input[type="email"],
  input[type="search"],
  input[type="text"],
  input[type="password"],
  input[type="tel"],
  input[type="number"] {
    font-size: 16px !important;
  }

  input.form-control,
  select.form-control,
  textarea.form-control,
  .form-control {
    min-height: 44px !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  /* Toggle MDP / icônes header / steppers LP */
  .password-toggle,
  .toggle-password,
  .lf-toggle-pw,
  .lf-login-input-wrap .lf-toggle-pw,
  .lf-login-landing button[type="button"],
  .lf-signup-page button[type="button"],
  .lp-stepper button,
  .lp-carousel button,
  [class*="lp-"] .btn-sm,
  [class*="lp-"] button.btn {
    min-height: 44px !important;
    min-width: 44px !important;
    box-sizing: border-box !important;
  }

  .lf-login-input-wrap .lf-toggle-pw {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px !important;
  }

  /* Promo bar close + modales LP */
  #close-promo,
  button.close,
  .btn-close,
  .modal .close,
  button[aria-label="Close"],
  .lp-mock-close,
  .mafile-lp button.close-btn {
    min-height: 44px !important;
    min-width: 44px !important;
    box-sizing: border-box !important;
  }

  /* OF banners / deferred */
  body[data-user-role="organisation"] .lf-of-dash-banner__dismiss,
  body[data-user-role="organisation"] .lf-deferred-dismiss,
  .lf-of-dash-banner__dismiss,
  .lf-deferred-dismiss {
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 0.5rem 0.85rem !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
  }

  /* Radar chips + CTA focus */
  body[data-user-role="organisation"] .lf-radar-chips .lf-ma-file-stat,
  body[data-user-role="organisation"] .lf-radar-chips button,
  body[data-user-role="organisation"] .lf-radar-focus-card__actions > a,
  body[data-user-role="organisation"] .lf-radar-focus-card__actions > .btn,
  body[data-user-role="organisation"] .lf-radar-queue-card__cta,
  body[data-user-role="organisation"] a.btn-sm,
  body[data-user-role="organisation"] .btn-sm {
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  /* Session wizard presets */
  .lf-wizard-preset-btn,
  #lf-wizard-preset-chips .btn,
  .lf-sw-mc-v4 .btn-sm {
    min-height: 44px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
  }

  /* CRM confirm / resume */
  body[data-user-role="organisation"] .lfcrm-btn,
  body[data-user-role="organisation"] .modal-footer .btn,
  body[data-user-role="organisation"] .swal2-actions button,
  body[data-user-role="organisation"] [class*="lfcrm"] .btn {
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  /* Catalogue recherche */
  body[data-user-role="organisation"] .lf-courses-catalog button,
  body[data-user-role="organisation"] .lf-courses-catalog .btn,
  .courses-page .btn,
  .courses-page button,
  .blog-search button,
  .search-option button,
  .search-box button {
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  /* Catalogue public filtres */
  .courses-page input[type="checkbox"],
  .courses-page .form-check-input {
    min-height: 20px !important;
    min-width: 20px !important;
    width: 20px !important;
    height: 20px !important;
  }

  .courses-page .category-filter input,
  .courses-page input[placeholder*="catégorie" i],
  .courses-page input[aria-label*="catégorie" i],
  .courses-page input[aria-label*="Filtrer" i] {
    min-height: 44px !important;
    font-size: 16px !important;
  }

  .courses-page .list-grid-btn,
  .courses-page button[aria-label*="liste" i],
  .courses-page button[aria-label*="grille" i],
  .courses-page button[title*="liste" i] {
    min-height: 44px !important;
    min-width: 44px !important;
  }

  /* Stagiaire chips filtres / profil */
  .mc-main .btn-sm,
  .mc-main .nav-pills .nav-link,
  .mc-main .mc-filter-chip,
  .mc-main button.chip,
  .student-mc .btn-sm,
  .lf-student-panel .btn-sm,
  .mc-main .btn-group .btn {
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  /* Commercial / formateur search + filter */
  body[data-user-role="commercial"] input[type="search"],
  body[data-user-role="commercial"] input.form-control,
  body[data-user-role="commercial"] .lfc-search input,
  body[data-user-role="formateur"] input[type="search"],
  body[data-user-role="formateur"] input.form-control,
  body[data-user-role="formateur"] .btn,
  body[data-user-role="formateur"] button {
    min-height: 44px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
  }

  /* LP mock widgets (démos interactives) */
  [class*="lp-"] .btn,
  [class*="lp-"] button,
  .stagiaires-lp button,
  .sessions-lp button,
  .mock-ui button,
  .lf-lp-mock button {
    min-height: 44px !important;
    min-width: 44px !important;
    box-sizing: border-box !important;
  }

  [class*="lp-"] input,
  .stagiaires-lp input,
  .sessions-lp input,
  .mock-ui input {
    min-height: 44px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
  }

  /* Fermetures sticky / toast / LP bar */
  .lf-sticky-close,
  .lf-toast-close,
  #lf-sticky-close,
  #lf-toast-close,
  [id$="-sticky-bar"] button,
  [id*="sticky-bar"] button {
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
  }

  /* OF dashboard / hub CTA sm */
  body[data-user-role="organisation"] .org-btn-outline--sm,
  body[data-user-role="organisation"] a.org-btn-outline,
  body[data-user-role="organisation"] .org-btn-outline,
  body[data-user-role="organisation"] .lf-ma-file-power-btn,
  body[data-user-role="organisation"] .lf-radar-actions-menu__item,
  body[data-user-role="organisation"] .lf-empty-state .btn,
  body[data-user-role="organisation"] .lf-empty-state a {
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  /* Catalogue public — recherche / layout / filtres */
  .lf-courses-catalog .lf-courses-search-btn,
  .lf-courses-catalog .lf-courses-search-field input,
  .lf-courses-catalog #lf_cat_filter_search,
  .lf-courses-catalog .lf-filter-cat-search input,
  .lf-courses-catalog button,
  .lf-courses-catalog .btn,
  .lf-courses-catalog a.lf-courses-reset-btn,
  .lf-courses-catalog .list-btn,
  .lf-courses-catalog .grid-btn,
  .courses-list-view-btn-group .btn,
  .courses-list-view-btn-group button {
    min-height: 44px !important;
    min-width: 44px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
  }

  .lf-courses-catalog #lf_cat_filter_search {
    width: 100% !important;
    height: auto !important;
  }

  /* Blog search */
  .blog-search button,
  .blog-body button[type="submit"],
  form.blog-search .btn {
    min-height: 44px !important;
  }

  /* Stagiaire tabs formations + profil */
  .mc-tab,
  .mc-tabs .mc-tab,
  .sh-btn-continue,
  .sh-btn-outline,
  .sh-main button,
  .sh-prof-main button,
  .sh-profile-card button {
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  /* LP mock / demos — padding pour atteindre 44 */
  .stagiaires-lp button,
  .sessions-lp button,
  .lp-demo button,
  .lp-phone-mock button,
  [class*="-lp"] button,
  .lf-call-btn,
  .lf-call-btn--answer,
  button[data-call-answer],
  .lf-blog-search-btn,
  .lf-blog-search-inline button {
    min-height: 44px !important;
    min-width: 44px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
  }

  .stagiaires-lp input,
  .sessions-lp input,
  [class*="-lp"] input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  .lf-call-demo input {
    min-height: 44px !important;
    height: 44px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
  }

  /* Sessions LP stepper */
  .sessions-lp .btn,
  .sessions-lp button.btn,
  .sess-wiz-next,
  button.sess-wiz-next,
  button[data-sess-wiz-next] {
    min-height: 44px !important;
    font-size: 14px !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
  }

  /* OF CTA (patch last) — Continuer un dossier / empty / hero */
  body[data-user-role="organisation"] .content-page a.org-btn-primary,
  body[data-user-role="organisation"] .content-page a.org-btn-outline,
  body[data-user-role="organisation"] .content-page button.org-btn-primary,
  body[data-user-role="organisation"] .content-page button.org-btn-outline,
  body[data-user-role="organisation"] .lf-org-page--of-cockpit a.org-btn-primary,
  body[data-user-role="organisation"] .lf-org-page--of-cockpit a.org-btn-outline,
  body[data-user-role="organisation"] .lf-of-dashboard-catalog a.org-btn-primary,
  body[data-user-role="organisation"] .lf-of-dashboard-catalog a.org-btn-outline,
  body[data-user-role="organisation"] .lf-courses-header-foot a.org-btn-primary,
  body[data-user-role="organisation"] .lf-org-panel__foot a.org-btn-primary,
  body[data-user-role="organisation"] .lf-org-panel__foot a.org-btn-outline {
    min-height: 44px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    box-sizing: border-box !important;
  }

  /* LP stagiaires — mock wizard / drawer */
  .lf-wiz-btn,
  .lf-wiz-btn--primary,
  .lf-wiz-btn--ghost,
  .lf-app-drawer-close,
  .lf-wiz-field input,
  .lf-wiz-field select,
  .lf-wiz-card input,
  .lf-wiz-card select,
  .lf-wiz-card button {
    min-height: 44px !important;
    min-width: 44px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
  }

  .lf-wiz-field input,
  .lf-wiz-card input[type="text"],
  .lf-wiz-card input[type="email"],
  .lf-wiz-card input[type="search"] {
    height: 44px !important;
    font-size: 16px !important;
  }

  /* V3 stagiaire — badges / cadeaux / messagerie / docs */
  .bg-filt,
  .bg-filters button,
  .rw-bonus-pick-btn,
  .msg-search input,
  #msgSearch,
  .msg-send-btn,
  .msg-new-btn,
  .mc-content .btn,
  .mc-content a.btn,
  .mc-content button,
  a.btn-outline-secondary,
  .my-documents .btn,
  .sh-btn-outline,
  .sh-btn-continue {
    min-height: 44px !important;
    min-width: 44px !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
  }

  .msg-search input,
  #msgSearch {
    font-size: 16px !important;
    height: 44px !important;
  }

  /* CRM commercial SmartOF search */
  body[data-user-role="commercial"] input[type="search"],
  body[data-user-role="commercial"] input[placeholder*="Rechercher" i],
  .lfcrm-search input,
  .lf-crm-search input,
  .crm-smartof input.form-control,
  .crm-smartof input[type="search"],
  .crm-smartof input[type="text"],
  .lfann-hub .lfann-search input,
  .lfann-hub .lfann-search .lf-crm-search-input,
  .lfann-search .lf-crm-search-input,
  input.lf-crm-search-input,
  #crm_quick_search {
    font-size: 16px !important;
    min-height: 44px !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  /* LP suivi playground CTAs (si hors scale) */
  .lf-sh1-btn,
  #suiv-pdf-btn,
  .suivi-pedagogique button,
  .lp-suivi button,
  [class*="suiv"] button {
    min-height: 44px !important;
    font-size: 14px !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
  }

  /* Lecteur leçon / SCORM zoom + PDF */
  #zoom-out,
  #zoom-in,
  #zoom-reset,
  #zoom_out,
  #zoom_in,
  button#zoom-out,
  button#zoom-in,
  button#zoom-reset,
  .scorm-zoom-controls .btn,
  .scorm-zoom-controls button,
  .scorm-zoom-controls .btn.btn-sm,
  .scorm-zoom-controls .btn.btn-light,
  .course-content-area .btn-sm,
  .course-content-area .btn,
  .course-content-area button,
  .scorm-player-toolbar .btn,
  .scorm-player-toolbar button,
  .learnifi-course-player button,
  .learnifi-course-player .btn,
  body.lesson-page .btn-sm,
  body .scorm-zoom-controls button.btn,
  .lf-player-btn,
  .lf-player-btn--icon,
  #lf-player-dark-toggle {
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
  }

  /* Portail tuteur CFA */
  .lf-cfa-tuteur-btn,
  body.lf-cfa-tuteur-login .lf-cfa-tuteur-btn,
  .lf-cfa-tuteur-login button[type="submit"] {
    min-height: 44px !important;
    min-width: 44px !important;
    box-sizing: border-box !important;
  }

  /*
   * Topbar « Visitez le site Web » :
   * NE PAS forcer display ici — ça écrasait Bootstrap .d-none et poussait
   * .button-menu-mobile hors viewport (hamburger invisible @390).
   * Touch 44px seulement quand le bouton est réellement affiché (≥768).
   */
  @media (min-width: 768px) {
    .lf-org-topbar__visit,
    a.lf-org-topbar__visit.btn,
    .navbar-custom .lf-org-topbar__visit {
      min-height: 44px !important;
      padding: 10px 14px !important;
      font-size: 14px !important;
      box-sizing: border-box !important;
      display: inline-flex !important;
      align-items: center !important;
    }
  }

  /* Filet de sécurité : masquer visit + libérer la place pour le hamburger */
  @media (max-width: 767.98px) {
    body[data-user-role="organisation"] .navbar-custom.topnav-navbar .visit_website,
    body[data-user-role="commercial"] .navbar-custom.topnav-navbar .visit_website,
    body[data-user-role="formateur"] .navbar-custom.topnav-navbar .visit_website,
    body[data-user-role="organisation"] .navbar-custom.topnav-navbar .lf-org-topbar__visit,
    body[data-user-role="commercial"] .navbar-custom.topnav-navbar .lf-org-topbar__visit,
    body[data-user-role="formateur"] .navbar-custom.topnav-navbar .lf-org-topbar__visit,
    body[data-user-role="organisation"] .navbar-custom.topnav-navbar a.lf-org-topbar__visit,
    body[data-user-role="commercial"] .navbar-custom.topnav-navbar a.lf-org-topbar__visit,
    body[data-user-role="formateur"] .navbar-custom.topnav-navbar a.lf-org-topbar__visit {
      display: none !important;
      width: 0 !important;
      min-width: 0 !important;
      margin: 0 !important;
      padding: 0 !important;
      overflow: hidden !important;
      border: 0 !important;
    }

    body[data-user-role="organisation"] .navbar-custom.topnav-navbar .button-menu-mobile,
    body[data-user-role="commercial"] .navbar-custom.topnav-navbar .button-menu-mobile,
    body[data-user-role="formateur"] .navbar-custom.topnav-navbar .button-menu-mobile {
      display: inline-flex !important;
      flex-shrink: 0 !important;
      margin-left: 4px !important;
      order: 99 !important;
      position: relative !important;
      z-index: 2 !important;
    }

    body[data-user-role="organisation"] .navbar-custom.topnav-navbar .lf-org-topbar__end,
    body[data-user-role="commercial"] .navbar-custom.topnav-navbar .lf-org-topbar__end,
    body[data-user-role="formateur"] .navbar-custom.topnav-navbar .lf-org-topbar__end {
      max-width: 100% !important;
      flex-shrink: 1 !important;
      min-width: 0 !important;
    }

    /* Langue : trop large avec avatar + hamburger sur ~360px */
    body[data-user-role="organisation"] .navbar-custom.topnav-navbar .topbar-right-menu > li.topbar-dropdown:has(.fa-language),
    body[data-user-role="commercial"] .navbar-custom.topnav-navbar .topbar-right-menu > li.topbar-dropdown:has(.fa-language) {
      display: none !important;
    }
  }

  /* CRM SmartOF commercial — filtres / CTA */
  body[data-user-role="commercial"] .btn,
  body[data-user-role="commercial"] .btn-sm,
  body[data-user-role="commercial"] button.btn,
  body[data-user-role="commercial"] .dropdown-toggle,
  .crm-smartof .btn,
  .crm-smartof .btn-sm,
  .crm-smartof button,
  .lfann-hub .btn,
  .lfann-hub .btn-sm,
  .lfann-hub button,
  .lfcrm-filters .btn,
  .lfcrm-toolbar .btn {
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  body[data-user-role="commercial"] input.form-control,
  body[data-user-role="commercial"] select.form-control,
  body[data-user-role="commercial"] .form-control,
  body[data-user-role="commercial"] .org-form-control,
  .crm-smartof .form-control,
  .crm-smartof .org-form-control,
  .lfann-hub .form-control,
  .lfann-hub .org-form-control,
  .lfcrm-filters .form-control,
  .advanced-search-panel .org-form-control,
  .advanced-search-panel input {
    font-size: 16px !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  .advanced-search-header button,
  button[onclick*="closeAdvancedSearch"] {
    min-width: 44px !important;
    min-height: 44px !important;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  #lf-blog-copy-link,
  button#lf-blog-copy-link {
    min-width: 44px !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  /* Formulaires publics */
  .lf-public-form button,
  .lf-public-form .btn,
  .lf-org-form button,
  .lf-org-form .btn,
  body.lf-public-form-page button,
  body.lf-public-form-page .btn {
    min-height: 44px !important;
    min-width: 44px !important;
    box-sizing: border-box !important;
  }

  /* CRM notifications + legacy tabs */
  .alerte-btn-action,
  button.alerte-btn-action {
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 10px 14px !important;
    box-sizing: border-box !important;
  }

  .smartof-tab,
  a.smartof-tab,
  button.smartof-tab {
    min-height: 44px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  /* Footer public — annule gutter Bootstrap g-5 qui déborde */
  .lf-footer .row.g-5,
  footer.lf-footer .row {
    --bs-gutter-x: 1rem;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
  }
  .lf-footer .row.g-5 > [class*="col"],
  footer.lf-footer .row > [class*="col"] {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    max-width: 100%;
  }
  .lf-footer .container {
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
    overflow-x: clip;
  }
  .lf-footer-newsletter-form {
    flex-wrap: wrap;
  }
  .lf-footer-newsletter-form input,
  .lf-footer-newsletter-form button {
    min-height: 44px;
  }

  /* Promo top bar — wrap forcé */
  #promo-banner,
  #promo-banner .container {
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  #promo-text,
  #promo-link,
  #countdown {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  /* Catalogue public chips + filtres */
  .lf-courses-chip,
  a.lf-courses-chip {
    min-height: 44px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
  }
  .lf-courses-catalog .lf-filter-toggle {
    min-height: 44px !important;
  }

  /* Fiche cours — grid minmax ne doit pas élargir la page */
  .lf-course-detail,
  .lfcd-layout,
  .lfcd-main,
  .lfcd-sidebar,
  .lfcd-section,
  .lfcd-nav {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .lfcd-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  /* Login / signup décoratif hors viewport */
  .lf-login-landing,
  .lf-signup-page,
  .lf-login-shell,
  .organisation-signup-wizard,
  .lf-org-signup {
    overflow-x: clip !important;
  }
}
