/* =============================================
   WC Photo Print — Configurateur Fine Art
   Version : 1.3.0
   Philosophie : atelier haut de gamme — espace,
   monochrome, typographie soignée, zéro effet.
   ============================================= */

/* ── Variables ───────────────────────────────── */
#c27-configurator {
  --c27-ink:      #111111;
  --c27-ink-soft: #555555;
  --c27-ink-mute: #999999;
  --c27-rule:     #e2e0dc;
  --c27-bg-warm:  #f8f7f4;
  --c27-bg-mid:   #f0eeea;
  --c27-white:    #ffffff;
  --c27-ok:       #2e7d32;
  --c27-warn:     #b45309;
  --c27-err:      #b91c1c;
}

/* ── Reset & base ──────────────────────────────── */
#c27-configurator {
  font-family: inherit;
  width: 100%;
  max-width: 900px;
  margin: 32px 0;
  box-sizing: border-box;
  color: var(--c27-ink);
}

#c27-configurator *,
#c27-configurator *::before,
#c27-configurator *::after { box-sizing: inherit; }

.c27-step { display: none; }

/* ══════════════════════════════════════════════
   WIZARD NAV — progression élégante
══════════════════════════════════════════════ */
.c27-wizard-nav {
  display: flex;
  align-items: flex-start;
  margin: 0 0 48px;
}

.c27-step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.c27-dot-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--c27-rule);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--c27-ink-mute);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
  letter-spacing: 0;
}

.c27-dot-label {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c27-ink-mute);
  margin-top: 6px;
  white-space: nowrap;
  font-weight: 600;
  transition: color 0.3s;
}

.c27-dot-line {
  flex: 1;
  height: 1px;
  background: var(--c27-rule);
  margin: 0 6px;
  margin-top: 14px;
  align-self: flex-start;
  transition: background 0.4s;
}

.c27-step-dot.c27-active .c27-dot-num  { border-color: var(--c27-ink); background: var(--c27-ink); color: #fff; }
.c27-step-dot.c27-active .c27-dot-label { color: var(--c27-ink); }
.c27-step-dot.c27-done   .c27-dot-num  { border-color: var(--c27-ink); background: var(--c27-ink); color: #fff; }
.c27-step-dot.c27-done   .c27-dot-label { color: var(--c27-ink-soft); }

@media (min-width: 480px) {
  .c27-dot-num  { width: 32px; height: 32px; font-size: 0.76rem; }
  .c27-dot-line { margin-top: 16px; }
}

/* ══════════════════════════════════════════════
   CARD — contenant sans effet
══════════════════════════════════════════════ */
.c27-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* ── Titre d'étape — label atelier ── */
.c27-step-title {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c27-ink-mute);
  margin: 0 0 32px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--c27-rule);
  line-height: 1;
}

/* ── Section spacing ── */
.c27-section { margin-bottom: 28px; }

.c27-row-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
@media (min-width: 480px) {
  .c27-row-2 { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════
   FORMAT GRID
══════════════════════════════════════════════ */
.c27-format-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.c27-format-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--c27-rule);
  border-radius: 2px;
  cursor: pointer;
  background: var(--c27-white);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  min-width: 76px;
  flex: 0 0 auto;
  text-align: center;
  min-height: 80px;
  justify-content: center;
  gap: 6px;
}

.c27-format-btn:hover,
.c27-format-btn:focus-visible { border-color: var(--c27-ink); outline: none; }

.c27-format-btn.c27-active {
  border-color: var(--c27-ink);
  background: var(--c27-ink);
  color: #fff;
}

.c27-format-thumb {
  background: var(--c27-bg-mid);
  flex-shrink: 0;
  border-radius: 1px;
}
.c27-format-btn.c27-active .c27-format-thumb { background: rgba(255,255,255,0.2); }

.c27-format-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.c27-format-dims {
  font-size: 0.62rem;
  color: var(--c27-ink-mute);
  letter-spacing: 0.02em;
}
.c27-format-btn.c27-active .c27-format-dims { color: rgba(255,255,255,0.55); }

/* ══════════════════════════════════════════════
   LABELS & SELECTS
══════════════════════════════════════════════ */
.c27-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c27-ink-mute);
  margin: 0 0 8px;
  display: block;
}

