.no-alert {
  color: var(--green);
}
.unsaved {
  color: var(--red);
}
.grid-scroll {
  overflow: auto;
  max-height: calc(100vh - 290px);
  min-height: 330px;
}
.grid-room-title {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  background: #f2f5fa;
  border-bottom: 1px solid var(--line);
  position: sticky;
  left: 0;
}
.grid-room-title span {
  color: var(--muted);
  font-size: 12px;
}
.grid-room-title .button {
  margin-left: auto;
}
.planning-grid {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
  min-width: 770px;
}
.planning-grid th,
.planning-grid td {
  padding: 9px 6px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
.planning-grid thead th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 550;
  background: #fbfcfe;
  padding-block: 12px;
}
.planning-grid th:first-child {
  width: 180px;
}
.grid-film {
  border: 0;
  background: none;
  text-align: left;
  display: flex;
  gap: 8px;
  padding: 0;
  color: var(--ink);
  width: 100%;
}
.grid-film strong {
  font-size: 13px;
  font-weight: 650;
  display: block;
}
.grid-film small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 11px;
  margin-top: 3px;
}
.grid-film .poster {
  width: 32px;
  height: 46px;
}
.grid-film .logistics {
  flex-wrap: wrap;
  gap: 2px;
}
.grid-film .logistics span {
  font-size: 9px;
}
.grid-session {
  background: color-mix(in srgb, var(--film-color, #637ba0) 12%, white);
  border: 1px solid #dfe4ef;
  border-left: 3px solid var(--film-color, #637ba0);
  border-radius: 5px;
  width: 100%;
  padding: 5px 6px;
  margin-bottom: 5px;
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: grab;
  color: var(--ink);
}
.grid-session strong {
  font-size: 14px;
}
.grid-session span {
  font-size: 11px;
  color: var(--muted);
}
.grid-session.conflict {
  background: #fff0ed;
  border-color: #c84343;
}
.grid-session.conflict strong::after {
  content: ' !';
  color: var(--red);
}
.cell-add {
  border: 1px dashed #d7deea;
  border-radius: 4px;
  color: #7b89a0;
  background: white;
  width: 100%;
  min-height: 23px;
  opacity: 0.5;
}
.cell-add:hover {
  opacity: 1;
  background: #f1f5ff;
}
.planning-grid td.drag-over {
  background: #edf2ff;
}
.grid-empty {
  padding: 22px !important;
  color: var(--muted);
  font-weight: 400;
}
.month-grid {
  overflow: auto;
}
.month-weekdays,
.month-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(90px, 1fr));
  min-width: 640px;
}
.month-weekdays {
  background: #f1f4f9;
}
.month-weekdays div {
  padding: 12px 7px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.month-day {
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  min-height: 123px;
  background: white;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--ink);
}
.month-day:hover {
  background: #f1f5ff;
}
.month-day.outside {
  background: #f7f8fb;
  color: #a3abba;
}
.month-date {
  font-size: 15px;
  font-weight: 650;
  display: flex;
  flex-direction: column;
  margin-bottom: 5px;
}
.month-date small {
  font-weight: 400;
  font-size: 10px;
  color: var(--muted);
}
.month-count {
  font-size: 12px;
}
.month-room {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 4px;
}
.month-room .room-dot {
  width: 5px;
  height: 5px;
  margin-top: 6px;
}
.month-alert {
  font-size: 11px;
  color: var(--red);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin-bottom: 4px;
}
.field > span {
  font-size: 13px;
  font-weight: 550;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #cfd7e4;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  min-height: 40px;
}
.field textarea {
  resize: vertical;
}
.field input[type='color'] {
  padding: 5px;
  height: 41px;
}
.span-2 {
  grid-column: span 2;
}
.event-fields[hidden],
.film-fields[hidden] {
  display: none;
}
.field-help {
  font-size: 12px !important;
  color: var(--muted);
  font-weight: 400 !important;
  margin-top: 10px;
  line-height: 1.6;
}
.form-intro {
  margin-bottom: 18px;
  line-height: 1.7;
}
.form-error {
  color: var(--red);
  margin-top: 10px;
}
.session-preview {
  margin-top: 18px;
  padding: 14px;
  background: #f1f4f9;
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.session-preview > span {
  font-size: 12px;
  color: var(--muted);
}
.inline-error {
  color: var(--red);
  font-size: 13px;
}
.inline-warning {
  color: var(--amber);
  font-size: 13px;
}
.week-choices {
  border: 1px solid var(--line);
  padding: 15px;
  margin: 18px 0;
  border-radius: 7px;
}
.week-choices legend {
  font-size: 13px;
  font-weight: 650;
  padding: 0 5px;
}
.week-choices label {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 9px;
}
.week-choices input {
  accent-color: var(--blue);
  width: 16px;
  height: 16px;
}
.alert-item {
  border-bottom: 1px solid var(--line);
  padding-bottom: 17px;
  margin-bottom: 17px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.alert-item .button {
  align-self: flex-start;
}
.objective-list > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
}
.objective-list .button {
  align-self: flex-start;
  margin-top: 5px;
}
.objective-list span {
  font-size: 13px;
}
.booking {
  font-size: 12px;
  color: var(--muted);
  margin: 9px 0;
}
.booking-approved {
  color: var(--green);
}
.booking-refused {
  color: var(--red);
}
.booking-requested {
  color: var(--amber);
}
.detail-description {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}
.goal-box {
  background: #f3f5fa;
  padding: 12px;
  border-radius: 7px;
  font-size: 12px;
}
.goal-progress {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 7px 0;
}
.goal-progress strong {
  font-size: 26px;
  line-height: 1;
}
.goal-progress span {
  color: var(--muted);
}
.goal-box .button {
  font-size: 12px;
  padding-inline: 0;
  min-height: 30px;
}
.preparation {
  margin-top: 17px;
}
.preparation h4 {
  margin: 0 0 7px;
  font-size: 13px;
}
.preparation-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf0f5;
  background: white;
  color: var(--muted);
  font-size: 12px;
}
.preparation-row strong {
  font-weight: 550;
}
.preparation-row.received strong {
  color: var(--green);
}
.preparation-row.ordered strong {
  color: var(--amber);
}
.detail-notes {
  font-size: 12px;
  color: var(--muted);
  white-space: pre-wrap;
  margin-top: 13px;
}
.film-detail {
  scroll-margin-top: 10px;
}
.help-list {
  padding-left: 20px;
}
.help-list li {
  margin-bottom: 14px;
}
.film-sheet-heading {
  display: flex;
  gap: 20px;
  margin-bottom: 23px;
}
.sheet-poster {
  width: 95px;
  height: 139px;
  object-fit: cover;
  border-radius: 5px;
}
.sheet-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 15px;
}
.sheet-links a {
  font-size: 12px;
  color: var(--blue);
}
.sheet-text {
  white-space: pre-wrap;
  line-height: 1.7;
  margin: 8px 0 21px;
}
.catalog-list .film-card {
  cursor: pointer;
}
.wide {
  width: min(900px, calc(100vw - 32px));
}
@media (max-width: 800px) {
  .grid-scroll {
    max-height: 65vh;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: span 1;
  }
  .month-days {
    min-width: 610px;
  }
  .modal-footer {
    flex-wrap: wrap;
  }
  .app-header h1 {
    font-size: 21px;
  }
}
.print-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10mm;
  margin-bottom: 5mm;
  border-bottom: 1px solid #1b2946;
  padding-bottom: 3mm;
}
.print-header span {
  font-size: 7pt;
  letter-spacing: 1px;
}
.print-header h1 {
  font-size: 16pt;
  margin-top: 2mm;
}
.print-header p {
  font-size: 7pt;
  max-width: 110mm;
}
.print-rooms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6mm 5mm;
  align-items: start;
}
.print-room {
  break-inside: avoid-page;
}
.print-room h2 {
  font-size: 12pt;
  border-bottom: 2px solid #6f8199;
  margin-bottom: 2mm;
  padding-bottom: 1mm;
  display: flex;
  justify-content: space-between;
}
.print-room h2 span {
  font-size: 8pt;
  font-weight: 400;
}
.print-room table {
  table-layout: fixed;
  border-collapse: collapse;
  width: 100%;
}
.print-room th,
.print-room td {
  border: 1px solid #c3ccd9;
  padding: 2mm 1mm;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.print-room thead th {
  background: #e9edf4;
  font-size: 7pt;
  font-weight: 650;
}
.print-room th:first-child {
  width: 25%;
}
.print-film {
  display: flex;
  gap: 2mm;
  align-items: flex-start;
}
.print-film .poster {
  width: 9mm;
  height: 13mm;
  object-fit: cover;
  flex-shrink: 0;
}
.print-film strong {
  font-size: 8pt;
}
.print-film span {
  display: block;
  font-size: 6.5pt;
  font-weight: 400;
  margin-top: 1mm;
}
.print-session {
  margin-bottom: 2mm;
  border-bottom: 1px solid #e3e7ee;
  padding-bottom: 1.5mm;
}
.print-session:last-child {
  border: 0;
  margin: 0;
  padding: 0;
}
.print-session strong {
  font-size: 9pt;
  display: block;
}
.print-session span {
  display: block;
  font-size: 7pt;
  margin-top: 0.5mm;
}
.print-conflict {
  outline: 1px solid #b83838;
  color: #a12828;
  padding: 1mm;
}
.print-goals {
  margin-top: 5mm;
  border-top: 1px solid #9eaabd;
  padding-top: 3mm;
  font-size: 7pt;
  break-inside: avoid;
}
.print-goals h3 {
  font-size: 9pt;
  margin-bottom: 2mm;
}
.print-goals > span {
  display: inline-block;
  margin: 0 6mm 2mm 0;
}
body[data-print-orientation='portrait'] .print-rooms {
  grid-template-columns: 1fr;
}
@page {
  size: A3 landscape;
  margin: 10mm;
}
@media print {
  body {
    margin: 0;
    background: white;
    font:
      8pt/1.3 -apple-system,
      BlinkMacSystemFont,
      'Segoe UI',
      sans-serif;
    color: #1b2946;
  }
  .rail,
  .workspace,
  dialog,
  .toast,
  #print-preview-toolbar {
    display: none !important;
  }
  #print-area {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
.session-item {
  position: absolute;
  height: 51px;
  min-width: 16px;
}
.session-item > .session-block {
  inset: 0;
  width: 100%;
  height: 100%;
}
.session-quick-actions {
  display: flex;
  gap: 2px;
  position: absolute;
  right: 3px;
  bottom: 3px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.12s;
  background: #ffffffed;
  border-radius: 4px;
  padding: 1px;
}
.session-item:hover .session-quick-actions,
.session-item:focus-within .session-quick-actions,
.grid-session-item:hover .session-quick-actions,
.grid-session-item:focus-within .session-quick-actions {
  opacity: 1;
}
.session-quick-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 23px;
  padding: 3px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
}
.session-quick-actions button:hover {
  background: #e4eafd;
}
.session-quick-actions button[data-action='quick-delete-session']:hover {
  background: #fde8e8;
  color: var(--red);
}
.session-quick-actions svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.session-item:hover .session-block small,
.session-item:focus-within .session-block small {
  padding-right: 52px;
}
.session-item {
  z-index: 1;
}
.session-item:hover,
.session-item:focus-within {
  z-index: 3;
}
.session-item.conflict .session-quick-actions {
  background: #fff2f0;
}
.grid-session-item {
  position: relative;
  margin-bottom: 6px;
}
.grid-session-item .grid-session {
  margin-bottom: 0;
  padding-bottom: 29px;
}
.grid-session-item .session-quick-actions {
  opacity: 0.65;
}
.room-label {
  padding: 10px 9px;
  gap: 6px;
}
.room-label strong {
  display: block;
  font-size: 12px;
  font-weight: 650;
}
.room-label small {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  line-height: 1.45;
  color: var(--muted);
}
.grid-room-title .capacity-detail {
  font-size: 11px;
}
.print-room h2 {
  gap: 4mm;
}
.print-room h2 span {
  font-size: 7pt;
  text-align: right;
}
.print-room tr {
  break-inside: avoid;
}
#print-preview-toolbar {
  display: none;
}
.print-preview-open .rail,
.print-preview-open .workspace {
  display: none;
}
.print-preview-open #print-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 24px;
  background: #edf1f8;
  border-bottom: 1px solid var(--line);
}
.print-preview-open #print-preview-label {
  font-size: 13px;
  text-align: center;
  color: var(--muted);
}
.print-preview-open #print-area {
  display: block;
  max-width: calc(100vw - 40px);
  width: 400mm;
  margin: 20px auto;
  padding: 10mm;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 4px 25px #1b294612;
  font-size: 8pt;
  line-height: 1.3;
}
.print-preview-open[data-print-orientation='portrait'] #print-area {
  width: 277mm;
}
.print-preview-open {
  overflow: auto;
}
.print-preview-open .print-header h1 {
  font-size: 16pt;
  letter-spacing: 0;
}
.print-preview-open .print-room h2 {
  letter-spacing: 0;
}
.print-preview-open .print-room table {
  background: white;
}
@media (hover: none) {
  .session-quick-actions {
    opacity: 1;
  }
}
@media (max-width: 800px) {
  .grid-room-title {
    flex-wrap: wrap;
  }
  .grid-room-title .capacity-detail {
    max-width: 100%;
    font-size: 10px;
  }
  .print-preview-open #print-preview-toolbar {
    flex-wrap: wrap;
    padding: 10px;
  }
  .print-preview-open #print-area {
    max-width: none;
    margin: 10px;
    width: 1100px;
  }
  .print-preview-open[data-print-orientation='portrait'] #print-area {
    width: 780px;
  }
}

