/* =============================================================================================
   staff.css — Lot UX « Équipe — finitions et Staff » (16/11/2026)

   La page Staff « simple, ludique et intuitive » : trois chiffres, des cartes de membres par
   rôle, un panneau de détail, un ajout pas à pas. Bornée à la vue Staff ; charte actuelle,
   jetons seulement, aucune couleur écrite en clair. Les animations sont courtes et se coupent
   quand le système demande moins de mouvement.
   ============================================================================================= */

#view-staff .st-hero .st-hero-actions { display: flex; align-items: flex-start; justify-content: flex-end; }
#view-staff .button { display: inline-flex; align-items: center; gap: 8px; }
#view-staff .button .picto { width: 18px; height: 18px; flex: none; }

#view-staff .st-chiffres {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 18px 0;
}
#view-staff .st-chiffre {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-premium);
  box-shadow: var(--ombre-1);
}
#view-staff .st-chiffre strong { font-size: 1.9rem; line-height: 1; font-weight: 880; }
#view-staff .st-chiffre > span:last-child { grid-column: 2; color: var(--slate); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
#view-staff .st-chiffre-rond {
  grid-row: 1 / span 2;
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue);
}
#view-staff .st-chiffre[data-ton="orange"] .st-chiffre-rond { background: var(--orange-soft); color: var(--orange); }
#view-staff .st-chiffre[data-ton="vert"] .st-chiffre-rond { background: var(--green-soft); color: var(--green); }
#view-staff .st-chiffre-rond .picto { width: 24px; height: 24px; }

#view-staff .st-equipe { margin-bottom: 18px; }
#view-staff .st-titre { margin: 0 0 12px; font-size: 1.2rem; }
#view-staff .st-groupes { display: grid; gap: 18px; }
#view-staff .st-groupe-titre {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 10px; font-size: 1rem; font-weight: 850;
}
#view-staff .st-groupe-rond {
  display: inline-grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--st-fond, var(--surface-soft)); color: var(--st-encre, var(--slate));
}
#view-staff .st-groupe-rond .picto { width: 18px; height: 18px; }
#view-staff .st-compte {
  min-width: 26px; padding: 1px 8px; border-radius: var(--radius-pilule);
  background: var(--surface-soft); color: var(--slate); font-size: 0.8rem; text-align: center;
}
#view-staff .st-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

/* Les familles de rôles : une couleur de la charte chacune, pour la puce et les ronds. */
#view-staff [data-famille="coachs"] { --st-fond: var(--blue-soft); --st-encre: var(--blue); }
#view-staff [data-famille="adjoints"] { --st-fond: var(--green-soft); --st-encre: var(--green); }
#view-staff [data-famille="gardiens"] { --st-fond: var(--amber-soft); --st-encre: var(--amber); }
#view-staff [data-famille="preparateurs"] { --st-fond: var(--orange-soft); --st-encre: var(--orange); }
#view-staff [data-famille="analystes"] { --st-fond: var(--teal-soft); --st-encre: var(--teal); }
#view-staff [data-famille="responsables"] { --st-fond: var(--surface-soft); --st-encre: var(--navy); }
#view-staff [data-famille="membres"],
#view-staff [data-famille="autres"] { --st-fond: var(--surface-soft); --st-encre: var(--slate); }

