/* ============================================
   Stenko Annuaire — Design System
   ============================================ */

:root {
    --ds-navy: #2D3748;
    --ds-cyan: #4FD1C7;
    --ds-white: #FFFFFF;
    --ds-gray-light: #F6F8FB;
    --ds-gray-medium: #4A5568;
    --ds-gray-border: #E2E8F0;
    --ds-danger: #F56565;
    --ds-success: #48BB78;
    --ds-warning: #F97316;
    --ds-cyan-light: rgba(79, 209, 199, 0.1);
    --ds-cyan-dark: #0D9488;
    --ds-space-xs: 4px;
    --ds-space-sm: 8px;
    --ds-space-smd: 12px;
    --ds-space-md: 16px;
    --ds-space-lg: 20px;
    --ds-space-xl: 32px;
    --ds-space-2xl: 48px;
    --ds-radius-sm: 8px;
    --ds-radius-md: 12px;
    --ds-radius-lg: 16px;
    --ds-radius-xl: 20px;
    --ds-shadow-soft: 0 1.3px 0 rgba(45, 55, 72, 0.15);
    --ds-shadow-medium: 0 3px 0 rgba(45, 55, 72, 0.2);
    --ds-shadow-strong: 0 6px 0 rgba(45, 55, 72, 0.25);
    --ds-transition-fast: 0.15s ease-out;
    --ds-transition-medium: 0.25s ease-out;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--ds-navy);
    background: var(--ds-white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; font-weight: 600; }
a { color: var(--ds-cyan-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--ds-space-lg); }

/* ============================================
   VIEW TRANSITIONS
   ============================================ */

/* Named view-transition elements for morphing */
.hero-search-fields,
.topbar-search-fields {
    view-transition-name: searchbar;
}

.hero-logo,
.topbar-logo {
    view-transition-name: logo;
}

/* Transition: logo morphs between hero and topbar */
::view-transition-old(logo),
::view-transition-new(logo) {
    animation-duration: 0.3s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Transition: searchbar morphs between hero pill and topbar bar */
::view-transition-old(searchbar),
::view-transition-new(searchbar) {
    animation-duration: 0.35s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Transition: pro card expands into detail hero */
::view-transition-old(pro-card) {
    animation: card-fly-out 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
::view-transition-new(pro-card) {
    animation: card-fly-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Default cross-fade */
::view-transition-old(root) {
    animation: vt-fade-out 0.15s ease forwards;
}
::view-transition-new(root) {
    animation: vt-fade-in 0.25s ease 0.1s both;
}

@keyframes card-fly-out {
    to { opacity: 0; transform: scale(1.05); }
}
@keyframes card-fly-in {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to { opacity: 1; transform: none; }
}
@keyframes vt-fade-out {
    to { opacity: 0; }
}
@keyframes vt-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   LOGO — shared between modes
   ============================================ */

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--ds-cyan);
    border-radius: var(--ds-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--ds-white);
    flex-shrink: 0;
}

.logo-icon--sm { width: 32px; height: 32px; font-size: 1rem; }

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--ds-white);
}

.logo-text--sm { font-size: 1rem; }

/* ============================================
   HERO — Landing mode (full-screen)
   ============================================ */

.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--ds-navy) 0%, #1a202c 50%, #2d3748 100%);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(79, 209, 199, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(79, 209, 199, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--ds-space-lg) var(--ds-space-xl);
    position: relative;
    z-index: 1;
}

.hero-logo {
    display: flex;
    align-items: center;
    gap: var(--ds-space-smd);
    text-decoration: none;
}

.hero-nav-actions {
    display: flex;
    align-items: center;
    gap: var(--ds-space-lg);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--ds-white);
    padding: var(--ds-space-sm) var(--ds-space-lg);
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--ds-transition-fast);
    text-decoration: none;
}
.nav-btn:hover { background: rgba(255, 255, 255, 0.2); text-decoration: none; }
.nav-btn--sm { padding: var(--ds-space-xs) var(--ds-space-md); font-size: 0.8125rem; }

/* Hero Content */
.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--ds-space-2xl);
    text-align: center;
    position: relative;
    z-index: 1;
    gap: var(--ds-space-xl);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--ds-white);
    font-weight: 700;
    line-height: 1.15;
    max-width: 700px;
}

.hero h1 em { font-style: normal; color: var(--ds-cyan); }