/* Annuaire et export agenda */
.distributor-control {
  display: flex;
  align-items: center;
  gap: 8px;
}
.distributor-control input {
  min-width: 0;
  flex: 1;
}
.distributor-control .button {
  white-space: nowrap;
  text-decoration: none;
}
.distributor-control [hidden] {
  display: none;
}
.field > label {
  font-size: 13px;
  font-weight: 550;
}
.check-field {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 16px 0;
  font-size: 13px;
}
.check-field input {
  width: 17px;
  height: 17px;
  accent-color: var(--blue);
  flex-shrink: 0;
}
.calendar-count {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f2f6fb;
  font-weight: 650;
}
.calendar-notice {
  font-size: 12px;
  line-height: 1.65;
  color: #65502c;
  background: #fcf7ed;
  padding: 12px 14px;
  border-radius: 8px;
}
.calendar-help {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.65;
}
.calendar-help summary {
  cursor: pointer;
  font-weight: 650;
}
.calendar-help p {
  margin: 12px 0;
}
.modal-footer {
  flex-wrap: wrap;
}
.sheet-links:empty {
  display: none;
}
@media (max-width: 600px) {
  .distributor-control {
    flex-wrap: wrap;
  }
  .distributor-control input {
    flex-basis: 100%;
  }
  .header-actions {
    flex-wrap: wrap;
  }
}

