* { box-sizing: border-box; }
body { font-family: Arial, sans-serif; margin: 0; background: #f6f7fb; color: #222; }
header { background: #1f2937; color: #fff; padding: 12px 20px; }
header a { color: #fff; text-decoration: none; margin-right: 12px; }
.header-bar { display: flex; align-items: center; gap: 12px; }
.site-title { flex: 1; text-align: center; font-size: 18px; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.burger { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 40px; height: 36px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 6px; background: transparent; color: #fff; cursor: pointer; padding: 0; }
.burger span { display: block; width: 20px; height: 2px; background: #fff; transition: transform 0.2s ease, opacity 0.2s ease; }
header .burger span:nth-child(1) { transform-origin: center; }
header .burger span:nth-child(2) { transform-origin: center; }
header .burger span:nth-child(3) { transform-origin: center; }
header .nav-toggle:checked + .header-bar .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
header .nav-toggle:checked + .header-bar .burger span:nth-child(2) { opacity: 0; }
header .nav-toggle:checked + .header-bar .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
header nav { display: flex; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.container { max-width: 1400px; margin: 20px auto; padding: 0 16px; }
.card { background: #fff; border-radius: 8px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); margin-bottom: 16px; }
.card h1 { margin-top: 0; margin-bottom: 20px; }
.btn { display: inline-block; background: #2563eb; color: #fff; padding: 10px 16px; border-radius: 6px; text-decoration: none; border: none; cursor: pointer; font-size: 16px; }
.btn:hover { background: #1d4ed8; }
.btn.secondary { background: #6b7280; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border: 1px solid #e5e7eb; padding: 8px; text-align: left; }
.badge { padding: 3px 8px; border-radius: 12px; font-size: 12px; }
.badge.locked { background: #fee2e2; color: #991b1b; }
.badge.unlocked { background: #dcfce7; color: #166534; }
.cell { min-height: 60px; padding: 6px; border-radius: 6px; }
.p-weekend-primary { background: #fecaca; }
.p-weekend-secondary { background: #fef9c3; }
.p-weekday-primary { background: #dbeafe; }
.p-weekday-secondary { background: #dcfce7; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.form-row > div { display: flex; flex-direction: column; }
.form-row > div label { margin-bottom: 6px; font-weight: 500; font-size: 14px; }
input[type="date"], input[type="text"], input[type="email"], input[type="password"], select { width: 100%; padding: 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
input[type="date"]:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.notice { padding: 12px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 6px; margin-bottom: 16px; }
.error { padding: 12px; background: #fee2e2; border: 1px solid #fecaca; border-radius: 6px; margin-bottom: 16px; color: #991b1b; }

/* Calendrier */
.calendar { width: 100%; }
.calendar-header { text-align: center; margin-bottom: 16px; }
.calendar-header h3 { margin: 0; font-size: 18px; }
.calendar-table { width: 100%; border-collapse: collapse; }
.calendar-table thead th { background: #1f2937; color: white; padding: 12px; text-align: center; font-size: 14px; }
.calendar-day { padding: 0; border: 1px solid #e5e7eb; height: 140px; vertical-align: top; position: relative; }
.day-cell { display: flex; flex-direction: column; height: 100%; padding: 8px; }
.day-cell.weekend { background: #fef9c3; }
.day-cell.weekday { background: #f9fafb; }
.day-number { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.day-content { flex: 1; overflow-y: auto; font-size: 12px; }
.empty { height: 100%; }

/* Cellules d'affectation */
.assignment { padding: 4px; margin: 2px 0; border-radius: 4px; font-size: 11px; }
.assignment.primary { background: #dbeafe; color: #0c4a6e; }
.assignment.secondary { background: #fef9c3; color: #713f12; }
.assignment-name { font-weight: 500; }
.assignment-type { font-size: 10px; opacity: 0.8; }

/* Badges de préférence */
.pref-badge { display: inline-block; padding: 2px 6px; border-radius: 3px; font-size: 10px; font-weight: 600; margin: 1px; }
.pref-badge.primary { background: #dbeafe; color: #0c4a6e; }
.pref-badge.secondary { background: #fef9c3; color: #713f12; }

/* Responsive */
@media (max-width: 640px) {
  .container { padding: 0 12px; }
  .card { padding: 16px; }
  .form-row { grid-template-columns: 1fr; gap: 12px; }
  .table { font-size: 14px; }
  .table th, .table td { padding: 6px; }
  .btn { padding: 8px 12px; font-size: 14px; }
  .calendar-day { height: 100px; }
  .calendar-table thead th { padding: 8px; font-size: 12px; }
  .day-number { font-size: 12px; }
  .day-content { font-size: 10px; }
  header { padding: 10px 14px; }
  .header-bar { justify-content: space-between; }
  .site-title { text-align: left; font-size: 16px; }
  .burger { display: inline-flex; }
  header nav { display: flex; flex-direction: column; align-items: flex-start; margin-top: 0; padding-top: 0; gap: 8px; max-height: 0; opacity: 0; overflow: hidden; transform: translateY(-6px); transition: max-height 0.25s ease, opacity 0.2s ease, transform 0.2s ease, padding-top 0.2s ease; }
  .nav-toggle:checked ~ nav { max-height: 320px; opacity: 1; transform: translateY(0); padding-top: 12px; }
  header nav a { margin-right: 0; }
}