.hero-sub {
    color: rgba(255, 255, 255, 0.6);
    font-size: clamp(0.9rem, 1.5vw, 1.125rem);
    max-width: 550px;
    line-height: 1.6;
}

/* Hero Search Bar */
.hero-search { width: 100%; max-width: 750px; }

.hero-search-fields {
    display: flex;
    align-items: center;
    background: var(--ds-white);
    border-radius: 60px;
    padding: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.search-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--ds-space-sm);
    padding: var(--ds-space-smd) var(--ds-space-lg);
}

.search-icon { width: 20px; height: 20px; color: var(--ds-gray-medium); flex-shrink: 0; }

.search-field input,
.topbar-field input {
    border: none;
    outline: none;
    background: none;
    font-size: 1rem;
    font-family: inherit;
    color: var(--ds-navy);
    width: 100%;
}

.search-field input::placeholder,
.topbar-field input::placeholder { color: #A0AEC0; }

/* Address field takes full width */
.search-field--address { flex: 1; }

/* ============================================
   COMBO BUTTON — split submit | dropdown
   ============================================ */

.combo-btn {
    display: flex;
    align-items: stretch;
    position: relative;
    flex-shrink: 0;
}

.combo-submit {
    background: var(--ds-cyan);
    color: var(--ds-white);
    border: none;
    padding: var(--ds-space-smd) var(--ds-space-xl);
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--ds-transition-fast);
    display: flex;
    align-items: center;
    gap: var(--ds-space-xs);
    border-radius: 50px 0 0 50px;
}

.combo-submit:hover { background: var(--ds-cyan-dark); }

.combo-label {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.combo-toggle {
    background: var(--ds-cyan-dark);
    color: var(--ds-white);
    border: none;
    padding: 0 var(--ds-space-smd);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 50px 50px 0;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    transition: background var(--ds-transition-fast);
}

.combo-toggle svg { width: 18px; height: 18px; }
.combo-toggle:hover { background: #0a7f74; }

/* Dropdown panel */
.combo-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--ds-white);
    border-radius: var(--ds-radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), var(--ds-shadow-medium);
    min-width: 220px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 200;
    padding: var(--ds-space-xs);
}

.combo-dropdown.open { display: block; }

.combo-dropdown--up {
    top: auto;
    bottom: calc(100% + 8px);
}

.combo-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ds-space-sm);
    width: 100%;
    padding: var(--ds-space-smd) var(--ds-space-md);
    border: none;
    background: var(--ds-white);
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--ds-navy);
    cursor: pointer;
    border-radius: var(--ds-radius-sm);
    text-align: left;
    transition: background var(--ds-transition-fast);
}

.combo-option:hover { background: var(--ds-gray-light); }

.combo-check {
    width: 16px;
    height: 16px;
    color: var(--ds-cyan-dark);
    flex-shrink: 0;
}

/* Small variant (topbar) */
.combo-btn--sm .combo-submit--sm {
    border-radius: 50% 0 0 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.combo-btn--sm .combo-submit--sm svg { width: 16px; height: 16px; }
.combo-btn--sm .combo-toggle--sm {
    border-radius: 0 50% 50% 0;
    padding: 0 var(--ds-space-sm);
    height: 36px;
}
.combo-btn--sm .combo-toggle--sm svg { width: 14px; height: 14px; }

/* Trade Pills — Hero (removed, now in button) */
.hero-trades {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--ds-space-sm);
    max-width: 700px;
}

.trade-pill {
    padding: var(--ds-space-xs) var(--ds-space-md);
    border-radius: 25px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    transition: all var(--ds-transition-fast);
    text-decoration: none;
}
.trade-pill:hover {
    color: var(--ds-white);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

/* ============================================
   TOPBAR — Search mode (compact sticky)
   ============================================ */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--ds-navy);
    padding: var(--ds-space-smd) var(--ds-space-xl);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--ds-space-md);
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: var(--ds-space-sm);
    text-decoration: none;
    flex-shrink: 0;
}

.topbar-search {
    flex: 1;
    max-width: 600px;
}

.topbar-search-fields {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--ds-transition-fast);
}

.topbar-search-fields:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(79, 209, 199, 0.3);
}

.topbar-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--ds-space-xs);
    padding: var(--ds-space-sm) var(--ds-space-smd);
}

