/* Nid Chaud: shared styles for the public site, the client portal and the owner's tools. */
:root {
  --navy: #002B5C;
  --navy-deep: #001F43;
  --amber: #E28714;
  --amber-dark: #B8690A;
  --ink: #2B2D2F;
  --muted: #555B63;
  --cream: #FAF8F2;
  --white: #FFFFFF;
  --line: #E3DED6;
  --line-strong: #C9C2B6;
  --ok-bg: #E4F1E8; --ok-fg: #2E6B45;
  --check-bg: #FBEBD0; --check-fg: #7A4700;
  --problem-bg: #F8DADA; --problem-fg: #8B1E1E;
  --na-bg: #ECEAE5; --na-fg: #555B63;
  --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --sans: 'Atkinson Hyperlegible', 'Helvetica Neue', Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(0, 43, 92, 0.08);
}

* { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); color: var(--ink); background: var(--cream);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: 2.3rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--amber-dark); }
img, svg, video { max-width: 100%; height: auto; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.35em; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* ---------- header / footer ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 64px; width: auto; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
.nav a { text-decoration: none; font-weight: 700; color: var(--ink); padding: 10px 2px; display: inline-block; }
.nav a[aria-current="page"] { color: var(--navy); border-bottom: 3px solid var(--amber); }
.nav .lang { font-weight: 400; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 10px; }
.nav a.btn-navy { color: var(--white); padding: 6px 14px; }
.nav a.btn-navy:hover { color: var(--white); }
.site-footer { background: var(--navy); color: #D6DEE8; margin-top: 64px; padding: 40px 0 32px; }
.site-footer a { color: var(--white); }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.site-footer img { height: 56px; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,0.18); margin-top: 28px; padding-top: 18px; font-size: 0.9rem; color: #B9C6D6; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px;
  border-radius: 10px; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; border: 2px solid transparent;
  font-family: var(--sans); line-height: 1.2;
}
.btn-primary { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.btn-primary:hover { background: #F09A2B; border-color: #F09A2B; color: var(--ink); }
.btn-navy { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-deep); color: var(--white); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-outline-light { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.btn-small { min-height: 40px; padding: 6px 14px; font-size: 0.95rem; }
.btn-danger { background: var(--problem-bg); color: var(--problem-fg); border-color: var(--problem-bg); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- hero ---------- */
.hero { background: var(--navy); color: var(--white); padding: 56px 0; }
.hero .container { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.hero h1 { color: var(--white); font-size: 2.6rem; margin-bottom: 0.4em; }
.hero p { font-size: 1.15rem; color: #D6DEE8; max-width: 36em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.price-card { background: var(--cream); color: var(--ink); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow); }
.price-card .big { font-family: var(--serif); font-size: 2.6rem; color: var(--navy); line-height: 1; margin: 6px 0; }
.price-card .big small { font-size: 1rem; font-family: var(--sans); color: var(--muted); }

/* ---------- sections ---------- */
.section { padding: 56px 0 8px; }
.section-head { max-width: 40em; margin-bottom: 28px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-top: 10px; }
.card .icon { width: 44px; height: 44px; color: var(--amber-dark); }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.step { background: var(--white); border-radius: var(--radius); padding: 24px 24px 24px 76px; position: relative; box-shadow: var(--shadow); }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 22px; top: 22px; width: 40px; height: 40px; border-radius: 50%; background: var(--amber); color: var(--ink); font-weight: 700; display: grid; place-items: center; font-size: 1.1rem; }
.notice { border-left: 6px solid var(--amber); background: var(--white); padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; }
.notice.plain { border-left-color: var(--navy); }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 8px 0 8px 34px; position: relative; border-bottom: 1px solid var(--line); }
.checklist li::before { content: ''; position: absolute; left: 4px; top: 15px; width: 16px; height: 16px; border-radius: 50%; background: var(--ok-bg); box-shadow: inset 0 0 0 2px var(--ok-fg); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.cta { background: var(--white); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; margin-top: 48px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.prices { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.prices th, table.prices td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.prices th { background: var(--navy); color: var(--white); font-weight: 700; }
table.prices td.num, table.prices th.num { text-align: right; white-space: nowrap; }
table.prices tr:last-child td { border-bottom: 0; }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: block; font-weight: 700; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--white); border: 2px solid var(--line-strong);
  border-radius: 10px; padding: 11px 14px; min-height: 48px;
}
input:focus, select:focus, textarea:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(226,135,20,0.35); }
textarea { min-height: 120px; resize: vertical; }
.hint { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }
.alert { padding: 14px 18px; border-radius: 10px; margin: 12px 0; }
.alert-ok { background: var(--ok-bg); color: var(--ok-fg); }
.alert-error { background: var(--problem-bg); color: var(--problem-fg); }
.hp { position: absolute; left: -9999px; }

/* ---------- status chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.chip svg { width: 16px; height: 16px; flex: 0 0 16px; }
.items li .chip, .rowlink .chip { flex-shrink: 0; }
.chip-ok { background: var(--ok-bg); color: var(--ok-fg); }
.chip-check { background: var(--check-bg); color: var(--check-fg); }
.chip-problem { background: var(--problem-bg); color: var(--problem-fg); }
.chip-na { background: var(--na-bg); color: var(--na-fg); }

/* ---------- app shells (portal + admin) ---------- */
.app-header { background: var(--white); border-bottom: 1px solid var(--line); }
.app-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; padding-top: 10px; padding-bottom: 10px; }
.app-header .brand img { height: 52px; }
.app-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.app-main { padding: 28px 0 60px; }
.panel { background: var(--white); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px; }
.panel h2 { font-size: 1.35rem; }
.login-box { max-width: 460px; margin: 40px auto; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { border-bottom: 1px solid var(--line); padding: 14px 0; }
.list li:last-child { border-bottom: 0; }
.list a.rowlink { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.list a.rowlink:hover .title { color: var(--amber-dark); }
.rowlink .title { font-weight: 700; color: var(--navy); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.media-grid a, .media-grid figure { margin: 0; display: block; border-radius: 10px; overflow: hidden; background: var(--line); aspect-ratio: 1; position: relative; }
.media-grid figure .btn { position: absolute; right: 6px; top: 6px; min-height: 36px; padding: 4px 10px; }
.media-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-list video { width: 100%; max-height: 420px; background: #000; border-radius: 10px; }
.items { list-style: none; padding: 0; margin: 0; }
.items li { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.items li .note { color: var(--muted); font-size: 0.95rem; margin-top: 4px; }
.status-group { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.status-group button { min-height: 40px; border-radius: 999px; border: 2px solid var(--line-strong); background: var(--white); padding: 4px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.status-group button[aria-pressed="true"].s-ok { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-fg); }
.status-group button[aria-pressed="true"].s-check { background: var(--check-bg); color: var(--check-fg); border-color: var(--check-fg); }
.status-group button[aria-pressed="true"].s-problem { background: var(--problem-bg); color: var(--problem-fg); border-color: var(--problem-fg); }
.status-group button[aria-pressed="true"].s-na { background: var(--na-bg); color: var(--na-fg); border-color: var(--na-fg); }
.check-group { border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 14px 10px; margin: 0 0 12px; }
.check-group legend { font-weight: 700; padding: 0 6px; color: var(--navy); }
.check-item { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 8px 0; cursor: pointer; }
.check-item input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; flex: 0 0 22px; accent-color: var(--navy); }
.progress { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 8px 0; }
.progress span { display: block; height: 100%; background: var(--amber); width: 0; transition: width 0.2s; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tabs button { min-height: 44px; border-radius: 10px; border: 2px solid var(--line-strong); background: var(--white); padding: 6px 16px; font: inherit; font-weight: 700; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.9); display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; object-fit: contain; }
.lightbox button { position: absolute; top: 16px; right: 16px; min-height: 48px; min-width: 48px; border-radius: 50%; border: 0; background: var(--white); font-size: 1.4rem; cursor: pointer; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.kv dt { font-weight: 700; color: var(--muted); }
.kv dd { margin: 0; }

@media (max-width: 760px) {
  html { font-size: 17px; }
  h1 { font-size: 1.9rem; }
  .hero { padding: 36px 0; }
  .hero .container { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .two-col, .form .row { grid-template-columns: 1fr; }
  .brand img { height: 52px; }
  .section { padding-top: 40px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
}