.c27-select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--c27-rule);
  border-radius: 2px;
  font-size: 0.9rem;
  background: var(--c27-white);
  color: var(--c27-ink);
  appearance: auto;
  min-height: 44px;
  transition: border-color 0.2s;
}
.c27-select:focus { border-color: var(--c27-ink); outline: none; }

/* ══════════════════════════════════════════════
   STEP FOOTER
══════════════════════════════════════════════ */
.c27-step-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--c27-rule);
  gap: 14px;
  flex-wrap: wrap;
}
.c27-footer-back-only { justify-content: flex-start; }

/* ══════════════════════════════════════════════
   BOUTONS
══════════════════════════════════════════════ */
.c27-btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--c27-ink);
  color: #fff;
  border: none;
  border-radius: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 48px;
  transition: background 0.2s;
}
.c27-btn-cta:hover   { background: #2a2a2a; }
.c27-btn-cta:disabled { opacity: 0.3; cursor: not-allowed; }

.c27-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 24px;
  background: transparent;
  color: var(--c27-ink-soft);
  border: 1px solid var(--c27-rule);
  border-radius: 2px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 48px;
  transition: border-color 0.2s, color 0.2s;
}
.c27-btn-ghost:hover { border-color: var(--c27-ink); color: var(--c27-ink); }

.c27-btn-add-to-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 18px 28px;
  background: var(--c27-ink);
  color: #fff;
  border: none;
  border-radius: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 58px;
  transition: background 0.2s;
  margin-top: 24px;
}
.c27-btn-add-to-cart svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  opacity: 0.8;
}
.c27-btn-add-to-cart:hover   { background: #2a2a2a; }
.c27-btn-add-to-cart:disabled { opacity: 0.3; cursor: not-allowed; }

/* ══════════════════════════════════════════════
   PRIX INLINE (étape 1)
══════════════════════════════════════════════ */
.c27-price-inline {
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--c27-ink);
  letter-spacing: 0.02em;
}

/* ══════════════════════════════════════════════
   DROPZONE — style Phox-inspired
══════════════════════════════════════════════ */
#c27-step-upload .c27-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  /* fond géométrique triangulaire */
  background-color: var(--c27-bg-warm);
  background-image:
    linear-gradient(135deg, var(--c27-bg-mid) 25%, transparent 25%),
    linear-gradient(225deg, var(--c27-bg-mid) 25%, transparent 25%),
    linear-gradient(315deg, var(--c27-bg-mid) 25%, transparent 25%),
    linear-gradient(45deg,  var(--c27-bg-mid) 25%, transparent 25%);
  background-size: 48px 48px;
  background-position: 0 0, 24px 0, 24px -24px, 0px 24px;
  padding: 48px 24px;
}
@media (min-width: 600px) {
  #c27-step-upload .c27-card { min-height: 420px; }
}

#c27-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  text-align: center;
}
#c27-dropzone:hover,
#c27-dropzone:focus-visible { outline: none; opacity: 0.88; transform: translateY(-1px); }
#c27-dropzone.c27-disabled  { opacity: 0.3; pointer-events: none; }
#c27-dropzone.c27-uploading { pointer-events: none; opacity: 0.6; }
#c27-dropzone.c27-dragover  { opacity: 0.8; transform: scale(1.02); }

/* Gros bouton CTA upload */
.c27-dz-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 20px 40px;
  background: var(--c27-ink);
  color: #fff;
  border-radius: 2px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}
.c27-dz-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
  flex-shrink: 0;
}

.c27-dz-secondary {
  margin: 0;
  font-size: 0.78rem;
  color: var(--c27-ink-soft);
  letter-spacing: 0.02em;
}