.topbar-field .search-icon { width: 16px; height: 16px; color: rgba(255, 255, 255, 0.4); }
.topbar-field input { font-size: 0.875rem; color: var(--ds-white); }
.topbar-field input::placeholder { color: rgba(255, 255, 255, 0.4); }

.topbar-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.topbar-search button {
    background: var(--ds-cyan);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--ds-transition-fast);
}
.topbar-search button svg { width: 16px; height: 16px; color: var(--ds-white); }
.topbar-search button:hover { background: var(--ds-cyan-dark); }

/* ============================================
   TRADE BAR — Horizontal filter chips
   ============================================ */

.trade-bar {
    background: var(--ds-white);
    border-bottom: 1px solid var(--ds-gray-border);
    position: sticky;
    top: 60px; /* below topbar */
    z-index: 90;
}

.trade-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--ds-space-smd) var(--ds-space-lg);
    display: flex;
    gap: var(--ds-space-sm);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.trade-bar-inner::-webkit-scrollbar { display: none; }

.trade-chip {
    padding: var(--ds-space-xs) var(--ds-space-md);
    border-radius: 25px;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--ds-gray-medium);
    background: var(--ds-gray-light);
    border: 1px solid transparent;
    text-decoration: none;
    transition: all var(--ds-transition-fast);
}

.trade-chip:hover {
    color: var(--ds-navy);
    border-color: var(--ds-gray-border);
    text-decoration: none;
}

.trade-chip--active {
    color: var(--ds-cyan-dark);
    background: var(--ds-cyan-light);
    border-color: var(--ds-cyan);
    font-weight: 600;
}

/* ============================================
   RESULTS
   ============================================ */

.results {
    padding: var(--ds-space-xl) 0 80px;
    background: var(--ds-gray-light);
    min-height: calc(100vh - 120px);
}

.results-header {
    margin-bottom: var(--ds-space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--ds-space-md);
}

.results-header h2 { font-size: 1.25rem; }

.active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ds-space-sm);
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ds-white);
    padding: var(--ds-space-xs) var(--ds-space-smd);
    border-radius: 25px;
    font-size: 0.8125rem;
    color: var(--ds-navy);
    border: 1px solid var(--ds-gray-border);
}

.filter-tag a {
    color: var(--ds-gray-medium);
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}
.filter-tag a:hover { color: var(--ds-danger); text-decoration: none; }

.clear-all { font-size: 0.8125rem; color: var(--ds-gray-medium); }

/* Pro Grid */
.pros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: var(--ds-space-lg);
}

/* ============================================
   CARD ENTRANCE ANIMATION (staggered)
   ============================================ */

.mode-search .pro-card {
    animation: card-enter 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--i, 0) * 60ms);
}

@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   PRO CARD
   ============================================ */

.pro-card {
    background: var(--ds-white);
    border-radius: var(--ds-radius-xl);
    padding: var(--ds-space-lg);
    box-shadow: var(--ds-shadow-soft);
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-smd);
    transition: box-shadow var(--ds-transition-medium), translate var(--ds-transition-medium);
}

.pro-card:hover {
    box-shadow: var(--ds-shadow-medium);
    translate: 0 -2px;
}

.pro-card-top {
    display: flex;
    align-items: center;
    gap: var(--ds-space-md);
}

.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--ds-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9375rem;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.avatar-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.avatar--has-img .avatar-fallback { display: none; }
.avatar { position: relative; }

.pro-identity { flex: 1; min-width: 0; }

.pro-identity h3 {
    font-size: 1rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pro-metier {
    font-size: 0.8125rem;
    color: var(--ds-cyan-dark);
    font-weight: 500;
}

.plan-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.plan-badge--premium {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: var(--ds-white);
}

.plan-badge--start {
    background: var(--ds-cyan-light);
    color: var(--ds-cyan-dark);
}

.pro-trades {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ds-space-xs);
}

.trade-tag {
    font-size: 0.75rem;
    padding: 2px var(--ds-space-sm);
    border-radius: 25px;
    background: var(--ds-cyan-light);
    color: var(--ds-cyan-dark);
    font-weight: 500;
}

.pro-presentation {
    font-size: 0.8125rem;
    color: var(--ds-gray-medium);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pro-diplomas {
    display: flex;
    align-items: flex-start;
    gap: var(--ds-space-sm);
    font-size: 0.8125rem;
    color: var(--ds-gray-medium);
    font-style: italic;
}

.diplomas-icon { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; }

.pro-zones {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--ds-space-xs);
    font-size: 0.8125rem;
    color: var(--ds-gray-medium);
}

