/* ============================================================
   Archives genealogiques — bergersbelges.fr
   Dark theme, responsive
   ============================================================ */

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

body {
    background: #1a1a1a;
    color: #c8c8c8;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #d4a574; text-decoration: none; transition: color 0.2s; }
a:hover { color: #e8c49a; }

/* Header */
header {
    background: #222;
    border-bottom: 1px solid #333;
    padding: 1.5em 0;
    text-align: center;
}
.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5em;
}
header h1 {
    color: #d4a574;
    font-size: 1.6em;
    font-weight: normal;
    letter-spacing: 0.03em;
    margin-bottom: 0.15em;
}
header h1 a { color: #d4a574; }
header p.subtitle {
    color: #999;
    font-style: italic;
    font-size: 0.95em;
}

/* Navigation */
nav {
    background: #252525;
    border-bottom: 1px solid #333;
    padding: 0.7em 0;
    text-align: center;
}
nav a {
    display: inline-block;
    padding: 0.3em 1em;
    color: #bbb;
    font-size: 0.9em;
}
nav a:hover { color: #d4a574; }
nav .sep { color: #444; margin: 0 0.2em; }

/* Main */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2em 1.5em 3em;
    flex: 1;
    width: 100%;
}

h2 {
    color: #d4a574;
    font-size: 1.3em;
    font-weight: normal;
    border-bottom: 1px solid #333;
    padding-bottom: 0.4em;
    margin-bottom: 1em;
}

h3 {
    color: #d4a574;
    font-size: 1.1em;
    font-weight: normal;
    margin-bottom: 0.6em;
}

p { margin-bottom: 0.8em; }

/* Search form */
.search-form {
    background: #242424;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 1.5em;
    margin-bottom: 2em;
}
.search-form .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    align-items: flex-end;
}
.search-form .form-group {
    flex: 1;
    min-width: 180px;
}
.search-form label {
    display: block;
    color: #999;
    font-size: 0.85em;
    margin-bottom: 0.3em;
}
.search-form input,
.search-form select {
    width: 100%;
    padding: 0.5em 0.7em;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 3px;
    color: #c8c8c8;
    font-family: inherit;
    font-size: 0.95em;
}
.search-form input:focus,
.search-form select:focus {
    outline: none;
    border-color: #d4a574;
}
.search-form button {
    padding: 0.55em 1.5em;
    background: #d4a574;
    color: #1a1a1a;
    border: none;
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.95em;
    cursor: pointer;
    transition: background 0.2s;
}
.search-form button:hover {
    background: #e8c49a;
}

/* Tables */
table.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}
table.data-table th {
    text-align: left;
    color: #d4a574;
    font-weight: normal;
    font-size: 0.9em;
    padding: 0.6em 0.8em;
    border-bottom: 2px solid #333;
    white-space: nowrap;
}
table.data-table td {
    padding: 0.5em 0.8em;
    border-bottom: 1px solid #2a2a2a;
    font-size: 0.93em;
}
table.data-table tr:hover {
    background: #242424;
}
table.data-table .sex-male { color: #7ab0d4; }
table.data-table .sex-female { color: #d47aa0; }

/* Info table (dog detail) */
table.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}
table.info-table th {
    text-align: left;
    color: #999;
    font-weight: normal;
    padding: 0.5em 1em 0.5em 0;
    border-bottom: 1px solid #2a2a2a;
    white-space: nowrap;
    width: 180px;
}
table.info-table td {
    padding: 0.5em 0;
    border-bottom: 1px solid #2a2a2a;
}

/* Pedigree grid */
.pedigree {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5em;
    margin: 1em 0;
}
.pedigree-parent {
    background: #242424;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 1.2em;
}
.pedigree-parent .label {
    color: #999;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3em;
}
.pedigree-parent .name {
    color: #d4a574;
    font-size: 1.05em;
}

/* Tags (titles, cotations, tests) */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin: 0.5em 0;
}
.tag {
    display: inline-block;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 3px;
    padding: 0.25em 0.6em;
    font-size: 0.85em;
    color: #ccc;
}
.tag .tag-abbrev {
    color: #d4a574;
    font-weight: bold;
}

/* Pagination */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    justify-content: center;
    margin: 2em 0 1em;
}
.pagination a,
.pagination span {
    display: inline-block;
    padding: 0.4em 0.8em;
    font-size: 0.9em;
    border: 1px solid #333;
    border-radius: 3px;
    background: #242424;
    color: #bbb;
}
.pagination a:hover {
    border-color: #d4a574;
    color: #d4a574;
}
.pagination .current {
    background: #d4a574;
    color: #1a1a1a;
    border-color: #d4a574;
}
.pagination .ellipsis {
    border: none;
    background: none;
    color: #666;
}

/* Result count */
.result-count {
    color: #888;
    font-size: 0.9em;
    margin-bottom: 1em;
}

/* Section block */
.section-block {
    margin-bottom: 2em;
}

/* No-results */
.no-results {
    text-align: center;
    padding: 2em;
    color: #888;
    font-style: italic;
}

/* Footer */
footer {
    background: #222;
    border-top: 1px solid #333;
    padding: 1.5em;
    text-align: center;
    font-size: 0.85em;
    color: #777;
}
footer a { color: #d4a574; }

/* Responsive */
@media (max-width: 700px) {
    header h1 { font-size: 1.2em; }
    nav a { padding: 0.3em 0.5em; font-size: 0.8em; }
    main { padding: 1.5em 1em 2em; }
    .search-form .form-row { flex-direction: column; }
    .search-form .form-group { min-width: 100%; }
    .pedigree { grid-template-columns: 1fr; }
    table.info-table th { width: 120px; }

    /* Make data tables scrollable */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
