:root {
    --blue: #3f51b5;
    --blue-hover: #5c6bc0;
    --text: #1a1d2e;
    --muted: #6b7280;
    --dim: #a0a8c0;
    --border: rgba(63, 81, 181, 0.13);
    --bg2: #f0f2ff;
    --bg3: #eef0f8;
    --dark-surface: #10172b;
    --dark-surface-elevated: #18213a;
    --dark-surface-soft: #243055;
    --dark-border: rgba(118, 141, 255, 0.24);
    --dark-border-soft: rgba(214, 223, 255, 0.08);
    --dark-hover: rgba(214, 223, 255, 0.1);
    --dark-text: rgba(245, 247, 255, 0.92);
    --dark-muted: rgba(193, 203, 232, 0.76);
    --dark-wave: rgba(166, 183, 255, 0.42);
    --card-border: var(--dark-border);
    --accent: #6b7dff;
    --id-color: #9fb1ff;
}

.demo-label {
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 10px;
    color: var(--muted);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    width: 100%;
    max-width: 600px !important;
    padding-left: 5px;
}

.demo-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 2s infinite;
}
.scene {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
    width: 100%;
    max-width: 600px;
}

/* Device frame */
.device {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    animation: fadeUp 0.7s 0.15s ease both;
}

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px;
    border-bottom: 1px solid var(--border);
    background: white;
}

.tool-btn {
    width: max-content;
    height: 32px;
    border-radius: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}

.tool-btn.mic-btn {
    width: max-content !important;
    height: 32px;
    border-radius: 10px;
    padding: 0 7px 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.5px !important;
    cursor: pointer;
    transition: background 0.15s;
    color: white;
    background: var(--blue);
    margin-left: auto;
}


.tool-btn.mic-btn:hover {
    background-color: var(--blue-hover);
}

.tool-btn:hover {
    background: var(--bg2);
}

.tool-btn svg {
    width: 20px;
    height: 20px;
}

.pg-lang-to {
    appearance: none; /* Disable the default arrow */
    -webkit-appearance: none; /* For WebKit-based browsers */
    -moz-appearance: none; /* For Firefox */
    background-color: var(--bg3);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    width: max-content !important;
    border: 1px solid var(--border);
    border-radius: 20px;
    height: 32px;
    padding: 4px 10px 4px 15px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    color: var(--muted);
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    outline: none;
}

.pg-lang-to:hover {
    background-color: var(--bg2);
    color: var(--text);
    border-color: var(--blue);
}

/* Transcript button */
.transcript-btn {
    background: var(--blue);
    border-radius: 10px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.transcript-btn svg {
    width: 18px;
    height: 18px;
}

/* Waveform */
.waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 20px;
    margin-left: 5px;
    background-color: #00000041;
    padding: 0 6px;
    border-radius: 6px;
}

.wave-bar {
    width: 3px;
    background: var(--blue);
    opacity: 0.4;
    height: 10px;
    border-radius: 2px;
    animation: wave var(--d, 0.9s) ease-in-out infinite alternate;
    animation-delay: var(--delay, 0s);
}

.wave-bar:nth-child(1) { --h: 6px; --d: 0.8s; --delay: 0s; }
.wave-bar:nth-child(2) { --h: 14px; --d: 0.7s; --delay: 0.1s; }
.wave-bar:nth-child(3) { --h: 10px; --d: 0.95s; --delay: 0.05s; }
.wave-bar:nth-child(4) { --h: 18px; --d: 0.65s; --delay: 0.15s; }
.wave-bar:nth-child(5) { --h: 8px; --d: 0.85s; --delay: 0.08s; }

.divider-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s;
}

.divider-btn:hover {
    background: var(--bg2);
}

.expand-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: -2px;
}

/* Text area */
.transcript-area {
    margin: 10px;
    border-radius: 10px;
    padding: 5px 12px;
    height: 200px !important;
    position: relative;
    background: var(--bg3);
}

.transcript-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--text);
    cursor: text;
    height: 100% !important;
    display: flex;
    flex-direction: column;
    align-self: flex-start;
    justify-content: flex-start;
}
#transcriptText > span {
    display: inline-block;
    text-align: center;
    align-self: center !important;
    margin: auto 0 !important;
}

.transcript-text .highlight {
    color: var(--blue);
    font-weight: 500;
}

/* Cursor */
.cursor {
    display: inline-block;
    width: 2px;
    height: 16px;
    background: var(--blue);
    border-radius: 1px;
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: blink 1.1s step-end infinite;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes wave {
    from { height: 4px; }
    to { height: var(--h, 12px); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Drag dots */
.drag-dots {
    display: grid;
    grid-template-columns: repeat(2, 4px);
    gap: 3px;
    padding: 2px;
}

.drag-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--border);
}



/* ════════════════════════════════════════════════
   Ajouts à coller dans ./design/playground.css
   ════════════════════════════════════════════════ */

/* ── Mode dropdown ─────────────────────────────── */
.pg-mode-wrap {
    position: relative;
    flex-shrink: 0;
}

.pg-mode-btn {
    display: flex;
    align-items: center;
    height: 32px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s;
    gap: 2px;
}

.pg-mode-btn:hover {
    background: var(--bg2);
    border-color: var(--blue);
}

.pg-mode-menu {
    display: none;
    position: absolute;
    top: 52.5px;
    left: 0;
    z-index: 200;
    min-width: 190px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 -4px 24px rgba(63,81,181,.12);
    padding: 6px;
    flex-direction: column;
    gap: 2px;
}

.pg-mode-menu.open { display: flex; }

.pg-mode-item {
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .12s;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pg-mode-item:hover   { background: var(--bg3); }
.pg-mode-item.selected { background: var(--bg2); }

.pg-mode-item-name {
    font-family: 'DM Sans', sans-serif;
    font-size: .88rem;
    font-weight: 600;
    color: var(--text);
}

.pg-mode-item.selected .pg-mode-item-name { color: var(--blue); }

.pg-mode-item-desc {
    font-size: .75rem;
    color: var(--muted);
    line-height: 1.3;
}

/* ── Caption toggle ─────────────────────────────── */
.pg-caption-toggle {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all .15s;
    width: 40px !important;
    height: 32px;
}

.pg-caption-toggle:hover,
.pg-caption-toggle.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}
/* ── Transcript items ────────────────────────────── */
.pg-transcript-item {
    display: block;
    margin-bottom: 4px;
    line-height: 1.7;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14.5px;
}

.pg-transcript-item.pending { color: var(--muted); }
.pg-transcript-item.final   { color: var(--text); }


.demo-caption {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    font-size: 0.9rem;
    color: #b0b5c9;
    margin-top: 8px;
    gap: 10px;
}
.demo-caption span:first-of-type {
    width: 20px !important;
    height: 20px !important;
}
.demo-caption span:first-of-type svg {
    width: 20px !important;
    height: 20px !important;
    stroke: #b0b5c9;
}
.demo-caption span:last-of-type {
    text-align: left;
}