.c27-hint {
  margin: 0;
  font-size: 0.65rem;
  color: var(--c27-ink-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ancien icône — caché (remplacé par .c27-dz-btn) */
.c27-upload-icon { display: none; }
.c27-dz-primary  { display: none; }

/* ══════════════════════════════════════════════
   BARRE DE PROGRESSION UPLOAD
══════════════════════════════════════════════ */
#c27-upload-progress { display: none; margin-top: 12px; }

.c27-progress-track {
  background: var(--c27-bg-mid);
  border-radius: 0;
  height: 2px;
  overflow: hidden;
}
.c27-progress-bar {
  height: 100%;
  background: var(--c27-ink);
  width: 0%;
  transition: width 0.2s;
}

.c27-progress-bar.c27-progress-processing {
  width: 100% !important;
  transition: none;
  background: linear-gradient(90deg,
    transparent        0%,
    var(--c27-ink)    35%,
    var(--c27-ink)    65%,
    transparent      100%
  );
  background-size: 200% 100%;
  animation: c27-progress-sweep 1.1s ease-in-out infinite;
}

@keyframes c27-progress-sweep {
  0%   { background-position: 120%  0; }
  100% { background-position: -80%  0; }
}
.c27-progress-label {
  font-size: 0.68rem;
  color: var(--c27-ink-mute);
  letter-spacing: 0.08em;
  margin: 6px 0 0;
  text-align: center;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════
   INDICATEUR QUALITÉ
══════════════════════════════════════════════ */
#c27-quality-indicator {
  padding: 10px 16px;
  border-left: 2px solid currentColor;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}
.c27-quality-ok   { background: transparent; color: var(--c27-ok); }
.c27-quality-warn { background: transparent; color: var(--c27-warn); }
.c27-quality-err  { background: transparent; color: var(--c27-err); }

/* ══════════════════════════════════════════════
   CONFIGURE — Layout 2 colonnes
══════════════════════════════════════════════ */
.c27-configure-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 4px;
}

@media (min-width: 700px) {
  .c27-configure-layout {
    grid-template-columns: 3fr 2fr;
    align-items: start;
    gap: 32px;
  }
  .c27-col-options {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding-right: 4px;
  }
}

.c27-col-editor,
.c27-col-options { min-width: 0; }

/* Alerte DPI — bandeau proéminent */
.c27-dpi-alert {
  padding: 10px 14px;
  border-left: 3px solid currentColor;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
  line-height: 1.5;
}
.c27-dpi-alert.c27-quality-warn { color: var(--c27-warn); background: #fffbeb; }
.c27-dpi-alert.c27-quality-err  { color: var(--c27-err);  background: #fff5f5; }

/* Prix live dans la colonne options */
.c27-configure-price {
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--c27-ink);
  letter-spacing: -0.01em;
  padding-top: 16px;
  border-top: 1px solid var(--c27-rule);
  margin-top: 8px;
}

/* ══════════════════════════════════════════════
   CROP
══════════════════════════════════════════════ */
#c27-crop-container {
  width: 100%;
  height: 360px;
  overflow: hidden;
  background: #0a0a0a;
  border-radius: 0;
  margin-bottom: 14px;
}

@media (min-width: 700px) {
  #c27-crop-container {
    height: min(calc(100vh - 320px), 460px);
  }
}

#c27-crop-image { max-width: 100%; display: block; }

.c27-crop-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.c27-crop-toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border: 1px solid var(--c27-rule);
  border-radius: 2px;
  background: var(--c27-white);
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-height: 36px;
  transition: background 0.15s, border-color 0.15s;
  color: var(--c27-ink-soft);
}
.c27-crop-toolbar button svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.c27-crop-toolbar button:hover,
.c27-crop-toolbar button:focus-visible {
  background: var(--c27-bg-warm);
  border-color: var(--c27-ink);
  color: var(--c27-ink);
  outline: none;
}

#c27-dpi-display {
  font-size: 0.7rem;
  color: var(--c27-ink-mute);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  min-height: 18px;
}

/* ══════════════════════════════════════════════
   MARGES
══════════════════════════════════════════════ */
.c27-margin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
@media (min-width: 700px) {
  .c27-margin-grid { grid-template-columns: repeat(4, 1fr); }
}

.c27-margin-field label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 5px;
  color: var(--c27-ink-mute);
}
.c27-margin-field input[type="number"],
.c27-margin-field input[type="color"] {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--c27-rule);
  border-radius: 2px;
  font-size: 0.9rem;
  min-height: 40px;
  background: var(--c27-white);
  color: var(--c27-ink);
}
.c27-margin-field input:focus { border-color: var(--c27-ink); outline: none; }

.c27-color-row { margin-bottom: 16px; }
.c27-color-row label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 5px;
  color: var(--c27-ink-mute);
}
.c27-color-row input[type="color"] {
  width: 48px;
  height: 40px;
  border: 1px solid var(--c27-rule);
  border-radius: 2px;
  cursor: pointer;
  padding: 2px;
}

