:root { color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; background: #f5f6f8; color: #1d2433; }
.container { width: min(1100px, 94%); margin: 0 auto; }
.card { background: #fff; border-radius: 18px; padding: 22px; box-shadow: 0 8px 24px rgba(0,0,0,.07); }
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: min(460px, 100%); }
.brand { text-align: center; margin-bottom: 20px; }
.brand h1 { margin: 0 0 8px; font-size: 28px; }
.brand p { margin: 0; color: #667085; }
label { display: block; font-weight: 700; margin: 14px 0 7px; }
input, select { width: 100%; border: 1px solid #d0d5dd; border-radius: 12px; padding: 14px; font-size: 17px; background: #fff; }
button, .btn { display: inline-block; border: 0; border-radius: 12px; padding: 14px 18px; font-size: 17px; font-weight: 800; cursor: pointer; text-decoration: none; text-align: center; }
.btn-primary, button { background: #1f6feb; color: #fff; }
.btn-danger { background: #b42318; color: #fff; }
.w-100 { width: 100%; }
.alert { border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.alert-error { background: #fee4e2; color: #912018; }
.alert-ok { background: #dcfae6; color: #05603a; }
.topbar { background: #fff; border-bottom: 1px solid #e4e7ec; padding: 14px 0; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 16px; }
.tile { min-height: 145px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; font-size: 20px; font-weight: 800; }
.tile .icon { font-size: 42px; margin-bottom: 8px; }
main { padding: 24px 0 50px; }
.small { color: #667085; font-size: 14px; }
@media (max-width: 600px) {
  .topbar .container { align-items: flex-start; }
  .tile { min-height: 130px; }
}

/* Cartes du tableau de bord entièrement cliquables */
.tile-link {
  color: #1d2433;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.tile-link:hover,
.tile-link:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0,0,0,.12);
  border-color: #1f6feb;
  outline: none;
}
.tile-link:active { transform: translateY(0) scale(.99); }
.tile-action {
  margin-top: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #eef4ff;
  color: #175cd3;
  font-size: 14px;
  font-weight: 800;
}
.btn-secondary { background: #e4e7ec; color: #1d2433; }
.module-placeholder { max-width: 720px; margin: 30px auto; text-align: center; }
.module-icon { font-size: 64px; }
.module-placeholder h1 { margin-bottom: 10px; }
.module-placeholder p { color: #667085; font-size: 18px; }

@media (hover: none) {
  .tile-link:hover { transform: none; }
}

/* Module Gestionnaires */
.page-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; }
.page-head h1 { margin-bottom:4px; }
.manager-form { display:grid; gap:20px; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.form-grid .full { grid-column:1/-1; }
.photo-picker { display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.photo-preview, .manager-photo { width:120px; height:120px; border-radius:50%; overflow:hidden; background:#f2f4f7; display:grid; place-items:center; font-size:52px; flex:0 0 auto; }
.photo-preview img, .manager-photo img { width:100%; height:100%; object-fit:cover; }
.file-btn input { display:none; }
.manager-list-section { margin-top:28px; }
.manager-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:16px; }
.manager-card { display:grid; gap:16px; position:relative; }
.manager-card.is-disabled { opacity:.68; }
.manager-photo { margin:0 auto; }
.manager-info { text-align:center; }
.manager-info h3 { margin:0 0 6px; font-size:22px; }
.manager-type { font-weight:800; margin-bottom:6px; }
.status { display:inline-block; margin-top:10px; padding:6px 10px; border-radius:999px; font-weight:800; font-size:13px; }
.status-on { background:#dcfae6; color:#05603a; }
.status-off { background:#fee4e2; color:#912018; }
.manager-actions { display:grid; gap:10px; }
.inline-row { display:grid; grid-template-columns:1fr auto; gap:8px; }
.inline-form label { margin-top:0; }
.btn-warning { background:#f79009; color:#fff; }
.btn-success { background:#12b76a; color:#fff; }
details { background:#f9fafb; border-radius:12px; padding:10px 12px; }
summary { cursor:pointer; font-weight:800; }
.password-form { display:grid; gap:8px; margin-top:10px; }
.empty-state { text-align:center; color:#667085; }
@media (max-width:700px) {
  .page-head { align-items:stretch; flex-direction:column; }
  .form-grid { grid-template-columns:1fr; }
  .form-grid .full { grid-column:auto; }
  .photo-picker { justify-content:center; text-align:center; }
  .photo-picker .file-btn { width:100%; }
}
