/* =========================================================
   7TH DRAW — by Seventh Room
   Feuille autonome : tout est sous body.sd et préfixé sd-.
   Flexbox simple (fonctionne sur Safari 9 / anciens iPad).
   ========================================================= */
body.sd { margin: 0; background: #eef0f5; color: #1d1f2b; font-family: "Segoe UI", -apple-system, Roboto, Arial, sans-serif; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
.sd * { box-sizing: border-box; }
.sd-hide { display: none !important; }
.sd-top { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: space-between; justify-content: space-between; padding: 8px 12px; background: #15172a; color: #fff; }
.sd-logo { color: #fff; text-decoration: none; font-weight: 900; font-size: 22px; letter-spacing: 1px; line-height: 1; }
.sd-logo b { color: #ff5c8a; }
.sd-logo small { display: block; font-size: 10px; font-weight: 600; letter-spacing: 2px; color: #a9acc8; text-transform: uppercase; margin-top: 3px; }
.sd-top-btns { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; -webkit-justify-content: flex-end; justify-content: flex-end; }
.sd-top .sd-b { background: #24273f; color: #fff; border-color: #34375a; }
.sd-b { display: inline-block; min-height: 42px; padding: 9px 13px; margin: 3px; border-radius: 12px; border: 2px solid #d5d8e3; background: #fff; color: #1d1f2b; font: 700 15px "Segoe UI", -apple-system, Arial, sans-serif; text-decoration: none; cursor: pointer; -ms-touch-action: manipulation; touch-action: manipulation; vertical-align: middle; }
.sd-b:disabled { opacity: 0.4; cursor: default; }
.sd-b.sd-go, .sd-top .sd-b.sd-go { background: #ff5c8a; border-color: #ff5c8a; color: #fff; }
.sd-b.on { border-color: #ff5c8a; color: #c2185b; background: #fff0f5; }
.sd-main { display: -webkit-flex; display: flex; -webkit-align-items: flex-start; align-items: flex-start; padding: 10px; }
.sd-tools { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; margin-right: 10px; }
.sd-tool { width: 74px; min-height: 62px; margin: 0 0 6px; border-radius: 14px; border: 2px solid #d5d8e3; background: #fff; font-size: 22px; cursor: pointer; color: #1d1f2b; -ms-touch-action: manipulation; touch-action: manipulation; }
.sd-tool span { display: block; font-size: 11px; font-weight: 700; margin-top: 2px; }
.sd-tool.on { border-color: #ff5c8a; background: #fff0f5; color: #c2185b; }
.sd-stage { -webkit-flex: 1; flex: 1; min-width: 0; text-align: center; }
#vue { background: #fff; border-radius: 8px; box-shadow: 0 4px 22px rgba(20, 22, 40, .16); -ms-touch-action: none; touch-action: none; cursor: crosshair; display: block; margin: 0 auto; }
.sd-panel { width: 290px; margin-left: 10px; background: #fff; border-radius: 16px; padding: 4px 14px 12px; box-shadow: 0 2px 12px rgba(20, 22, 40, .08); max-height: -webkit-calc(100vh - 90px); max-height: calc(100vh - 90px); overflow: auto; }
.sd-panel h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: #6b6f86; margin: 14px 0 6px; }
.sd-panel input[type=range] { width: 100%; }
.sd-row { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; -webkit-align-items: center; align-items: center; margin: 4px 0; }
.sd-chip { min-height: 38px; padding: 7px 10px; margin: 3px; border-radius: 999px; border: 2px solid #d5d8e3; background: #fff; font: 700 13px inherit; cursor: pointer; color: #1d1f2b; }
.sd-chip.on { border-color: #ff5c8a; color: #c2185b; background: #fff0f5; }
.sd-sw { width: 36px; height: 36px; margin: 3px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #c9ccd8; cursor: pointer; }
.sd-sw.on { box-shadow: 0 0 0 3px #ff5c8a; }
.sd-pick { width: 44px; height: 38px; border: 0; padding: 0; margin: 3px; background: none; }
.sd-check { display: inline-block; margin: 6px 10px 6px 0; font-size: 14px; }
.sd-note { font-size: 12.5px; color: #6b6f86; line-height: 1.45; margin: 6px 0; }
.sd-msg { min-height: 1.3em; margin: 6px 14px; color: #2e7d32; font-weight: 600; }
.sd-msg.bad { color: #c62828; }
.sd-layer { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; border: 2px solid #e3e5ee; border-radius: 10px; margin: 4px 0; padding: 2px; background: #fafbfe; }
.sd-layer.on { border-color: #ff5c8a; background: #fff0f5; }
.sd-layer .nom { -webkit-flex: 1; flex: 1; padding: 8px 6px; font-weight: 700; font-size: 14px; cursor: pointer; }
.sd-layer button { min-width: 34px; min-height: 34px; border: 0; background: none; font-size: 16px; cursor: pointer; }
.sd-banner { margin: 10px; padding: 10px 14px; background: #fff7d6; border: 2px solid #ffd54f; border-radius: 12px; font-weight: 600; }
.sd-modal { position: fixed; left: 0; right: 0; top: 0; bottom: 0; background: rgba(15, 16, 30, .6); z-index: 50; overflow: auto; padding: 16px; }
.sd-modal > div { max-width: 560px; margin: 6vh auto 0; background: #fff; border-radius: 20px; padding: 18px 20px; }
.sd-modal h2 { margin: 0 0 10px; }
.sd-modal textarea { width: 100%; font: 20px "Segoe UI", Arial, sans-serif; padding: 10px; border-radius: 10px; border: 2px solid #d5d8e3; -webkit-user-select: text; user-select: text; }
.sd-modal select { font-size: 16px; padding: 8px; border-radius: 10px; margin-right: 10px; }
.sd-choix .sd-b { display: block; width: 100%; text-align: left; margin: 10px 0 2px; font-size: 17px; min-height: 52px; }
.sd-apercu { display: block; max-width: 100%; max-height: 220px; margin: 0 auto 10px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
/* pages simples (mes dessins, galerie, admin) */
.sd-page { max-width: 1100px; margin: 0 auto; padding: 16px; }
.sd-cards { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; }
.sd-card { width: 230px; margin: 6px; background: #fff; border-radius: 14px; padding: 8px; box-shadow: 0 2px 10px rgba(20, 22, 40, .08); font-size: 13px; color: #555a72; }
.sd-card img { display: block; width: 100%; border-radius: 10px; background: #f3f4f8; }
.sd-card b { color: #1d1f2b; }
.sd-ok { color: #2e7d32; } .sd-wait { color: #b26a00; } .sd-ko { color: #c62828; }
.sd-box { background: #fff; border-radius: 14px; padding: 12px 16px; margin: 10px 0; box-shadow: 0 2px 10px rgba(20, 22, 40, .06); }
.sd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sd-table td { border-bottom: 1px solid #e3e5ee; padding: 7px 6px; }

/* tablettes en portrait et téléphones : outils en barre, panneau en dessous */
@media (max-width: 960px) {
  .sd-main { -webkit-flex-direction: column; flex-direction: column; padding: 6px; }
  .sd-tools { -webkit-flex-direction: row; flex-direction: row; overflow-x: auto; margin: 0 0 6px; width: 100%; -webkit-overflow-scrolling: touch; }
  .sd-tool { width: 66px; min-width: 66px; min-height: 56px; margin: 0 5px 0 0; }
  .sd-stage { width: 100%; }
  .sd-panel { width: 100%; margin: 8px 0 0; max-height: none; }
  .sd-top-btns .sd-b span { display: none; }
}

/* 17/10/2026 — pochoirs et faisceau lumineux */
.sd-poch-grid { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; max-height: 60vh; overflow: auto; }
.sd-poch { width: 96px; margin: 4px; padding: 6px 4px 4px; border-radius: 12px; border: 2px solid #e3e5ee; background: #fafbfe; cursor: pointer; font: 700 12px "Segoe UI", Arial, sans-serif; color: #1d1f2b; }
.sd-poch canvas { display: block; margin: 0 auto 3px; }
.sd-poch:hover, .sd-poch:focus { border-color: #ff5c8a; }
.sd-chip.light.on { border-color: #00b8d4; color: #00838f; background: #e0f7fa; }

/* 17/10 soir — zoom */
.sd-zoom { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; -webkit-justify-content: center; justify-content: center; -webkit-align-items: center; align-items: center; margin: 0 0 4px; }
.sd-zb { min-width: 44px; min-height: 40px; padding: 6px 12px; margin: 2px; }
.sd-zhint { font-size: 12px; color: #6b6f86; margin-left: 8px; }
@media (max-width: 520px) { .sd-zhint { display: none; } }

/* 17/10 — coloriages */
.sd-col { width: 108px; }
.sd-col img { display: block; margin: 0 auto 3px; background: #fff; border-radius: 8px; }
.sd-col small { display: block; color: #b26a00; font-size: 11px; }
#m-col > div { max-width: 820px; }
