/* =====================================================================
   Configurateur V2 — single-page label editor + mockup wrapped preview
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cookie&family=EB+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Great+Vibes&family=Lobster&family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Pacifico&family=Parisienne&family=Play:wght@400;700&family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

/* ============ APERÇU EMBALLÉ (V2) ============ */
.cfg2-mockup-block {
    margin-top: 1.5rem;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(201,168,76,.10), transparent 60%),
        linear-gradient(180deg, rgba(18,11,7,.92), rgba(10,7,5,.95));
    border: 1px solid rgba(201,168,76,.22);
    border-radius: 22px;
    padding: 1.5rem;
    box-shadow: 0 30px 60px -25px rgba(0,0,0,.5);
}
.cfg2-mockup-block .cfg2-preview-head { margin-bottom: 1rem; }
.cfg2-mockup-grid {
    /* Les canvases sont dimensionnés en pixels par JS pour matcher l'échelle
       du label en haut. On les centre simplement dans la rangée. */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 3rem;
    background:
        repeating-linear-gradient(45deg, rgba(255,255,255,.015) 0 20px, transparent 20px 41px),
        #0a0705;
    border-radius: 14px;
    padding: 1.4rem .8rem;
}
.cfg2-mockup-pane {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cfg2-mockup-label {
    text-align: center;
    color: var(--cream-300);
    font-size: .68rem;
    letter-spacing: .22em;
    font-weight: 500;
    margin-bottom: .55rem;
}
.cfg2-mockup-canvas {
    display: block;
    background: transparent;
    /* width/height sont fixés en pixels par JS (échelle calée sur le label) */
}
@media (max-width: 720px) {
    .cfg2-mockup-grid { flex-direction: column; align-items: center; gap: 1rem; }
}

/* ============ SHELL ============ */
.cfg2 {
    padding: calc(var(--header-h) + 3rem) 0 6rem;
    background:
        radial-gradient(ellipse at 50% -10%, rgba(201,168,76,.08), transparent 60%),
        linear-gradient(180deg, var(--ink-100) 0%, var(--ink-200) 100%);
    min-height: 100vh;
}
.cfg2 .container { max-width: 1440px; }

.cfg2-head { text-align: center; max-width: 1000px; margin: 0 auto 3rem; }
.cfg2-head h1 { font-size: clamp(2.8rem, 5.4vw, 5rem); line-height: 1.05; margin: .5rem 0 1rem; }
.cfg2-head .lead { color: var(--cream-200); font-size: clamp(1.1rem, 1.5vw, 1.35rem); line-height: 1.55; max-width: 600px; margin: 0 auto; }

/* ============ GRID ============ */
.cfg2-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
}

/* ============ PREVIEW (LEFT, STICKY) ============ */
.cfg2-preview { position: sticky; top: calc(var(--header-h) + 16px); align-self: start; min-width: 0; }
.cfg2-preview-inner {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(201,168,76,.12), transparent 60%),
        linear-gradient(180deg, rgba(18,11,7,.92), rgba(10,7,5,.95));
    border: 1px solid rgba(201,168,76,.22);
    border-radius: 22px;
    padding: 1.5rem;
    box-shadow: 0 40px 80px -30px rgba(0,0,0,.6);
}
.cfg2-preview-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.cfg2-preview-head .eyebrow { color: var(--gold-300); font-size: .7rem; letter-spacing: .2em; }

.cfg2-canvas-wrap {
    position: relative;
    background:
        repeating-linear-gradient(45deg, rgba(255,255,255,.015) 0 20px, transparent 20px 41px),
        #0a0705;
    border-radius: 14px;
    padding: 2rem 1.2rem;
    margin-bottom: 1.1rem;
    border: 1px solid rgba(255,255,255,.04);
}
.cfg2-canvas {
    position: relative;
    width: 100%;
    aspect-ratio: 94 / 35;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(0,0,0,.45), 0 24px 60px -22px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.05);
    overflow: hidden;
}
.cfg2-canvas svg { display: block; width: 100%; height: 100%; }

