:root {
  --green-900: #064f28;
  --green-700: #0a7b3f;
  --green-600: #128c4a;
  --green-50: #ecf6ee;
  --gold-700: #735900;
  --gold-600: #a27a00;
  --gold-50: #fff8dc;
  --ink: #17241c;
  --ink-soft: #38473d;
  --muted: #5d6b62;
  --line: #d2dcd4;
  --surface: #ffffff;
  --wash: #f5f8f5;
  --danger: #a51d1d;
  --danger-wash: #fff1f0;
  --shadow: 0 16px 35px rgba(13, 49, 27, .12);
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--wash);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--wash); font-size: 16px; line-height: 1.55; }
a { color: var(--green-900); text-underline-offset: .16em; }
a:hover { color: var(--green-600); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .65; }
:focus-visible { outline: 3px solid var(--gold-600); outline-offset: 3px; }
::selection { color: #fff; background: var(--green-700); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-thumb { background: #a8b7ac; border: 3px solid var(--wash); border-radius: 999px; }

.shell { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; top: -48px; left: 18px; z-index: 5; padding: 8px 12px; background: #fff; border-radius: 7px; }
.skip-link:focus { top: 14px; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.tricolor { height: 5px; background: linear-gradient(90deg, #d31b2b 0 33.333%, #f3cd30 33.333% 66.666%, var(--green-600) 66.666%); }
.header-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; line-height: 1.15; }
.brand:hover { color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; background: var(--green-900); color: #fff; border-radius: 9px; font-weight: 800; letter-spacing: -.05em; }
.brand strong { display: block; font-size: 14px; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: end; gap: 20px; font-size: 14px; }
nav a { text-decoration: none; }
.inline-form { display: inline; }
.link-button { padding: 0; color: var(--green-900); background: transparent; border: 0; text-decoration: underline; text-underline-offset: .16em; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 18px; color: #fff; background: var(--green-700); border: 1px solid var(--green-700); border-radius: 8px; font-weight: 700; line-height: 1.2; text-decoration: none; transition: background .16s ease, transform .16s ease, box-shadow .16s ease; }
.button:hover { color: #fff; background: var(--green-600); border-color: var(--green-600); box-shadow: 0 8px 18px rgba(10,123,63,.2); transform: translateY(-1px); }
.button-small { min-height: 38px; padding: 8px 12px; font-size: 13px; }
.button-secondary { color: var(--green-900); background: #fff; border-color: var(--green-700); }
.button-secondary:hover { color: #fff; }
.text-link { font-weight: 700; }

.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 52px; padding: clamp(54px, 9vw, 112px) 0 70px; align-items: center; }
h1, h2, h3 { margin: 0; color: var(--ink); line-height: 1.12; letter-spacing: -.025em; }
h1 { max-width: 15ch; font-size: clamp(2.35rem, 5vw, 4.75rem); }
h2 { font-size: clamp(1.4rem, 2.7vw, 2rem); }
.hero-copy > p { max-width: 61ch; margin: 22px 0 0; color: var(--ink-soft); font-size: 1.12rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 30px; }
.limit-panel { padding: 28px; background: var(--green-900); border-radius: var(--radius); color: #e8f5eb; box-shadow: var(--shadow); }
.limit-panel h2 { color: #fff; font-size: 1.35rem; }
.limit-panel ul { margin: 18px 0; padding-left: 20px; }
.limit-panel li { margin: 9px 0; }
.limit-panel strong { color: #fff6c9; }
.limit-panel p { margin: 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.25); font-size: .92rem; }

.process { padding: 52px 0; border-top: 1px solid var(--line); }
.process > h2 { margin-bottom: 28px; }
.process ol { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 0; margin: 0; list-style: none; counter-reset: procedure; }
.process li { position: relative; padding-top: 50px; counter-increment: procedure; }
.process li::before { position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 32px; height: 32px; content: counter(procedure); background: var(--gold-50); border: 1px solid #e9d38b; border-radius: 50%; color: var(--gold-700); font-weight: 800; }
.process strong { display: block; font-size: 1.06rem; }
.process span { display: block; margin-top: 8px; color: var(--ink-soft); font-size: .94rem; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0 0 82px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.info-grid article { padding: 30px 28px 32px 0; }
.info-grid article + article { padding-left: 28px; border-left: 1px solid var(--line); }
.info-grid h2 { font-size: 1.2rem; }
.info-grid p { margin: 11px 0 0; color: var(--ink-soft); }

.form-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(360px, 1fr); gap: clamp(40px, 8vw, 110px); max-width: 970px; padding: 74px 0 92px; }
.form-layout.compact { max-width: 820px; }
.form-intro h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.form-intro p { max-width: 38ch; color: var(--ink-soft); font-size: 1.06rem; }
.form-card { display: flex; flex-direction: column; gap: 16px; padding: 30px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
label { display: flex; flex-direction: column; gap: 6px; color: var(--ink); font-weight: 700; font-size: .94rem; }
label span { color: var(--muted); font-size: .82rem; font-weight: 500; }
input, textarea, select { width: 100%; padding: 11px 12px; color: var(--ink); background: #fff; border: 1px solid #aebbb1; border-radius: 8px; line-height: 1.35; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #64736a; opacity: 1; }
input:focus, textarea:focus, select:focus { border-color: var(--green-700); outline: 3px solid #dceede; }
.field-help { margin: -8px 0 2px; color: var(--muted); font-size: .86rem; }
.form-foot { margin: 0; color: var(--ink-soft); font-size: .9rem; }
.alert { margin: 22px 0; padding: 14px 16px; border: 1px solid; border-radius: 9px; }
.alert-error { color: #781313; background: var(--danger-wash); border-color: #e5a4a0; }
.alert-info { color: #34471c; background: var(--gold-50); border-color: #e6cd76; }
.alert ul { margin: 0; padding-left: 18px; }
.message-card { max-width: 680px; margin: 90px auto; padding: 42px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.message-card p { color: var(--ink-soft); font-size: 1.08rem; }
.message-card .button { margin-top: 12px; }
.message-error { border: 1px solid #e5a4a0; }

.page-heading { display: flex; justify-content: space-between; align-items: start; gap: 24px; padding: 54px 0 30px; }
.page-heading h1 { max-width: none; font-size: clamp(2rem, 4vw, 3.2rem); }
.page-heading p { margin: 10px 0 0; color: var(--ink-soft); }
.back-link { display: inline-block; margin-bottom: 18px; font-weight: 700; }
.depot-list { margin-bottom: 80px; border-top: 1px solid var(--line); }
.depot-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 110px 22px; gap: 18px; align-items: center; padding: 22px 10px; color: var(--ink); border-bottom: 1px solid var(--line); text-decoration: none; transition: background .15s ease, color .15s ease; }
.depot-row:hover { color: var(--ink); background: var(--green-50); }
.depot-row > span:not(.state) { color: var(--muted); font-size: .9rem; }
.row-arrow { font-size: 1.25rem; color: var(--green-700) !important; }
.state { display: inline-flex; width: fit-content; padding: 4px 8px; border-radius: 999px; font-size: .78rem; font-weight: 800; line-height: 1.25; }
.state-brouillon { color: var(--gold-700); background: var(--gold-50); }
.state-soumis { color: var(--green-900); background: var(--green-50); }
.empty-state { max-width: 720px; padding: 35px 0 90px; }
.empty-state p { max-width: 56ch; color: var(--ink-soft); }

.form-page { padding-bottom: 88px; }
.long-form { display: flex; flex-direction: column; gap: 26px; }
fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 28px 0 34px; margin: 0; border: 0; border-top: 1px solid var(--line); }
legend { width: 100%; padding: 0 0 18px; font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
fieldset > label:nth-of-type(1):last-child, fieldset > label:has(textarea), fieldset > .field-help, #supports, #add-support { grid-column: 1 / -1; }
.support-entry { display: grid; grid-template-columns: 1.15fr .55fr 1fr .7fr .65fr; gap: 13px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.support-entry + .support-entry { margin-top: 8px; }
.remove-support { align-self: end; justify-self: start; padding: 0; color: #8a2020; background: transparent; border: 0; text-decoration: underline; font-weight: 700; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.detail-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 50px; padding: 30px 0; border-top: 1px solid var(--line); }
.detail-grid h2, .pieces-section h2, .submit-section h2 { font-size: 1.45rem; }
dl { margin: 18px 0 0; }
dt { margin-top: 18px; color: var(--muted); font-size: .83rem; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
dd { margin: 4px 0 0; white-space: pre-line; }
.support-list, .piece-list { display: grid; gap: 9px; margin: 18px 0 0; padding: 0; list-style: none; }
.support-list li, .piece-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.support-list span, .piece-list span { display: block; margin-top: 3px; color: var(--muted); font-size: .9rem; }
.pieces-section, .submit-section { padding: 30px 0; border-top: 1px solid var(--line); }
.pieces-section > p, .submit-section > p { max-width: 66ch; color: var(--ink-soft); }
.upload-form { display: flex; align-items: end; gap: 16px; margin-top: 20px; }
.upload-form label { flex: 1; }
.submit-section form { display: grid; gap: 18px; max-width: 720px; margin-top: 22px; }
.checkbox { display: flex; flex-direction: row; align-items: start; gap: 10px; font-weight: 500; }
.checkbox input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--green-700); }
.success { background: var(--green-50); padding: 28px; border-radius: var(--radius); border-top: 0; }
code { padding: 2px 5px; color: var(--ink-soft); background: #e9efe9; border-radius: 4px; font-size: .87em; word-break: break-all; }
.site-footer { padding: 28px 0; color: #d6e7da; background: var(--green-900); font-size: .86rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 18px; }

@media (max-width: 760px) {
  .shell { width: min(100% - 28px, 620px); }
  .header-inner { min-height: 76px; align-items: start; padding: 15px 0; }
  nav { gap: 12px; font-size: 13px; }
  nav > a:first-child { display: none; }
  .brand strong { max-width: 165px; }
  .hero, .form-layout, .detail-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero { padding: 48px 0; }
  .process { padding: 38px 0; }
  .process ol, .info-grid { grid-template-columns: 1fr; }
  .process li { padding-top: 42px; }
  .info-grid article, .info-grid article + article { padding: 25px 0; border-left: 0; border-top: 1px solid var(--line); }
  .info-grid article:first-child { border-top: 0; }
  .form-layout { padding: 45px 0 65px; }
  .form-card, .message-card { padding: 24px; }
  .page-heading { flex-direction: column; padding: 40px 0 25px; }
  .depot-row { grid-template-columns: 1fr 20px; gap: 8px; }
  .depot-row .state { grid-row: 1; }
  .depot-row strong { grid-column: 1; }
  .depot-row > span:not(.state):not(.row-arrow) { grid-column: 1; }
  .row-arrow { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  fieldset { grid-template-columns: 1fr; padding-top: 24px; }
  .support-entry { grid-template-columns: 1fr; }
  .upload-form { align-items: stretch; flex-direction: column; }
  .form-actions, .footer-inner { align-items: start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