.zone-icon { width: 14px; height: 14px; flex-shrink: 0; }
.pro-zones small { color: #A0AEC0; font-size: 0.75rem; }

.pro-services {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--ds-gray-border);
    padding-top: var(--ds-space-smd);
}

.pro-service-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    padding: var(--ds-space-xs) 0;
}

.pro-service-row span { color: var(--ds-gray-medium); }
.pro-service-row strong { color: var(--ds-navy); font-weight: 600; white-space: nowrap; }
.price-quote { font-style: italic; color: #A0AEC0 !important; font-size: 0.75rem; }
.more-services { font-size: 0.75rem; color: var(--ds-cyan-dark); font-weight: 500; margin-top: var(--ds-space-xs); }

.pro-card-actions {
    display: flex;
    align-items: center;
    gap: var(--ds-space-sm);
    margin-top: auto;
    padding-top: var(--ds-space-smd);
    border-top: 1px solid var(--ds-gray-border);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--ds-space-xs);
    padding: var(--ds-space-sm) var(--ds-space-md);
    border-radius: var(--ds-radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    background: var(--ds-gray-light);
    color: var(--ds-navy);
    border: 1px solid var(--ds-gray-border);
    transition: all var(--ds-transition-fast);
}

.action-btn svg { width: 16px; height: 16px; }
.action-btn:hover { border-color: var(--ds-cyan); color: var(--ds-cyan-dark); text-decoration: none; }

.action-btn--primary {
    background: var(--ds-cyan);
    color: var(--ds-white);
    border-color: var(--ds-cyan);
}
.action-btn--primary:hover { background: var(--ds-cyan-dark); border-color: var(--ds-cyan-dark); color: var(--ds-white); }

.pro-social {
    display: flex;
    align-items: center;
    gap: var(--ds-space-sm);
    margin-left: auto;
}

.pro-social a {
    color: var(--ds-gray-medium);
    font-size: 0.6875rem;
    font-weight: 700;
    text-decoration: none;
    transition: color var(--ds-transition-fast);
}
.pro-social a:hover { color: var(--ds-cyan-dark); text-decoration: none; }
.pro-social svg { width: 18px; height: 18px; }

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 80px var(--ds-space-xl);
    animation: card-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--ds-white);
    box-shadow: var(--ds-shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--ds-space-lg);
}

.empty-icon svg { width: 36px; height: 36px; color: #A0AEC0; }
.empty-state h3 { font-size: 1.25rem; margin-bottom: var(--ds-space-sm); }

.empty-state p {
    color: var(--ds-gray-medium);
    font-size: 0.9375rem;
    max-width: 400px;
    margin: 0 auto var(--ds-space-lg);
}

.empty-btn {
    display: inline-flex;
    padding: var(--ds-space-smd) var(--ds-space-xl);
    background: var(--ds-navy);
    color: var(--ds-white);
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--ds-transition-fast);
}
.empty-btn:hover { background: var(--ds-cyan-dark); text-decoration: none; }

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--ds-space-sm);
    margin-top: var(--ds-space-2xl);
}

.page-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--ds-space-xs);
    padding: var(--ds-space-sm) var(--ds-space-md);
    background: var(--ds-white);
    color: var(--ds-navy);
    border-radius: var(--ds-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: var(--ds-shadow-soft);
    transition: all var(--ds-transition-fast);
}

.page-btn svg { width: 16px; height: 16px; }
.page-btn:hover { color: var(--ds-cyan-dark); text-decoration: none; }

.page-numbers { display: flex; align-items: center; gap: var(--ds-space-xs); }

.page-num {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ds-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ds-gray-medium);
    text-decoration: none;
    transition: all var(--ds-transition-fast);
}

.page-num:hover { background: var(--ds-white); color: var(--ds-navy); text-decoration: none; }
.page-num--active { background: var(--ds-cyan); color: var(--ds-white); }
.page-dots { font-size: 0.875rem; color: var(--ds-gray-medium); padding: 0 var(--ds-space-xs); }

/* ============================================
   404 / Hero short
   ============================================ */