.cfg2-zones-legend {
    display: flex; gap: 1rem; justify-content: center; margin-top: .9rem;
    font-size: .7rem; color: var(--cream-300); letter-spacing: .04em; flex-wrap: wrap;
}
.cfg2-zones-legend i {
    display: inline-block; width: 11px; height: 11px; border-radius: 3px;
    margin-right: .35rem; vertical-align: -1px;
}
.dot-glue   { background: #fff; }
.dot-format { background: transparent; border: 1.5px dashed rgba(255,255,255,.55); }
.dot-front  { background: transparent; border: 1.5px dashed #FF5C9C; }
.dot-back   { background: transparent; border: 1.5px dashed #FFD600; }

/* ============ META DROPDOWNS ============ */
.cfg2-metadd {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
    margin-bottom: 1rem;
}
.cfg2-dd { position: relative; min-width: 0; }
.cfg2-dd-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: .12rem;
    column-gap: .5rem;
    align-items: center;
    padding: .6rem .75rem;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(201,168,76,.18);
    border-radius: 11px;
    color: var(--cream-100);
    font-family: var(--font-body);
    cursor: pointer;
    text-align: left;
    transition: all .2s;
    min-height: 60px;
}
.cfg2-dd-toggle:hover { border-color: rgba(201,168,76,.4); background: rgba(255,255,255,.055); }
.cfg2-dd.is-open .cfg2-dd-toggle {
    border-color: var(--gold-300);
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.cfg2-dd-k {
    grid-column: 1 / -1;
    font-size: .58rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold-300);
    font-weight: 600;
}
.cfg2-dd-v {
    grid-column: 1;
    display: flex;
    align-items: center;
    gap: .45rem;
    font-family: var(--font-serif);
    font-size: .88rem;
    color: var(--cream-50);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cfg2-dd-v > span:not(.alu-chip):not(.cfg2-bg-swatch-current) {
    overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.cfg2-dd-thumb {
    width: 24px; height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
}
.cfg2-dd-text-wrap {
    display: flex;
    flex-direction: column;
    gap: .05rem;
    min-width: 0;
    line-height: 1.15;
}
.cfg2-dd-text-wrap > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.cfg2-dd-price-inline {
    color: var(--gold-300);
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .03em;
}
.cfg2-dd-menu li .cfg2-dd-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cfg2-dd-menu li .cfg2-dd-menu-price {
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: .72rem;
    color: var(--gold-300);
    background: rgba(201,168,76,.12);
    padding: .15rem .5rem;
    border-radius: 6px;
    flex-shrink: 0;
    letter-spacing: .03em;
}
.cfg2-dd-chev {
    grid-column: 2; grid-row: 2;
    color: var(--gold-200);
    transition: transform .25s;
}
.cfg2-dd.is-open .cfg2-dd-chev { transform: rotate(180deg); }

.cfg2-dd-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: rgba(14,9,6,.98);
    border: 1px solid rgba(201,168,76,.35);
    border-radius: 12px;
    margin: 0;
    padding: .35rem;
    list-style: none;
    z-index: 40;
    box-shadow: 0 24px 60px -20px rgba(0,0,0,.8);
    backdrop-filter: blur(10px);
    display: none;
}
.cfg2-dd.is-open .cfg2-dd-menu { display: block; }
.cfg2-dd-menu li {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem .6rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: .88rem;
    color: var(--cream-100);
    transition: all .15s;
}
.cfg2-dd-menu li:hover { background: rgba(201,168,76,.1); }
.cfg2-dd-menu li.is-active { background: rgba(201,168,76,.15); color: var(--gold-100); }
.cfg2-dd-menu li img {
    width: 28px; height: 28px; object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
    flex-shrink: 0;
}
.cfg2-dd-menu li .alu-chip { flex-shrink: 0; }

.alu-chip {
    display: inline-block;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.15);
    flex-shrink: 0;
}
.alu-chip.gold   { background: linear-gradient(135deg,#f8e9b8,#c9a84c 60%,#8b6914); }
.alu-chip.silver { background: linear-gradient(135deg,#f5f5f5,#b9bcc0 60%,#6b6e72); }

.cfg2-bg-swatch-current {
    display: inline-block;
    width: 18px; height: 18px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,.25);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
    flex-shrink: 0;
}

/* Flavor prices block under PARFUM dropdown */
.cfg2-flavor-prices {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: .65rem .9rem;
    background: rgba(255,255,255,.025);
    border: 1px solid rgba(201,168,76,.15);
    border-radius: 10px;
    margin-bottom: .9rem;
}
.cfg2-flavor-prices .t {
    font-size: .58rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold-300);
    font-weight: 600;
    flex-shrink: 0;
    padding-top: .25rem;
    line-height: 1.2;
}
.cfg2-flavor-prices .rows { display: flex; flex-direction: column; gap: .25rem; flex: 1; min-width: 0; }
.cfg2-flavor-prices .rows > span {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    font-size: .85rem;
    color: var(--cream-200);
}
.cfg2-flavor-prices .rows .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg2-flavor-prices .rows strong {
    color: var(--gold-200);
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 1.1rem;
    line-height: 1;
    letter-spacing: -.005em;
    flex-shrink: 0;
}

.cfg2-toggle-guides {
    font-size: .8rem;
    color: var(--cream-300);
    text-align: center;
    padding-top: .9rem;
    border-top: 1px solid rgba(201,168,76,.1);
}
.cfg2-toggle-guides label { cursor: pointer; display: inline-flex; align-items: center; gap: .5rem; }
.cfg2-toggle-guides input { width: 14px; height: 14px; accent-color: var(--gold-400); }

/* ============ COLOR PICKER PANEL (inside dropdown) ============ */
.cfg2-dd-color .cfg2-dd-menu,
.cfg2-color-panel {
    /* override default menu width — anchor to right edge */
}
.cfg2-dd-color { position: relative; }
.cfg2-dd-color .cfg2-color-panel {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: auto;
    width: 300px;
    max-width: calc(100vw - 32px);
    background: rgba(14,9,6,.98);
    border: 1px solid rgba(201,168,76,.4);
    border-radius: 14px;
    padding: .85rem;
    z-index: 50;
    box-shadow: 0 24px 60px -20px rgba(0,0,0,.85);
    backdrop-filter: blur(10px);
    display: none;
}
.cfg2-dd-color.is-open .cfg2-color-panel { display: block; animation: cfg2-fade .18s ease-out; }

.cfg2-spectrum {
    display: grid;
    grid-template-columns: 1fr 16px;
    gap: 7px;
    height: 110px;
    margin-bottom: .65rem;
}
.cfg2-sv-pad {
    --hue: 0;
    position: relative;
    background:
        linear-gradient(to top, #000, transparent),
        linear-gradient(to right, #fff, hsl(var(--hue), 100%, 50%));
    border-radius: 8px;
    cursor: crosshair;
    border: 1px solid rgba(255,255,255,.1);
    user-select: none;
    touch-action: none;
}
.cfg2-sv-cursor {
    position: absolute;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.35);
    pointer-events: none;
    transform: translate(-50%, -50%);
    top: 0; left: 100%;
}
.cfg2-hue-bar {
    position: relative;
    background: linear-gradient(to bottom,
        hsl(0, 100%, 50%) 0%,
        hsl(60, 100%, 50%) 17%,
        hsl(120, 100%, 50%) 33%,
        hsl(180, 100%, 50%) 50%,
        hsl(240, 100%, 50%) 67%,
        hsl(300, 100%, 50%) 83%,
        hsl(360, 100%, 50%) 100%);
    border-radius: 6px;
    cursor: crosshair;
    border: 1px solid rgba(255,255,255,.1);
    user-select: none;
    touch-action: none;
}
.cfg2-hue-cursor {
    position: absolute;
    left: -3px; right: -3px;
    height: 6px;
    border: 2px solid #fff;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 2px 5px rgba(0,0,0,.4);
    transform: translateY(-50%);
    pointer-events: none;
    top: 0;
}

/* V4 — Bouton "Reprendre la couleur du logo" */
.cfg2-extract-color {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .55rem .8rem;
    margin: .2rem 0 .65rem;
    background: linear-gradient(180deg, rgba(201,168,76,.18), rgba(201,168,76,.06));
    border: 1px solid var(--gold-400);
    border-radius: 7px;
    color: var(--gold-200);
    font-size: .82rem;
    font-weight: 500;
    letter-spacing: .02em;
    cursor: pointer;
    transition: all .2s;
}
.cfg2-extract-color:hover:not(:disabled) {
    background: linear-gradient(180deg, rgba(201,168,76,.28), rgba(201,168,76,.12));
    color: var(--cream-50);
    transform: translateY(-1px);
}
.cfg2-extract-color:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.cfg2-extract-color.is-loading {
    opacity: .6;
    cursor: progress;
}
.cfg2-extract-color svg { flex-shrink: 0; }

.cfg2-color-presets {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: .3rem;
    margin-bottom: .65rem;
}
.cfg2-color-presets button {
    aspect-ratio: 1;
    border-radius: 7px;
    border: 1.5px solid rgba(255,255,255,.18);
    cursor: pointer;
    transition: all .18s;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,.25);
}
.cfg2-color-presets button:hover {
    transform: translateY(-2px);
    border-color: var(--gold-300);
    box-shadow: 0 6px 12px rgba(0,0,0,.3);
}

.cfg2-color-fields { display: flex; flex-direction: column; gap: .55rem; }
.cfg2-color-row {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: .6rem;
    align-items: center;
}
.cfg2-color-row label {
    font-size: .65rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold-300);
    font-weight: 600;
}
.cfg2-color-row input[type=text] {
    padding: .55rem .7rem;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(201,168,76,.25);
    border-radius: 8px;
    color: var(--cream-50);
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: .9rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    width: 100%;
}
.cfg2-color-row input[type=text]:focus {
    outline: none; border-color: var(--gold-300);
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.cfg2-cmyk-mini {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .3rem;
}
.cfg2-cmyk-mini input {
    padding: .5rem .35rem;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(201,168,76,.2);
    border-radius: 7px;
    color: var(--cream-50);
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: .85rem;
    text-align: center;
    width: 100%;
    -moz-appearance: textfield;
}
.cfg2-cmyk-mini input::-webkit-outer-spin-button,
.cfg2-cmyk-mini input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cfg2-cmyk-mini input:focus { outline: none; border-color: var(--gold-300); }

/* ============ FORM (RIGHT) ============ */
.cfg2-form { min-width: 0; }

.cfg2-sect {
    margin-bottom: 1.6rem;
    padding: 1.3rem 1.3rem;
    background: rgba(255,255,255,.015);
    border: 1px solid rgba(201,168,76,.1);
    border-radius: 16px;
}
.cfg2-sect-feature {
    padding: 1.8rem 1.6rem;
    border-color: rgba(201,168,76,.22);
    background:
        linear-gradient(180deg, rgba(201,168,76,.04), rgba(201,168,76,.015) 40%, rgba(255,255,255,.01)),
        rgba(255,255,255,.01);
    box-shadow: 0 2px 10px rgba(0,0,0,.15), 0 0 0 1px rgba(201,168,76,.04) inset;
}
.cfg2-sect-bat { padding: .25rem 0; background: none; border: none; }
.cfg2-sect:last-of-type { margin-bottom: 0; }

.cfg2-sect-head {
    display: flex; gap: 1.4rem; align-items: center;
    margin-bottom: 1.3rem;
}
.cfg2-sect-head .num {
    flex-shrink: 0;
    position: relative;
    width: 50px; height: 50px;
    border-radius: 50%;
    background: rgba(18,11,7,.65);
    color: var(--gold-200);
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1;
    display: grid; place-items: center;
    box-shadow: 0 0 0 4px rgba(201,168,76,.06), 0 10px 28px -12px rgba(201,168,76,.45);
}
/* Anneau doré (gradient métallique) via mask */
.cfg2-sect-head .num::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 1.8px;
    background: linear-gradient(135deg,
        var(--gold-100) 0%,
        var(--gold-300) 22%,
        var(--gold-500) 50%,
        var(--gold-300) 78%,
        var(--gold-100) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}
/* Petits points décoratifs flanquant le médaillon */
.cfg2-sect-head .num::after {
    content: "";
    position: absolute;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--gold-300);
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 6px rgba(201,168,76,.6);
}
.cfg2-sect-head h2 { font-family: var(--font-serif); margin: 0 0 .2rem; line-height: 1.15; font-size: 1.55rem; }
.cfg2-sect-head p { color: var(--cream-300); font-size: .9rem; line-height: 1.5; margin: 0; }

/* ============ FIELDS ============ */
.cfg2-field { margin-bottom: 1.2rem; }
.cfg2-field:last-child { margin-bottom: 0; }
.cfg2-label {
    display: block;
    font-size: .7rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold-300);
    margin-bottom: .75rem;
    font-weight: 600;
}
.cfg2-label-inline {
    display: block;
    font-size: .82rem;
    color: var(--cream-200);
    margin-bottom: .4rem;
    font-weight: 500;
}
.cfg2-label-inline strong { color: var(--gold-200); font-family: var(--font-mono, ui-monospace, monospace); font-weight: 600; }
.cfg2-input {
    width: 100%;
    padding: .85rem 1rem;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(201,168,76,.18);
    border-radius: 10px;
    color: var(--cream-100);
    font-family: var(--font-body);
    font-size: .95rem;
    transition: all .2s;
}
.cfg2-input + .cfg2-input { margin-top: .5rem; }
.cfg2-input:focus {
    outline: none;
    border-color: var(--gold-300);
    background: rgba(255,255,255,.05);
    box-shadow: 0 0 0 4px rgba(201,168,76,.1);
}
.cfg2-input::placeholder { color: rgba(230,220,200,.35); }

.cfg2-hint-inline { font-size: .82rem; color: var(--cream-300); margin: .65rem 0 0; }
.cfg2-hint-inline strong {
    color: var(--gold-200);
    font-family: var(--font-mono, ui-monospace, monospace);
    letter-spacing: .04em; font-weight: 500; word-break: break-all;
}

/* ============ PILL GROUPS ============ */
.cfg2-pill-group {
    position: relative;
    display: flex;
    gap: .4rem;
    background: rgba(255,255,255,.04);
    padding: .3rem;
    border-radius: 12px;
    border: 1px solid rgba(201,168,76,.12);
    margin-bottom: 1.3rem;
}
.cfg2-pill-group input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.cfg2-pill-group label {
    flex: 1;
    padding: .75rem 1rem;
    text-align: center;
    font-family: var(--font-body);
    font-size: .9rem;
    color: var(--cream-300);
    cursor: pointer;
    border-radius: 8px;
    transition: all .2s;
    font-weight: 500;
    letter-spacing: .04em;
}
.cfg2-pill-group label:hover { color: var(--cream-100); }
.cfg2-pill-group input:checked + label {
    background: var(--gradient-gold-metal);
    color: var(--ink-100);
    font-weight: 600;
    box-shadow: 0 6px 16px -6px rgba(201,168,76,.45);
}

/* ============ SUBPANEL ============ */
.cfg2-subpanel { padding-top: .3rem; animation: cfg2-fade .3s cubic-bezier(.4,0,.2,1); }
@keyframes cfg2-fade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============ DROPZONE ============ */
.cfg2-dropzone {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.2rem;
    background: rgba(255,255,255,.02);
    border: 1.5px dashed rgba(201,168,76,.35);
    border-radius: 14px;
    cursor: pointer;
    transition: all .25s;
    color: var(--cream-200);
    margin-bottom: 1rem;
}
.cfg2-dropzone:hover { background: rgba(201,168,76,.06); border-color: var(--gold-300); }
.cfg2-dropzone svg { color: var(--gold-300); flex-shrink: 0; }
.cfg2-dropzone strong { font-family: var(--font-serif); font-size: 1rem; color: var(--cream-50); font-weight: 600; }
.cfg2-dropzone small { font-size: .78rem; color: var(--cream-300); }
.cfg2-dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ============ RANGE ============ */
input[type=range] {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 4px;
    background: rgba(201,168,76,.15);
    border-radius: 2px;
    margin-top: .3rem;
    outline: none;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--gradient-gold-metal);
    border: 2px solid var(--ink-200);
    cursor: pointer;
    box-shadow: 0 4px 12px -2px rgba(201,168,76,.5);
}
input[type=range]::-moz-range-thumb {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--gold-300);
    border: 2px solid var(--ink-200);
    cursor: pointer;
}

