.sdc-chess-config{
  --wood-dark:#3E2A1E; --wood-mid:#8B5E3C; --wood-line:#D8C6A8;
  --surface:#FFFCF6;
  --epoxy:#1C6E78; --epoxy-deep:#0F4D55; --epoxy-pale:#E3EFEF;
  --ink-soft:#6B5B4A; --danger:#A32D2D;
  --watermark-url:none;
  box-sizing:border-box; max-width:720px; margin:0 auto; background:transparent; color:var(--wood-dark);
  font-family:'Work Sans',system-ui,sans-serif; line-height:1.55;
  position:relative; isolation:isolate;
}
.sdc-chess-config *{box-sizing:border-box;}
.sdc-chess-config::before{
  content:""; position:absolute; inset:0; z-index:-1; border-radius:18px;
  background-image:var(--watermark-url); background-size:cover; background-position:center;
  opacity:.07; filter:grayscale(.25) contrast(1.05); pointer-events:none;
}
.sdc-chess-config h1,.sdc-chess-config h2,.sdc-chess-config h3{font-family:'Fraunces',serif; font-weight:560; margin:0; letter-spacing:-0.01em;}
.sdc-chess-config .hero{padding:6px 0 20px;}
.sdc-chess-config .sdc-eyebrow{
  margin:0 0 8px; font-size:11.5px; font-weight:600; letter-spacing:.09em; text-transform:uppercase; color:var(--epoxy-deep);
}
.sdc-chess-config .hero h1{font-size:28px; line-height:1.15;}
.sdc-chess-config .hero p{margin:12px 0 0; color:var(--ink-soft); font-size:15px; max-width:52ch;}
.sdc-chess-config .hero .sdc-example-image{border-radius:10px; box-shadow:0 8px 24px rgba(62,42,30,.18);}
.sdc-chess-config .stepper-dots{display:flex; gap:7px; padding:4px 0 6px;}
.sdc-chess-config .stepper-dots span{height:6px; flex:1; border-radius:4px; background:var(--wood-line);}
.sdc-chess-config .stepper-dots span.done{background:var(--epoxy);}
.sdc-chess-config .stepper-dots span.active{background:var(--epoxy-deep);}
.sdc-chess-config .stepper-label{margin:0 0 16px; font-size:12px; color:var(--ink-soft); text-align:right;}
.sdc-chess-config section.step{display:none; padding:4px 0 20px;}
.sdc-chess-config section.step.active{display:block;}
.sdc-chess-config section.step h2{font-size:19px; margin-bottom:4px;}
.sdc-chess-config section.step h3{font-size:16px;}
.sdc-chess-config .step-note{color:var(--ink-soft); font-size:13.5px; margin:0 0 16px;}
.sdc-chess-config .cards{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px;}
.sdc-chess-config label.card{background:var(--surface); border:1px solid var(--wood-line); border-radius:10px; padding:14px 14px 12px; cursor:pointer; display:block; position:relative; box-shadow:0 1px 3px rgba(62,42,30,.06); transition:border-color .15s ease, background .15s ease, box-shadow .15s ease;}
.sdc-chess-config label.card:hover{border-color:var(--wood-mid); box-shadow:0 4px 12px rgba(62,42,30,.1);}
.sdc-chess-config label.card input{position:absolute; opacity:0; width:0; height:0;}
.sdc-chess-config label.card .dim{font-family:'Fraunces',serif; font-weight:560; font-size:17px;}
.sdc-chess-config label.card .price{color:var(--epoxy); font-weight:600; font-size:14px; margin-top:4px;}
.sdc-chess-config label.card .extra{color:var(--ink-soft); font-size:12.5px; margin-top:2px;}
.sdc-chess-config label.card.selected{border-color:var(--epoxy); background:var(--epoxy-pale);}
.sdc-chess-config label.card.selected .dim{color:var(--epoxy-deep);}
.sdc-chess-config label.row{display:flex; align-items:center; gap:10px; background:var(--surface); border:1px solid var(--wood-line); border-radius:10px; padding:12px 14px; cursor:pointer; margin-bottom:8px; box-shadow:0 1px 3px rgba(62,42,30,.06); transition:border-color .15s ease, background .15s ease, box-shadow .15s ease;}
.sdc-chess-config label.row:hover{border-color:var(--wood-mid);}
.sdc-chess-config label.row input[type=radio],.sdc-chess-config label.row input[type=checkbox]{width:17px; height:17px; accent-color:var(--epoxy); flex-shrink:0;}
.sdc-chess-config label.row.selected{border-color:var(--epoxy); background:var(--epoxy-pale);}
.sdc-chess-config .row-text{flex:1;}
.sdc-chess-config .row-title{font-size:14.5px; font-weight:500;}
.sdc-chess-config .row-sub{font-size:12.5px; color:var(--ink-soft); margin-top:1px;}
.sdc-chess-config .row-price{font-weight:600; color:var(--epoxy); font-size:14px; white-space:nowrap;}
.sdc-chess-config .swatches{display:flex; gap:12px; flex-wrap:wrap;}
.sdc-chess-config label.swatch{display:flex; flex-direction:column; align-items:center; gap:6px; cursor:pointer; width:76px;}
.sdc-chess-config label.swatch input{position:absolute; opacity:0; width:0; height:0;}
.sdc-chess-config label.swatch .dot{width:40px; height:40px; border-radius:50%; border:2px solid var(--wood-line); transition:border-color .15s ease, transform .1s ease;}
.sdc-chess-config label.swatch.selected .dot{border-color:var(--epoxy-deep); transform:scale(1.06); box-shadow:0 0 0 2px var(--epoxy-pale);}
.sdc-chess-config label.swatch span.name{font-size:12.5px; color:var(--ink-soft); text-align:center;}
.sdc-chess-config .summary{background:var(--surface); border:1px solid var(--wood-line); border-radius:12px; padding:18px 18px 16px; box-shadow:0 2px 8px rgba(62,42,30,.08);}
.sdc-chess-config .summary-line{display:flex; justify-content:space-between; font-size:13.5px; padding:5px 0; color:var(--ink-soft);}
.sdc-chess-config .summary-line strong{color:var(--wood-dark); font-weight:500;}
.sdc-chess-config .summary-total{display:flex; justify-content:space-between; align-items:baseline; margin-top:10px; padding-top:12px; border-top:1px solid var(--wood-line);}
.sdc-chess-config .summary-total span:first-child{font-family:'Fraunces',serif; font-size:16px;}
.sdc-chess-config .summary-total span:last-child{font-family:'Fraunces',serif; font-size:25px; color:var(--epoxy-deep);}
.sdc-chess-config .sdc-delay-text{font-size:13.5px; font-weight:500; color:var(--epoxy-deep); margin-top:14px;}
.sdc-chess-config .price-note{font-size:13px; color:var(--ink-soft); margin-top:8px; line-height:1.6; padding-top:14px; border-top:1px dashed var(--wood-line);}
.sdc-chess-config .price-note a{color:var(--epoxy-deep); font-weight:500;}
.sdc-chess-config .field{margin-bottom:12px;}
.sdc-chess-config .field label{display:block; font-size:13px; font-weight:500; margin-bottom:5px;}
.sdc-chess-config .field input,.sdc-chess-config .field textarea{
  width:100%; font-family:'Work Sans',sans-serif; font-size:14px; padding:10px 12px;
  border:1px solid var(--wood-line); border-radius:8px; background:var(--surface); color:var(--wood-dark);
}
.sdc-chess-config .field input:focus,.sdc-chess-config .field textarea:focus{outline:2px solid var(--epoxy); outline-offset:1px; border-color:var(--epoxy);}
.sdc-chess-config .field-row{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
.sdc-chess-config .field-error{color:var(--danger); font-size:12px; margin-top:4px; display:none;}
.sdc-chess-config .field.has-error input,.sdc-chess-config .field.has-error textarea{border-color:var(--danger);}
.sdc-chess-config .field.has-error .field-error{display:block;}
.sdc-chess-config .hp{position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden;}
.sdc-chess-config .actions{display:flex; gap:10px; margin-top:18px; flex-wrap:wrap;}
.sdc-chess-config .nav-buttons{display:flex; justify-content:space-between; gap:10px; margin-top:22px; padding-top:18px; border-top:1px solid var(--wood-line);}
.sdc-chess-config .preview-btn{
  flex-shrink:0; width:30px; height:30px; border-radius:50%; border:1px solid var(--wood-line); background:var(--surface);
  color:var(--wood-mid); font-size:14px; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0;
}
.sdc-chess-config .preview-btn:hover{border-color:var(--epoxy); color:var(--epoxy-deep);}
.sdc-chess-config button{font-family:'Work Sans',sans-serif; font-size:14px; font-weight:500; cursor:pointer; border-radius:8px; padding:11px 18px; border:1px solid var(--wood-dark); background:var(--wood-dark); color:#fff;}
.sdc-chess-config button.ghost{background:transparent; color:var(--wood-dark); border:1px solid var(--wood-line);}
.sdc-chess-config button:disabled{opacity:.45; cursor:default;}
.sdc-chess-config button:active:not(:disabled){transform:scale(0.98);}
.sdc-chess-config .form-msg{margin-top:12px; font-size:13.5px;}
.sdc-chess-config .form-msg.ok{color:#2A6B3E;}
.sdc-chess-config .form-msg.err{color:var(--danger);}
@media (min-width:640px){ .sdc-chess-config .hero h1{font-size:34px;} }
@media (max-width:480px){ .sdc-chess-config .field-row{grid-template-columns:1fr;} }

/* ---- v3 : choix de jeu, cartes avec photo, thèmes de couleurs, blocs ---- */
.sdc-chess-config .cards.cards-wide{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));}
.sdc-chess-config label.card .preview-btn{position:absolute; top:8px; right:8px;}
.sdc-chess-config label.card .card-img{display:block; width:100%; height:130px; object-fit:cover; border-radius:8px; margin-bottom:10px;}
.sdc-chess-config label.card .dim{padding-right:34px;}
.sdc-chess-config label.card.card-game .dim{padding-right:0; font-size:19px;}
.sdc-chess-config label.card .theme-dots{display:flex; gap:6px; margin-bottom:10px;}
.sdc-chess-config label.card .theme-dots i{display:block; width:24px; height:24px; border-radius:50%; border:1px solid rgba(0,0,0,.18);}
.sdc-chess-config .block-title{font-size:16px; margin:24px 0 8px;}
.sdc-chess-config label.row .row-title{line-height:1.3;}

.sdc-chess-config .included-note{margin:16px 0 0; padding:10px 12px; background:var(--epoxy-pale); border-radius:8px; font-size:13.5px; color:var(--epoxy-deep); font-weight:500;}

/* ---- Visionneuse photo (ajoutée dans <body> : styles volontairement non scopés) ---- */
.sdc-lb{position:fixed; top:0; right:0; bottom:0; left:0; z-index:2147483600; display:none; align-items:center; justify-content:center; box-sizing:border-box;
  padding:max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));}
.sdc-lb *{box-sizing:border-box;}
.sdc-lb-backdrop{position:absolute; top:0; right:0; bottom:0; left:0; background:rgba(30,20,12,.78);}
.sdc-lb-box{position:relative; display:flex; max-width:min(94vw,900px); max-height:100%; background:#fff; border-radius:12px; padding:8px; box-shadow:0 20px 50px rgba(0,0,0,.4);}
.sdc-lb-box img{display:block; width:auto; height:auto; max-width:100%; max-height:calc(100vh - 64px); max-height:calc(100dvh - 64px); object-fit:contain; border-radius:8px; margin:auto;}
.sdc-lb-close{position:absolute; top:14px; right:14px; width:38px; height:38px; padding:0; border:none; border-radius:50%; background:rgba(30,20,12,.82); color:#fff; font-size:22px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center;}
html.sdc-lb-open{overflow:hidden;}