.hero--short { min-height: 100vh; }
.hero--short .hero-content { gap: 0; }
.empty-state--dark { color: var(--ds-white); }
.empty-state--dark h1 { font-size: 6rem; color: var(--ds-cyan); margin-bottom: var(--ds-space-md); }
.empty-state--dark p { color: rgba(255, 255, 255, 0.6); margin-bottom: var(--ds-space-xl); }

/* ============================================
   PRO CARD — clickable state
   ============================================ */

.pro-card[data-href] { cursor: pointer; }
.pro-card[data-href]:active { scale: 0.98; }

/* View transition for card → detail morph */
::view-transition-old(pro-card) {
    animation: card-morph-out 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
::view-transition-new(pro-card) {
    animation: card-morph-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes card-morph-out {
    to { opacity: 0; transform: scale(1.03); }
}
@keyframes card-morph-in {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: none; }
}

/* ============================================
   DETAIL PAGE
   ============================================ */

.detail {
    padding: var(--ds-space-xl) 0 80px;
    background: var(--ds-gray-light);
    min-height: calc(100vh - 60px);
}

/* Breadcrumb in topbar */
.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--ds-space-sm);
    font-size: 0.8125rem;
    flex: 1;
    min-width: 0;
}

.topbar-breadcrumb a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color var(--ds-transition-fast);
}
.topbar-breadcrumb a:hover { color: var(--ds-white); text-decoration: none; }
.breadcrumb-sep { color: rgba(255, 255, 255, 0.3); }

.topbar-breadcrumb span:last-child {
    color: var(--ds-white);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hero card */
.detail-hero {
    background: var(--ds-white);
    border-radius: var(--ds-radius-xl);
    padding: var(--ds-space-xl);
    box-shadow: var(--ds-shadow-soft);
    margin-bottom: var(--ds-space-xl);
    view-transition-name: pro-card;
}

.detail-hero-top {
    display: flex;
    align-items: center;
    gap: var(--ds-space-xl);
    margin-bottom: var(--ds-space-lg);
}

.avatar--xl {
    width: 96px;
    height: 96px;
    font-size: 2rem;
}

.detail-identity { flex: 1; min-width: 0; }

.detail-name-row {
    display: flex;
    align-items: center;
    gap: var(--ds-space-md);
    flex-wrap: wrap;
    margin-bottom: var(--ds-space-xs);
}

.detail-name-row h1 {
    font-size: 1.75rem;
    line-height: 1.2;
}

.plan-badge--lg {
    width: auto;
    padding: var(--ds-space-xs) var(--ds-space-smd);
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.detail-trades {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ds-space-sm);
    margin-bottom: var(--ds-space-sm);
}

.trade-tag--lg {
    font-size: 0.8125rem;
    padding: var(--ds-space-xs) var(--ds-space-smd);
}

/* Quick actions */
.detail-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--ds-space-smd);
}

.detail-action {
    display: flex;
    align-items: center;
    gap: var(--ds-space-smd);
    padding: var(--ds-space-md);
    border: 1px solid var(--ds-gray-border);
    border-radius: var(--ds-radius-md);
    text-decoration: none;
    color: var(--ds-navy);
    transition: all var(--ds-transition-fast);
}

.detail-action:hover {
    border-color: var(--ds-cyan);
    background: var(--ds-cyan-light);
    text-decoration: none;
}

.detail-action svg { width: 24px; height: 24px; color: var(--ds-gray-medium); flex-shrink: 0; }

.detail-action span {
    font-weight: 600;
    font-size: 0.875rem;
    display: block;
}

.detail-action small {
    font-size: 0.75rem;
    color: var(--ds-gray-medium);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-action--primary {
    border-color: var(--ds-cyan);
    background: var(--ds-cyan-light);
}

.detail-action--primary svg { color: var(--ds-cyan-dark); }
.detail-action--primary:hover { background: var(--ds-cyan); border-color: var(--ds-cyan); }
.detail-action--primary:hover span,
.detail-action--primary:hover small { color: var(--ds-white); }
.detail-action--primary:hover svg { color: var(--ds-white); }

/* Content grid */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--ds-space-xl);
    align-items: start;
}

/* Main column */
.detail-main {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-xl);
}