/* ============ FONT GRID ============ */
.cfg2-font-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; }
.cfg2-font-card {
    background: rgba(255,255,255,.03);
    border: 1.5px solid rgba(201,168,76,.15);
    border-radius: 9px;
    padding: .55rem .4rem;
    cursor: pointer;
    transition: all .2s;
    display: flex; flex-direction: column; align-items: center; gap: .15rem;
    min-height: 54px;
    color: var(--cream-50);
}
.cfg2-font-card:hover { border-color: rgba(201,168,76,.45); background: rgba(255,255,255,.055); transform: translateY(-1px); }
.cfg2-font-card.is-active { border-color: var(--gold-300); background: rgba(201,168,76,.1); box-shadow: 0 0 0 3px rgba(201,168,76,.15); }
.fc-sample { font-size: 1.18rem; color: inherit; line-height: 1.05; }
.fc-name {
    font-family: var(--font-body);
    font-size: .58rem; letter-spacing: .08em; text-transform: uppercase;
    color: var(--cream-300); font-weight: 500;
}
.cfg2-font-card.is-active .fc-name { color: var(--gold-200); }

/* ============ QR GRID ============ */
.cfg2-qr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.cfg2-qr-opt {
    background: rgba(255,255,255,.03);
    border: 1.5px solid rgba(201,168,76,.15);
    border-radius: 12px;
    padding: .85rem .4rem;
    cursor: pointer;
    transition: all .2s;
    display: flex; flex-direction: column; align-items: center; gap: .4rem;
    color: var(--cream-200);
}
.cfg2-qr-opt:hover { border-color: rgba(201,168,76,.4); background: rgba(255,255,255,.05); transform: translateY(-2px); }
.cfg2-qr-opt.is-active { border-color: var(--gold-300); background: rgba(201,168,76,.1); color: var(--gold-100); box-shadow: 0 0 0 3px rgba(201,168,76,.15); }
.qo-ico { display: grid; place-items: center; width: 24px; height: 24px; }
.qo-ico svg { display: block; }
.qo-lbl { font-size: .72rem; text-align: center; line-height: 1.25; }

