/* Aperçu IA : le client photographie son plancher */
.ai { background: linear-gradient(to bottom, #fff, var(--tint) 60%, #fff); }
.ai__panel { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; padding: 14px; border-radius: var(--r-panel); background: #fff; border: 1px solid var(--line); box-shadow: 0 40px 80px -50px rgba(60, 30, 10, .35); }
.ai__stage { position: relative; min-height: 600px; border-radius: 18px; overflow: hidden; background: var(--ink); touch-action: pan-y; user-select: none; -webkit-user-select: none; }

/* Zone de dépôt */
.ai__drop { position: absolute; inset: 0; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; color: #fff; background: url("img/demo/client.jpg") center / cover; }
.ai__drop::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 50% at 50% 45%, rgba(242, 106, 27, .22), rgba(14, 14, 14, 0)), rgba(14, 14, 14, .78); }
.ai__drop::after { content: ''; position: absolute; inset: 18px; border: 2px dashed rgba(255, 255, 255, .28); border-radius: 14px; pointer-events: none; transition: border-color .3s var(--ease); }
.ai__drop.is-over::after { border-color: var(--orange); }
.ai__drop > * { position: relative; z-index: 1; }
.ai__drop-icon { width: 72px; height: 72px; border-radius: 22px; background: var(--orange); display: grid; place-items: center; font-size: 34px; box-shadow: 0 16px 40px -12px rgba(242, 106, 27, .8); }
.ai__drop b { margin-top: 8px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.ai__drop small { max-width: 320px; color: rgba(255, 255, 255, .72); font-size: 14.5px; }
.ai__drop-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.ai__drop-btns .btn--ghost { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }

/* Photo et comparateur */
.ai__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.ai__after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--split, 50%)); }
.ai__tag { position: absolute; top: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(14, 14, 14, .62); color: #fff; font-size: 13px; font-weight: 700; pointer-events: none; }
.ai__tag--l { left: 14px; }
.ai__tag--r { right: 14px; background: var(--orange); }
.ai__handle { position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, .35); outline: none; cursor: ew-resize; }
.ai__handle span { position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-size: 18px; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .5); }
.ai__handle:focus-visible span { box-shadow: 0 0 0 3px var(--orange); }
.ai__retake { position: absolute; left: 14px; bottom: 14px; align-items: center; gap: 8px; padding: 9px 14px; border: 0; border-radius: 999px; background: rgba(14, 14, 14, .62); color: #fff; font: 700 13.5px 'Plus Jakarta Sans', sans-serif; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 2; }
.ai__retake:hover { background: rgba(14, 14, 14, .82); }

/* Sablage virtuel pendant la génération */
.ai__sanding { position: absolute; inset: 0; pointer-events: none; overflow: hidden; background: rgba(14, 14, 14, .25); }
.ai__sanding i { position: absolute; left: 0; right: 0; height: 38%; bottom: -38%; background: linear-gradient(to top, rgba(255, 255, 255, 0), rgba(255, 255, 255, .35) 70%, rgba(255, 255, 255, .9) 98%, rgba(255, 255, 255, .95)); mix-blend-mode: screen; animation: aiSweep 2.6s cubic-bezier(.45, 0, .2, 1) infinite; }
.ai__sanding::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255, 255, 255, .7) 1px, transparent 1.6px); background-size: 26px 30px; opacity: .5; animation: aiDust 1.4s linear infinite; }
@keyframes aiSweep { to { transform: translateY(-370%); } }
@keyframes aiDust { to { background-position: 13px -60px; } }
.ai__status { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; background: rgba(14, 14, 14, .72); color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* Ce qui est visible selon l'étape */
.ai__drop, .ai__img, .ai__after, .ai__tag, .ai__handle, .ai__retake, .ai__sanding, .ai__status { display: none; }
.ai__stage[data-state="empty"] .ai__drop { display: flex; }
.ai__stage[data-state="photo"] [data-ai-before] { display: block; }
.ai__stage[data-state="photo"] .ai__retake, .ai__stage[data-state="result"] .ai__retake { display: inline-flex; }
.ai__stage[data-state="busy"] [data-ai-before], .ai__stage[data-state="busy"] .ai__sanding, .ai__stage[data-state="busy"] .ai__status { display: block; }
.ai__stage[data-state="result"] .ai__img, .ai__stage[data-state="result"] .ai__after, .ai__stage[data-state="result"] .ai__tag, .ai__stage[data-state="result"] .ai__handle { display: block; }

/* Panneau de réglages */
.ai__side { display: flex; flex-direction: column; gap: 14px; }
.ai__card { padding: 22px; border-radius: 18px; background: var(--tint); border: 1px solid var(--tint-2); display: flex; flex-direction: column; gap: 18px; }
.ai__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.ai__steps li { display: flex; flex-direction: column; gap: 6px; }
.ai__steps li::after { content: ''; height: 3px; border-radius: 3px; background: var(--tint-2); }
.ai__steps span { display: none; }
.ai__steps .is-current { color: var(--ink); }
.ai__steps .is-current::after { background: var(--orange); }
.ai__steps .is-done::after { background: #f6b58c; }
.ai__group { margin: 0; padding: 0; border: 0; min-width: 0; }
.ai__group legend { display: flex; justify-content: space-between; width: 100%; padding: 0; margin-bottom: 10px; font-weight: 800; font-size: 15px; }
.ai__group legend span { font-weight: 600; color: var(--ink-2); }
.ai__group input { position: absolute; opacity: 0; pointer-events: none; }
.ai__swatches { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.ai__swatches label { aspect-ratio: 1; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); transition: transform .3s var(--ease); }
.ai__swatches label:hover { transform: scale(1.08); }
.ai__swatches input:checked + label { box-shadow: 0 0 0 2px var(--tint), 0 0 0 4px var(--orange); }
.ai__seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.ai__seg label { padding: 9px 4px; border-radius: 9px; text-align: center; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.ai__seg input:checked + label { background: var(--ink); color: #fff; }
.ai__group input:focus-visible + label { outline: 2px solid var(--orange); outline-offset: 2px; }
.ai__consent { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; font-size: 13px; line-height: 1.45; color: var(--ink-2); cursor: pointer; }
.ai__consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--orange); }
.ai__error { font-size: 13.5px; color: #c22c24; font-weight: 600; }
.ai__error:empty, .ai__turnstile:empty { display: none; }
.ai__demo { border: 0; background: none; padding: 0; font: 600 13.5px 'Plus Jakarta Sans', sans-serif; color: var(--orange-d); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: center; }
.ai__lead { gap: 14px; }
.ai__lead h3, .ai__done h3 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.ai__lead > p, .ai__done p { color: var(--ink-2); font-size: 14.5px; }
.ai__lead .field input { height: 46px; }
.ai__lead-icon { width: 44px; height: 44px; border-radius: 13px; background: var(--orange); color: #fff; display: grid; place-items: center; font-size: 20px; }
.ai__done { outline: none; }
.ai__note { margin-top: 16px; text-align: center; font-size: 13px; color: var(--ink-3); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }

@media (max-width: 1080px) {
  .ai__panel { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .ai__panel { padding: 8px; }
  .ai__stage { min-height: 0; aspect-ratio: 3 / 4; }
  .ai__drop b { font-size: 20px; }
  .ai__card { padding: 18px; }
}
.form__consent { font-size: 12.5px; color: var(--ink-3); text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ai__stage::before { content: ""; position: absolute; inset: -40px; background: var(--photo, none) center / cover; filter: blur(28px) brightness(.55); opacity: .9; }
.ai__stage[data-state="empty"]::before { display: none; }
