/* 4F Studio — Overrides UX SaaS appliqués aux plugins métier
   (Espace Participant + Espace Client). Ne modifie pas les plugins eux-mêmes,
   mais surcharge les éléments spécifiques au site 4F-formation qu'on ne veut
   pas sur le SaaS multi-tenant. */

/* === Espace formateur — tableau Stagiaires ===

   Cache la colonne "Habilitations électriques" (NF C 18-510) qui est spécifique
   à 4F Formation (habilitation électrique). Les autres tenants n'en ont pas
   l'usage. Index basé sur la position dans le <thead> :
     1=Nom 2=Email 3=Entreprise 4=Code 5=Infos 6=Habilitations 7=Documents 8=Actions
*/
.ff-table-stagiaires th:nth-child(6),
.ff-table-stagiaires td:nth-child(6) {
  display: none !important;
}

/* === Scroll horizontal pour les grands tableaux ===
   Évite le débordement sur écrans étroits — la table devient scrollable. */
.ff-stab .ff-table-stagiaires,
.ff-stab .ff-table-emargements,
.ff-stab .ff-table-sat-avg {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}

/* Conserver l'apparence "table" malgré display:block via min-width sur thead/tbody */
.ff-stab .ff-table-stagiaires thead,
.ff-stab .ff-table-stagiaires tbody,
.ff-stab .ff-table-emargements thead,
.ff-stab .ff-table-emargements tbody,
.ff-stab .ff-table-sat-avg thead,
.ff-stab .ff-table-sat-avg tbody {
  display: table;
  width: 100%;
  min-width: 100%;
  table-layout: auto;
}

/* === Home tenant — masquer le titre WP redondant ===
   Sur la page d'accueil du tenant, le thème (Twenty Twenty-Five et autres block themes)
   affiche le titre "Accueil" en h1 au-dessus du contenu, ce qui fait doublon avec
   la raison sociale du tenant affichée par le shortcode [ffs_accueil].
   On masque le bloc de titre uniquement sur la home (body.home). */
body.home .wp-block-post-title,
body.home .entry-title,
body.home .wp-block-template-part .wp-block-post-title,
body.home main > h1:first-child,
body.home main > .entry-header,
body.home main > header.entry-header {
  display: none !important;
}

/* Réduit l'espace blanc au-dessus du contenu sur la home tenant
   (les block themes ajoutent souvent du padding important pour le header de la page). */
body.home .wp-block-post-content,
body.home main > .wp-block-group:first-child {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* === Masquer le FOOTER du thème (Twenty Twenty-Five et autres block themes)
       sur tous les sous-sites tenant. On le remplace par notre propre
       footer minimal injecté via wp_footer (cf. 4f-studio-saas.php). === */
footer.wp-block-template-part,
.wp-block-template-part[data-type="wp_template_part"][data-area="footer"],
body > footer:not(.ffs-tenant-footer):not(.fs-footer),
.wp-site-blocks > footer:not(.ffs-tenant-footer):not(.fs-footer) {
  display: none !important;
}

/* === Footer tenant minimal (injecté par wp_footer) === */
.ffs-tenant-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 20px;
  margin-top: 32px;
  font-size: 12px;
  color: #94a3b8;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}
.ffs-tenant-footer a {
  color: #475569;
  text-decoration: none;
  font-weight: 500;
}
.ffs-tenant-footer a:hover {
  color: var(--ffs-primary, #1d4ed8);
}
.ffs-tenant-footer-sep {
  color: #cbd5e1;
}
.ffs-tenant-footer-love {
  color: #94a3b8;
}
.ffs-tenant-footer-love a {
  color: #1d2327;
  font-weight: 600;
}
.ffs-tenant-footer-heart {
  display: inline-block;
  animation: ffs-heart-beat 1.4s ease-in-out infinite;
  transform-origin: center;
}
@keyframes ffs-heart-beat {
  0%,
  60%,
  100% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.18);
  }
}
