/* FOOTPASS Messenger v2 · ACCUEIL complet + AGENDA complet
   Même vocabulaire que le shell (home.css) : cartes #101013, bordures 7 %,
   radius 16, Inter. Les thèmes d'événements reprennent la palette des familles
   de la liste Messages (une seule langue de couleurs dans toute l'app). */

/* ═══════════ ACCUEIL ═══════════ */

.ac-hello { margin: 8px 0 16px; }
.ac-hello .hm-h1 { margin: 0 0 3px; }
.ac-date { font: 500 12px/1 'Inter', sans-serif; color: #8E8E96; letter-spacing: 0.01em; }

.ac-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; margin-left: 7px;
  border-radius: 99px; vertical-align: -3px;
  background: rgba(226, 178, 72, 0.16); color: #E2B248;
  font: 700 9.5px/1 'Inter', sans-serif; font-style: normal; letter-spacing: 0;
}

/* Tout est traité */
.ac-done {
  display: flex; align-items: center; gap: 10px;
  padding: 14px; margin-bottom: 18px; border-radius: 16px;
  background: #101013; border: 1px solid rgba(255,255,255,0.07);
  font: 500 12.5px/1.3 'Inter', sans-serif; color: #8E8E96;
}
.ac-done-ic {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--acc-bright, #00C49A) 14%, transparent);
  color: var(--acc-bright, #00C49A);
}

/* Prochain rendez-vous */
.ac-next {
  position: relative; width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 13px 14px 13px 17px; margin-bottom: 18px;
  border-radius: 16px; cursor: pointer; text-align: left; color: inherit;
  background: #101013; border: 1px solid rgba(255,255,255,0.07);
}
.ac-next:active { background: #141418; }
.ac-next-bar {
  position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--tc, var(--acc-bright, #00C49A));
}
.ac-next-when {
  width: 54px; flex-shrink: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
}
.ac-next-when b { font: 800 17px/1 'Inter', sans-serif; letter-spacing: -0.02em; color: #FAFAFA; }
.ac-next-when em { font: 600 9.5px/1.2 'Inter', sans-serif; font-style: normal; color: #8E8E96; }
.ac-next-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ac-next-main b {
  font: 650 13.5px/1.25 'Inter', sans-serif; color: #FAFAFA;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ac-next-main em {
  display: flex; align-items: center; gap: 4px;
  font: 400 11px/1.3 'Inter', sans-serif; font-style: normal; color: #8E8E96;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ac-next-who {
  display: flex; align-items: center; gap: 6px; margin-top: 2px;
  font: 500 10.5px/1 'Inter', sans-serif; color: #C7C7CF;
}
.ac-next > .ag-tag { align-self: flex-start; }

/* Négociation en cours */
.ac-deal {
  width: 100%; display: flex; flex-direction: column; gap: 13px;
  padding: 14px; margin-bottom: 18px;
  border-radius: 16px; cursor: pointer; text-align: left; color: inherit;
  background: #101013; border: 1px solid rgba(255,255,255,0.07);
}
.ac-deal:active { background: #141418; }
.ac-deal-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ac-deal-title { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ac-deal-title b {
  font: 700 13.5px/1.25 'Inter', sans-serif; color: #FAFAFA;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ac-deal-title em { font: 400 10.5px/1.3 'Inter', sans-serif; font-style: normal; color: #8E8E96; }
.ac-deal-amt {
  flex-shrink: 0; text-align: right; display: flex; flex-direction: column; gap: 2px;
  font: 800 15px/1 'Inter', sans-serif; letter-spacing: -0.01em; color: var(--acc-bright, #00C49A);
}
.ac-deal-amt em { font: 500 9.5px/1 'Inter', sans-serif; font-style: normal; color: #8E8E96; letter-spacing: 0; }
.ac-deal-steps { display: grid; grid-template-columns: repeat(4, 1fr); }
.ac-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ac-step::before {
  content: ''; position: absolute; top: 5.5px; left: calc(-50% + 8px); right: calc(50% + 8px);
  height: 1.5px; background: rgba(255,255,255,0.12);
}
.ac-step:first-child::before { display: none; }
.ac-step.done::before, .ac-step.cur::before { background: color-mix(in srgb, var(--acc-bright, #00C49A) 55%, transparent); }
.ac-step i {
  width: 12px; height: 12px; border-radius: 50%; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(255,255,255,0.22); background: #101013; color: #04130E;
  position: relative; z-index: 1;
}
.ac-step.done i { background: var(--acc-bright, #00C49A); border-color: var(--acc-bright, #00C49A); }
.ac-step.cur i {
  border-color: var(--acc-bright, #00C49A);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc-bright, #00C49A) 18%, transparent);
}
.ac-step em {
  font: 550 8.5px/1.2 'Inter', sans-serif; font-style: normal; letter-spacing: 0.01em;
  color: #6E6E76; text-align: center; max-width: 74px;
}
.ac-step.done em, .ac-step.cur em { color: #C7C7CF; }
.ac-step.cur em { color: var(--acc-bright, #00C49A); }
.ac-deal-next {
  font: 500 10.5px/1.3 'Inter', sans-serif; color: #8E8E96;
  padding-top: 11px; border-top: 1px solid rgba(255,255,255,0.06);
}

/* Mes joueurs */
.ac-players {
  display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -18px 18px; padding: 0 18px;
}
.ac-players::-webkit-scrollbar { display: none; }
.ac-player {
  width: 128px; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 12px; border-radius: 16px; cursor: pointer; text-align: left; color: inherit;
  background: #101013; border: 1px solid rgba(255,255,255,0.07);
}
.ac-player:active { background: #141418; }
.ac-player .avatar, .ac-player .hm-avatar { margin-bottom: 7px; }
.ac-player b {
  max-width: 100%; font: 650 12px/1.25 'Inter', sans-serif; color: #FAFAFA;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ac-player em {
  max-width: 100%; font: 400 10.5px/1.3 'Inter', sans-serif; font-style: normal; color: #8E8E96;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ac-mand {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 7px;
  padding: 3px 7px; border-radius: 99px;
  background: color-mix(in srgb, var(--acc-bright, #00C49A) 12%, transparent);
  color: var(--acc-bright, #00C49A);
  font: 650 8.5px/1 'Inter', sans-serif; letter-spacing: 0.02em;
}
.ac-player.add { align-items: center; justify-content: center; text-align: center; border-style: dashed; background: transparent; }
.ac-player.add b { color: #C7C7CF; }
.ac-addic {
  width: 30px; height: 30px; border-radius: 50%; margin-bottom: 7px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06); color: #C7C7CF;
  font: 400 17px/1 'Inter', sans-serif;
}

/* ═══════════ AGENDA ═══════════ */

.ag-headr { display: flex; align-items: center; gap: 10px; }
.ag-month {
  padding: 6px 11px; border-radius: 99px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.07);
  font: 650 11px/1 'Inter', sans-serif; letter-spacing: 0.02em; color: #C7C7CF;
}

/* Bande de jours */
.ag-strip {
  display: flex; gap: 6px; padding: 4px 18px 10px;
  overflow-x: auto; scrollbar-width: none; flex-shrink: 0;
}
.ag-strip::-webkit-scrollbar { display: none; }
.ag-day {
  width: 46px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 0 7px; border-radius: 13px; cursor: pointer;
  background: #101013; border: 1px solid rgba(255,255,255,0.07); color: inherit;
  transition: transform 120ms;
}
.ag-day:active { transform: scale(0.95); }
.ag-day em { font: 600 8.5px/1 'Inter', sans-serif; font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: #8E8E96; }
.ag-day b { font: 750 14.5px/1 'Inter', sans-serif; color: #FAFAFA; }
.ag-day.today { border-color: color-mix(in srgb, var(--acc-bright, #00C49A) 50%, transparent); }
.ag-day.today em { color: var(--acc-bright, #00C49A); }
.ag-day.on { background: #FAFAFA; border-color: #FAFAFA; }
.ag-day.on em, .ag-day.on b { color: #0F0F10; }
.ag-dots { height: 5px; display: flex; align-items: center; gap: 3px; }
.ag-dots i { width: 4.5px; height: 4.5px; border-radius: 50%; }

.ag-themes { padding-top: 0; padding-bottom: 10px; }

/* Bandeau « présences à confirmer » */
.ag-note {
  display: flex; align-items: center; gap: 8px;
  margin: 2px 2px 12px; font: 550 11.5px/1 'Inter', sans-serif; color: #E2B248;
}
.ag-note-dot { width: 6px; height: 6px; border-radius: 50%; background: #E2B248; }

.ag-sechead { margin-top: 2px; }
.ag-sechead em { font: 500 11px/1 'Inter', sans-serif; font-style: normal; color: #6E6E76; }

/* Ligne événement */
.ag-ev {
  width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 12px 14px 12px 12px; min-height: 58px;
  background: none; border: none; cursor: pointer; text-align: left; color: inherit;
}
.ag-ev + .ag-ev { border-top: 1px solid rgba(255,255,255,0.06); }
.ag-ev:active { background: rgba(255,255,255,0.04); }
.ag-when { width: 44px; flex-shrink: 0; display: flex; flex-direction: column; gap: 2px; }
.ag-when b { font: 700 13px/1 'Inter', sans-serif; color: #FAFAFA; letter-spacing: -0.01em; }
.ag-when em { font: 500 9.5px/1 'Inter', sans-serif; font-style: normal; color: #71717A; }
.ag-bar { align-self: stretch; width: 3px; border-radius: 2px; flex-shrink: 0; margin: 1px 0; background: var(--tc, var(--acc-bright, #00C49A)); }
.ag-who { display: inline-flex; align-items: center; gap: 4px; margin-left: 7px; color: #C7C7CF; flex-shrink: 0; }
.ag-who .avatar { flex-shrink: 0; }

/* Titre + lieu : plus petits, jamais tronqués (2 lignes max) */
.ag-ev .hm-row-txt { gap: 3px; }
.ag-ev .hm-row-txt b {
  font: 650 12px/1.3 'Inter', sans-serif;
  white-space: normal; display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; overflow: hidden;
}
.ag-ev .hm-row-txt em { font-size: 10.5px; }

/* Colonne droite : étiquette d'état + photos des personnes concernées */
.ag-right { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.ag-faces { display: flex; align-items: center; padding-right: 2px; }
.ag-faces .avatar { flex-shrink: 0; border-radius: 50%; box-shadow: 0 0 0 2px #101013; }
.ag-faces > * + * { margin-left: -6px; }
.ag-more {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #26262B; color: #C7C7CF; box-shadow: 0 0 0 2px #101013;
  font: 700 8px/1 'Inter', sans-serif; font-style: normal; letter-spacing: 0;
}

/* Étiquettes d'état (agenda + accueil) */
.ag-tag {
  flex-shrink: 0; padding: 3px 7px; border-radius: 99px;
  font: 650 8.5px/1.2 'Inter', sans-serif; letter-spacing: 0.03em; white-space: nowrap;
  background: rgba(255,255,255,0.07); color: #A1A1AA;
}
.ag-tag.ok { background: color-mix(in srgb, var(--acc-bright, #00C49A) 14%, transparent); color: var(--acc-bright, #00C49A); }
.ag-tag.pending { background: rgba(226, 178, 72, 0.13); color: #E2B248; }
.ag-tag.invited { background: rgba(92, 157, 245, 0.13); color: #5C9DF5; }

/* Jour vide */
.ag-empty {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 34px 20px 26px; text-align: center;
}
.ag-empty-ic {
  width: 46px; height: 46px; border-radius: 50%; margin-bottom: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); color: #8E8E96;
}
.ag-empty b { font: 700 14px/1.3 'Inter', sans-serif; color: #FAFAFA; }
.ag-empty em { font: 400 11.5px/1.4 'Inter', sans-serif; font-style: normal; color: #8E8E96; margin-bottom: 14px; }
.ag-empty .pg-btn { width: auto; padding: 0 22px; }
.ag-empty.sm { padding: 20px 20px 10px; }
.ag-empty.sm em { margin-bottom: 0; }

/* Fiche événement */
.ag-evd { position: relative; overflow: hidden; }
.ag-evd::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tc, var(--acc-bright, #00C49A)); }
.ag-themepill {
  flex-shrink: 0; align-self: flex-start; padding: 4px 9px; border-radius: 99px;
  background: color-mix(in srgb, var(--tc, var(--acc-bright, #00C49A)) 14%, transparent);
  color: var(--tc, var(--acc-bright, #00C49A));
  font: 650 9.5px/1 'Inter', sans-serif; letter-spacing: 0.04em;
}
.ag-withrow { width: 100%; background: none; border: 0; cursor: pointer; color: inherit; font: inherit; text-align: left; }
.ag-withrow b { display: inline-flex; align-items: center; gap: 7px; }
.ag-withrow:active { opacity: 0.7; }

/* Création */
.ag-typechip { display: inline-flex; align-items: center; gap: 6px; }
.ag-typedot { width: 6px; height: 6px; border-radius: 50%; background: var(--tc, var(--acc-bright, #00C49A)); flex-shrink: 0; }
.ag-whochip { display: inline-flex; align-items: center; gap: 6px; padding-left: 9px; }
.ag-plus { min-width: 36px; justify-content: center; font-weight: 700; }
.ag-hint { font: 400 10px/1.3 'Inter', sans-serif; color: #6E6E76; margin: -4px 0 8px; }
.ag-hint-freq { margin: 10px 0 8px; }
.ag-mrow { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.ag-mrow::-webkit-scrollbar { display: none; }

/* Mini-calendrier (mois → jour, façon sélecteur natif) */
.ag-cal { margin-bottom: 14px; }
.ag-calhead { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 2px; }
.ag-calhead em {
  text-align: center; font: 650 8px/1 'Inter', sans-serif; font-style: normal;
  letter-spacing: 0.08em; color: #6E6E76;
}
.ag-dgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ag-dcell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; cursor: pointer; color: #FAFAFA;
  font: 600 12.5px/1 'Inter', sans-serif;
  background: none; border: 1px solid transparent; padding: 0;
}
.ag-dcell:disabled { color: #3F3F46; cursor: default; }
.ag-dcell.today { border-color: color-mix(in srgb, var(--acc-bright, #00C49A) 55%, transparent); color: var(--acc-bright, #00C49A); }
.ag-dcell.on { background: #FAFAFA; border-color: #FAFAFA; color: #0F0F10; font-weight: 750; }

/* Lieu · suggestions façon recherche plan */
.ag-places {
  display: flex; flex-direction: column; margin-top: 8px; overflow: hidden;
  border-radius: 14px; background: #101013; border: 1px solid rgba(255,255,255,0.07);
}
.ag-place {
  display: flex; align-items: center; gap: 9px; padding: 11px 13px;
  background: none; border: none; cursor: pointer; text-align: left;
  font: 500 12px/1.2 'Inter', sans-serif; color: #C7C7CF;
}
.ag-place + .ag-place { border-top: 1px solid rgba(255,255,255,0.06); }
.ag-place svg { color: #8E8E96; flex-shrink: 0; }
.ag-place:active { background: rgba(255,255,255,0.04); }

/* Personnes détectées dans le titre (à taguer d'un tap) */
.ag-tagsug { border-style: dashed; }
.ag-tagplus { font-weight: 800; color: var(--acc-bright, #00C49A); margin-left: 2px; }

/* Nouvelle catégorie (nom + couleur) */
.ag-newcat {
  display: flex; flex-direction: column; gap: 10px; margin: 2px 0 14px; padding: 12px;
  border-radius: 14px; background: #101013; border: 1px dashed rgba(255,255,255,0.16);
}
.ag-newcat .hm-flt-input { margin-top: 0; }
.ag-swatches { display: flex; flex-wrap: wrap; gap: 8px; max-height: 150px; overflow-y: auto; padding: 2px 2px 4px; }
.ag-swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.ag-swatch.on { border-color: #FAFAFA; box-shadow: 0 0 0 2px rgba(255,255,255,0.28); }
.ag-catok { min-height: 38px; font-size: 12px; }

/* Liste complète des contacts (« + ») */
.ag-contacts {
  display: flex; flex-direction: column; margin: 2px 0 14px; overflow: hidden auto; max-height: 262px;
  border-radius: 14px; background: #101013; border: 1px solid rgba(255,255,255,0.07);
}
.ag-contact-search {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding: 9px 12px; background: #101013; border-bottom: 1px solid rgba(255,255,255,0.07); color: #8E8E96;
}
.ag-contact-search input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  font: 400 12.5px/1 'Inter', sans-serif; color: #FAFAFA;
}
.ag-contact-search input::placeholder { color: #6B6B73; }
.ag-contact-clear { background: none; border: none; cursor: pointer; color: #8E8E96; font-size: 16px; line-height: 1; padding: 0 2px; }
.ag-pick-empty { padding: 16px 12px; text-align: center; font: 400 12px/1.4 'Inter', sans-serif; color: #71717A; }
.ag-contact {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; flex-shrink: 0;
  background: none; border: none; cursor: pointer; text-align: left; color: inherit;
}
.ag-contact + .ag-contact { border-top: 1px solid rgba(255,255,255,0.06); }
.ag-contact:active { background: rgba(255,255,255,0.04); }
.ag-contact-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ag-contact-txt b { font: 600 12.5px/1.2 'Inter', sans-serif; color: #FAFAFA; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-contact-txt em { font: 400 10.5px/1.2 'Inter', sans-serif; font-style: normal; color: #8E8E96; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-check {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font: 700 12px/1 'Inter', sans-serif; color: #8E8E96;
  border: 1.5px solid rgba(255,255,255,0.2); box-sizing: border-box;
}
.ag-contact.on .ag-check { background: var(--acc-bright, #00C49A); border-color: var(--acc-bright, #00C49A); color: #04130E; }

/* Aperçu avant envoi : carte agenda + message d'invitation */
.ag-prev-ev {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px 12px 12px; margin-bottom: 10px;
  border-radius: 16px; background: #101013; border: 1px solid rgba(255,255,255,0.07);
}
.ag-prev-ev .hm-row-txt b {
  font: 650 12px/1.3 'Inter', sans-serif;
  white-space: normal; display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; overflow: hidden;
}
.ag-prev-ev .hm-row-txt em { font-size: 10.5px; }
.ag-prev-cap { font: 400 10px/1.4 'Inter', sans-serif; color: #6E6E76; margin: 0 2px 8px; }
.ag-prevmsg {
  margin: 0 0 4px 26px; padding: 12px;
  border-radius: 16px 16px 4px 16px;
  background: color-mix(in srgb, var(--acc, #00A37E) 13%, #101013);
  border: 1px solid color-mix(in srgb, var(--acc, #00A37E) 22%, transparent);
}
.ag-prevmsg-row { display: flex; align-items: center; gap: 10px; }
.ag-prev-date {
  width: 40px; height: 44px; border-radius: 11px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: rgba(255,255,255,0.08); position: relative; overflow: hidden;
}
.ag-prev-date::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tc, var(--acc-bright, #00C49A)); }
.ag-prev-date b { font: 800 15px/1 'Inter', sans-serif; color: #FAFAFA; }
.ag-prev-date em { font: 700 7.5px/1 'Inter', sans-serif; font-style: normal; letter-spacing: 0.12em; color: #8E8E96; }
.ag-prevmsg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ag-prevmsg-main b { font: 650 12.5px/1.25 'Inter', sans-serif; color: #FAFAFA; }
.ag-prevmsg-main em {
  font: 400 10.5px/1.3 'Inter', sans-serif; font-style: normal; color: #A1A1AA;
  display: flex; align-items: center; gap: 4px;
}
.ag-prevmsg-actions { display: flex; gap: 7px; margin-top: 11px; }
.ag-prevmsg-actions span {
  flex: 1; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 9px; background: rgba(255,255,255,0.09);
  font: 600 10.5px/1 'Inter', sans-serif; color: #E6E6EA;
}
.ag-prevmsg-actions span.ok { background: var(--acc, #00A37E); color: #FFFFFF; }
.ag-prevmsg-note { display: flex; align-items: center; gap: 6px; margin-top: 9px; font: 500 9.5px/1 'Inter', sans-serif; color: #E2B248; }
.ag-prevmsg-note .dot { width: 5px; height: 5px; border-radius: 50%; background: #E2B248; flex-shrink: 0; }

/* Récapitulatif + bouton désactivé */
.ag-recap {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 6px; font: 550 11px/1.3 'Inter', sans-serif; color: #C7C7CF; text-align: center;
}
.pg-btn[disabled] { opacity: 0.4; pointer-events: none; }
.pg-sheet .hm-flt-input { margin-top: 2px; }
.ag-formnote {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 12px; font: 400 10px/1.4 'Inter', sans-serif; color: #5E5E66;
}
.ag-formnote svg { color: var(--acc, #00A37E); flex-shrink: 0; }

/* Badge ambre (onglet Agenda · présences à confirmer) */
.hm-tab-badge.amber { background: #E2B248; color: #1A1206; }

/* Les pastilles d'état ne se coupent jamais sur deux lignes (fiche événement, mandats) */
.pg-pill { white-space: nowrap; }

/* ═══════════ VERSION CLAIRE ═══════════ */

.hm.light .ac-date { color: #8A8A93; }
.hm.light .ac-done { background: #FFFFFF; border-color: rgba(15,15,16,0.08); color: #6B6B73; }

.hm.light .ac-next,
.hm.light .ac-deal,
.hm.light .ac-player { background: #FFFFFF; border-color: rgba(15,15,16,0.08); }
.hm.light .ac-next:active, .hm.light .ac-deal:active, .hm.light .ac-player:active { background: #F7F7F5; }
.hm.light .ac-next-when b, .hm.light .ac-next-main b,
.hm.light .ac-deal-title b, .hm.light .ac-player b { color: #0F0F10; }
.hm.light .ac-next-when em, .hm.light .ac-next-main em,
.hm.light .ac-deal-title em, .hm.light .ac-player em { color: #6B6B73; }
.hm.light .ac-next-who { color: #45454C; }
.hm.light .ac-step::before { background: rgba(15,15,16,0.12); }
.hm.light .ac-step i { border-color: rgba(15,15,16,0.22); background: #FFFFFF; }
.hm.light .ac-step.done i { background: var(--acc, #00A37E); border-color: var(--acc, #00A37E); color: #FFFFFF; }
.hm.light .ac-step.cur i { border-color: var(--acc, #00A37E); }
.hm.light .ac-step em { color: #8A8A93; }
.hm.light .ac-step.done em, .hm.light .ac-step.cur em { color: #45454C; }
.hm.light .ac-step.cur em { color: var(--acc, #00A37E); }
.hm.light .ac-deal-amt { color: var(--acc, #00A37E); }
.hm.light .ac-deal-next { color: #6B6B73; border-top-color: rgba(15,15,16,0.07); }
.hm.light .ac-player.add { background: transparent; }
.hm.light .ac-player.add b { color: #45454C; }
.hm.light .ac-addic { background: rgba(15,15,16,0.05); color: #45454C; }
.hm.light .ac-mand { background: color-mix(in srgb, var(--acc, #00A37E) 10%, transparent); color: var(--acc, #00A37E); }

.hm.light .ag-month { background: #FFFFFF; border-color: rgba(15,15,16,0.09); color: #45454C; }
.hm.light .ag-day { background: #FFFFFF; border-color: rgba(15,15,16,0.08); }
.hm.light .ag-day em { color: #8A8A93; }
.hm.light .ag-day b { color: #0F0F10; }
.hm.light .ag-day.today { border-color: color-mix(in srgb, var(--acc, #00A37E) 45%, transparent); }
.hm.light .ag-day.today em { color: var(--acc, #00A37E); }
.hm.light .ag-day.on { background: #0F0F10; border-color: #0F0F10; }
.hm.light .ag-day.on em, .hm.light .ag-day.on b { color: #FFFFFF; }

.hm.light .ag-ev + .ag-ev { border-top-color: rgba(15,15,16,0.07); }
.hm.light .ag-ev:active { background: rgba(15,15,16,0.035); }
.hm.light .ag-when b { color: #0F0F10; }
.hm.light .ag-when em { color: #8A8A93; }
.hm.light .ag-who { color: #45454C; }
.hm.light .ag-faces .avatar, .hm.light .ag-more { box-shadow: 0 0 0 2px #FFFFFF; }
.hm.light .ag-more { background: rgba(15,15,16,0.08); color: #45454C; }
.hm.light .ag-tag { background: rgba(15,15,16,0.06); color: #6B6B73; }
.hm.light .ag-tag.ok { background: color-mix(in srgb, var(--acc, #00A37E) 12%, transparent); color: var(--acc, #00A37E); }
.hm.light .ag-tag.pending { background: rgba(176, 128, 24, 0.12); color: #A97B10; }
.hm.light .ag-tag.invited { background: rgba(42, 111, 219, 0.10); color: #2A6FDB; }
.hm.light .ag-note { color: #A97B10; }
.hm.light .ag-note-dot { background: #A97B10; }
.hm.light .ag-empty-ic { background: rgba(15,15,16,0.05); color: #6B6B73; }
.hm.light .ag-empty b { color: #0F0F10; }
.hm.light .ag-empty em { color: #6B6B73; }
.hm.light .ag-formnote { color: #9A9AA2; }
.hm.light .ag-hint { color: #8A8A93; }
.hm.light .ag-calhead em { color: #8A8A93; }
.hm.light .ag-dcell { color: #0F0F10; }
.hm.light .ag-dcell:disabled { color: #C9C9CE; }
.hm.light .ag-dcell.today { border-color: color-mix(in srgb, var(--acc, #00A37E) 45%, transparent); color: var(--acc, #00A37E); }
.hm.light .ag-dcell.on { background: #0F0F10; border-color: #0F0F10; color: #FFFFFF; }
.hm.light .ag-places { background: #FFFFFF; border-color: rgba(15,15,16,0.08); }
.hm.light .ag-place { color: #45454C; }
.hm.light .ag-place + .ag-place { border-top-color: rgba(15,15,16,0.07); }
.hm.light .ag-place svg { color: #8A8A93; }
.hm.light .ag-place:active { background: rgba(15,15,16,0.035); }
.hm.light .ag-recap { color: #45454C; }
.hm.light .ag-prev-ev { background: #FFFFFF; border-color: rgba(15,15,16,0.08); }
.hm.light .ag-prev-cap { color: #8A8A93; }
.hm.light .ag-prevmsg {
  background: color-mix(in srgb, var(--acc, #00A37E) 8%, #FFFFFF);
  border-color: color-mix(in srgb, var(--acc, #00A37E) 24%, transparent);
}
.hm.light .ag-prev-date { background: rgba(15,15,16,0.06); }
.hm.light .ag-prev-date b { color: #0F0F10; }
.hm.light .ag-prev-date em { color: #6B6B73; }
.hm.light .ag-prevmsg-main b { color: #0F0F10; }
.hm.light .ag-prevmsg-main em { color: #6B6B73; }
.hm.light .ag-prevmsg-actions span { background: rgba(15,15,16,0.07); color: #2B2B31; }
.hm.light .ag-prevmsg-actions span.ok { background: var(--acc, #00A37E); color: #FFFFFF; }
.hm.light .ag-prevmsg-note { color: #A97B10; }
.hm.light .ag-prevmsg-note .dot { background: #A97B10; }
.hm.light .ag-tagplus { color: var(--acc, #00A37E); }
.hm.light .ag-newcat { background: #FFFFFF; border-color: rgba(15,15,16,0.16); }
.hm.light .ag-swatch.on { border-color: #0F0F10; box-shadow: 0 0 0 2px rgba(15,15,16,0.18); }
.hm.light .ag-contacts { background: #FFFFFF; border-color: rgba(15,15,16,0.08); }
.hm.light .ag-contact-search { background: #FFFFFF; border-bottom-color: rgba(15,15,16,0.07); color: #8A8A93; }
.hm.light .ag-contact-search input { color: #0F0F10; }
.hm.light .ag-contact-search input::placeholder { color: #9A9AA2; }
.hm.light .ag-contact-clear { color: #8A8A93; }
.hm.light .ag-pick-empty { color: #8A8A93; }
.hm.light .ag-contact + .ag-contact { border-top-color: rgba(15,15,16,0.07); }
.hm.light .ag-contact:active { background: rgba(15,15,16,0.035); }
.hm.light .ag-contact-txt b { color: #0F0F10; }
.hm.light .ag-contact-txt em { color: #6B6B73; }
.hm.light .ag-check { color: #8A8A93; border-color: rgba(15,15,16,0.2); }
.hm.light .ag-contact.on .ag-check { background: var(--acc, #00A37E); border-color: var(--acc, #00A37E); color: #FFFFFF; }
.hm.light .ac-count { background: rgba(176, 128, 24, 0.12); color: #A97B10; }
.hm.light .hm-tab-badge.amber { background: #E2B248; color: #1A1206; }

/* ═══ Recherche instantanée (loupe du header Agenda) ═══ */
.ag-search {
  display: flex; align-items: center; gap: 9px; flex-shrink: 0;
  margin: 2px 18px 10px; padding: 0 13px; height: 40px; border-radius: 13px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.10); color: #8E8E96;
}
.ag-search input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  font: 500 13px/1.2 'Inter', sans-serif; color: #FAFAFA;
}
.ag-search input::placeholder { color: #71717A; }
.ag-search-x {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,0.08); color: #A1A1AA; font: 600 10px/1 'Inter', sans-serif;
}
.ag-results { margin: 0 2px 10px; font: 550 11px/1.4 'Inter', sans-serif; color: #8E8E96; }

/* Jours passés dans la bande */
.ag-day.past:not(.on) { opacity: 0.55; }

/* ═══ Vues Mois & Année (zoom façon calendrier iOS) ═══ */
.ag-month.zoomable {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font: inherit;
}
.ag-month.zoomable svg { opacity: 0.7; }
.ag-zoomview { animation: agZin 300ms cubic-bezier(0.2, 0, 0, 1); }
.ag-zoomview.zout { animation-name: agZout; }
@keyframes agZin { from { transform: scale(0.9); opacity: 0; } }
@keyframes agZout { from { transform: scale(1.07); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ag-zoomview { animation: none; } }

/* Vue mois */
.ag-mv-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 4px 10px;
}
.ag-mv-head b { font: 800 19px/1 'Inter', sans-serif; letter-spacing: -0.02em; color: #FAFAFA; }
.ag-mv-head b em { font: 300 19px/1 'Inter', sans-serif; font-style: normal; color: #71717A; }
.ag-mv-nav { display: flex; gap: 8px; }
.ag-mv-nav button {
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.09); color: #D4D4D8;
}
.ag-mv-nav button:disabled { opacity: 0.3; cursor: default; }
.ag-mwd { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 2px 4px; transition: padding 0.24s ease; }
.ag-mgrid { padding: 0 2px 14px; }
.ag-mweek { display: grid; grid-template-columns: repeat(7, 1fr); }
.ag-mweek + .ag-mweek { margin-top: 3px; }
.ag-mwd span { text-align: center; font: 650 9.5px/1 'Inter', sans-serif; letter-spacing: 0.06em; color: #71717A; }
.ag-mday {
  height: 46px; border-radius: 12px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: none; padding: 0;
}
.ag-mday:active { background: rgba(255,255,255,0.05); }
.ag-mday b { font: 600 13.5px/1 'Inter', sans-serif; color: #E7E7EA; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.ag-mday.past b { color: #55555C; }
.ag-mday.today b { background: var(--acc, #00A37E); color: #FFFFFF; font-weight: 750; }
.ag-mday.on b { box-shadow: 0 0 0 1.5px #FAFAFA inset; color: #FAFAFA; }
.ag-mday .ag-dots { height: 5px; }
.ag-mday.past .ag-dots i { opacity: 0.45; }

/* Vue année */
.ag-ytitle { padding: 2px 4px 2px; font: 800 24px/1 'Inter', sans-serif; letter-spacing: -0.02em; color: #FAFAFA; }
.ag-yhint { padding: 4px 4px 14px; font: 400 10.5px/1.4 'Inter', sans-serif; color: #71717A; }
.ag-ygrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 12px; padding-bottom: 18px; }
.ag-ymon { background: none; border: none; padding: 0; cursor: pointer; text-align: left; }
.ag-ymon.past { opacity: 0.42; }
.ag-ymon h4 { margin: 0 0 5px; font: 700 12px/1 'Inter', sans-serif; color: #FAFAFA; display: flex; align-items: center; gap: 5px; }
.ag-ymon h4.cur { color: var(--acc-bright, #00C49A); }
.ag-ymon h4 i { width: 4px; height: 4px; border-radius: 50%; background: var(--acc-bright, #00C49A); }
.ag-ymini { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.ag-ymini span {
  font: 500 6.8px/1 'Inter', sans-serif; color: #8E8E96; text-align: center;
  height: 9px; display: flex; align-items: center; justify-content: center; border-radius: 99px;
}
.ag-ymini span.today { background: var(--acc, #00A37E); color: #FFFFFF; font-weight: 700; }

/* Date sélectionnée hors juin (retour de la vue mois) */
.ag-selchip {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px;
  padding: 7px 12px; border-radius: 99px; cursor: pointer;
  background: color-mix(in srgb, var(--acc-bright, #00C49A) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--acc-bright, #00C49A) 45%, transparent);
  font: 650 11.5px/1 'Inter', sans-serif; color: var(--acc-bright, #00C49A);
}
.ag-selchip i { font-style: normal; opacity: 0.8; font-size: 10px; }

.hm.light .ag-mv-head b { color: #0F0F10; }
.hm.light .ag-mv-head b em { color: #8A8A93; }
.hm.light .ag-mv-nav button { background: #FFFFFF; border-color: rgba(15,15,16,0.12); color: #45454C; }
.hm.light .ag-mday b { color: #2B2B31; }
.hm.light .ag-mday.past b { color: #B4B4BA; }
.hm.light .ag-mday.today b { background: var(--acc, #00A37E); color: #FFFFFF; }
.hm.light .ag-mday.on b { box-shadow: 0 0 0 1.5px #0F0F10 inset; color: #0F0F10; }

/* ═══ Vue mois · calendrier épinglé : se resserre au défilement, glisse entre les mois ═══ */
.ag-mv { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ag-mv-fixed { position: relative; flex-shrink: 0; touch-action: pan-y; }
.ag-mv-fixed::after {
  content: ''; position: absolute; left: -16px; right: -16px; bottom: 0; height: 1px;
  background: transparent; transition: background 0.22s ease;
}
.ag-mv-fixed.tight::after { background: rgba(255,255,255,0.08); }
.hm.light .ag-mv-fixed.tight::after { background: rgba(15,15,16,0.09); }
.ag-mv-head { transition: padding 0.24s ease; }
.ag-mv-head b, .ag-mv-head b em { transition: font-size 0.24s ease; }
.ag-mv-fixed.tight .ag-mv-head { padding-bottom: 4px; }
.ag-mv-fixed.tight .ag-mv-head b, .ag-mv-fixed.tight .ag-mv-head b em { font-size: 15px; }
.ag-mv-fixed .ag-mday { transition: height 0.24s cubic-bezier(0.2, 0, 0, 1), gap 0.24s ease; }
.ag-mv-fixed .ag-mday b { transition: width 0.24s ease, height 0.24s ease, font-size 0.24s ease; }
.ag-mv-fixed .ag-mday .ag-dots { transition: height 0.24s ease, opacity 0.16s ease; }
.ag-mv-fixed .ag-mgrid { transition: padding-bottom 0.24s ease; }
/* Repli façon iOS : seule la semaine courante (sélection / aujourd'hui) reste visible */
.ag-mv-fixed .ag-mweek {
  max-height: 49px; overflow: hidden;
  transition: max-height 0.26s cubic-bezier(0.2, 0, 0, 1), opacity 0.18s ease, margin-top 0.26s ease;
}
.ag-mv-fixed.tight .ag-mweek { max-height: 28px; }
.ag-mv-fixed.tight .ag-mweek:not(.cur) { max-height: 0; opacity: 0; margin-top: 0; pointer-events: none; }
.ag-mv-fixed.tight .ag-mwd { padding-bottom: 2px; }
.ag-mv-fixed.tight .ag-mday { height: 27px; gap: 0; }
.ag-mv-fixed.tight .ag-mday b { width: 22px; height: 22px; font-size: 12px; }
.ag-mv-fixed.tight .ag-mday .ag-dots { height: 0; opacity: 0; }
.ag-mv-fixed.tight .ag-mgrid { padding-bottom: 6px; }
.ag-mv-list { padding-top: 8px; }
/* Glissement horizontal entre mois */
.ag-mv-slide.sl { animation: agMSlideL 260ms cubic-bezier(0.2, 0, 0, 1); }
.ag-mv-slide.sr { animation: agMSlideR 260ms cubic-bezier(0.2, 0, 0, 1); }
@keyframes agMSlideL { from { opacity: 0; transform: translateX(-24px); } }
@keyframes agMSlideR { from { opacity: 0; transform: translateX(24px); } }
@media (prefers-reduced-motion: reduce) {
  .ag-mv-slide { animation: none !important; }
  .ag-mv-fixed .ag-mday, .ag-mv-fixed .ag-mday b, .ag-mv-fixed .ag-mgrid, .ag-mv-fixed .ag-mweek, .ag-mwd, .ag-mv-head, .ag-mv-head b { transition: none; }
}
.hm.light .ag-mday:active { background: rgba(15,15,16,0.05); }
.hm.light .ag-ytitle, .hm.light .ag-ymon h4 { color: #0F0F10; }
.hm.light .ag-ymon h4.cur { color: var(--acc, #00A37E); }
.hm.light .ag-ymini span { color: #6B6B73; }
.hm.light .ag-ymini span.today { color: #FFFFFF; }
.hm.light .ag-selchip { background: color-mix(in srgb, var(--acc, #00A37E) 9%, #FFFFFF); border-color: color-mix(in srgb, var(--acc, #00A37E) 40%, transparent); color: var(--acc, #00A37E); }

/* Volet « rendez-vous passés » */
.ag-pastbtn {
  display: flex; align-items: center; gap: 7px; width: 100%;
  padding: 4px 2px 12px; background: none; border: none; cursor: pointer;
  font: 600 11.5px/1 'Inter', sans-serif; color: #8E8E96;
}
.ag-pastbtn svg { transition: transform 160ms; }
.ag-pastbtn.open svg { transform: rotate(90deg); }
.ag-ev.past { opacity: 0.62; }
.ag-tag.done { background: rgba(255,255,255,0.07); color: #8E8E96; }

/* Chips de filtre par contact */
.ag-chipsep { width: 1px; height: 18px; flex-shrink: 0; background: rgba(255,255,255,0.10); }
.ag-whochip { padding-left: 8px; }

.hm.light .ag-search { background: #FFFFFF; border-color: rgba(15,15,16,0.10); color: #8A8A93; }
.hm.light .ag-search input { color: #0F0F10; }
.hm.light .ag-search input::placeholder { color: #9A9AA2; }
.hm.light .ag-search-x { background: rgba(15,15,16,0.07); color: #6B6B73; }
.hm.light .ag-results { color: #6B6B73; }
.hm.light .ag-pastbtn { color: #6B6B73; }
.hm.light .ag-tag.done { background: rgba(15,15,16,0.06); color: #6B6B73; }
.hm.light .ag-chipsep { background: rgba(15,15,16,0.10); }

