/* ============================================================
   Formulaire « Votre projet de site » — édition Minimal Luxe
   Pour changer les couleurs, modifiez les variables ci-dessous.
   Polices recommandées (à ajouter dans le <head> du HTML) :
   https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Inter:wght@300;400;500;600&display=swap
   ============================================================ */
:root {
  --bg: #F7F5F0;
  --paper: #FFFFFF;
  --ink: #141414;
  --muted: #7A7771;
  --line: #E8E4DC;
  --line-strong: #BDB8AD;
  --brand: #141414;
  --brand-2: #2B2B2B;
  --brand-soft: #F2EFE8;
  --accent: #A68A5B;
  --accent-soft: #F5F0E6;
  --danger: #9E3A32;
  --danger-soft: #F8EEEC;
  --radius: 2px;
  --radius-sm: 2px;
  --shadow: 0 30px 60px -40px rgba(20, 20, 20, .25);
  --font-body: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Cormorant Garamond', 'Fraunces', Georgia, 'Times New Roman', serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 15.5px/1.65 var(--font-body);
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--ink); color: #fff; }

/* décor d’arrière-plan : supprimé pour un rendu épuré */
.orbs { display: none; }

.shell {
  position: relative; z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 16px 64px;
}

/* ---------- en-tête ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 28px; }
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 500; font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
}
.brand-mark { width: 18px; height: 18px; border: 1px solid var(--ink); position: relative; background: transparent; }
.brand-mark::after {
  content: ""; position: absolute; width: 5px; height: 5px; border-radius: 0;
  background: var(--accent); right: -3px; top: -3px; border: 0;
}
.save-state {
  font-size: 12px; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; gap: 6px;
  opacity: 0; transform: translateY(-3px); transition: opacity .4s, transform .4s;
}
.save-state.on { opacity: 1; transform: none; }
.save-state svg { width: 14px; height: 14px; color: var(--accent); }

/* ---------- carte ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow);
  padding: 44px 48px 48px;
}

/* ---------- progression ---------- */
.progress { margin-bottom: 44px; }
.progress-meta {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px;
  font-size: 11.5px; color: var(--muted); font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
}
.progress-name { color: var(--ink); font-weight: 600; }
.progress-pct { margin-left: auto; font-variant-numeric: tabular-nums; }
.seg { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.seg li { flex: 1; }
.seg button {
  display: block; width: 100%; height: 2px; padding: 0; border: 0; border-radius: 0;
  background: var(--line); position: relative; overflow: hidden;
}
.seg button::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; bottom: -8px; } /* zone de clic élargie */
.seg button::after {
  content: ""; position: absolute; inset: 0; border-radius: 0;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform .7s var(--ease), background .3s;
}
.seg li.done button::after { transform: scaleX(1); }
.seg li.current button::after { transform: scaleX(1); background: var(--accent); }
.seg button:disabled { cursor: default; }
.seg button:not(:disabled):hover { background: var(--line-strong); }
.seg button:focus-visible { outline: 1px solid var(--ink); outline-offset: 6px; }

/* ---------- étapes ---------- */
.step.is-active { animation: in-fwd .7s var(--ease) both; }
#form[data-dir="back"] .step.is-active { animation-name: in-back; }
@keyframes in-fwd  { from { opacity: 0; transform: translateX(16px); }  to { opacity: 1; transform: none; } }
@keyframes in-back { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }

.step h2 {
  font: 500 clamp(32px, 5.5vw, 44px)/1.1 var(--font-head);
  letter-spacing: -.005em; margin: 0 0 14px; outline: none;
}
.lead { color: var(--muted); margin: 0 0 40px; max-width: 58ch; font-weight: 300; font-size: 15.5px; }
.group-title {
  font-weight: 600; font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase;
  margin: 40px 0 16px; padding-top: 22px; border-top: 1px solid var(--line);
}

