/* Pages /cadastre/ (générées par tools/communes/build-pages.mjs), en complément de legal/legal.css */

/* En-tête : fil d'Ariane et recherche d'adresse dans la commune */
.commune-header {
    padding-bottom: 3.5rem;
}

.breadcrumb {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.breadcrumb a {
    color: var(--text-white);
}

.commune-search {
    max-width: 600px;
    margin: 2rem auto 0;
    padding: 0.4rem;
    border-radius: 3rem;
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.commune-search .search-form {
    display: flex;
    align-items: center;
    position: relative;
    background-color: white;
    border-radius: 2.5rem;
}

.commune-search .search-icon {
    padding: 0 1.25rem;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.commune-search input {
    flex: 1;
    min-width: 0;
    padding: 1rem 0;
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    color: var(--text-color);
}

.commune-search button {
    width: 52px;
    height: 52px;
    margin-right: 0.25rem;
    border: none;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--text-white);
    font-size: 1.1rem;
    cursor: pointer;
}

.commune-search button:hover,
.commune-search button:focus-visible {
    background-color: var(--primary-dark);
}

.autocomplete-suggestions {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-height: 300px;
    overflow-y: auto;
    z-index: 50;
    text-align: left;
}

.autocomplete-suggestion {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.4;
    cursor: pointer;
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

.autocomplete-suggestion.selected {
    background-color: #eff6ff;
}

.suggestion-context {
    display: block;
    color: var(--text-light);
    font-size: 0.8rem;
}

.hero-alt {
    margin-top: 1rem;
}

.hero-alt a {
    color: var(--text-white);
    font-weight: 500;
}

/* Chiffres clés */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    background-color: var(--background-color);
}

.stat-value {
    color: var(--primary-dark);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Répartition des parcelles par surface */
.bar-chart {
    list-style: none;
    margin: 1rem 0 0 !important;
}

.bar-chart li {
    display: grid;
    grid-template-columns: 11rem 1fr 9rem;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.bar-track {
    height: 0.9rem;
    border-radius: 0.45rem;
    background-color: #eef2ff;
    overflow: hidden;
}

.bar {
    display: block;
    height: 100%;
    border-radius: 0.45rem;
    background-color: var(--primary-color);
}

.bar-value {
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Prix */
.price-table td {
    white-space: nowrap;
}

.muted {
    color: var(--text-light);
    font-size: 0.875em;
}

.note {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Risques */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 1rem 0 1.5rem !important;
}

.tags li {
    margin: 0 !important;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    background-color: #fef3c7;
    color: #92400e;
    font-size: 0.875rem;
}

/* Questions fréquentes */
.faq {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 0;
}

.faq summary {
    font-weight: 600;
    cursor: pointer;
}

.faq p {
    margin: 0.75rem 0 0.25rem;
}

/* Listes de liens */
.link-list {
    list-style: none;
    margin: 1rem 0 1.5rem !important;
    columns: 2;
}

.link-list.inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    columns: auto;
}

.departement-title {
    margin: 2rem 0 0.5rem !important;
    font-size: 1.25rem !important;
}

@media (max-width: 768px) {
    .commune-search .search-icon {
        display: none;
    }

    .commune-search input {
        padding-left: 1.25rem;
    }

    .bar-chart li {
        grid-template-columns: 1fr auto;
        gap: 0.25rem 0.75rem;
    }

    .bar-track {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .link-list {
        columns: 1;
    }
}
