/* Agenda : la semaine en colonnes (une par jour), empilée sur téléphone.
   Chaque élément porte sa nature en toutes lettres ; la couleur n'est qu'un repère. */
.kind-outlook { --kind: #2c4c9c; }
.kind-bookings { --kind: #1f7a8c; }
.kind-familywall { --kind: #9a7442; }
.kind-blocage { --kind: #737b8a; }
.kind-audience { --kind: #6b3fa0; }
.kind-delai { --kind: #8a5aa8; }
.kind-rapport { --kind: #b4532a; }
.kind-echeance { --kind: #6f7f22; }
.kind-cpas { --kind: #a23b72; }
.kind-facture { --kind: #5b6b82; }

.agenda-nav { gap: 6px; }
.agenda-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; margin: 0 0 14px; font-size: 13px; color: var(--ink-2); }
.agenda-legend li { display: inline-flex; align-items: center; gap: 6px; }
.agenda-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--kind); }
.agenda-swatch.kind-blocage { background: repeating-linear-gradient(135deg, #737b8a 0 2px, #c9ced6 2px 4px); }

.agenda-week { display: grid; grid-template-columns: repeat(7, minmax(132px, 1fr)); gap: 8px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 4px; }
.agenda-day { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); display: flex; flex-direction: column; min-height: 240px; min-width: 0; scroll-margin-top: 80px; }
.agenda-day.is-today { border-color: var(--stamp); box-shadow: inset 0 3px 0 var(--stamp); }
.agenda-day.is-off { background: #fafbfc; }
.agenda-day.is-past .agenda-items { opacity: .62; }
.agenda-day-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; padding: 10px 10px 8px; border-bottom: 1px solid var(--line-2); }
.agenda-day-head h2 { font-size: 14px; display: flex; flex-direction: column; line-height: 1.25; }
.agenda-weekday { font-weight: 600; }
.agenda-date { font-weight: 400; color: var(--ink-3); font-size: 13px; }

.agenda-items { list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.agenda-item { border-left: 3px solid var(--kind); background: var(--ground); border-radius: 0 4px 4px 0; padding: 6px 8px; font-size: 13px; line-height: 1.35; display: flex; flex-direction: column; gap: 1px; min-width: 0; overflow-wrap: anywhere; }
.agenda-item.kind-blocage { background: repeating-linear-gradient(135deg, #f3f4f6 0 6px, #e8eaee 6px 8px); }
.agenda-time { font-weight: 600; font-size: 12px; color: var(--ink); }
.agenda-title a { color: var(--ink); }
.agenda-title a:hover { color: var(--stamp); }
.agenda-kind, .agenda-sub { color: var(--ink-3); font-size: 12px; }
.agenda-tag { font-size: 12px; color: var(--stamp-dark); }
.agenda-free { margin: 2px 0 0 -6px; }
.agenda-empty { color: var(--ink-3); font-size: 13px; padding: 4px 2px; }

.agenda-quick { border-top: 1px solid var(--line-2); padding: 8px; }
.agenda-quick-label { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.agenda-quick-buttons { display: flex; flex-wrap: wrap; gap: 4px; }
.agenda-quick-buttons form { margin: 0; }
.agenda-quick-buttons .btn { padding-left: 8px; padding-right: 8px; }

.agenda-block-panel { scroll-margin-top: 80px; }
/* Champs d'heure : même apparence que les autres champs de Tutela */
.agenda-form input[type=time] {   width: 100%; font: inherit; color: var(--ink); background: var(--paper);   border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; min-height: 38px; }
.agenda-form .form-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.agenda-form .form-grid .wide { grid-column: 1 / -1; }
.agenda-settings-form .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.agenda-steps { margin: 0 0 10px; padding-left: 20px; }
.agenda-steps li { margin-bottom: 4px; }
.agenda-sync-status { font-size: 14px; color: var(--ink-2); }
.agenda-settings-form #id_jours { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 4px; }
.agenda-settings-form #id_jours label { font-weight: 400; display: inline-flex; gap: 6px; align-items: center; }
.agenda-sync-form { margin-top: 12px; }

@media (max-width: 760px) {
  .agenda-form .form-grid { grid-template-columns: 1fr 1fr; }
  .agenda-form .form-grid .field:first-child { grid-column: 1 / -1; }
  .agenda-nav { width: 100%; }
  .agenda-nav .btn { flex: 1 1 auto; }
  .agenda-week { grid-template-columns: 1fr; overflow-x: visible; }
  .agenda-day { min-height: 0; }
  .agenda-day.is-past:not(.is-today) .agenda-items { display: none; }
  .agenda-day.is-past:not(.is-today) .agenda-day-head { border-bottom: 0; }
  .agenda-quick-buttons .btn { min-height: 38px; }
}
.kind-tache { --kind: #0f766e; }
