/* Styles globaux pour tous les outils avec support du thème */

/* Classes réutilisables pour les outils */
.glass-card,
.glass-morph {
    background: var(--bg-card);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 14px;
    padding: 2rem;
    transition: all 0.3s ease;
}

/* Remplacements pour les classes fréquemment utilisées */
.text-white {
    color: var(--text-primary) !important;
}

.text-gray-300,
.text-gray-400,
.text-gray-500 {
    color: var(--text-secondary) !important;
}

.text-gray-600 {
    color: var(--text-tertiary) !important;
}

.bg-gray-800,
.bg-gray-900 {
    background-color: var(--bg-secondary) !important;
}

.border-gray-700,
.border-gray-600 {
    border-color: var(--border-primary) !important;
}

/* Tables dans les outils */
.table-container table {
    background: var(--bg-card);
    color: var(--text-primary);
}

.table-container th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

.table-container td {
    border-color: var(--border-primary);
    color: var(--text-secondary);
}

.table-container tr:hover {
    background: var(--bg-tertiary);
}

/* Progress bars et loaders */
.progress-bar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
}

.progress-fill {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

/* Alerts et messages */
.alert {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
}

.alert-success {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.alert-error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.alert-warning {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

/* Sections et containers */
.section-container {
    background: var(--bg-card);
    border: none;
    border-radius: 14px;
    padding: 1.5rem;
}

/* Results containers */
.results-container {
    background: var(--bg-secondary);
    border: none;
    border-radius: 12px;
    padding: 1rem;
}

/* ── Tool Buttons & Inputs ── */
/* Defined in ToolLayout.astro for tool pages */
/* .tool-btn-primary, .tool-btn-secondary, inputs — see ToolLayout.astro */

/* ── Input Gradient (non-tool pages fallback) ── */
.input-gradient {
    background: var(--input-bg, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--border-primary, #DADADA);
    color: var(--text-primary, #1D1D23);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-gradient:focus {
    outline: none;
    border-color: var(--accent-primary, #FC5D1F);
    box-shadow: 0 0 0 2px rgba(252, 93, 31, 0.2);
}

.input-gradient::placeholder {
    color: var(--text-tertiary, #8b8d98);
}

/* ── Custom Scrollbar (tool-specific) ── */
.tool-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.tool-scrollbar::-webkit-scrollbar-track {
    background: var(--bg-tertiary, #e8e8e8);
    border-radius: 4px;
}

.tool-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(252, 93, 31, 0.3);
    border-radius: 4px;
}

.tool-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(252, 93, 31, 0.5);
}

/* ── Status Badges ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.status-2xx { background-color: #22c55e; }
.status-3xx { background-color: var(--accent-primary, #FC5D1F); }
.status-4xx { background-color: #ef4444; }
.status-5xx { background-color: #991b1b; }

/* ── Loading Spinner ── */
.tool-spinner {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}