#view-staff .st-carte {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  padding: 18px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-premium);
  box-shadow: var(--ombre-1);
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
#view-staff button.st-carte:hover { transform: translateY(-2px); box-shadow: var(--ombre-2); border-color: var(--st-encre, var(--section)); }
#view-staff .st-carte:focus-visible { outline: 3px solid var(--section); outline-offset: 2px; }
#view-staff .st-carte-vide { border-style: dashed; background: none; box-shadow: none; color: var(--slate); }
#view-staff .st-rond {
  display: inline-grid; place-items: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--st-fond, var(--surface-soft)); color: var(--st-encre, var(--slate));
  font-size: 1.3rem; font-weight: 880;
}
#view-staff .st-rond .picto { width: 26px; height: 26px; }
#view-staff .st-rond-grand { width: 88px; height: 88px; font-size: 1.8rem; }
#view-staff .st-carte-nom { font-size: 1rem; font-weight: 850; overflow-wrap: anywhere; }
#view-staff .st-carte-roles,
#view-staff .st-carte-equipes { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
#view-staff .st-role {
  padding: 4px 10px; border-radius: var(--radius-pilule);
  background: var(--st-fond, var(--surface-soft)); color: var(--st-encre, var(--slate));
  font-size: 0.78rem; font-weight: 800;
}
#view-staff .st-equipe-puce {
  padding: 2px 9px; border: 1px solid var(--line); border-radius: var(--radius-pilule);
  color: var(--slate); font-size: 0.74rem; font-weight: 700;
}
#view-staff .st-etat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 800; color: var(--slate);
}
#view-staff .st-etat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
#view-staff .st-etat[data-etat="actif"] { color: var(--green); }
#view-staff .st-etat[data-etat="invitee"] { color: var(--blue); }
#view-staff .st-etat[data-etat="a-completer"] { color: var(--orange); }
#view-staff .st-etat[data-etat="expiree"] { color: var(--red); }

/* États vides accueillants. */
#view-staff .st-vide { display: grid; justify-items: center; gap: 8px; padding: 32px 16px; text-align: center; color: var(--slate); }
#view-staff .st-vide p { margin: 0; }
#view-staff .st-vide-rond { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); }
#view-staff .st-vide-rond .picto { width: 34px; height: 34px; }

/* Les replis : tout le tableau d'avant, entier, à un clic. */
#view-staff .st-repli { margin-top: 14px; }
#view-staff .st-repli > summary { display: grid; gap: 2px; cursor: pointer; list-style: none; }
#view-staff .st-repli > summary::-webkit-details-marker { display: none; }
#view-staff .st-repli-titre { font-size: 1.06rem; font-weight: 850; }
#view-staff .st-repli-titre::after { content: " +"; color: var(--section); }
#view-staff .st-repli[open] .st-repli-titre::after { content: " −"; }
#view-staff .st-repli-sommaire { color: var(--slate); font-size: 0.86rem; }
#view-staff .st-repli > *:not(summary) { margin-top: 14px; }
#view-staff .st-travail-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Le panneau de détail : à droite sur grand écran, plein écran sur téléphone. */
#view-staff .st-panneau {
  width: min(440px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 20px 0 0 20px;
  background: var(--surface-premium);
  box-shadow: var(--ombre-2);
}
#view-staff .st-panneau[open] { animation: st-glisse 200ms ease-out; }
#view-staff .st-panneau-tete { display: flex; justify-content: flex-end; padding: 12px 14px 0; }
#view-staff .st-panneau-corps { display: grid; gap: 18px; padding: 4px 24px 28px; }
#view-staff .st-detail-identite { display: grid; justify-items: center; gap: 8px; text-align: center; }
#view-staff .st-detail-identite h3 { margin: 4px 0 0; font-size: 1.35rem; overflow-wrap: anywhere; }
#view-staff .st-faits { display: grid; gap: 10px; margin: 0; }
#view-staff .st-faits > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-soft); }
#view-staff .st-faits dt { display: flex; align-items: center; gap: 6px; color: var(--slate); font-size: 0.78rem; font-weight: 800; }
#view-staff .st-faits dt .picto { width: 16px; height: 16px; }
#view-staff .st-faits dd { margin: 0; font-weight: 750; overflow-wrap: anywhere; }
#view-staff .st-detail-actions { display: grid; gap: 8px; }
#view-staff .st-detail-actions .button { justify-content: center; }
#view-staff .st-code { width: 100%; margin-top: 6px; font-family: var(--font-mono, monospace); font-size: 0.95rem; }

