/* Fiche formation (produit) : en-tête à la taille des fiches historiques, blocs blancs à bordure de couleur, carte Référence discrète.
   Couleur du domaine : --blue / --box (fournies par le modèle). */

.apting-fm {
  --ap-h1-size: 40px;          /* titre de la fiche : même taille que les anciennes fiches */
  --ap-h1-weight: 600;
  --ap-h1-leading: 1.25;
  --ap-hero-min: 319px;        /* hauteur de la bande colorée des anciennes fiches */
}

/* ---------- En-tête ---------- */
.apting-fm .hero .hero-inner { padding-block: 50px; }
.apting-fm .hero .ap-back,
.apting-fm .hero .ap-back:is(:hover, :focus, :active) {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.apting-fm .hero .ap-back:hover { text-decoration: underline; text-underline-offset: 3px; }
.apting-fm .hero .ap-back svg { width: 16px; height: 16px; flex: none; }

/* ---------- Mise en page ---------- */
.apting-fm .fm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.apting-fm .fm-main { display: grid; gap: 12px; min-width: 0; }

/* ---------- Blocs de contenu ---------- */
.apting-fm .fm-block { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 8px 32px; padding: 28px 32px; border: 1px solid #d7d7d7; border-left: 5px solid var(--blue); background: #fff; }
.apting-fm .fm-block > h2 { margin: 0; color: var(--blue); font-size: 21px; font-weight: 700; line-height: 1.3; letter-spacing: 0; text-transform: uppercase; }
.apting-fm .fm-block--text { grid-template-columns: minmax(0, 1fr); }
.apting-fm .fm-block__body { min-width: 0; color: #333; font-size: 14px; line-height: 1.5; }
.apting-fm .fm-block__body > :first-child { margin-top: 0; }
.apting-fm .fm-block__body > :last-child { margin-bottom: 0; }
.apting-fm .fm-block__body p { margin: 0 0 10px; }
.apting-fm .fm-block__body :is(ul, ol) { margin: 0; padding: 0; list-style: none; }
.apting-fm .fm-block__body li { position: relative; margin: 0 0 8px; padding-left: 20px; }
.apting-fm .fm-block__body li:last-child { margin-bottom: 0; }
.apting-fm .fm-block__body ul > li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 6px; height: 6px; background: var(--blue); }   /* petit carré, couleur du domaine */
.apting-fm .fm-block__body ol { counter-reset: fm; }
.apting-fm .fm-block__body ol > li { counter-increment: fm; }
.apting-fm .fm-block__body ol > li::before { content: counter(fm) "."; position: absolute; left: 0; top: 0; color: var(--blue); font-weight: 700; }

/* ---------- Carte Référence ---------- */
.apting-fm .fm-aside { display: grid; gap: 12px; position: sticky; top: 24px; }
.apting-fm .fm-card { border: 1px solid #d7d7d7; border-left: 5px solid var(--blue); background: #fff; }
.apting-fm .fm-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #e6e6e6; }
.apting-fm .fm-card__head small { color: #666; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.apting-fm .fm-card__head strong { color: #111; font-size: 15px; font-weight: 700; }
.apting-fm .fm-facts { margin: 0; padding: 4px 18px; list-style: none; }
.apting-fm .fm-facts li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid #ececec; }
.apting-fm .fm-facts li:last-child { border-bottom: 0; }
.apting-fm .fm-facts__icon { flex: none; width: 16px; height: 16px; margin-top: 2px; color: #e6007e; }
.apting-fm .fm-facts__icon svg { display: block; width: 16px; height: 16px; }
.apting-fm .fm-facts div { display: grid; gap: 2px; min-width: 0; }
.apting-fm .fm-facts b { color: #e6007e; font-size: 11.5px; font-weight: 700; }
.apting-fm .fm-facts div > span { color: #222; font-size: 11.5px; font-weight: 400; line-height: 1.4; }   /* même taille que « Nombre d'heures » */
.apting-fm .fm-card .competence-list { display: block; padding: 4px 18px 14px; }
.apting-fm .fm-card .competence-card.fm-add { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-height: 0; padding: 0; border: 0; background: transparent; }
.apting-fm .fm-card .competence-card.fm-add .hour-picker { width: 100%; margin: 0; }
.apting-fm .fm-card .competence-card.fm-add .competence-add { width: 100%; }
.apting-fm .fm-download { padding: 0 18px 18px; }
.apting-fm .fm-download a,
.apting-fm .fm-download a:is(:hover, :focus, :active) { display: flex; align-items: center; justify-content: center; min-height: 44px; background: #000; color: #fff; font-size: 14px; font-weight: 500; text-align: center; text-decoration: none; }

/* ---------- Bas de page : boîte « Nos tarifs » aux couleurs du domaine ---------- */
.apting-fm .ap-box--accent { border-color: var(--box); border-left-color: var(--box); background: var(--box); color: #fff; }
.apting-fm .ap-box--accent h2,
.apting-fm .ap-box--accent p { color: #fff; }

@media (max-width: 1000px) {
  .apting-fm .fm-layout { grid-template-columns: minmax(0, 1fr); }
  .apting-fm .fm-aside { position: static; order: -1; }
}
@media (max-width: 760px) {
  .apting-fm .fm-block { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; }
  .apting-fm .fm-block > h2 { font-size: 18px; }
}
