* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; background: #f7f7fb; color: #222; }
.container { max-width: 1100px; margin: 0 auto; padding: 16px; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #1f2937; color: white; }
.topbar .brand { font-weight: 700; }
.topbar .spacer { flex: 1; }
.link { color: #60a5fa; text-decoration: none; margin-left: 12px; }
.nav .active { text-decoration: underline; color: #93c5fd; }

.card { background: white; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.auth-container { display: grid; place-items: center; height: 100vh; gap: 16px; }
.auth-container form { width: 320px; display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 14px; }
input { padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
button { padding: 10px 14px; border: none; background: #2563eb; color: white; border-radius: 6px; cursor: pointer; }
button:hover { background: #1d4ed8; }
.hint { color: #6b7280; font-size: 12px; }
.error { color: #dc2626; }

.menu-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

.plan-container { display: flex; flex-direction: column; gap: 16px; max-width: none; margin-left: 0; margin-right: 0; width: 100%; }
.page-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.plan h2 { margin-top: 0; }
.seat-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; background: #111827; padding: 12px; border-radius: 8px; width: max-content; min-width: 100%; box-sizing: border-box; }
.seat { display: grid; place-items: center; padding: 12px 0; border-radius: 6px; font-weight: 600; color: white; cursor: pointer; user-select: none; }
.seat { height: 40px; }
.seat { height: 32px; font-size: 13px; }
.seat { height: 28px; font-size: 13px; }

/* Ensure perfect vertical centering */
.seat { padding: 0; }

.seat.available { background: #6b7280; }
.seat.paid     { background: #10b981; cursor: not-allowed; }
.seat.unpaid   { background: #ef4444; cursor: not-allowed; }
.seat.gratuit  { background: #38bdf8; cursor: not-allowed; }
.seat.reserved { background: #ef4444; cursor: not-allowed; }
.seat-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; align-items: center; margin: 4px 0 8px; }
.seat-legend-item { display: flex; align-items: center; gap: 5px; }
.seat-legend-dot { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }
.seat.selected { outline: 2px solid #fde68a; }
.seat.focused { outline: 3px solid #fbbf24; box-shadow: 0 0 0 2px rgba(251,191,36,0.25); }
.seat.related { outline: 2px dashed rgba(251,191,36,0.6); }
.seat.sono { color: #e5e7eb; font-weight: 700; }
.seat.empty { background: rgba(255,255,255,0.06); cursor: default; }
.sidebar { display: grid; gap: 16px; }
.details { font-size: 14px; line-height: 1.4; }
.table { width: 100%; border-collapse: collapse; background: white; }
.table th, .table td { border: 1px solid #e5e7eb; padding: 8px 10px; text-align: left; }
.table th { background: #f3f4f6; }

.form-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 12px; }
@media (max-width: 720px) {
	.form-details-grid { grid-template-columns: 1fr; }
}

/* Responsive width for form + info */
.form-details-grid { width: 100%; }

.tabs { display: flex; gap: 8px; margin: 8px 0; }
.tab { padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 6px; background: #f3f4f6; color: #374151; cursor: pointer; }
.tab:hover { background: #e5e7eb; }
.tab.active { background: #2563eb; color: white; border-color: #2563eb; }

/* Reservation form */
#reservation-form { display: grid; gap: 14px; }
#reservation-form label { gap: 4px; color: #374151; }
#reservation-form input,
#reservation-form select,
#reservation-form textarea { padding: 9px 11px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; background: white; font-family: inherit; }
#reservation-form input:focus,
#reservation-form select:focus,
#reservation-form textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
#reservation-form .selected-seats { padding: 10px 12px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 13px; color: #4b5563; }
#reservation-form .selected-seats #selected-list { color: #111827; font-weight: 600; }
#reservation-form .form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#reservation-form #tarif-section:empty { display: none; }
#reservation-form .tarif-list { display: grid; gap: 10px; }
#reservation-form .tarif-row { display: grid; grid-template-columns: minmax(96px, 1.2fr) repeat(3, minmax(54px, 1fr)); gap: 8px; align-items: end; padding: 10px 12px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; min-width: 0; }
#reservation-form .tarif-row .tarif-label { font-size: 13px; font-weight: 600; color: #111827; line-height: 1.3; min-width: 0; }
#reservation-form .tarif-row .tarif-label .hint { display: block; font-weight: 400; }
#reservation-form .tarif-row label { font-size: 12px; color: #6b7280; min-width: 0; }
#reservation-form .tarif-row input[type="number"] { padding: 7px 9px; font-size: 14px; width: 100%; min-width: 0; }
#reservation-form .price-total { margin: 0; font-size: 14px; color: #374151; display: flex; justify-content: space-between; align-items: baseline; padding-top: 4px; border-top: 1px dashed #e5e7eb; }
#reservation-form .price-total #price-total { font-size: 18px; font-weight: 700; color: #111827; }
#reservation-form .form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#reservation-form .form-actions button { padding: 10px 16px; }
#reservation-form .form-actions .secondary { background: #6b7280; }
#reservation-form .form-actions .secondary:hover { background: #4b5563; }
#reservation-form #form-message { margin: 0; }
