/* FilmEcranW, l'atelier d'écriture (templates/filmecranw/index.html.twig).
   Charte : fond noir, jaune FilmEcran #ffc107, glitch RGB seulement sur le « W » à l'ouverture.
   Les textes à lire ne bougent jamais. Au téléphone : une colonne, la liste à plat remplace la 3D. */

.fw {
    --fw-bg: #0b0b0b;
    --fw-panel: #121212;
    --fw-panel2: #181818;
    --fw-line: rgba(255, 255, 255, .09);
    --fw-text: #f2f2f2;
    --fw-muted: #a3a3a3;
    --fw-dim: #707070;
    --fw-yellow: #ffc107;
    --fw-cyan: #00e5ff;
    --fw-red: #ff2a3c;
    --fw-night: #5b6cff;
    --fw-ok: #10b981;
    position: relative;
    background: var(--fw-bg);
    color: var(--fw-text);
    min-height: calc(100vh - 60px);
    font-size: 14px;
    line-height: 1.45;
}
.fw [x-cloak] { display: none !important; }
.fw-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }

/* ------------------------------------------------------------------ barre du haut */
.fw-top {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
    padding: 10px 16px; border-bottom: 1px solid var(--fw-line); background: #0e0e0e;
}
.fw-brand { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.fw-w {
    display: inline-block; font-weight: 800; font-size: .8rem; color: #111; background: var(--fw-yellow);
    border-radius: 4px; padding: 0 5px; transform: translateY(-3px);
    animation: fw-w-glitch .6s steps(2, end) 1;
}
@keyframes fw-w-glitch {
    0% { box-shadow: -3px 0 0 var(--fw-cyan), 3px 0 0 var(--fw-red); }
    50% { box-shadow: 3px 0 0 var(--fw-cyan), -3px 0 0 var(--fw-red); }
    100% { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { .fw-w { animation: none; } }
html[data-effects="off"] .fw-w { animation: none; }
.fw-tagline { color: var(--fw-muted); font-size: .8rem; margin-left: 6px; }
.fw-file { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.fw-file-name { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-pill { font-size: .75rem; border: 1px solid var(--fw-line); border-radius: 999px; padding: 2px 9px; color: var(--fw-muted); white-space: nowrap; }
.fw-pill--ok { color: var(--fw-ok); border-color: rgba(16, 185, 129, .4); }
.fw-pill--warn { color: var(--fw-yellow); border-color: rgba(255, 193, 7, .4); }
.fw-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fw-btn {
    display: inline-flex; align-items: center; gap: 4px; background: var(--fw-panel2); border: 1px solid var(--fw-line);
    color: #fff; border-radius: 8px; padding: 6px 11px; font-size: .82rem; cursor: pointer; white-space: nowrap; margin: 0;
}
.fw-btn:hover { border-color: rgba(255, 193, 7, .5); }
.fw-btn:disabled { opacity: .5; cursor: default; }
.fw-btn--primary { background: var(--fw-yellow); color: #111; border: 0; font-weight: 700; }
.fw-btn:focus-visible, .fw button:focus-visible, .fw input:focus-visible, .fw select:focus-visible, .fw textarea:focus-visible {
    outline: 2px solid var(--fw-yellow); outline-offset: 2px;
}
.fw-menu { position: relative; }
.fw-menu-list {
    position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--fw-panel2); border: 1px solid var(--fw-line);
    border-radius: 10px; padding: 6px; min-width: 230px; display: flex; flex-direction: column;
}
.fw-menu-list button { background: none; border: 0; color: #eee; text-align: left; padding: 7px 10px; border-radius: 6px; font-size: .85rem; }
.fw-menu-list button:hover { background: rgba(255, 193, 7, .12); }
.fw-menu-list button:disabled { opacity: .4; }

/* ------------------------------------------------------------------ messages */
.fw-notices { padding: 6px 16px 0; }
.fw-trust { color: var(--fw-dim); font-size: .78rem; margin: 0 0 6px; }
.fw-notice {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 1px solid var(--fw-line); border-radius: 10px;
    padding: 8px 12px; margin-bottom: 8px; background: var(--fw-panel); font-size: .85rem;
}
.fw-notice > span { flex: 1; min-width: 200px; }
.fw-notice--success { border-color: rgba(16, 185, 129, .45); }
.fw-notice--warning { border-color: rgba(255, 193, 7, .5); }
.fw-notice--error { border-color: rgba(255, 42, 60, .55); }
.fw-close { background: none; border: 0; color: var(--fw-muted); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.fw-loading { padding: 40px 16px; color: var(--fw-muted); }

/* ------------------------------------------------------------------ mise en page */
.fw-body { display: grid; grid-template-columns: 220px minmax(0, 1fr) 320px; min-height: calc(100vh - 170px); }
.fw-nav { border-right: 1px solid var(--fw-line); padding: 12px 8px; background: #0d0d0d; display: flex; flex-direction: column; gap: 2px; }
.fw-nav-title { font-weight: 700; padding: 4px 8px 10px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-nav button {
    display: flex; justify-content: space-between; align-items: center; background: none; border: 0; color: #ddd; text-align: left;
    padding: 7px 8px; border-radius: 7px; font-size: .88rem; cursor: pointer;
}
.fw-nav button small { color: var(--fw-dim); }
.fw-nav button.is-on { background: rgba(255, 193, 7, .12); color: var(--fw-yellow); }
.fw-dot { background: var(--fw-yellow); color: #111 !important; border-radius: 999px; padding: 0 6px; font-weight: 700; }
.fw-nav-hall { display: block; margin: 14px 8px 0; padding: 0; background: none; border: 0; color: var(--fw-yellow); font-size: .78rem; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fw-main { min-width: 0; padding: 14px 16px; }
.fw-inspector { border-left: 1px solid var(--fw-line); padding: 14px; background: #0d0d0d; overflow-y: auto; max-height: calc(100vh - 120px); position: sticky; top: 0; }
.fw-panel { min-width: 0; }
.fw-panel h2 { font-size: 1.15rem; margin: 0 0 6px; }

/* ------------------------------------------------------------------ état vide */
.fw-empty { max-width: 640px; margin: 30px auto; text-align: center; }
.fw-empty-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.fw-drop { border: 2px dashed rgba(255, 193, 7, .45); border-radius: 16px; padding: 28px 20px; margin: 18px 0; }
.fw-drop-hint { color: var(--fw-muted); margin: 10px 0 4px; }
.fw-formats { color: #ddd; font-size: .85rem; margin: 0 0 8px; }
.fw-small { color: var(--fw-muted); font-size: .8rem; margin: 4px 0; }
.fw-link { background: none; border: 0; color: var(--fw-yellow); text-decoration: underline; cursor: pointer; padding: 4px 0; font-size: .85rem; }
.fw-link--danger { color: #ff7a85; }

/* ------------------------------------------------------------------ barre d'outils */
.fw-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.fw-spacer { flex: 1; }
.fw-seg { display: inline-flex; border: 1px solid var(--fw-line); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.fw-seg button { background: none; border: 0; color: var(--fw-muted); padding: 6px 11px; font-size: .82rem; cursor: pointer; }
.fw-seg button.is-on { background: var(--fw-yellow); color: #111; font-weight: 700; }
.fw-select { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--fw-muted); font-size: .8rem; }
.fw select, .fw input[type="text"], .fw input[type="number"], .fw textarea {
    background: #0d0d0d; color: var(--fw-text); border: 1px solid var(--fw-line); border-radius: 8px; padding: 6px 9px; font-size: .88rem; width: 100%;
}
.fw-select select { width: auto; }
.fw-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--fw-line); border-radius: 999px; padding: 2px 10px; font-size: .78rem; color: #ddd; background: none; }
button.fw-chip { cursor: pointer; }
.fw-chip.is-on { border-color: rgba(255, 193, 7, .6); color: var(--fw-yellow); }
.fw-sw { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.fw-sw--day { background: var(--fw-yellow); }
.fw-sw--night { background: var(--fw-night); }
.fw-remark { border: 1px solid rgba(255, 193, 7, .3); background: rgba(255, 193, 7, .05); border-radius: 10px; padding: 8px 12px; font-size: .84rem; color: #e8d9a8; }

/* ------------------------------------------------------------------ vue 3D */
.fw-plan-wrap { position: relative; }
.fw-plan { height: min(64vh, 620px); border-radius: 12px; overflow: hidden; border: 1px solid var(--fw-line); background: #0b0b0b; }
.fw-plan canvas { display: block; outline: none; cursor: grab; }
.fw-plan-controls { position: absolute; right: 12px; bottom: 40px; display: flex; gap: 6px; }
.fw-plan-hint { color: var(--fw-dim); font-size: .78rem; margin: 6px 2px 0; }

/* Visite du cinéma (hall3d.js) : même cadre que le Plan 3D. À plat sur téléphone : les pièces l'une sous
   l'autre, les cartes dans la pénombre qui s'allument en entrant à l'écran. Seul le CADRE grésille en
   cyan et rouge ; le texte s'éclaire en fondu, sans bouger (charte). */
.fw-hall-wrap { position: relative; }
.fw-hall-stage { position: relative; }
.fw-hall-stage .fw-plan-controls { bottom: 12px; }
.fw-hall { height: min(68vh, 660px); border-radius: 12px; overflow: hidden; border: 1px solid var(--fw-line); background: #0b0907; }
.fw-hall canvas { display: block; outline: none; cursor: grab; }
.fw-hall-edit { position: absolute; z-index: 3; box-sizing: border-box; margin: 0; padding: .6em .8em; resize: none; overflow: auto;
    background: rgba(21, 21, 21, .96); color: #f2f2f2; font-family: Georgia, serif; line-height: 1.35;
    border: 2px solid #ffc107; border-radius: 6px; box-shadow: 0 0 0 4px rgba(255, 193, 7, .18), 0 12px 40px rgba(0, 0, 0, .6); outline: 0; }
.fw-hall-edit::placeholder { color: #8a8a8a; }
.fw-hall-edit-help { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); margin: 0; padding: 4px 12px; border-radius: 999px;
    background: rgba(0, 0, 0, .7); color: #d8d8d8; font-size: 13px; white-space: nowrap; pointer-events: none; }
.fw-hall-flat { display: grid; gap: 22px; }
.fw-hall-room { display: grid; gap: 12px; padding: 14px 12px 18px; border-radius: 12px; border: 1px solid rgba(251, 191, 36, .18);
    background: linear-gradient(180deg, #2a0b10, #140608 70%); }
.fw-hall-room--1 { background: linear-gradient(180deg, #210a0e, #100507 70%); }
.fw-hall-room--2 { background: linear-gradient(180deg, #1b1a24, #0d0c12 70%); }
.fw-hall-sign { margin: 0 auto 4px; padding: 6px 14px; border: 2px solid var(--fw-yellow); color: var(--fw-yellow); background: #120c06;
    font: 800 .95rem/1.2 Inter, Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; text-align: center; }
.fw-hall-card { position: relative; display: grid; gap: 6px; text-align: left; padding: 12px 14px 14px; border-radius: 6px;
    background: #151515; color: var(--fw-text); border: 2px solid #3a2f12; cursor: pointer; }
.fw-hall-card > span { opacity: .32; transition: opacity .7s ease; }
.fw-hall-card.is-lit { border-color: #8a6a10; }
.fw-hall-card.is-lit > span { opacity: 1; }
.fw-hall-card::before { content: ""; position: absolute; inset: -4px; border-radius: 8px; pointer-events: none; opacity: 0; }
.fw-hall-card.is-lit::before { animation: fw-hall-neon .55s steps(1, end) 1 forwards; }
@keyframes fw-hall-neon {
    0% { opacity: 1; box-shadow: -3px 0 0 var(--fw-cyan), 3px 0 0 var(--fw-red); }
    18% { opacity: .2; box-shadow: 3px 0 0 var(--fw-cyan), -3px 0 0 var(--fw-red); }
    32% { opacity: 1; box-shadow: -2px 1px 0 var(--fw-red), 2px -1px 0 var(--fw-cyan); }
    50% { opacity: .4; box-shadow: 0 0 0 2px var(--fw-yellow); }
    66% { opacity: 1; box-shadow: 0 0 14px 1px rgba(255, 193, 7, .55), 0 0 0 2px var(--fw-yellow); }
    100% { opacity: 1; box-shadow: 0 0 10px rgba(255, 193, 7, .25), 0 0 0 1px rgba(255, 193, 7, .5); }
}
@media (prefers-reduced-motion: reduce) { .fw-hall-card.is-lit::before { animation: none; opacity: 1; box-shadow: 0 0 0 1px rgba(255, 193, 7, .5); } }
html[data-effects="off"] .fw-hall-card.is-lit::before { animation: none; opacity: 1; box-shadow: 0 0 0 1px rgba(255, 193, 7, .5); }
.fw-hall-head { color: var(--fw-muted); font: 700 .72rem/1.3 Inter, Arial, sans-serif; text-transform: uppercase; letter-spacing: .04em; }
.fw-hall-text { font: 1rem/1.45 Georgia, serif; }
.fw-hall-step { color: var(--fw-yellow); font: 700 .74rem/1.3 Inter, Arial, sans-serif; }
.fw-hall-closed { margin: 0; padding: 18px 14px; text-align: center; border-radius: 10px; color: var(--fw-text);
    background: repeating-linear-gradient(90deg, #7a0f1e 0 14px, #5e0b17 14px 28px); border-top: 3px solid var(--fw-yellow); }

/* ------------------------------------------------------------------ tableau de cartes */
.fw-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.fw-card {
    position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; background: var(--fw-panel);
    border: 1px solid var(--fw-line); border-radius: 10px; padding: 10px 11px 16px; color: #ddd; cursor: pointer; min-height: 130px;
}
.fw-card:hover { border-color: rgba(255, 193, 7, .4); }
.fw-card.is-on { border-color: var(--fw-yellow); box-shadow: 0 0 0 2px rgba(255, 193, 7, .25); }
.fw-card-head { font-size: .72rem; font-weight: 700; color: var(--fw-muted); text-transform: uppercase; letter-spacing: .02em; }
.fw-card-text { font-family: Georgia, serif; font-size: .92rem; line-height: 1.35; color: #f2f2f2; flex: 1; }
.fw-card-step { font-size: .72rem; color: var(--fw-yellow); }
.fw-card-step.is-suggested { color: var(--fw-muted); font-style: italic; opacity: .8; }
.fw-step-overridden { color: var(--fw-muted); font-style: italic; }
.fw-card-time { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; border-radius: 0 0 10px 10px; background: #444; }
.fw-card-time--day, .fw-card-time--dawn { background: var(--fw-yellow); }
.fw-card-time--night, .fw-card-time--dusk { background: var(--fw-night); }

/* ------------------------------------------------------------------ liste à plat */
.fw-list { position: relative; padding-left: 26px; }
.fw-list::before { content: ""; position: absolute; left: 8px; top: 4px; bottom: 0; width: 2px; background: linear-gradient(var(--fw-yellow), rgba(255, 193, 7, .15)); }
.fw-list-step { position: relative; font-size: .85rem; font-weight: 800; color: var(--fw-yellow); margin: 14px 0 6px; }
.fw-list-step::before { content: ""; position: absolute; left: -24px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--fw-yellow); box-shadow: 0 0 0 4px rgba(255, 193, 7, .2); }
.fw-list-step.is-empty { color: var(--fw-dim); }
.fw-list-step.is-empty::before { background: #333; box-shadow: none; }
.fw-list-step small { font-weight: 400; margin-left: 6px; }
.fw-list-card { display: block; width: 100%; text-align: left; background: var(--fw-panel); border: 1px solid var(--fw-line); border-radius: 10px; padding: 8px 11px; margin-bottom: 6px; color: #ddd; cursor: pointer; }
.fw-list-card b { display: block; font-size: .72rem; color: var(--fw-muted); }
.fw-list-card.is-on { border-color: var(--fw-yellow); }
/* Le deck : déplacer les cartes à la main (glisser-déposer, poignée au doigt, Alt + flèche). */
.fw-card, .fw-list-card { position: relative; }
.fw-deck-grip { position: absolute; top: 4px; right: 6px; padding: 2px 4px; color: var(--fw-muted); font-size: 15px; line-height: 1; cursor: grab; touch-action: none; user-select: none; }
.fw-list-card .fw-deck-grip { top: 6px; }
.fw-card:hover .fw-deck-grip, .fw-list-card:hover .fw-deck-grip { color: var(--fw-yellow); }
[data-deck].is-dragging, [data-deck].is-dragging * { cursor: grabbing; user-select: none; }
.is-lifted { opacity: .35; }
.fw-card.is-drop-before { box-shadow: -4px 0 0 0 var(--fw-yellow); }
.fw-card.is-drop-after { box-shadow: 4px 0 0 0 var(--fw-yellow); }
.fw-list-card.is-drop-before { box-shadow: 0 -3px 0 0 var(--fw-yellow); }
.fw-list-card.is-drop-after { box-shadow: 0 3px 0 0 var(--fw-yellow); }
.fw-list-group.is-drop-target { outline: 1px dashed var(--fw-yellow); outline-offset: 4px; border-radius: 8px; }
/* Le fil : une colonne de publications, comme CinéRiver. Aucun glitch : on y lit et on y écrit. */
.fw-feed { max-width: 680px; margin: 0 auto; }
.fw-feed-step { margin: 22px 0 8px; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--fw-yellow); display: flex; align-items: center; gap: 10px; }
.fw-feed-step::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255, 193, 7, .5), transparent); }
.fw-feed-post { position: relative; margin-bottom: 12px; padding: 14px 16px 12px; border: 1px solid var(--fw-line); border-radius: 14px; background: var(--fw-panel); cursor: pointer; }
.fw-feed-post:hover { border-color: rgba(255, 193, 7, .4); }
.fw-feed-post.is-on { border-color: var(--fw-yellow); box-shadow: 0 0 0 2px rgba(255, 193, 7, .2); }
.fw-feed-post.is-drop-before { box-shadow: 0 -3px 0 0 var(--fw-yellow); }
.fw-feed-post.is-drop-after { box-shadow: 0 3px 0 0 var(--fw-yellow); }
.fw-feed-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.fw-feed-badge { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #555; font-weight: 800; font-size: .85rem; color: #f2f2f2; background: #111; }
.fw-feed-badge--day, .fw-feed-badge--dawn { border-color: var(--fw-yellow); }
.fw-feed-badge--night, .fw-feed-badge--dusk { border-color: var(--fw-night); }
.fw-feed-where { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fw-feed-where b { font-size: .8rem; text-transform: uppercase; letter-spacing: .02em; color: #e8e8e8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-feed-where small { font-size: .75rem; color: var(--fw-yellow); }
.fw-feed-grip { position: static; border: 0; background: none; font-size: 18px; padding: 4px 6px; }
.fw .fw-feed-text { display: block; min-height: 1.6em; field-sizing: content; border-radius: 0; width: 100%; resize: none; overflow: hidden; border: 0; outline: 0; padding: 0; background: transparent; color: #f2f2f2;
    font-family: Georgia, serif; font-size: 1.12rem; line-height: 1.5; }
.fw .fw-feed-text:focus, .fw .fw-feed-text:focus-visible { outline: 0; box-shadow: inset 0 -1px 0 rgba(255, 193, 7, .5); }
.fw-feed-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.fw-feed-chip { font-size: .75rem; padding: 2px 9px; border-radius: 999px; border: 1px solid rgba(255, 193, 7, .45); color: var(--fw-yellow); }
.fw-feed-notes { flex-basis: 100%; font-size: .82rem; color: var(--fw-muted); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fw-deck-ghost { position: fixed; z-index: 50; width: 220px; max-height: 120px; overflow: hidden; transform: translate(-30px, -24px) rotate(-2deg); pointer-events: none;
    padding: 10px 12px; border: 1px solid var(--fw-yellow); border-radius: 10px; background: rgba(21, 21, 21, .95); color: #f2f2f2;
    font-family: Georgia, serif; font-size: .9rem; line-height: 1.35; box-shadow: 0 14px 40px rgba(0, 0, 0, .55); }

/* ------------------------------------------------------------------ formulaires, écriture */
.fw-form { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.fw-form label { display: flex; flex-direction: column; gap: 4px; color: var(--fw-muted); font-size: .8rem; margin: 0; }
.fw-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fw-row--tight { grid-template-columns: 80px 1fr; }
.fw-row--tight:nth-child(2) { grid-template-columns: 1fr 1fr; }
.fw-label { color: var(--fw-muted); font-size: .8rem; margin: 0 0 4px; }
.fw-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.fw-editor { min-height: 200px; font-family: Georgia, serif; font-size: 1rem !important; line-height: 1.55; resize: vertical; }
.fw-editor--short { min-height: 90px; }
.fw-editor--card { min-height: 80px; font-size: .95rem !important; }
.fw-editor--tall { min-height: 360px; }
.fw-writing .fw-seg { margin-bottom: 8px; }
.fw-writing .fw-editor { min-height: 52vh; max-width: 820px; }
.fw-writing .fw-editor--short { min-height: 110px; }
.fw-count { color: var(--fw-dim); font-size: .75rem; margin: 4px 0 0; }
.fw-split { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; }
.fw-split-list { display: flex; flex-direction: column; gap: 2px; }
.fw-split-list button:not(.fw-link) {
    display: flex; justify-content: space-between; background: none; border: 1px solid transparent; color: #ddd; padding: 6px 9px;
    border-radius: 7px; text-align: left; font-size: .86rem; cursor: pointer;
}
.fw-split-list button small { color: var(--fw-dim); }
.fw-split-list button.is-on { border-color: rgba(255, 193, 7, .5); color: var(--fw-yellow); }
.fw-inspector-actions { display: flex; align-items: center; gap: 6px; }
.fw-balance { border-top: 1px solid var(--fw-line); padding-top: 10px; }
.fw-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #222; margin-top: 6px; }
.fw-bar i { display: block; height: 100%; }
.fw-bar--day { background: var(--fw-yellow); }
.fw-bar--night { background: var(--fw-night); }
.fw-bar--int { background: #bbb; }
.fw-bar--ext { background: #555; }
.fw-doubts { padding-left: 18px; }
.fw-doubts code { color: #ffd866; }
.fw-details pre { white-space: pre-wrap; color: #ccc; font-size: .8rem; max-height: 420px; overflow: auto; background: #0d0d0d; padding: 10px; border-radius: 8px; }

/* ------------------------------------------------------------------ glisser un fichier */
.fw-dropzone {
    position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 800;
    color: var(--fw-yellow); background: rgba(0, 0, 0, .78); border: 4px dashed var(--fw-yellow); pointer-events: none;
}

/* ------------------------------------------------------------------ téléphone et tablette */
@media (max-width: 1100px) {
    .fw-body { grid-template-columns: 200px minmax(0, 1fr); }
    .fw-inspector { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--fw-line); position: static; max-height: none; }
}
@media (max-width: 820px) {
    .fw-top { padding: 10px 12px; }
    .fw-tagline { display: none; }
    .fw-body { grid-template-columns: minmax(0, 1fr); }
    .fw-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--fw-line); padding: 8px; }
    .fw-nav-title, .fw-nav-hall { display: none; }
    .fw-nav button { white-space: nowrap; gap: 6px; }
    .fw-main { padding: 12px; }
    .fw-split { grid-template-columns: minmax(0, 1fr); }
    .fw-writing .fw-editor { min-height: 46vh; }
}

/* Avis et dossiers (IA de l'auteur) */
.fw-h2 { font-size: 1.25rem; font-weight: 800; margin: 0 0 6px; }
.fw-ai .fw-trust { margin-bottom: 12px; }
.fw-ai label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--fw-muted); }
.fw-ai input, .fw-ai select { background: var(--fw-bg); color: var(--fw-text); border: 1px solid var(--fw-line); border-radius: 8px; padding: 7px 9px; }
.fw-ai-key { display: grid; grid-template-columns: 1fr 1fr 1.4fr auto; gap: 10px; align-items: end; }
.fw-ai-digest { margin: 10px 0; font-size: .82rem; color: var(--fw-muted); }
.fw-ai-digest pre { white-space: pre-wrap; max-height: 260px; overflow: auto; background: var(--fw-bg); border: 1px solid var(--fw-line); border-radius: 8px; padding: 10px; color: var(--fw-text); }
.fw-ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.fw-ai-card { border: 1px solid var(--fw-line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--fw-panel); }
.fw-ai-card h3 { font-size: 1rem; font-weight: 800; margin: 0; color: var(--fw-yellow); }
.fw-ai-card h4 { font-size: .86rem; font-weight: 700; margin: 10px 0 4px; }
.fw-ai-card .fw-btn--primary:disabled { opacity: .45; cursor: not-allowed; }
.fw-ai-result { border-top: 1px solid var(--fw-line); padding-top: 10px; font-size: .88rem; }
.fw-ai-result ul { padding-left: 18px; margin: 0; }
.fw-ai-text { white-space: pre-wrap; font-family: inherit; max-height: 420px; overflow: auto; margin: 0; }
.fw-chip.is-rare { border-color: var(--fw-yellow); color: var(--fw-yellow); }
.fw-remark--error { border-color: rgba(255, 90, 90, .5); background: rgba(255, 90, 90, .06); color: #ffb4b4; }
@media (max-width: 1100px) { .fw-ai-grid { grid-template-columns: 1fr; } .fw-ai-key { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------------ SWOT (film, séquence, personnage, lieu) */
.fw-swot { border: 1px solid var(--fw-line); border-radius: 12px; background: var(--fw-panel2); padding: 10px 12px; margin-top: 8px; }
.fw-swot > summary { cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 700; color: var(--fw-text); }
.fw-swot > summary small { color: var(--fw-muted); font-weight: 400; }
.fw-swot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.fw-swot-box { display: flex; flex-direction: column; gap: 4px; border-radius: 10px; padding: 8px; background: var(--fw-panel); border-top: 3px solid var(--fw-line); }
.fw-swot-box--strengths { border-top-color: var(--fw-ok); }
.fw-swot-box--weaknesses { border-top-color: var(--fw-red); }
.fw-swot-box--opportunities { border-top-color: var(--fw-yellow); }
.fw-swot-box--threats { border-top-color: var(--fw-night); }
.fw-swot-name { font-weight: 700; font-size: .86rem; color: var(--fw-text); }
.fw-swot-help { display: flex; flex-direction: column; font-size: .76rem; color: var(--fw-muted); line-height: 1.35; }
.fw-swot-box textarea { min-height: 84px; resize: vertical; }
.fw-swot-ai { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.fw-swot-ai > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* Dans l'inspecteur (colonne étroite) et au téléphone : une case par ligne. */
.fw-inspector .fw-swot-grid { grid-template-columns: 1fr; }
@media (max-width: 720px) { .fw-swot-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ histoire et public */
.fw-aud { margin-top: 16px; }
.fw-aud-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fw-aud-step { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--fw-line); border-radius: 10px; padding: 10px 12px; background: var(--fw-panel); }
.fw-aud-step h4 { margin: 0; font-size: .95rem; color: var(--fw-yellow); }
.fw-chips--scroll { max-height: 132px; overflow-y: auto; }
.fw-aud-evidence { max-height: 260px; overflow: auto; font-size: .78rem; }
.fw-src { color: var(--fw-muted); }
.fw-src::before { content: '· '; }
@media (max-width: 1100px) { .fw-aud-steps { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ page d'appel (discover.html.twig) */
.fw-discover { padding: 0 16px 48px; font-size: 15px; }
.fw-d-hero, .fw-d-block { max-width: 980px; margin: 0 auto; }
.fw-d-hero { padding: 56px 0 32px; }
.fw-d-kicker { display: flex; align-items: baseline; gap: 6px; color: var(--fw-muted); margin: 0 0 14px; }
.fw-d-title { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 800; line-height: 1.1; margin: 0 0 14px; max-width: 18ch; }
.fw-d-lead { color: var(--fw-muted); max-width: 60ch; font-size: 1.05rem; }
.fw-d-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 10px; }
.fw-d-btn { padding: 10px 18px; font-size: .95rem; text-decoration: none; }
.fw-d-block { padding: 28px 0; border-top: 1px solid var(--fw-line); }
.fw-d-h2 { font-size: 1.25rem; font-weight: 800; margin: 0 0 16px; }
.fw-d-promises, .fw-d-offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.fw-d-offers { grid-template-columns: 1fr 1fr; }
.fw-d-promise, .fw-d-offer { background: var(--fw-panel); border: 1px solid var(--fw-line); border-radius: 10px; padding: 16px; }
.fw-d-promise h3, .fw-d-offer h3 { font-size: 1rem; font-weight: 700; color: var(--fw-yellow); margin: 0 0 8px; }
.fw-d-promise p { color: var(--fw-muted); margin: 0; }
.fw-d-offer ul { padding-left: 18px; margin: 10px 0; color: var(--fw-text); }
.fw-d-offer--plus { border-color: rgba(255, 193, 7, .45); }
.fw-d-offer.is-current { box-shadow: 0 0 0 2px var(--fw-yellow); }
.fw-d-price { font-size: 1.05rem; margin: 0 0 4px; }
.fw-d-soon { display: inline-block; margin-left: 6px; font-size: .72rem; font-weight: 700; color: #111; background: var(--fw-yellow); border-radius: 999px; padding: 1px 8px; vertical-align: middle; }
.fw-discover a:not(.fw-btn) { color: var(--fw-yellow); }
@media (max-width: 820px) { .fw-d-promises, .fw-d-offers { grid-template-columns: 1fr; } .fw-d-hero { padding-top: 32px; } }
.fw a.fw-btn { text-decoration: none; }
.fw-d-offers + .fw-trust { margin-top: 12px; }

/* ------------------------------------------------------------------ toile de l'histoire (web.js, web3d.js)
   Les noms restent nets et immobiles : jamais de glitch sur un texte (charte). */
/* La toile prend aussi la colonne de l'inspecteur (vide sur ce panneau), et se veut carrée : aussi haute
   que large, dans la limite de la hauteur de l'écran. */
@media (min-width: 1101px) { .fw-body.is-wide .fw-main { grid-column: 2 / -1; } }
.fw-web-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; margin-top: 10px; }
.fw-web-stage { min-width: 0; container-type: inline-size; }
.fw-web-frame { position: relative; background: #0b0b0b; }
.fw-web-view { position: relative; height: min(100cqw, calc(100vh - 150px)); min-height: 420px; border: 1px solid var(--fw-line); border-radius: 10px; overflow: hidden; background: #0b0b0b; }
.fw-web-frame:fullscreen { width: 100vw; height: 100vh; }
.fw-web-frame:fullscreen .fw-web-view { height: 100vh; border: 0; border-radius: 0; }
.fw-web-find { position: absolute; top: 10px; left: 10px; z-index: 1100; width: min(360px, calc(100% - 20px)); }
.fw-web-find-box { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0 8px; background: rgba(18, 17, 16, .88); border: 1px solid var(--fw-line); border-radius: 999px; color: var(--fw-muted); }
.fw-web-find-box:focus-within { border-color: rgba(255, 193, 7, .6); color: var(--fw-yellow); }
.fw-web-find-icon { width: 16px; height: 16px; flex: none; }
.fw-web-find input, .fw-web-find input:focus { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; box-shadow: none; color: var(--fw-text); padding: 7px 0; font-size: .88rem; }
.fw-web-find input::-webkit-search-cancel-button { display: none; }
.fw-web-find-clear { background: none; border: 0; color: var(--fw-muted); font-size: 1.1rem; line-height: 1; padding: 0 2px; cursor: pointer; }
.fw-web-found { list-style: none; margin: 6px 0 0; padding: 4px; background: #161514; border: 1px solid rgba(255, 193, 7, .35); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); max-height: 320px; overflow: auto; }
.fw-web-found button { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; background: none; border: 0; border-radius: 6px; padding: 6px 8px; color: var(--fw-text); font-size: .88rem; cursor: pointer; }
.fw-web-found button.is-cursor { background: rgba(255, 193, 7, .12); }
.fw-web-found--none { padding: 8px 10px; color: var(--fw-muted); font-size: .85rem; }
.fw-web-full { position: absolute; top: 10px; right: 10px; z-index: 1100; background: rgba(18, 17, 16, .88); border: 1px solid var(--fw-line); border-radius: 999px; color: var(--fw-text); font-size: .8rem; padding: 6px 12px; cursor: pointer; }
.fw-web-full:hover { border-color: rgba(255, 193, 7, .6); }
.fw-web-view canvas { display: block; cursor: grab; }
.fw-web-view canvas:active { cursor: grabbing; }
.fw-web-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.fw-web-tag {
    position: absolute; left: 0; top: 0; pointer-events: auto; white-space: nowrap; cursor: pointer;
    font: 700 12px/1.2 Inter, Arial, sans-serif; color: #f2f2f2; background: rgba(11, 11, 11, .78);
    border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; padding: 2px 8px;
}
.fw-web-tag--character { color: #ffd54f; }
.fw-web-tag--location { color: #7ff0ff; }
.fw-web-tag--object { color: #ff9ab6; }
.fw-web-tag--sequence { color: #bdbdbd; font-weight: 600; font-size: 11px; padding: 1px 6px; }
.fw-web-tag.is-on { border-color: var(--fw-yellow); background: #1a1405; }
.fw-web-tag.is-dim { opacity: .28; }
.fw-web-svg { width: 100%; height: 100%; display: block; }
.fw-web-link { stroke-linecap: round; }
.fw-web-node { cursor: pointer; outline: none; }
.fw-web-node.is-dim { opacity: .25; }
.fw-web-node.is-on circle, .fw-web-node:focus-visible circle { stroke: #fff; stroke-width: .12; }
.fw-web-label { font: 700 .62px Inter, Arial, sans-serif; fill: #f2f2f2; paint-order: stroke; stroke: #0b0b0b; stroke-width: .18px; stroke-linejoin: round; }
.fw-web-label--sequence { font-size: .48px; fill: #bdbdbd; }
.fw-web-label.is-dim { opacity: .25; }
.fw-web-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.fw-web-dot--character { background: #ffc107; }
.fw-web-dot--location { background: #00e5ff; }
.fw-web-dot--object { background: #ff5c8a; }
.fw-web-dot--sequence { background: #8f8f8f; }
.fw-web-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fw-web-pick, .fw-web-objects { background: var(--fw-panel); border: 1px solid var(--fw-line); border-radius: 10px; padding: 12px; }
.fw-web-pick-kind { color: var(--fw-muted); font-size: .78rem; margin: 0; }
.fw-web-pick-name { font-size: 1.1rem; font-weight: 800; margin: 2px 0 4px; }
.fw-web-pick .fw-btn { margin: 6px 0 10px; }
.fw-web-cards { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 320px; overflow: auto; }
.fw-web-ai { margin-top: 10px; }
.fw-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 6px 0 10px; padding: 8px 12px; border: 1px solid rgba(255, 193, 7, .45); border-radius: 8px; color: var(--fw-yellow); }
@media (max-width: 1100px) { .fw-web-grid { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .fw-web-view { height: 62vh; min-height: 320px; } .fw-web-find { width: calc(100% - 20px); } }

/* ------------------------------------------------------------------ export Word (docx.js) */
.fw-docx { position: fixed; inset: 0; z-index: 1060; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .7); }
.fw-docx-box { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--fw-panel); border: 1px solid rgba(255, 193, 7, .45); border-radius: 12px; padding: 20px; }
.fw-docx-parts { display: grid; gap: 6px; margin: 12px 0; }
.fw-check { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--fw-line); border-radius: 8px; cursor: pointer; }
.fw-check input { accent-color: var(--fw-yellow); width: 16px; height: 16px; }
.fw-check small { margin-left: auto; color: var(--fw-dim); }
.fw-check.is-off { opacity: .5; cursor: default; }
.fw-docx .fw-actions { justify-content: flex-end; }
.fw-check-off { width: 16px; text-align: center; color: var(--fw-dim); }
.fw-remark a { color: var(--fw-yellow); }

/* ------------------------------------------------------------------ continuité dialoguée (continuity.js)
   Mise en page d'un scénario à l'écran, en police à chasse fixe : les retraits sont en « ch ». */
.fw-script { position: relative; max-width: 72ch; margin: 12px auto 0; padding: 32px clamp(12px, 5vw, 48px) 48vh; background: #121212; border: 1px solid var(--fw-line); border-radius: 10px;
    font: 15px/1.5 "Courier Prime", "Courier New", Courier, monospace; color: #f2f2f2; }
.fw-sb { position: relative; }
.fw-sb textarea { display: block; width: 100%; resize: none; overflow: hidden; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; padding: 0; margin: 0; min-height: 1.5em; }
.fw-sb textarea:focus { background: rgba(255, 193, 7, .06); box-shadow: -10px 0 0 rgba(255, 193, 7, .06), 10px 0 0 rgba(255, 193, 7, .06); }
.fw-sb--heading { margin-top: 1.5em; }
.fw-sb--heading textarea { font-weight: 700; text-transform: uppercase; }
/* Page et longueur de la scène (huitièmes), comme dans la marge des logiciels de scénario : discret, hors du texte. */
.fw-sb-scene { position: absolute; right: 0; top: -1.35em; font-size: .72em; color: var(--fw-dim); letter-spacing: .02em; pointer-events: none; font-variant-numeric: tabular-nums; }
.fw-sb--heading:first-child .fw-sb-scene { top: -1.2em; }
.fw-sb--action { margin-top: 1em; }
.fw-sb--character { margin-top: 1em; padding-left: min(22ch, 30%); }
.fw-sb--character textarea { text-transform: uppercase; }
.fw-sb--parenthetical { padding-left: min(16ch, 22%); padding-right: min(20ch, 25%); }
.fw-sb--dialogue { padding-left: min(10ch, 14%); padding-right: min(15ch, 18%); }
.fw-sb--transition { margin-top: 1em; }
.fw-sb--transition textarea { text-align: right; text-transform: uppercase; }
.fw-sb-type { position: absolute; right: calc(100% + 8px); top: .2em; white-space: nowrap; font: 600 10px/1 Inter, Arial, sans-serif; color: var(--fw-yellow); text-transform: uppercase; letter-spacing: .06em; }
.fw-sb--character .fw-sb-type, .fw-sb--parenthetical .fw-sb-type, .fw-sb--dialogue .fw-sb-type { right: auto; left: -12ch; }
.fw-suggest { position: absolute; z-index: 20; list-style: none; margin: 0; padding: 4px; min-width: 22ch; max-width: 46ch; background: #1b1b1b; border: 1px solid rgba(255, 193, 7, .5); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); font: 13px/1.3 Inter, Arial, sans-serif; }
.fw-suggest li { padding: 5px 8px; border-radius: 5px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fw-suggest li.is-on, .fw-suggest li:hover { background: var(--fw-yellow); color: #111; }
.fw-script-start { max-width: 72ch; margin: 16px auto; padding: 16px; border: 1px dashed rgba(255, 193, 7, .5); border-radius: 10px; }
@media (max-width: 820px) {
    .fw-script { padding: 20px 12px 40vh; font-size: 14px; }
    .fw-sb-type { display: none; }
}
/* Films comparables (Plus) : la recherche à gauche, les films gardés à droite. */
.fw-comp-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 12px; }
.fw-comp-search, .fw-comp-kept { display: grid; gap: 8px; }
.fw-comp-results { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.fw-comp-results li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid var(--fw-line); border-radius: 8px; }
.fw-comp-results p { margin: 2px 0 0; }
.fw-comp-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.fw-comp-limits { margin: 4px 0 0; padding-left: 18px; }
.fw-comp-card { padding: 10px; border: 1px solid rgba(255, 193, 7, .35); border-radius: 8px; display: grid; gap: 6px; }
.fw-comp-card header { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.fw-comp-card header .fw-link { margin-left: auto; }
.fw-comp-hand { display: flex; gap: 8px; flex-wrap: wrap; }
.fw-comp-hand input[type="text"] { flex: 1 1 14ch; min-width: 0; }
.fw-comp-hand input[type="number"] { width: 9ch; }
@media (max-width: 820px) {
    .fw-comp-grid { grid-template-columns: 1fr; }
    .fw-comp-results li { flex-direction: column; }
}

/* Fiche du projet : un intitulé, son aide « ? », puis le champ. */
.fw-field { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fw-field-head { display: flex; align-items: center; gap: 6px; }
.fw-field-head label { color: var(--fw-muted); font-size: .8rem; margin: 0; }
.fw-tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 38px; padding: 4px 6px; border: 1px solid var(--fw-line); border-radius: 8px; background: #141414; cursor: text; }
.fw-tags:focus-within { border-color: rgba(255, 193, 7, .7); }
.fw .fw-tags input[type="text"] { flex: 1 1 8ch; min-width: 6ch; width: auto; border: 0; background: transparent; color: inherit; outline: none; box-shadow: none; padding: 4px 2px; }
.fw-tag { display: inline-flex; align-items: center; gap: 2px; padding: 1px 4px 1px 9px; border: 1px solid rgba(255, 193, 7, .55); border-radius: 999px; color: var(--fw-yellow); font-size: .8rem; }
.fw-tag button { border: 0; background: none; color: inherit; font-size: 1rem; line-height: 1; padding: 0 4px; cursor: pointer; }
.fw-suggest--field { top: 100%; left: 0; margin-top: 2px; }

/* Aide « ? » : pastille ronde, bulle au survol, au focus ou au toucher. */
.fw-help { position: relative; display: inline-flex; vertical-align: middle; }
.fw-help-btn { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(255, 193, 7, .6); background: none; color: var(--fw-yellow); font: 700 11px/1 Inter, Arial, sans-serif; padding: 0; cursor: help; }
.fw-help-link { display: inline-flex; align-items: center; justify-content: center; flex: none; text-decoration: none; cursor: pointer; vertical-align: middle; margin-left: 6px; }
.fw-help-link:hover { background: rgba(255, 193, 7, .15); color: var(--fw-yellow); }
.fw-help-btn:focus-visible { outline: 2px solid var(--fw-yellow); outline-offset: 2px; }
.fw-help-bubble { position: absolute; z-index: 30; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(320px, 80vw); padding: 8px 10px; border-radius: 8px; background: #1b1b1b; border: 1px solid rgba(255, 193, 7, .5); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); color: #eee; font: 400 13px/1.4 Inter, Arial, sans-serif; text-align: left; white-space: normal; }
@media (max-width: 820px) {
    .fw-help-bubble { left: auto; right: -8px; transform: none; }
}
.fw-trust .fw-erase { margin-left: 6px; }
.fw-comp-script { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin: 4px 0 6px; }
.fw-comp-rights { margin: 8px 0; }
.fw-comp-script .fw-link { padding: 0; }

/* Guide « Créer sa clé » (IA de l'auteur) */
.fw-ai-guide { margin: 10px 0; border: 1px solid var(--fw-line); border-radius: 10px; padding: 8px 12px; }
.fw-ai-guide summary { cursor: pointer; font-weight: 600; color: var(--fw-yellow); }
.fw-ai-guide p { margin: 8px 0; }
.fw-ai-guide-steps { margin: 8px 0; padding-left: 1.4em; display: grid; gap: 6px; }
.fw-ai-guide-steps .fw-link { padding: 0; white-space: nowrap; }
.fw-ai-guide-safe { border-left: 3px solid var(--fw-yellow); padding-left: 10px; }

/* ------------------------------------------------------------------ dépouillement */
/* Les couleurs des catégories sont celles de l'usage en production (rôles en rouge, accessoires en violet…) :
   une pastille et un liseré, jamais sur le texte à lire. */
.fw-bd .fw-toolbar { gap: 8px; flex-wrap: wrap; }
.fw-bd .fw-toolbar .fw-menu { margin-left: auto; } /* au téléphone, le menu reste à droite et ne sort pas de l'écran */
.fw-bd-nav { display: flex; align-items: center; gap: 10px; margin: 10px 0 6px; }
.fw-bd-head { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.fw-bd-head strong { color: var(--fw-yellow); }
.fw-bd-head span { font-family: "Courier Prime", Courier, monospace; text-transform: uppercase; overflow-wrap: anywhere; }
.fw-bd-head small { color: var(--fw-dim); }
.fw-bd-card { color: var(--fw-muted); font-style: italic; margin: 0 0 10px; }
.fw-bd-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--bd, #888); flex: none; }
.fw-bd h3 { display: flex; align-items: center; gap: 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 6px; color: var(--fw-text); }
.fw-bd h3 small { color: var(--fw-dim); }
.fw-bd-suggest { border: 1px dashed rgba(255, 193, 7, .35); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
.fw-bd-suggest-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fw-bd-proposal small { color: var(--fw-dim); }
.fw-bd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.fw-bd-cat { background: var(--fw-panel2); border: 1px solid var(--fw-line); border-left: 3px solid var(--bd, #888); border-radius: 8px; padding: 9px 10px; display: flex; flex-direction: column; gap: 6px; }
.fw-bd-tag { border-color: var(--fw-line); color: var(--fw-text); }
.fw-bd-add input { width: 100%; box-sizing: border-box; background: var(--fw-bg); border: 1px solid var(--fw-line); border-radius: 6px; color: var(--fw-text); padding: 5px 8px; font: inherit; font-size: .85rem; }
.fw-bd-summary { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.fw-bd-list { border-left: 3px solid var(--bd, #888); padding-left: 10px; }
.fw-bd-list table { width: 100%; border-collapse: collapse; font-size: .88rem; table-layout: fixed; }
.fw-bd-list th:nth-child(1) { width: 28%; }
.fw-bd-list th:nth-child(4) { width: 22%; }
.fw-bd-list th { text-align: left; color: var(--fw-dim); font-weight: 400; font-size: .75rem; padding: 3px 6px; border-bottom: 1px solid var(--fw-line); }
.fw-bd-list td { padding: 4px 6px; border-bottom: 1px solid var(--fw-line); vertical-align: top; }
.fw-bd-list .fw-num { text-align: right; width: 4em; }
.fw-bd-list select { background: var(--fw-bg); color: var(--fw-text); border: 1px solid var(--fw-line); border-radius: 6px; font-size: .8rem; padding: 2px 4px; }
.fw-bd-num { background: none; border: 1px solid var(--fw-line); color: var(--fw-text); border-radius: 5px; padding: 0 6px; margin: 0 3px 3px 0; font-size: .8rem; cursor: pointer; }
.fw-bd-num:hover { border-color: var(--fw-yellow); color: var(--fw-yellow); }
@media (max-width: 640px) {
    .fw-bd-list th:nth-child(4), .fw-bd-list td:nth-child(4) { display: none; }
}

/* ------------------------------------------------------------------ option roman */
/* Une colonne de lecture (65 signes environ), une police à empattements, l'alinéa : la page d'un livre,
   sans rien autour. Même fond que le scénario pour qu'on passe de l'un à l'autre sans changer d'atelier. */
.fw-contents { display: contents; }
.fw-novel { position: relative; max-width: 68ch; margin: 12px auto 0; padding: 40px clamp(14px, 6vw, 64px) 48vh; background: #121212; border: 1px solid var(--fw-line); border-radius: 10px;
    font: 18px/1.7 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif; color: #ececec; }
.fw-nb textarea { display: block; width: 100%; resize: none; overflow: hidden; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; padding: 0; margin: 0; min-height: 1.7em;
    text-indent: 1.5em; hyphens: auto; }
.fw-nb textarea:focus { background: rgba(255, 193, 7, .05); box-shadow: -12px 0 0 rgba(255, 193, 7, .05), 12px 0 0 rgba(255, 193, 7, .05); }
.fw .fw-nb textarea:focus-visible { outline: none; } /* la teinte du paragraphe en cours suffit, sans cadre */
.fw-nb textarea::placeholder { color: var(--fw-dim); font-style: italic; }
.fw-nb--chapter { margin: 2.2em 0 1.1em; }
.fw-nb--chapter:first-child { margin-top: .4em; }
.fw-nb--chapter textarea { text-indent: 0; text-align: center; font-size: 1.35em; letter-spacing: .02em; }
.fw-nb--quote textarea { text-indent: 0; padding: 0 3.5em; }
.fw-nb--quote { margin: .5em 0; }
.fw-seg--small button { padding: 4px 8px; font-size: .76rem; }
.fw-novel-plan { max-width: 68ch; margin: 10px auto 0; padding: 12px 14px; border: 1px solid var(--fw-line); border-radius: 10px; display: grid; gap: 10px; }
.fw-novel-plan .fw-small { margin: 0; }
.fw-novel-plan-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.fw-novel-plan-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 46vh; overflow: auto; }
.fw-novel-plan-steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; align-items: center; }
.fw-novel-plan-steps li .fw-small { grid-column: 2; color: var(--fw-dim); }
.fw-novel-plan-steps input[type="checkbox"] { accent-color: var(--fw-yellow); width: 16px; height: 16px; }
.fw-novel-plan-steps input[type="text"] { background: var(--fw-bg); border: 1px solid var(--fw-line); border-radius: 6px; color: var(--fw-text); padding: 5px 8px; font: inherit; font-size: .9rem; min-width: 0; }
.fw-novel-undo { max-width: 68ch; margin: 8px auto 0; display: flex; gap: 12px; align-items: center; font-size: .85rem; color: var(--fw-muted); }
.fw-nb-break { display: block; margin: .9em auto; background: none; border: 0; color: var(--fw-muted); font: inherit; letter-spacing: .4em; cursor: pointer; }
.fw-nb-break:hover, .fw-nb-break:focus-visible { color: var(--fw-yellow); }
.fw-novel-title { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; max-width: 68ch; margin: 10px auto 0; padding: 12px; border: 1px solid var(--fw-line); border-radius: 10px; }
.fw-novel-title label { display: grid; gap: 4px; font-size: .82rem; color: var(--fw-muted); }
.fw-novel-title input, .fw-novel-title textarea { background: var(--fw-bg); border: 1px solid var(--fw-line); border-radius: 6px; color: var(--fw-text); padding: 6px 8px; font: inherit; font-size: .9rem; }
.fw-novel-title .fw-small { grid-column: 1 / -1; margin: 0; }
.fw-script-panel label.fw-btn { position: relative; cursor: pointer; }
@media (max-width: 820px) {
    .fw-novel { padding: 22px 14px 40vh; font-size: 17px; }
}

/* ------------------------------------------------------------------ atelier installable */
/* Le cadre qui met l'atelier en lecture seule quand l'accès hors ligne a expiré : invisible sinon. */
.fw-lock { border: 0; margin: 0; padding: 0; min-width: 0; display: contents; }
.fw-lock:disabled textarea, .fw-lock:disabled input { opacity: 1; cursor: default; }

/* Pages des structures expliquées (filmecranw/structure.html.twig) : lecture guidée, sans effet. */
.fw-st { padding: 0 16px 48px; }
.fw-st p { max-width: 68ch; }
.fw-st-big { font-size: 1.2rem; line-height: 1.5; }
.fw-st-acts { display: flex; gap: 4px; max-width: 760px; margin: 14px 0 6px; }
.fw-st-acts span { background: var(--fw-panel); border: 1px solid var(--fw-line); border-radius: 8px; padding: 10px 12px; font-size: .85rem; color: var(--fw-text); }
.fw-st-acts span:nth-child(2) { border-color: rgba(255, 193, 7, .45); }
.fw-st-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; max-width: 760px; }
.fw-st-steps > li { scroll-margin-top: 80px; }
.fw-st-steps > li:target details { border-color: var(--fw-yellow); }
.fw-st-steps details { background: var(--fw-panel); border: 1px solid var(--fw-line); border-radius: 10px; padding: 10px 14px; }
.fw-st-steps summary { cursor: pointer; font-weight: 700; display: flex; gap: 12px; align-items: baseline; }
.fw-st-steps details[open] summary { margin-bottom: 8px; color: var(--fw-yellow); }
.fw-st-at { min-width: 4.5em; font-size: .8rem; font-weight: 600; color: var(--fw-muted); }
.fw-st-q { border-left: 3px solid var(--fw-yellow); padding-left: 10px; }
.fw-st-list { max-width: 68ch; padding-left: 18px; display: grid; gap: 8px; }
.fw-st-note { max-width: 980px; margin: 24px auto 0; }
@media (max-width: 600px) { .fw-st-acts { flex-direction: column; } .fw-st-acts span { flex: none !important; } }
