/* ============================================================
   Annuaire Paysagistes — Mobile-first CSS
   Police: Outfit | Palette: Verts forêt
   ============================================================ */

:root {
    --primary: #2D6A4F;
    --accent: #52B788;
    --dark: #1B4332;
    --light: #D8F3DC;
    --bg: #F8FBF9;
    --text: #1A1A2E;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --white: #FFFFFF;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.12);
    --transition: 0.2s ease;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--dark); }

img { max-width: 100%; height: auto; }

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary);
    white-space: nowrap;
}

.logo svg { color: var(--accent); flex-shrink: 0; }

.header-nav { flex: 1; max-width: 400px; }

/* Search */
.search-wrapper { position: relative; }

#search-input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--bg);
    transition: border-color var(--transition), box-shadow var(--transition);
}

#search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(82,183,136,0.15);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    display: none;
    z-index: 200;
    max-height: 300px;
    overflow-y: auto;
}

.search-dropdown.active { display: block; }

.search-dropdown a {
    display: block;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.search-dropdown a:last-child { border-bottom: none; }
.search-dropdown a:hover { background: var(--light); }

/* ============================================================
   Search Box (in-page)
   ============================================================ */
.search-box {
    position: relative;
    max-width: 640px;
    margin: 1.25rem auto 0.5rem;
}

.search-box-inner {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.search-box-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-box-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(82,183,136,0.12);
}

.search-box-input::placeholder { color: var(--text-muted); }

.search-box-clear {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
    line-height: 1;
    display: none;
}

.search-box-clear.visible { display: block; }
.search-box-clear:hover { color: var(--dark); }

.search-box-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    display: none;
    z-index: 300;
    max-height: 420px;
    overflow-y: auto;
}

.search-box-dropdown.active { display: block; }

.search-group-label {
    padding: 0.5rem 1rem 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.search-box-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: background var(--transition);
}

.search-box-dropdown a:last-child { border-bottom: none; }
.search-box-dropdown a:hover { background: var(--light); }

.search-result-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--white);
}

