/* DT en ligne : design « fluide » (calme, précis, animations qui expliquent) */
:root {
  /* couleurs */
  --bg: #f5f5f7; --card: #ffffff; --ink: #1d1d1f; --muted: #6e6e73; --line: #e3e3e8; --line-soft: #efeff3; --fill: #f0f0f3;
  --accent: #0b5cad; --accent-hover: #0a4f96; --accent-ink: #ffffff; --accent-soft: #e8f1fb;
  --ok: #1e7f4f; --ok-soft: #e6f4ec; --warn: #b26a00; --warn-soft: #fdf2df; --bad: #c4281c; --bad-soft: #fdeceb;
  /* formes */
  --r-s: 8px; --r-m: 14px; --r-l: 22px; --radius: var(--r-m);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 8px rgba(0, 0, 0, .03);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .08);
  --ring: 0 0 0 4px rgba(11, 92, 173, .18);
  /* mouvement */
  --spring: cubic-bezier(.32, .72, 0, 1); --out: cubic-bezier(.2, .8, .2, 1);
  --t-press: 120ms; --t-quick: 240ms; --t-sheet: 520ms;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI Variable Text", "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); letter-spacing: -.005em; background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: 32px; line-height: 1.15; letter-spacing: -.025em; font-weight: 700; margin: 2px 0 6px; }