/* L'ajout pas à pas : une question par écran. */
#view-staff .st-assistant {
  width: min(560px, calc(100vw - 24px));
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--surface-premium);
  box-shadow: var(--ombre-2);
}
#view-staff .st-assistant-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 8px; }
#view-staff .st-assistant-etape { margin: 0; color: var(--slate); font-size: 0.82rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
#view-staff .st-progression { height: 6px; margin: 0 20px; border-radius: var(--radius-pilule); background: var(--surface-soft); overflow: hidden; }
#view-staff .st-progression > span { display: block; height: 100%; width: 20%; border-radius: inherit; background: var(--section); transition: width 240ms ease; }
#view-staff .st-assistant-corps { padding: 18px 20px 20px; }
#view-staff .st-etape { display: grid; gap: 14px; animation: st-apparait 220ms ease-out; }
#view-staff .st-question { margin: 0; font-size: 1.35rem; line-height: 1.25; }
#view-staff .st-champs { display: grid; gap: 12px; }
#view-staff .st-champs label { display: grid; gap: 6px; font-weight: 750; }
#view-staff .st-champs input { min-height: 48px; font-size: 1.05rem; }
#view-staff .st-aide { margin: 0; color: var(--slate); font-size: 0.86rem; }
#view-staff .st-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
#view-staff .st-choix-carte {
  display: grid; justify-items: center; gap: 8px;
  min-height: 104px; padding: 14px 10px;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--surface-premium); color: var(--ink);
  font-weight: 800; text-align: center; cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease;
}
#view-staff .st-choix-carte:hover { transform: translateY(-2px); }
#view-staff .st-choix-carte.is-choisi { border-color: var(--section); box-shadow: var(--halo-section, 0 0 0 3px var(--surface-soft)); }
#view-staff .st-choix-carte .st-groupe-rond { width: 44px; height: 44px; }
#view-staff .st-choix-carte .st-groupe-rond .picto { width: 22px; height: 22px; }
#view-staff .st-assistant-pied { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
#view-staff .st-recap > div { grid-template-columns: 140px 1fr; align-items: center; }
#view-staff .st-fin { display: grid; justify-items: center; gap: 12px; text-align: center; }
#view-staff .st-fin .st-assistant-pied { width: 100%; }
#view-staff .st-carte-nouvelle { width: min(260px, 100%); cursor: default; animation: st-pose 360ms cubic-bezier(.2, .9, .3, 1.2); }

