/* ============================================
   Bug report - FAB + modal
   ============================================ */

/* FAB en bas-droite. z-index < tutorial overlay (qui doit pouvoir le couvrir). */
.bug-report-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(var(--gold-rgb), 0.5);
    background: linear-gradient(165deg, #2b2218 0%, #1c1610 100%);
    color: var(--gold-text-warm);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 1500;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(var(--gold-rgb), 0.15);
    transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.bug-report-fab:hover {
    border-color: rgba(var(--gold-rgb), 0.85);
    transform: translateY(-2px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.55),
        0 0 14px rgba(var(--gold-rgb), 0.25),
        inset 0 1px 0 rgba(var(--gold-rgb), 0.25);
}
.bug-report-fab-icon { display: inline-block; }

/* Overlay : sombre semi-transparent. is-open = visible. */
.bug-report-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1600;
    padding: 20px;
}
.bug-report-overlay.is-open { display: flex; }

.bug-report-modal {
    width: min(640px, 100%);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: linear-gradient(165deg, #1c1815 0%, #120f0d 55%, #0b0908 100%);
    border: 1px solid rgba(var(--gold-rgb), 0.4);
    border-radius: 12px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(var(--gold-rgb), 0.15);
    color: var(--text-main);
}

.bug-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(var(--gold-rgb), 0.18);
}
.bug-report-title {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    color: var(--gold-text-warm);
}
.bug-report-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.bug-report-close:hover { color: var(--gold-text-light); }

.bug-report-body {
    padding: 16px 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bug-report-label {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 0.82rem;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bug-report-meta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.bug-report-meta-col {
    flex: 1 1 160px;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bug-report-select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(var(--gold-rgb), 0.22);
    border-radius: 6px;
    padding: 6px 8px;
    color: var(--text-main);
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
}
.bug-report-select:focus {
    outline: none;
    border-color: rgba(var(--gold-rgb), 0.6);
}

.bug-report-textarea {
    width: 100%;
    min-height: 110px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(var(--gold-rgb), 0.22);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-main);
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 0.9rem;
    resize: vertical;
}
.bug-report-textarea:focus {
    outline: none;
    border-color: rgba(var(--gold-rgb), 0.6);
    box-shadow: 0 0 0 2px rgba(var(--gold-rgb), 0.18);
}

.bug-report-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.bug-report-shoot-status,
.bug-report-files-status {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'Roboto Condensed', sans-serif;
}

.bug-report-preview-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bug-report-annot-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(var(--gold-rgb), 0.18);
    border-radius: 6px;
}
.bug-report-annot-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-right: 4px;
}
.bug-report-annot-color {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.bug-report-annot-color:hover { transform: scale(1.1); }
.bug-report-annot-color.is-active {
    border-color: var(--gold-text-light);
    box-shadow: 0 0 0 2px rgba(var(--gold-rgb), 0.4);
}
.bug-report-annot-undo,
.bug-report-annot-clear { margin-left: auto; }

.bug-report-preview {
    position: relative;
    border: 1px solid rgba(var(--gold-rgb), 0.22);
    border-radius: 8px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.3);
    max-height: 320px;
    overflow: hidden;
}
.bug-report-preview-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 312px;
    object-fit: contain;
    border-radius: 6px;
}
.bug-report-annot-canvas {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    cursor: crosshair;
    border-radius: 6px;
    touch-action: none;
}

.bug-report-attach-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bug-report-attach {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(var(--gold-rgb), 0.15);
    border-radius: 6px;
    padding: 4px 8px;
}
.bug-report-attach-size { color: var(--text-muted); }

.bug-report-help {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.bug-report-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 18px;
    border-top: 1px solid rgba(var(--gold-rgb), 0.18);
    background: rgba(0, 0, 0, 0.25);
}