h2 { font-size: 19px; line-height: 1.3; letter-spacing: -.015em; font-weight: 650; margin: 0 0 14px; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
::selection { background: var(--accent-soft); }

/* ---------------------------------------------------------------- barre du haut, translucide */
.topbar { display: flex; align-items: center; gap: 24px; padding: 0 28px; height: 56px; position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .07); }
.topbar[hidden], [hidden] { display: none !important; }
.brand { font-weight: 700; color: var(--ink); font-size: 17px; letter-spacing: -.02em; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.brand::before { content: ""; width: 26px; height: 26px; flex: none; background: url("/favicon.svg") center / contain no-repeat; }
.brand:hover { text-decoration: none; }
.topbar nav { display: flex; gap: 2px; flex: 1; }
.topbar nav a { padding: 6px 12px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 500;
  transition: background var(--t-quick) var(--out), color var(--t-quick) var(--out); }
.topbar nav a:hover { color: var(--ink); background: rgba(0, 0, 0, .04); text-decoration: none; }
.topbar nav a.on { background: var(--ink); color: #fff; font-weight: 600; }
.who { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }

main { max-width: 1180px; margin: 0 auto; padding: 36px 28px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head a.small { color: var(--muted); font-weight: 500; }
.page-head a.small:hover { color: var(--accent); }
.card { background: var(--card); border: 1px solid rgba(0, 0, 0, .05); border-radius: var(--r-l); padding: 24px; box-shadow: var(--shadow); margin-bottom: 18px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid2 > .card, .grid3 > .card { margin-bottom: 0; }
.grid2 + .card, .grid2 + .grid2, .grid3 + .card { margin-top: 18px; }
@media (max-width: 860px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; height: auto; padding: 8px 16px; gap: 8px; }
  .topbar nav { overflow-x: auto; }
  main { padding: 20px 16px 48px; }
  h1 { font-size: 26px; }
  .card { padding: 18px; border-radius: var(--r-m); }
}

/* ---------------------------------------------------------------- formulaires */
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 5px; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s); font: inherit; background: #fff; color: var(--ink);
  transition: border-color var(--t-quick) var(--out), box-shadow var(--t-quick) var(--out); }
input::placeholder, textarea::placeholder { color: #a1a1a6; }
select { -webkit-appearance: none; appearance: none; padding-right: 32px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236e6e73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; }
select[size], select[multiple] { background-image: none; padding: 4px; }
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }
input[type=file] { font: inherit; font-size: 13px; color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; font-size: 13px; padding: 7px 14px; margin-right: 10px; border-radius: 999px;
  border: 0; background: var(--fill); color: var(--ink); cursor: pointer; transition: background var(--t-quick) var(--out); }
input[type=file]::file-selector-button:hover { background: #e6e6ea; }

/* ---------------------------------------------------------------- boutons : appui à 97 % */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 18px; border-radius: 999px; border: 0;
  background: var(--fill); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform var(--t-press) var(--out), background var(--t-quick) var(--out), box-shadow var(--t-quick) var(--out), opacity var(--t-quick); }
.btn:hover { background: #e6e6ea; text-decoration: none; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(11, 92, 173, .25); }
.btn.primary:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.small { padding: 6px 13px; font-size: 13px; }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; transition: opacity var(--t-press); }
button.link:hover { text-decoration: underline; text-underline-offset: 3px; }
button.link:active { opacity: .6; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------------------------------------------------------------- étiquettes, alertes */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.ok::before, .badge.warn::before, .badge.bad::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.alert { padding: 12px 16px; border-radius: var(--r-m); margin: 12px 0; font-size: 14px; animation: rise var(--t-quick) var(--out) both; }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }

/* ---------------------------------------------------------------- tableaux */
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .01em; }
tbody tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click td { transition: background var(--t-quick) var(--out); }
tr.click:hover td { background: #f7f7f9; }
tr.click:active td { background: #f0f0f3; }
tr.click td:first-child { border-radius: 10px 0 0 10px; }
tr.click td:last-child { border-radius: 0 10px 10px 0; }

/* ---------------------------------------------------------------- connexion */
.auth { max-width: 420px; margin: 9vh auto 48px; padding: 36px 32px; }
.auth h1 { text-align: center; margin-bottom: 6px; }
.auth h1::before { content: ""; display: block; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
  background: url("/favicon.svg") center / contain no-repeat; box-shadow: 0 8px 24px rgba(22, 22, 22, .22); }
.auth .sub { text-align: center; color: var(--muted); margin-bottom: 22px; }
.auth .btn { padding: 12px 18px; font-size: 15px; }
.oauth { display: grid; gap: 10px; margin-top: 4px; }
.oauth-btn { width: 100%; justify-content: center; gap: 10px; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
.oauth-btn:hover { background: var(--fill); text-decoration: none; }
.oauth-btn svg { width: 18px; height: 18px; flex: none; }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0 6px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: rgba(0, 0, 0, .1); }

/* ---------------------------------------------------------------- indicateur d'étapes */
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin-bottom: 20px; padding: 4px;
  background: rgba(0, 0, 0, .045); border-radius: var(--r-m); }
.step { display: flex; align-items: center; min-width: 0; padding: 10px 14px; border-radius: 11px; font-size: 14px; font-weight: 500; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background var(--t-sheet) var(--spring), color var(--t-quick) var(--out), box-shadow var(--t-sheet) var(--spring); }
.step .n { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .08); color: var(--muted);
  font-size: 12px; font-weight: 700; margin-right: 9px; transition: background var(--t-quick) var(--out), transform var(--t-sheet) var(--spring); }
