/* DTFForge en ligne — mêmes couleurs et polices que dtfforge.com. Mise en page : une colonne étroite pour les
   formulaires, une grille de tuiles pour l'atelier. */
@font-face { font-family: "Bricolage"; src: url(fonts/bricolage-grotesque-latin-wght-normal.woff2) format("woff2"); font-weight: 200 800; font-display: swap; 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+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage"; src: url(fonts/bricolage-grotesque-latin-ext-wght-normal.woff2) format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DM Sans"; src: url(fonts/dm-sans-latin-wght-normal.woff2) format("woff2"); font-weight: 100 1000; font-display: swap; 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+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Sans"; src: url(fonts/dm-sans-latin-ext-wght-normal.woff2) format("woff2"); font-weight: 100 1000; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
    --bg: #191b21;
    --surface: #21232b;
    --surface-2: #2a2c35;
    --line: rgba(255, 255, 255, .09);
    --line-strong: rgba(255, 255, 255, .16);
    --text: #f4f2f7;
    --muted: #b6b1c3;
    --faint: #8f8a9d;
    --link: #ff7ccb;
    --link-hover: #ffb0de;
    --ok: #46c596;
    --warn: #f2b55c;
    --bad: #ff8a8a;
    --grad: linear-gradient(90deg, #2458ff, #7833ff 30%, #f20dce 57%, #ff5269 79%, #ff9b08);
    --btn: linear-gradient(90deg, #6a2ee8, #c3129f);
    --radius: 16px;
    --display: "Bricolage", "DM Sans", system-ui, sans-serif;
    --body: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; letter-spacing: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

/* en-tête : le même que celui de dtfforge.com (logo, liens du site), plus les liens de l'application */
.top { position: sticky; top: 0; z-index: 20; background: rgba(25, 27, 33, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top .wrap { position: relative; display: flex; align-items: center; gap: 18px; max-width: 1200px; height: 68px; margin: 0 auto; padding: 0 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand img { width: auto; height: 36px; }
.brand .tag { color: var(--faint); font: 500 12px/1 var(--body); padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 999px; white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a.navlink { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 11px; border-radius: 10px; white-space: nowrap; }
.nav a.navlink:hover, .nav a.navlink[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav .sep { width: 1px; height: 22px; background: var(--line-strong); margin: 0 8px; }
.nav .btn { margin-left: 4px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text); text-decoration: none; font: 600 14px/1 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--grad); }
select.lang { appearance: none; background: transparent; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 10px; font: 600 13px/1.2 var(--body); cursor: pointer; margin-left: 4px; }
select.lang option { background: var(--surface); color: var(--text); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line-strong); color: var(--text); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; }
.menu-btn svg { margin: auto; }
@media (max-width: 1080px) {
    .menu-btn { display: block; }
    .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 18px; background: var(--bg); border-bottom: 1px solid var(--line); }
    .nav.open { display: flex; }
    .nav a.navlink { padding: 13px 8px; font-size: 17px; }
    .nav .sep { width: auto; height: 1px; margin: 8px 0; }
    .nav .btn, .nav .pill { margin: 8px 0 0; align-self: flex-start; }
    select.lang { margin: 10px 0 0; align-self: flex-start; }
}

.view { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 36px 20px 56px; outline: none; }
.narrow { max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.lead { color: var(--muted); font-size: 18px; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 20px; border-radius: 12px; font: 700 16px/1 var(--body); text-decoration: none; cursor: pointer; border: 0; color: #fff; background: var(--btn); transition: filter .15s; }
.btn:hover { color: #fff; filter: brightness(1.12); }
.btn.ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--text); }
.btn.ghost:hover { background: rgba(255, 255, 255, .05); filter: none; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn.text { background: none; min-height: 0; padding: 0; color: var(--link); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.btn[disabled] { background: var(--surface-2); color: var(--faint); cursor: default; filter: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
form.card { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
.field input { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: 16px/1.2 var(--body); }
.field input:focus { outline: 2px solid var(--link); outline-offset: 1px; border-color: transparent; }
.field .hint { color: var(--faint); font-size: 13px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { border-radius: 10px; padding: 11px 14px; font-size: 15px; border: 1px solid var(--line-strong); }
.msg.bad { color: var(--bad); border-color: rgba(255, 138, 138, .4); background: rgba(255, 138, 138, .07); }
.msg.ok { color: var(--ok); border-color: rgba(70, 197, 150, .4); background: rgba(70, 197, 150, .07); }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; color: var(--muted); }

.hero { display: flex; flex-direction: column; gap: 20px; padding: 18px 0 34px; }
.hero-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; }
.gift { color: var(--muted); font-size: 15px; }
.banner { display: inline-flex; align-self: flex-start; color: var(--warn); border: 1px solid rgba(242, 181, 92, .35); background: rgba(242, 181, 92, .07); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.tile p { color: var(--muted); font-size: 15px; }
.tile .soon { margin-top: auto; padding-top: 6px; color: var(--faint); font-size: 13px; }
.section { display: flex; flex-direction: column; gap: 16px; margin-top: 34px; }
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.steps li { border-left: 2px solid var(--line-strong); padding: 2px 0 2px 14px; color: var(--muted); }

.balance { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.balance .num { font: 800 46px/1 var(--display); font-variant-numeric: tabular-nums; }
.balance .label { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; color: var(--faint); font-weight: 600; font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
td.plus { color: var(--ok); }
.lots { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.lots li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lots .n { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 16px 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.foot a { color: var(--faint); }
.noscript { padding: 20px; text-align: center; }

@media (max-width: 520px) {
    .view { padding: 26px 16px 44px; }
    .top .wrap { padding: 0 16px; gap: 12px; }
    .brand img { height: 30px; }
    .balance .num { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
/* ------------------------------------------------------------------ outils */
.view.wide { max-width: 1280px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tile.link { color: var(--text); text-decoration: none; transition: border-color .15s, background .15s; }
.tile.link:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }
.tile .go { margin-top: auto; padding-top: 6px; color: var(--link); font-weight: 700; font-size: 14px; }
.tile .go::after { content: " →"; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; }
.hint { color: var(--faint); font-size: 13px; }
.warn { color: var(--warn); }
.btn.text.danger { color: var(--bad); font-size: 14px; }
/* bouton « retirer » : croix dessinée (le caractère ✕ manque dans certaines polices) */
.btn.icon-x { position: relative; width: 28px; height: 28px; flex: none; text-decoration: none; }
.btn.icon-x::before, .btn.icon-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; border-radius: 1px; background: currentColor; }
.btn.icon-x::before { transform: translate(-50%, -50%) rotate(45deg); }
.btn.icon-x::after { transform: translate(-50%, -50%) rotate(-45deg); }

.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; min-height: 190px; padding: 26px; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--link); background: var(--surface-2); }
.drop.busy { pointer-events: none; opacity: .6; }
.drop-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--btn); color: #fff; font-size: 22px; }
.drop-title { font: 700 18px/1.3 var(--display); }
.drop-state { display: flex; flex-direction: column; gap: 8px; }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }

.thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.thumb { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.thumb-img { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; background: repeating-conic-gradient(#2c2e37 0 25%, #24262e 0 50%) 0 0 / 18px 18px; }
.thumb-img img { max-width: 92%; max-height: 92%; object-fit: contain; }
.thumb-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.file { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.file:last-child { border-bottom: 0; }
.file-main { min-width: 0; }
.file-name { font-weight: 600; overflow-wrap: anywhere; }

.ht-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.ht-head .back { font-size: 15px; font-weight: 600; text-decoration: none; }
.ht-title { font-size: clamp(24px, 3.2vw, 34px); overflow-wrap: anywhere; }
.ht { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 22px; align-items: start; }
.panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.group { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.group h3 { font-size: 15px; }
.group .sub { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { flex: 1 1 auto; min-height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font: 600 14px/1 var(--body); cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.seg button[aria-pressed="true"] { color: #fff; background: var(--btn); border-color: transparent; }
.size-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.size-row label { font-weight: 600; font-size: 14px; }
.group input[type="number"], .group input[type="text"] { min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: 15px/1.2 var(--body); }
.size-row input { width: 96px; }
.size-row input#ctWidth { width: 170px; }
.group .field input { width: 120px; min-height: 40px; }
.pickbox { display: flex; flex-direction: column; gap: 8px; }
canvas.pick { max-width: 100%; height: auto; cursor: crosshair; border-radius: 10px; border: 1px solid var(--line-strong); background: repeating-conic-gradient(#2c2e37 0 25%, #24262e 0 50%) 0 0 / 16px 16px; align-self: flex-start; }
.hex-row { display: flex; align-items: center; gap: 10px; }
.hex-row input[type="text"] { width: 110px; font-family: var(--mono); }
.hex-row input[type="color"] { width: 54px; height: 38px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); padding: 3px; cursor: pointer; }
.swatch { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-strong); flex: none; }
/* Niveaux comme Photoshop : histogramme, une barre, trois triangles (noir, gris, blanc), trois champs */
.lv { display: flex; flex-direction: column; gap: 0; padding: 10px 12px 8px; border-radius: 10px; background: #2b2b2b; border: 1px solid var(--line); }
.lv-hist { display: block; width: 100%; height: 110px; background: #3c3c3c; border: 1px solid #5a5a5a; border-radius: 2px; }
.lv-track { position: relative; height: 22px; margin: 0 0 2px; touch-action: none; }
.lv-handle { position: absolute; top: 2px; width: 22px; height: 20px; margin-left: -11px; display: grid; place-items: end center; cursor: ew-resize; touch-action: none; border-radius: 4px; outline: none; }
.lv-handle svg { display: block; pointer-events: none; }
.lv-handle:focus-visible { box-shadow: 0 0 0 2px #ff7ccb; }
.lv-handle.drag svg polygon { stroke: #ff7ccb; }
.lv-handle.gamma { z-index: 2; }
.lv-fields { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
.group .lv-fields input.lv-num { width: 64px; min-height: 34px; padding: 0 8px; text-align: center; font: 600 14px/1 var(--mono); }
.lv-handle:hover svg polygon { stroke: #ff7ccb; }
.stage-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mask-note { margin: 0; }
/* Détourage : couleurs retirées, case + seuil sur une ligne */
.bgcolors { display: flex; flex-wrap: wrap; gap: 8px; }
.bgcolors:empty { display: none; }
.bgcolor { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.bgcolor .swatch { width: 22px; height: 22px; border-radius: 6px; }
.mono { font-family: var(--mono); }
.inline-check { display: flex; flex-direction: column; gap: 8px; }
.row-end { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
details.more summary { cursor: pointer; font-weight: 700; font-size: 15px; }
details.more[open] summary { margin-bottom: 4px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; }
.check input { margin-top: 4px; accent-color: #c3129f; width: 17px; height: 17px; }
.group.export { gap: 10px; }
.group.export .btn { width: 100%; }
.group.export .msg { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.report { margin: 0; padding: 0 0 0 2px; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.report li.warn { color: var(--warn); }

.stage { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.stage-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.stage-bar .seg { flex: 0 1 auto; }
.figure { position: relative; display: grid; place-items: center; min-height: 320px; max-height: calc(100vh - 210px); border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.figure img { width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 212px); }
.figure.fit img { cursor: zoom-in; }
.figure.zoom img { cursor: crosshair; image-rendering: pixelated; width: min(100%, 900px); max-height: none; }
.figure .spinner { position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: #fff; opacity: 0; transition: opacity .15s; }
.figure.busy .spinner { opacity: 1; animation: spin .8s linear infinite; }
.figure.busy img { opacity: .75; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 960px) {
    .ht { grid-template-columns: minmax(0, 1fr); }
    .stage { position: static; order: -1; }
    .figure { max-height: none; }
    .figure img { max-height: 70vh; }
}
@media (prefers-reduced-motion: reduce) { .figure.busy .spinner { animation: none; } .bar span { transition: none; } }


/* Mode « en préparation » : lien discret vers la connexion de l'équipe */
.team { text-align: center; margin-top: 28px; }
.team a { color: var(--faint); }

/* Planche : visuels, choix des visuels, réglages du film, aperçu en hauteur */
.gg-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gg-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
.gg-item.bad { border-color: var(--warn); }
.gg-thumb, .gg-pick img { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: repeating-conic-gradient(#2c2e37 0 25%, #24262e 0 50%) 0 0 / 12px 12px; }
.gg-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gg-fields { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.gg-fields label { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.group .gg-fields input { min-height: 34px; padding: 0 8px; }
.group .gg-fields input.gg-qty { width: 70px; }
.group .gg-fields input.gg-width { width: 92px; }
.gg-picker { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; border: 1px dashed var(--line-strong); max-height: 460px; overflow: auto; }
.gg-picks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.gg-pick { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.gg-pick img { width: 100%; height: 80px; }
.gg-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.group .gg-nums .field input { width: 100%; }
.gg-total { font-weight: 700; font-size: 16px; }
.gg-summary { display: flex; flex-direction: column; gap: 4px; }
.gg-summary:empty { display: none; }
.gg-empty { padding: 60px 20px; text-align: center; border-radius: var(--radius); border: 1px dashed var(--line-strong); }
.figure.gg-figure { place-items: start center; overflow: auto; padding: 12px; }
.figure.gg-figure img { max-height: none; width: min(100%, 640px); cursor: default; }

/* ------------------------------------------------------------------ BAT */
.bt-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.bt-tab { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; padding: 9px 14px; border-radius: 10px; }
.bt-tab:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.bt-tab[aria-current="page"] { color: #fff; background: var(--btn); }
.bt-h2 { font-size: 22px; overflow-wrap: anywhere; }
.bt-status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.bt-status.sent { color: var(--warn); border-color: rgba(242, 181, 92, .45); background: rgba(242, 181, 92, .08); }
.bt-status.approved { color: var(--ok); border-color: rgba(70, 197, 150, .45); background: rgba(70, 197, 150, .08); }
.bt-status.changes { color: var(--bad); border-color: rgba(255, 138, 138, .45); background: rgba(255, 138, 138, .08); }
.bt-table td a { font-weight: 700; }
.bt-field textarea, .bt-field select, select.bt-select, input.bt-search, .bt-linkrow input { width: 100%; min-height: 40px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: 15px/1.35 var(--body); }
.bt-field textarea { resize: vertical; }
.group .bt-field input, .bt-form .bt-field input { width: 100%; }
input.bt-search { max-width: 420px; flex: 1 1 260px; }
.bt-quick { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; border: 1px dashed var(--line-strong); }
.bt-colors { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; }
.bt-sw { aspect-ratio: 1; min-width: 0; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .25); cursor: pointer; padding: 0; }
.bt-sw[aria-pressed="true"] { outline: 2px solid var(--link); outline-offset: 2px; }
.bt-places { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bt-place { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
.bt-place.bad { border-color: var(--warn); }
.group .gg-fields input.bt-width { width: 92px; min-height: 34px; }
.seg.bt-zones button { flex: 0 1 auto; min-height: 32px; font-size: 13px; padding: 0 10px; }
.seg.bt-on button { flex: 1 1 0; min-width: 0; min-height: 32px; font-size: 13px; padding: 4px 10px; white-space: normal; line-height: 1.2; }
#btSup2Box:not(:empty) { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.bt-sup-head { justify-content: space-between; align-items: center; }
.bt-lib, .bt-picker { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; border: 1px dashed var(--line-strong); }
.bt-lib { max-height: 520px; overflow: auto; }
.bt-picks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; max-height: 360px; overflow: auto; }
.bt-pick { width: 100%; display: flex; flex-direction: column; gap: 6px; align-items: stretch; padding: 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; text-align: left; }
.bt-pick:hover { border-color: var(--link); }
.bt-pick img { width: 100%; height: 80px; object-fit: contain; border-radius: 6px; background: repeating-conic-gradient(#2c2e37 0 25%, #24262e 0 50%) 0 0 / 12px 12px; }
.bt-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bt-linkrow { display: flex; gap: 8px; }
.bt-linkrow input { font-family: var(--mono); font-size: 13px; }
.bt-changes { display: flex; flex-direction: column; gap: 6px; }
.bt-comment, .pub-comment { white-space: pre-wrap; color: var(--text); }
.figure.bt-figure { background: #fff; }
.figure.bt-figure img { cursor: default; }
.bt-form { display: flex; flex-direction: column; gap: 12px; }
.bt-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bt-form .bt-field input { min-height: 44px; }
.ba-logo { display: grid; place-items: center; padding: 16px; border-radius: 12px; background: #fff; max-width: 360px; }
.ba-logo img { max-width: 100%; max-height: 140px; }
/* supports photographiés : zones tracées sur la photo */
.bs-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.bs-canvas { position: relative; user-select: none; touch-action: none; cursor: crosshair; border-radius: 12px; overflow: hidden; background: repeating-conic-gradient(#2c2e37 0 25%, #24262e 0 50%) 0 0 / 16px 16px; }
.bs-canvas img { display: block; width: 100%; height: auto; pointer-events: none; }
.bs-layer { position: absolute; inset: 0; }
.bs-zone { position: absolute; border: 2px solid #e5007d; background: rgba(229, 0, 125, .14); border-radius: 3px; }
.bs-zone span { position: absolute; left: 0; top: -1px; transform: translateY(-100%); background: #e5007d; color: #fff; font: 700 12px/1.4 var(--body); padding: 1px 6px; border-radius: 4px 4px 0 0; white-space: nowrap; }
.bs-zone.ghost { border-style: dashed; }
.bs-zones { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bs-zrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bs-zrow input.bs-zname { flex: 1 1 140px; min-height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: 15px var(--body); }
.bs-zrow label { display: flex; align-items: center; gap: 6px; }
.bs-zrow input.bs-zcm { width: 80px; min-height: 38px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: 15px var(--body); }
@media (max-width: 760px) {
    .bt-cols, .bs-grid { grid-template-columns: minmax(0, 1fr); }
    .bt-colors { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* page du lien de validation (client de l'atelier) */
body.pub .pub-view { max-width: 1100px; }
.pub-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px 24px; }
.pub-atelier { font: 700 20px/1.2 var(--display); }
.pub-ref { text-align: right; }
.pub-ref h1 { font-size: clamp(22px, 3vw, 30px); }
.pub-wait { color: var(--warn); border: 1px solid rgba(242, 181, 92, .4); background: rgba(242, 181, 92, .07); border-radius: 10px; padding: 11px 14px; }
.pub-figure { display: block; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.pub-figure img { display: block; width: 100%; height: auto; }
.pub-form { display: flex; flex-direction: column; gap: 14px; }
.pub-form textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: 15px/1.4 var(--body); resize: vertical; }
@media (max-width: 640px) { .pub-ref { text-align: left; } }

/* Paiement (écran Jetons) : formules en grille, packs, abonnement en cours, accord aux conditions */
.bill-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.bill-plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.bill-plan.featured { border-color: #c3129f; box-shadow: 0 0 0 1px #c3129f inset; }
.bill-plan .btn { margin-top: auto; }
.bill-plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bill-plan-head h3 { font-size: 21px; }
.bill-tag { font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--link); }
.bill-for { min-height: 2.6em; margin: 0; }
.bill-price .big { font: 800 32px/1 var(--display); font-variant-numeric: tabular-nums; }
.bill-period button { flex: 0 1 auto; }
.bill-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.bill-pack { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bill-pack-n { font: 700 20px/1.1 var(--display); }
.bill-pay { display: flex; flex-direction: column; gap: 8px; }
.bill-consent span { min-width: 0; }
.bill-sub { display: flex; flex-direction: column; gap: 12px; }
.bill-sub p { margin: 0; }
.bill-sub-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.bill-sub-head h3 { font-size: 24px; }
.tag-status { font: 600 12px/1 var(--mono); padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line-strong); white-space: nowrap; }
.tag-status.ok { color: var(--ok); } .tag-status.warn { color: var(--warn); } .tag-status.bad { color: var(--bad); }
.bill-change { display: flex; flex-direction: column; gap: 8px; }
.bill-change-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.bill-change-row .hint { flex-basis: 100%; margin: 0; }
.btn.danger-fill { background: #b42346; }
.bill-change .sub { font-size: 13px; font-weight: 600; color: var(--muted); }
.bill-sub .bt-actions .hint { flex-basis: 100%; margin: 0; }
/* Pages des conditions et de la confidentialité */
.legal { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; display: flex; flex-direction: column; gap: 14px; }
.legal h1 { font-size: clamp(28px, 4vw, 38px); }
.legal h2 { font-size: 19px; margin-top: 18px; }
.legal p, .legal li { color: var(--text); max-width: 70ch; }
.legal ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal .meta { color: var(--muted); font-size: 14px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 14px; }
.legal th, .legal td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal hr { border: 0; border-top: 1px solid var(--line-strong); margin: 28px 0 8px; width: 100%; }
