/* LBAC Configurator — v3 */

.lbac-wrap {
    margin: 20px 0 24px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e8eaf0;
    background: #fff;
    font-family: inherit;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

/* ── Stage ballon ─────────────────────────────────────────────────────────── */
.lbac-stage {
    position: relative;
    background: #f2f3f5;
    overflow: hidden;
    aspect-ratio: 1;
}

#lbac-canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dégradé bas pour lisibilité du champ texte */
.lbac-stage-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.72) 0%,
        rgba(0,0,0,0.25) 35%,
        transparent 60%
    );
    pointer-events: none;
}

/* Badge gravure */
.lbac-stage-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0,0,0,0.38);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.75);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
}

/* Champ texte superposé sur le ballon */
.lbac-on-stage {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px 20px;
}
.lbac-on-stage-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin-bottom: 8px;
}
.lbac-on-stage-field {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    outline: none;
    font-family: inherit;
    letter-spacing: 0.03em;
    padding-bottom: 7px;
    transition: border-color 0.2s;
}
.lbac-on-stage-field:focus {
    border-bottom-color: rgba(255,255,255,0.7);
}
.lbac-on-stage-field::placeholder {
    color: rgba(255,255,255,0.22);
    font-weight: 400;
    font-style: italic;
    font-size: 20px;
}
.lbac-on-stage-hint {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    margin-top: 6px;
    font-style: italic;
}

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.lbac-tabs {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
}
.lbac-tab {
    flex: 1;
    padding: 13px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #bbb;
    text-align: center;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2.5px solid transparent;
    font-family: inherit;
    transition: all 0.12s;
}
.lbac-tab:hover { color: #555; }
.lbac-tab.is-active { color: #111; border-bottom-color: #111; }

/* ── Panel texte : polices ────────────────────────────────────────────────── */
.lbac-fonts-wrap {
    padding: 14px 18px;
    border-bottom: 1px solid #f5f5f5;
}
.lbac-fonts-lbl {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ccc;
    margin-bottom: 10px;
}
.lbac-fonts-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.lbac-font {
    padding: 7px 16px;
    font-size: 14px;
    border: 1.5px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    color: #999;
    background: #fff;
    font-family: inherit;
    transition: all 0.12s;
}
.lbac-font:hover { border-color: #aaa; color: #555; }
.lbac-font.is-active { border-color: #111; color: #111; font-weight: 700; }

/* ── Panel logo ───────────────────────────────────────────────────────────── */
.lbac-logo-zone { padding: 16px 18px; border-bottom: 1px solid #f5f5f5; }

.lbac-logo-note {
    font-size: 12px;
    color: #888;
    background: #f8f8f8;
    border-left: 3px solid #ddd;
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 12px;
    line-height: 1.5;
}

.lbac-drop {
    border: 1.5px dashed #ddd;
    border-radius: 10px;
    background: #fafafa;
    transition: all 0.15s;
    display: flex;
    cursor: pointer;
}
.lbac-drop:hover, .lbac-drop.over { border-color: #2a53f0; background: #f0f3ff; }
.lbac-drop-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    cursor: pointer;
    width: 100%;
}
.lbac-drop-icon { font-size: 24px; flex-shrink: 0; }
.lbac-drop-text { display: flex; flex-direction: column; gap: 3px; }
.lbac-drop-text strong { font-size: 14px; color: #2a53f0; font-weight: 700; }
.lbac-drop-text small { font-size: 12px; color: #bbb; }

.lbac-spin {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    font-size: 14px;
    color: #888;
}
.lbac-spinner {
    width: 20px; height: 20px;
    border: 2.5px solid #eee;
    border-top-color: #2a53f0;
    border-radius: 50%;
    animation: lbac-spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes lbac-spin { to { transform: rotate(360deg); } }

/* ── Slider ───────────────────────────────────────────────────────────────── */
.lbac-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-top: 1px solid #f5f5f5;
    background: #fafafa;
}
.lbac-ctrl-lbl {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ccc;
    white-space: nowrap;
    width: 40px;
}
.lbac-ctrl-val {
    font-size: 11px;
    font-weight: 800;
    color: #111;
    min-width: 30px;
    text-align: right;
}

#lbac-s {
    flex: 1;
    -webkit-appearance: none;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(to right, #111 70%, #e0e0e0 70%);
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0; margin: 0;
}
#lbac-s::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #111;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    cursor: pointer;
}
#lbac-s::-moz-range-thumb {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #111;
    cursor: pointer;
}

.lbac-reset-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #ccc;
    padding: 0 4px;
    transition: color 0.12s;
    font-family: inherit;
}
.lbac-reset-btn:hover { color: #e74c3c; }

/* ── Polices locales — chargement garanti ─────────────────────────────────── */
@font-face {
    font-family: 'Playfair Display';
    src: url('../fonts/PlayfairDisplay-Medium.ttf') format('truetype');
    font-weight: 400 700;
    font-display: block;
}
@font-face {
    font-family: 'Bonapite';
    src: url('../fonts/BonapiteRegular.woff') format('woff');
    font-weight: 400;
    font-display: block;
}
@font-face {
    font-family: 'Westbum';
    src: url('../fonts/Westbum-eZLl3.ttf') format('truetype');
    font-weight: 400;
    font-display: block;
}
@font-face {
    font-family: 'Open Sans Condensed';
    src: url('../fonts/OpenSans_Condensed-Medium.ttf') format('truetype');
    font-weight: 500;
    font-display: block;
}

/* Textarea sur le ballon — auto-resize, même look que l'input */
.lbac-on-stage-field {
    resize: none;
    overflow: hidden;
    min-height: 40px;
    line-height: 1.25;
}

/* ── Responsive mobile ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .lbac-wrap {
        margin-left: -16px;
        margin-right: -16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .lbac-stage {
        aspect-ratio: 1;
    }

    .lbac-on-stage-field {
        font-size: 22px;
    }

    .lbac-fonts-row {
        gap: 6px;
    }

    .lbac-font {
        padding: 6px 12px;
        font-size: 13px;
    }
}
