/* Calendrier des publications : des cases teintées (pas de filets), la date du jour en vert, une liste par jour sur téléphone. */
.cal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-title-main { min-width: 170px; text-align: center; }
.cal-title-main::first-letter { text-transform: uppercase; }
.cal-today { margin-left: 8px; font-size: 14px; }
.cal-sum { margin: 8px 0 14px; }
.cal-due { margin-bottom: var(--gap); }

.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-weekday { padding: 0 6px 4px; font-size: var(--fs-small); color: var(--muted); }
.cal-day { min-height: 104px; min-width: 0; display: grid; align-content: start; gap: 4px; padding: 6px; border-radius: var(--radius-control); background: var(--raised); }
.cal-grid.is-week .cal-day { min-height: 220px; }
.cal-day.is-empty { background: color-mix(in srgb, var(--raised) 55%, transparent); }
.cal-day.is-out { opacity: 0.45; }
.cal-day.is-today { background: var(--accent-soft); }
.cal-num { font-size: var(--fs-small); color: var(--muted); }
.cal-day.is-today .cal-num { color: var(--accent-ink); font-weight: 700; }
.cal-more { justify-self: start; font-size: 12.5px; }

.cal-event { display: flex; align-items: flex-start; gap: 6px; min-width: 0; padding: 4px 6px; border-radius: 5px; background: var(--surface); color: var(--text); text-decoration: none; font-size: 12.5px; line-height: 1.3; }
.cal-event:hover { background: var(--active); }
.cal-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-grid.is-week .cal-title, .cal-agenda .cal-title { white-space: normal; }
.cal-title small { display: block; color: var(--muted); }
.cal-dot { flex: none; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; box-sizing: border-box; }
.cal-event.is-online .cal-dot { background: var(--accent); }
.cal-event.is-scheduled .cal-dot { border: 2px solid var(--accent); }
.cal-event.is-reminder .cal-dot { border: 2px solid var(--muted); }
.cal-event.is-late .cal-dot { background: var(--negative); }

.cal-agenda { display: none; list-style: none; margin: 0; padding: 0; }

@media (max-width: 640px) {
  .cal-grid { display: none; }
  .cal-agenda { display: grid; gap: 14px; }
  .cal-agenda-day { display: grid; gap: 6px; }
  .cal-agenda-date { font-size: 14px; font-weight: 600; }
  .cal-agenda-date::first-letter { text-transform: uppercase; }
  .cal-agenda-day.is-today .cal-agenda-date { color: var(--accent-ink); }
  .cal-agenda .cal-event { font-size: 14px; padding: 8px 10px; background: var(--raised); }
  .cal-title-main { min-width: 0; }
}

/* Créneaux du mode AutoSEO (en pointillés) et ajout d'un article sur un jour à venir. */
.cal-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.cal-day-top { display: flex; align-items: center; justify-content: space-between; min-height: 22px; }
.cal-add { width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity var(--fast), background var(--fast), color var(--fast); }
.cal-day:hover .cal-add, .cal-add:focus-visible { opacity: 1; }
.cal-add:hover { background: var(--active); color: var(--text); }
@media (hover: none) { .cal-add { opacity: 1; } }
.cal-event.is-auto { padding: 3px 5px; border: 1px dashed var(--control); background: transparent; }
.cal-event.is-auto:hover { background: var(--active); }
.cal-event.is-auto .cal-dot, .cal-legend .is-auto .cal-dot { border: 2px dashed var(--accent); }
.cal-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; padding: 0; }
.cal-legend li { display: flex; align-items: center; gap: 6px; }
.cal-legend .cal-dot { margin-top: 0; }
.cal-legend .is-online .cal-dot { background: var(--accent); }
.cal-legend .is-scheduled .cal-dot { border: 2px solid var(--accent); }
.cal-foot { margin-top: 10px; }
.cal-name { display: block; overflow: hidden; text-overflow: ellipsis; }
.cal-name::first-letter { text-transform: uppercase; }
