/* Calendrier et éditeur : zones de travail bornées à la hauteur de l'écran. */
.evt-calendar-page { display: flex; flex-direction: column; gap: .75rem; min-height: 0; }
.evt-calendar-head { position: sticky; top: 0; z-index: 3; background: var(--panel); padding: .8rem; border: 1px solid var(--line); border-radius: var(--radius); }
.evt-calendar-head .page-head { margin: 0 0 .65rem; }
.evt-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .7rem; flex-wrap: wrap; }
.evt-toolbar nav strong { min-width: 10rem; text-align: center; text-transform: capitalize; }
.evt-filters { display: flex; flex-wrap: wrap; gap: .4rem .8rem; margin-top: .75rem; }
.evt-filter { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; padding: .2rem .4rem; border-left: 3px solid var(--evt-color, var(--ink-2)); }
.evt-filter input, .evt-pane input[type=checkbox] { width: auto; margin: 0; accent-color: var(--accent); }
.evt-calendar-scroll { max-height: calc(100dvh - 295px); min-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.evt-calendar { width: 100%; min-width: 740px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.evt-calendar th { position: sticky; top: 0; z-index: 1; background: var(--panel); color: var(--ink-2); padding: .6rem .4rem; text-align: left; font-size: .78rem; border-bottom: 1px solid var(--line); }
.evt-calendar td { vertical-align: top; height: 108px; padding: .3rem; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.evt-calendar td:last-child { border-right: 0; }
.evt-calendar tr:last-child td { border-bottom: 0; }
.evt-calendar .evt-today { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.evt-calendar .evt-outside { background: color-mix(in srgb, var(--ink-2) 4%, var(--panel)); }
.evt-day { display: block; padding: .15rem .4rem; border: 0; box-shadow: none; background: transparent; color: var(--ink-2); margin: 0 0 .2rem; font-size: .78rem; }
.evt-today .evt-day { color: var(--accent); font-weight: 700; }
.evt-item { display: block; width: 100%; padding: .25rem .4rem; margin: .2rem 0 0; border: 0; border-left: 3px solid var(--evt-color, var(--ink-2)); border-radius: 4px; background: color-mix(in srgb, var(--evt-color, var(--ink-2)) 10%, var(--panel)); color: var(--ink); text-align: left; text-decoration: none; font-size: .74rem; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evt-item span { overflow: hidden; text-overflow: ellipsis; }
.evt-item:hover { background: color-mix(in srgb, var(--evt-color, var(--ink-2)) 19%, var(--panel)); }
.evt-instruction { --evt-color: var(--accent); }
.evt-repas { --evt-color: #b75a1e; }
.evt-reunion { --evt-color: #7553c2; }
.evt-ceremonie { --evt-color: #af4779; }
.evt-sport { --evt-color: var(--ok); }
.evt-formation { --evt-color: #198192; }
.evt-autre { --evt-color: var(--ink-2); }
.evt-deadline { --evt-color: var(--warn); }
.evt-deadline.late { --evt-color: var(--bad); }
.evt-day-list { display: grid; gap: .5rem; max-height: 60dvh; overflow: auto; }
.evt-day-list .evt-item { white-space: normal; }
.modal.wide.evt-modal { width: min(1180px, 100%); height: min(880px, 94dvh); max-height: 94dvh; overflow: hidden; gap: .65rem; }
.evt-modal > h3, .evt-modal > .row { flex-shrink: 0; }
.evt-editor { display: flex; flex-direction: column; min-height: 0; flex: 1; gap: .4rem; }
.evt-editor-columns { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: 0; flex: 1; gap: 1rem; }
.evt-pane { min-width: 0; overflow: auto; overscroll-behavior: contain; padding: .2rem .7rem .6rem .1rem; display: flex; flex-direction: column; gap: .65rem; scrollbar-gutter: stable; }
.evt-pane h4 { margin: 0; }
.evt-pane > h4, .evt-pane > strong:first-child { position: sticky; top: -.2rem; background: var(--panel); z-index: 2; padding: .3rem 0; }
.evt-pane label { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; }
.evt-pane label:has(input[type=checkbox]) { flex-direction: row; align-items: center; }
.evt-pane input, .evt-pane textarea, .evt-pane select { min-width: 0; width: 100%; }
.evt-pane textarea { resize: vertical; min-height: 70px; max-height: 240px; }
.evt-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.evt-pane details { border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; }
.evt-pane summary { cursor: pointer; font-weight: 600; }
.evt-pane details[open] > :not(summary) { margin-top: .6rem; }
.evt-guest-list { min-height: 120px; }
.evt-guest { display: flex; align-items: center; gap: .4rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.evt-guest .grow { min-width: 0; overflow-wrap: anywhere; }
.evt-guest strong { font-size: .82rem; }
.evt-search-results { max-height: 175px; overflow: auto; flex-shrink: 0; }
.evt-search-results:empty { display: none; }
.evt-search-results button { display: block; width: 100%; text-align: left; font-size: .8rem; }
.evt-status-envoye { color: var(--ok); }
.evt-status-echec, .evt-status-incertain, .evt-error { color: var(--bad); }
.evt-status-planifie { color: var(--accent); }
.evt-error { margin: 0; flex-shrink: 0; max-height: 85px; overflow: auto; font-size: .83rem; }
.evt-error:empty { display: none; }
.evt-variables { display: flex; flex-wrap: wrap; gap: .25rem; }
.evt-variables button { font-family: monospace; font-size: .72rem; padding: .2rem .3rem; }
.evt-preview { padding: .65rem; background: var(--accent-soft); border-radius: var(--radius); max-height: 210px; overflow: auto; }
.evt-preview:empty { display: none; }
.evt-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: .82rem; }
.evt-calendar-page :focus-visible, .evt-modal :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 700px) {
  .evt-calendar-scroll { max-height: calc(100dvh - 350px); }
  .evt-toolbar nav strong { min-width: 7rem; }
  .evt-modal { padding: .8rem; }
  .evt-editor-columns { grid-template-columns: 1fr; overflow: auto; display: block; }
  .evt-pane { max-height: 48dvh; margin-bottom: .8rem; border-bottom: 1px solid var(--line); }
  .evt-dates { grid-template-columns: 1fr; }
  .evt-filters { gap: .2rem; }
  .evt-filter { font-size: .7rem; }
}