/* Contrôle, préparation et conservation */
.period-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.button.locked {
  color: #355e4c;
  background: #edf6f1;
  border-color: #b8d5c5;
}
.session-lock {
  position: absolute;
  bottom: 3px;
  right: 5px;
  font-size: 11px;
  pointer-events: none;
}
.session-block[draggable='false'],
.grid-session[draggable='false'] {
  cursor: pointer;
}
.backup-status {
  font: inherit;
  font-size: 11px;
  border: 1px solid #e3cfa9;
  border-radius: 5px;
  padding: 5px 9px;
  background: #fff8eb;
  color: #805a24;
  text-align: left;
  cursor: pointer;
}
.backup-status.backup-current {
  border-color: #c0d9cd;
  background: #f0f7f3;
  color: #37664f;
}
.app-footer {
  flex-wrap: wrap;
  gap: 8px;
}
.control-view .film-panel {
  display: none;
}
.control-view .body-layout {
  grid-template-columns: minmax(0, 1fr);
}
#control-range {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
#control-range[hidden],
#week-lock[hidden] {
  display: none;
}
.control-hint {
  font-size: 11px;
  color: var(--muted);
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}
.control-scroll {
  overflow: auto;
  max-height: calc(100vh - 345px);
  min-height: 250px;
}
.control-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: 100%;
  min-width: calc(160px + var(--control-days) * 36px);
  font-size: 10px;
}
.control-table th,
.control-table td {
  border-right: 1px solid #e1e6ef;
  border-bottom: 1px solid #e1e6ef;
  vertical-align: top;
  padding: 3px 1px;
  text-align: left;
  background: white;
}
.control-table th:first-child {
  width: 160px;
}
.control-table thead th {
  position: sticky;
  z-index: 4;
  background: #f2f5fa;
  color: #62728a;
  font-weight: 550;
}
.control-weeks th {
  top: 0;
  height: 49px;
  border-right: 2px solid #c1cddd !important;
  vertical-align: middle;
}
.control-weeks th > span {
  display: block;
  text-align: center;
  font-size: 11px;
  white-space: nowrap;
}
.control-week {
  display: block;
  margin: 3px auto 0;
  border: 1px solid #cbd5e3;
  background: white;
  border-radius: 4px;
  font-size: 10px;
  color: #68768a;
  padding: 2px 7px;
}
.control-week.locked {
  background: #edf6f1;
  color: #355e4c;
  border-color: #b8d5c5;
}
.control-days th {
  top: 49px;
  height: 27px;
  text-align: center;
  vertical-align: middle;
  font-size: 10px;
}
.control-table .week-start {
  border-left: 2px solid #c1cddd;
}
.control-table tbody td:nth-child(7n + 2) {
  border-left: 2px solid #c1cddd;
}
.control-table thead th:first-child {
  left: 0;
  z-index: 6;
  text-align: left;
}
.control-film {
  position: sticky;
  left: 0;
  z-index: 2;
  vertical-align: middle !important;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 550;
  padding: 7px 6px !important;
  box-shadow: 2px 0 3px #1b294609;
}
.control-film > span {
  display: block;
  border-left: 3px solid;
  padding-left: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.control-room th {
  background: #edf1f7;
  padding: 7px 10px;
  color: var(--ink);
  font-size: 11px;
  position: relative;
}
.control-room small {
  font-size: 9px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 12px;
}
.control-session {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 3px 0;
  border: 0;
  border-bottom: 2px solid var(--film-color);
  background: color-mix(in srgb, var(--film-color) 9%, white);
  border-radius: 3px;
  color: var(--ink);
  margin-bottom: 3px;
  font-size: 10px;
  line-height: 1.25;
  cursor: pointer;
  overflow: hidden;
}
.control-session:hover,
.control-session:focus-visible {
  outline: 2px solid #5a7ac0;
  outline-offset: -1px;
}
.control-session strong {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.control-session span {
  max-width: 100%;
  font-size: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.control-session.conflict {
  background: #fff0ed;
  color: #b13434;
  border-color: #cc4d4d;
}
.control-goals {
  padding: 12px 15px;
  font-size: 12px;
}
.control-goals summary {
  cursor: pointer;
  font-weight: 600;
  color: #526584;
}
.control-goals .management-table-wrap {
  margin-top: 12px;
}
.followup-count {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0;
}
.followup-count strong {
  color: var(--ink);
}
.followup-status {
  border: 1px solid #e2d4bc;
  border-radius: 5px;
  background: #fcf7ee;
  color: #846434;
  font-size: 11px;
  padding: 7px 9px;
  white-space: nowrap;
  cursor: pointer;
}
.followup-status.ordered {
  background: #fff2d9;
  color: #8e6217;
  border-color: #ebcf98;
}
.followup-status.received {
  background: #edf6f1;
  color: #2f7053;
  border-color: #bfdbcc;
}
.followup-table th:first-child {
  min-width: 210px;
}
.followup-table .booking {
  display: block;
  margin: 0;
  white-space: nowrap;
}
.followup-table .button {
  font-size: 11px;
  padding: 7px 9px;
}
@media (max-width: 1100px) {
  .app-header {
    flex-wrap: wrap;
    gap: 12px;
  }
  .header-actions {
    flex-wrap: wrap;
  }
  .period-bar,
  .view-bar {
    flex-wrap: wrap;
    gap: 12px;
  }
  .control-scroll {
    max-height: 60vh;
  }
}
@media (max-width: 800px) {
  .period-actions {
    width: 100%;
  }
  .view-actions {
    flex-wrap: wrap;
  }
  .control-hint {
    line-height: 1.6;
  }
  .control-scroll {
    min-height: 220px;
  }
  .control-table th:first-child {
    width: 140px;
  }
  .control-table {
    min-width: calc(140px + var(--control-days) * 36px);
  }
}

/* Administration et catalogue */
.check-level-help {
  padding: 12px 14px;
  background: #f3f6fb;
  border-radius: 7px;
  font-size: 12px;
  margin-bottom: 16px;
  line-height: 1.65;
}
.check-level-help p + p {
  margin-top: 5px;
}
.management-table.check-settings-table {
  min-width: 560px;
}
.check-settings-table th:first-child {
  width: 65%;
}
.check-settings-table select {
  width: 100%;
  min-width: 145px;
}
.check-review-notice {
  padding: 12px 15px;
  border: 1px solid #cedbcc;
  border-radius: 8px;
  background: #f3f8f2;
  color: #426643;
  margin-bottom: 16px;
  font-size: 13px;
}
.check-review-notice.blocked {
  background: #fff0ee;
  border-color: #edc4be;
  color: #a73e32;
}
.check-review-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.check-review-row summary {
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  flex-wrap: wrap;
  font-size: 13px;
}
.check-level {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 4px;
  background: #edf0f5;
  color: #64738b;
  min-width: 85px;
  text-align: center;
}
.check-warning .check-level {
  background: #fff2dc;
  color: #8c641c;
}
.check-blocking .check-level {
  background: #fde5e1;
  color: #ae3f36;
}
.check-info .check-level {
  background: #eaf1ff;
  color: #4266a1;
}
.check-result {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.check-review-row ul {
  margin: 12px 0 0;
  padding-left: 20px;
  line-height: 1.7;
  font-size: 12px;
  color: #59677d;
}
.check-review-row li + li {
  margin-top: 5px;
}
@media (max-width: 800px) {
  .check-result {
    margin-left: 0;
  }
  .check-review-row summary strong {
    flex-basis: 100%;
  }
  .management-table.check-settings-table {
    min-width: 480px;
  }
}
.rail-settings {
  margin-top: auto;
}
.rail-settings + .rail-bottom {
  margin-top: 0;
}
dialog.wide {
  width: min(1100px, calc(100% - 32px));
  max-width: calc(100% - 32px);
}
.management-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.management-toolbar {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin: 18px 0;
}
.management-toolbar .field {
  margin: 0;
  min-width: 150px;
}
.management-toolbar .grow {
  flex: 1;
  min-width: 200px;
}
.management-toolbar > .button {
  min-height: 40px;
}
.management-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.management-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 13px;
  text-align: left;
}
.management-table thead {
  background: #f3f6fb;
}
.management-table th,
.management-table td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.management-table thead th {
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--muted);
  font-weight: 650;
}
.management-table tbody tr:last-child > * {
  border-bottom: 0;
}
.management-table tbody th {
  font-weight: 600;
}
.management-table td a {
  color: var(--blue);
  overflow-wrap: anywhere;
}
.row-actions {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}
.row-actions .button {
  font-size: 11px;
  padding: 7px 9px;
  white-space: nowrap;
}
.list-pagination {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 15px 0;
  color: var(--muted);
  font-size: 12px;
}
.list-pagination > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.list-pagination .button {
  padding: 5px 12px;
}
.status-tag {
  display: inline-block;
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 5px;
  background: #e9edf3;
  color: #66738b;
  margin: 3px 0 3px 6px;
  white-space: nowrap;
  font-weight: 550;
}
.status-pending {
  background: #f8efde;
  color: #82612d;
  margin-left: 0;
}
.archived-row {
  background: #f7f8fa;
  color: #78818e;
}
.catalog-film-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
  max-width: 290px;
}
.catalog-film-heading .poster {
  width: 34px;
  height: 49px;
  flex-shrink: 0;
}
.catalog-film-heading strong {
  display: block;
}
.management-table small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.catalog-summary {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin: 0 0 15px;
  font-size: 12px;
  color: var(--muted);
}
.catalog-summary strong {
  color: var(--ink);
  font-size: 16px;
  margin-right: 4px;
}
.management-empty {
  text-align: center !important;
  color: var(--muted);
  padding: 28px !important;
}
.directory-table th:first-child {
  width: 28%;
}
#directory-form .field {
  margin-bottom: 17px;
}
#directory-form input {
  width: 100%;
}
@media (max-width: 800px) {
  .management-toolbar .field {
    flex: 1;
    min-width: 180px;
  }
  .management-toolbar .grow {
    flex-basis: 100%;
  }
  .management-toolbar > .button {
    width: 100%;
  }
  .list-pagination {
    flex-wrap: wrap;
  }
  .management-table {
    min-width: 720px;
  }
}

