/* ============================================================
   DODD-STUDIO : Feuille de style
   Direction artistique monochrome LP-BUILDERS : Finesse & Liquid Glass
   Typographie : Urbanist (Google Fonts)
   Palette : #FFFFFF #FAFAFC #F2F2F7 #E5E5EA #8E8E93 #1C1C1E #000000
   ============================================================ */

:root {
  --white: #FFFFFF;
  --bg-base: #FFFFFF;
  --g50: #FAFAFC;
  --g100: #F2F2F7;
  --g200: #E5E5EA;
  --g300: #D1D1D6;
  --g400: #AEAEB2;
  --g600: #636366;
  --g700: #3A3A3C;
  --g800: #2C2C2E;
  --g900: #1C1C1E;
  --black: #000000;
  --font-main: 'Urbanist', system-ui, -apple-system, sans-serif;
  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --sh-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --sh-md: 0 16px 40px rgba(0, 0, 0, 0.06);
  --sh-lg: 0 24px 64px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-main);
  color: var(--g900);
  background: var(--bg-base);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100%;
  position: relative;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

textarea, input {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--g900);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--g900);
  outline-offset: 3px;
  border-radius: 6px;
}

.hidden {
  display: none !important;
}

/* ============================================================
   1. CANVAS TEXTURE BINAIRE INTERACTIVE
   ============================================================ */
.binary-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
}

/* ============================================================
   2. ECRAN 1 : ACCUEIL MINIMALISTE ET HAUT DE GAMME
   ============================================================ */
.screen-hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 6vw, 64px) 24px;
}

.hero-content {
  max-width: 660px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: heroEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Boite du logo Apple Glass */
.hero-logo-box {
  width: 110px;
  height: 110px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--r-xl);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.04),
    0 16px 44px rgba(0, 0, 0, 0.08),
    inset 0 1px 2px rgba(255, 255, 255, 1),
    inset 0 -1px 2px rgba(0, 0, 0, 0.03);
  margin-bottom: 26px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-logo-box:hover {
  transform: translateY(-3px) scale(1.02);
}

.hero-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-badge {
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--g700);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.hero-title {
  font-family: var(--font-main);
  font-size: clamp(38px, 6.5vw, 54px);
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--black);
  margin-bottom: 18px;
}

.hero-desc {
  font-size: clamp(16px, 2.2vw, 18px);
  color: var(--g600);
  line-height: 1.68;
  font-weight: 450;
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

/* ============================================================
   3. BOUTONS APPLE LIQUID GLASS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: var(--r-md);
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
}

.btn-lg {
  padding: 18px 40px;
  font-size: 17px;
  border-radius: var(--r-lg);
  font-weight: 750;
}

/* Le fameux Liquid Glass d'Apple */
.btn-liquid {
  position: relative;
  background: rgba(18, 18, 20, 0.92);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--white);
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 14px 38px rgba(0, 0, 0, 0.24),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.45),
    inset 0 -1.5px 2px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.btn-liquid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 100%);
  border-radius: inherit;
  pointer-events: none;
}

.btn-liquid:hover {
  background: rgba(28, 28, 32, 0.98);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.36);
  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.14),
    0 22px 50px rgba(0, 0, 0, 0.32),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.6),
    inset 0 -1.5px 2px rgba(0, 0, 0, 0.6);
}

.btn-liquid:active {
  transform: translateY(0) scale(0.985);
  background: rgba(12, 12, 14, 0.96);
}

.btn-liquid:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Liquid Glass Version Claire */
.btn-outline {
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--g900);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.02),
    inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
  box-shadow: 
    0 6px 18px rgba(0, 0, 0, 0.05),
    inset 0 1px 1px rgba(255, 255, 255, 1);
}

.btn-outline:active {
  transform: translateY(0) scale(0.985);
}

.btn-outline:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-link {
  font-size: 14px;
  font-weight: 550;
  color: var(--g700);
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  transition: all 0.18s ease;
}

.btn-link:hover {
  color: var(--black);
  background: rgba(255, 255, 255, 0.5);
}

.btn-ic {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ============================================================
   4. ECRAN 2 : CONTENEUR STEP FORM (GLASSMORPHISM CHIC)
   ============================================================ */
.app-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 48px) 18px;
}

.form-shell {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(36px) saturate(190%);
  -webkit-backdrop-filter: blur(36px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--r-xl);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.03),
    0 24px 64px rgba(0, 0, 0, 0.08),
    inset 0 1px 2px rgba(255, 255, 255, 1);
  max-width: 700px;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: heroEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Barre superieure minimaliste */
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.55);
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--g700);
  padding: 7px 12px;
  border-radius: var(--r-sm);
  transition: all 0.18s ease;
}

.nav-back:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--black);
}

.nav-back svg {
  width: 16px;
  height: 16px;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.25;
}

.step-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--g600);
}

.step-title-hint {
  font-size: 13.5px;
  font-weight: 750;
  color: var(--g900);
}

.nav-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  color: var(--g400);
  transition: all 0.18s ease;
}

.nav-reset:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--g900);
}

.nav-reset svg {
  width: 16px;
  height: 16px;
}