.c27-margin-profile-row { margin-bottom: 20px; }
.c27-margin-profile-row label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 5px;
  color: var(--c27-ink-mute);
}

/* ══════════════════════════════════════════════
   SUPPORTS & FINITIONS
══════════════════════════════════════════════ */
#c27-support-section { margin-bottom: 20px; }

.c27-support-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.c27-support-btn {
  padding: 11px 20px;
  border: 1px solid var(--c27-rule);
  border-radius: 2px;
  cursor: pointer;
  background: var(--c27-white);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: 44px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  color: var(--c27-ink-soft);
}
.c27-support-btn:hover,
.c27-support-btn:focus-visible { border-color: var(--c27-ink); color: var(--c27-ink); outline: none; }
.c27-support-btn.c27-active    { border-color: var(--c27-ink); background: var(--c27-ink); color: #fff; }

#c27-support-finishes { margin-top: 8px; }

.c27-finish-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.c27-finish-btn {
  padding: 7px 16px;
  border: 1px solid var(--c27-rule);
  border-radius: 2px;
  cursor: pointer;
  background: var(--c27-white);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: 36px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  color: var(--c27-ink-soft);
}
.c27-finish-btn:hover,
.c27-finish-btn:focus-visible { border-color: var(--c27-ink); color: var(--c27-ink); outline: none; }
.c27-finish-btn.c27-active    { border-color: var(--c27-ink); background: var(--c27-ink); color: #fff; }

/* ══════════════════════════════════════════════
   MOCKUP
══════════════════════════════════════════════ */
#c27-mockup-container { position: relative; width: 100%; margin-bottom: 20px; }

#c27-mockup-canvas {
  display: none;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: 0 4px 40px rgba(0,0,0,0.12);
}

.c27-mockup-loading {
  text-align: center;
  padding: 36px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c27-ink-mute);
}

/* ══════════════════════════════════════════════
   RÉCAPITULATIF
══════════════════════════════════════════════ */
.c27-summary-layout {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
@media (min-width: 540px) {
  .c27-summary-layout  { flex-direction: row; align-items: flex-start; gap: 36px; }
  .c27-summary-preview { flex: 0 0 210px; }
}

.c27-summary-preview { flex-shrink: 0; }

#c27-summary-thumb {
  width: 100%;
  border-radius: 0;
  box-shadow: 0 4px 32px rgba(0,0,0,0.1);
  display: none;
}

.c27-summary-details { flex: 1; min-width: 0; }

#c27-summary-text {
  font-size: 0.88rem;
  line-height: 2;
  color: var(--c27-ink-soft);
  margin-bottom: 24px;
  border-bottom: 1px solid var(--c27-rule);
  padding-bottom: 20px;
}

.c27-summary-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 24px;
}

.c27-price-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c27-ink-mute);
}

#c27-price-display-summary {
  font-size: 2rem;
  font-weight: 300;
  color: var(--c27-ink);
  letter-spacing: -0.01em;
  line-height: 1;
}

.c27-summary-qty { margin-bottom: 0; }
.c27-summary-qty > label {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c27-ink-mute);
  margin-bottom: 8px;
}

.c27-qty-control {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--c27-rule);
  border-radius: 2px;
  overflow: hidden;
}
.c27-qty-dec,
.c27-qty-inc {
  width: 40px;
  border: none;
  background: var(--c27-bg-warm);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  color: var(--c27-ink);
}
.c27-qty-dec:hover,
.c27-qty-inc:hover { background: var(--c27-bg-mid); }

.c27-qty-control input[type="number"] {
  width: 52px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--c27-rule);
  border-right: 1px solid var(--c27-rule);
  font-size: 0.9rem;
  font-weight: 600;
  height: 40px;
  padding: 0;
  -moz-appearance: textfield;
  color: var(--c27-ink);
  background: var(--c27-white);
}
.c27-qty-control input[type="number"]::-webkit-inner-spin-button,
.c27-qty-control input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ══════════════════════════════════════════════
   NOTICES (toast)
══════════════════════════════════════════════ */
#c27-notices {
  position: fixed;
  top: 16px;
  right: 12px;
  left: 12px;
  z-index: 99999;
  pointer-events: none;
}
@media (min-width: 480px) {
  #c27-notices { left: auto; max-width: 340px; right: 20px; top: 20px; }
}