/* Blocs de la grille, durée et suppression de film */
.grid-display-options {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8faff;
  font-size: 12px;
  color: var(--muted);
}
.grid-display-options > span {
  font-weight: 600;
}
.grid-mode-choices {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid #dce3ef;
  border-radius: 8px;
  background: white;
}
.grid-mode-choices button {
  border: 0;
  background: none;
  border-radius: 5px;
  padding: 7px 12px;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.grid-mode-choices button.active {
  background: #e9effc;
  color: #355b9b;
  font-weight: 650;
}
.grid-mode-choices button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
.planning-grid {
  min-width: 1020px;
}
.planning-grid th:first-child {
  width: auto;
}
.planning-grid .grid-poster-column {
  width: 142px;
}
.planning-grid .grid-info-column {
  width: 210px;
}
.planning-grid.grid-mode-poster {
  min-width: 800px;
}
.planning-grid.grid-mode-info {
  min-width: 880px;
}
.planning-grid .grid-poster-cell {
  padding: 10px;
  background: #fafbfd;
  vertical-align: middle;
}
.planning-grid .grid-info-cell {
  padding: 10px;
  background: #f7f9fc;
  vertical-align: middle;
}
.planning-grid .grid-film {
  align-items: flex-start;
  min-width: 0;
}
.planning-grid .grid-poster-block {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 7px;
}
.planning-grid .grid-poster-block .poster {
  width: 120px;
  height: 174px;
  flex-shrink: 0;
}
.planning-grid .grid-poster-block strong {
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}
.planning-grid .grid-info-block {
  display: block;
  border-left: 3px solid #d5deee;
  padding-left: 10px;
}
.planning-grid .grid-info-block strong {
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.planning-grid .grid-info-block small {
  font-size: 11px;
  line-height: 1.5;
  margin-top: 6px;
}
.planning-grid .grid-info-block small + small {
  margin-top: 2px;
}
.planning-grid .grid-info-block .grid-distributor {
  font-weight: 550;
  margin-top: 8px;
}
.planning-grid .grid-info-block .logistics {
  margin-top: 10px;
  gap: 4px;
}
.planning-grid .grid-info-block .logistics span {
  font-size: 10px;
}
.planning-grid .grid-film:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.duration-field .field-help {
  display: block;
  margin-top: 5px;
}
.duration-field input {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
#film-duration-total {
  min-height: 19px;
}
.delete-film-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.delete-film-heading .poster {
  width: 58px;
  height: 84px;
  flex-shrink: 0;
}
.delete-film-heading h3 {
  font-size: 18px;
}
.delete-film-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.autosave-status {
  background: #f2f5fb;
  border-color: #d7dfed;
  color: #526584;
}
@media (max-width: 800px) {
  .grid-display-options {
    gap: 10px;
  }
  .grid-mode-choices button {
    padding: 7px 10px;
  }
}

/* Navigation par calendrier et corbeille */
.without-film-panel .body-layout {
  grid-template-columns: minmax(0, 1fr);
}
.film-panel[hidden] {
  display: none;
}
.planning-grid .grid-title-column {
  width: 170px;
}
.planning-grid.grid-mode-none {
  min-width: 840px;
}
.planning-grid .grid-title-block strong {
  font-size: 13px;
  line-height: 1.4;
}
.period-picker {
  font: inherit;
  color: inherit;
  font-weight: inherit;
  line-height: inherit;
  border: 0;
  background: none;
  border-radius: 6px;
  padding: 4px 6px;
  margin-left: -6px;
  text-align: left;
  cursor: pointer;
}
.period-picker::after {
  content: '⌄';
  margin-left: 10px;
  color: #78869d;
  font-size: 16px;
}
.period-picker:hover {
  background: #e9eef8;
}
.period-picker:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.calendar-picker-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.calendar-picker-nav > div {
  display: flex;
  gap: 10px;
  min-width: 0;
}
.calendar-picker-nav select {
  border: 1px solid var(--line);
  background: #f6f8fc;
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 17px;
  font-weight: 600;
  text-transform: capitalize;
  min-width: 0;
}
.calendar-picker-weekdays,
.calendar-picker-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}
.calendar-picker-weekdays {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 8px;
}
.calendar-picker-days button {
  border: 1px solid transparent;
  border-radius: 7px;
  background: #f7f9fc;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  min-height: 45px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.calendar-picker-days button.outside {
  color: #97a2b3;
  background: #fcfcfe;
}
.calendar-picker-days button.selected-week {
  background: #e6edff;
  color: #35599b;
  font-weight: 650;
}
.calendar-picker-days button.today {
  border: 2px solid #869dc7;
}
.calendar-picker-days button:hover,
.calendar-picker-days button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
  background: #dfe8ff;
}
.session-quick-actions [data-copy-session] {
  cursor: grab;
}
.session-quick-actions [data-copy-session]:active {
  cursor: grabbing;
}
.drop-preview {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 30;
  border-left: 2px dashed #3457c6;
  pointer-events: none;
}
.drop-preview > span {
  position: absolute;
  top: 3px;
  left: 4px;
  white-space: nowrap;
  background: #344fbd;
  color: white;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
  padding: 3px 7px;
  border-radius: 5px;
  box-shadow: 0 2px 8px #16266026;
}
.drop-preview.near-end > span {
  left: auto;
  right: 4px;
}
@media (max-width: 600px) {
  .calendar-picker-nav {
    gap: 8px;
  }
  .calendar-picker-nav select {
    font-size: 15px;
    padding: 8px;
  }
  .calendar-picker-days {
    gap: 3px;
  }
  .calendar-picker-days button {
    min-height: 43px;
    font-size: 16px;
  }
}

