/**
 * MOH Places Portal — front-end styles.
 * Clean, high-contrast, data-first. Scoped under .mohp so it never fights the theme.
 */

.mohp {
	--bg: #ffffff;
	--surface: #f8fafc;
	--ink: #111827;
	--soft: #374151;
	--muted: #6b7280;
	--line: #e5e7eb;
	--accent: #2563eb;
	--radius: 10px;
	--shadow: 0 1px 2px rgba(16,24,40,.05), 0 10px 24px rgba(16,24,40,.06);

	color: var(--ink);
	max-width: 1240px;
	margin: 0 auto;
	padding: 8px 22px 72px;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}
.mohp *, .mohp *::before, .mohp *::after { box-sizing: border-box; }
.mohp--center { min-height: 64vh; display: flex; align-items: center; justify-content: center; }

/* Topbar -------------------------------------------------------------- */
.mohp-topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--line); }
.mohp-topbar__brand { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.mohp-topbar__actions { display: inline-flex; align-items: center; gap: 12px; }
.mohp-hi { color: var(--muted); font-size: 14px; }

/* Page head ----------------------------------------------------------- */
.mohp-head { padding: 30px 0 22px; }
.mohp-head__title { margin: 0 0 6px; font-size: clamp(26px, 3.5vw, 34px); font-weight: 800; letter-spacing: -.02em; }
.mohp-head__sub { margin: 0; color: var(--muted); font-size: 16px; }

/* Filters ------------------------------------------------------------- */
.mohp-filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.mohp-field { flex: 1 1 150px; display: flex; }
.mohp-field--search { flex: 2 1 240px; }
.mohp-field input, .mohp-field select {
	width: 100%; height: 44px; padding: 0 12px;
	border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
	font-size: 14.5px; color: var(--ink); font-family: inherit; appearance: none;
	transition: border-color .15s, box-shadow .15s;
}
.mohp-field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L2 4h8z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
.mohp-field input:focus, .mohp-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }

.mohp-meta { padding: 18px 2px 12px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }

/* Table --------------------------------------------------------------- */
.mohp-tablewrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.mohp-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.mohp-table thead th {
	text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
	color: var(--muted); background: var(--surface);
	padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.mohp-table th.mohp-num, .mohp-table td.mohp-num { text-align: right; }
.mohp-table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--soft); vertical-align: middle; }
.mohp-table tbody tr:last-child td { border-bottom: 0; }
.mohp-table tbody tr:hover { background: var(--surface); }
.mohp-table .mohp-villa { font-weight: 600; color: var(--ink); }
.mohp-table th.mohp-bookcol, .mohp-table td.mohp-bookcol { text-align: right; white-space: nowrap; }
.mohp-table td.mohp-bookcol .mohp-btn { height: 34px; padding: 0 16px; font-size: 13px; }
.mohp-dash { color: var(--muted); }

