
:root {
  --ink:#1e302d;
  --muted:#71807b;
  --bg:#f5f6f2;
  --panel:#fff;
  --line:#e5e9e4;
  --green:#276f56;
  --light:#e8f3ed;
  --amber:#ad6c20
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:var(--bg);
  color:var(--ink)
}
button,input,select,textarea {
  font:inherit
}
button {
  cursor:pointer
}
.shell {
  display:grid;
  grid-template-columns:245px minmax(0,1fr);
  min-height:100vh
}
.sidebar {
  background:#183a31;
  color:#f2faf5;
  padding:28px 18px;
  display:flex;
  flex-direction:column;
  gap:28px
}
.brand {
  font-size:19px;
  font-weight:750;
  letter-spacing:-.6px;
  padding:0 10px
}
.brand small {
  display:block;
  font-size:11px;
  color:#a9c4b8;
  font-weight:500;
  letter-spacing:1.5px;
  margin-top:6px;
  text-transform:uppercase
}
.nav {
  display:grid;
  gap:6px
}
.nav button {
  background:transparent;
  border:0;
  color:#b7cfc4;
  text-align:left;
  padding:13px;
  border-radius:10px;
  font-weight:550
}
.nav button.active,.nav button:hover {
  background:#31584b;
  color:#fff
}
.sidefoot {
  margin-top:auto;
  font-size:12px;
  line-height:1.7;
  color:#a9c4b8;
  padding:12px
}
.main {
  padding:36px clamp(20px,4vw,60px);
  max-width:1600px;
  width:100%;
  margin:0 auto;
  align-self:start
}
header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  margin-bottom:26px
}
h1 {
  font-size:clamp(26px,3vw,36px);
  letter-spacing:-1.3px;
  margin:0 0 7px
}
h2 {
  font-size:19px;
  margin:0
}
p.sub {
  margin:0;
  color:var(--muted);
  font-size:14px
}
.actions {
  display:flex;
  gap:9px;
  flex-wrap:wrap
}
.btn {
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  padding:11px 15px;
  color:var(--ink);
  font-weight:600
}
.btn.primary {
  background:var(--green);
  color:white;
  border-color:var(--green)
}
.btn.danger {
  color:#9c3b36
}
.stats {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:15px;
  margin-bottom:24px
}
.stat,.panel {
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:16px
}
.stat {
  padding:23px
}
.stat label {
  display:block;
  color:var(--muted);
  font-size:12px;
  margin-bottom:12px
}
.stat strong {
  font-size:29px;
  letter-spacing:-1px
}
.stat em {
  display:block;
  color:var(--muted);
  font-size:11px;
  font-style:normal;
  margin-top:8px
}
.grid {
  display:grid;
  grid-template-columns:1.35fr 1fr;
  gap:18px
}
.panel {
  padding:22px;
  margin-bottom:18px
}
.panelhead {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:20px
}
.tag {
  display:inline-block;
  background:#eff2ee;
  color:#52645c;
  padding:5px 9px;
  border-radius:999px;
  font-size:11px;
  font-weight:650
}
.tag.urgent {
  background:#fff0e9;
  color:#ad4f27
}
.tag.done {
  background:#e5f3e9;
  color:#327247
}
.muted {
  color:var(--muted)
}
.listrow {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:13px 0;
  border-top:1px solid var(--line)
}
.listrow:first-child {
  border:0
}
.listrow strong {
  font-size:14px
}
.listrow small {
  display:block;
  color:var(--muted);
  margin-top:5px
}
.listrow button {
  border:0;
  background:transparent;
  color:var(--green);
  font-weight:650
}
.toolbar {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:17px
}
.toolbar input {
  flex:1;
  min-width:190px
}
input,select,textarea {
  background:white;
  border:1px solid #dbe2dc;
  border-radius:9px;
  padding:11px 12px;
  min-width:0;
  color:var(--ink)
}
textarea {
  resize:vertical;
  min-height:100px
}
table {
  width:100%;
  border-collapse:collapse;
  text-align:left;
  font-size:13px
}
th {
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.5px;
  color:var(--muted);
  background:#f8faf7
}
td,th {
  padding:13px 12px;
  border-bottom:1px solid var(--line)
}
tbody tr:hover {
  background:#f7faf8;
  cursor:pointer
}
.tablewrap {
  overflow:auto
}
.empty {
  padding:30px;
  color:var(--muted);
  text-align:center
}
.progress {
  height:9px;
  background:#e9efeb;
  border-radius:9px;
  overflow:hidden;
  margin:8px 0
}
.progress i {
  display:block;
  background:#5a9877;
  height:100%
}
.twocol {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:13px
}
.field {
  display:grid;
  gap:6px
}
.field label {
  font-size:12px;
  color:var(--muted);
  font-weight:650
}
.modalbg {
  position:fixed;
  inset:0;
  background:#10251f99;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:10
}
.modal {
  background:#fff;
  width:min(650px,100%);
  max-height:90vh;
  overflow:auto;
  border-radius:18px;
  padding:27px;
  box-shadow:0 20px 60px #0002
}
.form {
  display:grid;
  gap:14px
}
.formfooter {
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:8px
}
.notice {
  background:#f0f5f1;
  border-left:3px solid #72a185;
  padding:14px;
  border-radius:8px;
  font-size:13px;
  line-height:1.6
}
.pill {
  color:var(--green);
  font-weight:700
}
.hide {
  display:none!important
}
@media(max-width:900px) {
  .shell {
    grid-template-columns:1fr
  }
  .sidebar {
    padding:15px;
    gap:10px
  }
  .brand {
    font-size:17px
  }
  .nav {
    display:flex;
    overflow:auto
  }
  .nav button {
    white-space:nowrap
  }
  .sidefoot {
    display:none
  }
  .main {
    padding:22px
  }
  .stats {
    grid-template-columns:repeat(2,1fr)
  }
  .grid {
    grid-template-columns:1fr
  }
}
@media(max-width:520px) {
  header {
    align-items:flex-start;
    flex-direction:column
  }
  .stats {
    gap:8px
  }
  .stat {
    padding:16px
  }
  .stat strong {
    font-size:23px
  }
  .twocol {
    grid-template-columns:1fr
  }
  .panel {
    padding:15px
  }
}
.commune-logo {
  display:block;
  width:132px;
  max-width:100%;
  height:auto;
  margin:0 auto 14px
}
.brand {
  text-align:center
}
.brand span {
  display:block;
  font-size:13px;
  letter-spacing:.15px;
  font-weight:650;
  color:#f2faf5
}
@media(max-width:900px) {
  .commune-logo {
    width:72px;
    margin:0 0 6px
  }
  .brand {
    text-align:left
  }
}
/* DOMAP V0.5 — responsive desktop, tablette et terrain */ @media (max-width: 1100px) {
    .main {
    padding:24px clamp(16px,3vw,32px)
  }
    .stats {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
    .grid {
    grid-template-columns:minmax(0,1fr)
  }
}
@media (max-width: 900px) {
    .shell {
    display:block;
    min-height:100vh
  }
    .sidebar {
    position:sticky;
    top:0;
    z-index:5;
    padding:9px 14px 7px;
    gap:7px;
    box-shadow:0 3px 14px #10251f15
  }
    .brand {
    display:flex;
    align-items:center;
    gap:10px;
    padding:0 3px;
    font-size:15px;
    text-align:left
  }
    .commune-logo {
    width:45px;
    height:45px;
    object-fit:contain;
    margin:0
  }
    .brand small {
    font-size:9px;
    margin-top:3px
  }
    .nav {
    display:flex;
    gap:5px;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    scrollbar-width:thin;
    padding-bottom:3px
  }
    .nav button {
    white-space:nowrap;
    padding:10px 12px;
    font-size:13px;
    min-height:42px;
    flex:none
  }
    .sidefoot {
    display:none
  }
    .main {
    padding:20px 16px 70px;
    margin:0;
    max-width:none
  }
    header {
    gap:12px;
    margin-bottom:18px
  }
    .actions {
    gap:8px
  }
    .btn {
    min-height:44px
  }
    .panel {
    margin-bottom:14px
  }
    .modalbg {
    align-items:flex-end;
    padding:0
  }
    .modal {
    width:100%;
    max-height:94dvh;
    border-radius:18px 18px 0 0;
    padding:20px 16px max(20px,env(safe-area-inset-bottom));
  }
}
@media (max-width: 600px) {
    h1 {
    font-size:26px;
    letter-spacing:-.7px
  }
    header {
    align-items:stretch;
    flex-direction:column
  }
    header .actions {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
    header .actions .btn {
    padding:10px 8px;
    font-size:12px
  }
    .stats {
    gap:9px;
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
    .stat {
    padding:14px 12px;
    border-radius:12px
  }
    .stat strong {
    font-size:23px
  }
    .stat label {
    line-height:1.35;
    margin-bottom:8px
  }
    .panel {
    padding:15px;
    border-radius:13px
  }
    .panelhead {
    align-items:flex-start;
    flex-wrap:wrap;
    gap:8px
  }
    .twocol {
    grid-template-columns:1fr
  }
    .toolbar {
    display:grid;
    grid-template-columns:1fr;
    gap:8px
  }
    .toolbar input,.toolbar select {
    width:100%;
    min-width:0
  }
    .listrow {
    align-items:flex-start;
    flex-wrap:wrap
  }
    .listrow button {
    min-height:38px
  }
    .tablewrap {
    overflow:visible
  }
    .tablewrap table,.tablewrap tbody,.tablewrap tr,.tablewrap td {
    display:block;
    width:100%
  }
    .tablewrap thead {
    display:none
  }
    .tablewrap tr {
    border:1px solid var(--line);
    border-radius:12px;
    background:#fff;
    margin:0 0 10px;
    padding:10px 12px;
    box-shadow:0 1px 3px #00000007
  }
    .tablewrap td {
    border:0;
    padding:5px 0;
    overflow-wrap:anywhere;
    font-size:13px
  }
    .tablewrap td:first-child {
    font-size:15px;
    color:var(--ink);
    padding-bottom:8px;
    border-bottom:1px solid var(--line);
    margin-bottom:6px
  }
    .tablewrap td:not(:first-child):before {
    content:attr(data-label);
    display:inline-block;
    color:var(--muted);
    font-size:11px;
    font-weight:600;
    margin-right:8px
  }
    .formfooter {
    flex-wrap:wrap;
    gap:10px
  }
    .formfooter>.actions {
    margin-left:auto
  }
    input,select,textarea {
    font-size:16px
  }
}
@media (prefers-reduced-motion: reduce) {
  *,*:before,*:after {
    scroll-behavior:auto!important;
    transition:none!important
  }
}
/* DOMAP V0.5 — Direction artistique lime / cloud */ :root {
  --ink:#202423;
  --muted:#747c7a;
  --bg:#f5f6f4;
  --panel:#fff;
  --line:#e9ece9;
  --green:#202423;
  --light:#f1f5e7;
  --amber:#b87324;
  --lime:#dfff22;
  --lime-strong:#d6fc00
}
body {
  font-family:Inter,"Avenir Next",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:var(--bg);
  color:var(--ink);
  -webkit-font-smoothing:antialiased
}
.sidebar {
  background:#f9faf8;
  color:var(--ink);
  border-right:1px solid var(--line);
  gap:24px;
  padding:27px 16px
}
.brand {
  color:var(--ink)
}
.brand span {
  color:var(--ink)!important
}
.brand small {
  color:#7c8580!important
}
.nav {
  gap:7px
}
.nav button {
  color:#69716e;
  border-radius:16px;
  padding:14px 15px;
  transition:background .15s,color .15s
}
.nav button.active,.nav button:hover {
  background:var(--lime);
  color:#181b17
}
.sidefoot {
  color:#8d948f
}
.main {
  padding-top:30px
}
h1 {
  font-weight:800;
  letter-spacing:-1.6px
}
h2 {
  font-weight:750;
  letter-spacing:-.4px
}
.stat,.panel {
  border:1px solid #eef0ed;
  border-radius:23px;
  box-shadow:0 4px 22px rgba(23,31,24,.025)
}
.stat {
  padding:24px;
  min-height:142px
}
.stat:first-child {
  background:var(--lime);
  border-color:var(--lime)
}
.stat label {
  font-weight:650;
  color:#69716c
}
.stat:first-child label,.stat:first-child em {
  color:#505a37
}
.stat strong {
  font-weight:850;
  letter-spacing:-1.5px;
  font-variant-numeric:tabular-nums
}
.panel {
  padding:24px
}
.btn {
  border-radius:999px;
  padding:12px 18px;
  min-height:43px
}
.btn.primary {
  background:var(--ink);
  border-color:var(--ink);
  color:white
}
.btn.primary:hover {
  background:#404741
}
.btn:not(.primary):hover {
  background:#f2f5ed
}
.tag {
  background:#f1f4ed;
  color:#545e55
}
.tag.done {
  background:#e4f8cb;
  color:#3e642d
}
.tag.urgent {
  background:#ffece5;
  color:#9d432b
}
.progress {
  height:11px;
  background:#edf0e9
}
.progress i {
  background:#b5d800
}
input,select,textarea {
  border-radius:13px;
  border-color:#e3e8e2
}
input:focus,select:focus,textarea:focus {
  outline:2px solid #b4d927;
  outline-offset:1px
}
th {
  background:#f8faf6
}
tbody tr:hover {
  background:#f6faec
}
.notice {
  background:#f5f8ed;
  border-left-color:#bddc38
}
.modal {
  border-radius:25px;
  box-shadow:0 25px 85px #10191025
}
@media(max-width:900px) {
  .sidebar {
    background:#fbfcf9;
    border-bottom:1px solid var(--line);
    box-shadow:0 4px 20px #22222209
  }
  .nav button {
    border-radius:999px
  }
  .main {
    padding-top:19px
  }
  .brand span {
    font-size:14px
  }
}
@media(max-width:600px) {
  .stats {
    gap:10px
  }
  .stat {
    min-height:126px;
    padding:15px;
    border-radius:19px
  }
  .stat strong {
    font-size:25px
  }
  .panel {
    border-radius:20px;
    padding:17px
  }
  .nav {
    scrollbar-width:none
  }
  .nav::-webkit-scrollbar {
    display:none
  }
  .nav button {
    min-height:40px;
    padding:10px 14px
  }
  .btn {
    min-height:44px
  }
  .modal {
    border-radius:25px 25px 0 0
  }
}
.asset-photo {
  width:100%;
  aspect-ratio:16/7;
  border-radius:18px;
  margin:0 0 20px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:10px
}
.empty-photo {
  background:#e4e6e7;
  color:#7e8589;
  border:1px solid #d5d9db
}
.empty-photo span {
  font-size:13px;
  font-weight:600
}
.has-photo {
  position:relative;
  background:#e4e6e7
}
.has-photo img {
  width:100%;
  height:100%;
  object-fit:cover
}
.has-photo span {
  position:absolute;
  bottom:12px;
  left:12px;
  background:#fffdf0e8;
  padding:6px 10px;
  border-radius:9px;
  font-size:12px;
  color:#26302d
}
@media(max-width:600px) {
  .asset-photo {
    aspect-ratio:4/3
  }
}
.sort-heading {
  background:none;
  border:0;
  padding:3px 0;
  font:inherit;
  font-weight:700;
  color:inherit;
  cursor:pointer;
  white-space:nowrap;
  text-align:left
}
.sort-heading:hover {
  text-decoration:underline
}
.sort-heading span {
  opacity:.65
}
.asset-search {
  display:flex;
  gap:10px;
  align-items:center;
  width:100%
}
.asset-search input {
  flex:1;
  min-width:0
}
/* DOMAP v0.9 — composants, lisibilité, clavier et adaptation */ :root {
  --focus:#195fbe;
  --radius-sm:8px;
  --radius-md:12px;
  --radius-lg:18px;
  --space-1:4px;
  --space-2:8px;
  --space-3:12px;
  --space-4:16px;
  --space-6:24px
}
:where(button,input,select,textarea,a,[tabindex]):focus-visible {
  outline:3px solid var(--focus);
  outline-offset:3px
}
:where(button,input,select,textarea) {
  min-height:36px
}
:where(button,[role="button"]) {
  touch-action:manipulation
}
:where(button):disabled {
  cursor:not-allowed;
  opacity:.55
}
.tablewrap {
  overflow-x:auto;
  max-width:100%;
  overscroll-behavior-x:contain
}
.tablewrap table {
  border-collapse:separate;
  border-spacing:0
}
.tablewrap tbody tr:hover {
  background:#f2f7f3
}
.tablewrap tbody tr:focus-within {
  background:#eef4ff
}
.tablewrap th {
  white-space:nowrap
}
.field label {
  display:block;
  font-weight:600;
  line-height:1.4;
  margin-bottom:6px
}
.field :where(input,select,textarea) {
  max-width:100%
}
.modalbg {
  padding:16px;
  overflow-y:auto
}
.modal {
  max-height:calc(100dvh - 32px);
  overflow-y:auto
}
@media(max-width:900px) {
  .tablewrap {
    -webkit-overflow-scrolling:touch
  }
  .nav {
    scrollbar-width:thin
  }
}
@media(max-width:520px) {
  .modalbg {
    padding:8px
  }
  .modal {
    max-height:calc(100dvh - 16px)
  }
  .main {
    min-width:0
  }
  .tablewrap {
    margin-inline:-8px
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    scroll-behavior:auto!important;
    animation-duration:.01ms!important;
    transition-duration:.01ms!important
  }
}

/* Hébergé : commandes autrement masquées dans les tableaux mobiles. */
.hosted-mobile{display:none}
@media(max-width:600px){.hosted-mobile{display:inline-flex;gap:8px;flex-wrap:wrap;align-items:center}}
