/* ============================================================
   PilotCSE — Partage compact lisible v2026-05-16.20
   Fichier : /wp-content/themes/pilotecse-child/css/zz-pcse-share-compact.css
   Objectifs :
   - une seule ligne desktop ;
   - icônes lisibles ;
   - icône Facebook visible ;
   - bloc question/remarque plus compact en formation et articles.
   ============================================================ */

body .pcse-article-sharebar.pcse-share-panel,
body .pcse-share-panel {
  display: grid !important;
  grid-template-columns: minmax(205px, auto) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 14px 0 18px !important;
  padding: 8px 11px !important;
  border-radius: 14px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.055) !important;
}

body .pcse-share-panel--moved-after-box,
body .pcse-share-panel--moved-before-box {
  margin-top: 14px !important;
  margin-bottom: 18px !important;
}

body .pcse-share-panel__intro {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 9px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

body .pcse-share-panel__eyebrow {
  margin: 0 !important;
  padding: 5px 10px !important;
  font-size: 0.82rem !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: 0.015em !important;
  border-radius: 999px !important;
}

body .pcse-share-panel__title {
  margin: 0 !important;
  font-size: 0.93rem !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

body .pcse-share-panel__actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  gap: 7px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

body .pcse-share-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  height: 33px !important;
  max-height: 33px !important;
  padding: 5px 10px !important;
  border-radius: 999px !important;
  font-size: 0.78rem !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
}

body .pcse-share-action__label {
  font-size: 0.78rem !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body .pcse-share-action svg,
body .pcse-share-action__icon,
body .pcse-share-action__icon svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  flex: 0 0 18px !important;
  display: inline-block !important;
}

/* Icône Facebook si le JS n’a pas encore injecté le SVG */
body .pcse-share-action--facebook:not(:has(.pcse-share-action__icon--facebook)):not(:has(svg))::before,
body a[href*="facebook.com/sharer"]:not(:has(.pcse-share-action__icon--facebook)):not(:has(svg))::before {
  content: "" !important;
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  flex: 0 0 18px !important;
  border-radius: 50% !important;
  background-color: #1877F2 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%231877F2'/%3E%3Cpath fill='white' d='M15.35 8.05h-1.9c-.38 0-.75.32-.75.88v1.42h2.58l-.38 2.58h-2.2v6.47h-2.68v-6.47H7.82v-2.58h2.2V8.72c0-2.22 1.35-3.48 3.37-3.48.96 0 1.78.08 2.02.12v2.69z'/%3E%3C/svg%3E") !important;
  background-size: 18px 18px !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Feedback compact */
body .pcse-resource-feedback.pcse-feedback-panel,
body .pcse-feedback-panel {
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 16px 0 20px !important;
  padding: 10px 14px !important;
  border-radius: 15px !important;
  min-height: 0 !important;
}

body .pcse-feedback-panel__icon {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  font-size: 0.88rem !important;
}

body .pcse-feedback-panel__content,
body .pcse-feedback-panel__body {
  display: block !important;
  min-width: 0 !important;
}

body .pcse-feedback-panel__title,
body .pcse-feedback-panel h2,
body .pcse-feedback-panel h3 {
  margin: 0 0 3px !important;
  font-size: 0.98rem !important;
  line-height: 1.18 !important;
  font-weight: 850 !important;
}

body .pcse-feedback-panel__text,
body .pcse-feedback-panel p {
  margin: 0 !important;
  font-size: 0.86rem !important;
  line-height: 1.35 !important;
}

body .pcse-feedback-panel__actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 0 !important;
}

body .pcse-feedback-action,
body .pcse-feedback-btn,
body .pcse-feedback-panel a,
body .pcse-feedback-panel button {
  min-height: 30px !important;
  padding: 6px 10px !important;
  font-size: 0.74rem !important;
  line-height: 1 !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
}

/* Sur largeur moyenne, on garde la lisibilité plutôt que de casser la ligne */
@media (max-width: 1120px) {
  body .pcse-article-sharebar.pcse-share-panel,
  body .pcse-share-panel {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  body .pcse-share-panel__actions {
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

  body .pcse-resource-feedback.pcse-feedback-panel,
  body .pcse-feedback-panel {
    grid-template-columns: 28px 1fr !important;
  }

  body .pcse-feedback-panel__actions {
    grid-column: 2 !important;
    justify-content: flex-start !important;
  }
}
/* ============================================================
   PilotCSE — Correction finale largeur partage / feedback formation
   Version : 2026-05-16.23.2
   Objectif : aligner sur la largeur visuelle réelle de la fiche formation
   ============================================================ */

body.pcse-layout-formation .pcse-share-panel,
body.pcse-layout-formation .pcse-feedback-panel {
  width: min(1200px, calc(100% - 48px)) !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* Barre Partager */
body.pcse-layout-formation .pcse-share-panel {
  margin-top: 16px !important;
  margin-bottom: 10px !important;
  padding: 8px 12px !important;
}

/* Bloc Question / remarque */
body.pcse-layout-formation .pcse-feedback-panel {
  margin-top: 10px !important;
  margin-bottom: 24px !important;
  padding: 12px 16px !important;

  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
}

/* Icône */
body.pcse-layout-formation .pcse-feedback-panel__icon {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
}

/* Texte */
body.pcse-layout-formation .pcse-feedback-panel__body h2 {
  margin: 0 0 4px !important;
  font-size: 0.95rem !important;
  line-height: 1.2 !important;
}

body.pcse-layout-formation .pcse-feedback-panel__body p {
  margin: 0 !important;
  font-size: 0.92rem !important;
  line-height: 1.35 !important;
}

/* Boutons */
body.pcse-layout-formation .pcse-feedback-panel__actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}

body.pcse-layout-formation .pcse-feedback-btn {
  min-height: 32px !important;
  padding: 7px 12px !important;
  font-size: 0.76rem !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

@media (max-width: 900px) {
  body.pcse-layout-formation .pcse-share-panel,
  body.pcse-layout-formation .pcse-feedback-panel {
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
  }

  body.pcse-layout-formation .pcse-feedback-panel {
    grid-template-columns: 28px minmax(0, 1fr) !important;
  }

  body.pcse-layout-formation .pcse-feedback-panel__actions {
    grid-column: 2 / -1 !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    margin-top: 6px !important;
  }
}
/* ============================================================
   PilotCSE — Masquer le partage dans les formulaires
   Version : 2026-05-16.25
   ============================================================ */

html.pcse-no-share-on-form-page .pcse-share-panel,
html.pcse-no-share-on-form-page .pcse-article-sharebar,
html.pcse-no-share-on-form-page [data-pcse-share-panel],
html.pcse-no-share-on-form-page .pcse-share-article,
body.pcse-no-share-on-form-page .pcse-share-panel,
body.pcse-no-share-on-form-page .pcse-article-sharebar,
body.pcse-no-share-on-form-page [data-pcse-share-panel],
body.pcse-no-share-on-form-page .pcse-share-article {
  display: none !important;
}
/* ============================================================
   PilotCSE — Masquer partage / feedback sur pages juridiques
   Version : 2026-05-16.30
   ============================================================ */

html.pcse-no-share-legal-page .pcse-share-panel,
html.pcse-no-share-legal-page .pcse-article-sharebar,
html.pcse-no-share-legal-page [data-pcse-share-panel],
html.pcse-no-share-legal-page .pcse-share-article,
html.pcse-no-share-legal-page .pcse-feedback-panel,
body.pcse-no-share-legal-page .pcse-share-panel,
body.pcse-no-share-legal-page .pcse-article-sharebar,
body.pcse-no-share-legal-page [data-pcse-share-panel],
body.pcse-no-share-legal-page .pcse-share-article,
body.pcse-no-share-legal-page .pcse-feedback-panel {
  display: none !important;
}
/* ============================================================
   PiloteCSE — Libellé partage en minuscule
   Version : 2026-05-16.31
   Objet : afficher "cette ressource" au lieu de "Cette ressource"
   ============================================================ */

.pcse-share-panel__title {
  text-transform: lowercase !important;
}