/* ============================================================
   style-club.css — Trombinoscope · membres, fiche, liste,
   carte, événements.
   Chargé sur : fiche.php, liste.php, carte.php, evenements.php,
                sortie.php (pour .liste-membres).
   ============================================================ */

/* ============================================================
   11. Fiche membre
   ============================================================ */
.page-fiche h1 { font-size: 1.6rem; }
.page-fiche .bloc h2 { font-size: 1.1rem; margin-top: 0; }

.photo-zone { display: flex; gap: 16px; align-items: center; margin-top: 16px; }
.apercu {
  width: 96px;
  height: 116px;
  background: #f8fafc;
  border: 1px solid var(--bord);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  flex: none;
  border-radius: var(--r-sm);
}
.apercu img { width: 100%; height: 100%; object-fit: cover; }
.apercu svg { width: 80%; height: auto; fill: var(--gris); }

.choix-liste { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.choix { white-space: nowrap; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.sous-titre {
  font-size: .8rem;
  font-weight: 600;
  color: var(--texte-doux);
  margin: 10px 0 6px;
}

.page-fiche table { font-size: .85rem; }
.page-fiche td img,
.page-fiche td .vignette,
.page-liste td img,
.page-liste td .vignette {
  width: 36px;
  height: 44px;
  object-fit: cover;
  background: #f8fafc;
  display: block;
  border-radius: 4px;
}
.page-fiche td .vignette,
.page-liste td .vignette {
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.page-fiche td .vignette svg,
.page-liste td .vignette svg { width: 100%; height: auto; fill: var(--gris); }
.filtre { margin-bottom: 12px; }

.fieldset-archive {
  background: #fdf6e0;
  border-color: #f0dcae;
}
.fieldset-archive legend { color: #7a5a1a; }

.page-fiche .onglets-fiche {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 20px;
  padding: 4px;
  background: var(--fond-blanc);
  border: 1px solid var(--bord);
  border-radius: var(--r);
}
.page-fiche .onglets-fiche button {
  background: transparent;
  color: var(--texte-doux);
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: .88rem;
  font-weight: 600;
  border: 1px solid transparent;
  box-shadow: none;
  cursor: pointer;
  transition: background var(--t), color var(--t);
}
.page-fiche .onglets-fiche button:hover {
  background: var(--accent-pale);
  color: var(--accent);
  transform: none;
  box-shadow: none;
}
.page-fiche .onglets-fiche button.actif {
  background: var(--accent-ocean);
  color: #fff;
  border-color: var(--accent-ocean);
  box-shadow: none;
  text-shadow: none;
  transform: none;
}
.page-fiche .onglet-contenu { display: none; }
.page-fiche .onglet-contenu.visible { display: block; }
.page-fiche .actions-form-bas {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 0 4px;
}
.actions-form-bas button,
.actions-form-bas .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.actions-form-bas button svg.ico,
.actions-form-bas .btn svg.ico { vertical-align: 0; }

.page-fiche .onglet-contenu:not([data-onglet="infos"]) .choix-liste {
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}
.page-fiche .onglet-contenu:not([data-onglet="infos"]) .choix {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: background var(--t), border-color var(--t);
}
.page-fiche .onglet-contenu:not([data-onglet="infos"]) .choix:hover {
  background: var(--accent-pale);
  border-color: var(--bord);
}
.page-fiche .onglet-contenu:not([data-onglet="infos"]) .choix .pastille { flex: 0 0 auto; }
.page-fiche .onglet-contenu:not([data-onglet="infos"]) .choix span:not(.pastille) { flex: 1 1 auto; }

.fieldset-suivi-competences { background: #fbfdfe; }

.page-fiche details.bloc-qualif {
  margin: 10px 0;
  border-left: 3px solid var(--accent);
  background: #fff;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  box-shadow: var(--ombre-1);
}
.page-fiche details.bloc-qualif > summary {
  cursor: pointer;
  user-select: none;
  padding: 10px 14px;
  font-size: .95rem;
  color: var(--accent);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-pale);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  transition: background var(--t);
}
.page-fiche details.bloc-qualif > summary::-webkit-details-marker { display: none; }
.page-fiche details.bloc-qualif > summary::before {
  content: '▸';
  display: inline-block;
  font-weight: 700;
  transition: transform var(--t);
}
.page-fiche details.bloc-qualif[open] > summary::before { transform: rotate(90deg); }
.page-fiche details.bloc-qualif > summary:hover { background: #cfe9f2; }
.page-fiche details.bloc-qualif[open] > summary { border-radius: 0 var(--r-sm) 0 0; }

.page-fiche details.bloc-competence {
  margin: 6px 12px 6px 18px;
  border-left: 2px solid var(--accent-doux);
  background: #fbfdfe;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.page-fiche details.bloc-competence > summary {
  cursor: pointer;
  user-select: none;
  padding: 7px 12px;
  font-size: .88rem;
  color: var(--accent-hover);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background var(--t);
}
.page-fiche details.bloc-competence > summary::-webkit-details-marker { display: none; }
.page-fiche details.bloc-competence > summary::before {
  content: '▸';
  display: inline-block;
  font-weight: 700;
  color: var(--accent-doux);
  transition: transform var(--t);
}
.page-fiche details.bloc-competence[open] > summary::before { transform: rotate(90deg); }
.page-fiche details.bloc-competence > summary:hover,
.page-fiche details.bloc-competence[open] > summary { background: var(--accent-pale); }

.badge-progression {
  display: inline-block;
  background: var(--fond);
  color: var(--texte-doux);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: .75rem;
  font-weight: 600;
  margin-left: auto;
  white-space: nowrap;
}
.badge-progression.petit { font-size: .7rem; padding: 1px 8px; }
.badge-progression.complet { background: #d7f0eb; color: #146b5e; }

/* Barres de progression pondérées (évaluations) */
.progression-wrap {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.progression-wrap .badge-progression { margin-left: 0; }

.progression-barre {
  width: 110px;
  height: 8px;
  background: #e5eef3;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(13, 59, 102, .08);
}
.progression-barre.petit {
  width: 80px;
  height: 6px;
  border-radius: 3px;
}

.progression-remplissage {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-doux), var(--accent));
  border-radius: inherit;
  transition: width .35s ease;
}
.progression-remplissage.complet {
  background: linear-gradient(90deg, #34d399, var(--succes, #10b981));
}

.page-fiche table.table-suivi {
  margin: 0 12px 10px 22px;
  width: calc(100% - 34px);
  font-size: .82rem;
  border-collapse: collapse;
}
.page-fiche table.table-suivi th {
  background: #f1f7fa;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 600;
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--bord);
  text-shadow: none;
}
.page-fiche table.table-suivi td {
  padding: 6px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.page-fiche table.table-suivi tr:last-child td { border-bottom: 0; }

.note {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.note-debutant { background: #fde7e0; color: #9b2c15; }
.note-faible   { background: #fdf6e0; color: #7a5a1a; }
.note-moyen    { background: #eaf4f9; color: #0d3b66; }
.note-maitrise { background: #d7ecf7; color: #0d3b66; }
.note-valide   { background: #d7f0eb; color: #146b5e; }

.badge-statut {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: .72rem;
  font-weight: 600;
  margin-left: 6px;
}
.badge-statut.formation { background: #fdf6e0; color: #7a5a1a; }
.badge-statut.valide    { background: #d7f0eb; color: #146b5e; }

.page-fiche .form-inline-eval {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: nowrap;
}
.page-fiche .form-inline-eval select {
  padding: 3px 6px;
  font-size: .78rem;
  width: auto;
  min-width: 90px;
  border-radius: var(--r-sm);
}
.page-fiche .form-inline-eval input[type=text] {
  padding: 3px 6px;
  font-size: .78rem;
  width: 130px;
  border-radius: var(--r-sm);
}
.page-fiche .form-inline-eval button.mini {
  padding: 3px 8px;
  font-size: .78rem;
}
.page-fiche .actions-eval-bas {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 14px 4px 4px;
  border-top: 1px solid var(--bord);
}
.page-fiche .actions-eval-bas button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.page-fiche .actions-eval-bas button svg.ico { vertical-align: 0; }
/* ============================================================
   16. Liste des membres
   ============================================================ */
.page-liste main { max-width: 1600px; }
.page-liste h1 { font-size: 1.5rem; }

.liste-compteur {
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.liste-filtres {
  margin-bottom: 14px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--fond-blanc);
  border-radius: var(--r);
  box-shadow: var(--ombre-1);
}
.liste-filtres label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
  cursor: pointer;
}
.liste-filtres .filtre {
  flex: 1 1 200px;
  min-width: 200px;
  margin-bottom: 0;
}

.liste-membres tr.ligne-archivee { opacity: .55; }
.liste-membres tr.ligne-archivee:hover { opacity: .75; }
.liste-membres td { font-size: .85rem; padding: 10px 12px; }
.liste-membres .age {
  display: inline-block;
  color: var(--texte-doux);
  font-size: .82em;
  line-height: 1.1;
  white-space: nowrap;
}

.page-liste .cell-contact { white-space: nowrap; }
.page-liste .contact-lien {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  color: var(--accent);
  text-decoration: none;
  transition: background var(--t), color var(--t);
  vertical-align: middle;
}
.page-liste .contact-lien + .contact-lien { margin-left: 2px; }
.page-liste .contact-lien:hover {
  background: var(--accent-pale);
  color: var(--accent-hover);
}
.page-liste .contact-lien svg.ico { vertical-align: 0; }

/* ============================================================
   17. Événements
   ============================================================ */
.page-evenements main { max-width: 1600px; }

.cal-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.cal-nav h2 {
  margin: 0;
  flex: 1;
  text-align: center;
  font-size: 1.15rem;
}
.cal-nav a { text-decoration: none; }

.cal-grille {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  background: var(--bord);
  border: 1px solid var(--bord);
  border-radius: var(--r);
  overflow: hidden;
}
.cal-entete {
  background: var(--degrade-abysse);
  color: #fff;
  text-align: center;
  padding: 8px 4px;
  font-size: .78rem;
  font-weight: 600;
}
.cal-case {
  background: #fff;
  min-height: 96px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cal-case.hors-mois { background: #f8fafc; }
.cal-case.aujourdhui { background: var(--accent-pale); }
.cal-case .num {
  font-size: .8rem;
  font-weight: 600;
  color: var(--texte-doux);
  margin-bottom: 2px;
}
.cal-case.aujourdhui .num { color: var(--accent); }
.cal-evt {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-decoration: none;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-evt:hover { opacity: .85; }
.cal-evt small { display: block; font-weight: 400; opacity: .85; }

.evt-liste { list-style: none; padding: 0; margin: 0; }
.evt {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 4px;
  border-bottom: 1px solid #f1f5f9;
}
.evt:last-child { border-bottom: 0; }

.evt-date {
  flex: 0 0 auto;
  width: 56px; height: 56px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--evt-couleur, var(--accent)) 0%, var(--evt-couleur, var(--accent)) 60%, rgba(0, 0, 0, 0.1) 100%);
  color: var(--evt-texte, #fff);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-weight: 700; line-height: 1;
  box-shadow: 0 2px 6px rgba(13, 59, 102, 0.15);
}
.evt-jour { font-size: 1.3rem; }
.evt-mois { font-size: .7rem; letter-spacing: .06em; margin-top: 2px; }

.evt-corps { flex: 1 1 auto; min-width: 0; }
.evt-titre { display: block; font-size: 1rem; color: var(--texte); }
.evt-meta {
  font-size: .82rem;
  color: var(--texte-doux);
  margin-top: 2px;
}
.evt-tag {
  display: inline-block;
  background: var(--accent-pale);
  color: var(--accent);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: .7rem;
  font-weight: 600;
  margin-left: 6px;
}
.evt-desc { margin: 6px 0 0; font-size: .85rem; color: var(--texte-doux); }

/* Anniversaires dans le calendrier */
.cal-anniv {
  display: block;
  font-size: .68rem;
  padding: 1px 5px;
  border-radius: 3px;
  background: #fef3c7;
  color: #92400e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  margin-top: 2px;
}

/* Anniversaires du mois (liste) */
.anniv-liste {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
}
.anniv {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: #fef9e7;
  border: 1px solid #fde68a;
}
.anniv-date {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fbbf24;
  color: #78350f;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
}
.anniv-nom {
  font-size: .88rem;
  font-weight: 500;
  color: var(--texte);
}

/* Responsive club */
@media (max-width: 900px) {
  .cal-case { min-height: 70px; font-size: .72rem; }
  .cal-evt { font-size: .65rem; padding: 1px 4px; }
}
@media (max-width: 640px) {
  .page-fiche .onglets-fiche { padding: 6px; }
}

/* ============================================================
   25. Carte des membres
   ============================================================ */
.page-carte main { max-width: 1600px; }
.page-carte h1 { font-size: 1.5rem; }

.carte-barre {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 10px;
  background: var(--fond-blanc);
  border-radius: var(--r);
  box-shadow: var(--ombre-1);
}
.carte-info { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1 1 auto; }
.carte-barre button { display: inline-flex; align-items: center; gap: 6px; }
.carte-barre button svg.ico { vertical-align: 0; }
.carte-prog { font-size: .85rem; color: var(--texte-doux); }

.carte-legende {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--texte-doux);
  margin-bottom: 10px;
  padding: 0 4px;
}
.carte-legende .carte-dot {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: -1px;
}
.carte-legende .carte-dot.actif   { background: var(--succes); }
.carte-legende .carte-dot.archive { background: var(--gris); }
.carte-legende .carte-dot.approx  { background: #fff; border: 2px dashed var(--accent); }

#carte-membres {
  height: calc(100vh - 280px);
  min-height: 480px;
  border-radius: var(--r-lg);
  box-shadow: var(--ombre-2);
  z-index: 0;
}

.marqueur-membre {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: transform .15s ease;
}
.marqueur-membre.actif   { background: var(--succes); }
.marqueur-membre.archive { background: var(--gris); }
.marqueur-membre.approx {
  background: #fff;
  color: var(--accent);
  border: 2px dashed var(--accent);
  font-size: .7rem;
}
.marqueur-membre img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.leaflet-marker-icon:hover .marqueur-membre { transform: scale(1.12); }

.leaflet-popup-content { margin: 10px 12px; font-family: var(--font-texte); }
.leaflet-popup-content .popup-nom { font-weight: 700; font-size: .92rem; color: var(--accent); }
.leaflet-popup-content .popup-ville { font-size: .82rem; color: var(--texte-doux); margin-top: 2px; }
.leaflet-popup-content .popup-lien { display: inline-block; margin-top: 6px; font-size: .82rem; color: var(--accent-hover); }

/* ---------- Clusters (Leaflet.markercluster) ---------- */
.cluster-membre {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-weight: 700;
  font-size: .9rem;
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform .15s ease;
}
.cluster-membre:hover { transform: scale(1.08); }

.cluster-membre.actif   { background: var(--succes); }
.cluster-membre.archive { background: var(--gris); }

.cluster-membre.small  { width: 36px; height: 36px; font-size: .82rem; }
.cluster-membre.medium { width: 44px; height: 44px; font-size: .95rem; }
.cluster-membre.large  { width: 50px; height: 50px; font-size: 1rem; }

@media (max-width: 640px) {
  #carte-membres { height: 70vh; }
  .carte-barre { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   26. Coordonnées GPS (fiche membre)
   ============================================================ */
.fieldset-geo {
  background: #f7fbfd;
  border-color: #d5e6ee;
}
.fieldset-geo legend { color: var(--accent); }
.fieldset-geo .muted a {
  color: var(--accent);
  text-decoration: underline;
}

.form-geo-inline {
  display: flex;
  gap: 4px;
  align-items: center;
}
.form-geo-inline input[type=text] {
  width: 100px;
  padding: 4px 6px;
  font-size: .82rem;
  border-radius: var(--r-sm);
}
/* ---------- Barres de progression (évaluations) ---------- */
.progression-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.progression-barre {
  width: 140px;
  height: 10px;
  background: #e5e7eb;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.progression-barre.petit {
  width: 90px;
  height: 7px;
  border-radius: 4px;
}

.progression-remplissage {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: inherit;
  transition: width 0.35s ease;
}

.progression-remplissage.complet {
  background: linear-gradient(90deg, #10b981, #059669);
}

.progression-texte {
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: #4b5563;
  white-space: nowrap;
}

.progression-texte.petit {
  font-size: 0.75rem;
}

/* Optionnel : conserver l'alignement du summary si tu utilises flex */
details.bloc-qualif > summary,
details.bloc-competence > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}