/* JuriTravail - Clean, professional design for DRH/PME */

:root {
    --primary: #1e3a5f;
    --primary-light: #2563eb;
    --accent: #f59e0b;
    --bg: #f8fafc;
    --bg-white: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Nav */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
}
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}
.nav-right { display: flex; gap: 16px; align-items: center; }
.nav-link { color: var(--text-light); text-decoration: none; font-size: 0.9rem; }
.nav-link:hover { color: var(--primary); }

/* Buttons */
.btn-primary {
    background: var(--primary-light);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
}
.btn-primary:hover { opacity: 0.9; }
.btn-outline {
    background: transparent;
    color: var(--primary-light);
    border: 1px solid var(--primary-light);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    cursor: pointer;
}
.btn-outline:hover { background: var(--primary-light); color: white; }

/* Hero */
.hero {
    text-align: center;
    padding: 60px 32px 40px;
    max-width: 800px;
    margin: 0 auto;
}
.hero h1 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 12px;
    line-height: 1.3;
}
.hero h1 strong { color: var(--primary-light); }
.subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

/* Search box */
.search-box {
    display: flex;
    gap: 8px;
    max-width: 700px;
    margin: 0 auto 16px;
}
.search-box input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    outline: none;
}
.search-box input:focus { border-color: var(--primary-light); }

.search-examples {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}
.search-examples span { color: var(--text-light); font-size: 0.85rem; }
.example {
    background: var(--bg-white);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text-light);
}
.example:hover { border-color: var(--primary-light); color: var(--primary-light); }

/* Filters */
.filters {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px 32px;
}
.filter-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: end;
}
.filter-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 4px;
}
.filter-group input, .filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
}
.tags-container { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
    background: #eef2ff;
    color: var(--primary-light);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    cursor: pointer;
    border: 1px solid transparent;
}
.tag.active { border-color: var(--primary-light); background: var(--primary-light); color: white; }

/* Results */
.results {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 32px 40px;
}
.results-header {
    padding: 12px 0;
    font-size: 0.9rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.result-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: box-shadow 0.2s;
}
.result-card:hover { box-shadow: var(--shadow-lg); }
.result-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.result-meta .juridiction { font-weight: 600; color: var(--primary); }
.result-meta .issue {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.issue-cassation { background: #fef2f2; color: var(--danger); }
.issue-rejet { background: #f0fdf4; color: var(--success); }
.result-resume { font-size: 0.95rem; margin-bottom: 10px; line-height: 1.5; }
.result-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.result-tag {
    background: #f1f5f9;
    color: var(--text-light);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}
.result-montant {
    display: inline-block;
    background: #fef9c3;
    color: #854d0e;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 8px;
}
.result-score {
    font-size: 0.75rem;
    color: var(--text-light);
    float: right;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}
.pagination button {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    border-radius: var(--radius);
    cursor: pointer;
}
.pagination button.active { background: var(--primary-light); color: white; border-color: var(--primary-light); }

/* Stats */
.stats {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 32px;
    text-align: center;
}
.stats h2 { color: var(--primary); margin-bottom: 24px; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.stat-number { display: block; font-size: 2rem; font-weight: 700; color: var(--primary-light); }
.stat-label { font-size: 0.9rem; color: var(--text-light); }
.top-tags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* Disclaimer */
.disclaimer {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 16px 24px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: #92400e;
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    padding: 24px;
    color: var(--text-light);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}
footer a { color: var(--primary-light); text-decoration: none; }

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.modal-content {
    background: var(--bg-white);
    padding: 32px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    position: relative;
}
.modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}
.modal-content h2 { margin-bottom: 8px; }
.modal-content p { color: var(--text-light); margin-bottom: 16px; font-size: 0.9rem; }
.modal-content input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    font-size: 1rem;
}
.modal-content .btn-primary { width: 100%; }

/* Utility */
.hidden { display: none !important; }

/* Responsive */
@media (max-width: 640px) {
    .hero h1 { font-size: 1.5rem; }
    .search-box { flex-direction: column; }
    nav { padding: 12px 16px; }
    .hero { padding: 32px 16px 24px; }
    .results, .stats, .filters { padding-left: 16px; padding-right: 16px; }
    .filter-row { flex-direction: column; }
}
