/* Formulaire de brief : même charte que le Studio Hub (polices, couleurs, cartes), pensé d'abord pour le téléphone. */
@font-face { font-family: "Manrope"; font-weight: 400 800; font-display: swap; src: url(fonts/manrope-latin-1.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF; }
@font-face { font-family: "Manrope"; font-weight: 400 800; font-display: swap; src: url(fonts/manrope-latin-ext-0.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0; }
@font-face { font-family: "Space Grotesk"; font-weight: 400 700; font-display: swap; src: url(fonts/space-grotesk-latin-1.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2212; }
@font-face { font-family: "Space Grotesk"; font-weight: 400 700; font-display: swap; src: url(fonts/space-grotesk-latin-ext-0.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F; }

:root {
  --navy: #0c1c34; --navy-2: #13284a; --ink: #0c0c23; --text: #2f3a4d; --muted: #697383;
  --cyan: #049abb; --cyan-text: #037a94; --cyan-soft: #e3f5fa;
  --pink: #eb237e; --pink-btn: #c8186e; --pink-btn-2: #a8135b; --pink-soft: #fde8f2;
  --line: #e2e7ef; --line-2: #cfd6e2; --paper: #f5f7fa; --card: #fff; --field: #fbfcfe;
  --ok: #12805c; --ok-soft: #e6f6ef; --warn: #9a5b00; --warn-soft: #fff5e1; --danger: #c0283a; --danger-soft: #fdecee;
  --radius: 20px; --r-sm: 12px;
  --shadow: 0 1px 2px rgba(12,28,52,.05), 0 10px 30px -12px rgba(12,28,52,.16);
  --shadow-lg: 0 2px 6px rgba(12,28,52,.06), 0 24px 60px -20px rgba(12,28,52,.28);
  --ring: 0 0 0 4px rgba(4,154,187,.2);
  --grad: linear-gradient(135deg, var(--pink) 0%, var(--pink-btn-2) 100%);
  --grad-2: linear-gradient(120deg, var(--pink) 0%, #9b3fb5 50%, var(--cyan) 100%);
  --head: "Space Grotesk", "Manrope", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  font: 16px/1.6 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: radial-gradient(900px 420px at 100% -10%, rgba(4,154,187,.10), transparent 60%), radial-gradient(700px 380px at -10% 10%, rgba(235,35,126,.07), transparent 60%), var(--paper);
  background-attachment: fixed;
}
a { color: var(--cyan-text); }
h1, h2, h3 { color: var(--ink); font-family: var(--head); line-height: 1.15; letter-spacing: -.01em; }
.boot { padding: 4rem 1rem; text-align: center; color: var(--muted); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 10px; }

/* ---------- En-tête et progression ---------- */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.82); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid rgba(12,28,52,.06); }
.top-in { max-width: 860px; margin: 0 auto; padding: .7rem max(1rem, env(safe-area-inset-left)); display: flex; align-items: center; gap: 1rem; }
.top img { display: block; height: 38px; width: auto; }
.top strong { font-family: var(--head); font-weight: 700; color: var(--navy); font-size: .95rem; padding: .3rem .8rem; border-radius: 999px; background: var(--cyan-soft); }
.top .save { margin-left: auto; font-size: .8rem; font-weight: 700; color: var(--ok); background: var(--ok-soft); padding: .22rem .7rem; border-radius: 999px; white-space: nowrap; }
.top .save.err { color: var(--danger); background: var(--danger-soft); }
.top .save a { color: var(--navy); text-decoration: none; }
.top-in > strong + .save { background: transparent; }
.bar { height: 5px; background: var(--line); }
.bar > i { display: block; height: 100%; background: var(--grad-2); border-radius: 0 99px 99px 0; transition: width .45s cubic-bezier(.2,.8,.2,1); }

.steps { max-width: 860px; margin: 0 auto; padding: .9rem 1rem 0; display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.steps button { flex: none; border: 1.5px solid var(--line); background: var(--card); color: var(--navy); border-radius: 999px; padding: .4rem .85rem; font-size: .84rem; font-weight: 700; cursor: pointer; transition: all .2s; }
.steps button:hover { border-color: var(--line-2); }
.steps button.on { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 8px 20px -10px rgba(12,28,52,.6); }
.steps button.done { color: var(--ok); border-color: rgba(18,128,92,.3); background: var(--ok-soft); }
.steps .n::after { content: ". "; }
.steps button.done .n::after { content: " "; }

/* ---------- Ordinateur : étapes dans une colonne à gauche ---------- */
@media (min-width: 1000px) {
  .top-in, .nav-in { max-width: 1180px; }
  .layout { max-width: 1180px; margin: 0 auto; padding: 0 1rem; display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 2rem; align-items: start; }
  .layout > main { max-width: 860px; margin: 0; padding: 1.6rem 0 7rem; }
  .steps { position: sticky; top: 76px; flex-direction: column; gap: .2rem; margin: 1.6rem 0 0; padding: .7rem; overflow: visible; background: var(--card); border: 1px solid rgba(12,28,52,.06); border-radius: var(--radius); box-shadow: var(--shadow); }
  .steps button { display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 14px; padding: .55rem .7rem; font-size: .92rem; }
  .steps button:hover { background: var(--paper); }
  .steps .n { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--paper); color: var(--muted); font-family: var(--head); font-size: .85rem; }
  .steps .n::after, .steps button.done .n::after { content: none; }
  .steps button.on { background: var(--navy); color: #fff; box-shadow: 0 8px 20px -10px rgba(12,28,52,.6); }
  .steps button.on .n { background: var(--grad); color: #fff; }
  .steps button.done { background: transparent; color: var(--navy); }
  .steps button.done .n { background: var(--ok-soft); color: var(--ok); }
  .nav-in { padding-left: calc(1rem + 270px + 2rem); }
}

/* ---------- Contenu ---------- */
main { max-width: 860px; margin: 0 auto; padding: 1.2rem 1rem 7rem; }
.card { background: var(--card); border: 1px solid rgba(12,28,52,.06); border-radius: var(--radius); padding: 1.3rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.card > h3 { margin: 0 0 .3rem; font-size: 1.1rem; font-weight: 700; }
.step-title { margin: .8rem 0 .3rem; font-size: clamp(1.6rem, 5vw, 2.1rem); }
.lead { margin: 0 0 1.2rem; font-size: 1.05rem; color: var(--muted); max-width: 52ch; }
.hint { display: block; margin-top: .3rem; font-size: .84rem; color: var(--muted); }

.f { display: block; margin-top: 1rem; }
.f:first-child { margin-top: 0; }
.row > .f { margin-top: 1rem; }
.f > span { display: block; font-weight: 800; color: var(--navy); font-size: .93rem; margin-bottom: .4rem; }
.f > span .req { color: var(--pink); margin-left: .15rem; }
.f > span .opt { color: var(--muted); font-weight: 500; font-size: .82rem; margin-left: .3rem; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=password], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: .7rem .95rem; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--field); color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: var(--ring); background: #fff; }
.row { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .row { grid-template-columns: 1fr 1fr; } .row.r3 { grid-template-columns: 1fr 1fr 1fr; } }

.check { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; cursor: pointer; font-weight: 600; color: var(--navy); }
.check input { width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--pink-btn); flex: none; }
.checks { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .checks { grid-template-columns: 1fr 1fr; } }
.group-title { margin: 1.2rem 0 .3rem; font-family: var(--head); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .16em; color: var(--pink-btn); }

.choice { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.choice label { display: inline-flex; align-items: center; padding: .6rem 1rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--field); cursor: pointer; font-weight: 700; font-size: .92rem; color: var(--navy); transition: all .2s; user-select: none; }
.choice label:hover { border-color: var(--line-2); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label:has(input:checked) { border-color: transparent; background: var(--navy); color: #fff; box-shadow: 0 8px 20px -10px rgba(12,28,52,.6); }
.choice label:has(input:focus-visible) { box-shadow: var(--ring); }

.faq-item { border-top: 1px dashed var(--line); padding: .9rem 0; }
.faq-item:first-of-type { border-top: 0; padding-top: 0; }
.faq-item p.q { margin: 0; font-weight: 800; color: var(--navy); }
.faq-item p.a { margin: .35rem 0 0; font-size: .92rem; color: var(--text); background: var(--paper); padding: .55rem .8rem; border-radius: 4px 14px 14px 14px; display: inline-block; }

/* ---------- Listes répétables ---------- */
.rep { border: 1px solid var(--line); border-radius: 16px; padding: 1rem; margin-top: .8rem; position: relative; background: var(--field); }
.rep .del { position: absolute; top: .5rem; right: .5rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .6rem 1.15rem; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--card); color: var(--navy); font-weight: 700; font-size: .95rem; cursor: pointer; text-decoration: none; transition: background .2s, border-color .2s, transform .15s, box-shadow .2s; }
.btn:hover { border-color: var(--navy); }
.btn:active { transform: scale(.98); }
.btn.primary { border: 0; color: #fff; background: var(--grad); box-shadow: 0 10px 24px -10px rgba(200,24,110,.7); }
.btn.primary:hover { box-shadow: 0 14px 30px -10px rgba(200,24,110,.85); }
.btn.sm { min-height: 36px; padding: .35rem .85rem; font-size: .84rem; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--paper); color: var(--navy); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); background: var(--danger-soft); }
.btn:disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.add { margin-top: .9rem; border-style: dashed; }

/* ---------- Fichiers ---------- */
.drop { display: grid; place-items: center; gap: .3rem; padding: 1.6rem 1rem; border: 2px dashed var(--line-2); border-radius: 18px; text-align: center; color: var(--muted); cursor: pointer; background: var(--field); transition: all .2s; }
.drop:hover, .drop.over { border-color: var(--pink); background: var(--pink-soft); }
.drop strong { color: var(--navy); }
.files { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: .8rem; }
.file { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; font-size: .8rem; transition: box-shadow .2s; }
.file:hover { box-shadow: var(--shadow); }
.file .pic { aspect-ratio: 4 / 3; background: var(--paper) center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--muted); font-family: var(--head); font-weight: 700; }
.file .pic.contain { background-size: contain; background-origin: content-box; padding: 12px; background-color: #fff; }
.file .meta { padding: .5rem .6rem; }
.file .meta input { margin-top: .35rem; min-height: 36px; padding: .35rem .55rem; font-size: .8rem; }
.file .name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 600; }

/* ---------- Ambiances ---------- */
.variants { display: grid; gap: .8rem; grid-template-columns: 1fr; margin-top: .6rem; }
@media (min-width: 640px) { .variants { grid-template-columns: 1fr 1fr; } }
.variant { border: 1.5px solid var(--line); border-radius: 16px; overflow: hidden; cursor: pointer; background: var(--field); text-align: left; padding: 0; transition: all .2s; }
.variant:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.variant img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.variant span { display: block; padding: .65rem .8rem; font-size: .9rem; font-weight: 600; color: var(--text); }
.variant.on { border-color: var(--pink); background: var(--pink-soft); box-shadow: 0 0 0 3px rgba(235,35,126,.12); }
.variant.none { display: flex; align-items: center; justify-content: center; min-height: 120px; }
.colors { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; }
.colors label { display: flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 600; color: var(--navy); }
.colors input[type=color] { width: 46px; height: 38px; padding: 2px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }

/* ---------- Pied de page de navigation ---------- */
.nav { position: fixed; inset: auto 0 0 0; z-index: 10; background: linear-gradient(180deg, rgba(245,247,250,0), var(--paper) 35%); }
.nav-in { max-width: 860px; margin: 0 auto; padding: 1.4rem 1rem calc(.9rem + env(safe-area-inset-bottom)); display: flex; justify-content: space-between; gap: .6rem; }
.nav-in .btn.primary { flex: 1; max-width: 320px; margin-left: auto; }

/* ---------- Messages ---------- */
.notice { border-radius: 14px; padding: .8rem 1rem; margin-bottom: 1rem; font-size: .93rem; font-weight: 600; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.info { background: var(--cyan-soft); color: var(--cyan-text); }
.missing { margin: .4rem 0 0; padding-left: 1.2rem; font-weight: 500; }
.missing li { margin: .2rem 0; }
.missing a { cursor: pointer; font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: calc(5.5rem + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--navy); color: #fff; padding: .75rem 1.2rem; border-radius: 999px; font-weight: 700; font-size: .92rem; box-shadow: var(--shadow-lg); z-index: 50; max-width: calc(100% - 32px); animation: wzIn .3s cubic-bezier(.2,.8,.2,1); }
.toast.err { background: var(--danger); }
.welcome { text-align: center; padding: 2rem 1.2rem; }
.welcome img { height: 46px; margin: .5rem auto 1.2rem; display: block; }
.welcome h1, .welcome h2 { font-size: clamp(1.6rem, 5vw, 2.3rem); margin: 0 0 .5rem; }
.welcome ul { text-align: left; max-width: 480px; margin: 1.2rem auto; padding: 0; list-style: none; display: grid; gap: .5rem; }
.welcome li { position: relative; padding: .6rem .9rem .6rem 2.3rem; border-radius: 14px; background: var(--paper); }
.welcome li::before { content: ""; position: absolute; left: .9rem; top: 1.05rem; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.done-page { text-align: center; padding: 2.6rem 1.2rem; }
.done-page .big { width: 86px; height: 86px; border-radius: 50%; margin: 0 auto 1.2rem; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 2.6rem; font-weight: 800; line-height: 1; box-shadow: 0 0 0 10px rgba(235,35,126,.1), 0 20px 40px -14px rgba(200,24,110,.8); animation: pop .6s cubic-bezier(.2,1.4,.4,1); }
.card:has(> .step-title), main > .step-title { animation: wzIn .45s cubic-bezier(.2,.8,.2,1); }
@keyframes wzIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Administration ---------- */
.adm-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.adm-table th, .adm-table td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.adm-table tr:hover td { background: var(--field); }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: .22rem .65rem; font-size: .78rem; font-weight: 700; background: var(--paper); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.prog { display: inline-block; width: 70px; height: 6px; border-radius: 99px; background: var(--line); vertical-align: middle; margin-right: .4rem; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--grad-2); border-radius: 99px; }
.actions { display: flex; gap: .3rem; flex-wrap: wrap; }
pre.dump { background: var(--navy); color: #e2e8f0; padding: 1rem; border-radius: 14px; overflow: auto; font-size: .78rem; max-height: 60vh; }
@media (max-width: 720px) { .adm-table .hide-m { display: none; } }

/* ---------- Accueil neutre ---------- */
.home { max-width: 520px; margin: 18vh auto; padding: 2rem 1.3rem; text-align: center; color: var(--muted); background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.home-logo { height: 52px; margin-bottom: 1.2rem; }

@media (min-width: 640px) { .card { padding: 1.6rem; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