/* ============ OFFER CHOICE CARDS ============ */
.cfg2-choice-grid { display: grid; gap: .8rem; }
.cfg2-choice-grid.two { grid-template-columns: 1fr 1fr; }
.cfg2-choice { position: relative; display: block; cursor: pointer; }
.cfg2-choice input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.cfg2-choice-inner {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: 1.1rem 1.1rem;
    background: rgba(255,255,255,.03);
    border: 1.5px solid rgba(201,168,76,.18);
    border-radius: 14px;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    text-align: center;
    height: 100%;
}
.cfg2-choice:hover .cfg2-choice-inner {
    border-color: rgba(201,168,76,.4);
    background: rgba(255,255,255,.05);
    transform: translateY(-2px);
}
.cfg2-choice input:checked + .cfg2-choice-inner {
    border-color: var(--gold-300);
    background: rgba(201,168,76,.1);
    box-shadow: 0 0 0 3px rgba(201,168,76,.14), 0 12px 30px -12px rgba(201,168,76,.4);
}
.cfg2-choice .t-eyebrow {
    font-size: .58rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--gold-300);
    font-weight: 600;
    margin-bottom: .2rem;
}
.cfg2-choice .t-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--cream-50);
    font-weight: 600;
    line-height: 1.15;
}
.cfg2-choice .t-sub {
    font-size: .85rem;
    color: var(--cream-200);
    line-height: 1.4;
}
.cfg2-choice .t-sub strong {
    color: var(--gold-200);
    font-weight: 700;
    font-family: var(--font-serif);
}

