/*
 * Editor space: screen 5c « Nouvelle entreprise » (templates/editor/new_company.html.twig),
 * after docs/wireframes/5c-nouvelle-entreprise.html, and the progress of a
 * company's space on screens 5b and 5d. Colour tokens of app.css only, for
 * the dark theme.
 */

.new-company { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin: 0; }
.new-company-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.new-company-section { gap: 16px; }
.new-company-section h2, .new-company-plan h2 { margin: 0; font-size: 17px; font-weight: 700; }
.new-company-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.new-company-grid--narrow { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }

.new-company-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.new-company-field label, .new-company-models legend { font-size: 14px; font-weight: 500; }
.new-company-field input {
    box-sizing: border-box; width: 100%; height: 48px; padding: 0 14px;
    border: 1px solid var(--border-strong); border-radius: 10px;
    background: var(--surface); color: var(--text); font: inherit; font-size: 15px;
}
.new-company-field input::placeholder { color: var(--text-muted); }
.new-company-field textarea {
    box-sizing: border-box; width: 100%; padding: 10px 14px; resize: vertical;
    border: 1px solid var(--border-strong); border-radius: 10px;
    background: var(--surface); color: var(--text); font: inherit; font-size: 15px;
}
.new-company-field textarea::placeholder { color: var(--text-muted); }
.new-company-field input:focus-visible, .new-company-field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.new-company-field [aria-invalid="true"] { border-color: var(--danger-border); }
.new-company-help { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-muted); overflow-wrap: anywhere; }
.new-company-help strong { color: var(--text); font-weight: 600; }
.new-company-error { font-size: 13px; line-height: 1.4; color: var(--danger); }
.new-company-error p { margin: 0; }

.new-company-models { margin: 0; padding: 0; border: none; display: flex; flex-direction: column; gap: 4px; }
.new-company-models legend { padding: 0 0 6px; }
.new-company-check { display: flex; gap: 10px; align-items: center; min-height: 32px; font-size: 14px; cursor: pointer; }
.new-company-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); cursor: pointer; }

.new-company-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.new-company-actions .button { min-height: 44px; padding: 0 16px; border: none; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
/* app.css declares .button after .button--secondary: the secondary look is restated here. */
.new-company-actions .button--secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.new-company-actions .button--secondary:hover { background: var(--accent-tint); color: var(--text); }

/* « Ce qui sera créé » */
.new-company-plan { flex: 1 1 280px; gap: 4px; }
.new-company-plan h2 { margin-bottom: 8px; font-size: 16px; }
.new-company-plan-list { margin: 0; padding: 0; list-style: none; }
.new-company-plan-list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--divider); color: var(--text-muted); }
.new-company-plan-list li .icon { margin-top: 2px; }
.new-company-plan-list li > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.new-company-plan-title { font-size: 14px; font-weight: 600; color: var(--text); }
.new-company-plan-text { font-size: 13px; color: var(--text-muted); overflow-wrap: anywhere; }
/* What depends on the operator's version: dashed, as the wireframes mark what is pending. */
.new-company-plan-list li.new-company-plan-later { border-top: 1px dashed var(--border-strong); }

/* 5b and 5d: a company whose space the operator is still creating: dashed, in the violet of work in progress, with its clock. */
.editor-status--pending { border-style: dashed; border-color: var(--info-border); background: var(--info-bg); color: var(--info); }
/* A step's state stays on the right, even when it wraps under its label. */
.editor-row--setup dd { margin-left: auto; max-width: 100%; }
.editor-setup-state { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 100%; }
.editor-setup-state .editor-status { white-space: normal; text-align: left; min-height: 26px; padding-top: 3px; padding-bottom: 3px; }
.editor-setup-detail { max-width: 360px; font-size: 12px; font-weight: 400; color: var(--text-muted); text-align: right; overflow-wrap: anywhere; }
.editor-orphans { margin: 0; padding: 12px 16px; border: 1px dashed var(--warning-border); border-radius: 10px; background: var(--warning-bg); color: var(--warning); font-size: 14px; line-height: 1.5; }
.editor-orphans code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }

@media (max-width: 820px) {
    .new-company-actions { justify-content: flex-start; }
}