.search-result-icon.type-city { background: var(--accent); }
.search-result-icon.type-dept { background: var(--primary); }
.search-result-icon.type-region { background: var(--dark); }
.search-result-icon.type-biz { background: #E9967A; }

.search-result-text { flex: 1; min-width: 0; }

.search-result-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.search-box-empty {
    padding: 1.25rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Hero search-box override */
.hero .search-box { max-width: 560px; margin-top: 1.75rem; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================================
   Page Header
   ============================================================ */
.page-header {
    padding: 2rem 0 1.5rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ============================================================
   Breadcrumb
   ============================================================ */
.breadcrumb {
    padding: 1rem 0 0;
    font-size: 0.85rem;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.breadcrumb li::after {
    content: '›';
    margin-left: 0.25rem;
    color: var(--text-muted);
}

.breadcrumb li:last-child::after { display: none; }

.breadcrumb a { color: var(--primary); }
.breadcrumb span { color: var(--text-muted); }

/* ============================================================
   Sections
   ============================================================ */
.section {
    padding: 1.5rem 0;
}

.section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1rem;
}

/* ============================================================
   Card Grid
   ============================================================ */
.card-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.card {
    display: block;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    color: var(--text);
}

.card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.35rem;
}

.card-count {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
}

/* Region card */
.region-card {
    border-left: 3px solid var(--accent);
}

/* Department card */
.dept-code {
    display: inline-block;
    background: var(--light);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.35rem;
}

/* City card */
.city-cp {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

/* ============================================================
   Business Cards
   ============================================================ */
.biz-list {
    display: grid;
    gap: 1rem;
}

.biz-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: box-shadow var(--transition);
}

.biz-card:hover { box-shadow: var(--shadow-hover); }

.biz-name {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.biz-name a { color: var(--dark); }
.biz-name a:hover { color: var(--primary); }

.biz-enseigne {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.biz-card-body p {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.biz-card-body svg {
    flex-shrink: 0;
    color: var(--accent);
}

.biz-distance {
    display: inline-block;
    background: #FEF3C7;
    color: #92400E;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-left: auto;
}

.nearby-intro {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.biz-siret { font-size: 0.8rem !important; color: var(--text-muted); }
.biz-date { font-size: 0.8rem !important; }

.biz-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.biz-tag {
    display: inline-block;
    background: var(--light);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

/* ============================================================
   Business Detail
   ============================================================ */
.biz-detail { padding-bottom: 2rem; }

.biz-info-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

.info-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.info-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light);
}

.info-card dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
}

.info-card dt {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.info-card dd {
    font-size: 0.9rem;
    color: var(--text);
}

.map-placeholder {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 0;
    flex-wrap: wrap;
}

.page-numbers {
    display: flex;
    gap: 0.25rem;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    background: var(--white);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.page-btn:hover { background: var(--light); color: var(--primary); border-color: var(--accent); }
.page-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }
.page-dots { display: inline-flex; align-items: center; padding: 0 0.25rem; color: var(--text-muted); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: background var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover { background: var(--dark); color: var(--white); }

/* ============================================================
   Empty State / Error
   ============================================================ */
.empty-state, .error-page {
    text-align: center;
    padding: 3rem 1rem;
}

.error-page h1 { font-size: 2rem; color: var(--dark); margin-bottom: 0.75rem; }
.error-page p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* SEO text */
.seo-text {
    max-width: 800px;
}

.seo-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    margin-top: 3rem;
    padding: 2.5rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

.site-footer h3, .site-footer h4 {
    color: var(--white);
    margin-bottom: 0.75rem;
}

.site-footer h3 { font-size: 1.15rem; }
.site-footer h4 { font-size: 0.95rem; }

.site-footer p { font-size: 0.9rem; line-height: 1.6; }

.footer-atlinker { margin-top: 0.75rem; }
.footer-atlinker a { color: var(--accent); font-weight: 500; }
.footer-atlinker a:hover { color: var(--white); }

.footer-regions {
    list-style: none;
    columns: 2;
    gap: 0.5rem;
}

.footer-regions li { margin-bottom: 0.35rem; }

.footer-regions a {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    transition: color var(--transition);
}

.footer-regions a:hover { color: var(--white); }

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

/* Empty city card */
.city-card-empty { opacity: 0.75; border-style: dashed; }
.city-card-empty:hover { opacity: 1; }
.nearby-label { color: var(--text-muted); font-style: italic; }

.cities-separator {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1rem 0;
}

.btn-outline {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }

/* ============================================================
   Nearby section
   ============================================================ */
.nearby { border-top: 1px solid var(--border); padding-top: 2rem; }

/* ============================================================
   Stats section
   ============================================================ */
.stats-section { border-top: 1px solid var(--border); padding-top: 2rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-card {
    background: var(--light);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ============================================================
   FAQ section
   ============================================================ */
.faq-section { border-top: 1px solid var(--border); padding-top: 2rem; }

.faq-list { display: grid; gap: 0.75rem; }

.faq-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.faq-question::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--accent);
    flex-shrink: 0;
    margin-left: 1rem;
    transition: transform var(--transition);
}

.faq-item.open .faq-question::after {
    content: '−';
}

.faq-answer {
    padding: 0 1.25rem 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    display: none;
}

.faq-item.open .faq-answer {
    display: block;
}

@media (min-width: 640px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   Responsive — Tablet (640px+)
   ============================================================ */
@media (min-width: 640px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .biz-info-grid { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 2rem; }
    .page-header h1 { font-size: 1.75rem; }
    .footer-grid { grid-template-columns: 1fr 2fr; }
}

/* ============================================================
   Responsive — Desktop (1024px+)
   ============================================================ */
@media (min-width: 1024px) {
    .container { padding: 0 2rem; }
    .regions-grid { grid-template-columns: repeat(3, 1fr); }
    .depts-grid { grid-template-columns: repeat(3, 1fr); }
    .cities-grid { grid-template-columns: repeat(4, 1fr); }
    .hero h1 { font-size: 2.25rem; }
    .hero { padding: 4rem 0 2.5rem; }
    .footer-regions { columns: 3; }
}