/* Offer price — match the "39 €" style from /offre-decouverte */
.cfg2-choice-offer .t-price {
    font-family: var(--font-serif);
    font-size: 2.4rem;
    font-weight: 400;
    color: var(--gold-200);
    line-height: 1;
    margin: .55rem 0 .3rem;
    letter-spacing: -.005em;
}
.cfg2-choice-offer .t-price .cur {
    font-size: 1em;
    font-weight: 400;
    margin-left: .12em;
}
/* Dual-price (0,15 € ou 0,17 €) — same styling as the 39 €, just sized to fit */
.cfg2-choice-offer .t-price-dual {
    font-size: clamp(1.4rem, 3.4vw, 1.95rem);
    white-space: nowrap;
}
.cfg2-choice-offer .t-price-dual .sep {
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-style: italic;
    font-size: .58em;
    color: var(--cream-300);
    font-weight: 500;
    margin: 0 .2em;
    vertical-align: .12em;
}

.cfg2-select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23C9A84C' stroke-width='2' stroke-linecap='round'><path d='M2 4l4 4 4-4'/></svg>");
    background-repeat: no-repeat;
    background-position: right .9rem center;
    background-size: 11px;
    padding-right: 2.2rem;
    cursor: pointer;
    width: auto;
    max-width: 320px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
