/* 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; }
.cf-entete::after { content: ""; display: block; clear: both; }
.cf-entete .cf-logo { float: left; max-width: 140px; max-height: 110px; object-fit: contain; margin: 0 18px 10px 0; }
.cf-entete .cf-entete-actions { margin: 10px 0 0; }
.cf-anciens { color: #64748b; font-size: .95em; }
@media (max-width: 600px) { .cf-entete .cf-logo { max-width: 96px; max-height: 72px; } }
.cg-popup .cg-popup-logo { display: block; max-width: 120px; max-height: 64px; object-fit: contain; margin: 0 0 6px; }
.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; }
/* Responsables : président en tête et plus grand, puis contact et ambassadeurs, une carte par personne. */
.cf-responsables { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px 24px;
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.cf-personne { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cf-personne img, .cf-personne .cf-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; font-size: 1.2em; }
.cf-personne-president { grid-column: 1 / -1; }
.cf-personne-president img, .cf-personne-president .cf-avatar { width: 96px; height: 96px; font-size: 1.6em; }
.cf-personne-nom { display: block; font-weight: 700; color: #1e293b; overflow-wrap: anywhere; }
.cf-personne-president .cf-personne-nom { font-size: 1.2em; }
.cf-roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cf-role { padding: 2px 10px; border-radius: 999px; font-size: .82em; background: #f1f5f9; color: #475569; }
.cf-role-president { background: #1e293b; color: #fff; }
.cf-role-ambassadeur { background: #ecfdf3; 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-badge-mini { margin: 0 0 0 8px; padding: 1px 8px; font-size: .78em; vertical-align: middle; }
.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; }

/* Événements de l'association (evenements.php et fiche.php, #42276). */
.ev-liste { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ev-ligne { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.ev-ligne img, .ev-sans-affiche { width: 64px; height: 84px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: #f1f5f9; }
.ev-ligne > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ev-ligne small { color: #64748b; }
.ev-passe { opacity: .65; }
.ev-etat { align-self: flex-start; font-size: .78em; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #f1f5f9; color: #475569; }
.ev-etat-publie { background: #dcfce7; color: #166534; }
.ev-etat-a_valider { background: #fef9c3; color: #854d0e; }
.ev-etat-refuse, .ev-etat-retire { background: #fee2e2; color: #991b1b; }
.ev-affiche { display: flex; gap: 16px; align-items: flex-start; }
.ev-affiche img { max-width: 180px; max-height: 240px; border: 1px solid #e2e8f0; border-radius: 8px; }
.ev-btn-annuler { margin-left: auto; color: #b91c1c; }
@media (max-width: 600px) { .ev-affiche, .ev-ligne { flex-wrap: wrap; } }

/* Proposition d'un événement sans compte (proposer-evenement.php, #42276) et publication par les responsables. */
.ev-pot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; } /* pot de miel anti-robot */
.ev-asso-recherche { width: 100%; margin: 0 0 8px; padding: 9px 11px; border: 1px solid #c9d6cd; border-radius: 8px; font: inherit; }
.ev-ligne-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ev-ligne-actions form { margin: 0; }
.af-pied .cf-turnstile { margin: 0 0 12px; }

/* Ambassadeurs Généatique de l'association, sur sa fiche (modifier.php, #42278). */
.af-ratt-liste { list-style: none; margin: 0 0 14px; padding: 0; }
.af-ratt-liste li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #e2e8f0; }
.af-ratt-liste li:last-child { border-bottom: 0; }
.af-ratt-liste form { margin: 0; }
.af-ratt-nom { display: flex; flex-direction: column; gap: 2px; font-weight: 600; }
.af-ratt-nom small { color: #64748b; font-weight: 400; }
.af-ratt-attente { color: #b45309 !important; }
.af-ratt-recherche { margin: 6px 0 10px; }
.af-ratt-recherche label { display: block; font-weight: 600; margin-bottom: 6px; }
.af-ratt-recherche input[type="search"] { flex: 1; min-width: 0; padding: 9px 11px; border: 1px solid #c9d6cd; border-radius: 8px; font: inherit; }
/* Photos, statuts, seuils, nouvel ambassadeur et membres déclarés (#42278, 06/10/2026). */
.af-ratt-liste .af-ratt-nom { flex: 1; min-width: 0; }
.af-ratt-photo { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #e2e8f0; }
.af-ratt-initiales { display: inline-flex; align-items: center; justify-content: center; color: #475569; font-weight: 700; }
.af-ratt-inactif { color: #b91c1c !important; }
li.af-ratt-inactif .af-ratt-photo { filter: grayscale(1); opacity: .6; }
.af-ratt-quota { margin: 4px 0 14px; padding: 10px 14px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; }
.af-ratt-quota-ok { background: #f0fdf4; border-color: #bbf7d0; }
.af-ratt-quota p { margin: 0 0 6px; }
.af-ratt-quota p:last-child { margin-bottom: 0; }
.af-ratt-compteurs { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.af-ratt-compteurs strong { font-size: 1.15em; }
.af-ratt-nouveau, .af-ratt-membres { margin: 0 0 12px; }
.af-ratt-nouveau summary, .af-ratt-membres summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.af-ratt-champ { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; margin: 0 0 10px; font-weight: 600; }
.af-ratt-champ input { padding: 9px 11px; border: 1px solid #c9d6cd; border-radius: 8px; font: inherit; font-weight: 400; }
.af-ratt-table { width: 100%; border-collapse: collapse; margin: 6px 0 8px; font-size: .95em; }
.af-ratt-table th, .af-ratt-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #e2e8f0; }
.af-ratt-membres { overflow-x: auto; }
/* Contact = président (fiche de l'association, 06/10/2026). */
.af-contact-president { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #f0fdf4; border: 1px solid #bbf7d0; }
.af-contact-president .af-case { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.af-contact-president .af-aide { margin: 6px 0 0; }
.af-form input[readonly] { background: #f1f5f9; color: #475569; }
