/* davcode — inscription et accueil guidé (register.php, onboarding.php).
   Plein écran sombre, halo de lumière qui respire, carte blanche au centre : la même identité
   que le site (noir #1d1d1f, bleu #0a84ff, beige), avec le D animé en haut. */

body.immersive { --im-ink: #f5f5f7; --im-muted: #a1a1a6; background: #0b0c0e; color: var(--im-ink); min-height: 100vh; min-height: 100dvh; overflow-x: hidden; }
.im-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, #1a2433 0%, #0b0c0e 60%); }
.im-bg i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .45; animation: im-float 18s ease-in-out infinite alternate; }
.im-bg i:nth-child(1) { width: 520px; height: 520px; left: -120px; top: -140px; background: #0a84ff; opacity: .28; }
.im-bg i:nth-child(2) { width: 420px; height: 420px; right: -100px; top: 30%; background: #5ac8fa; opacity: .16; animation-delay: -6s; }
.im-bg i:nth-child(3) { width: 460px; height: 460px; left: 30%; bottom: -220px; background: #e0c287; opacity: .14; animation-delay: -12s; }
@keyframes im-float { to { transform: translate(60px, 40px) scale(1.12); } }

.im-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 18px; padding: 20px clamp(16px, 4vw, 40px); }
.im-brand { display: flex; align-items: center; gap: 9px; color: var(--im-ink); font-weight: 600; font-size: 18px; text-decoration: none !important; }
.im-brand .dc-logo { --shine: #5ac8fa; }
.im-brand .dc-logo .dc-d { animation: dc-draw .9s cubic-bezier(.65, 0, .35, 1) .15s both; }
.im-brand .dc-logo .dc-shine { animation: dc-shine .9s ease-in-out 1.05s both; }
.im-progress { flex: 1; max-width: 420px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; margin-left: auto; }
.im-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0a84ff, #5ac8fa); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.im-step { color: var(--im-muted); font-size: 13px; white-space: nowrap; }

.im-main { position: relative; z-index: 1; display: grid; place-items: center; padding: clamp(12px, 4vh, 48px) 16px 64px; min-height: calc(100dvh - 80px); }

/* Carte blanche */
.im-card { background: #fff; color: #1d1d1f; border-radius: 24px; padding: clamp(22px, 4vw, 36px); width: 100%; max-width: 440px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); animation: im-in .45s cubic-bezier(.2, .8, .2, 1) both; }
.im-step-card { max-width: 640px; }
@keyframes im-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.im-card h2 { margin: 0 0 16px; font-size: 22px; letter-spacing: -.02em; }
.im-q { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.12; letter-spacing: -.03em; margin: 0 0 8px; }
.im-sub { color: #6e6e73; margin: 0 0 22px; line-height: 1.5; }
.im-sub.small { font-size: 13px; margin-top: 18px; }
.im-label { font-weight: 600; margin: 18px 0 8px; }
.im-label small { color: #86868b; font-weight: 400; }

/* Champs façon « étiquette flottante » */
.im-field { position: relative; display: grid; background: #f2f2f4; border: 1.5px solid transparent; border-radius: 14px; padding: 10px 14px 9px; margin-bottom: 12px; transition: border-color .15s, background .15s; }
.im-field:focus-within { border-color: #1d1d1f; background: #fff; }
.im-field > span { font-size: 12px; color: #6e6e73; }
.im-field small { color: #a1a1a6; }
.im-field input, .im-field textarea { border: 0; outline: 0; background: none; font: inherit; font-size: 16px; padding: 2px 0 0; color: #1d1d1f; width: 100%; resize: vertical; }
.im-field.filled { background: #ebebee; }
.im-field.filled b { font-weight: 400; font-size: 16px; color: #48484a; padding-top: 2px; }
.im-edit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #1d1d1f; font-weight: 600; text-decoration: underline; font-size: 14px; }
.im-eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; color: #48484a; padding: 6px; border-radius: 8px; }
.im-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.im-row > .im-field { margin-bottom: 12px; }
.im-item { grid-template-columns: 1fr 130px; }

.im-meter { height: 4px; border-radius: 99px; background: #e5e5ea; overflow: hidden; margin: -2px 2px 6px; }
.im-meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: #ff453a; transition: width .25s, background .25s; }
.im-hint { font-size: 13px; color: #6e6e73; margin: 0 2px 14px; min-height: 18px; }
.im-hint.ok { color: #1f8a4c; }
.im-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: #48484a; margin: 6px 0 16px; cursor: pointer; }
.im-check input { margin-top: 2px; accent-color: #1d1d1f; width: 16px; height: 16px; }
.im-error { background: #fff1f0; color: #c8102e; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.im-error a { color: inherit; font-weight: 600; }

/* Bouton noir avec reflet, comme le D */
.im-btn { position: relative; overflow: hidden; width: 100%; border: 0; border-radius: 999px; padding: 15px 22px; background: radial-gradient(120% 140% at 50% 0%, #3a3a3c 0%, #111 55%); color: #fff; font: 600 16px/1 inherit; cursor: pointer; box-shadow: 0 8px 22px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .12); transition: transform .15s; }
.im-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .22) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s; }
.im-btn:hover::after { transform: translateX(120%); }
.im-btn:active { transform: scale(.985); }
.im-btn[disabled] { opacity: .6; cursor: progress; }
.im-nav .im-btn { width: auto; padding: 14px 26px; }
.im-link { border: 0; background: none; font: inherit; color: #48484a; cursor: pointer; padding: 8px 4px; font-weight: 500; text-decoration: none; }
.im-link:hover { color: #1d1d1f; text-decoration: underline; }
.im-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.im-nav-r { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.im-later { display: block; margin: 16px auto 0; border: 0; background: none; color: #86868b; font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.im-foot { text-align: center; color: #6e6e73; font-size: 14px; margin: 18px 0 0; }
.im-foot a { color: #1d1d1f; font-weight: 600; }

/* Inscription : texte à gauche, carte à droite */
.im-signup { display: grid; grid-template-columns: 1fr 440px; gap: clamp(32px, 6vw, 96px); align-items: center; width: 100%; max-width: 1080px; }
.im-hero h1 { font-size: clamp(38px, 5.4vw, 66px); line-height: 1.02; letter-spacing: -.045em; margin: 0 0 18px; }
.im-hero h1 span { color: var(--im-muted); }
.im-hero p { color: var(--im-muted); font-size: 18px; line-height: 1.5; max-width: 460px; margin: 0 0 24px; }
.im-perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: #d1d1d6; }
.im-perks li { display: flex; gap: 10px; align-items: center; }
.im-perks .i { color: #5ac8fa; }

/* Cartes d'options (objectifs, type de site) */
.im-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.im-options.three { grid-template-columns: repeat(3, 1fr); }
.im-option { position: relative; display: grid; gap: 4px; align-content: start; border: 1.5px solid #e5e5ea; border-radius: 16px; padding: 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.im-option:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .08); }
.im-option input { position: absolute; opacity: 0; pointer-events: none; }
.im-option:has(input:checked) { border-color: #1d1d1f; box-shadow: 0 0 0 1px #1d1d1f; }
.im-option:has(input:checked)::after { content: "✓"; position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: #1d1d1f; color: #fff; font-size: 12px; display: grid; place-items: center; }
.im-option:has(input:focus-visible) { outline: 3px solid rgba(10, 132, 255, .45); outline-offset: 2px; }
.im-option-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #f2f2f4; margin-bottom: 6px; }
.im-option small { color: #6e6e73; line-height: 1.4; }
.im-option em { font-style: normal; font-size: 12px; color: #0a84ff; font-weight: 600; }

.im-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.im-chip { border: 1.5px solid #e5e5ea; border-radius: 99px; padding: 8px 14px; cursor: pointer; font-size: 14px; transition: .15s; }
.im-chip input { position: absolute; opacity: 0; pointer-events: none; }
.im-chip:has(input:checked) { background: #1d1d1f; border-color: #1d1d1f; color: #fff; }
.im-chip:has(input:focus-visible) { outline: 3px solid rgba(10, 132, 255, .45); }
.im-url { display: flex; align-items: center; gap: 8px; color: #6e6e73; font-size: 14px; margin: -4px 2px 6px; }
.im-url.big { font-size: 17px; justify-content: center; background: #f2f2f4; border-radius: 14px; padding: 12px 16px; margin: 6px 0 18px; }
.im-url.big a { color: #1d1d1f; font-weight: 600; }

/* Thèmes */
.im-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; max-height: 52vh; overflow: auto; padding: 4px; margin: 0 -4px; }
.im-theme { display: grid; gap: 3px; cursor: pointer; }
.im-theme input { position: absolute; opacity: 0; pointer-events: none; }
.im-theme-shot { aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #f2f2f4; border: 2px solid transparent; transition: .15s; display: block; }
.im-theme-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.im-theme:has(input:checked) .im-theme-shot { border-color: #1d1d1f; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1d1d1f; }
.im-theme small { color: #6e6e73; font-size: 12px; }
.im-theme small a { color: #0a84ff; }
.im-classic { background: linear-gradient(160deg, #f7f3ea, #e3dccb); padding: 12px; display: grid !important; align-content: start; gap: 6px; }
.im-classic b { font-size: 13px; }
.im-classic i { display: block; height: 8px; border-radius: 4px; background: rgba(29, 29, 31, .15); }
.im-classic i:nth-of-type(2) { width: 70%; } .im-classic i:nth-of-type(3) { width: 45%; height: 18px; background: #1d1d1f; border-radius: 9px; margin-top: 6px; }

/* Logo */
.im-drop { display: flex; align-items: center; gap: 14px; border: 1.5px dashed #c7c7cc; border-radius: 16px; padding: 14px; cursor: pointer; transition: .15s; }
.im-drop:hover, .im-drop.over { border-color: #1d1d1f; background: #fafafa; }
.im-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.im-drop span { display: grid; }
.im-drop small { color: #6e6e73; }
.im-drop-prev { width: 56px; height: 56px; border-radius: 14px; background: #f2f2f4; display: grid !important; place-items: center; overflow: hidden; flex: none; }
.im-drop-prev img { width: 100%; height: 100%; object-fit: contain; }

.im-mailbox { display: flex; gap: 12px; align-items: flex-start; background: #f2f2f4; border-radius: 14px; padding: 14px; color: #48484a; margin-bottom: 8px; }

/* Fin */
.im-done { text-align: center; }
.im-done-ic { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 26px; background: #1d1d1f; color: #fff; margin-bottom: 14px; box-shadow: 0 14px 40px rgba(10, 132, 255, .35); }
.im-done-ic .dc-logo { --shine: #5ac8fa; }
.im-done-ic .dc-d { animation: dc-draw 1s cubic-bezier(.65, 0, .35, 1) .2s both; }
.im-done-ic .dc-shine { animation: dc-shine 1s ease-in-out 1.2s both; }
.im-next { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.im-next li { display: flex; gap: 12px; align-items: flex-start; border: 1px solid #e5e5ea; border-radius: 14px; padding: 12px 14px; }
.im-next li span { display: grid; }
.im-next li small { color: #6e6e73; }
.im-next li.done { background: #f1f8f3; border-color: #cfe9d8; }
.im-next li.done .i { color: #1f8a4c; }

.im-main .toast, .immersive .flash { z-index: 5; }

@media (max-width: 900px) {
  .im-signup { grid-template-columns: 1fr; }
  .im-hero { text-align: center; }
  .im-hero p { margin-left: auto; margin-right: auto; }
  .im-perks { justify-content: center; }
}
@media (max-width: 600px) {
  .im-options, .im-options.three, .im-row { grid-template-columns: 1fr; }
  .im-item { grid-template-columns: 1fr 110px; }
  .im-step { display: none; }
  .im-nav { flex-direction: column-reverse; align-items: stretch; }
  .im-nav-r { flex-direction: column-reverse; margin-left: 0; }
  .im-nav .im-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .im-bg i, .im-card { animation: none; }
}
