/* Compose ton image — design system IAgora
   Fond blanc, titres Anton en capitales bleues, accents roses, cartes à filet noir 2 px.
   Mise en page : une colonne de catégories numérotées, puis le prompt en aplat bleu. */
:root {
  --blue-600: #3045d1;
  --blue-100: #d6dbf7;
  --blue-50: #eef0fc;
  --pink-600: #ff50be;
  --pink-700: #d62e96;
  --pink-50: #ffeef8;
  --ink-900: #000000;
  --ink-800: #14141a;
  --ink-500: #5c5c68;
  --ink-200: #d9d9e0;
  --ink-100: #f2f2f6;
  --white: #ffffff;
  --success: #1f9d4f;
  --font-display: "Anton", "Archivo Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Heebo", "Helvetica Neue", Arial, sans-serif;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-md: 0 6px 20px rgba(20, 20, 26, .10);
  --shadow-lg: 0 18px 48px rgba(20, 20, 26, .14);
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--white);
  color: var(--ink-800);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}
img { max-width: 100%; }
a { color: var(--blue-600); }
[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* En-tête */
header { padding: 20px 0 0; }
header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { height: 26px; width: auto; display: block; }
.tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-500);
}

main { padding: 16px 0 40px; }

/* Titre */
.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--pink-700);
}
h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 8.6vw, 96px);
  line-height: .95;
  letter-spacing: .005em;
  text-transform: uppercase;
  color: var(--blue-600);
  text-wrap: balance;
}
.nowrap { white-space: nowrap; }
.lead {
  max-width: 1000px;
  margin: 14px 0 0;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.55;
}
.lead strong { font-weight: 700; color: var(--ink-900); }

.choose-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
  margin: 32px 0 12px;
}
.choose {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-900);
}
.hint { margin: 0; font-size: 15px; color: var(--ink-500); }

kbd {
  border: 1px solid var(--ink-200);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--blue-50);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: .85em;
  font-weight: 600;
  padding: 1px 6px;
  white-space: nowrap;
}

/* Catégories */
.categories { display: grid; gap: 20px; }

.card {
  position: relative;
  min-width: 0;
  padding: 24px 26px 22px;
  border: 2px solid var(--ink-900);
  border-radius: var(--radius-lg);
  background: var(--white);
  transition: border-color 220ms var(--ease-out);
}
.num {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--pink-700);
}
.num b {
  position: absolute;
  top: 18px;
  right: 24px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 56px;
  line-height: .8;
  letter-spacing: 0;
  color: var(--pink-600);
}
.category.is-done { border-color: var(--blue-600); }
.category.is-done .num::after {
  content: "✓ Choisi";
  margin-left: 12px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--blue-600);
  color: var(--white);
  letter-spacing: .08em;
  font-size: 12px;
}
.category h2 {
  margin: 10px 0 6px;
  padding-right: 64px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 2.8vw, 36px);
  line-height: .95;
  letter-spacing: .005em;
  text-transform: uppercase;
  color: var(--ink-900);
  text-wrap: balance;
}
.intro { margin: 0 0 12px; max-width: 70ch; font-size: 16px; }

/* Aide dépliable */
.help { margin: 0 0 16px; font-size: 15px; }
.help summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--blue-600);
  font-weight: 600;
  list-style: none;
}
.help summary::-webkit-details-marker { display: none; }
.help summary::before {
  content: "?";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pink-600);
  color: var(--ink-900);
  font-size: 13px;
  font-weight: 700;
}
.help summary:hover { color: var(--pink-700); }
.help summary:focus-visible { outline: 3px solid var(--blue-600); outline-offset: 3px; border-radius: 6px; }
.help[open] summary { margin-bottom: 10px; }
.help-body {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--blue-50);
}
.help-body > p, .help-body > ul { flex: 1 1 100%; max-width: 75ch; margin: 0; }
.help-body ul { padding-left: 20px; }
.help-body li { margin-bottom: 6px; }
.help-body li::marker { color: var(--pink-700); }
.help-body strong { color: var(--ink-900); }
.help-figure { margin: 0; flex: 0 1 420px; }
.help-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--ink-900);
  border-radius: var(--radius-md);
  background: var(--white);
}
.help-figure figcaption { margin-top: 6px; font-size: 13px; color: var(--ink-500); }

/* Vignettes */
.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 6px 6px 10px;
  border: 2px solid var(--ink-200);
  border-radius: 16px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 220ms var(--ease-out), transform 120ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.thumb:hover { border-color: var(--pink-600); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.thumb:active { transform: scale(.97); }
.thumb-pic {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: var(--ink-100);
}
.thumb-pic img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms var(--ease-out);
}
.thumb:hover .thumb-pic img { transform: scale(1.04); }
.thumb-label {
  padding: 4px 4px 0;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  color: var(--ink-900);
}
.thumb-detail { padding: 0 4px; font-size: 13px; line-height: 1.35; color: var(--ink-500); }

.thumb:has(input:checked) {
  border-color: var(--blue-600);
  background: var(--blue-50);
  box-shadow: 5px 5px 0 var(--pink-600);
  transform: none;
}
.thumb:has(input:checked) .thumb-label { color: var(--blue-600); }
.thumb:has(input:checked)::after {
  content: "✓";
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--blue-600);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
}
.thumb:has(input:focus-visible) { outline: 3px solid var(--blue-600); outline-offset: 3px; }

