:root {
  color-scheme: light;
  --bg: #faf8f4;
  --card: #fffdf9;
  --tx: #273e36;
  --mu: #52645b;
  --bd: #dbe3da;
  --ac: #345c4c;
  --ac2: #e3eee2;
  --nav: #e9f1e6;
  --wa: #873e36;
  --wa2: #f8e4dd;
  --sage: #e2efdf;
  --lavender: #eee8f7;
  --peach: #f8e8de;
  --gold: #fbefce;
  --shadow: 0 12px 32px -22px #36564f66;
}
body {
  background: radial-gradient(ellipse at 90% 0%, #e7eee5 0%, transparent 48%),
    radial-gradient(ellipse at 0% 95%, #f6e9e3 0%, transparent 45%), var(--bg);
  min-height: 100vh;
}
body::after { opacity: .045; }
main { width: 100%; max-width: 1240px; padding: clamp(16px, 3vw, 42px); }
h2 { font-size: clamp(21px, 2.4vw, 29px); margin-block: 8px 17px; }
h2::before { background-color: var(--sage); background-size: 67%; border-radius: 10px; width: 34px; height: 34px; flex-basis: 34px; }
a { color: var(--ac); }
.card {
  border-radius: 20px;
  padding: clamp(14px, 2vw, 22px);
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
main > details.card:first-child,
main > .card:has(#shared-status) { background: linear-gradient(120deg, var(--lavender), var(--card) 80%); }
main > .card:has([data-backup]) { background: linear-gradient(120deg, var(--peach), var(--card) 80%); }
details > summary { color: var(--ac); }
label { font-weight: 650; }
textarea, input, select { background: #f6f7f2; border-color: #ccd8ce; padding: 9px 10px; }
input[type="checkbox"] { accent-color: var(--ac); }
.ro { background: #f2f5ee; }
.btn, .fab { box-shadow: 0 5px 12px -8px #234438a0; }
.btn.s { background: var(--sage); color: var(--tx); }
.btn.d { background: var(--wa2); color: var(--wa); border: 1px solid #e8c7be; }
.btn:hover { filter: brightness(.96); }
.sub { gap: 8px; }
.sub .btn.s:nth-child(even) { background: var(--lavender); }
nav { padding-inline: 14px; border-right: 1px solid var(--bd); }
nav button { color: var(--tx); }
nav button:hover { background: #dce9dc; }
nav button.on { color: #244537; background: #cfe3d3; border-color: #bfd9c7; }
.who { padding: 10px; color: var(--tx); background: #fffdf9b3; border: 1px solid var(--bd); border-radius: 16px; }
.who .muted { color: var(--mu); }
.who .btn.s { background: #fffdf9; color: var(--ac); border-color: #cbd8cb; }
.home { max-width: 900px; padding-top: clamp(26px, 7vh, 76px); text-align: center; }
.home-logo {
  display: block; margin: 0 auto 18px; padding: 12px; width: clamp(102px, 18vw, 150px);
  height: auto; background: #fff; border-radius: 24px; box-shadow: var(--shadow);
}
.hello { font-size: clamp(24px, 5vw, 42px); }
.people { gap: clamp(6px, 1.5vw, 14px); margin-top: 22px; }
.people button { min-height: 76px; padding-inline: 4px; border-color: var(--bd); box-shadow: var(--shadow); }
.people button.t-entretien { background: var(--sage); border-top: 4px solid #83a889; }
.people button.t-creation { background: var(--lavender); border-top: 4px solid #a295bd; }
.people button.t-bureau { background: var(--peach); border-top: 4px solid #c69982; }
.gw { padding: 8px; background: #fffdf9aa; border: 1px solid var(--bd); border-radius: 18px; margin-bottom: 16px; }
.grid { gap: 7px; grid-template-columns: 90px repeat(5, minmax(125px, 1fr)); }
.gh { background: #eef1e8; padding: 9px 4px; }
.gh.today { background: #d0e4d6; color: #214835; outline: 1px solid #a6c5af; outline-offset: -1px; }
.gt { border-radius: 10px; padding: 8px; }
.gt.entretien, .gc.entretien { background: var(--sage); }
.gt.creation, .gc.creation { background: var(--lavender); }
.gc { padding: 6px; }
.gc .btn.s { background: #fffdf9; }
.chip.st0 { background: var(--card); border-left-color: #869f91; }
.chip.st1 { background: var(--gold); border-left-color: #b38229; }
.chip.st2 { background: #edf5ec; border-left-color: #528061; }
@media (max-width: 720px) {
  main { padding-top: 64px; }
  nav { padding-top: calc(env(safe-area-inset-top, 0px) + 64px); }
  .gw { padding: 6px; }
  .grid { min-width: 680px; grid-template-columns: 76px repeat(5, minmax(112px, 1fr)); gap: 5px; }
  .gt { position: sticky; left: 0; z-index: 1; font-size: 13px; }
  textarea, input, select { font-size: 16px; }
  .gc input { font-size: 16px; }
  .gc .btn { min-height: 32px; }
}

.chantier-files { min-width: 0; margin: 10px 0 16px; padding: 10px 12px; border: 1px solid var(--bd); border-radius: 12px; }
.chantier-files legend { padding-inline: 4px; color: var(--ac); font-weight: 650; }
.chantier-files ul { margin: 0 0 8px; padding: 0; list-style: none; }
.chantier-files li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; overflow-wrap: anywhere; }
.chantier-files input { max-width: 100%; }
.chantier-files [role="status"] { margin: 6px 0 0; }
.chantier-files [role="status"]:empty { display: none; }

.dashboard-tasks { margin: 0; padding: 0; list-style: none; }
.dashboard-tasks li { padding: 10px 12px; margin-bottom: 6px; background: var(--lavender); border-radius: 10px; }
.dashboard-tasks li.task-done { background: var(--sage); }
.dashboard-tasks label, .dashboard-task-status { display: flex; align-items: flex-start; gap: 10px; margin: 0; color: var(--tx); font-size: inherit; font-weight: 500; }
.dashboard-tasks label { cursor: pointer; min-height: 28px; }
.dashboard-tasks input { flex: 0 0 auto; width: 19px; height: 19px; margin: 2px 0 0; }
.dashboard-tasks span { overflow-wrap: anywhere; white-space: pre-wrap; }
.dashboard-tasks .badge { flex-shrink: 0; }
.dashboard-tasks .task-done label span { text-decoration: line-through; }
main .card h3 { margin: 0 0 10px; }

.suivi-intervention { margin-block: 16px; padding: 12px; border: 1px solid var(--bd); border-radius: 12px; background: var(--card); }
.suivi-intervention fieldset { min-width: 0; margin: 10px 0; padding: 8px 10px; border: 1px solid var(--bd); border-radius: 10px; }
.suivi-intervention .suivi-champs { border: 0; margin: 0; padding: 0; }
.suivi-intervention legend { padding-inline: 4px; color: var(--ac); font-weight: 650; }
.suivi-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 6px 14px; }
.suivi-check { display: flex; align-items: center; gap: 9px; min-height: 32px; margin: 0; color: var(--tx); font-size: inherit; }
.suivi-check input { width: 18px; height: 18px; flex: 0 0 18px; }
.suivi-resultat:empty { display: none; }

.vehicle-checklist { max-width: 100%; overflow-x: auto; margin-top: 12px; }
.vehicle-checklist table { width: 100%; min-width: 580px; border-collapse: collapse; font-size: 13px; }
.vehicle-checklist th, .vehicle-checklist td { padding: 8px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--bd); }
.vehicle-checklist thead th { background: var(--sage); }
.vehicle-checklist td:last-child { min-width: 85px; }
.vehicle-checklist input { width: 20px; height: 20px; cursor: pointer; }
.vehicle-checklist small { display: block; }
@media (max-width: 720px) {
  .vehicle-checklist table { min-width: 0; }
  .vehicle-checklist th, .vehicle-checklist td { overflow-wrap: anywhere; padding: 5px 3px; font-size: 12px; }
  .vehicle-checklist td:last-child { min-width: 44px; }
}

.vehicle-history { margin-block: 8px; padding: 10px 12px; background: var(--sage); border-radius: 10px; }
.vehicle-history h4 { margin: 12px 0 4px; }
.vehicle-history ul { margin: 0; padding-left: 22px; }


.dashboard-next { background: linear-gradient(120deg, var(--sage), var(--card) 75%); }
.dashboard-links { list-style: none; padding: 0; margin: 0; }
.dashboard-links li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--bd); }
.dashboard-links li:last-child { border-bottom: 0; }
#chantier-detail, #chantier-suivi, #chantier-retour { scroll-margin-top: 60px; }

:root {
  --font-interface: "DM Sans", system-ui, sans-serif;
  --font-title: "Instrument Serif", Georgia, serif;
  --bg: #f7f4ed;
  --card: #fffdf8;
  --tx: #253d33;
  --mu: #59685e;
  --bd: #dddcd0;
  --ac: #315445;
  --nav: #29473c;
  --shadow: 0 12px 30px -23px #253e34a0;
}
body {
  font-family: var(--font-interface);
  background: radial-gradient(ellipse at 88% 0%, #e7ede1 0%, transparent 39%),
    radial-gradient(ellipse at 0% 95%, #f3e4db 0%, transparent 42%), var(--bg);
}
main h2, .hello {
  font-family: var(--font-title);
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1;
}
main h2 { font-size: clamp(34px, 4vw, 49px); margin-block: 8px 22px; gap: 12px; }
main h2::before { width: 36px; height: 36px; flex-basis: 36px; border-radius: 50%; }
main .card h3 { font-family: var(--font-title); font-weight: 400; font-size: 28px; line-height: 1.08; color: var(--ac); }
main h4 { letter-spacing: -.01em; }
.card { border-radius: 18px; box-shadow: var(--shadow); }
nav { gap: 5px; padding-inline: 13px; }
nav button { color: #f1f4e8; border-radius: 9px; padding: 10px; }
nav button:hover { background: #36594a; }
nav button.on { color: #213c31; background: #dce9d8; border-color: #dce9d8; }
nav button:focus-visible { outline-color: #e0eacb; }
.who { padding: 12px; margin-bottom: 12px; background: #36594a; border-color: #557467; color: #fbfbef; }
.who b { font-family: var(--font-title); font-size: 26px; font-weight: 400; line-height: 1; }
.who .muted { color: #e1eadb; }
.who .btn.s { background: #e0eada; border-color: #e0eada; }
.home { max-width: 1000px; padding-top: clamp(22px, 8vh, 85px); }
.home-panel {
  padding: clamp(16px, 5vw, 52px);
  border: 1px solid #deded0;
  border-radius: clamp(18px, 4vw, 38px);
  background: linear-gradient(155deg, #fffdf8 58%, #eff3e9);
  box-shadow: 0 24px 60px -38px #31544590;
}
.home-logo { width: clamp(85px, 13vw, 128px); border-radius: 44% 44% 22px 22px; }
.hello { font-size: clamp(34px, 7vw, 64px); }
.people { margin-top: clamp(16px, 4vw, 30px); }
.people button { border-radius: 13px; }
.people small { font-size: clamp(10px, 2.6vw, 13px); }
.btn { border-radius: 10px; }
.badge { font-weight: 600; }
.dashboard-next { background: linear-gradient(120deg, #dfeadf, var(--card) 85%); }
@media (max-width: 480px) {
  .home { padding-inline: 9px; }
  .home-panel { padding-inline: 8px; }
  .people { gap: 5px; }
  .people button { min-height: 69px; padding-inline: 2px; }
}

#app-menu { font-family: Inter, system-ui, sans-serif; }
#app-menu [data-tab] {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}
#app-menu [data-tab][aria-current] { font-weight: 600; }
#app-menu [data-tab] svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: .86; }
#app-menu .who b { font-family: inherit; font-size: 16px; font-weight: 600; line-height: 1.35; }
#app-menu .who .btn { font-family: inherit; }

.process-folder summary .badge { margin-left: 6px; }
.process-folder form .btn, form.process-folder .btn { margin-top: 8px; }
.process-folder ul { list-style: none; padding: 0; margin: 12px 0; }
.process-folder li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; overflow-wrap: anywhere; }

.shared-task-group h5 { margin: 12px 0 6px; font-size: 14px; }
.shared-task-group .badge { margin-left: 4px; }
#shared-task-list [data-shared-completed] { margin-block: 12px; }
#shared-task-list [data-shared-task-delete] { margin-top: 6px; }

.account-password { margin-block: 0 14px; padding: 14px 18px; border: 1px solid var(--bd); border-radius: 14px; background: var(--card); }
[data-hm-password] { max-width: 440px; margin-top: 10px; }