#lotsField { text-align: center; }
#lotsField .cfg2-label { text-align: center; }
.cfg2-select option {
    background: #1a100a;
    color: var(--cream-100);
    padding: .4rem;
    font-family: var(--font-body);
}

/* ============ ADDRESS POSITION PAD ============ */
.cfg2-addr-position { position: relative; }
.cfg2-addr-pad {
    display: grid;
    grid-template-columns: repeat(3, 38px);
    grid-template-rows: repeat(3, 38px);
    gap: 4px;
    width: max-content;
    margin-top: .15rem;
}
.cfg2-addr-pad button {
    background: rgba(255,255,255,.04);
    border: 1.5px solid rgba(201,168,76,.2);
    border-radius: 9px;
    color: var(--cream-100);
    cursor: pointer;
    transition: all .15s;
    padding: 0;
    display: grid;
    place-items: center;
}
.cfg2-addr-pad button:hover {
    border-color: var(--gold-300);
    color: var(--gold-200);
    background: rgba(201,168,76,.1);
    transform: translateY(-1px);
}
.cfg2-addr-pad button:active { transform: translateY(0); background: rgba(201,168,76,.18); }
.cfg2-addr-pad .pad-up    { grid-column: 2; grid-row: 1; }
.cfg2-addr-pad .pad-left  { grid-column: 1; grid-row: 2; }
.cfg2-addr-pad .pad-reset { grid-column: 2; grid-row: 2; color: var(--gold-300); }
.cfg2-addr-pad .pad-right { grid-column: 3; grid-row: 2; }
.cfg2-addr-pad .pad-down  { grid-column: 2; grid-row: 3; }
.cfg2-addr-hint { font-size: .78rem; }

/* Canvas drag cursor while moving address */
.cfg2-canvas.is-addr-draggable { cursor: grab; }
.cfg2-canvas.is-dragging { cursor: grabbing; }

