:root {
  --ink: #332b27;
  --rust: #a54f31;
  --muted: #79716a;
  --line: #e8e1da;
  --paper: #f8f5f1;
  --green: #3e745a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
button, input, select, textarea {
  font: inherit;
}
button, a, select {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid #b66747;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.app-shell {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--ink);
  color: #f7f1eb;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font: 21px Georgia, serif;
}
.brand img {
  border-radius: 4px;
  flex: 0 0 64px;
}
.brand small {
  display: block;
  font: 12px Arial, sans-serif;
  color: #d7c9be;
  margin-top: 8px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #bfb0a3;
  margin: 48px 12px 18px;
}
nav {
  display: grid;
  gap: 7px;
}
nav a {
  text-decoration: none;
  font-size: 14px;
  padding: 15px 16px;
  border-radius: 5px;
}
nav a:hover {
  background: #ffffff0c;
}
nav a[aria-current="page"] {
  background: var(--rust);
  color: white;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 45px 12px 0;
  color: #d7c9be;
  font-size: 12px;
  line-height: 1.8;
}
.sidebar-bottom a {
  font-size: 14px;
}
.topbar {
  padding: 23px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: white;
  gap: 16px;
  font-size: 13px;
}
.topbar > div {
  display: flex;
  gap: 20px;
  align-items: center;
}
.demo-badge, .badge {
  display: inline-block;
  border-radius: 20px;
  padding: 7px 11px;
  background: #f2e5d8;
  color: #875332;
  font-size: 12px;
  white-space: nowrap;
}
.workspace {
  max-width: 1500px;
  padding: 38px 36px 24px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  color: var(--rust);
  font-weight: bold;
}
h1 {
  font: normal clamp(32px, 3vw, 44px) / 1.2 Georgia, serif;
  margin: 12px 0;
}
h2 {
  font: normal 24px / 1.3 Georgia, serif;
  margin: 0;
}
.muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.demo-notice {
  font-size: 12px;
  line-height: 1.7;
  color: #82705f;
  padding: 14px 18px;
  border: 1px solid #e8d8c6;
  background: #fffaf3;
  border-radius: 5px;
  margin: 24px 0 30px;
}
.btn {
  display: inline-block;
  border: 1px solid var(--line);
  padding: 12px 16px;
  font-size: 13px;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
}
.primary {
  background: var(--rust);
  color: white;
  border-color: var(--rust);
}
.secondary {
  background: white;
  color: var(--ink);
}
.btn:hover {
  filter: brightness(.96);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}
.stat, .panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}
.stat {
  padding: 23px;
}
.stat strong {
  display: block;
  font: 38px Georgia, serif;
  margin: 16px 0 10px;
}
.stat span, .stat a {
  font-size: 12px;
  color: var(--muted);
}
.stat a {
  color: var(--rust);
}
.panel {
  padding: 25px;
  margin-bottom: 24px;
}
.panel-heading, .toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}
.dashboard-grid .panel {
  margin-bottom: 0;
}
.task {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.task:last-child {
  border-bottom: 0;
}
.task p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  font-size: 10px;
  letter-spacing: .7px;
  text-transform: uppercase;
  font-weight: normal;
  color: var(--muted);
  padding: 12px;
  background: var(--paper);
}
td {
  border-bottom: 1px solid var(--line);
  padding: 18px 12px;
  line-height: 1.5;
  vertical-align: middle;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
tr:last-child td {
  border-bottom: 0;
}
.table-button, .text-button {
  border: 0;
  padding: 5px;
  font-size: 12px;
  color: var(--rust);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.badge.ok {
  background: #eaf3ec;
  color: var(--green);
}
.badge.off {
  background: #efedeb;
  color: var(--muted);
}
.toolbar input, .toolbar select {
  width: auto;
  min-width: 170px;
}
.toolbar > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
label {
  display: block;
  font-size: 13px;
  margin: 18px 0;
  line-height: 1.6;
}
input, select, textarea {
  display: block;
  width: 100%;
  background: white;
  padding: 11px;
  border: 1px solid #ddd4cb;
  border-radius: 4px;
  color: var(--ink);
  margin-top: 6px;
}
.status-select {
  width: auto;
  min-width: 135px;
  font-size: 12px;
  padding: 8px;
  margin: 0;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 30px;
  font-size: 14px;
  line-height: 1.8;
}
.review {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.review:last-child {
  border-bottom: 0;
}
.review-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.review p {
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
}
.review-actions {
  display: flex;
  gap: 12px;
}
.admin-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  flex-wrap: wrap;
}
dialog {
  width: min(590px, calc(100% - 30px));
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  max-height: 90vh;
  overflow: auto;
  color: var(--ink);
}
dialog::backdrop {
  background: #20181488;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.close {
  font-size: 25px;
  background: transparent;
  border: 0;
  color: var(--muted);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
}
.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--rust);
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 25px;
}
.warning {
  font-size: 13px;
  line-height: 1.6;
  color: #a33d22;
}
.detail-grid {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  font-size: 14px;
  margin: 24px 0;
}
.detail-grid dt {
  color: var(--muted);
}
.detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: white;
  padding: 15px 24px;
  border-radius: 5px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 225px minmax(0, 1fr);
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    padding: 18px;
  }
  .nav-label, .sidebar-bottom {
    display: none;
  }
  nav {
    display: flex;
    overflow-x: auto;
    margin-top: 20px;
  }
  nav a {
    flex: 0 0 auto;
    padding: 12px;
  }
  .topbar {
    padding: 16px 20px;
  }
  #todayLabel {
    display: none;
  }
  .workspace {
    padding: 26px 18px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .panel, .stat {
    padding: 18px;
  }
  .stats {
    gap: 12px;
  }
}
@media (max-width: 400px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
}

/* En-tête commun à la présentation du site public. */
.site-header {
  width: 100%;
  padding: 28px 5%;
  gap: 32px;
}

.site-brand {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  font: 32px / 1 Georgia, serif;
  letter-spacing: -1.5px;
  text-decoration: none;
  color: var(--ink);
}

.site-logo {
  display: block;
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  max-width: none;
  object-fit: contain;
  border-radius: 3px;
}

.site-brand-text {
  min-width: 0;
}

.site-brand .brand-activities {
  display: block;
  font: 12px / 1.7 Arial, sans-serif;
  letter-spacing: .06em;
  margin-top: 11px;
  max-width: 570px;
}

.sidebar-title {
  margin: 4px 12px 0;
  font: 25px / 1.2 Georgia, serif;
}

.app-shell {
  min-height: calc(100vh - 137px);
}

@media (max-width: 1000px) {
  .site-header {
    flex-wrap: wrap;
  }

  .site-header .header-meta {
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 22px 5%;
    gap: 16px;
  }

  .site-brand {
    font-size: 28px;
    gap: 12px;
    flex-basis: 100%;
  }

  .site-logo {
    flex-basis: 60px;
    width: 60px;
    height: 60px;
  }

  .site-brand .brand-activities {
    letter-spacing: .02em;
  }
}