/* Formats : l'image garde sa vraie proportion */
.thumbs-format { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
.thumbs-format .thumb-pic { aspect-ratio: 1 / 1; }
.thumbs-format .thumb-pic img {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  object-fit: contain;
}
.ratio-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--ink-900);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: .04em;
}

/* Champ texte */
.field { margin-top: 18px; }
.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.field-head label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-900);
}
.link-btn {
  border: 0;
  background: none;
  padding: 2px 4px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-500);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn:hover { color: var(--pink-700); }
.link-btn:focus-visible { outline: 3px solid var(--blue-600); outline-offset: 2px; border-radius: 4px; }
textarea {
  display: block;
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  border: 2px solid var(--ink-200);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink-900);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
textarea::placeholder { color: var(--ink-500); }
textarea:hover { border-color: var(--ink-500); }
textarea:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 4px var(--blue-50); }

/* Boutons */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--blue-600);
  color: var(--white);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 220ms var(--ease-out), color 220ms var(--ease-out), transform 120ms var(--ease-out);
}
.cta:hover { background: var(--pink-600); color: var(--ink-900); }
.cta:active { transform: scale(.97); }
.cta:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--pink-50), 0 0 0 6px var(--pink-600); }
.cta[disabled] { background: var(--ink-200); color: var(--ink-500); cursor: not-allowed; transform: none; }
.cta.copied, .cta.copied:hover { background: var(--success); color: var(--white); }

/* Le prompt final */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 36px;
  padding: 32px 36px;
  border-radius: 28px;
  background: var(--blue-600);
  color: var(--white);
}
.stage-eyebrow {
  margin: 0 0 8px;
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--pink-600);
}
.stage h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 72px);
  line-height: .95;
  text-transform: uppercase;
}
.stage-progress { margin: 10px 0 0; font-size: 16px; color: rgba(255, 255, 255, .85); }
.prompt-box {
  min-width: 0;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--ink-900);
}
.prompt-output {
  margin: 0;
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.6;
  overflow-wrap: anywhere;
  user-select: all;
}
.prompt-output.is-empty { color: var(--ink-500); user-select: none; }
.prompt-output mark {
  padding: 0 3px;
  border-radius: 4px;
  background: var(--pink-50);
  color: var(--pink-700);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--pink-600);
}
.prompt-todo {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--pink-700);
}
.stage-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}
.cta-big {
  background: var(--pink-600);
  color: var(--ink-900);
  padding: 18px 30px;
  font-size: 22px;
}
.cta-big:hover { background: var(--white); color: var(--ink-900); }
.cta-big[disabled] { background: rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .7); }
.cta-ghost {
  margin-left: auto;
  padding: 12px 20px;
  background: transparent;
  color: var(--white);
  box-shadow: inset 0 0 0 2px var(--white);
}
.cta-ghost:hover { background: var(--white); color: var(--blue-600); }

/* Champ --no */
.no-field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 15px; font-weight: 600; }
.no-field kbd { background: var(--white); }
.no-field input {
  width: 220px;
  max-width: 100%;
  padding: 8px 14px;
  border: 2px solid var(--white);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--ink-900);
  font: inherit;
  font-weight: 400;
}
.no-field input::placeholder { color: var(--ink-500); }
.no-field input:focus { outline: none; box-shadow: 0 0 0 4px var(--pink-600); }

/* Astuces Midjourney */
.tips { margin-top: 40px; }
.tips .choose { margin-bottom: 6px; }
.tips-lead { margin: 0 0 16px; max-width: 70ch; color: var(--ink-500); font-size: 16px; }
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}
.tip {
  min-width: 0;
  padding: 20px 22px;
  border: 2px dashed var(--ink-900);
  border-radius: var(--radius-lg);
  font-size: 15px;
}
.tip h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--blue-600);
}
.tip p { margin: 0 0 8px; }
.tip p:last-child { margin-bottom: 0; }
.tip ul { margin: 0; padding-left: 18px; }
.tip li { margin-bottom: 6px; }
.tip li::marker { color: var(--pink-700); }
.tips-sources { margin: 16px 0 0; font-size: 14px; color: var(--ink-500); }
.tips-sources a { font-weight: 600; }

/* Bas de page */
footer {
  padding: 14px 0 20px;
  border-top: 2px solid var(--ink-900);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 14px;
  color: var(--ink-500);
}
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
  color: var(--ink-800);
}
.steps li span { color: var(--pink-700); margin-right: 6px; }

/* Bandeau collant : progression + copie rapide */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 0 16px calc(14px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out);
}
.dock.is-hidden { transform: translateY(120%); opacity: 0; }
.dock-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 8px 8px 8px 20px;
  border: 2px solid var(--ink-900);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
}
.dock-count { font-size: 15px; font-weight: 600; white-space: nowrap; }
.dock-count b { font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--pink-600); }
.dock-link {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-900);
  text-decoration: none;
  white-space: nowrap;
}
.dock-link:hover { color: var(--pink-700); }
.dock-copy { padding: 10px 18px; font-size: 16px; }

@media (max-width: 960px) {
  .card { padding: 18px 20px; }
  .num b { font-size: 40px; top: 14px; right: 20px; }
  .tag { display: none; }
  .stage { padding: 24px 22px; }
  .cta-ghost { margin-left: 0; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .thumbs-format { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .thumbs-format .thumb-detail { display: none; }
  .thumb-label { font-size: 14px; }
  .help-figure { flex-basis: 100%; }
  .dock-inner { gap: 10px; padding-left: 14px; }
  .dock-link { display: none; }
  .cta-big { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .thumb:hover, .thumb:hover .thumb-pic img { transform: none; }
}
