/* Babylone Courtage — formulaire de devis.
 * Ce bloc remplace la feuille de style du site ADPO (assets/style.css) : mêmes noms de
 * variables, aux couleurs de Babylone (noir et blanc), pour reprendre devis.css tel quel. */
:root {
  --blue-900: #111;
  --blue-700: #000;
  --blue-500: #555;
  --blue-50: #f2f2f2;
  --ice: #f7f7f7;
  --orange: #00d1b2;
  --orange-dark: #00a88f;
  --yellow: #00d1b2;
  --ink: #1d1d1f;
  --muted: #666;
  --line: #e2e2e2;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .08);
  --max: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-700); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; color: var(--blue-900); font-family: var(--serif); font-weight: 700; }
strong { color: var(--blue-900); }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.4em; border-radius: 18px;
  font-weight: 700; text-decoration: none; line-height: 1.2;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.btn-primary { background: #000; color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.btn-primary:hover { background: #333; color: #fff; transform: translateY(-1px); }
.btn-ghost { border: 2px solid currentColor; color: var(--ink); }
.btn-ghost:hover { background: var(--blue-50); }

.site-header { position: sticky; top: 0; z-index: 50; background: #000; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand img { width: 56px; height: 48px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--font); font-weight: 500; font-size: .78rem; color: #bbb; }
.site-header .header-help { color: #fff; }
.site-header .header-help:hover { color: var(--orange); }

.site-footer { background: #111; color: #aaa; font-size: .92rem; }
.site-footer a { color: #eee; text-decoration: none; }
.site-footer a:hover { color: var(--orange); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .85rem; }

/* Formulaire de devis (repris de www2/devis/devis.css sur ADPO) */
body { background: var(--ice); display: flex; flex-direction: column; min-height: 100vh; }
.devis { flex: 1; padding: 32px 0 56px; }
.devis-inner { max-width: 760px; }
.header-help { margin-left: auto; font-weight: 600; text-decoration: none; font-size: .95rem; }
@media (max-width: 520px) { .header-help { display: none; } }
.devis-footer { padding: 20px 0; }
.devis-footer .footer-bottom { margin: 0 auto; padding-top: 0; border: 0; }

[hidden] { display: none !important; }

/* Progression */
.progress { height: 8px; background: #e5e5e5; border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue-500), var(--orange)); border-radius: 99px; transition: width .35s ease; }
.progress-label { font-size: .85rem; font-weight: 600; color: var(--muted); margin: 8px 0 20px; }

/* Étapes */
#wizard { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 32px; }
@media (max-width: 640px) { #wizard { padding: 22px 16px; border-radius: 14px; } .devis { padding-top: 20px; } }
.step h1 { font-size: clamp(1.45rem, 3.4vw, 1.9rem); margin: 0 0 24px; outline: none; }

/* Champs */
.field { margin: 0 0 18px; flex: 1; min-width: 0; }
.field label, .field .label { display: block; font-weight: 600; font-size: .95rem; color: var(--blue-900); margin-bottom: 6px; }
.field small { font-weight: 400; color: var(--muted); }
.field-sm { flex: 0 0 120px; }
.field-md { max-width: 260px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > .field { min-width: 180px; }
.row > .field-sm { min-width: 100px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="number"], select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: .72em .85em; border: 1.5px solid #cfcfcf; border-radius: 10px; background: #fff;
  transition: border-color .15s, box-shadow .15s; min-height: 48px;
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111111' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
input:focus, select:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(0, 0, 0, .15); }
input:user-invalid, select:user-invalid { border-color: #d24a3c; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 2.4em; }
.input-suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }

/* Choix sous forme de cartes */
.choices { display: grid; gap: 14px; }
.choices-2 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex; flex-direction: column; gap: 4px; height: 100%;
  padding: 20px 22px; border: 2px solid var(--line); border-radius: 14px; background: #fff;
  transition: border-color .15s, background .15s, transform .15s;
}
.choice strong { font-size: 1.08rem; }
.choice small { color: var(--muted); }
.choice:hover span { border-color: var(--blue-500); transform: translateY(-2px); }
.choice input:checked + span { border-color: var(--blue-700); background: var(--blue-50); box-shadow: inset 0 0 0 1px var(--blue-700); }
.choice input:focus-visible + span { box-shadow: 0 0 0 4px rgba(0, 0, 0, .25); }

/* Boutons segmentés (oui / non, types…) */
.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented label {
  display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer;
  padding: .6em 1em; border: 1.5px solid #cfcfcf; border-radius: 999px; font-weight: 600; font-size: .95rem; color: var(--ink);
  background: #fff; transition: border-color .15s, background .15s;
}
.segmented input { accent-color: var(--blue-700); margin: 0; }
.segmented label:has(input:checked) { border-color: var(--blue-700); background: var(--blue-50); color: var(--blue-900); }
#date-mode { margin-bottom: 20px; }

/* Banques */
.banks { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-bottom: 20px; }
.bank { cursor: pointer; position: relative; }
.bank input { position: absolute; opacity: 0; pointer-events: none; }
.bank span {
  display: grid; place-items: center; height: 84px; padding: 10px;
  border: 2px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s, transform .15s;
}
.bank img { max-height: 56px; width: auto; object-fit: contain; }
.bank:hover span { border-color: var(--blue-500); transform: translateY(-2px); }
.bank input:checked + span { border-color: var(--blue-700); box-shadow: inset 0 0 0 1px var(--blue-700); background: var(--blue-50); }
.bank input:focus-visible + span { box-shadow: 0 0 0 4px rgba(0, 0, 0, .25); }

/* Cartes de prêt et d'emprunteur */
fieldset.card { border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px 6px; margin: 0 0 20px; box-shadow: none; background: var(--ice); }
fieldset.card legend { font-weight: 800; color: var(--blue-900); padding: 0 8px; margin-left: -8px; font-size: 1.05rem; }
@media (max-width: 640px) { fieldset.card { padding: 16px 14px 4px; } }

.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; margin: 8px 0 12px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue-700); flex: none; }
.note { font-size: .88rem; color: var(--muted); }

/* Navigation */
.nav-buttons { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.nav-buttons .btn { border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 1rem; }
.nav-buttons .btn-ghost { border: 2px solid currentColor; background: none; }
#next { margin-left: auto; }
#next:disabled { opacity: .7; cursor: progress; transform: none; }
.form-error { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: #fdecea; color: #a1281c; font-weight: 600; }
@media (max-width: 480px) { .nav-buttons .btn { padding: .8em 1.1em; } }

/* Attente pendant la tarification (devis.js, waiting) */
#attente { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(10, 14, 22, .65); }
body.en-attente { overflow: hidden; }
.attente-carte { background: #fff; border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); padding: 32px 28px; max-width: 460px; width: 100%; text-align: center; }
.attente-carte h2 { font-size: 1.3rem; margin: 14px 0 10px; color: var(--blue-900); }
.attente-carte p { margin: 0 0 12px; color: var(--ink); }
.attente-assureur { color: var(--muted) !important; font-size: .95rem; min-height: 1.5em; }
.attente-assureur strong { color: var(--blue-900); }
.attente-roue { width: 54px; height: 54px; margin: 0 auto; border-radius: 50%; border: 5px solid var(--line); border-top-color: var(--orange); animation: attente-tourne .9s linear infinite; }
@keyframes attente-tourne { to { transform: rotate(360deg); } }
.attente-barre { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 6px; }
#attente-avance { height: 100%; width: 0; background: var(--orange); border-radius: 99px; transition: width 2.4s linear; }
@media (prefers-reduced-motion: reduce) { .attente-roue { animation-duration: 3s; } #attente-avance { transition: none; } }
