:root { font-family: system-ui, sans-serif; color: #182c38; background: #f2f5f5; line-height: 1.5; }
* { box-sizing: border-box; }
body { margin: 0; }
header { padding: 2.5rem max(1rem, calc((100vw - 1200px) / 2)); background: #123e44; color: white; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin: .3rem 0; }
h2 { font-size: 1.35rem; margin-top: 0; }
h3 { margin: 0; font-size: 1.05rem; }
.eyebrow { letter-spacing: .12em; font-weight: 700; font-size: .8rem; }
main { max-width: 1232px; padding: 1rem; margin: auto; }
aside { padding: 1rem; background: #fff0ce; border-left: 4px solid #9a6207; }
section { background: white; padding: 1.25rem; margin: 1rem 0; border: 1px solid #ccd8da; border-radius: .6rem; min-width: 0; }
.forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.forms section { margin: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { color: #405b64; margin-bottom: .5rem; }
label { display: grid; gap: .3rem; font-weight: 600; margin-bottom: .8rem; }
input, select, button { font: inherit; min-height: 44px; border-radius: .3rem; padding: .6rem; max-width: 100%; }
input, select { border: 1px solid #6a8188; width: 100%; background: white; color: #182c38; }
button { background: #125d65; color: white; border: 2px solid transparent; cursor: pointer; font-weight: 650; }
button:hover { background: #0b4248; }
:focus-visible { outline: 3px solid #b05a00; outline-offset: 3px; }
:disabled { opacity: .65; cursor: default; }
.actions { display: flex; flex-wrap: wrap; align-items: start; gap: 1rem; }
.file { max-width: 100%; }
.lots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: .8rem; }
article { padding: 1rem; background: #f0f6f5; border-left: 3px solid #237780; overflow-wrap: anywhere; }
article p { margin-bottom: 0; }
ol { padding-left: 1.5rem; }
li { padding: .8rem .2rem; border-bottom: 1px solid #ccd8da; overflow-wrap: anywhere; }
li p { margin: .3rem 0; }
small { color: #405b64; }
#message { font-weight: 650; overflow-wrap: anywhere; }
footer { padding: 1rem; text-align: center; color: #405b64; }
[hidden] { display: none !important; }
@media (max-width: 700px) { .forms { grid-template-columns: 1fr; } section { padding: 1rem; } .actions { flex-direction: column; } }
.table-wrap { overflow-x: auto; margin: .8rem 0; }
#releve table, #occupation-section table { border-collapse: collapse; width: 100%; min-width: 28rem; }
#releve caption, #occupation-section caption { text-align: left; font-weight: 650; padding: .3rem 0; }
#releve th, #occupation-section th, #releve td, #occupation-section td { border: 1px solid #ccd8da; padding: .4rem .5rem; text-align: left; vertical-align: top; }
@media print {
  body > header, body > nav, footer, main > :not(#releve), #releve > p, #releve .actions { display: none !important; }
  main { max-width: none; padding: 0; }
  #releve { border: 0; padding: 0; margin: 0; }
  .table-wrap { overflow: visible; }
  #releve table { min-width: 0; }
  #releve th, #releve td { border-color: black; }
  thead { display: table-header-group; } tr { break-inside: avoid; page-break-inside: avoid; }
}

.contrat-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.contrat-check { display: flex; align-items: center; gap: .55rem; align-self: center; }
.contrat-check input { width: auto; min-height: auto; }
.contrat-fields small { font-weight: 400; }
@media (max-width: 700px) { .contrat-fields { grid-template-columns: minmax(0, 1fr); } }

.reprise-etapes > li { border-bottom: 0; padding: .4rem .2rem; }
.reprise-etapes p { margin-top: 0; }
button.reprise-secondaire { background: white; color: #125d65; border-color: #125d65; }
button.reprise-secondaire:hover { background: #e6f1f1; }
#reprise-apercu { border-top: 1px solid #ccd8da; margin-top: 1rem; padding-top: 1rem; }
#reprise-apercu h3 { margin: 1rem 0 .4rem; }
.reprise-total { font-weight: 650; }
.reprise-erreurs { border-left: 4px solid #a3262a; background: #fbeeee; padding: .2rem 1rem; margin: .8rem 0; }
.reprise-deja { border-left: 4px solid #6a8188; background: #f2f5f5; padding: .2rem 1rem; margin: .8rem 0; }
.reprise-erreurs ul, .reprise-deja ul { padding-left: 1.2rem; margin: .4rem 0; }
.reprise-erreurs li, .reprise-deja li { padding: .3rem 0; }
.reprise-premier { border: 2px solid #125d65; border-radius: .4rem; padding: .8rem 1rem; margin: .8rem 0; }
.reprise-premier legend { font-weight: 650; color: #182c38; padding: 0 .3rem; }
.reprise-premier .contrat-check { margin-bottom: .4rem; align-self: start; min-height: 44px; }
.reprise-premier .contrat-check input { width: 1.25rem; height: 1.25rem; flex: none; margin: 0; }
#reprise-premier-mois { font-weight: 700; font-size: 1.05rem; }
#reprise-apercu table { border-collapse: collapse; width: 100%; min-width: 46rem; }
#reprise-apercu caption { text-align: left; font-weight: 650; padding: .3rem 0; }
#reprise-apercu th, #reprise-apercu td { border: 1px solid #ccd8da; padding: .35rem .5rem; text-align: left; vertical-align: top; }
#reprise-resultat { font-weight: 650; }

@media screen {
  h1 { font-size: var(--t-page); }
  h2 { font-size: var(--t-carte); }
  h3 { font-size: var(--t-corps); }
  .eyebrow, .contrat-fields small { font-size: var(--t-meta); }
  #reprise-premier-mois { font-size: var(--t-carte); }
}