/* Barre de progression liquide */
.prog-track {
  width: 100%;
  height: 3.5px;
  background: rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.prog-fill {
  height: 100%;
  width: 20%;
  background: var(--g900);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Corps du formulaire */
.step-form {
  padding: clamp(28px, 5vw, 42px) clamp(22px, 5vw, 42px);
  display: flex;
  flex-direction: column;
}

.step-pane {
  display: none;
}

.step-pane.active {
  display: block;
  animation: paneEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.pane-header {
  margin-bottom: 28px;
}

.pane-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.btn-demo-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--g700);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.07);
  padding: 4px 12px;
  border-radius: 999px;
  transition: all 0.18s ease;
}

.btn-demo-link:hover {
  background: var(--g900);
  color: var(--white);
  border-color: var(--g900);
}

.pane-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--g700);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.pane-tag.success-tag {
  background: var(--g900);
  color: var(--white);
  border-color: var(--g900);
}

.pane-header h2 {
  font-size: clamp(24px, 3.8vw, 30px);
  font-weight: 850;
  letter-spacing: -0.03em;
  color: var(--black);
  margin-bottom: 8px;
}

.pane-header h2 em {
  font-style: normal;
  border-bottom: 2px solid var(--black);
}

.pane-header p {
  color: var(--g600);
  font-size: 14.5px;
  line-height: 1.6;
  font-weight: 450;
}

/* Champs de formulaire avec finesse */
.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 650;
  color: var(--g900);
  margin-bottom: 8px;
}

.tag-required {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--g900);
  color: var(--white);
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.input-text {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--r-sm);
  padding: 13px 15px;
  font-size: 14.5px;
  color: var(--g900);
  transition: all 0.2s ease;
  resize: vertical;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

@media (max-width: 600px) {
  .input-text {
    font-size: 16px;
  }
}

.input-text:focus {
  outline: none;
  background: var(--white);
  border-color: var(--g900);
  box-shadow: 
    0 0 0 3px rgba(0, 0, 0, 0.08),
    inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.input-text::placeholder {
  color: var(--g400);
}

/* Selection de canaux (Chips fluides) */
.chips-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.chip {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  color: var(--g700);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.chip:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--black);
  border-color: rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.chip.selected {
  background: var(--g900);
  color: var(--white);
  border-color: var(--g900);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Pied du formulaire */
.step-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding-top: 26px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* ============================================================
   5. ETAPE 6 : RESULTAT FINAL & PROMPT GENERAL
   ============================================================ */
.prompt-box-card {
  background: #111114;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.12),
    0 20px 48px rgba(0, 0, 0, 0.2);
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.prompt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #18181c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.prompt-badge {
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.1em;
  color: #929298;
  text-transform: uppercase;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--g900);
  font-size: 13px;
  font-weight: 750;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-copy:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.btn-copy svg {
  width: 15px;
  height: 15px;
}

.prompt-textarea {
  width: 100%;
  background: transparent;
  border: none;
  padding: 18px;
  color: #f2f2f5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
  resize: vertical;
  min-height: 250px;
}

.prompt-textarea:focus {
  outline: none;
}

/* Boutons IA Apple Glass */
.ai-quick-links {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--r-md);
  padding: 18px;
  margin-bottom: 22px;
}

.links-title {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--g700);
  margin-bottom: 12px;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 540px) {
  .links-grid {
    grid-template-columns: 1fr;
  }
}

.btn-ai {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 650;
  color: var(--g900);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.btn-ai:hover {
  background: var(--g900);
  color: var(--white);
  border-color: var(--g900);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.btn-ai svg {
  width: 14px;
  height: 14px;
  opacity: 0.75;
}

.extra-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.extra-actions .btn {
  flex: 1;
}

/* ============================================================
   6. TOAST DE CONFIRMATION
   ============================================================ */
.toast {
  position: fixed;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(18, 18, 20, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1000;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ============================================================
   7. SIGNATURE LIQUID GLASS BLANC : CONCU PAR STEPHANE FAVIDE
   ============================================================ */
.creator-tag-wrap {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.creator-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 550;
  color: var(--g700);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(26px) saturate(190%);
  -webkit-backdrop-filter: blur(26px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  box-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.03),
    0 10px 28px rgba(0, 0, 0, 0.06),
    inset 0 1px 1.5px rgba(255, 255, 255, 1),
    inset 0 -1px 1px rgba(0, 0, 0, 0.02);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
}

.creator-tag strong {
  font-weight: 750;
  color: var(--black);
}

.creator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25D366;
  display: inline-block;
  box-shadow: 0 0 8px rgba(37, 211, 102, 0.6);
  animation: pulseDot 2.4s infinite ease-in-out;
}

.creator-ic {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  opacity: 0.55;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.creator-tag:hover {
  background: rgba(255, 255, 255, 0.96);
  transform: translateY(-2px);
  color: var(--black);
  border-color: rgba(255, 255, 255, 1);
  box-shadow: 
    0 4px 14px rgba(0, 0, 0, 0.05),
    0 16px 36px rgba(0, 0, 0, 0.1),
    inset 0 1px 2px rgba(255, 255, 255, 1);
}

.creator-tag:hover .creator-ic {
  opacity: 1;
  transform: translate(1px, -1px);
}

.creator-tag:active {
  transform: translateY(0) scale(0.98);
}

@keyframes pulseDot {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

/* ============================================================
   8. ANIMATIONS FLUIDES
   ============================================================ */
@keyframes heroEntrance {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes paneEntrance {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
