/* Coloriage photo (ORD COLORIAGE-PAGE 16/10/2026) : compléments à style.css (copie de lettres-pn). Mobile d'abord. */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; }
.pair figure { margin: 0; }
.ph { display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 100%; padding: 10px; border: 2px dashed var(--accent);
  border-radius: 8px; background: repeating-linear-gradient(45deg, #fff, #fff 10px, #f6efe9 10px, #f6efe9 20px); color: var(--muted);
  font-size: 0.72rem; line-height: 1.3; text-align: center; overflow: hidden; }
.ph b { color: var(--accent); font-size: 0.8rem; }
.examples { display: grid; gap: 14px; }
.examples figure, section[data-livre] figure, .hero-img { margin: 0; }
.hero-img { margin: 18px 0 20px; }
.hero-img img, .examples img, section[data-livre] img { width: 100%; height: auto; display: block; border-radius: 10px; }
.hero-img figcaption, .examples figcaption, section[data-livre] figcaption { font-size: 0.8rem; color: var(--muted); text-align: center; margin-top: 4px; }
body.livre-on section[data-livre] { display: block; }
section[data-livre] .ph { max-width: 480px; margin: 0 auto; }
.pair img { width: 100%; height: auto; display: block; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.pair figcaption, .grid figcaption { font-size: 0.8rem; color: var(--muted); text-align: center; margin-top: 4px; }
.steps { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; scroll-margin-top: 8px; }
.stepbar { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; font-size: 0.8rem; }
.stepbar li { flex: 1; text-align: center; padding: 6px 4px; border-radius: 6px; background: var(--bg); color: var(--muted); }
.stepbar li.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.steps h2 { margin-top: 4px; font-size: 1.15rem; }
.pick { display: block; margin: 14px 0 8px; text-align: center; padding: 16px; border: 2px dashed var(--accent); border-radius: var(--radius); color: var(--accent); font-weight: 600; cursor: pointer; }
.pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pick[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0 14px; }
.grid figure { margin: 0; }
.grid canvas { width: 100%; height: auto; display: block; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
button.link { display: block; margin: 10px auto 0; background: none; border: 0; color: var(--muted); text-decoration: underline; font: inherit; cursor: pointer; }
/* Drapeaux (GET /api/coloriage/config) : fermés tant que le serveur ne dit pas le contraire. */
[data-render], [data-livre] { display: none; }
body.render-on [data-render] { display: inline; }
body.livre-on label[data-livre] { display: flex; }
body.livre-on span[data-livre] { display: inline; }
body.livre-on details[data-livre] { display: block; }
#s3 input[type="text"], #s3 textarea { width: 100%; padding: 10px 12px; font: inherit; border: 1px solid var(--border); border-radius: 8px; margin: 4px 0 8px; }
#s3 { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 12px; }
@media (min-width: 720px) {
  .wrap { max-width: 760px; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .examples { grid-template-columns: repeat(3, 1fr); }
}
/* Aperçu IA (ORD COLORIAGE-APERCU-IA, 17/10) : une grande image, les autres photos en vignettes. */
.pv { margin: 12px 0; min-height: 120px; background: #fff; border: 1px solid #e3d9c4; border-radius: 10px; padding: 10px; text-align: center; }
.pv canvas { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.pv p { margin: 8px 0; color: var(--muted); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; }