.c27-notice {
  padding: 13px 18px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.02em;
  pointer-events: auto;
  border-left: 3px solid currentColor;
  background: var(--c27-white);
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}
.c27-notice-info    { color: #1565c0; }
.c27-notice-warning { color: var(--c27-warn); }
.c27-notice-error   { color: var(--c27-err); }
.c27-notice-success { color: var(--c27-ok); }

/* ══════════════════════════════════════════════
   SPINNER
══════════════════════════════════════════════ */
.c27-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: c27-spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes c27-spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════
   THUMBNAIL PANIER
══════════════════════════════════════════════ */
.c27-cart-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

/* ══════════════════════════════════════════════
   PAGE PRODUIT — pleine largeur sans galerie
══════════════════════════════════════════════ */
.c27-photo-print-product .woocommerce-product-gallery { display: none !important; }

.c27-photo-print-product div.product .summary,
.c27-photo-print-product div.product .entry-summary {
  width: 100% !important;
  float: none !important;
  clear: both;
}

/* ══════════════════════════════════════════════
   FORMAT SUGGESTIONS — badges & DPI
══════════════════════════════════════════════ */
.c27-format-match-badge {
  display: block;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 1px;
  margin-bottom: 4px;
  line-height: 1.4;
}

.c27-match-ideal { background: #e8f5e9; color: #2e7d32; }
.c27-match-ok    { background: #fff8e1; color: #b45309; }
.c27-match-crop  { background: #fce4ec; color: #c62828; }

.c27-format-btn.c27-active .c27-format-match-badge {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
}

.c27-format-dpi-badge {
  font-size: 0.55rem;
  letter-spacing: 0.03em;
  font-weight: 700;
  margin-top: 3px;
  text-transform: uppercase;
}
.c27-dpi-ok   { color: var(--c27-ok); }
.c27-dpi-warn { color: var(--c27-warn); }
.c27-dpi-err  { color: var(--c27-err); }
.c27-format-btn.c27-active .c27-format-dpi-badge { color: rgba(255,255,255,0.65); }

.c27-format-dpi-info {
  padding: 10px 16px;
  border-left: 2px solid currentColor;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin: 0 0 20px;
  min-height: 40px;
  display: flex;
  align-items: center;
}

/* ══════════════════════════════════════════════
   AJUSTEMENT — toggle recadrage / bords blancs
══════════════════════════════════════════════ */
.c27-adjust-mode-bar {
  display: inline-flex;
  border: 1px solid var(--c27-rule);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 20px;
}

.c27-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border: none;
  border-right: 1px solid var(--c27-rule);
  background: var(--c27-bg-warm);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 44px;
  color: var(--c27-ink-mute);
  transition: background 0.2s, color 0.2s;
}
.c27-mode-tab:last-child { border-right: none; }
.c27-mode-tab svg { width: 15px; height: 15px; flex-shrink: 0; }
.c27-mode-tab.c27-active { background: var(--c27-ink); color: #fff; }
.c27-mode-tab:hover:not(.c27-active) { background: var(--c27-bg-mid); color: var(--c27-ink); }

.c27-adjust-mode-hint {
  font-size: 0.78rem;
  color: var(--c27-ink-mute);
  font-style: italic;
  margin: 0 0 16px;
}

/* ══════════════════════════════════════════════
   APERÇU TEMPS RÉEL — bords blancs
══════════════════════════════════════════════ */
.c27-borders-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px;
  background: var(--c27-bg-mid);
  margin-top: 20px;
  margin-bottom: 24px;
}

#c27-borders-preview {
  display: block;
  max-width: 100%;
  box-shadow: 0 2px 24px rgba(0,0,0,0.14);
  image-rendering: auto;
}

.c27-borders-preview-hint {
  margin: 0;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c27-ink-mute);
}

/* ══════════════════════════════════════════════
   JAUGE DPI
══════════════════════════════════════════════ */
.c27-dpi-gauge {
  margin-bottom: 14px;
  user-select: none;
}

.c27-gauge-track {
  position: relative;
  height: 8px;
  border-radius: 0;
  overflow: visible;
  margin-bottom: 6px;
  background: var(--c27-bg-mid);
}

.c27-gauge-zones {
  position: absolute;
  inset: 0;
  display: flex;
  border-radius: 0;
  overflow: hidden;
}

.c27-gauge-zone {
  height: 100%;
  display: block;
}
.c27-zone-err  { background: #fecaca; }
.c27-zone-warn { background: #fed7aa; }
.c27-zone-ok   { background: #bbf7d0; }

.c27-gauge-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 0%;
  transition: width 0.35s ease, background 0.35s ease;
  z-index: 1;
  border-radius: 0;
}
.c27-fill-ok   { background: var(--c27-ok); }
.c27-fill-warn { background: var(--c27-warn); }
.c27-fill-err  { background: var(--c27-err); }

/* Marqueur cible DPI */
.c27-gauge-marker {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  background: var(--c27-ink);
  z-index: 2;
  transform: translateX(-50%);
}
.c27-gauge-marker::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--c27-ink);
}

.c27-gauge-legend {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.76rem;
}

.c27-gauge-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c27-ink);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  min-width: 3ch;
}

