.admin-wrap {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem;
}

/* L'administration est plus large que la page publique : on aligne l'en-tete sur elle. */
.header-inner {
  max-width: 1600px;
}

/* Editeurs des blocs redactionnels : on les habille aux couleurs de l'application. */
.editor-panel { margin-bottom: 1rem; }

.editor-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.editor-panel-head h2 { margin: 0; }

.panel-head-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Interrupteur de publication d'une rubrique sur la page publique. */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  white-space: nowrap;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: relative;
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: #c3c9d1;
  transition: background 0.15s;
  flex-shrink: 0;
}
.switch-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: white;
  transition: transform 0.15s;
}
.switch input:checked + .switch-slider { background: var(--accent); }
.switch input:checked + .switch-slider::before { transform: translateX(15px); }
.switch input:focus-visible + .switch-slider { box-shadow: 0 0 0 2px var(--accent-soft), 0 0 0 4px var(--accent); }

.switch-text {
  font-size: 0.8rem;
  color: var(--muted);
}
.switch input:checked ~ .switch-text { color: var(--accent-dark); }

.editor-panel-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}

.editor-panel [data-role="editor"] {
  min-height: 140px;
  background: white;
  border-color: var(--border);
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}
.editor-panel .ql-editor {
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
}
.ql-toolbar.ql-snow {
  border-color: var(--border);
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}
.ql-snow .ql-stroke { stroke: var(--ink); }
.ql-snow .ql-fill { fill: var(--ink); }
.ql-snow .ql-picker { color: var(--ink); }
.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: var(--accent); }
.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill { fill: var(--accent); }

.editor-panel [data-role="feedback"] .feedback {
  display: inline-block;
  margin-top: 0;
}

.periods-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.periods-table th, .periods-table td {
  text-align: left;
  padding: 0.4rem 0.35rem;
  border-bottom: 1px solid var(--border);
}

.periods-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.periods-table button {
  border: 1px solid var(--border);
  background: white;
  border-radius: 5px;
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
  cursor: pointer;
  margin-right: 0.25rem;
}
.periods-table button:hover { background: #f0f2f5; }
.periods-table button.danger { color: var(--red); border-color: #f0c4c4; }

.works-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.works-table {
  margin-bottom: 0;
  white-space: nowrap;
}

.works-table th, .works-table td {
  white-space: nowrap;
}

.works-table th.floor-group {
  text-align: center;
  background: #f5f6f8;
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.works-table th.room-col {
  text-align: center;
  font-weight: 500;
  font-size: 0.7rem;
  text-transform: none;
  color: var(--ink);
  padding: 0.3rem 0.2rem;
  min-width: 30px;
}

.works-table td.room-cell {
  text-align: center;
  padding: 0.3rem 0.2rem;
}

.works-table td.room-cell input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.works-table input[type="date"],
.works-table select,
.works-table input[type="text"] {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.25rem 0.35rem;
  font-size: 0.82rem;
}

.works-table input[type="text"].comment-input {
  width: 280px;
}