/* ============ CHR BANNER + LINK LIST (V3) ============ */
.cfg2-chr-banner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, rgba(201,168,76,.08), rgba(201,168,76,.02));
    border: 1px solid rgba(201,168,76,.3);
    border-radius: 14px;
    margin-bottom: 1.3rem;
}
.cfg2-chr-banner .chr-icon {
    flex-shrink: 0;
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: rgba(201,168,76,.15);
    color: var(--gold-300);
}
.cfg2-chr-banner .chr-banner-text { flex: 1; min-width: 0; }
.cfg2-chr-banner strong {
    display: block;
    font-family: var(--font-serif);
    color: var(--gold-200);
    font-size: 1rem;
    margin-bottom: .15rem;
}
.cfg2-chr-banner code {
    display: inline-block;
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: .85rem;
    color: var(--cream-50);
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(201,168,76,.2);
    border-radius: 6px;
    padding: .15rem .5rem;
    margin: .15rem 0 .35rem;
    letter-spacing: .02em;
    word-break: break-all;
}
.cfg2-chr-banner code span { color: var(--gold-200); font-weight: 600; }
.cfg2-chr-banner p {
    margin: 0;
    font-size: .82rem;
    color: var(--cream-300);
    line-height: 1.5;
}

.cfg2-link-list {
    display: flex; flex-direction: column;
    gap: .5rem;
}
.cfg2-link-row {
    display: grid;
    grid-template-columns: 28px 128px 1fr;
    gap: .65rem;
    align-items: center;
}
.cfg2-link-row .cfg2-link-icon {
    width: 28px; height: 28px;
    display: grid; place-items: center;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(201,168,76,.15);
    border-radius: 8px;
}
.cfg2-link-row .cfg2-link-label {
    font-size: .82rem;
    color: var(--cream-200);
    font-weight: 500;
}
.cfg2-link-row .cfg2-link-input {
    padding: .65rem .85rem;
    font-size: .88rem;
    margin-top: 0 !important;
}
.cfg2-link-row .cfg2-link-input:not(:placeholder-shown):valid {
    border-color: rgba(201,168,76,.45);
    background: rgba(201,168,76,.05);
}
.cfg2-hint-inline code {
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: .78em;
    background: rgba(255,255,255,.05);
    padding: .1em .35em;
    border-radius: 4px;
    color: var(--gold-200);
}
@media (max-width: 720px) {
    .cfg2-link-row { grid-template-columns: 28px 1fr; row-gap: .35rem; }
    .cfg2-link-row .cfg2-link-input { grid-column: 1 / -1; }
}