/* ---------- champs ---------- */
.field { border: 0; padding: 0; margin: 0 0 30px; min-width: 0; }
.cond { animation: pop .5s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.field > label, .field > legend {
  display: block; padding: 0; margin-bottom: 10px;
  font-weight: 500; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
}
abbr { text-decoration: none; color: var(--accent); }
.opt { font-weight: 400; font-size: 11px; color: var(--muted); margin-left: 6px; letter-spacing: .06em; text-transform: none; }
.hint { margin: 9px 0 0; font-size: 13px; color: var(--muted); font-weight: 300; }
.hint.tight { margin: -14px 0 28px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }

input[type=text], input:not([type]), input[type=tel], input[type=email],
textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 11px 0;
  font-size: 16px; /* évite le zoom automatique sur iPhone */
  font-weight: 300;
  transition: border-color .3s, box-shadow .3s, background .3s;
  -webkit-appearance: none; appearance: none;
}
textarea {
  resize: vertical; min-height: 110px; line-height: 1.6;
  border: 1px solid var(--line-strong); padding: 14px 16px;
}
input::placeholder, textarea::placeholder { color: #B5B1A8; font-weight: 300; }
input:hover, textarea:hover { border-color: var(--ink); }
input:focus, textarea:focus {
  outline: none; border-color: var(--ink);
  box-shadow: 0 1px 0 0 var(--ink);
}
textarea:focus { box-shadow: 0 0 0 1px var(--ink); }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); background: var(--danger-soft); box-shadow: 0 1px 0 0 var(--danger); }
.err { color: var(--danger); font-size: 12.5px; font-weight: 500; letter-spacing: .02em; margin: 8px 0 0; min-height: 0; }
.err:empty { display: none; }
.field.invalid.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-3px); } 40%, 80% { transform: translateX(3px); } }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- pastilles de choix ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 0; font-weight: 400; font-size: 13.5px; letter-spacing: .04em;
  background: transparent; border: 1px solid var(--line-strong);
  transition: background .3s, border-color .3s, color .3s;
  user-select: none; -webkit-user-select: none;
}
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: none; }
.chip input[type=checkbox]:checked + span::before {
  content: ""; width: 12px; height: 12px; flex: none;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23C9AE7C' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.chip input:focus-visible + span { outline: 1px solid var(--ink); outline-offset: 3px; }

/* ---------- grandes cartes de choix ---------- */
.cards { display: grid; gap: 0; border: 1px solid var(--line); }
.card-opt { position: relative; cursor: pointer; display: block; }
.card-opt + .card-opt { border-top: 1px solid var(--line); }
.card-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.card-opt > span {
  display: grid; gap: 3px; padding: 20px 22px 20px 62px; border: 0; border-radius: 0;
  background: transparent; position: relative;
  transition: background .3s;
}
.card-opt > span::before {
  content: ""; position: absolute; left: 24px; top: 24px; width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: #fff; transition: all .3s;
}
.card-opt strong { font-weight: 500; font-size: 15.5px; letter-spacing: .01em; }
.card-opt small { color: var(--muted); font-size: 13.5px; font-weight: 300; }
.card-opt:hover > span { background: var(--bg); }
.card-opt input:checked + span { background: var(--brand-soft); }
.card-opt input:checked + span::before {
  border-color: var(--ink); background: var(--ink); box-shadow: inset 0 0 0 3.5px #fff;
}
.card-opt input:focus-visible + span { outline: 1px solid var(--ink); outline-offset: -4px; }

/* ---------- nuancier ---------- */
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px 10px; }
.sw { position: relative; display: grid; justify-items: center; gap: 9px; cursor: pointer; }
.sw input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sw .dot {
  width: 40px; height: 40px; border-radius: 50%; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
  transition: transform .3s var(--ease), box-shadow .3s; position: relative;
}
.sw em { font-style: normal; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; line-height: 1.25; }
.sw:hover .dot { transform: scale(1.06); }
.sw input:checked + .dot { box-shadow: inset 0 0 0 1px rgba(0,0,0,.1), 0 0 0 3px #fff, 0 0 0 4px var(--ink); transform: none; }
.sw input:checked + .dot::after {
  content: ""; position: absolute; inset: 0;
  background: no-repeat center/42% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5));
}
.sw input:checked ~ em { color: var(--ink); }
.sw input:focus-visible + .dot { outline: 1px solid var(--ink); outline-offset: 6px; }

/* ---------- upload ---------- */
.drop {
  display: grid; justify-items: center; gap: 4px; text-align: center; cursor: pointer;
  padding: 36px 16px; border-radius: 0; border: 1px dashed var(--line-strong); background: transparent;
  transition: border-color .3s, background .3s;
}
.drop svg { width: 26px; height: 26px; color: var(--accent); margin-bottom: 8px; stroke-width: 1.2; }
.drop strong { font-weight: 500; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.drop span { font-size: 13px; color: var(--muted); font-weight: 300; }
.drop:hover, .uploader.over .drop { border-color: var(--ink); background: var(--bg); }
.sr:focus-visible + .drop { outline: 1px solid var(--ink); outline-offset: 3px; }
.uploader.busy .drop { opacity: .6; pointer-events: none; }
.uploader.busy .drop strong::after { content: " — traitement…"; font-weight: 400; color: var(--muted); letter-spacing: .04em; text-transform: none; }

.thumbs { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.thumbs li {
  position: relative; aspect-ratio: 1; border-radius: 0; overflow: hidden;
  background: var(--brand-soft); border: 1px solid var(--line); animation: pop .5s var(--ease) both;
}
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .pdf { display: grid; place-items: center; height: 100%; font-weight: 500; color: var(--ink); font-size: 13px; letter-spacing: .2em; }
.thumbs .meta {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 10.5px; letter-spacing: .04em; color: #fff; text-align: center;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55)); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.thumbs .rm {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: rgba(20, 20, 20, .7); color: #fff; display: grid; place-items: center; padding: 0; transition: background .3s;
}
.thumbs .rm:hover { background: var(--danger); }
.thumbs .rm svg { width: 12px; height: 12px; }

/* ---------- emails ---------- */
.email-rows { display: grid; gap: 12px; margin-bottom: 16px; }
.email-row { display: flex; align-items: center; gap: 10px; animation: pop .4s var(--ease) both; }
.email-row input { flex: 1 1 0; min-width: 0; }
.email-row .at { flex: 0 1 auto; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-weight: 300; font-size: 15px; }
.email-row .rm { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); display: grid; place-items: center; padding: 0; transition: all .3s; }
.email-row .rm:hover { border-color: var(--danger); color: var(--danger); }
.email-row .rm svg { width: 13px; height: 13px; }

/* ---------- encarts ---------- */
.note {
  background: var(--accent-soft); border-left: 1px solid var(--accent); border-radius: 0;
  padding: 16px 20px; margin: 0 0 32px; font-size: 14px; font-weight: 300;
}
.note.good { background: var(--brand-soft); border-left-color: var(--ink); }
.banner {
  display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--line); border-left: 1px solid var(--accent);
  border-radius: 0; padding: 14px 20px; margin-bottom: 18px; font-size: 13.5px; font-weight: 300; box-shadow: var(--shadow);
}
.link {
  background: none; border: 0; padding: 4px 0; color: var(--ink); font-weight: 500; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--accent);
  transition: color .3s;
}
.link:hover { color: var(--accent); }