/* Status badges ------------------------------------------------------- */
.mohp-status { display: inline-flex; align-items: center; padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; line-height: 1.4; white-space: nowrap; border: 1px solid transparent; }
.mohp-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 8px; }
.mohp-status--confirme { background: #d1fadf; color: #05603a; border-color: #75e0a7; }
.mohp-status--option   { background: #fef0c7; color: #93370d; border-color: #fec84b; }
.mohp-status--nouveau  { background: #d1e9ff; color: #1849a9; border-color: #84caff; }
.mohp-status--travaux  { background: #fee4e2; color: #912018; border-color: #fda29b; }
.mohp-status--none, .mohp-status--annulation { background: #eaecf0; color: #344054; border-color: #d0d5dd; }

.mohp-empty { padding: 56px 0; text-align: center; color: var(--muted); font-size: 16px; }
.mohp-note { margin-top: 24px; padding: 12px 16px; border-radius: 8px; background: #fffaeb; border: 1px solid #fde9b5; color: #93600a; font-size: 13.5px; }
.mohp-is-loading { opacity: .5; pointer-events: none; transition: opacity .15s; }

/* Buttons ------------------------------------------------------------- */
.mohp .mohp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 8px; font-size: 14.5px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; font-family: inherit; appearance: none; -webkit-appearance: none; box-shadow: none; transition: background .15s, border-color .15s, color .15s; }
.mohp .mohp-btn--sm { height: 38px; padding: 0 14px; font-size: 13.5px; }
.mohp .mohp-btn--primary { background: #111827 !important; color: #ffffff !important; border-color: #111827 !important; }
.mohp .mohp-btn--primary:hover, .mohp .mohp-btn--primary:focus { background: #000000 !important; color: #ffffff !important; border-color: #000000 !important; }
.mohp .mohp-btn--ghost { background: #ffffff !important; border-color: var(--line) !important; color: #111827 !important; }
.mohp .mohp-btn--ghost:hover { border-color: #cbd2dc !important; color: #111827 !important; }
.mohp .mohp-btn--block { width: 100%; }

/* Auth, gate, landing ------------------------------------------------- */
.mohp-auth, .mohp-gate { width: 100%; max-width: 430px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 34px; }
.mohp-gate { text-align: center; }
.mohp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.mohp-dot--lg { width: 12px; height: 12px; }
.mohp-auth__head { text-align: center; margin-bottom: 22px; }
.mohp-auth__head h2, .mohp-gate h2 { margin: 12px 0 6px; font-size: 25px; font-weight: 800; letter-spacing: -.02em; }
.mohp-auth__head p, .mohp-gate p { margin: 0; color: var(--muted); }
.mohp-form { display: flex; flex-direction: column; gap: 15px; }
.mohp-label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--soft); }
.mohp-label input, .mohp-label textarea { padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 15px; font-family: inherit; color: var(--ink); }
.mohp-label input:focus, .mohp-label textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.mohp-hint { font-weight: 400; color: var(--muted); }
.mohp-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.mohp-gate__actions { display: flex; gap: 12px; justify-content: center; margin-top: 22px; }
.mohp-alert { padding: 11px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.mohp-alert--error { background: #fef3f2; border: 1px solid #fda29b; color: #b42318; }
.mohp-alert--ok { background: #ecfdf3; border: 1px solid #a6f4c5; color: #067647; }
.mohp-auth__foot { text-align: center; margin: 20px 0 0; color: var(--muted); font-size: 14px; }
.mohp-auth__foot a { color: #111827; font-weight: 700; text-decoration: underline; }

.mohp-landing { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; align-content: center; justify-content: center; min-height: calc(100vh - 160px); padding: 24px 0; }
.mohp-hero__eyebrow { margin: 0 0 12px; text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 700; color: var(--accent); }
.mohp-landing__title { font-size: clamp(32px, 5vw, 52px); line-height: 1.05; margin: 0 0 16px; font-weight: 800; letter-spacing: -.02em; }
.mohp-landing__lead { font-size: 18px; color: var(--muted); margin: 0 0 24px; }
.mohp-landing__points { list-style: none; margin: 0; padding: 0; }
.mohp-landing__points li { position: relative; padding: 8px 0 8px 26px; color: var(--soft); font-size: 15.5px; }
.mohp-landing__points li::before { content: "✓"; position: absolute; left: 0; top: 8px; color: var(--accent); font-weight: 700; }
.mohp-landing__panel { display: flex; justify-content: center; }

/* Hub (category chooser) ---------------------------------------------- */
.mohp-brandlink { color: inherit; text-decoration: none; }
.mohp-brandlink:hover { color: inherit; }
.mohp-hub { display: flex; flex-direction: column; }
.mohp-hub__body { display: flex; flex-direction: column; justify-content: center; }
@media (min-width: 821px) {
	.mohp-hub { min-height: calc(100vh - 150px); }
	.mohp-hub__body { flex: 1 1 auto; }
}
.mohp-hub__intro { padding: 0 0 28px; max-width: 720px; }
.mohp-hub__title { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.02em; margin: 8px 0 12px; }
.mohp-hub__lead { color: var(--muted); font-size: 17px; margin: 0; }
.mohp-hub__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding-bottom: 8px; }
.mohp-cat { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 28px; min-height: 200px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .18s, box-shadow .18s, border-color .18s; }
a.mohp-cat:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(16,24,40,.13); border-color: #cbd2dc; }
.mohp .mohp-cat, .mohp .mohp-cat:hover, .mohp .mohp-cat * { text-decoration: none !important; }
.mohp-cat__icon { font-size: 34px; line-height: 1; }
.mohp-cat__title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.mohp-cat__desc { margin: 0; color: var(--muted); font-size: 14.5px; flex: 1; }
.mohp-cat__cta { font-weight: 700; color: var(--accent); font-size: 14.5px; }
.mohp-cat__cta--muted { color: var(--muted); }
.mohp-cat--soon { opacity: .75; cursor: default; }
.mohp-cat__badge { position: absolute; top: 14px; right: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.mohp-pagebox { display: flex; justify-content: center; padding: 48px 0; }
@media (max-width: 820px) { .mohp-hub__grid { grid-template-columns: 1fr; } }

/* Responsive ---------------------------------------------------------- */
@media (max-width: 820px) {
	.mohp-landing { grid-template-columns: 1fr; gap: 32px; min-height: 0; }
	.mohp-tablewrap { border: 0; box-shadow: none; overflow: visible; }
	.mohp-table, .mohp-table tbody, .mohp-table tr, .mohp-table td { display: block; width: 100%; }
	.mohp-table thead { display: none; }
	.mohp-table tr { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; padding: 6px 14px; background: var(--bg); }
	.mohp-table tbody td { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line); text-align: right; }
	.mohp-table tbody tr:last-child td:last-child, .mohp-table tbody td:last-child { border-bottom: 0; }
	.mohp-table td.mohp-num { text-align: right; }
	.mohp-table tbody td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; text-align: left; }
	.mohp-table .mohp-villa { font-size: 16px; }
}
@media (max-width: 520px) {
	.mohp-field, .mohp-field--search { flex: 1 1 100%; }
}
