/*
 * ATHOM — Inspection application / visual theme, September 2026.
 * Brand reference: https://www.athommodulaire.com/
 * Presentation only. Existing scripts, form controls and state classes are retained.
 * Loaded after the legacy styles; no changes to question visibility or progress values.
 */

@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/work-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/work-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/work-sans-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("../fonts/work-sans-latin-900-normal.woff2") format("woff2");
}

:root {
  --athom-ink: #282828;
  --athom-gray: #5c5557;
  --athom-red: #cf2e2e;
  --athom-red-hover: #af2424;
  --athom-canvas: #f3f2f2;
  --athom-line: #dedbdc;
  --athom-soft: #f8f7f7;
  --athom-muted: #696366;
  --athom-font: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: var(--athom-canvas);
  --panel: #fff;
  --text: var(--athom-ink);
  --muted: var(--athom-muted);
  --accent: var(--athom-ink);
  --danger: var(--athom-red);
  --touch-min: 44px;
}

body.athom-theme {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  background: var(--athom-canvas);
  color: var(--athom-ink);
  font-family: var(--athom-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

/* Replace the old full-screen photo behind working screens. */
body.athom-theme::before { content: none; }
.athom-theme *, .athom-theme *::before, .athom-theme *::after { box-sizing: border-box; }
.athom-theme a { color: var(--athom-ink); text-underline-offset: 4px; }
.athom-theme a:hover { color: var(--athom-red); }
.athom-theme button, .athom-theme input, .athom-theme select, .athom-theme textarea { font-family: inherit; }
.athom-theme img { max-width: 100%; }
.athom-theme :focus-visible { outline: 3px solid var(--athom-red); outline-offset: 3px; }

.athom-theme .container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px 40px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.athom-theme .card {
  min-width: 0;
  margin-top: 20px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--athom-line);
  border-radius: 3px;
  box-shadow: 0 4px 18px rgba(40, 40, 40, .035);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  -webkit-overflow-scrolling: touch;
}
.athom-theme .header, .athom-theme .table, .athom-theme .meta {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.athom-theme .header { gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.athom-theme h1, .athom-theme h2, .athom-theme h3 { color: var(--athom-ink); }
.athom-theme h1, .athom-theme .page-title {
  margin: 0 0 24px;
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.athom-theme h2 { font-size: 26px; font-weight: 700; line-height: 1.2; }
.athom-theme h3 { font-size: 20px; font-weight: 700; line-height: 1.3; margin: 28px 0 16px; }
.athom-theme .page-title small, .athom-theme .page-title > .small {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 400 !important;
  letter-spacing: 0;
  line-height: 1.5;
  opacity: 1 !important;
  color: var(--athom-muted);
}
.athom-theme .small, .athom-theme .hint, .athom-theme .meta, .athom-theme .text-muted {
  color: var(--athom-muted);
  font-size: 13px;
  line-height: 1.55;
}
.athom-theme .meta code { font-family: inherit; color: var(--athom-ink); font-weight: 500; }
.athom-theme .hint { margin: 4px 0; }
.athom-theme .athom-page-intro { margin: 0 0 28px; border-left: 4px solid var(--athom-red); padding-left: 20px; }
.athom-theme .athom-page-intro h1 { margin: 4px 0 0; text-transform: uppercase; }
.athom-theme .athom-eyebrow { margin: 0; color: var(--athom-gray); font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }

/* White masthead, dark navigation, restrained brand-red primary action. */
.athom-theme .topbar {
  z-index: 100;
  border: 0;
  border-bottom: 1px solid var(--athom-line);
  border-radius: 0;
  background: #fff !important;
  box-shadow: 0 2px 12px rgba(40,40,40,.035);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.athom-theme .topbar .header.container {
  min-height: 88px;
  padding: 18px 40px;
  margin: 0 auto;
  gap: 20px !important;
}
.athom-theme .topbar .header > div:first-child { min-width: 0; flex: 1 1 400px; gap: 24px !important; flex-wrap: wrap; }
.athom-theme .brand-logo { flex: 0 0 auto; padding-right: 24px; border-right: 1px solid var(--athom-line); }
.athom-theme .brand-logo img { display: block; height: 43px !important; width: auto; max-width: 150px; object-fit: contain; }
.athom-theme .topbar .search { flex: 1 1 210px; min-width: 0; max-width: 320px; margin: 0; }
.athom-theme .topbar .search input[type="text"] {
  width: 100%;
  min-width: 0;
  height: 44px;
  background: var(--athom-soft);
  border-color: var(--athom-line);
  padding: 10px 12px;
  font-size: 14px;
}
.athom-theme .topbar .actions { flex: 0 0 auto; flex-wrap: wrap; gap: 8px !important; }

.athom-theme :is(.btn, .btn2, .btn-new, .btn-control, .btn-logout, .btn-send, .btn-photo, .btn-primary, .btn-yellow, .btn-retour, .btn-retour2, .dashboard-return),
.athom-theme button:where(:not(.pv-toggle-completed)) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  width: auto;
  height: auto;
  max-width: 100%;
  margin-left: 0;
  padding: 11px 18px;
  border: 1px solid var(--athom-line);
  border-radius: 3px;
  background: #fff;
  color: var(--athom-ink);
  font-family: var(--athom-font);
  font-size: 13px;
  font-weight: 700 !important;
  line-height: 1.35;
  letter-spacing: .035em;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .15s, border-color .15s, color .15s;
}
.athom-theme :is(.btn, .btn2, .btn-new, .btn-control, .btn-logout, .btn-send, .btn-photo, .btn-primary, .btn-yellow, .btn-retour, .btn-retour2, .dashboard-return):hover,
.athom-theme button:where(:not(.pv-toggle-completed)):hover {
  border-color: var(--athom-gray);
  background: var(--athom-soft);
  color: var(--athom-ink);
  text-decoration: none;
  filter: none;
}
.athom-theme :is(.btn-new, .btn-primary, .btn.primary) {
  background: var(--athom-red);
  border-color: var(--athom-red);
  color: #fff;
}
.athom-theme :is(.btn-new, .btn-primary, .btn.primary):hover {
  background: var(--athom-red-hover);
  border-color: var(--athom-red-hover);
  color: #fff;
}
.athom-theme :is(.btn-send, .btn-update, .btn-control) {
  background: var(--athom-ink);
  border-color: var(--athom-ink);
  color: #fff;
}
.athom-theme :is(.btn-send, .btn-update, .btn-control):hover { background: var(--athom-gray); border-color: var(--athom-gray); color: #fff; }
.athom-theme :is(.btn-delete, .btn-delete2, .btn.danger) { background: #fff; color: #b42323; border: 1px solid #eac3c3; }
.athom-theme :is(.btn-delete, .btn-delete2, .btn.danger):hover { background: #fff2f2; color: #a51f1f; border-color: #b42323; }
.athom-theme .topbar .btn-logout { background: #fff; border-color: var(--athom-line); color: var(--athom-gray) !important; }
.athom-theme .topbar .btn-logout:hover { border-color: var(--athom-gray); background: var(--athom-soft); }
.athom-theme :is(.btn-retour, .btn-retour2) { position: static; border-color: transparent; background: transparent; font-size: 11px; color: var(--athom-gray); }
.athom-theme a.btn-new[href$="dashboard.php"] { background: #fff; border-color: var(--athom-line); color: var(--athom-ink); }
.athom-theme button:disabled, .athom-theme input:disabled, .athom-theme select:disabled { opacity: .6; cursor: not-allowed; }

/* Inputs retain their native controls and all existing names / values. */
.athom-theme input[type="hidden"] { display: none; }
.athom-theme label { margin: 12px 0 8px; color: var(--athom-ink); font-size: 14px; font-weight: 500; }
.athom-theme input:where(:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="submit"]):not([type="button"])),
.athom-theme select, .athom-theme textarea {
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #c9c4c6;
  border-radius: 3px;
  background: #fff;
  color: var(--athom-ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  box-shadow: none;
}
.athom-theme textarea { min-height: 128px; resize: vertical; }
.athom-theme input::placeholder, .athom-theme textarea::placeholder { color: #81797d; opacity: 1; }
.athom-theme input:focus, .athom-theme select:focus, .athom-theme textarea:focus { border-color: var(--athom-gray); }
.athom-theme input[type="radio"], .athom-theme input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  flex: 0 0 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--athom-ink);
}
.athom-theme input[type="file"] { width: 100%; font-size: 16px; padding: 12px; border: 1px dashed #c9c4c6; background: var(--athom-soft); border-radius: 3px; }
.athom-theme input[type="file"]::file-selector-button { margin-right: 12px; padding: 10px 14px; background: #fff; border: 1px solid var(--athom-line); border-radius: 3px; font: inherit; }
.athom-theme .grid { gap: 12px; }
.athom-theme .grid > label { margin-bottom: -4px; }
.athom-theme .grid > label:not(:first-child) { margin-top: 12px; }

/* Tables: space for real project names, readable status and grouped actions. */
.athom-theme .table, .athom-theme .table-mini { width: 100%; border-collapse: collapse; font-size: 14px; }
.athom-theme .table th, .athom-theme .table-mini th {
  padding: 15px 16px;
  background: var(--athom-soft);
  border-bottom: 1px solid var(--athom-line);
  color: var(--athom-gray);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  line-height: 1.5;
  text-align: left;
  text-transform: uppercase;
}
.athom-theme .table td, .athom-theme .table-mini td { padding: 20px 16px; border-bottom: 1px solid #ebe8e9; color: var(--athom-ink); vertical-align: middle; text-align: left; }
.athom-theme .table tbody tr:last-child td, .athom-theme .table-mini tbody tr:last-child td { border-bottom: 0; }
.athom-theme .table tbody tr:hover { background: #fbfafa; }
.athom-theme .table th a { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; color: inherit; }
.athom-theme .sort-badge { padding: 2px 5px; border: 1px solid var(--athom-line); border-radius: 2px; background: #fff; color: var(--athom-gray); font-size: 9px; font-weight: 500; letter-spacing: 0; white-space: nowrap; }
.athom-theme .btn-proj { display: inline-flex; align-items: center; min-height: 44px; min-width: 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--athom-ink); font-size: 20px; font-weight: 700; white-space: normal; overflow-wrap: anywhere; }
.athom-theme .btn-proj:hover { color: var(--athom-red); background: none; }
.athom-theme .proj-cell { min-width: 0; gap: 12px; }
.athom-theme .progress-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.athom-theme .progress-wrap { width: 160px; min-width: 0; max-width: 100%; height: 6px; border: 0; border-radius: 2px; background: #e9e6e7; }
.athom-theme .progress-fill { height: 100%; border: 0; border-radius: 2px; }
.athom-theme .progress-num { min-width: 0; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.athom-theme .status-complete { color: #21683e; font-size: 12px; }
.athom-theme .actions { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
.athom-theme .actions form { display: flex; align-items: center; flex-wrap: nowrap; min-width: 0; max-width: 100%; gap: 8px; margin: 0; }
.athom-theme .actions input[type="email"] { width: 185px !important; min-width: 0; height: 44px; min-height: 44px; padding: 10px 12px; font-size: 13px; }
.athom-theme .table td.actions-cell, .athom-theme .table th.actions-cell { width: auto; white-space: normal; text-align: left; }
.athom-theme .table .actions-cell .btn, .athom-theme .table .actions-cell .btn-yellow { padding: 10px 12px; font-size: 12px; }
.athom-theme #toggle-completed { min-height: 44px; margin: 0; padding: 10px 12px; background: var(--athom-soft); border: 1px solid var(--athom-line); border-radius: 3px; color: var(--athom-gray) !important; font-family: inherit; font-size: 11px; font-weight: 500; line-height: 1.4; }
.athom-theme #toggle-completed:hover { background: #eae7e8; border-color: var(--athom-gray); text-decoration: none; }
.athom-theme #toggle-completed:focus-visible { outline: 3px solid var(--athom-red); outline-offset: 3px; }
.athom-page-dashboard .topbar .header > div:first-child { flex-basis: 580px; }
.athom-page-dashboard .topbar .header.container { flex-wrap: wrap; }
.athom-page-dashboard > .container > .card { padding: 8px 12px; }
.athom-page-dashboard .table th:first-child { width: 16%; }
.athom-page-dashboard .table th:nth-child(2) { width: 15%; }
.athom-page-dashboard .table th:nth-child(3) { width: 23%; }
.athom-page-dashboard .table .progress-cell { min-width: 200px; }

/* Neutral status labels; semantic conformity colors remain distinct. */
.athom-theme :is(.badge, .badge-role, .conf-ok, .conf-bad) { padding: 6px 9px; border-radius: 3px; font-family: inherit; font-size: 12px; font-weight: 500; line-height: 1.35; letter-spacing: 0; }
.athom-theme :is(.badge-info, .badge-warn, .badge-saved, .badge-role) { border: 1px solid var(--athom-line); background: var(--athom-soft); color: var(--athom-gray); }
.athom-theme :is(.badge-ok, .badge.ok) { border: 1px solid #c8e5d1; background: #edf7f0; color: #24633b; }
.athom-theme :is(.badge.danger, .err, .alert-danger) { border: 1px solid #efc7c7; background: #fff1f1; color: #a82525; }
.athom-theme :is(.badge.warning, .badge.warn, .alert-warning) { border: 1px solid #e7d8ae; background: #fffaeb; color: #7c5e16; }
.athom-theme .conf-ok { background: #5cd987; border: 1px solid #3bab65; color: #133821; }
.athom-theme .conf-bad { background: #fde9e7; border: 1px solid #e8a9a3; color: #a6261a; }
.athom-theme :is(.err, .alert) { padding: 14px 16px; border-radius: 3px; font-size: 14px; }
.athom-page-project_view .card > .header { padding-bottom: 24px; border-bottom: 1px solid var(--athom-line); }
.athom-page-project_view .card > .body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.athom-page-project_view .table { min-width: 900px; }
.athom-page-project_view .table th.actions { display: table-cell; text-align: right; }
.athom-page-project_view .actions2 { min-width: 190px; }
.athom-page-project_view .table td.actions2 { white-space: normal; }
.athom-page-project_view .actions2 :is(.btn, .btn2) { margin: 3px 0 3px 4px; padding: 10px 12px; font-size: 11px; }
.athom-page-project_view .actions2 .btn { background: var(--athom-ink); border-color: var(--athom-ink); color: #fff; }
.athom-page-project_view .actions2 .btn:hover { background: var(--athom-gray); }

/* Inspection layout — do not set display on .form-row; branching owns it. */
.athom-page-inspection > .container { max-width: 1120px; }
.athom-page-inspection > .container > div:first-child { flex-wrap: wrap; align-items: flex-start !important; gap: 20px !important; }
.athom-page-inspection form.card { padding: 0; overflow: visible; }
.athom-page-inspection .form-row { margin: 0; padding: 28px 32px; border-bottom: 1px solid #e9e6e7; }
.athom-page-inspection .q-label { margin: 0 0 16px !important; font-size: 16px; line-height: 1.6; }
.athom-page-inspection .q-label strong { font-weight: 700; }
.athom-page-inspection .answer-inline { max-width: 100%; }
.athom-page-inspection .answer-inline > :is(input[type="text"], select) { width: 100%; min-width: 0; }
.athom-page-inspection .radio-group label { min-height: 44px; margin: 0; padding: 10px 14px; border: 1px solid var(--athom-line); border-radius: 3px; background: #fff; font-weight: 400; }
.athom-page-inspection .radio-group label:has(input:checked) { border-color: var(--athom-gray); background: #f2f0f1; }
.athom-page-inspection .q-photo-wrap { margin-top: 16px !important; }
.athom-page-inspection .q-photo-actions { gap: 12px !important; }
.athom-page-inspection .comment-input { min-width: 180px; max-width: none; flex: 1 1 240px; }
.athom-page-inspection .btn-photo { min-height: 44px; background: var(--athom-soft); color: var(--athom-gray); border: 1px dashed #b9b2b5; font-size: 11px; }
.athom-page-inspection .q-photo-list { gap: 12px !important; }
.athom-page-inspection .q-photo-list img { width: 160px; height: 160px; border: 1px solid var(--athom-line); border-radius: 3px; }
.athom-page-inspection .req-hint { color: #ad2727; font-size: 12px; line-height: 1.5; }
.athom-page-inspection .form-actions { margin: 0 !important; padding: 24px 32px; gap: 14px !important; background: var(--athom-soft); border-radius: 0 0 3px 3px; }
.athom-page-inspection .form-actions > span { color: var(--athom-muted); font-size: 13px; }
.athom-page-inspection #send_cc_select { width: auto; min-width: 240px !important; flex: 1 1 240px; min-height: 150px; padding: 8px; }
.athom-page-inspection #send_cc_select option { padding: 5px 8px; }
/* Higher specificity preserves the existing C/NC visual state over white inputs. */
.athom-theme select[name^="q["].is-conform,
.athom-theme input[type="text"][name^="q["].is-conform { background: #dcfce7; border-color: #69ae7e; color: #17412a; }
.athom-theme select[name^="q["].is-nonconform,
.athom-theme input[type="text"][name^="q["].is-nonconform { background: #fff0ed; border-color: #cf2e2e; color: #9b211b; }
.athom-theme .radio-group.is-conform label { background: #dcfce7; color: #17412a; border-color: #69ae7e; }
.athom-theme .radio-group.is-nonconform label { background: #fff0ed; color: #9b211b; border-color: #cf2e2e; }

/* Report remains the same content and links, with a calmer reading rhythm. */
.athom-page-report > .container { max-width: 1160px; }
.athom-page-report .repo-question { padding: 22px 0; line-height: 1.65; }
.athom-page-report .repo-question:first-child { padding-top: 0; }
.athom-page-report .divider { margin: 0; height: 1px; background: var(--athom-line); border: 0; }
.athom-page-report .repo-photos { gap: 12px !important; }
.athom-page-report .repo-photos img { max-width: 100%; border: 1px solid var(--athom-line); border-radius: 3px; }
.athom-page-report .table-mini { min-width: 600px; }

/* Administrative screens share the same field and table treatment. */
.athom-page-new_project > .container { max-width: 960px; }
.athom-page-new_project .card { padding: 32px; }
.athom-page-project_new > .container, .athom-page-account_password > .container { max-width: 900px; }
.athom-page-control .user-add-form { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr 1fr auto; gap: 12px; padding: 20px; margin: 0 0 32px; background: var(--athom-soft); border: 1px solid var(--athom-line); border-radius: 3px; }
.athom-page-control .user-add-form > :is(input, select) { min-width: 0; width: 100%; }
.athom-page-control .table { min-width: 900px; }
.athom-page-control .user-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.athom-page-control .user-actions form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.athom-page-control .user-actions input:not([type="hidden"]), .athom-page-control .user-actions select { width: 130px; min-width: 0; min-height: 44px; height: auto; font-size: 14px; }
.athom-page-template_import .uploader { gap: 12px; }
.athom-page-template_import pre { padding: 16px; border: 1px solid var(--athom-line); background: var(--athom-soft); color: var(--athom-gray); }

/* Existing photo export mosaic / checkboxes are unchanged in behavior. */
.athom-theme .dashboard-return-bar { padding: 16px 40px; background: #fff; border-bottom: 1px solid var(--athom-line); box-shadow: none; }
.athom-theme .dashboard-return { background: #fff; border-color: var(--athom-line); color: var(--athom-gray); }
.athom-theme .photo-export { max-width: 1440px; padding: 36px 40px; }
.athom-theme .photo-export-heading { gap: 20px; margin-bottom: 28px; }
.athom-theme .photo-export-heading h3 { margin: 0 0 8px; font-size: 32px; font-weight: 900; letter-spacing: -.03em; }
.athom-theme .photo-export-heading .badge { border: 1px solid var(--athom-line); background: #fff; padding: 9px 14px; }
.athom-theme .photo-export-actions { padding: 16px; background: #fff; border: 1px solid var(--athom-line); border-radius: 3px; }
.athom-theme .photo-export-actions button[type="submit"] { background: var(--athom-ink); color: #fff; border-color: var(--athom-ink); }
.athom-theme .photo-tile { margin-top: 0; border: 1px solid var(--athom-line); border-radius: 3px; color: var(--athom-ink); }
.athom-theme .photo-tile:has(input:checked) { border-color: var(--athom-gray); box-shadow: 0 0 0 1px var(--athom-gray); }
.athom-theme .photo-tile:focus-within { outline-color: var(--athom-red); }
.athom-theme .photo-tile input { width: 22px; height: 22px; accent-color: var(--athom-ink); }
.athom-theme .photo-tile-info { padding: 14px; }
.athom-theme .photo-tile-meta { color: var(--athom-muted); font-size: 11px; }

/* Login: the existing photograph becomes a quiet architectural backdrop. */
body.athom-page-index { display: flex; align-items: center; padding: 48px 24px; background: var(--athom-ink); }
body.athom-page-index::before { content: ""; z-index: 0; position: fixed; inset: 0; background: linear-gradient(90deg, rgba(40,40,40,.3), rgba(40,40,40,.88)), url("../athom.jpg") center / cover no-repeat; filter: grayscale(1); pointer-events: none; }
.athom-page-index .container-auth { position: relative; width: 100%; max-width: 480px; margin: 0 10% 0 auto; }
.athom-page-index .card.auth { padding: 44px 40px 26px; margin: 0; border: 0; border-top: 4px solid var(--athom-red); border-radius: 3px; background: #fff; box-shadow: 0 24px 72px rgba(0,0,0,.22); }
.athom-page-index .auth-header { align-items: flex-start; text-align: left; gap: 10px; margin: 0 0 32px; }
.athom-page-index .auth-logo { width: 148px; height: auto; margin: 0 0 20px; }
.athom-page-index .auth-title { font-size: 24px; line-height: 1.2; font-weight: 900; letter-spacing: -.025em; color: var(--athom-ink); }
.athom-page-index .auth-sub { font-size: 13px; line-height: 1.55; color: var(--athom-muted); }
.athom-page-index .form { margin: 0 0 28px; gap: 18px; }
.athom-page-index .form label { margin: 0 0 8px; color: var(--athom-gray); font-size: 13px; font-weight: 500; }
.athom-page-index .form :is(input[type="text"], input[type="password"]) { height: 50px; border-color: #c9c4c6; border-radius: 3px; }
.athom-page-index .btn-primary { width: 100%; min-height: 50px; margin-top: 6px; font-size: 13px; text-transform: uppercase; }
.athom-page-index .card.auth > div:not(.auth-header):not(.err) { color: var(--athom-muted); font-size: 10px; line-height: 1.65; }
.athom-page-index .card.auth > div:not(.auth-header):not(.err) > div { padding: 6px 0 !important; }
.athom-page-index .err { margin: 0 0 20px; }

.athom-theme > .container > div[style*="justify-content: space-between"][style*="font-size: 14px"] { flex-wrap: wrap; gap: 12px; padding: 24px 0 !important; color: var(--athom-muted); font-size: 11px !important; }
.athom-page-project_send { padding: 40px; }
.athom-page-project_send > div { max-width: 880px; margin: 0 auto 16px; }

@media (max-width: 1180px) {
  .athom-theme .container, .athom-theme .photo-export { padding: 28px 24px; }
  .athom-theme .topbar .header.container { padding: 16px 24px; }
  .athom-theme .topbar .header > div:first-child { flex-basis: 340px; gap: 16px !important; }
  .athom-page-dashboard .topbar .header > div:first-child { flex-basis: 100%; }
  .athom-page-dashboard .topbar .search { max-width: none; }
  .athom-page-dashboard .topbar .actions { margin-left: auto; }
  .athom-theme .table :is(th, td) { padding: 16px 12px; }
  .athom-page-dashboard .table .progress-cell { min-width: 140px; }
  .athom-theme .progress-wrap { width: 130px; }
  .athom-theme .actions input[type="email"] { width: 168px !important; }
  .athom-page-control .user-add-form { grid-template-columns: 1fr 1fr; }
  .athom-page-control .user-add-form button { justify-self: start; }
}

@media (max-width: 800px) {
  .athom-theme .container, .athom-theme .photo-export { padding: 24px 20px; }
  .athom-theme .topbar .header.container { padding: 16px 20px; gap: 12px !important; }
  .athom-theme .topbar .header > div:first-child { flex-basis: 100%; }
  .athom-theme .topbar .search { max-width: none; }
  .athom-theme .topbar .actions { width: 100%; }
  .athom-theme .topbar .actions > a { flex: 1 1 auto; }
  .athom-theme .brand-logo { padding-right: 16px; }
  .athom-theme .brand-logo img { height: 36px !important; }
  .athom-theme .card { padding: 22px; }
  .athom-page-dashboard > .container > .card { padding: 0; background: transparent; border: 0; box-shadow: none; }
  .athom-page-dashboard .table { display: block; }
  .athom-page-dashboard .table thead, .athom-page-dashboard .table tbody { display: block; }
  .athom-page-dashboard .table thead tr { display: flex; margin-bottom: 14px; background: #fff; border: 1px solid var(--athom-line); border-radius: 3px; }
  .athom-page-dashboard .table thead th { display: block; flex: 1 1 0; width: auto; min-width: 0; padding: 12px; border: 0; font-size: 9px; }
  .athom-page-dashboard .table thead th.actions-cell { display: none; }
  .athom-page-dashboard .table tbody tr { display: flex; flex-wrap: wrap; margin-bottom: 14px; padding: 6px; background: #fff; border: 1px solid var(--athom-line); border-radius: 3px; }
  .athom-page-dashboard .table tbody td { display: block; flex: 0 0 50%; width: 50%; min-width: 0; padding: 12px; border: 0; }
  .athom-page-dashboard .table tbody td:nth-child(2) { align-self: center; text-align: right; font-size: 12px; color: var(--athom-muted); }
  .athom-page-dashboard .table tbody td:nth-child(3), .athom-page-dashboard .table tbody td:nth-child(4) { flex-basis: 100%; width: 100%; }
  .athom-page-dashboard .table tbody td:nth-child(4) { border-top: 1px solid #ebe8e9; margin-top: 4px; }
  .athom-page-dashboard .progress-wrap { flex: 1; width: auto; }
  .athom-page-dashboard .actions { gap: 8px; }
  .athom-page-dashboard .actions form[action$="project_send.php"] { flex: 1 1 280px; }
  .athom-page-dashboard .actions input[type="email"] { width: 100% !important; flex: 1; }
  .athom-page-inspection .form-row { padding: 24px; }
  .athom-page-inspection .form-actions { padding: 24px; }
  .athom-theme .grid.two, .athom-theme .grid.three { grid-template-columns: 1fr; }
  .athom-theme .photo-export-heading h3 { font-size: 28px; }
  .athom-theme .dashboard-return-bar { padding: 14px 20px; }
  .athom-theme .dashboard-return { width: auto; }
  .athom-page-index .container-auth { margin: auto; }
}

@media (max-width: 480px) {
  .athom-theme .container, .athom-theme .photo-export { padding: 24px 16px; }
  .athom-theme .topbar { position: relative; }
  .athom-theme .topbar .header.container { padding: 16px; }
  .athom-theme .topbar .header > div:first-child { gap: 12px !important; }
  .athom-theme .brand-logo { padding-right: 12px; }
  .athom-theme .brand-logo img { height: 30px !important; max-width: 100px; }
  .athom-theme .topbar .search { flex-basis: 160px; }
  .athom-theme .topbar .search input[type="text"] { font-size: 16px; }
  .athom-theme .topbar .actions > a { padding: 11px 8px; font-size: 10px; }
  .athom-theme .card { padding: 20px; }
  .athom-theme .athom-page-intro { margin-bottom: 20px; padding-left: 14px; }
  .athom-theme h1, .athom-theme .page-title { font-size: 26px; }
  .athom-theme .header { gap: 12px; }
  .athom-theme #toggle-completed { width: 100%; }
  .athom-page-dashboard .table th a { gap: 4px; flex-wrap: wrap; }
  .athom-page-dashboard .table thead th { padding: 12px 8px; }
  .athom-page-dashboard .table tbody td { padding: 10px; }
  .athom-page-dashboard .btn-proj { font-size: 22px; }
  .athom-page-dashboard .actions form[action$="project_send.php"] { flex-basis: 100%; }
  .athom-page-inspection .form-row { padding: 22px 18px; }
  .athom-page-inspection .q-label { font-size: 15px; }
  .athom-page-inspection .q-photo-list img { width: 128px; height: 128px; }
  .athom-page-inspection .comment-input { flex-basis: 100%; min-width: 0; }
  .athom-page-inspection .form-actions { padding: 20px 18px; }
  .athom-page-inspection .form-actions > button { width: 100%; }
  .athom-page-inspection #send_cc_select { min-width: 0 !important; width: 100%; flex-basis: 100%; }
  .athom-page-control .user-add-form { grid-template-columns: 1fr; padding: 16px; }
  .athom-theme .photo-export-actions { padding: 12px; gap: 8px; }
  .athom-theme .photo-export-actions button { flex: 1 1 auto; padding: 10px 12px; font-size: 11px; }
  .athom-theme .photo-export-actions button[type="submit"] { flex-basis: 100%; }
  .athom-theme .photo-tile-info { padding: 10px; font-size: 12px; }
  body.athom-page-index { padding: 24px 16px; }
  .athom-page-index .card.auth { padding: 32px 24px 24px; }
  .athom-page-index .auth-logo { width: 128px; }
  .athom-page-index .auth-title { font-size: 22px; }
  .athom-page-project_send { padding: 24px 16px; }
}

@media (hover: none) {
  .athom-theme input:not([type="hidden"]), .athom-theme select, .athom-theme textarea,
  .athom-theme .topbar .search input[type="text"], .athom-theme .actions input[type="email"] { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .athom-theme *, .athom-theme *::before, .athom-theme *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Compact iPad list: keep every inspection action inside the viewport.
 * The desktop table requires 900px before page/card padding. At tablet widths,
 * render the existing rows as cards instead of clipping the last column.
 * No links, data cells, or application behavior are replaced.
 */
@media screen and (max-width: 1100px) {
  .athom-page-project_view > .container { padding: 16px 20px; }
  .athom-page-project_view > .container > .card { padding: 16px; }
  .athom-page-project_view .card > .header {
    gap: 8px 16px;
    padding-bottom: 12px;
    margin-bottom: 12px;
  }
  .athom-page-project_view .card > .header h1 { font-size: 24px; }
  .athom-page-project_view .card > .body { overflow: visible; }
  .athom-page-project_view .table {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .athom-page-project_view .table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .athom-page-project_view .table tbody { display: block; width: 100%; }
  .athom-page-project_view .table tbody tr {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin: 0 0 8px;
    padding: 8px;
    border: 1px solid var(--athom-line);
    border-radius: 3px;
    background: #fff;
  }
  .athom-page-project_view .table tbody td {
    display: block;
    flex: 0 0 50%;
    width: 50%;
    min-width: 0;
    max-width: 100%;
    padding: 4px 6px;
    border: 0;
    font-size: 12px;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .athom-page-project_view .table tbody td:first-child {
    flex-basis: 100%;
    width: 100%;
    padding-bottom: 8px;
    font-size: 15px;
    line-height: 1.35;
  }
  .athom-page-project_view .table tbody td:nth-child(2)::before { content: "STATUT"; }
  .athom-page-project_view .table tbody td:nth-child(3)::before { content: "CONFORMITÉ"; }
  .athom-page-project_view .table tbody td:nth-child(4)::before { content: "INSPECTEUR"; }
  .athom-page-project_view .table tbody td:nth-child(5)::before { content: "DATE"; }
  .athom-page-project_view .table tbody td::before {
    display: block;
    margin-bottom: 2px;
    color: var(--athom-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
  }
  .athom-page-project_view .table tbody td.actions2 {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 6px;
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--athom-line);
    text-align: left;
    white-space: normal;
  }
  .athom-page-project_view .table .actions2 :is(.btn, .btn2) {
    flex: 1 1 110px;
    min-width: 0;
    min-height: 44px;
    max-width: 100%;
    margin: 0;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .athom-page-project_view .table :is(.badge, .conf-ok, .conf-bad) {
    max-width: 100%;
    padding: 3px 6px;
    font-size: 11px;
    line-height: 1.35;
    white-space: normal;
  }
  .athom-page-project_view .table tbody tr:last-child { margin-bottom: 0; }
}

/* Tablet: two rows, without hiding any metadata or shortening action labels.
 * Grid placement changes presentation only; the existing links are untouched.
 */
@media screen and (min-width: 700px) and (max-width: 1100px) {
  .athom-page-project_view .table tbody tr {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 12px;
    padding: 10px 12px;
  }
  .athom-page-project_view .table tbody td { width: auto; padding: 0; }
  .athom-page-project_view .table tbody td:first-child {
    grid-column: 1 / span 2;
    grid-row: 1;
    align-self: center;
    width: auto;
    padding: 0;
  }
  .athom-page-project_view .table tbody td:nth-child(2) { grid-column: 1; grid-row: 2; }
  .athom-page-project_view .table tbody td:nth-child(3) { grid-column: 2; grid-row: 2; }
  .athom-page-project_view .table tbody td:nth-child(4) { grid-column: 3; grid-row: 2; }
  .athom-page-project_view .table tbody td:nth-child(5) { grid-column: 4; grid-row: 2; }
  .athom-page-project_view .table tbody td.actions2 {
    grid-column: 3 / span 2;
    grid-row: 1;
    width: auto;
    padding: 0;
    margin: 0;
    border: 0;
    align-self: center;
    justify-content: flex-end;
  }
  .athom-page-project_view .table .actions2 :is(.btn, .btn2) { flex: 0 1 auto; }
}

@media screen and (max-width: 480px) {
  .athom-page-project_view > .container { padding: 12px; }
  .athom-page-project_view > .container > .card { padding: 12px; }
}

/* Printed reports use the existing content without translucent backgrounds. */
@media print {
  body.athom-theme { background: #fff; color: #000; }
  .athom-theme .topbar, .athom-theme .dashboard-return-bar { position: static; box-shadow: none; }
  .athom-theme .container { max-width: none; padding: 0; }
  .athom-theme .card { box-shadow: none; overflow: visible; border-color: #ccc; }
  .athom-page-report .repo-question { break-inside: avoid; }
  .athom-theme .table th, .athom-theme .table td { color: #000; }
  .athom-page-report .table-mini { min-width: 0; }
}