/* ============ GENERATE QR BUTTON ============ */
.cfg2-qr-action {
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px dashed rgba(201,168,76,.2);
}
.cfg2-btn-generate-qr {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    width: 100%;
    padding: 1rem 1.4rem;
    background: var(--gradient-gold-metal);
    color: var(--ink-100);
    font-family: var(--font-body);
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 14px 34px -12px rgba(201,168,76,.55);
    transition: all .25s cubic-bezier(.4,0,.2,1);
}
.cfg2-btn-generate-qr:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px -12px rgba(201,168,76,.7);
}
.cfg2-btn-generate-qr:active { transform: translateY(0); }
.cfg2-btn-generate-qr.is-success {
    background: linear-gradient(135deg, #ecd48b 0%, #4a8c3f 50%, #2e7028 100%);
    color: #fff;
}
.cfg2-btn-generate-qr.is-empty {
    background: rgba(201,168,76,.12);
    color: var(--cream-300);
    box-shadow: none;
    cursor: not-allowed;
}
.cfg2-btn-generate-qr.is-empty:hover { transform: none; box-shadow: none; }
.cfg2-btn-generate-qr svg { flex-shrink: 0; }

.cfg2-qr-status {
    margin: .8rem 0 0;
    text-align: center;
    font-size: .82rem;
    line-height: 1.5;
    color: var(--cream-300);
}
.cfg2-qr-status[data-state="ok"] { color: var(--gold-200); }
.cfg2-qr-status[data-state="ok"]::before {
    content: "✓ ";
    color: #6fbf5e;
    font-weight: 700;
}
.cfg2-qr-status[data-state="warn"] { color: #ff9a6b; }
.cfg2-qr-status code {
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: .78em;
    background: rgba(255,255,255,.05);
    padding: .1em .35em;
    border-radius: 4px;
    color: var(--gold-200);
    word-break: break-all;
}

/* ============ BAT ============ */
.cfg2-check-bat {
    display: flex; gap: .85rem; align-items: flex-start;
    padding: 1rem 1.2rem;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(201,168,76,.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s;
}
.cfg2-check-bat:hover { border-color: rgba(201,168,76,.4); background: rgba(255,255,255,.045); }
.cfg2-check-bat input[type=checkbox] {
    flex-shrink: 0;
    width: 20px; height: 20px;
    appearance: none; -webkit-appearance: none;
    background: rgba(255,255,255,.05);
    border: 1.5px solid var(--gold-400);
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    margin-top: 2px;
    transition: all .2s;
}
.cfg2-check-bat input[type=checkbox]:checked { background: var(--gradient-gold-metal); border-color: var(--gold-200); }
.cfg2-check-bat input[type=checkbox]:checked::after {
    content: ""; position: absolute; left: 5px; top: 1px;
    width: 6px; height: 11px;
    border: solid var(--ink-100); border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}
.cfg2-check-bat span { font-size: .9rem; line-height: 1.55; color: var(--cream-200); }
.cfg2-check-bat span strong { color: var(--gold-200); }

/* ============ FINAL CARD ============ */
.cfg2-final { margin-top: .4rem; }
.cfg2-final-card {
    background: rgba(18,11,7,.6);
    border: 1px solid rgba(201,168,76,.45);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px -20px rgba(0,0,0,.5);
}
.cfg2-final-check {
    background: rgba(18,11,7,.8);
    border: 1px solid rgba(201,168,76,.3);
    border-radius: 12px;
    padding: 1.05rem 1.25rem;
    margin-bottom: .7rem;
    transition: all .2s;
}
.cfg2-final-check:has(input:checked) {
    border-color: var(--gold-300);
    background: rgba(201,168,76,.08);
    box-shadow: 0 0 0 1px rgba(201,168,76,.25);
}
.cfg2-final-check + .cfg2-final-check { margin-top: 0; }
.cfg2-final-check:last-of-type { margin-bottom: 1.2rem; }
.cfg2-final-check label { display: flex; gap: .85rem; align-items: flex-start; cursor: pointer; }
.cfg2-final-check input[type=checkbox] {
    flex-shrink: 0; width: 22px; height: 22px;
    appearance: none; -webkit-appearance: none;
    background: rgba(255,255,255,.05);
    border: 1.5px solid rgba(255,255,255,.45);
    border-radius: 5px;
    cursor: pointer; position: relative; margin-top: 1px; transition: all .2s;
}
.cfg2-final-check input[type=checkbox]:checked { background: var(--gradient-gold-metal); border-color: var(--gold-200); }
.cfg2-final-check input[type=checkbox]:checked::after {
    content: ""; position: absolute; left: 6px; top: 1px;
    width: 7px; height: 12px;
    border: solid var(--ink-100); border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}
.cfg2-final-check span { font-size: .92rem; line-height: 1.55; color: var(--cream-100); }
.cfg2-final-check span strong { color: var(--gold-200); font-weight: 600; }

.cfg2-final-submit {
    display: block; width: 100%;
    padding: 1.2rem 1.5rem;
    background: var(--gradient-gold-metal);
    color: var(--ink-100);
    font-family: var(--font-body);
    font-size: .95rem; font-weight: 700;
    letter-spacing: .28em; text-transform: uppercase;
    border: none; border-radius: 12px;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 14px 40px -12px rgba(201,168,76,.55);
    margin-bottom: 1.1rem;
}
.cfg2-final-submit:hover { transform: translateY(-2px); box-shadow: 0 18px 48px -12px rgba(201,168,76,.7); }
.cfg2-final-submit:active { transform: translateY(0); }
.cfg2-final-help {
    display: block; text-align: center;
    font-size: .9rem; color: var(--cream-300);
    text-decoration: none; transition: color .2s;
    padding: .5rem;
}
.cfg2-final-help:hover { color: var(--gold-200); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
    .cfg2-grid { grid-template-columns: 1fr; gap: 2rem; }
    .cfg2-preview { position: relative; top: 0; order: -1; }
    .cfg2-dd-color .cfg2-color-panel { right: auto; left: 0; }
}
@media (max-width: 720px) {
    .cfg2 { padding: calc(var(--header-h) + 1.5rem) 0 4rem; }
    .cfg2-metadd { grid-template-columns: 1fr; }
    .cfg2-font-grid { grid-template-columns: repeat(4, 1fr); gap: .35rem; }
    .cfg2-font-card { padding: .45rem .25rem; min-height: 48px; }
    .fc-sample { font-size: 1rem; }
    .fc-name { font-size: .5rem; }
    .cfg2-choice-grid.two { grid-template-columns: 1fr; }
    .cfg2-qr-grid { grid-template-columns: repeat(2, 1fr); }
    .cfg2-color-presets { grid-template-columns: repeat(8, 1fr); }
    .cfg2-sect-head h2 { font-size: 1.25rem; }
    .cfg2-sect-head .num { width: 38px; height: 38px; font-size: 1.1rem; border-radius: 12px; }
    .cfg2-sect-feature { padding: 1.3rem 1.1rem; }
    .cfg2-dd-color .cfg2-color-panel { width: calc(100vw - 32px); right: auto; left: 0; }
}
