:root {
  --pearl: #fbf8fd;
  --white: #ffffff;
  --ink: #241032;
  --soft: #665474;
  --violet: #6d28d9;
  --pink: #c1237e;
  --blush: #fce7f3;
  --lilac: #efe7fd;
  --line: #e8dcf0;
  --grad: linear-gradient(120deg, #6d28d9 0%, #a8259f 55%, #cc2366 100%);
  --shadow: 0 8px 28px rgba(99, 36, 140, 0.09);
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(900px 600px at 0% 0%, rgba(249, 196, 224, 0.5), transparent 70%),
    radial-gradient(800px 600px at 100% 20%, rgba(206, 190, 252, 0.45), transparent 70%),
    radial-gradient(900px 700px at 40% 100%, rgba(255, 220, 205, 0.45), transparent 70%),
    var(--pearl);
  background-attachment: fixed;
}

h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; margin: 0 0 10px; }
p { margin: 0; }
a { color: var(--violet); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.main { max-width: 900px; margin: 0 auto; padding: 24px 18px 110px; display: flex; flex-direction: column; gap: 18px; }
.main.solo { max-width: 520px; padding-bottom: 40px; }
.soft { color: var(--soft); }
.small { font-size: 0.85rem; }

.logo { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo.big { font-size: 2rem; }

/* Menu : en bas sur téléphone, à gauche sur ordinateur */
.nav {
  position: fixed; inset: auto 0 0 0; z-index: 5;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.nav .logo { display: none; }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; font-size: 0.75rem; font-weight: 600; color: var(--soft); text-decoration: none; border-radius: 14px; }
.nav a[aria-current] { color: var(--pink); background: var(--blush); }
.nav a.create svg { background: var(--grad); color: #fff; border-radius: 50%; width: 30px; height: 30px; padding: 4px; }

@media (min-width: 900px) {
  .nav { inset: 0 auto 0 0; width: 230px; display: flex; flex-direction: column; gap: 6px; padding: 28px 16px; border-top: 0; border-right: 1px solid var(--line); }
  .nav .logo { display: block; padding: 0 12px 20px; }
  .nav a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 14px; font-size: 1rem; min-height: 48px; }
  .nav ~ .main { margin-left: max(230px, calc((100vw - 900px) / 2 + 115px)); padding: 40px 36px; max-width: min(900px, calc(100vw - 230px)); }
}

.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--grad); color: #fff; font-weight: 700; text-decoration: none; overflow: hidden; border: 3px solid #fff; box-shadow: var(--shadow); }
.avatar img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.avatar.small { width: 36px; height: 36px; font-size: 0.8rem; border-width: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 16px; border: 2px solid var(--line); background: var(--white); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--grad) border-box; border-color: transparent; color: #fff; box-shadow: 0 10px 24px rgba(168, 37, 159, 0.28); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; align-self: flex-start; }
.btn.big { min-height: 64px; font-size: 1.15rem; }
.btn:hover { filter: brightness(1.04); }
.link { background: none; border: 0; padding: 0; min-height: 44px; font: inherit; font-weight: 600; color: var(--violet); cursor: pointer; text-align: left; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }

.hero { border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 8px; background: linear-gradient(125deg, #fbd8ec, #e9defd 55%, #ffe4da); border: 1px solid #fff; box-shadow: var(--shadow); }
.hero h2 { font-size: 1.6rem; margin: 0; }
.kicker { font-size: 0.8rem; font-weight: 700; color: #8d1259; letter-spacing: 0.04em; }

.card { background: rgba(255, 255, 255, 0.9); border: 1px solid #fff; border-radius: 20px; padding: 18px; box-shadow: var(--shadow); margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
button.card { font: inherit; color: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 6px; border: 2px solid #fff; }
button.card:hover { border-color: #d9b8f5; }
button.card[aria-pressed='true'] { border-color: var(--pink); background: #fff6fb; }
.choice strong { font-size: 1.15rem; }
.tag { align-self: flex-start; font-size: 0.75rem; font-weight: 700; color: var(--violet); background: var(--lilac); border-radius: 20px; padding: 3px 10px; }
.post { display: flex; flex-direction: column; gap: 10px; }
.post p { white-space: pre-line; flex: 1; }
.row-actions { display: flex; flex-wrap: wrap; gap: 4px 18px; }

.list { list-style: none; padding: 4px 18px; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--line); }
.list li:last-child { border: 0; }

.form { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; font-weight: 600; min-width: 0; }
input, select, textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid #d6c5e2; border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-weight: 400; }
textarea { resize: vertical; }
input[type='color'] { padding: 4px; }
input[type='file'] { font-size: 0.85rem; }
label.check { flex-direction: row; align-items: center; gap: 10px; min-height: 44px; }
label.check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--pink); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
details summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
details label { margin-top: 12px; }
.logo-preview { display: flex; align-items: center; gap: 14px; }
.logo-preview img { height: 56px; max-width: 160px; object-fit: contain; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
#results { display: flex; flex-direction: column; gap: 12px; }

.steps { display: flex; align-items: center; gap: 12px; color: var(--soft); font-size: 0.85rem; }
.back { width: 44px; height: 44px; border-radius: 14px; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--ink); box-shadow: var(--shadow); flex: none; }
.bar { flex: 1; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--grad); }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: 0.9rem; padding: 0 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1.5px solid #d6c5e2; background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border: 2px solid transparent; border-radius: 14px; background: none; font: inherit; font-size: 0.75rem; color: var(--ink); cursor: pointer; }
.swatch i { width: 54px; height: 44px; border-radius: 10px; border: 1px solid rgba(36, 16, 50, 0.15); }
.swatch[aria-pressed='true'] { border-color: var(--pink); }
.swatch.aurore i { background: linear-gradient(45deg, #e8547a, #c1237e, #5b2bc4); }
.swatch.nacre i { background: linear-gradient(135deg, #f4c0de, #fbf8fd 50%, #c9b8fa); }
.swatch.prune i { background: linear-gradient(225deg, #c1237e, #2a0b3f 70%); }
.swatch.rose i { background: #fadceb; }
.swatch.marque i { background: var(--brand); }

.studio { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .studio { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.stage { display: flex; justify-content: center; }
canvas { display: block; max-width: 100%; max-height: 62vh; height: auto; width: auto; margin: 0 auto; border-radius: 18px; box-shadow: var(--shadow); }
.preview { display: flex; flex-direction: column; gap: 12px; }
.who { display: flex; align-items: center; gap: 10px; }
.caption { white-space: pre-line; overflow-wrap: anywhere; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.note { background: var(--lilac); border-radius: 12px; padding: 10px 14px; font-size: 0.9rem; }
.note.warn { background: #fff0d9; }

.month { margin: 8px 0 -6px; text-transform: capitalize; color: var(--soft); font-size: 1rem; }
.event { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.event.soon { background: linear-gradient(125deg, #fde0f0, #efe6fe); }
.day { width: 40px; text-align: center; font-size: 1.6rem; font-weight: 700; color: var(--pink); flex: none; }
.grow { flex: 1; display: flex; flex-direction: column; min-width: 0; }

#toast { position: fixed; left: 50%; bottom: 92px; transform: translate(-50%, 20px); width: max-content; max-width: calc(100vw - 32px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; opacity: 0; pointer-events: none; transition: 0.2s; z-index: 10; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Outils, mises en page, forfaits, vidéo */
.nav a.wide-only { display: none; }
@media (min-width: 900px) { .nav a.wide-only { display: flex; } .nav { overflow-y: auto; } }
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tools a { display: flex; flex-direction: column; gap: 4px; padding: 14px; color: var(--ink); text-decoration: none; }
.tools svg { color: var(--pink); }
@media (min-width: 900px) { .tools { display: none; } }

.swatch.lilas i { background: #e7dbfd; }
.swatch.corail i { background: linear-gradient(45deg, #b8325a, #c2410c); }
.swatch.blanc i { background: #fff; }
.layout { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 84px; padding: 6px; border: 2px solid transparent; border-radius: 14px; background: none; font: inherit; font-size: 0.75rem; color: var(--ink); cursor: pointer; }
.layout[aria-pressed='true'] { border-color: var(--pink); }
.locked { font-size: 0.65rem; font-weight: 700; color: var(--violet); background: var(--lilac); border-radius: 8px; padding: 1px 6px; }
.mini { position: relative; display: block; width: 56px; height: 56px; border-radius: 8px; background: var(--lilac); overflow: hidden; }
.mini::before { content: ''; position: absolute; background: #c9a9ee; }
.mini.fond::before { inset: 0; background: linear-gradient(135deg, #d9c2f6, #f3bedd); }
.mini.haut::before { inset: 0 0 50% 0; }
.mini.bas::before { inset: 50% 0 0 0; }
.mini.gauche::before { inset: 0 55% 0 0; }
.mini.droite::before { inset: 0 0 0 55%; }
.mini.rond::before { width: 24px; height: 24px; left: 16px; top: 7px; border-radius: 50%; }
.mini.cadre::before { inset: 7px 7px 24px 7px; border-radius: 4px; }
.mini b { position: absolute; height: 5px; width: 26px; border-radius: 3px; background: var(--ink); box-shadow: 0 8px 0 -1px var(--ink); }
.mini b.haut { top: 10px; } .mini b.centre { top: 22px; } .mini b.bas { top: 38px; }
.mini b.left { left: 8px; } .mini b.center { left: 15px; } .mini b.right { right: 8px; }
.mini.haut b { top: 36px; } .mini.bas b { top: 8px; } .mini.rond b, .mini.cadre b { top: 38px; }
.mini.gauche b { left: 29px; width: 20px; } .mini.droite b { left: 5px; width: 20px; }
.lock { min-height: 44px; border: 1.5px dashed #b99ad4; border-radius: 12px; background: transparent; font: inherit; font-weight: 600; color: var(--violet); cursor: pointer; padding: 8px 14px; }

.plans ul { margin: 0; padding-left: 18px; flex: 1; }
.plan { display: flex; flex-direction: column; gap: 12px; }
.card.plan.current { border: 2px solid var(--pink); }
.price strong { font-size: 1.8rem; }
.list.plain { padding: 0; margin: 0; }
.list.plain li { padding: 8px 0; overflow-wrap: anywhere; }
.invite { display: flex; flex-direction: column; gap: 6px; }
.btn:disabled { opacity: 0.55; cursor: default; }

.post canvas { max-height: 220px; }
.player { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.player input[type='range'] { padding: 0; border: 0; accent-color: var(--pink); }
.subs { display: flex; flex-direction: column; gap: 12px; }
.sub { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sub .wide { grid-column: 1 / -1; }
progress { width: 100%; accent-color: var(--pink); }
[hidden] { display: none !important; }
fieldset label.check { font-weight: 400; margin-right: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* Banque d'images et logo */
.bank { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.shot { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 6px; border: 2px solid #fff; border-radius: 16px; background: rgba(255,255,255,0.9); box-shadow: var(--shadow); font: inherit; font-size: 0.8rem; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; }
.shot button { padding: 0; border: 0; background: none; cursor: pointer; }
.shot img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 11px; }
.shot a { min-height: 32px; display: flex; align-items: center; }
.shot:hover { border-color: #d9b8f5; }
.logo-preview img { background: repeating-conic-gradient(#e3d8ea 0 25%, #fff 0 50%) 0 0 / 14px 14px; border-radius: 8px; }