.detail-section {
    background: var(--ds-white);
    border-radius: var(--ds-radius-xl);
    padding: var(--ds-space-xl);
    box-shadow: var(--ds-shadow-soft);
    animation: card-enter 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Fiche réduite : le pro n'a pas publié son profil, ou n'y a rien mis.
   Même carte que les sections normales, pour que la page garde sa forme au
   lieu de paraître tronquée — mais centrée et sobre, parce qu'elle ne porte
   qu'une phrase. */
.detail-empty {
    background: var(--ds-white);
    border-radius: var(--ds-radius-xl);
    padding: calc(var(--ds-space-xl) * 2) var(--ds-space-xl);
    box-shadow: var(--ds-shadow-soft);
    text-align: center;
}

.detail-empty p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--ds-gray-medium);
}

.detail-section:nth-child(2) { animation-delay: 0.08s; }
.detail-section:nth-child(3) { animation-delay: 0.16s; }

.detail-section h2 {
    font-size: 1.125rem;
    margin-bottom: var(--ds-space-md);
    padding-bottom: var(--ds-space-smd);
    border-bottom: 1px solid var(--ds-gray-border);
}

.detail-presentation {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--ds-gray-medium);
}

.detail-diplomas {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--ds-gray-medium);
    font-style: italic;
}

/* Les trois textes libres saisis par le pro gardent ses retours à la ligne.
   Le HTML les avale par défaut : un paragraphe écrit en plusieurs lignes
   arrivait en un seul bloc. La présentation était déjà traitée, seule ;
   les diplômes et les descriptions de prestation ne l'étaient pas.

   `pre-line` et non `pre-wrap` : on garde les sauts de ligne voulus, mais
   pas les espaces d'indentation ni les doubles espaces d'un copier-coller,
   qui décaleraient le texte sans que le pro comprenne pourquoi. */
.detail-presentation,
.detail-diplomas,
.detail-service-panel p {
    white-space: pre-line;
}

/* Services list */
.detail-services {
    display: flex;
    flex-direction: column;
}

/* Accordéon de prestation : <details name="prestation">, donc exclusivité
   mutuelle et ouverture par défaut sans une ligne de JavaScript. */
.detail-service {
    border-bottom: 1px solid var(--ds-gray-border);
}

.detail-service:last-child { border-bottom: none; }

.detail-service-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--ds-space-xl);
    padding: var(--ds-space-md) 0;
    cursor: pointer;
    list-style: none;
}

/* Le marqueur natif du <summary> : masqué dans les deux dialectes. */
.detail-service-summary::-webkit-details-marker { display: none; }
.detail-service-summary::marker { content: ""; }

.detail-service-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--ds-space-xs);
}

.detail-service-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--ds-space-sm);
}

.detail-service-info strong {
    font-size: 0.9375rem;
}

.detail-duration-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ds-cyan-dark);
    background: var(--ds-cyan-light);
    padding: 2px var(--ds-space-sm);
    border-radius: var(--ds-radius-sm);
    white-space: nowrap;
}

.detail-type-tag {
    font-size: 0.6875rem;
    color: var(--ds-gray-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-service-meta {
    text-align: right;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--ds-space-xs);
}

.detail-service-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ds-cyan-dark);
    white-space: nowrap;
}

.detail-service-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform var(--ds-transition-fast);
}

.detail-service-toggle-open { display: none; }
.detail-service[open] .detail-service-toggle-closed { display: none; }
.detail-service[open] .detail-service-toggle-open { display: inline; }
.detail-service[open] .detail-service-toggle svg { transform: rotate(180deg); }

.detail-service-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--ds-space-smd);
    padding: 0 0 var(--ds-space-md);
}

.detail-service-panel p {
    font-size: 0.8125rem;
    color: var(--ds-gray-medium);
    line-height: 1.5;
}

.detail-book {
    display: inline-flex;
    align-items: center;
    padding: var(--ds-space-sm) var(--ds-space-md);
    border-radius: var(--ds-radius-sm);
    background: var(--ds-cyan);
    color: var(--ds-white);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--ds-transition-fast);
}

.detail-book:hover {
    background: var(--ds-cyan-dark);
    color: var(--ds-white);
    text-decoration: none;
}

.detail-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ds-navy);
}

.detail-price--quote {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ds-gray-medium);
    font-style: italic;
}

/* Aside column */
.detail-aside {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-lg);
}