/* ---------- récap ---------- */
.summary { display: grid; gap: 22px; margin-bottom: 32px; }
.sum-group { border: 1px solid var(--line); border-radius: 0; overflow: hidden; background: transparent; }
.sum-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 20px; background: var(--brand-soft); border-bottom: 1px solid var(--line); }
.sum-head h3 { margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink); }
.sum-head .link { font-size: 11px; }
.sum-group dl { margin: 0; padding: 6px 20px 10px; }
.sum-row { padding: 13px 0; border-bottom: 1px solid var(--line); }
.sum-row:last-child { border-bottom: 0; }
.sum-row dt { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.sum-row dd { margin: 4px 0 0; overflow-wrap: anywhere; white-space: pre-line; font-weight: 300; }
.sum-empty { padding: 16px 20px; color: var(--muted); font-weight: 300; }

.field > label.check, .check { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; font-weight: 300; font-size: 14px; letter-spacing: 0; text-transform: none; margin: 0; }
.check input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--ink); }
.consent { padding: 18px 20px; border: 1px solid var(--line); border-radius: 0; background: transparent; margin-bottom: 4px; }
.consent.invalid { border-color: var(--danger); background: var(--danger-soft); }

/* ---------- navigation ---------- */
.nav { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 44px; }
.nav .btn:only-of-type, .nav .btn.primary { margin-left: auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  border: 1px solid transparent; border-radius: 0; padding: 17px 38px;
  font-weight: 500; font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  transition: background .35s, border-color .35s, color .35s, gap .35s var(--ease); position: relative; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 16px; height: 16px; flex: none; stroke-width: 1.4; }
.btn.primary { background: var(--ink); color: #fff; box-shadow: none; border-color: var(--ink); }
.btn.primary:hover { background: transparent; color: var(--ink); gap: 16px; }
.btn.primary:active, .btn.ghost:active { opacity: .85; }
.btn.primary:focus-visible, .btn.ghost:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.small { padding: 11px 20px; font-size: 11px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.send .fill { position: absolute; inset: 0; background: rgba(166, 138, 91, .55); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.btn.send .label { position: relative; }
.btn.send.sending { pointer-events: none; }
.form-error { margin: 18px 0 0; padding: 14px 18px; border-radius: 0; border-left: 1px solid var(--danger); background: var(--danger-soft); color: var(--danger); font-weight: 400; font-size: 14px; }

/* ---------- merci ---------- */
.done { text-align: center; padding: 48px 8px 20px; animation: in-fwd .9s var(--ease) both; }
.done h2 { font: 500 clamp(34px, 6vw, 48px)/1.08 var(--font-head); margin: 28px 0 14px; outline: none; }
.done .lead { margin: 0 auto 10px; }
.done-check { width: 72px; height: 72px; }
.done-check circle { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw 1s .1s var(--ease) forwards; fill: none; }
.done-check path { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s .8s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- divers ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50;
  background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 0; font-size: 13px; letter-spacing: .04em; max-width: min(92vw, 440px);
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .5); animation: toast-in .5s var(--ease) both;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.foot { text-align: center; color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin: 28px 12px 0; }

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .shell { padding: 14px 12px 28px; }
  .card { padding: 30px 22px 28px; }
  .grid-2 { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: repeat(4, 1fr); }
  .progress-meta { flex-wrap: wrap; }
  .nav {
    position: sticky; bottom: 0; z-index: 5;
    margin: 32px -22px -28px; padding: 14px 22px calc(14px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); border-radius: 0;
  }
  .nav .btn.primary { flex: 1; }
  .btn { padding: 16px 22px; }
  .email-row .at { max-width: 42%; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}