/* ======================================================================
   V37 — Bannière et indicateurs des pages programme sur téléphone

   Périmètre strict :
   - pages publiques issues de « Nos programmes de formation » ;
   - largeur maximale de 767 px ;
   - bannière, informations pratiques, actions et quatre indicateurs ;
   - aucune règle tablette/ordinateur ;
   - aucune donnée ni action fonctionnelle modifiée.

   Cette couche finale neutralise les conflits mobiles historiques :
   - image et contenu n'occupent plus le même calque ;
   - les sélecteurs génériques « article span » ne dimensionnent plus les
     libellés comme des cercles d'icône ;
   - les cartes n'utilisent plus de hauteur fixe ni de masquage de contenu.
   ====================================================================== */

@media screen and (max-width: 767px) {
  html body.fb-lot1015-public-page.fb-v18-program-detail {
    --fb-v37-panel-rgb: var(--fb-v34-hero-rgb, 4, 31, 83);
    --fb-v37-side-space: clamp(14px, 4.5vw, 20px);
    overflow-x: hidden;
  }

  /* ------------------------------------------------------------------
     1. Bannière : photographie autonome puis panneau bleu dans le flux
     ------------------------------------------------------------------ */
  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-left > .formation-hero.fb-v18-hero.fb-v19-hero {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 calc(50% - 50vw) !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: rgb(var(--fb-v37-panel-rgb)) !important;
    box-shadow: none !important;
    isolation: isolate !important;
  }

  /* Les anciens voiles couvraient toute la photographie. Le dégradé utile
     appartient désormais uniquement au bord inférieur du bloc image. */
  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-left > .formation-hero.fb-v19-hero::before,
  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-left > .formation-hero.fb-v19-hero::after {
    content: none !important;
    display: none !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero > .formation-hero-bg {
    position: relative !important;
    inset: auto !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    z-index: 0 !important;
    display: block !important;
    width: 100% !important;
    height: clamp(210px, 64vw, 300px) !important;
    min-height: 210px !important;
    max-height: 300px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    box-shadow: none !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero > .formation-hero-bg::after {
    content: "" !important;
    position: absolute !important;
    inset: auto 0 0 !important;
    z-index: 1 !important;
    display: block !important;
    width: 100% !important;
    height: 30% !important;
    pointer-events: none !important;
    background: linear-gradient(
      180deg,
      rgba(var(--fb-v37-panel-rgb), 0) 0%,
      rgba(var(--fb-v37-panel-rgb), 0.20) 22%,
      rgba(var(--fb-v37-panel-rgb), 0.66) 66%,
      rgb(var(--fb-v37-panel-rgb)) 100%
    ) !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero > .formation-hero-content {
    position: relative !important;
    inset: auto !important;
    grid-column: 1 !important;
    grid-row: 2 !important;
    z-index: 2 !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: clamp(16px, 4.5vw, 22px) var(--fb-v37-side-space)
      clamp(24px, 7vw, 34px) !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    color: #fff !important;
    text-align: center !important;
    background: rgb(var(--fb-v37-panel-rgb)) !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .fb-v18-hero-copy {
    width: 100% !important;
    max-width: 680px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .fb-v18-eyebrow {
    width: 100% !important;
    margin: 0 0 8px !important;
    color: var(--fb-v34-eyebrow-color, #f28b1a) !important;
    font-size: clamp(11px, 3.25vw, 14px) !important;
    line-height: 1.2 !important;
    letter-spacing: 0.07em !important;
    text-align: center !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero h1 {
    width: 100% !important;
    max-width: 650px !important;
    margin: 0 auto 12px !important;
    color: #fff !important;
    font-size: clamp(24px, 7.6vw, 34px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.018em !important;
    text-align: center !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: anywhere !important;
    text-overflow: clip !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .fb-v19-hero-description {
    width: 100% !important;
    max-width: 620px !important;
    margin: 0 auto !important;
    color: rgba(255, 255, 255, 0.96) !important;
    font-size: clamp(12px, 3.5vw, 15px) !important;
    line-height: 1.45 !important;
    font-weight: 650 !important;
    text-transform: none !important;
    text-align: center !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: break-word !important;
  }

  /* ------------------------------------------------------------------
     2. Informations pratiques : grille 2 x 2 compacte et lisible
     ------------------------------------------------------------------ */
  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .fb-v19-hero-meta {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 620px !important;
    gap: 8px !important;
    margin: clamp(15px, 4vw, 20px) auto 0 !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .fb-v19-meta-item {
    width: auto !important;
    min-width: 0 !important;
    min-height: 58px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 8px !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    column-gap: 8px !important;
    row-gap: 2px !important;
    align-items: center !important;
    align-content: center !important;
    border: 1px solid rgba(255, 255, 255, 0.34) !important;
    border-radius: 7px !important;
    background: rgba(2, 25, 68, 0.16) !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .fb-v19-meta-item::after {
    content: none !important;
    display: none !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .fb-v19-meta-icon {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    align-self: center !important;
    display: grid !important;
    place-items: center !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    margin: 0 !important;
    border: 1.25px solid rgba(255, 255, 255, 0.82) !important;
    border-radius: 6px !important;
    background: rgba(4, 35, 89, 0.16) !important;
    color: #fff !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .fb-v19-meta-legacy {
    display: none !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .fb-v19-meta-svg,
  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .fb-v19-meta-svg svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .fb-v19-meta-item b,
  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .fb-v19-meta-item > span:last-child {
    grid-column: 2 !important;
    min-width: 0 !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    text-align: left !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: break-word !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .fb-v19-meta-item b {
    grid-row: 1 !important;
    align-self: end !important;
    color: var(--fb-v34-eyebrow-color, #f28b1a) !important;
    font-size: clamp(8px, 2.35vw, 10px) !important;
    line-height: 1.12 !important;
    letter-spacing: 0.01em !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .fb-v19-meta-item > span:last-child {
    grid-row: 2 !important;
    align-self: start !important;
    color: #fff !important;
    font-size: clamp(9px, 2.75vw, 11px) !important;
    line-height: 1.18 !important;
    font-weight: 800 !important;
  }

  /* ------------------------------------------------------------------
     3. Actions : deux boutons de même largeur sur une seule rangée
     ------------------------------------------------------------------ */
  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .formation-hero-actions {
    position: static !important;
    inset: auto !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 620px !important;
    margin: clamp(15px, 4vw, 20px) auto 0 !important;
    padding: 0 !important;
    gap: 8px !important;
    transform: none !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .formation-hero-actions .btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 50px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 9px 7px !important;
    box-sizing: border-box !important;
    border-radius: 5px !important;
    font-size: clamp(10px, 3vw, 12.5px) !important;
    line-height: 1.18 !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow: visible !important;
    overflow-wrap: break-word !important;
    text-overflow: clip !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .formation-hero-actions .register-btn {
    order: 1 !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .formation-hero-actions .download-btn {
    order: 2 !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero .formation-hero-actions .btn:focus-visible {
    outline: 3px solid #ffd16a !important;
    outline-offset: 3px !important;
  }

  /* ------------------------------------------------------------------
     4. Indicateurs : grille 2 x 2, contenu unique dans le flux normal
     ------------------------------------------------------------------ */
  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-left > .formation-kpis.fb-v18-kpis.fb-v19-kpis {
    position: relative !important;
    z-index: 6 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
    align-items: stretch !important;
    width: calc(100% - 24px) !important;
    max-width: 680px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    gap: 10px !important;
    margin: -16px auto 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis > article.fb-v19-kpi,
  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis > article.fb-v19-kpi:nth-child(3),
  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis > article.fb-v19-kpi:nth-child(4) {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: clamp(12px, 3.5vw, 16px) clamp(8px, 2.7vw, 12px) !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    border: 1px solid #e1e6ee !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 5px 15px rgba(7, 34, 86, 0.09) !important;
    text-align: center !important;
    transform: none !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis > article.fb-v19-kpi::after {
    content: none !important;
    display: none !important;
  }

  /* Le sélecteur historique « article span » transformait aussi les libellés
     imbriqués en disques de 42 px. Chaque famille est réinitialisée ici. */
  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis .fb-v19-kpi-icon {
    display: grid !important;
    place-items: center !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    margin: 0 auto 8px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    font-size: 0 !important;
    line-height: 0 !important;
    overflow: visible !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis .fb-v19-kpi-1 .fb-v19-kpi-icon {
    background: #fff0f1 !important;
    color: #e51f2a !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis .fb-v19-kpi-2 .fb-v19-kpi-icon {
    background: #edf5ff !important;
    color: #0968d8 !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis .fb-v19-kpi-3 .fb-v19-kpi-icon {
    background: #edf9ef !important;
    color: #2c9d47 !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis .fb-v19-kpi-4 .fb-v19-kpi-icon {
    background: #fff3e8 !important;
    color: #f27a12 !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis .fb-v19-kpi-icon > .fb-v19-kpi-legacy {
    display: none !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis .fb-v19-kpi-icon > .fb-v19-kpi-svg,
  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis .fb-v19-kpi-icon > .fb-v34-kpi-svg {
    display: block !important;
    flex: none !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 24px !important;
    max-height: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    line-height: 0 !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis .fb-v19-kpi-icon svg {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis .fb-v19-kpi-copy {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis .fb-v19-kpi b {
    display: block !important;
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 0 3px !important;
    padding: 0 !important;
    font-size: clamp(14px, 4.35vw, 19px) !important;
    line-height: 1.08 !important;
    font-weight: 950 !important;
    letter-spacing: -0.02em !important;
    text-align: center !important;
    text-transform: uppercase !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow: visible !important;
    overflow-wrap: break-word !important;
    text-overflow: clip !important;
    transform: none !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis .fb-v19-kpi b::after {
    content: none !important;
    display: none !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis .fb-v19-kpi-label {
    display: block !important;
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #102654 !important;
    font-size: clamp(8.5px, 2.55vw, 10.5px) !important;
    line-height: 1.22 !important;
    font-weight: 900 !important;
    letter-spacing: -0.005em !important;
    text-align: center !important;
    text-transform: uppercase !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow: visible !important;
    overflow-wrap: break-word !important;
    text-overflow: clip !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis .fb-v19-kpi-rule {
    display: block !important;
    flex: 0 0 2px !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 2px !important;
    min-height: 2px !important;
    max-height: 2px !important;
    margin: 8px auto 10px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #12255a !important;
    transform: none !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis .fb-v19-kpi small {
    display: block !important;
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #33415e !important;
    font-size: clamp(9.5px, 2.85vw, 11.5px) !important;
    line-height: 1.38 !important;
    font-weight: 550 !important;
    text-align: left !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow: visible !important;
    overflow-wrap: break-word !important;
    text-overflow: clip !important;
    hyphens: none !important;
    transform: none !important;
  }
}

/* Les écrans les plus étroits disposent de moins d'espace interne, mais la
   structure et les deux colonnes restent identiques. */
@media screen and (max-width: 360px) {
  html body.fb-lot1015-public-page.fb-v18-program-detail {
    --fb-v37-side-space: 14px;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-hero.fb-v19-hero > .formation-hero-bg {
    height: clamp(205px, 66vw, 238px) !important;
    min-height: 205px !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-left > .formation-kpis.fb-v18-kpis.fb-v19-kpis {
    width: calc(100% - 20px) !important;
    gap: 8px !important;
  }

  html body.fb-lot1015-public-page.fb-v18-program-detail
  .formation-kpis.fb-v19-kpis > article.fb-v19-kpi {
    padding-right: 7px !important;
    padding-left: 7px !important;
  }
}