.detail-card {
    background: var(--ds-white);
    border-radius: var(--ds-radius-xl);
    padding: var(--ds-space-lg);
    box-shadow: var(--ds-shadow-soft);
    animation: card-enter 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.detail-card h3 {
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: var(--ds-space-sm);
    margin-bottom: var(--ds-space-md);
    padding-bottom: var(--ds-space-smd);
    border-bottom: 1px solid var(--ds-gray-border);
}

.detail-card h3 svg { width: 18px; height: 18px; color: var(--ds-cyan-dark); }

/* Zone list */
.zone-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-smd);
}

.zone-list li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Communes couvertes, carte « Zones d'intervention » de la fiche pro
   (detail.templ). Texte courant en ligne, PAS une liste à puces : une
   trentaine de noms de communes tiendrait sur une trentaine de lignes dans la
   colonne étroite de la sidebar, un mot par ligne. Un paragraphe avec des
   virgules coule naturellement d'une ligne à l'autre, comme n'importe quel
   texte — chaque commune reste une cible cliquable de taille normale, ce
   n'est que le CORPS du texte qui descend d'un cran (0.8125rem, l'échelon
   déjà utilisé pour le texte secondaire dense de cette page : description de
   prestation, mention « sur devis »), jamais une valeur inventée pour
   l'occasion. */
.detail-card .city-list {
    font-size: 0.8125rem;
    line-height: 1.7;
    color: var(--ds-gray-medium);
}

/* Social links */
.detail-socials {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-sm);
}

.social-link {
    display: flex;
    align-items: center;
    gap: var(--ds-space-smd);
    padding: var(--ds-space-sm) var(--ds-space-smd);
    border-radius: var(--ds-radius-sm);
    font-size: 0.875rem;
    color: var(--ds-navy);
    text-decoration: none;
    transition: background var(--ds-transition-fast);
}

.social-link:hover { background: var(--ds-gray-light); text-decoration: none; }

.social-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ds-gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--ds-gray-medium);
    flex-shrink: 0;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: var(--ds-navy);
    color: var(--ds-white);
    padding: var(--ds-space-2xl) 0 var(--ds-space-lg);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--ds-space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--ds-space-lg);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--ds-space-smd);
}

.footer-brand strong { font-size: 1rem; }
.footer-brand small { display: block; font-size: 0.75rem; opacity: 0.5; }

.footer-links { display: flex; gap: var(--ds-space-xl); }

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    text-decoration: none;
}
.footer-links a:hover { color: var(--ds-white); }

.footer-copy { font-size: 0.75rem; opacity: 0.4; text-align: center; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .hero-nav { padding: var(--ds-space-md); }
    .hero-content { padding: var(--ds-space-xl) var(--ds-space-md); }

    .hero-search-fields {
        flex-direction: column;
        border-radius: var(--ds-radius-xl);
        padding: var(--ds-space-sm);
    }

    .search-field { width: 100%; }

    .combo-btn { width: 100%; border-radius: var(--ds-radius-md); }
    .combo-submit { border-radius: var(--ds-radius-md) 0 0 var(--ds-radius-md); flex: 1; justify-content: center; padding: var(--ds-space-md); }
    .combo-toggle { border-radius: 0 var(--ds-radius-md) var(--ds-radius-md) 0; }
    .combo-dropdown { left: 0; right: 0; }

    .topbar { padding: var(--ds-space-sm) var(--ds-space-md); }
    .topbar-inner { flex-wrap: wrap; }
    .topbar-search { order: 3; flex-basis: 100%; max-width: none; margin-top: var(--ds-space-sm); }
    .nav-btn--sm { display: none; }

    .trade-bar { top: 108px; }

    .pros-grid { grid-template-columns: 1fr; }

    .results-header { flex-direction: column; align-items: flex-start; }

    .footer-grid { flex-direction: column; gap: var(--ds-space-lg); text-align: center; }
    .footer-links { flex-direction: column; gap: var(--ds-space-sm); text-align: center; }
    .pro-card-actions { flex-wrap: wrap; }

    .detail-hero-top { flex-direction: column; text-align: center; }
    .detail-name-row { justify-content: center; }
    .detail-trades { justify-content: center; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-actions { grid-template-columns: 1fr; }
    .detail-service-summary { flex-direction: column; gap: var(--ds-space-sm); }
    .detail-service-meta { align-items: flex-start; text-align: left; flex-direction: row; gap: var(--ds-space-md); }
    .topbar-breadcrumb { display: none; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.75rem; }
    .hero-trades { display: none; }
}