.session-item.drag-source,
.grid-session-item.drag-source {
  opacity: 0.55;
  pointer-events: none;
}

/* Mode hébergé : état de l'enregistrement, connexion, historique, conflits */
button.save-status {
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 4px 8px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
button.save-status:hover {
  background: var(--line);
}
.save-status.sync-saved {
  color: var(--green);
}
.save-status.sync-offline,
.save-status.sync-empty,
.save-status.sync-pending,
.save-status.sync-sending {
  color: var(--amber);
}
.save-status.sync-conflict,
.save-status.sync-error {
  color: var(--red);
  font-weight: 600;
}
.user-label {
  font-size: 12px;
  color: var(--muted);
  margin-right: 4px;
}
#login-dialog {
  width: min(420px, calc(100vw - 32px));
}
.conflict-choices {
  margin: 12px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}
.history-scroll {
  max-height: 60vh;
  overflow: auto;
  margin-top: 12px;
}
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.history-table th,
.history-table td {
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.history-table tr.current {
  background: var(--bg);
}
.history-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
@media (max-width: 1100px) {
  /* Sur petit écran, l'état reste masqué sauf s'il signale un problème (coupure, conflit, erreur). */
  .save-status.unsaved {
    display: inline-block;
  }
  .user-label {
    display: none;
  }
}
