/* Fait ton journal — atelier (front). Tout est cloisonné sous .ftj-app pour résister aux thèmes. */

.ftj-app {
	--ftj-paper: #f5f0e6;
	--ftj-card: #fffdf8;
	--ftj-ink: #171513;
	--ftj-muted: #6b645a;
	--ftj-line: #ddd4c4;
	--ftj-accent: #c0172d;
	--ftj-accent-soft: #f6e2e2;
	--ftj-ok: #1e7a46;
	--ftj-radius: 4px;
	--ftj-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--ftj-display: "FTJ Schola", Georgia, "Times New Roman", serif;
	--ftj-cond: "FTJ Heroscn", "Arial Narrow", Arial, sans-serif;
	position: relative;
	color: var(--ftj-ink);
	font: 15px/1.45 var(--ftj-ui);
	text-align: left;
	max-width: 1440px;
	margin: 1.5em auto;
}
/* Conteneur « pleine largeur » : les thèmes compatibles laissent l'atelier dépasser la colonne de texte. */
.ftj-outer.alignfull { padding-left: 16px; padding-right: 16px; }
.ftj-app *, .ftj-app *::before, .ftj-app *::after { box-sizing: border-box; }
.ftj-app h2, .ftj-app h3, .ftj-app h4, .ftj-app p, .ftj-app ul, .ftj-app ol { margin: 0; padding: 0; }
.ftj-app ul, .ftj-app ol { list-style: none; }
.ftj-app button, .ftj-app input, .ftj-app select, .ftj-app textarea { font: inherit; color: inherit; letter-spacing: normal; text-transform: none; }
.ftj-app img { max-width: 100%; height: auto; display: block; }
.ftj-loading, .ftj-notice { padding: 2em; text-align: center; color: #6b645a; }

.ftj-shell {
	container-type: inline-size; /* mise en page adaptée à la largeur réelle de l'atelier */
	container-name: ftj;
	background: var(--ftj-paper);
	border: 1px solid var(--ftj-line);
	border-radius: 6px;
	overflow: hidden;
}

.ftj-kicker {
	font-family: var(--ftj-cond);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .14em;
	font-size: 12px;
	color: var(--ftj-accent);
}

/* ---------- Boutons ---------- */
.ftj-app .ftj-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4em;
	min-height: 40px; padding: 8px 16px;
	border: 1.5px solid var(--ftj-ink); border-radius: var(--ftj-radius);
	background: transparent; color: var(--ftj-ink);
	font-weight: 600; font-size: 14px; line-height: 1.2; text-decoration: none; cursor: pointer;
	box-shadow: none; transition: background .15s, color .15s, transform .1s;
	white-space: nowrap;
}
.ftj-app .ftj-btn:hover { background: var(--ftj-ink); color: var(--ftj-paper); }
.ftj-app .ftj-btn:active { transform: translateY(1px); }
.ftj-app .ftj-btn:disabled { opacity: .4; cursor: not-allowed; background: transparent; color: var(--ftj-ink); }
.ftj-app .ftj-btn:focus-visible, .ftj-app button:focus-visible, .ftj-app a:focus-visible, .ftj-app input:focus-visible, .ftj-app select:focus-visible, .ftj-app textarea:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--ftj-accent) 55%, transparent); outline-offset: 2px;
}
.ftj-app .ftj-btn-primary { background: var(--ftj-ink); color: var(--ftj-paper); }
.ftj-app .ftj-btn-primary:hover { background: var(--ftj-accent); border-color: var(--ftj-accent); color: #fff; }
.ftj-app .ftj-btn-ghost { border-color: transparent; }
.ftj-app .ftj-btn-ghost:hover { background: rgba(0,0,0,.06); color: var(--ftj-ink); }
.ftj-app .ftj-btn-small { min-height: 32px; padding: 4px 10px; font-size: 13px; border-width: 1px; }
.ftj-app .ftj-btn-danger { color: var(--ftj-accent); border-color: currentColor; }
.ftj-app .ftj-btn-danger:hover { background: var(--ftj-accent); color: #fff; border-color: var(--ftj-accent); }
.ftj-app .ftj-btn-big { min-height: 48px; padding: 12px 22px; font-size: 15px; }
.ftj-app .ftj-link { background: none; border: 0; padding: 0; color: var(--ftj-accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 13px; }
.ftj-app .ftj-icon-btn { width: 36px; height: 36px; border: 1px solid var(--ftj-line); background: var(--ftj-card); border-radius: 50%; cursor: pointer; font-size: 20px; line-height: 1; padding: 0; }
.ftj-app .ftj-icon-btn:hover { border-color: var(--ftj-ink); }
.ftj-app .ftj-x { width: 26px; height: 26px; flex: none; border: 0; background: transparent; border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1; color: var(--ftj-muted); padding: 0; }
.ftj-app .ftj-x:hover { background: var(--ftj-accent-soft); color: var(--ftj-accent); }

/* ---------- Étape 1 : choix ---------- */
.ftj-hero { padding: 40px 32px 28px; border-bottom: 3px double var(--ftj-ink); background: var(--ftj-card); text-align: center; }
.ftj-app .ftj-hero-title { font-family: var(--ftj-display); font-weight: 700; font-size: clamp(34px, 6vw, 60px); line-height: 1; margin: 8px 0 12px; letter-spacing: -.01em; color: var(--ftj-ink); }
.ftj-hero-lead { max-width: 640px; margin: 0 auto; color: var(--ftj-muted); font-size: 16px; }
.ftj-draft { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 20px 24px 0; padding: 14px 16px; border-left: 4px solid var(--ftj-accent); background: var(--ftj-card); font-size: 14px; }
.ftj-draft span { color: var(--ftj-muted); }
.ftj-draft-actions { display: flex; gap: 8px; }
.ftj-canvases { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; padding: 28px 24px 32px; }
.ftj-app .ftj-canvas-card { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; }
.ftj-canvas-paper { display: block; padding: 10px; background: #fff; border: 1px solid var(--ftj-line); box-shadow: 0 1px 0 var(--ftj-line), 0 10px 24px -14px rgba(0,0,0,.35); transition: transform .2s, box-shadow .2s; }
.ftj-app .ftj-canvas-card:hover .ftj-canvas-paper, .ftj-app .ftj-canvas-card:focus-visible .ftj-canvas-paper { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 18px 30px -16px rgba(0,0,0,.45); }
.ftj-canvas-thumb { width: 100%; height: auto; display: block; }
.ftj-canvas-name { font-family: var(--ftj-display); font-size: 22px; font-weight: 700; margin-top: 8px; }
.ftj-canvas-desc { color: var(--ftj-muted); font-size: 14px; }
.ftj-canvas-meta { font-size: 12px; color: var(--ftj-muted); text-transform: uppercase; letter-spacing: .06em; }
.ftj-app .ftj-canvas-go { margin-top: 6px; align-self: flex-start; }

/* ---------- Étape 2 : atelier ---------- */
.ftj-bar { display: flex; align-items: center; gap: 16px; padding: 12px 18px; background: var(--ftj-card); border-bottom: 1px solid var(--ftj-line); flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.ftj-bar-brand { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.ftj-bar-brand strong { font-family: var(--ftj-display); font-size: 19px; }
.ftj-steps { display: flex; gap: 4px; margin: 0 auto; counter-reset: s; font-size: 13px; }
.ftj-steps li { counter-increment: s; padding: 4px 10px 4px 6px; border-radius: 99px; color: var(--ftj-muted); display: flex; align-items: center; gap: 6px; }
.ftj-steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid currentColor; font-size: 11px; font-weight: 700; }
.ftj-steps li.is-active { color: var(--ftj-ink); background: var(--ftj-paper); font-weight: 600; }
.ftj-steps li.is-active::before { background: var(--ftj-ink); color: var(--ftj-paper); border-color: var(--ftj-ink); }
.ftj-steps li.is-done::before { content: "✓"; background: var(--ftj-ok); border-color: var(--ftj-ok); color: #fff; }
.ftj-bar-actions { display: flex; gap: 8px; }

.ftj-work { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; min-height: 640px; }
.ftj-panel { border-right: 1px solid var(--ftj-line); background: var(--ftj-paper); max-height: 82vh; overflow-y: auto; scroll-padding-top: 12px; }
.ftj-panel-body { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.ftj-card { background: var(--ftj-card); border: 1px solid var(--ftj-line); border-radius: var(--ftj-radius); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ftj-card-masthead { border-top: 3px solid var(--ftj-ink); }
.ftj-app .ftj-card-title { font-family: var(--ftj-display); font-size: 20px; font-weight: 700; line-height: 1.1; color: var(--ftj-ink); }
.ftj-page-head { display: flex; align-items: center; gap: 12px; }
.ftj-page-head small { color: var(--ftj-muted); }
.ftj-page-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.ftj-model-svg { color: var(--ftj-ink); display: inline-flex; flex: none; }

.ftj-zone { border-left: 3px solid var(--ftj-accent); scroll-margin-top: 12px; }
.ftj-zone.is-flash { animation: ftj-flash 1.2s ease-out; }
@keyframes ftj-flash { 0% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ftj-accent) 45%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.ftj-zone-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ftj-app .ftj-zone-label { font-family: var(--ftj-cond); text-transform: uppercase; letter-spacing: .1em; font-size: 15px; font-weight: 700; color: var(--ftj-ink); }
.ftj-badge { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--ftj-paper); color: var(--ftj-muted); border: 1px solid var(--ftj-line); }
.ftj-zone-warn { font-size: 13px; color: var(--ftj-accent); background: var(--ftj-accent-soft); padding: 6px 10px; border-radius: var(--ftj-radius); }
.ftj-zone-warn[hidden] { display: none; }
.ftj-zone-help { font-size: 13px; color: var(--ftj-muted); font-style: italic; }

.ftj-field { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.ftj-field-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ftj-muted); display: flex; justify-content: space-between; align-items: baseline; }
.ftj-field-hint { color: var(--ftj-muted); font-size: 12px; }
.ftj-count { font-weight: 400; text-transform: none; letter-spacing: 0; }
.ftj-app .ftj-field input[type=text], .ftj-app .ftj-field input[type=url], .ftj-app .ftj-field select, .ftj-app .ftj-field textarea {
	width: 100%; max-width: none; margin: 0; padding: 9px 11px; border: 1px solid #cfc5b3; border-radius: var(--ftj-radius); background: #fff;
	font-size: 15px; line-height: 1.4; box-shadow: none; min-height: 40px; height: auto;
}
.ftj-app .ftj-field textarea { resize: vertical; min-height: 150px; font-family: var(--ftj-ui); }
.ftj-app .ftj-field input:focus, .ftj-app .ftj-field select:focus, .ftj-app .ftj-field textarea:focus { border-color: var(--ftj-ink); }
.ftj-inline { display: flex; gap: 6px; }
.ftj-inline input { flex: 1; min-width: 0; }
.ftj-font-pick { display: flex; flex-direction: column; gap: 6px; }
.ftj-font-sample { font-size: 22px; line-height: 1.15; padding: 6px 2px 2px; border-bottom: 1px dotted var(--ftj-line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ftj-segment { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--ftj-ink); border-radius: var(--ftj-radius); overflow: hidden; }
.ftj-app .ftj-segment button { border: 0; background: transparent; padding: 8px; cursor: pointer; font-weight: 600; font-size: 14px; border-radius: 0; color: var(--ftj-ink); }
.ftj-app .ftj-segment button + button { border-left: 1.5px solid var(--ftj-ink); }
.ftj-app .ftj-segment button.is-on { background: var(--ftj-ink); color: var(--ftj-paper); }

.ftj-sr, .ftj-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.ftj-drop { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px 12px; border: 1.5px dashed #bfb39f; border-radius: var(--ftj-radius); background: #fff; cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.ftj-drop:hover, .ftj-drop.is-over, .ftj-drop:focus-within { border-color: var(--ftj-ink); background: var(--ftj-paper); }
.ftj-drop small { color: var(--ftj-muted); font-size: 12px; }
.ftj-photo { display: flex; flex-direction: column; gap: 10px; }
.ftj-photo-current { display: flex; gap: 10px; align-items: flex-start; }
.ftj-photo-tools { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ftj-app .ftj-photo-tools select { padding: 4px 6px; border: 1px solid #cfc5b3; border-radius: var(--ftj-radius); background: #fff; font-size: 13px; }

.ftj-feed-status { font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.ftj-feed-head { display: flex; justify-content: space-between; color: var(--ftj-muted); }
.ftj-feed-items { display: flex; flex-direction: column; border-top: 1px solid var(--ftj-line); }
.ftj-feed-items li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--ftj-line); line-height: 1.3; }
.ftj-error { color: var(--ftj-accent); }
.ftj-spinner::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -2px; border: 2px solid var(--ftj-line); border-top-color: var(--ftj-accent); border-radius: 50%; animation: ftj-spin .8s linear infinite; }
@keyframes ftj-spin { to { transform: rotate(360deg); } }

.ftj-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px; background: #d9d2c5 radial-gradient(circle at 50% 30%, #e6e0d4, #cfc7b8); min-width: 0; }
.ftj-preview { position: relative; display: block; width: 100%; height: min(78vh, 980px); overflow: auto; overscroll-behavior: contain; }
.ftj-preview.is-zoomed { padding: 12px; background: rgba(0,0,0,.06); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.ftj-preview-canvas { display: block; margin: 0 auto; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 22px 40px -18px rgba(0,0,0,.5); cursor: pointer; touch-action: pan-x pan-y pinch-zoom; }
.ftj-zoombar { display: flex; align-items: center; gap: 8px; align-self: center; background: var(--ftj-card); border: 1px solid var(--ftj-line); border-radius: 99px; padding: 4px 6px 4px 6px; box-shadow: 0 2px 8px -4px rgba(0,0,0,.25); }
.ftj-zoom-label { min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; }
.ftj-zone-head-right { display: inline-flex; align-items: center; gap: 6px; }
.ftj-app .ftj-zoom-zone { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--ftj-line); border-radius: 50%; background: #fff; color: var(--ftj-ink); cursor: pointer; }
.ftj-app .ftj-zoom-zone:hover { border-color: var(--ftj-ink); background: var(--ftj-ink); color: var(--ftj-paper); }
.ftj-pager { display: flex; align-items: center; gap: 12px; }
.ftj-pager-label { font-family: var(--ftj-cond); text-transform: uppercase; letter-spacing: .1em; font-size: 14px; min-width: 140px; text-align: center; }
.ftj-hint { font-size: 12px; color: #5c554b; }

.ftj-strip { border-top: 1px solid var(--ftj-line); background: var(--ftj-card); }
.ftj-strip-pages { display: flex; gap: 14px; padding: 14px 18px; overflow-x: auto; align-items: flex-start; }
.ftj-thumb { flex: none; width: 92px; display: flex; flex-direction: column; gap: 6px; }
.ftj-app .ftj-thumb-btn { padding: 0; border: 2px solid transparent; background: #fff; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.2); border-radius: 2px; }
.ftj-thumb-btn canvas { width: 100%; height: auto; display: block; }
.ftj-thumb.is-active .ftj-thumb-btn { border-color: var(--ftj-accent); }
.ftj-thumb-label { font-size: 11px; line-height: 1.25; color: var(--ftj-muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ftj-thumb.is-active .ftj-thumb-label { color: var(--ftj-ink); font-weight: 600; }
.ftj-app .ftj-add-page { width: 92px; aspect-ratio: 595 / 842; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1.5px dashed #bfb39f; background: transparent; cursor: pointer; border-radius: 2px; color: var(--ftj-muted); padding: 6px; }
.ftj-app .ftj-add-page span { font-size: 30px; line-height: 1; }
.ftj-app .ftj-add-page small { font-size: 11px; line-height: 1.2; }
.ftj-app .ftj-add-page:hover { border-color: var(--ftj-ink); color: var(--ftj-ink); }

/* ---------- Mise en forme d'une rubrique ---------- */
.ftj-typo { border-top: 1px dashed var(--ftj-line); padding-top: 10px; }
.ftj-typo > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 14px; user-select: none; }
.ftj-typo > summary::-webkit-details-marker { display: none; }
.ftj-typo > summary::after { content: "▾"; margin-left: auto; color: var(--ftj-muted); transition: transform .15s; }
.ftj-typo[open] > summary::after { transform: rotate(180deg); }
.ftj-typo-aa { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--ftj-ink); border-radius: 3px; font-family: var(--ftj-display); font-size: 14px; }
.ftj-typo-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ftj-accent); }
.ftj-typo-body { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 2px; }
.ftj-typo-group { font-family: var(--ftj-cond); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 700; color: var(--ftj-accent); margin-top: 4px; border-bottom: 1px solid var(--ftj-line); padding-bottom: 3px; }
.ftj-typo-row { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 10px; min-height: 30px; }
.ftj-typo-name { font-size: 13px; color: var(--ftj-muted); }
.ftj-typo-row > .ftj-typo-tools, .ftj-typo-row > select { grid-column: 2 / 4; }
.ftj-app .ftj-typo-row select { padding: 5px 8px; border: 1px solid #cfc5b3; border-radius: var(--ftj-radius); background: #fff; font-size: 13px; width: 100%; }
.ftj-typo-row input[type=range] { width: 100%; accent-color: var(--ftj-ink); margin: 0; }
.ftj-typo-val { font-variant-numeric: tabular-nums; font-size: 12px; min-width: 52px; text-align: right; color: var(--ftj-ink); }
.ftj-typo-check input { justify-self: start; width: 18px; height: 18px; accent-color: var(--ftj-ink); margin: 0; }
.ftj-typo-tools { display: flex; border: 1px solid #cfc5b3; border-radius: var(--ftj-radius); overflow: hidden; width: max-content; background: #fff; }
.ftj-app .ftj-tool { display: inline-grid; place-items: center; min-width: 34px; height: 30px; padding: 0 8px; border: 0; border-right: 1px solid #e3dccf; background: transparent; cursor: pointer; color: var(--ftj-ink); border-radius: 0; font-size: 13px; }
.ftj-app .ftj-tool:last-child { border-right: 0; }
.ftj-app .ftj-tool:hover { background: var(--ftj-paper); }
.ftj-app .ftj-tool.is-on { background: var(--ftj-ink); color: var(--ftj-paper); }
.ftj-typo-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.ftj-typo-status { color: var(--ftj-ok); font-size: 12px; }
.ftj-typo-status:empty { display: none; }

/* ---------- Curseurs (style forcé pour résister aux thèmes) ---------- */
.ftj-range-row { grid-template-columns: 92px minmax(0, 1fr) auto; }
.ftj-range-wrap { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ftj-app .ftj-step { flex: none; width: 28px !important; height: 28px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 1px solid #b9ad98 !important; border-radius: 50% !important; background: #fff !important; color: var(--ftj-ink) !important; font: 700 16px/1 var(--ftj-ui) !important; cursor: pointer; display: inline-grid; place-items: center; box-shadow: none !important; }
.ftj-app .ftj-step:hover { background: var(--ftj-ink) !important; color: var(--ftj-paper) !important; border-color: var(--ftj-ink) !important; }
.ftj-app input[type=range].ftj-range {
	-webkit-appearance: none !important; appearance: none !important;
	flex: 1; min-width: 60px; width: 100% !important; height: 28px !important; margin: 0 !important; padding: 0 !important;
	background: transparent !important; border: 0 !important; box-shadow: none !important; outline-offset: 3px; cursor: pointer;
	--ftj-fill: 50%;
}
.ftj-app input[type=range].ftj-range::-webkit-slider-runnable-track {
	height: 6px; border-radius: 99px; border: 0;
	background: linear-gradient(to right, var(--ftj-ink) 0, var(--ftj-ink) var(--ftj-fill), #d8cfbf var(--ftj-fill), #d8cfbf 100%);
}
.ftj-app input[type=range].ftj-range::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%;
	background: var(--ftj-accent); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--ftj-ink), 0 2px 5px rgba(0,0,0,.35);
}
.ftj-app input[type=range].ftj-range::-moz-range-track { height: 6px; border-radius: 99px; background: #d8cfbf; border: 0; }
.ftj-app input[type=range].ftj-range::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--ftj-ink); }
.ftj-app input[type=range].ftj-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ftj-accent); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--ftj-ink), 0 2px 5px rgba(0,0,0,.35); }
.ftj-app input[type=range].ftj-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ftj-accent) 45%, transparent), 0 0 0 1px var(--ftj-ink); }
.ftj-range-val { font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 600; min-width: 54px; text-align: right; color: var(--ftj-ink); }

/* ---------- Photo ---------- */
.ftj-photo-edit { display: flex; flex-direction: column; gap: 8px; }
.ftj-photo-thumb { flex: none; width: 110px; height: 80px; display: grid; place-items: center; overflow: hidden; background: #eee; border: 1px solid var(--ftj-line); }
.ftj-photo-thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .2s; }
.ftj-app .ftj-tool-icon { min-width: 40px; height: 34px; }
.ftj-app .ftj-tool-text { white-space: nowrap; }
.ftj-app .ftj-photo-tools .ftj-btn { cursor: pointer; }

/* ---------- Fenêtres ---------- */
.ftj-backdrop { position: fixed; inset: 0; background: rgba(20, 16, 12, .55); z-index: 99999; display: grid; place-items: center; padding: 16px; animation: ftj-fade .15s; }
@keyframes ftj-fade { from { opacity: 0; } }
.ftj-modal { width: min(560px, 100%); max-height: 92vh; overflow-y: auto; background: var(--ftj-card); border-radius: 6px; border-top: 4px solid var(--ftj-ink); box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); padding: 20px 22px 22px; font: 15px/1.45 var(--ftj-ui); color: var(--ftj-ink); }
.ftj-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ftj-app .ftj-modal-head h3 { font-family: var(--ftj-display); font-size: 24px; font-weight: 700; color: var(--ftj-ink); }
.ftj-modal-intro { color: var(--ftj-muted); margin: 4px 0 14px; }
.ftj-modal-body { display: flex; flex-direction: column; gap: 14px; }
.ftj-modal-actions { display: flex; justify-content: flex-end; }
.ftj-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ftj-app .ftj-model { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border: 1px solid var(--ftj-line); background: #fff; border-radius: var(--ftj-radius); cursor: pointer; text-align: left; }
.ftj-app .ftj-model:hover { border-color: var(--ftj-ink); }
.ftj-model small { color: var(--ftj-muted); font-size: 12px; line-height: 1.3; }
.ftj-choices { display: flex; flex-direction: column; gap: 8px; }
.ftj-choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--ftj-line); border-radius: var(--ftj-radius); background: #fff; cursor: pointer; }
.ftj-choice:has(input:checked) { border-color: var(--ftj-ink); box-shadow: inset 3px 0 0 var(--ftj-ink); }
.ftj-choice input { margin-top: 4px; accent-color: var(--ftj-ink); }
.ftj-choice span { display: flex; flex-direction: column; }
.ftj-choice small { color: var(--ftj-muted); }
.ftj-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ftj-muted); cursor: pointer; }
.ftj-check input { margin-top: 3px; accent-color: var(--ftj-ink); width: 18px; height: 18px; flex: none; }
.ftj-warnings { background: #fff7e6; border: 1px solid #f0d9a8; border-radius: var(--ftj-radius); padding: 10px 12px; font-size: 13px; }
.ftj-warnings ul { margin: 6px 0; list-style: disc; padding-left: 18px; }
.ftj-warnings small { color: var(--ftj-muted); }
.ftj-progress[hidden] { display: none; }
.ftj-progress-bar { height: 8px; background: var(--ftj-line); border-radius: 99px; overflow: hidden; }
.ftj-progress-bar span { display: block; height: 100%; width: 0; background: var(--ftj-ink); transition: width .3s; }
.ftj-progress-text { font-size: 13px; color: var(--ftj-muted); margin-top: 6px; }
.ftj-progress.is-error .ftj-progress-text { color: var(--ftj-accent); }
.ftj-progress.is-error .ftj-progress-bar span { background: var(--ftj-accent); }

.ftj-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ftj-ink); color: #fff; padding: 10px 18px; border-radius: 99px; font-size: 14px; z-index: 100000; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); transition: opacity .4s, transform .4s; }
.ftj-toast.is-error { background: var(--ftj-accent); }
.ftj-toast.is-out { opacity: 0; transform: translate(-50%, 10px); }

/* ---------- Résultat ---------- */
.ftj-done { display: flex; flex-wrap: wrap; gap: 36px; padding: clamp(20px, 4vw, 44px); align-items: center; justify-content: center; background: var(--ftj-card); }
.ftj-done-paper { flex: 0 1 300px; max-width: 300px; background: #fff; padding: 10px; box-shadow: 0 24px 40px -20px rgba(0,0,0,.5); transform: rotate(-2deg); }
.ftj-done-text { flex: 1 1 320px; max-width: 560px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.ftj-done-text .ftj-hero-lead { margin: 0; }
.ftj-app .ftj-done .ftj-hero-title { font-size: clamp(30px, 4vw, 48px); }
.ftj-done-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ftj-done-link code { font-size: 12px; word-break: break-all; background: var(--ftj-paper); padding: 2px 6px; }

/* ---------- Petits écrans ---------- */
@container ftj (max-width: 900px) {
	.ftj-work { grid-template-columns: 1fr; }
	.ftj-stage { order: -1; padding: 14px; }
	.ftj-preview { height: auto; max-height: 75vh; }
	.ftj-preview.is-zoomed { height: 70vh; }
	.ftj-panel { max-height: none; border-right: 0; border-top: 1px solid var(--ftj-line); }
	.ftj-steps { display: none; }
	.ftj-bar-actions { margin-left: auto; }
}
@container ftj (max-width: 520px) {
	.ftj-bar { padding: 10px; }
	.ftj-app .ftj-bar-actions .ftj-btn-ghost { display: none; }
	.ftj-hero { padding: 28px 18px 20px; }
	.ftj-canvases { padding: 18px 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.ftj-app *, .ftj-backdrop { animation: none !important; transition: none !important; }
}

/* ---------- Lettrine, mise en page, blocs libres ---------- */
.ftj-drop-box { display: flex; flex-direction: column; gap: 8px; }
.ftj-drop-opts { display: flex; flex-direction: column; gap: 8px; }
.ftj-drop-opts[hidden] { display: none; }
.ftj-card-layout { border-top: 3px solid var(--ftj-accent); }
.ftj-layout-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ftj-block { border-left-color: #1e88e5; }
.ftj-preview-canvas:focus-visible { outline: 3px solid #1e88e5; outline-offset: 3px; }