.step.done { color: var(--ink); }
.step.done .n { background: var(--ok); color: transparent; position: relative; }
.step.done .n::after { content: ""; position: absolute; left: 7.5px; top: 4.5px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.step.current { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 12px rgba(0, 0, 0, .04); }
.step.current .n { background: var(--accent); color: #fff; }
@media (max-width: 860px) { .steps { grid-auto-flow: row; } }

/* ---------------------------------------------------------------- calques, cartes */
.layers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .layers { grid-template-columns: 1fr; } }
.layer-box { border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 14px; max-height: 240px; overflow: auto; background: #fff; }
.layer-box h3 { font-size: 13px; }
.check { display: flex; gap: 9px; align-items: center; font-size: 14px; padding: 4px 0; font-weight: 400; margin: 0; cursor: pointer; }
.check .muted { font-size: 12px; }

#map { height: 460px; border-radius: var(--r-m); border: 1px solid rgba(0, 0, 0, .06); overflow: hidden; }
.maplibregl-ctrl-group { border-radius: 10px !important; box-shadow: var(--shadow-lift) !important; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }

/* ---------------------------------------------------------------- progression */
.progress { position: relative; height: 6px; background: var(--fill); border-radius: 999px; overflow: hidden; margin: 12px 0 8px; }
.progress > div { height: 100%; background: var(--accent); border-radius: inherit; transition: width var(--t-sheet) var(--spring); }
.progress.indeterminate > div { width: 35% !important; animation: slide 1.4s var(--out) infinite; }
#job .card { animation: rise var(--t-sheet) var(--spring) both; }
.stats { display: flex; gap: 32px; flex-wrap: wrap; margin: 10px 0 14px; }
.stat b { display: block; font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
pre.log { background: #1d1d1f; color: #e8e8ed; padding: 14px 16px; border-radius: var(--r-m); max-height: 220px; overflow: auto; font: 12px/1.55 ui-monospace, "SF Mono", Consolas, monospace; white-space: pre-wrap; }

/* ---------------------------------------------------------------- abonnement */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
.plan { border: 1px solid rgba(0, 0, 0, .05); border-radius: var(--r-l); padding: 24px; background: var(--card); display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow); transition: transform var(--t-sheet) var(--spring), box-shadow var(--t-sheet) var(--spring); }
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.plan.current { box-shadow: 0 0 0 2px var(--accent), var(--shadow-lift); }
.plan .price { font-size: 30px; font-weight: 700; letter-spacing: -.025em; }
.plan ul { padding-left: 18px; margin: 0; color: var(--muted); font-size: 14px; }
.plan .btn { margin-top: auto; }
.plans.offers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .plans.offers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .plans.offers { grid-template-columns: 1fr; } }
.plan { position: relative; }
.plan h2 { margin: 0; font-size: 18px; }
.plan > p { margin: 0; }
.plan.featured { box-shadow: 0 0 0 1.5px var(--accent), var(--shadow); }
.plan.featured.current, .plan.current { box-shadow: 0 0 0 2px var(--accent), var(--shadow-lift); }
.plan-flag { position: absolute; top: -11px; left: 22px; background: var(--accent); color: #fff; }
.plan ul.adv { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 7px; color: var(--ink); font-size: 13.5px; }
.plan ul.adv li { position: relative; padding-left: 24px; line-height: 1.4; }
.plan ul.adv li::before { content: ""; position: absolute; left: 0; top: 1px; width: 16px; height: 16px; border-radius: 50%; background: var(--ok-soft); }
.plan ul.adv li::after { content: ""; position: absolute; left: 5.5px; top: 4px; width: 4px; height: 8px; border: solid var(--ok); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); }
.qty-row { display: flex; align-items: center; gap: 6px; margin-top: auto; }
.qty-row input { text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.qty-row input::-webkit-inner-spin-button, .qty-row input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-row .btn { width: 36px; height: 36px; padding: 0; font-size: 18px; flex: none; }
.qty-row + .btn { margin-top: 8px; }

/* ---------------------------------------------------------------- accueil : les 3 fonctionnalités */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 28px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }
.feature { display: flex; flex-direction: column; gap: 10px; margin: 0; transition: transform var(--t-sheet) var(--spring), box-shadow var(--t-sheet) var(--spring); }
.feature:hover, .feature:focus-within { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.feature::before { content: ""; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 4px; background: var(--fill) center / 22px no-repeat; }
.feature[data-kind=masse]::before { background-color: #eef0f4; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d1d1f' stroke-width='1.7' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='8' height='8' rx='1.5'/%3E%3Crect x='13' y='3' width='8' height='8' rx='1.5'/%3E%3Crect x='3' y='13' width='8' height='8' rx='1.5'/%3E%3Crect x='13' y='13' width='8' height='8' rx='1.5'/%3E%3C/svg%3E"); }
.feature[data-kind=urbain]::before { background-color: var(--accent-soft); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b5cad' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='M4 20V9l6-4v15M10 20V11l10 0v9M3 20h18'/%3E%3C/svg%3E"); }
.feature[data-kind=rural]::before { background-color: var(--ok-soft); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e7f4f' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='M5 6l9-2 5 6-3 9-10-1z'/%3E%3Ccircle cx='5' cy='6' r='1.4' fill='%231e7f4f'/%3E%3Ccircle cx='19' cy='10' r='1.4' fill='%231e7f4f'/%3E%3C/svg%3E"); }
.feature .badge { align-self: flex-start; background: var(--fill); color: var(--muted); }
.feature h2 { margin: 0; font-size: 20px; }
.feature p { flex: 1; margin: 0; }
.badge.kind-masse { background: #eef0f4; color: var(--ink); }
.badge.kind-urbain { background: var(--accent-soft); color: var(--accent); }
.badge.kind-rural { background: var(--ok-soft); color: var(--ok); }
.span2 { grid-column: 1 / -1; }
textarea.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 13px; white-space: pre; }
.table-scroll { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-m); }
table.compact { font-size: 13px; }
table.compact th, table.compact td { padding: 6px 10px; white-space: nowrap; }
table.compact thead th { position: sticky; top: 0; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
img.situation { display: block; max-width: 100%; max-height: 220px; border: 1px solid var(--line); border-radius: var(--r-s); margin-bottom: 6px; }

.import-box { border: 1.5px dashed #d2d2d7; border-radius: var(--r-m); padding: 14px 16px; background: #fafafc; transition: border-color var(--t-quick), background var(--t-quick); }
.import-box:hover { border-color: #b8b8bf; }
.import-box details summary { cursor: pointer; margin-top: 8px; }
details > summary { transition: color var(--t-quick); }
details > summary:hover { color: var(--accent); }
details[open] > *:not(summary) { animation: rise var(--t-quick) var(--out) both; }

/* ---------------------------------------------------------------- onglets : contrôle segmenté */
.tabs { display: inline-flex; gap: 2px; flex-wrap: wrap; margin-bottom: 16px; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, .05); }
.tab { border: 0; background: transparent; color: var(--muted); padding: 7px 15px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background var(--t-quick) var(--out), color var(--t-quick) var(--out), box-shadow var(--t-quick) var(--out), transform var(--t-press) var(--out); }
.tab:hover { color: var(--ink); }
.tab:active { transform: scale(.97); }
.tab.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 3px 8px rgba(0, 0, 0, .04); }
.tools { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 860px) { .tools { grid-template-columns: 1fr; } }
.toolform .grid2 > div input[data-pt] { min-width: 0; }
details.alert summary { cursor: pointer; }

/* ---------------------------------------------------------------- message flottant */
.toast { position: fixed; bottom: 24px; left: 50%; z-index: 30; max-width: min(90vw, 520px); padding: 12px 20px; border-radius: 999px;
  background: rgba(29, 29, 31, .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: #fff; font-size: 14px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2); transform: translate(-50%, 0); opacity: 1;
  transition: transform var(--t-sheet) var(--spring), opacity var(--t-quick) var(--out); }
.toast.bad { background: rgba(196, 40, 28, .95); }
.toast.out { transform: translate(-50%, 24px) scale(.96); opacity: 0; pointer-events: none; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }

/* ---------------------------------------------------------------- aperçus (calque, plan de situation) : un panneau qui monte */
.apercu { margin-top: 16px; padding: 14px; border: 1px solid rgba(0, 0, 0, .06); border-radius: var(--r-l); background: #fbfbfd; box-shadow: var(--shadow-lift);
  animation: sheet var(--t-sheet) var(--spring) both; }
.apercu .row { gap: 8px; flex-wrap: wrap; }
.apercu .ap-info { margin: 10px 2px; }
.apercu-img { overflow: auto; max-height: 75vh; background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); position: relative; min-height: 120px; }
.apercu-img img { display: block; width: 100%; min-width: 640px; height: auto; opacity: 1; transition: opacity var(--t-quick) var(--out); }
.apercu-img img:not([src]), .apercu-img img[src=""] { opacity: 0; }
.apercu-img:has(img:not([src]))::after { content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(100deg, transparent 30%, rgba(0, 0, 0, .04) 50%, transparent 70%) #f7f7f9; background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.bad-text { color: var(--bad); }

/* plan de situation */
.seg { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 4px 0 10px; }
.apercu-img.sit img { min-width: 0; max-width: 560px; margin: 0 auto; }
.sit-saved img.situation { max-width: 100%; border: 1px solid var(--line); border-radius: var(--r-s); }

/* dossiers en bloc : DWG purgé, sélection des lots */
.result-box { margin-top: 14px; padding: 14px 16px; border: 1px solid rgba(0, 0, 0, .05); border-radius: var(--r-m); background: #fafafc; animation: rise var(--t-sheet) var(--spring) both; }
.lot-list { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-m); padding: 4px 6px; background: #fff; }
.lot-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 7px 8px; border-bottom: 1px solid var(--line-soft); margin: 0;
  border-radius: 8px; transition: background var(--t-quick) var(--out); }
.lot-row:hover { background: #f7f7f9; }
.lot-row:has(input:checked) { background: var(--accent-soft); }
.lot-row:last-child { border-bottom: 0; }

/* ---------------------------------------------------------------- administration */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.kpi { margin: 0; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi b { font-size: 26px; line-height: 1.15; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
@media (max-width: 960px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; align-items: end; height: 190px; padding-top: 8px;
  border-bottom: 1px solid var(--line); }
.bar-col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; outline: none; cursor: default; }
.bar { width: min(70%, 28px); background: var(--accent); border-radius: 4px 4px 0 0; min-height: 0;
  transform-origin: bottom; animation: grow var(--t-sheet) var(--spring) both; transition: opacity var(--t-quick); }
.bars:hover .bar { opacity: .45; } .bars .bar-col:hover .bar, .bars .bar-col:focus .bar { opacity: 1; }
.bar-lbl { position: absolute; bottom: -22px; font-size: 11px; color: var(--muted); }
.bars + details { margin-top: 30px !important; }
.bar-tip { position: absolute; bottom: calc(100% - 4px); left: 50%; transform: translate(-50%, 6px); opacity: 0; pointer-events: none; z-index: 2;
  background: var(--ink); color: #fff; border-radius: 10px; padding: 6px 10px; white-space: nowrap; font-size: 12px; display: flex; flex-direction: column;
  transition: opacity var(--t-quick) var(--out), transform var(--t-quick) var(--out); }
.bar-tip span { color: #c7c7cc; }
.bar-col:hover .bar-tip, .bar-col:focus .bar-tip { opacity: 1; transform: translate(-50%, 0); }
@keyframes grow { from { transform: scaleY(0); } to { transform: none; } }
.panel { border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px; background: #fafafc; }
.panel h3 { margin-bottom: 4px; }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.danger:hover { background: #fadad7; }
.table-wrap { overflow-x: auto; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; }
.swap { animation: rise var(--t-quick) var(--out) both; }
.checklist { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 2px; }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 4px 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.checklist li::before { content: ""; grid-row: span 2; width: 18px; height: 18px; border-radius: 50%; margin-top: 1px; }
.checklist li.ok::before { background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.6 2.5L13 6.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.checklist li.todo::before { background: var(--warn-soft); box-shadow: inset 0 0 0 2px var(--warn); }
.checklist li b { font-weight: 500; color: var(--muted); word-break: break-all; }
.steps-list { padding-left: 20px; margin: 8px 0 12px; display: grid; gap: 10px; font-size: 14px; }
.secret-box { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 16px; border-radius: var(--r-m); background: var(--fill); margin: 12px 0; }
.secret-box b { font-size: 16px; user-select: all; }
@media (max-width: 640px) { .secret-box { grid-template-columns: 1fr; } }

/* retour de paiement */
.pay-return { text-align: center; }
.pay-return h1::before { display: none; }
.pay-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; font-weight: 700; color: #fff;
  animation: pop var(--t-sheet) var(--spring) both; }
.pay-icon.ok { background: var(--ok); } .pay-icon.bad { background: var(--bad); }
.pay-icon.wave { background: #1BA3E8; }
.pay-return form { text-align: left; }
.pay-decl { margin-top: 4px; font-size: 12px; color: var(--muted); }
.ring-wait { width: 56px; height: 56px; margin: 4px auto 18px; border-radius: 50%; border: 4px solid var(--fill); border-top-color: var(--accent);
  animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* panneau qui monte du bas, la page recule légèrement */
.sheet-back { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .28); display: flex; align-items: flex-end; justify-content: center;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: fade var(--t-quick) var(--out) both; }
.sheet { position: relative; width: min(640px, 100%); max-height: 88vh; overflow: auto; background: var(--card); border-radius: var(--r-l) var(--r-l) 0 0;
  padding: 28px 28px 32px; box-shadow: 0 -10px 40px rgba(0, 0, 0, .18); animation: sheet-up var(--t-sheet) var(--spring) both; }
.sheet.wide { width: min(1080px, 100%); }
.sheet-x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--fill); color: var(--muted);
  font-size: 20px; line-height: 1; cursor: pointer; transition: background var(--t-quick), transform var(--t-press); }
.sheet-x:hover { background: #e6e6ea; } .sheet-x:active { transform: scale(.92); }
.sheet-back.out { animation: fade-out 280ms var(--out) both; }
.sheet-back.out .sheet { animation: sheet-down 280ms var(--out) both; }
body.sheet-open { overflow: hidden; }
body.sheet-open main { transform: scale(.985); transition: transform var(--t-sheet) var(--spring); }
main { transition: transform var(--t-sheet) var(--spring); }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { from { transform: none; } to { transform: translateY(100%); } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
@media (min-width: 900px) { .sheet-back { align-items: center; } .sheet { border-radius: var(--r-l); } }

/* ---------------------------------------------------------------- arrivée d'une page : glissement + cascade */
.enter > * { animation: rise var(--t-sheet) var(--spring) both; }
.enter > *:nth-child(2) { animation-delay: 40ms; } .enter > *:nth-child(3) { animation-delay: 80ms; }
.enter > *:nth-child(4) { animation-delay: 120ms; } .enter > *:nth-child(5) { animation-delay: 160ms; }
.enter > *:nth-child(n+6) { animation-delay: 200ms; }
.enter .features > *, .enter .plans > * { animation: rise var(--t-sheet) var(--spring) both; }
.enter .features > *:nth-child(1), .enter .plans > *:nth-child(1) { animation-delay: 60ms; }
.enter .features > *:nth-child(2), .enter .plans > *:nth-child(2) { animation-delay: 110ms; }
.enter .features > *:nth-child(3), .enter .plans > *:nth-child(3) { animation-delay: 160ms; }
.cascade > * { animation: rise var(--t-quick) var(--out) both; animation-delay: calc(min(var(--i, 0), 15) * 30ms); }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes sheet { from { opacity: 0; transform: translateY(28px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
.step.done.just .n { animation: pop var(--t-sheet) var(--spring) both; }

/* moins d'animations demandées par le système : simples fondus */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 150ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 150ms !important; }
  .enter > *, .cascade > *, .apercu, .result-box, .alert, #job .card { animation-name: fade !important; }
  .feature:hover, .plan:hover { transform: none; }
  .progress.indeterminate > div { animation: none !important; width: 100% !important; opacity: .35; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
