/* Outil Blueprints — s'appuie sur les jetons de app.css */
.bp-page { overflow-y: auto; padding: 24px; }
.bp-wrap { max-width: 1240px; margin: 0 auto; }
.bp-wrap h1 { font: 700 34px/1.05 var(--head); margin: 0 0 6px; letter-spacing: .01em; }
.bp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.bp-head .hint { margin: 0; max-width: 70ch; }
.bp-filters { display: grid; grid-template-columns: minmax(220px, 1fr) 200px 200px 170px; gap: 8px; margin-bottom: 18px; }
.btn { text-decoration: none; }
.btn.lg { padding: 11px 18px; font-size: 15px; }
.gallery-more { display: flex; justify-content: center; margin-top: 18px; }

/* Cartes */
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.bp-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; min-width: 0; }
.bp-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.bp-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--bg-2); }
.bp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-thumb .mk { position: absolute; left: 8px; top: 8px; font: 600 12px/1 var(--head); letter-spacing: .06em; background: rgb(0 0 0 / .65); color: var(--text); padding: 5px 7px 4px; border-radius: 4px; }
.ph { width: 100%; height: 100%; display: grid; place-items: center;
  background: linear-gradient(to right, rgb(255 255 255 / .05) 1px, transparent 1px) 0 0 / 22px 22px,
              linear-gradient(to bottom, rgb(255 255 255 / .05) 1px, transparent 1px) 0 0 / 22px 22px,
              radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--tint) 55%, transparent), transparent 70%), var(--bg-2); }
.ph span { font: 800 30px var(--head); letter-spacing: .06em; color: rgb(255 255 255 / .55); text-transform: uppercase; }
.ph.big { aspect-ratio: 16 / 10; border-radius: 10px; }
.bp-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.bp-body h3 { font: 700 20px/1.15 var(--head); margin: 0; overflow-wrap: anywhere; }
.by { color: var(--muted); font-size: 13px; }
.by b { color: var(--text); font-weight: 600; }
.bp-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pill.cat { background: rgb(245 154 35 / .14); color: var(--accent-2); }
.tag { font-size: 12px; color: var(--muted); }
.bp-bld { margin: 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bp-foot { margin-top: auto; display: flex; justify-content: space-between; font-size: 13px; color: var(--dim); padding-top: 4px; }

/* Fiche */
.back { display: inline-block; margin-bottom: 14px; }
.bp-top { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.shots-view img#main-shot { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; background: var(--bg-2); }
.thumbs { display: flex; gap: 8px; margin-top: 8px; }
.thumbs button { padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; cursor: pointer; width: 92px; aspect-ratio: 16/10; overflow: hidden; }
.thumbs button.active { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-info h1 { margin: 10px 0 6px; }
.bp-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
.bp-facts div { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.bp-facts .label { display: block; font: 600 11px/1 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.bp-facts b { font: 700 20px var(--head); }
.dl { display: flex; flex-wrap: wrap; gap: 8px; }
.howto { margin: 14px 0; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; font-size: 14px; }
.howto summary { cursor: pointer; color: var(--accent); }
.howto summary::after { content: none; }
.howto ol { margin: 10px 0 0; padding-left: 18px; }
.howto code, .drop code { font-size: 12px; background: var(--bg); padding: 2px 5px; border-radius: 4px; word-break: break-all; }
.owner-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.danger-link { color: var(--dim); }
.danger-link:hover { color: var(--bad); }
.bp-section { margin-top: 28px; }
.bp-section h2 { color: var(--muted); }
.bp-desc { white-space: pre-line; max-width: 80ch; margin: 0; }
.bp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.bp-table td { padding: 7px 10px; }

/* Formulaire */
.bp-form-wrap { max-width: 860px; }
.bp-form-wrap .panel { margin-bottom: 14px; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 26px 16px; border: 2px dashed var(--line-2); border-radius: 10px; cursor: pointer; background: var(--bg); }
.drop.over, .drop:hover { border-color: var(--accent); }
.drop input { display: none; }
.file-list { list-style: none; padding: 0; margin: 10px 0 0; font-size: 14px; display: grid; gap: 4px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.field textarea, .field select { background: var(--bg); border: 1px solid var(--line-2); border-radius: 6px; padding: 8px 10px; font: inherit; color: var(--text); }
.field-row { display: grid; grid-template-columns: 220px 1fr; gap: 12px; }
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 10px; }
.shot { position: relative; aspect-ratio: 16/10; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot .icon-btn { position: absolute; top: 4px; right: 4px; background: rgb(0 0 0 / .65); color: #fff; }
.shot-add { cursor: pointer; }
.shot-add input { display: none; }
.shots .hint { grid-column: 1 / -1; margin: 0; }
.reasons { border: 0; padding: 0; margin: 0 0 6px; }
.reasons .check { margin: 6px 0; color: var(--text); }
.btn.danger-btn { background: var(--bad); border-color: var(--bad); color: #fff; }

@media (max-width: 900px) {
  .bp-page { padding: 16px; }
  .bp-filters { grid-template-columns: 1fr 1fr; }
  .bp-filters input { grid-column: 1 / -1; }
  .bp-top, .bp-cols { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .shots { grid-template-columns: repeat(2, 1fr); }
}