.c27-gauge-unit {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c27-ink-mute);
}

.c27-gauge-verdict {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: auto;
}

/* ══════════════════════════════════════════════
   CARTES PAPIER
══════════════════════════════════════════════ */
.c27-paper-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.c27-paper-card {
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--c27-rule);
  border-radius: 2px;
  background: var(--c27-white);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s, background 0.18s;
  width: 100%;
}
.c27-paper-card:hover,
.c27-paper-card:focus-visible {
  border-color: var(--c27-ink);
  outline: none;
}
.c27-paper-card.c27-active {
  border-color: var(--c27-ink);
  background: var(--c27-ink);
}

/* Pastille finition */
.c27-paper-finish {
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--c27-rule);
  flex-shrink: 0;
  display: block;
}
.c27-finish-mat      { background: #d4d0cc; }
.c27-finish-lustre   { background: linear-gradient(135deg, #e8e4df 0%, #f5f3f0 50%, #c8c4be 100%); }
.c27-finish-brillant { background: linear-gradient(135deg, #fff 0%, #e0ddd8 50%, #fff 100%); }
.c27-finish-baryte   { background: linear-gradient(135deg, #c8c4be 0%, #f0eeea 60%, #b8b4ae 100%); }
.c27-finish-toile    { background: repeating-linear-gradient(45deg, #d4d0cc, #d4d0cc 2px, #e8e4df 2px, #e8e4df 6px); }

.c27-paper-card.c27-active .c27-paper-finish {
  border-color: rgba(255,255,255,0.3);
  opacity: 0.9;
}

.c27-paper-name {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--c27-ink);
  line-height: 1.2;
  display: block;
}
.c27-paper-card.c27-active .c27-paper-name { color: #fff; }

.c27-paper-desc {
  font-size: 0.62rem;
  color: var(--c27-ink-mute);
  letter-spacing: 0.02em;
  line-height: 1.3;
  display: block;
}
.c27-paper-card.c27-active .c27-paper-desc { color: rgba(255,255,255,0.65); }

/* ── Pied d'étape options (back + next côte à côte) ── */
.c27-footer-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ══════════════════════════════════════════════
   ADMIN RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 782px) {
  .c27-admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .c27-admin-table      { min-width: 540px; }
  .c27-price-matrix     { min-width: 400px; }
}

/* ══════════════════════════════════════════════
   BANNIÈRE PANIER MULTI-PHOTO
══════════════════════════════════════════════ */
.c27-cart-banner {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
  background: #f0faf0;
  border: 1.5px solid #2d9e2d;
  border-radius: 8px;
  margin-bottom: 20px;
}

.c27-cart-banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #1a6e1a;
}

.c27-cart-banner-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #2d9e2d;
  color: #fff;
  border-radius: 50%;
  font-size: 1rem;
  flex-shrink: 0;
}

#c27-cart-banner-count {
  font-weight: 400;
  color: #555;
  font-size: 0.88rem;
}

.c27-cart-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.c27-btn-cart {
  background: #1a1a1a !important;
  color: #fff !important;
  border-color: #1a1a1a !important;
  padding: 8px 18px !important;
  border-radius: 6px !important;
}

.c27-btn-continue {
  background: transparent !important;
  color: #1a6e1a !important;
  border: 1.5px solid #2d9e2d !important;
  padding: 8px 18px !important;
  border-radius: 6px !important;
  cursor: pointer;
}

.c27-btn-continue:hover {
  background: #e8f5e8 !important;
}