@keyframes st-apparait { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes st-glisse { from { transform: translateX(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@keyframes st-pose { from { transform: scale(0.85); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  #view-staff .st-etape,
  #view-staff .st-panneau[open],
  #view-staff .st-carte-nouvelle { animation: none; }
  #view-staff .st-carte,
  #view-staff .st-choix-carte,
  #view-staff .st-progression > span { transition: none; }
}

@media (max-width: 620px) {
  #view-staff .st-chiffres { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #view-staff .st-chiffre { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 12px 8px; row-gap: 4px; }
  #view-staff .st-chiffre-rond { grid-row: auto; width: 36px; height: 36px; }
  #view-staff .st-chiffre strong { font-size: 1.4rem; }
  #view-staff .st-chiffre > span:last-child { grid-column: auto; font-size: 0.66rem; overflow-wrap: anywhere; }
  #view-staff .st-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #view-staff .st-rond { width: 52px; height: 52px; font-size: 1.1rem; }
  #view-staff .st-panneau { width: 100vw; border-radius: 0; }
  #view-staff .st-recap > div { grid-template-columns: 1fr; }
  #view-staff .st-hero .st-hero-actions { justify-content: stretch; }
  #view-staff .st-hero .st-hero-actions .button { width: 100%; justify-content: center; }
}


/* =============================================================================================
   Lot UX « Accueil, Staff, Présences » (16/11/2026) — Staff au cadre des autres pages : bandeau
   pleine largeur, chiffres de la même taille que partout, cartes plus grandes en grille pleine
   largeur (4 à 5 par ligne en 1920 px), mêmes coins, ombres et espacements que l'Effectif.
   ============================================================================================= */
#view-staff { --st-gouttiere: clamp(22px, 3vw, 48px); }
#view-staff .st-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin: -30px calc(-1 * var(--st-gouttiere)) 4px;
  padding: 24px var(--st-gouttiere) 26px;
  border-radius: 0;
  box-shadow: none;
}
#view-staff .st-hero > :not(.st-hero-visuel) { position: relative; z-index: 1; }
#view-staff .st-hero-visuel {
  position: absolute;
  inset: 0 0 0 auto;
  width: 46%;
  z-index: 0;
  background: url("/app/decor-stade-paysage.webp") center 62% / cover no-repeat;
  opacity: 0.3;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #fff 55%);
  mask-image: linear-gradient(90deg, transparent 0%, #fff 55%);
  pointer-events: none;
}
#view-staff .st-chiffres { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
#view-staff .st-chiffre[data-ton="ambre"] .st-chiffre-rond { background: var(--amber-soft); color: var(--amber); }
#view-staff .st-grille { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
#view-staff .st-carte { gap: 10px; min-height: 260px; padding: 22px 16px 18px; border-radius: 18px; }
#view-staff .st-carte .st-rond { width: 96px; height: 96px; font-size: 1.9rem; }
#view-staff .st-carte .st-rond .picto { width: 36px; height: 36px; }
#view-staff .st-carte-nom { font-size: 1.08rem; }
#view-staff .st-carte-vide { align-content: center; border: 2px dashed var(--line); }
#view-staff .st-carte-vide .st-carte-nom { color: var(--ink); }
#view-staff .st-carte-aide { color: var(--slate); font-size: 0.8rem; }
#view-staff .st-groupe-titre { font-size: 1.05rem; }
@media (max-width: 620px) {
  #view-staff { --st-gouttiere: 15px; }
  #view-staff .st-hero { margin-top: -22px; padding-block: 20px 22px; }
  #view-staff .st-chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view-staff .st-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view-staff .st-carte { min-height: 0; padding: 16px 10px; }
  #view-staff .st-carte .st-rond { width: 64px; height: 64px; font-size: 1.3rem; }
}

/* Correctif du 16/11 au soir : plus de grands blancs. Une grille, des filtres en pastilles, des
   cartes un peu moins hautes ; les quatre chiffres sur toute la largeur ; le bouton du bandeau
   ne touche plus la photo. */
#view-staff .st-chiffres { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
#view-staff .st-filtres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
#view-staff .st-filtre {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius-pilule);
  background: var(--surface-premium); color: var(--ink); font-size: 0.88rem; font-weight: 800; cursor: pointer;
}
#view-staff .st-filtre.is-active { border-color: var(--section); background: var(--section); color: #fff; }
#view-staff .st-filtre.is-active .st-compte { background: color-mix(in srgb, #fff 25%, transparent); color: #fff; }
#view-staff .st-filtre:focus-visible { outline: 3px solid var(--section); outline-offset: 2px; }
#view-staff .st-groupes .st-grille { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
#view-staff .st-carte { min-height: 0; padding: 18px 14px 16px; gap: 8px; }
#view-staff .st-carte .st-rond { width: 76px; height: 76px; font-size: 1.55rem; }
#view-staff .st-carte .st-rond .picto { width: 30px; height: 30px; }
#view-staff .st-hero .st-hero-actions { padding: 6px 4px 0 0; align-self: start; }
#view-staff .st-hero #staff-ajouter { box-shadow: var(--ombre-1); }
@media (max-width: 620px) {
  #view-staff .st-groupes .st-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #view-staff .st-carte .st-rond { width: 60px; height: 60px; font-size: 1.2rem; }
}
