/* Page « Les associations de généalogie » : cadre commun aux pages Gnet (en-tête, pied de page collé en bas)
   et carte générale. Couleurs des couches identiques à la légende du contrôle de couches. */
body { font-family: Roboto, "Segoe UI", sans-serif; background: #f8fafc; color: #334155; margin: 0;
       display: flex; flex-direction: column; min-height: 100vh; }
header { background: #fff; border-bottom: 1px solid #e2e8f0; padding: 10px 24px; display: flex;
         justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
header h1 { font-size: 1.05em; margin: 0; }
header a { color: #64748b; text-decoration: none; font-size: .9em; }
header a:hover { color: #4fa066; }
.back { color: #64748b; text-decoration: none; font-size: .9em; }
.account-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid #cbd5e1;
               border-radius: 6px; color: #64748b; font-size: .8em; font-weight: 600; }
.account-btn:hover { background: #f1f5f9; color: #4fa066; border-color: #4fa066; }
.gnet-lang-select { font-size: .85em; }
main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px; box-sizing: border-box; }
footer.gnet-footer { flex-shrink: 0; background: #fff; border-top: 1px solid #e2e8f0; padding: 6px 16px;
         display: flex; justify-content: space-between; align-items: center; font-size: .75em; }
footer.gnet-footer .gnet-footer-brand { color: #4fa066; font-weight: 700; }
footer.gnet-footer .gnet-footer-version { color: #000; }

.cg-intro { font-size: 1em; line-height: 1.6; color: #475569; margin: 0 0 16px; max-width: 820px; }
.cg-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.cg-stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 16px; min-width: 150px; }
.cg-stat strong { display: block; font-size: 1.5em; color: #4fa066; }
.cg-stat span { font-size: .82em; color: #64748b; }

.cg-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.cg-btn { display: inline-flex; align-items: center; padding: 9px 16px; background: #4fa066; color: #fff; border: none;
          border-radius: 8px; font-size: .9em; font-weight: 600; cursor: pointer; text-decoration: none; font-family: inherit; }
.cg-btn:hover { background: #3d8552; color: #fff; }
.cg-btn:disabled { opacity: .6; cursor: default; }
.cg-btn-sec { background: #fff; color: #334155; border: 1px solid #cbd5e1; }
.cg-btn-sec:hover { background: #f1f5f9; color: #1a7f43; border-color: #4fa066; }

.cg-carte { height: 68vh; min-height: 420px; border: 1px solid #e2e8f0; border-radius: 12px; z-index: 0; }
.cg-note { font-size: .8em; color: #94a3b8; margin: 8px 0 0; }
.cg-incitation { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 12px 16px;
                 font-size: .9em; color: #166534; margin: 14px 0 0; }
.cg-incitation a { color: #166534; font-weight: 600; }

.cg-acces { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 24px; max-width: 760px;
            box-shadow: 0 4px 15px rgba(0,0,0,.04); }
.cg-acces h2 { margin: 0 0 8px; font-size: 1.1em; }
.cg-acces p { line-height: 1.6; color: #475569; font-size: .92em; }
.cg-form { margin-top: 10px; }
.cg-champs { display: flex; gap: 10px; flex-wrap: wrap; }
.cg-champs label { display: flex; flex-direction: column; gap: 4px; font-size: .78em; color: #64748b; }
.cg-champs input, .cg-champs select { padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 1.1em;
                                      font-family: inherit; min-width: 160px; }
.cg-case { display: flex; align-items: flex-start; gap: 8px; font-size: .88em; margin: 14px 0; cursor: pointer; }
.cg-case input { margin-top: 3px; flex-shrink: 0; }
.cg-message { font-size: .88em; font-weight: 600; color: #b91c1c; min-height: 1em; margin: 0 0 10px; }

/* Points et grappes de la carte (L.divIcon). */
.cg-point { border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(15,23,42,.25); box-sizing: border-box; }
.cg-point-avec { background: #4fa066; border-radius: 4px; }
.cg-point-sans { background: #fff; border: 3px solid #64748b; border-radius: 4px; }
.cg-point-ambassadeurs { background: #ea8a0c; }
.cg-point-utilisateurs { background: #2563eb; }
.cg-point-moi { background: #0f172a; border-width: 3px; }
.cg-grappe div { width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center;
                 color: #fff; font-weight: 700; font-size: 12px; border: 3px solid rgba(255,255,255,.85); box-sizing: border-box;
                 box-shadow: 0 1px 4px rgba(15,23,42,.3); }
.cg-grappe-avec div { background: rgba(79,160,102,.92); }
.cg-grappe-sans div { background: rgba(100,116,139,.9); }
.cg-grappe-ambassadeurs div { background: rgba(234,138,12,.92); }
.cg-grappe-utilisateurs div { background: rgba(37,99,235,.9); }
.cg-pastille { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: -1px; margin-right: 4px;
               border: 2px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; }
.cg-pastille.cg-point-avec { border-radius: 3px; }
.cg-pastille.cg-point-sans { border-radius: 3px; border-color: #64748b; }
.leaflet-control-layers label { font-size: 12.5px; }

.cg-popup strong { display: block; font-size: 1.05em; margin-bottom: 2px; }
.cg-popup div { margin-top: 3px; }
.cg-popup .cg-ok { color: #166534; font-weight: 600; }
.cg-popup .cg-sans { color: #b45309; font-weight: 600; }
.cg-popup .cg-statut { color: #475569; font-style: italic; }
.cg-popup a.cg-btn { margin-top: 8px; padding: 6px 12px; font-size: .85em; color: #fff; }
.cg-popup a { color: #4fa066; }

@media (max-width: 600px) {
    main { padding: 16px; }
    .cg-carte { height: 60vh; }
    .cg-stat { min-width: 0; flex: 1 1 40%; }
}

/* Survol d'un ambassadeur : photo et nom. */
.cg-infobulle { padding: 6px 10px 6px 6px; border-radius: 10px; border: 1px solid #fed7aa; }
.cg-infobulle-contenu { display: flex; align-items: center; gap: 9px; }
.cg-infobulle-contenu img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid #fdba74; }
.cg-infobulle-contenu strong { font-size: 13px; color: #334155; white-space: nowrap; }

/* Fiche d'une association : ses antennes, et le lien pour en proposer une. */
.cg-antennes { margin-top: 4px; color: #475569; font-size: .92em; }
.cg-lien-antenne { display: inline-block; margin-top: 6px; font-size: .9em; color: #1a7f43; }
.cg-proposer { margin: 16px 0 0; font-size: .92em; color: #475569; }
.cg-proposer a { color: #1a7f43; font-weight: 600; }

/* Étape d'accord : lieu de résidence (même champ que Mon compte > Informations). */
.cg-lieu { margin-top: 6px; }
.cg-lieu-titre { display: block; font-size: .78em; color: #64748b; margin-bottom: 6px; }

/* Plusieurs associations au même point : leur nombre sur le marqueur, et une fiche qui les présente toutes. */
.cg-point-nb { position: absolute; top: -8px; right: -10px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box;
    border-radius: 8px; background: #334155; color: #fff; font: 700 10px/16px Roboto, "Segoe UI", sans-serif; text-align: center; }
.cg-groupe-titre { font-weight: 700; color: #334155; margin-bottom: 6px; }
.cg-asso-bloc + .cg-asso-bloc { border-top: 1px solid #e2e8f0; margin-top: 10px; padding-top: 10px; }

/* Bulle d'une association : son nom mène à sa fiche détaillée, comme « En savoir plus ». */
.cg-popup strong a { color: inherit; text-decoration: none; }
.cg-popup strong a:hover { color: #1a7f43; text-decoration: underline; }
.cg-popup .cg-popup-boutons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cg-popup .cg-popup-boutons a.cg-btn { margin-top: 0; }
.cg-popup .cg-popup-boutons a.cg-btn-sec { color: #334155; }
.cg-popup .cg-popup-boutons a.cg-btn-sec:hover { color: #1a7f43; }

/* Fiche détaillée d'une association (fiche.php). */
.cf-page { max-width: 1100px; }
.cf-entete h1 { margin: 0 0 6px; font-size: 1.6em; color: #1e293b; overflow-wrap: anywhere; }
.cf-parent, .cf-lieu { margin: 2px 0; color: #475569; }
.cf-parent a { color: #1a7f43; font-weight: 600; }
.cf-badge { display: inline-block; margin: 10px 0 0; padding: 4px 12px; border-radius: 999px; font-size: .85em; font-weight: 600; }
.cf-badge-ok { background: #ecfdf3; color: #166534; }
.cf-badge-sans { background: #fff7ed; color: #b45309; }
.cf-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 20px; margin-top: 20px; }
.cf-carte-bloc { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px 24px; margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,.04); box-sizing: border-box; min-width: 0; }
.cf-grille .cf-carte-bloc { margin-top: 0; }
.cf-carte-bloc h2 { margin: 0 0 12px; font-size: 1.1em; }
.cf-coordonnees { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.cf-coordonnees dt { color: #64748b; font-size: .9em; }
.cf-coordonnees dd { margin: 0; overflow-wrap: anywhere; }
.cf-coordonnees a { color: #1a7f43; }
.cf-mini-carte { height: 220px; border-radius: 10px; margin-top: 16px; border: 1px solid #e2e8f0; }
.cf-sous-titre { margin: 0 0 8px; color: #64748b; font-size: .9em; }
.cf-ambassadeurs { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 12px 20px; }
.cf-ambassadeurs li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.cf-ambassadeurs img, .cf-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.cf-avatar { display: inline-flex; align-items: center; justify-content: center; background: #e2e8f0; color: #475569; font-weight: 700; }
.cf-statut { color: #166534; font-weight: 600; }
.cf-antennes { margin: 0; padding-left: 18px; }
.cf-antennes li { margin: 5px 0; }
.cf-antennes a { color: #1a7f43; font-weight: 600; }
.cf-antennes small { color: #64748b; margin-left: 6px; }
.cf-vide { color: #94a3b8; font-style: italic; }
@media (max-width: 520px) { .cf-coordonnees { grid-template-columns: 1fr; gap: 2px; } .cf-coordonnees dd { margin-bottom: 8px; } }

/* Fiche vue sans compte : invitation à se connecter à la place des données personnelles. */
.cf-reserve { margin-top: 16px; padding: 12px 14px; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 10px;
    font-size: .92em; color: #075985; }
.cf-reserve p { margin: 0; }
.cf-reserve .cg-actions { margin-top: 10px; }

/* Position utilisée pour centrer la carte (lieu de résidence ou navigateur). */
.cg-position:empty { display: none; }

/* Fiche : animations et ateliers des ambassadeurs. */
.cf-atelier + .cf-atelier { border-top: 1px solid #e2e8f0; margin-top: 14px; padding-top: 14px; }
.cf-atelier-detail { margin: 10px 0 0; line-height: 1.5; overflow-wrap: anywhere; }
