/* ==========================================================
   Déclaration de sinistre copropriété — DA minimaliste
   ========================================================== */

:root {
  --ink: #0f1f33;          /* texte principal / bleu nuit */
  --ink-2: #44546a;        /* texte secondaire */
  --ink-3: #7a8799;        /* texte discret */
  --line: #e3e7ec;         /* bordures */
  --line-2: #cfd6de;
  --bg: #f6f7f9;           /* fond de page */
  --surface: #ffffff;
  --brand: #0b3a6e;        /* bleu cabinet */
  --brand-soft: #eaf1f9;
  --accent: #c8102e;       /* rouge, usage très ponctuel */
  --accent-soft: #fdf1f3;
  --ok: #1f7a4d;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 31, 51, .04), 0 8px 24px rgba(15, 31, 51, .05);
  --focus: 0 0 0 4px rgba(11, 58, 110, .14);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
p { margin: 0; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
em { color: var(--accent); font-style: normal; }

/* ---------- Topbar ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand__mark {
  display: grid; place-items: center; flex: none;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .02em;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand__text strong { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__text small { font-size: 12px; color: var(--ink-3); }

.topbar__phone {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  font-weight: 600; font-size: 14px; text-decoration: none; color: var(--ink);
  padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .15s, background .15s;
}
.topbar__phone:hover { border-color: var(--line-2); background: var(--bg); }
.topbar__phone svg { width: 16px; height: 16px; fill: var(--brand); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-soft); padding: 5px 10px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; font-weight: 700; max-width: 16ch; }
.hero__lead { margin-top: 16px; max-width: 60ch; font-size: 16px; color: var(--ink-2); }
.hero__facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--ink-2); font-size: 14px; }
.hero__facts span { color: var(--ink); font-weight: 600; }

/* ---------- Layout ---------- */
.layout {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start;
  padding-bottom: 72px;
}
.layout > * { min-width: 0; }
.aside { position: sticky; top: 24px; display: grid; gap: 14px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card--soft, .card--alert, .card--plain { padding: 20px; font-size: 14px; }
.card--soft { background: var(--surface); }
.card--alert { background: var(--accent-soft); border-color: #f4d6dc; }
.card--plain { background: transparent; }
.aside__title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }

.checklist { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 9px; }
.checklist li { position: relative; padding-left: 24px; color: var(--ink-2); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 4px;
  border: 1.5px solid var(--line-2);
}
.link-strong { display: inline-block; margin-top: 10px; font-weight: 700; font-size: 17px; color: var(--accent); text-decoration: none; }

/* ---------- Form ---------- */
.form { padding: 8px 36px 32px; box-shadow: var(--shadow); }

.steps {
  list-style: none; margin: 0 -36px; padding: 18px 36px; display: flex; gap: 8px;
  border-bottom: 1px solid var(--line); counter-reset: s; overflow-x: auto;
  position: sticky; top: 0; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-radius: var(--radius) var(--radius) 0 0; z-index: 2;
}
.steps li {
  counter-increment: s; display: flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: 13px; font-weight: 500; color: var(--ink-3); padding-right: 14px;
}
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  font-size: 11px; font-weight: 600; border: 1.5px solid var(--line-2); color: var(--ink-3); transition: all .2s;
}
.steps li:not(:last-child)::after { content: ""; width: 24px; height: 1px; background: var(--line-2); margin-left: 6px; }
.steps li.is-active { color: var(--ink); }
.steps li.is-active::before { border-color: var(--brand); color: var(--brand); }
.steps li.is-done::before { content: "✓"; background: var(--brand); border-color: var(--brand); color: #fff; }

.section { border: 0; margin: 0; padding: 32px 0 8px; min-width: 0; }
.section + .section { border-top: 1px solid var(--line); }
.section legend {
  float: left; width: 100%; padding: 0; margin-bottom: 22px;
  display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 600; letter-spacing: -.01em;
}
.section legend + * { clear: both; }
.num {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 700;
}
.section__intro { margin: -8px 0 16px; font-size: 14px; }

.grid { display: grid; gap: 0 18px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }

.field { margin-bottom: 20px; min-width: 0; }
.field > label, .label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 7px; }
.opt { font-weight: 400; color: var(--ink-3); font-size: 12px; margin-left: 4px; }
.hint { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 11px 13px; min-height: 44px; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
textarea { resize: vertical; min-height: 120px; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2344546a' stroke-width='1.6'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
input::placeholder, textarea::placeholder { color: #a6b0bd; }
input:hover, select:hover, textarea:hover { border-color: #b6c0cc; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }

.is-invalid input, .is-invalid select, .is-invalid textarea,
input.is-invalid, textarea.is-invalid { border-color: var(--accent); }
.is-invalid .choice span { border-color: #ecb3bd; }
.error-msg { display: block; margin-top: 6px; font-size: 12.5px; color: var(--accent); }

/* Choix (radios en "chips") */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices--grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex; align-items: center; justify-content: center; text-align: center; height: 100%;
  min-height: 42px; padding: 9px 14px; font-size: 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface); transition: all .15s; user-select: none;
}
.choice:hover span { border-color: #b6c0cc; }
.choice input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 500; box-shadow: inset 0 0 0 1px var(--brand); }
.choice input:focus-visible + span { box-shadow: var(--focus); }

.field--cond { display: none; }
.field--cond.is-visible { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.notice {
  margin: -4px 0 20px; padding: 12px 14px; font-size: 13.5px; color: var(--ink-2);
  background: var(--brand-soft); border-radius: var(--radius-sm); border-left: 3px solid var(--brand);
}
.notice strong { color: var(--ink); }

/* Dropzone */
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 34px 20px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: var(--bg);
  cursor: pointer; text-align: center; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone svg { width: 28px; height: 28px; fill: none; stroke: var(--brand); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.dropzone__title { font-weight: 600; font-size: 14.5px; }
.dropzone__sub { font-size: 13px; color: var(--ink-2); }
.dropzone__sub u { color: var(--brand); text-underline-offset: 2px; }

/* Emplacements de documents */
.docs { display: grid; gap: 12px; }
.doc {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 16px; transition: border-color .15s, background .15s;
}
.doc.is-over { border-color: var(--brand); background: var(--brand-soft); border-style: dashed; }
.doc.has-files { border-color: #c9d8ea; }
.doc__head { display: flex; align-items: center; gap: 14px; }
.doc__icon {
  flex: none; width: 42px; height: 42px; border-radius: 10px; background: var(--bg);
  display: grid; place-items: center; transition: background .15s;
}
.doc.has-files .doc__icon { background: var(--brand-soft); }
.doc__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--brand); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.doc__text { flex: 1; min-width: 0; }
.doc__title { font-weight: 600; font-size: 14.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.doc__desc { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.badge {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--bg); color: var(--ink-3); border: 1px solid var(--line);
}
.badge--key { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.doc__btn {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line-2);
  font-size: 13.5px; font-weight: 600; color: var(--brand); cursor: pointer; background: var(--surface);
  transition: background .15s, border-color .15s;
}
.doc__btn::before { content: "+"; font-size: 16px; line-height: 1; font-weight: 500; }
.doc__btn:hover { background: var(--brand-soft); border-color: var(--brand); }
.doc__btn:focus-within { box-shadow: var(--focus); }
.doc__btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.doc .files:empty { display: none; }
.doc .files { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Associés */
.team__list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.team__list li { display: flex; align-items: center; gap: 12px; }
.team__list strong { display: block; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.team__list small { font-size: 12px; color: var(--ink-3); }
.avatar {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.team__gan { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.team__gan strong { color: var(--ink-2); font-weight: 600; }

.files { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.files li {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.files li.is-error { border-color: #ecb3bd; background: var(--accent-soft); }
.file__thumb {
  flex: none; width: 38px; height: 38px; border-radius: 8px; background: var(--brand-soft) center/cover no-repeat;
  display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--brand); text-transform: uppercase;
}
.file__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file__name { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file__size { font-size: 12px; color: var(--ink-3); }
.files li.is-error .file__size { color: var(--accent); }
.file__remove {
  flex: none; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent;
  color: var(--ink-3); font-size: 18px; line-height: 1; cursor: pointer;
}
.file__remove:hover { background: var(--bg); color: var(--ink); }
.files__total { margin-top: 10px; font-size: 12.5px; color: var(--ink-3); text-align: right; }
.files__total.is-over { color: var(--accent); }

/* Consentements */
.consent { border-top: 1px solid var(--line); padding-top: 26px; margin-top: 16px; display: grid; gap: 12px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input {
  flex: none; width: 20px; height: 20px; margin: 1px 0 0; border: 1.5px solid var(--line-2); border-radius: 6px;
  -webkit-appearance: none; appearance: none; background: var(--surface) center/12px no-repeat; cursor: pointer; transition: all .15s;
}
.check input:checked {
  background-color: var(--brand); border-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17.5 19 7'/%3E%3C/svg%3E");
}
.check input:focus-visible { box-shadow: var(--focus); }
.check.is-invalid input { border-color: var(--accent); }

.form__error {
  margin-top: 20px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 500;
}

.actions { margin-top: 26px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px; border: 0; border-radius: 12px;
  background: var(--brand); color: #fff; font: inherit; font-weight: 600; font-size: 15px;
  cursor: pointer; text-decoration: none; transition: background .15s, transform .05s;
}
.btn:hover { background: #082d56; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn__spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.is-loading .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn--ghost { background: transparent; color: var(--brand); border: 1px solid var(--line-2); }
.btn--ghost:hover { background: var(--bg); }

/* Confirmation */
.success { grid-column: 2; padding: 56px 36px; text-align: center; box-shadow: var(--shadow); outline: none; }
.success h2 { font-size: 26px; margin: 18px 0 10px; }
.success p { max-width: 46ch; margin: 0 auto 8px; color: var(--ink-2); }
.success__icon { width: 60px; height: 60px; margin: 0 auto; border-radius: 50%; background: #e8f4ee; display: grid; place-items: center; }
.success__icon svg { width: 28px; height: 28px; fill: none; stroke: var(--ok); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.success__ref {
  display: inline-block; margin: 8px 0 18px !important; padding: 10px 18px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line); font-weight: 700; color: var(--ink) !important; letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.success .btn { margin-top: 18px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0; font-size: 13.5px; color: var(--ink-2); }
.footer__inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-end; }
.footer strong { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .aside { position: static; order: 2; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .success { grid-column: 1; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero { padding: 36px 0 28px; }
  .topbar__inner { height: 60px; }
  .brand__text small { display: none; }
  .topbar__phone { padding: 8px 12px; font-size: 13px; }
  .form { padding: 0 18px 24px; }
  .steps { margin: 0 -18px; padding: 14px 18px; }
  .steps li { font-size: 12px; padding-right: 4px; }
  .steps li:not(:last-child)::after { width: 10px; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .choices--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc__head { flex-wrap: wrap; }
  .doc__text { flex-basis: calc(100% - 56px); }
  .doc__btn { width: 100%; justify-content: center; }
  .actions { flex-direction: column-reverse; align-items: stretch; }
  .btn { width: 100%; }
  .success { padding: 40px 20px; }
}

@media (max-width: 380px) {
  .brand__text strong { font-size: 13px; }
  .topbar__phone svg { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
