/* ------------------------------------------------------------
   view-tool-atelier.css — écran d'un outil, grand écran (lot 07)
   Application plein écran, bord à bord : panneau 288px collé à
   gauche, scène à 24px des bords, saisie centrée à 820px max.
   Référence : handoffs/07-ecran-outil-revision/screenshots/D2-grand-ecran.png
   ------------------------------------------------------------ */

.atelier__history,
.scene,
.atelier__main-head,
.atelier__expand { display: none; }

@media (min-width: 960px) {
  .tool-screen {
    padding: 0;
    background-image: radial-gradient(var(--line) 1px, transparent 1.2px);
    background-size: 18px 18px;
  }
  .tool-header { display: none; }

  .tool-body {
    flex: 1;
    display: grid;
    grid-template-columns: 288px minmax(0, 1fr);
    min-height: 0;
  }
  .tool-body--collapsed { grid-template-columns: 0 minmax(0, 1fr); }
  .tool-body--collapsed .atelier__history { display: none; }

  .tool-opening, .thread { display: none; }
  .atelier__history { display: flex; }
  .scene { display: flex; }

  .atelier__expand {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: var(--r-sm);
    background: var(--surface);
    box-shadow: 0 0 0 1px var(--line);
    color: var(--ink);
    display: grid;
    place-items: center;
    cursor: pointer;
  }

  .atelier__main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: var(--sp-4);
    padding: 24px;
    overflow-y: auto;
  }

  .composer { max-width: 820px; width: 100%; margin: 0 auto; }

  /* ---------- Panneau d'historique (contenu, pas de navigation) ---------- */
  .atelier__history {
    flex-direction: column;
    gap: var(--sp-3);
    width: 288px;
    flex: none;
    background: var(--surface);
    box-shadow: inset -1px 0 0 var(--line);
    padding: 16px 12px;
  }
  .atelier__history-head { display: flex; align-items: center; justify-content: space-between; }
  .atelier__icon-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--r-sm);
    border: 0;
    background: transparent;
    color: var(--ink);
    display: grid;
    place-items: center;
    cursor: pointer;
  }
  .atelier__new {
    height: 48px;
    border-radius: var(--r-lg);
    font-size: 15px;
  }
  .atelier__history-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    padding-left: 8px;
  }
  .atelier__history-list {
    flex: 1;
    overflow-y: auto;
    display: grid;
    gap: 4px;
    align-content: start;
  }
  .history-item {
    display: flex;
    gap: var(--sp-2);
    padding: var(--sp-2);
    border-radius: var(--r-md);
    cursor: pointer;
    text-align: left;
    border: 0;
    background: transparent;
  }
  .history-item[aria-current="true"] { background: var(--tint); }
  .history-item__thumb {
    width: 44px;
    height: 56px;
    border-radius: 10px;
    background: var(--surface-2);
    flex: none;
    display: grid;
    place-items: center;
    color: var(--muted);
  }
  .history-item__thumb--generating { background: var(--tint); color: var(--accent); }
  .history-item__text { font-size: 13px; color: var(--ink); line-height: 1.3; }
  .history-item__date { font-size: 12px; color: var(--muted); }
  .atelier__history-empty { font-size: 13px; color: var(--muted); padding: var(--sp-2) 8px; }
  .atelier__quota { flex: none; padding: var(--sp-2) 8px 0; display: grid; gap: 6px; }
  .atelier__quota-count { font-size: 13px; font-weight: 600; color: var(--ink); }
  .atelier__quota-count b { font-weight: 700; }

  /* ---------- En-tête de la zone principale ---------- */
  .atelier__main-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
  }
  .atelier__main-head .icon { width: 22px; height: 22px; flex: none; }
  .atelier__main-head h2 { font-size: 21px; }

  /* ---------- Scène ---------- */
  .scene {
    flex: 1;
    min-height: 0;
    background: var(--tint);
    border-radius: 28px;
    padding: var(--sp-5);
    align-items: center;
    justify-content: center;
    gap: 48px;
  }
  .scene__frame {
    position: relative;
    width: 248px;
    height: 440px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    flex: none;
    overflow: hidden;
    background: var(--surface);
    box-shadow: 0 0 0 1px var(--line);
  }
  .scene__frame--empty { background: var(--surface); }
  .frame-corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 0 solid var(--accent);
  }
  .frame-corner--tl { top: 10px; left: 10px; border-width: 2px 0 0 2px; }
  .frame-corner--tr { top: 10px; right: 10px; border-width: 2px 2px 0 0; }
  .frame-corner--bl { bottom: 10px; left: 10px; border-width: 0 0 2px 2px; }
  .frame-corner--br { bottom: 10px; right: 10px; border-width: 0 2px 2px 0; }
  .scene__frame .media-frame { max-width: none; width: 100%; height: 100%; margin: 0; border-radius: 0; }
  .scene__frame .media-frame video, .scene__frame .media-frame img { width: 100%; height: 100%; object-fit: cover; }
  .scene__frame-label {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 13px;
    color: var(--ink);
    background: var(--tint);
    padding: 3px 8px;
    border-radius: 8px;
  }

  .scene--text .scene__frame { width: 460px; height: auto; background: var(--surface); border-radius: 24px; padding: var(--sp-4); box-shadow: none; }

  .scene__info { width: 300px; flex: none; display: grid; gap: var(--sp-2); align-content: start; }
  .scene__eyebrow { font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
  .scene__request { font-size: 16px; color: var(--ink); line-height: 1.5; }
  .scene__title { font-family: var(--font-display); font-size: 20px; color: var(--ink); }
  .scene__tags { display: flex; flex-wrap: wrap; gap: 6px; }
  .scene__tag {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    height: auto;
    padding: 3px 8px;
    border-radius: 8px;
    background: var(--surface);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
  }
  .scene__actions { display: grid; gap: var(--sp-2); margin-top: var(--sp-2); }
  .scene__saved, .scene__note { font-size: 14px; color: var(--ink); }
  .scene__info--full { width: 100%; }
  .scene__empty { width: 100%; text-align: center; font-size: 14px; color: var(--muted); }
}
