/* Mode SEO OS : écrans ajoutés à la charte existante (mêmes variables, mêmes boutons, mêmes cartes). */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.os-login { width: min(100%, 440px); display: flex; flex-direction: column; gap: 16px; }
.os-login h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.os-login p { margin: 0; }
.os-login .brand { padding: 0; }
.os-login .brand span { display: inline; }
.os-done { display: grid; gap: 12px; }
.os-dialog { width: min(480px, calc(100vw - 32px)); }

.os-section { display: flex; flex-direction: column; }
.os-section .card-head { margin-bottom: 4px; }
.os-hint { margin: 0 0 10px; }
.os-card-gap { margin: 0 0 10px; }
.os-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.os-notice { padding: 10px 14px; border-radius: var(--radius-control); background: var(--raised); font-size: 14px; }
.os-notice.is-warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.os-error { color: var(--negative); }

/* Accueil */
.os-next { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-color: var(--accent); background: var(--accent-soft); }
.os-next-text { margin: 4px 0 0; font-size: var(--fs-text); font-weight: 500; }
.os-row { text-decoration: none; color: inherit; }
.os-row:hover .row-title { text-decoration: underline; }
.os-prod { display: grid; gap: 4px; max-width: 420px; }
.os-prod .track { flex: none; }

/* Article */
.os-actions-row { display: flex; gap: 8px; flex-wrap: wrap; }
.os-actions p { margin: 10px 0 0; }
.os-article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); align-items: start; }
.os-article-main, .os-article-side { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.os-read { padding: 0; overflow: hidden; }
.os-read .tabs { padding: 0 var(--pad); }
.os-read > .os-notice { margin: 12px var(--pad); }
.os-preview { display: grid; gap: 12px; padding: 14px var(--pad) var(--pad); }
.os-frame { background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-control); overflow: hidden; }
.os-frame iframe { display: block; width: 100%; height: 78vh; min-height: 480px; border: 0; background: #fff; }
.os-frame.is-mobile { width: 375px; max-width: 100%; margin: 0 auto; }
.os-comment { position: relative; padding: 12px var(--pad) var(--pad); }
.os-comment-tip { margin: 0 0 10px; color: var(--muted); }
.os-comment-host { border: 1px solid var(--border); border-radius: var(--radius-control); overflow: hidden; background: #fff; }
.os-float { position: absolute; z-index: 20; display: grid; gap: 4px; max-width: 260px; }
.os-float-error { background: var(--pill-negative-bg); color: var(--pill-negative-ink); padding: 6px 8px; border-radius: var(--radius-control); }
.os-composer { position: sticky; bottom: 12px; z-index: 20; margin-top: 12px; display: grid; gap: 10px; box-shadow: var(--float-shadow); }
.os-composer p { margin: 0; }
.os-quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--text); font-size: 14px; max-height: 8em; overflow: auto; white-space: pre-wrap; }
.os-meta { display: grid; gap: 4px; margin: 0; }
.os-meta dt { font-size: var(--fs-meta); font-weight: 600; color: var(--muted); margin-top: 8px; }
.os-meta dt:first-child { margin-top: 0; }
.os-meta dd { margin: 0; overflow-wrap: anywhere; }
.os-points { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.os-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.os-facts li { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.os-facts li:last-child { border-bottom: 0; padding-bottom: 0; }
.os-versions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.os-versions li { display: grid; gap: 2px; }
.os-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.os-step { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--rule); }
.os-step-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--control); flex: none; }
.os-step.is-faite .os-step-dot { background: var(--accent); }
.os-step.is-en_cours .os-step-dot, .os-step.is-en_reprise .os-step-dot { background: var(--warning); animation: pulse 1.8s infinite; }
.os-step-name { flex: 1; min-width: 0; }
.os-step.is-a_venir .os-step-name { color: var(--muted); }

/* Sujets */
.os-tree { list-style: none; margin: 0; padding: 0; }
.os-topic { border-top: 1px solid var(--rule); padding: 10px 0 10px calc(var(--depth, 0) * 24px); display: flex; flex-direction: column; gap: 8px; }
.os-tree > .os-topic:first-child { border-top: 0; }
.os-topic.is-page > .os-topic-main .row-title { font-weight: 600; }
.os-topic.is-off { opacity: 0.6; }
.os-topic-main { display: flex; align-items: center; gap: 8px; }
.os-fold { width: 28px; height: 28px; flex: none; }
.os-fold[aria-expanded='false'] svg { transform: rotate(-90deg); }
.os-fold-gap { width: 28px; flex: none; }
.os-topic-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-left: 36px; }
.os-add .input, .os-two .input { width: 100%; }
.os-import { display: grid; gap: 12px; }
.os-import p { margin: 0; }
.os-import code { font-size: 12.5px; }
.os-report { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--raised); }
.os-report-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.os-report-grid li { display: grid; padding: 8px 10px; border-radius: var(--radius-control); background: var(--surface); }
.os-report-grid b { font-size: 20px; font-weight: 600; }
.os-report-grid span { font-size: var(--fs-meta); color: var(--muted); }
.os-report-grid .is-zero b { color: var(--faint); }
.os-report-grid .is-bad b { color: var(--negative); }
.os-detail { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: var(--fs-small); max-height: 240px; overflow: auto; }

/* Règles */
.os-rules { list-style: none; margin: 0; padding: 0; }
.os-rule { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--rule); }
.os-rule .row-main { flex: 1 1 260px; }
.os-rules > .os-rule:first-child { border-top: 0; }
.os-rule.is-off .os-rule-text { color: var(--muted); text-decoration: line-through; }
.os-rule.is-editing { display: grid; gap: 8px; }
.os-rule.is-editing .input { width: 100%; }
.os-rule-text { overflow-wrap: anywhere; }
.os-rule-actions, .os-rule-edit { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Rythme */
.os-rhythm { display: grid; gap: var(--gap); max-width: 760px; }
.os-sentence { margin: 0; font-size: var(--fs-text); line-height: 1.6; }
.os-fields { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.os-fields .input[type='number'] { width: 110px; }
.os-days { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.os-days .chip { display: inline-flex; align-items: center; }
.os-days .chip:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.os-choices { display: grid; gap: 8px; margin-top: 10px; }
.os-choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-control); cursor: pointer; background: var(--surface); }
.os-choice.is-on { border-color: var(--accent); background: var(--accent-soft); }
.os-choice input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.os-choice span { display: grid; gap: 2px; }
.os-choice small { color: var(--muted); font-size: var(--fs-small); }
.os-savebar { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--ground) 30%); }

/* Réglages */
.os-help { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: var(--fs-small); }
.os-conn { display: grid; gap: 12px; }
.os-conn p { margin: 0; }

@media (max-width: 1100px) {
  .os-article-grid, .os-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .os-report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .os-frame iframe { height: 70vh; }
  .os-topic-actions { padding-left: 0; }
  .os-topic-main { flex-wrap: wrap; }
  /* Sur téléphone, le bouton « Commenter ce passage » reste collé en bas, là où le pouce le trouve. */
  .os-float { position: fixed; left: 16px !important; right: 16px; top: auto !important; bottom: 76px; max-width: none; }
  .os-float .btn { width: 100%; min-height: 44px; }
  .os-composer { bottom: 76px; }
  .os-fields .input[type='number'] { width: 100%; }
  .os-fields .field { flex: 1 1 120px; }
  .os-choice, .os-days .chip { min-height: 44px; }
  .os-savebar { bottom: 72px; }
}

/* Mon activité */
.os-questions { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.os-question { padding: 16px; }
.os-question.is-done p { margin: 0 0 6px; }
