/* ==========================================================================
   Bouton « Partager le programme » et panneau de repli (js/partage.js)
   --------------------------------------------------------------------------
   Le bouton reprend les classes existantes (.it-btn--secondaire à l'accueil,
   .ap-btn--contour sur /apporteurs) ; ce fichier ne style que l'icône et le
   panneau, rattaché au <body>. Couleurs : bleu-vert foncé #2f5856 (7,9:1 sur
   blanc), encre #1f2d2c (14,3:1). Cibles tactiles de 44 px minimum.
   Créé le 26/09/2026.
   ========================================================================== */

.osm-partage-btn { cursor: pointer; }
/* /apporteurs : les liens .ap-btn voisins sont ramenés à 500 par le site, le <button> resterait à 600 */
.ap-btn.osm-partage-btn { font-weight: 500; }
.osm-partage-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.osm-partage-panneau {
  position: absolute; z-index: 1050; top: 0; left: 0;
  width: 280px; max-width: calc(100vw - 32px); box-sizing: border-box;
  padding: 12px; background: #fff; color: #1f2d2c;
  border: 1px solid #dfe9e8; border-radius: 16px;
  box-shadow: 0 12px 32px rgba(31, 45, 44, .18);
  font-family: "Heebo", "Open Sans", sans-serif;
}
.osm-partage-panneau[hidden] { display: none; }

.osm-partage-titre {
  margin: 2px 6px 8px; font-family: "Poppins", sans-serif; font-weight: 500;
  font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: #2f5856;
}
.osm-partage-liste { list-style: none; margin: 0; padding: 0; }

.osm-partage-option {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px;
  padding: 10px 12px; border: 0; border-radius: 10px; background: transparent;
  color: #1f2d2c; font: inherit; font-size: 1rem; font-weight: 500; text-align: left;
  text-decoration: none; cursor: pointer; transition: background .15s;
}
.osm-partage-option:hover, .osm-partage-option:focus-visible { background: #eef6f5; color: #1f2d2c; text-decoration: none; }
.osm-partage-option:focus-visible { outline: 3px solid #2f5856; outline-offset: 1px; }
.osm-partage-option svg { width: 20px; height: 20px; flex-shrink: 0; color: #2f5856; }
.osm-partage-option--ok, .osm-partage-option--ok:hover { background: #fdf1df; }

.osm-partage-champ {
  display: block; width: 100%; min-height: 44px; margin: 8px 0 0; padding: 8px 10px;
  border: 1px solid #2f5856; border-radius: 8px; font-size: .875rem; color: #1f2d2c; background: #fff;
}
.osm-partage-champ[hidden] { display: none; }
.osm-partage-statut { margin: 0; font-size: .875rem; color: #2f5856; }
.osm-partage-statut:not(:empty) { margin: 8px 6px 2px; }

/* ── Variante discrète réutilisable (v2, 26/09/2026) ─────────────────────────
   Petite pastille « Partager » (icône + libellé court, aria-label complet).
   Vert foncé #2f5856 sur blanc à 60 % : 7:1 environ sur les fonds clairs du site. */
.btn-partage--discret {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 0 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .6); border: 1px solid rgba(47, 88, 86, .35); color: #2f5856;
  font-family: "Heebo", "Open Sans", sans-serif; font-size: 14px; font-weight: 500; line-height: 1;
  white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s;
}
.btn-partage--discret:hover, .btn-partage--discret:focus-visible,
.btn-partage--discret[aria-expanded="true"] { background: #fff; border-color: #2f5856; color: #2f5856; }
.btn-partage--discret:focus { outline: none; }
.btn-partage--discret:focus-visible { outline: 3px solid #2f5856; outline-offset: 2px; }
.btn-partage--discret svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Accueil : en haut à droite de l'encadré apporteurs, centré sur la ligne du sur-titre
   (marges intérieures de l'encadré : 26 × 32 px, puis 22 × 18 px sous 576 px). */
.it-apporteurs .hp-app-carte--partage > .hp-app-partage { position: absolute; z-index: 2; top: 18px; right: 32px; }
@media (min-width: 901px) {
  /* Deux colonnes : la carte « 6 % » descend sous le bouton, le texte reste en haut */
  .it-apporteurs .hp-app-carte--partage { align-items: start; }
  .it-apporteurs .hp-app-carte--partage .hp-app-blocs { margin-top: 44px; }
}
@media (max-width: 900px) {
  .it-apporteurs .hp-app-carte--partage .hp-app-surtitre { padding-right: 124px; }
}

/* /apporteurs : en haut à droite de la colonne du titre, sur la ligne du sur-titre */
.ap-hero-col { position: relative; }
.ap-hero-col > .ap-hero-partage { position: absolute; z-index: 2; top: -8px; right: 0; }
.ap-hero-col .ap-surtitre { padding-right: 124px; }

@media (max-width: 767.98px) {
  .btn-partage--discret { min-height: 44px; }
  .ap-hero-col > .ap-hero-partage { top: -12px; }
}
@media (max-width: 575.98px) {
  .it-apporteurs .hp-app-carte--partage > .hp-app-partage { top: 10px; right: 18px; }
}
@media (max-width: 379.98px) {
  .btn-partage--discret { width: 44px; padding: 0; }
  .btn-partage--discret .btn-partage-lib { display: none; }
  .it-apporteurs .hp-app-carte--partage .hp-app-surtitre, .ap-hero-col .ap-surtitre { padding-right: 56px; }
}

/* Fin de la page /apporteurs */
.ap-partage-fin { padding: 56px 0; }
.ap-partage-fin .ap-intro { margin-bottom: 22px; }

@media (prefers-reduced-motion: reduce) {
  .osm-partage-option, .btn-partage--discret { transition: none; }
}
