/* Agenda (socle) : liste par semaine, lignes de rendez-vous, fenêtres, onglets de l'équipe.
   Classes préfixées « ag- ». Couleurs : jetons de app.css (clair et sombre). */
.ag-filtres { justify-content: flex-start; margin-bottom: 0; }
.ag-filtres select { width: auto; max-width: 240px; min-height: 40px; padding: 7px 10px; }
.ag-bascule { display: inline-flex; border: 1px solid var(--trait-fort); border-radius: var(--rayon-petit); overflow: hidden; background: var(--surface); }
.ag-bascule button { min-height: 38px; border: 0; border-radius: 0; background: none; color: var(--doux); padding: 6px 14px; }
.ag-bascule button + button { border-left: 1px solid var(--trait-fort); }
.ag-bascule button[aria-pressed=true] { background: var(--teinte); color: var(--encre); }
.ag-bascule button:hover { filter: none; color: var(--encre); }

.ag-semaines { display: flex; flex-direction: column; gap: 18px; }
.ag-semaine { display: flex; flex-direction: column; gap: 8px; }
.ag-titre-semaine { display: flex; align-items: baseline; gap: 10px; margin: 0; font-size: .95rem; }
.ag-titre-semaine .doux { font-weight: 500; font-size: .85rem; }

/* une ligne : bloc date | titre et détails | type ou actions — toujours sur une ligne */
.ag-liste > li.ag-ligne { flex-wrap: nowrap; gap: 12px; border-left: 3px solid var(--ag-ton, var(--club)); }
.lignes.nues.ag-liste > li.ag-ligne { padding: 10px 20px 10px 17px; }
.ag-type-seance { --ag-ton: var(--club); }
.ag-type-match { --ag-ton: #C77A0A; }
.ag-type-tournoi { --ag-ton: #7A4FD6; }
.ag-type-autre { --ag-ton: var(--trait-fort); }
.ag-date { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: color-mix(in srgb, var(--ag-ton, var(--club)) 12%, var(--surface)); line-height: 1.05; }
.ag-date small { font-size: .66rem; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--doux); }
.ag-date strong { font-size: 1.05rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.ag-ouvrir { all: unset; cursor: pointer; display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 1px; }
.ag-ouvrir:focus-visible { outline: 2px solid var(--club); outline-offset: 3px; border-radius: 6px; }
.ag-ouvrir strong, .ag-ouvrir small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-ouvrir:hover strong { text-decoration: underline; }
.ag-liste > li.ag-ligne .ligne-fin { flex-wrap: nowrap; width: auto; padding-left: 0; }
.ag-pastille { background: color-mix(in srgb, var(--ag-ton, var(--club)) 12%, var(--surface)); color: var(--encre); border-color: transparent; }
.ag-annule .ag-ouvrir strong { text-decoration: line-through; color: var(--doux); }
.ag-annule .ag-date { opacity: .55; }
.ag-rien { padding: 6px 20px 18px; margin: 0; }

/* fiche d'un rendez-vous */
.ag-details { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ag-details li { display: flex; align-items: flex-start; gap: 10px; }
.ag-details .icone { color: var(--doux); margin-top: 2px; }
.ag-remarques { white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px 12px; border-radius: var(--rayon-petit); background: var(--surface-2); }
.ag-actions-modules { margin-bottom: 4px; }
.ag-nouveau-lieu { border: 1px dashed var(--trait-fort); border-radius: var(--rayon-petit); padding: 10px 12px 12px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ag-nouveau-lieu legend { font-weight: 700; font-size: .85rem; padding: 0 4px; }

/* onglets de l'équipe */
.ag-ajout { align-items: flex-end; }
.ag-ajout label { flex: 1; min-width: 180px; }
.ag-cellule-groupe select { min-height: 36px; padding: 5px 8px; width: auto; min-width: 140px; }
.ag-generer h2 { margin-bottom: 10px; }
.ag-apercu { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--doux); min-height: 24px; }
.ag-apercu:empty { display: none; }

@media (max-width: 860px) {
  .ag-filtres select { flex: 1; min-width: 0; }
  .ag-bascule { width: 100%; }
  .ag-bascule button { flex: 1; }
  .ag-liste > li.ag-ligne { padding-left: 13px; }
  .lignes.nues.ag-liste > li.ag-ligne { padding: 10px 14px 10px 13px; }
  .ag-liste .ag-pastille { display: none; }
}

/* tableau de bord : le panneau des prochains rendez-vous occupe deux rangées (pas de trou sous « À traiter ») */
@media (min-width: 861px) { .tableau > .ag-panneau:first-of-type, .tableau > .panneau:first-child + .ag-panneau { grid-row: span 2; } }
.lignes > li:has(> .ag-icones) { flex-wrap: nowrap; }
.lignes > li > .ag-icones { width: auto; padding-left: 0; flex-wrap: nowrap; }
