/* ================================================================
   ToolHub — Design System
   Dark theme pro inspiré de Linear / Stripe / Vercel
   ================================================================ */

:root {
    --bg-primary: #0d0d0d;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --bg-input: #1a1a1a;
    --border: #2a2a2a;
    --border-focus: #4a4a4a;
    --text-primary: #ededed;
    --text-secondary: #888888;
    --text-muted: #666666;
    --accent: #5e6ad2;
    --accent-hover: #6c77e0;
    --accent-light: rgba(94, 106, 210, 0.15);
    --success: #0eb57b;
    --success-bg: rgba(14, 181, 123, 0.12);
    --danger: #f2555a;
    --danger-bg: rgba(242, 85, 90, 0.12);
    --warning: #f5a623;
    --warning-bg: rgba(245, 166, 35, 0.12);
    --radius: 10px;
    --radius-lg: 14px;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
    background: rgba(13, 13, 13, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.brand-icon {
    font-size: 1.5rem;
    margin-right: 8px;
}

.brand-text {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

/* Hero */
.hero {
    padding: 50px 0 30px;
    text-align: center;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Tool Selector */
.tool-selector-wrapper {
    margin-bottom: 40px;
}

.form-select {
    background-color: var(--bg-input);
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius);
    padding: 14px 18px;
    font-size: 1.05rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

.form-select:hover {
    border-color: var(--border-focus);
    background-color: var(--bg-card);
}

.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
    outline: none;
}

.form-select option {
    background-color: var(--bg-card);
    color: var(--text-primary);
    padding: 10px;
}

/* Tool Container — Formulaire */
.tool-container {
    max-width: 580px;
    margin: 0 auto;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: border-color 0.2s;
}

.tool-card:hover {
    border-color: var(--border-focus);
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.tool-icon {
    font-size: 2rem;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: 12px;
}

.tool-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.tool-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.form-control {
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
    background: var(--bg-card);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-help {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    background: var(--accent);
    border: none;
    color: white;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: -0.2px;
}

.btn-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(94, 106, 210, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Results */
.results-container {
    max-width: 820px;
    margin: 30px auto 0;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.results-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.results-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
}

.badge-found {
    background: var(--success-bg);
    color: var(--success);
}

.badge-notfound {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-errors {
    background: var(--danger-bg);
    color: var(--danger);
}

/* Site Cards Grid */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.site-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.site-card:hover {
    border-color: var(--border-focus);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
}

.site-card.site-found {
    border-left: 3px solid var(--success);
}

.site-card.site-notfound {
    border-left: 3px solid var(--warning);
    opacity: 0.6;
}

.site-card.site-error {
    border-left: 3px solid var(--danger);
    opacity: 0.7;
}

.site-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.site-status {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 6px;
}

.status-found {
    background: var(--success-bg);
    color: var(--success);
}

.status-notfound {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-error {
    background: var(--danger-bg);
    color: var(--danger);
}

/* Section titles */
.section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* Error message */
.error-box {
    background: var(--danger-bg);
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    padding: 16px 20px;
    color: var(--danger);
    font-weight: 500;
    margin-top: 16px;
}

/* Console output */
.console-box {
    background: #0a0a0a;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 20px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 1.6rem; }
    .hero { padding: 30px 0 20px; }
    .tool-card { padding: 20px; }
    .sites-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .results-badges { gap: 6px; }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-focus);
}
