/* ========================================================
   MarocPsy - Design System Portail Médical & Annuaire Pro
   Style Rectiligne (Sharp Borders - Sans arrondis)
   Grille 2 Colonnes (2 Cartes par Ligne) avec Photos
   ======================================================== */

:root {
    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --border-subtle: #e2e8f0;
    --brand-primary: #0f172a;
    --brand-accent: #2563eb;
    --brand-accent-hover: #1d4ed8;
    --whatsapp-green: #286ed0;
    --whatsapp-green-hover: #2058a7;
    --accent-amber: #d97706;
    --accent-emerald: #194582;
    --accent-blue: #2563eb;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

[dir="rtl"] body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 20px 16px;
    width: 100%;
}

/* ========================================================
   HEADER & NAVIGATION PORTAIL (Clean Single-Row & Rectiligne)
   ======================================================== */
.psy-header-portal {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-top: 3px solid var(--brand-accent);
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    margin-bottom: 24px;
    width: 100%;
}

.psy-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap; /* STRICTION : Reste sur une seule ligne sur desktop */
    padding: 10px 20px;
    gap: 16px;
    min-height: 64px;
}

/* 1. Logo & Identité Médicale */
.psy-brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.psy-brand-mark {
    width: 40px;
    height: 40px;
    background: var(--brand-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border-radius: 0;
    flex-shrink: 0;
}

.psy-brand-text {
    display: flex;
    flex-direction: column;
}

.psy-brand-name {
    font-size: 1.35rem;
    font-weight: 850;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.psy-brand-tagline {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* 2. Navigation Desktop */
.psy-header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.psy-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.psy-nav-item:hover {
    color: var(--brand-accent);
    background: #f8fafc;
    border-color: #e2e8f0;
}

.psy-nav-item.active {
    color: var(--brand-primary);
    background: #f1f5f9;
    border-color: #cbd5e1;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

/* 2.1 Sous-menu Déroulant Desktop (Spécialités, Compétences & Techniques) */
.psy-nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.psy-nav-caret {
    font-size: 0.62rem;
    margin-left: 3px;
    color: #64748b;
    transition: transform 0.2s ease, color 0.15s ease;
}

[dir="rtl"] .psy-nav-caret {
    margin-left: 0;
    margin-right: 3px;
}

.psy-nav-dropdown:hover .psy-nav-caret,
.psy-nav-dropdown:focus-within .psy-nav-caret,
.psy-nav-dropdown.is-open .psy-nav-caret {
    transform: rotate(180deg);
    color: var(--brand-accent);
}

.psy-nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 320px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-top: 3px solid var(--brand-accent);
    border-radius: 0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    z-index: 1200;
    display: none;
    flex-direction: column;
    padding: 6px;
    gap: 3px;
    margin-top: 4px;
}

[dir="rtl"] .psy-nav-dropdown-menu {
    left: auto;
    right: 0;
}

/* Zone invisible de sécurité pour ne pas fermer le menu lors du survol */
.psy-nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.psy-nav-dropdown:hover .psy-nav-dropdown-menu,
.psy-nav-dropdown:focus-within .psy-nav-dropdown-menu,
.psy-nav-dropdown.is-open .psy-nav-dropdown-menu {
    display: flex;
}

.psy-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--text-primary);
    background: #ffffff;
    border: 1px solid transparent;
    border-radius: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.psy-dropdown-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.psy-dropdown-item.active {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.psy-dropdown-item-icon {
    width: 36px;
    height: 36px;
    background: #f1f5f9;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    border: 1px solid #e2e8f0;
    border-radius: 0;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.psy-dropdown-item:hover .psy-dropdown-item-icon {
    background: #ffffff;
    color: var(--brand-accent);
    border-color: #93c5fd;
}

.psy-dropdown-item.active .psy-dropdown-item-icon {
    background: var(--brand-accent);
    color: #ffffff;
    border-color: var(--brand-accent);
}

.psy-dropdown-item-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    text-align: left;
}

[dir="rtl"] .psy-dropdown-item-content {
    text-align: right;
}

.psy-dropdown-item-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.psy-dropdown-item:hover .psy-dropdown-item-title {
    color: var(--brand-accent);
}

.psy-dropdown-item.active .psy-dropdown-item-title {
    color: var(--brand-accent);
}

.psy-dropdown-item-sub {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.25;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.psy-dropdown-item-check {
    font-size: 0.75rem;
    color: var(--brand-accent);
    flex-shrink: 0;
}

/* 3. Actions Header */
.psy-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.psy-lang-toggle-wrap {
    position: relative;
}

.psy-lang-toggle-menu {
    position: relative;
    user-select: none;
}

.psy-lang-toggle-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0;
    padding: 0 12px;
    height: 38px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    list-style: none;
    transition: all 0.15s ease;
}

.psy-lang-toggle-trigger::-webkit-details-marker {
    display: none;
}

.psy-lang-toggle-trigger:hover,
.psy-lang-toggle-menu[open] .psy-lang-toggle-trigger {
    background: #ffffff;
    border-color: var(--brand-accent);
    color: var(--brand-accent);
}

.psy-lang-globe-icon {
    font-size: 0.88rem;
    color: #64748b;
}

.psy-lang-current-code {
    letter-spacing: 0.04em;
}

.psy-lang-arrow {
    font-size: 0.65rem;
    color: #64748b;
    transition: transform 0.2s ease;
}

.psy-lang-toggle-menu[open] .psy-lang-arrow {
    transform: rotate(180deg);
}

.psy-lang-options-panel {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 175px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}

[dir="rtl"] .psy-lang-options-panel {
    right: auto;
    left: 0;
}

.psy-lang-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: background 0.12s;
    border-radius: 0;
}

.psy-lang-option:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.psy-lang-option.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 700;
}

.psy-lang-flag {
    font-size: 1rem;
    line-height: 1;
}

.psy-lang-name {
    flex: 1;
}

.psy-lang-badge {
    font-size: 0.68rem;
    padding: 2px 6px;
    background: #e2e8f0;
    color: #475569;
    border-radius: 0;
    font-weight: 700;
}

.psy-lang-option.active .psy-lang-badge {
    background: #dbeafe;
    color: #1d4ed8;
}

.psy-lang-check {
    font-size: 0.72rem;
    color: #2563eb;
}

/* Boutons Sharp */
.psy-btn-sharp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: 38px;
    background: var(--brand-primary);
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 600;
    border: 1px solid var(--brand-primary);
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}

.psy-btn-sharp:hover {
    background: #1e293b;
    border-color: #1e293b;
}

/* Bouton Hamburger Mobile */
.psy-burger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0;
    color: var(--text-primary);
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.psy-burger-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: var(--brand-accent);
}

/* ========================================================
   MENU MOBILE / OFFCANVAS DRAWER RECTILIGNE
   ======================================================== */
.psy-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.psy-drawer-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.psy-mobile-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 320px;
    max-width: 86vw;
    background: #ffffff;
    z-index: 99999;
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s ease;
    overflow-y: auto;
    border-left: 3px solid var(--brand-accent);
}

[dir="rtl"] .psy-mobile-drawer {
    right: auto;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 8px 0 32px rgba(15, 23, 42, 0.25);
    border-left: none;
    border-right: 3px solid var(--brand-accent);
}

.psy-mobile-drawer.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

/* En-tête du Drawer */
.psy-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.psy-drawer-close-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0;
    font-size: 1.1rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.psy-drawer-close-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* Corps du Drawer */
.psy-drawer-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.psy-drawer-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.psy-drawer-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Navigation items inside drawer */
.psy-drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.psy-drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 0;
    transition: all 0.15s ease;
    background: #f8fafc;
}

.psy-drawer-link:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.psy-drawer-link.active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    font-weight: 700;
}

.psy-drawer-icon {
    width: 22px;
    color: #2563eb;
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
}

.psy-drawer-text {
    flex: 1;
}

.psy-drawer-arrow {
    font-size: 0.75rem;
    color: #94a3b8;
}

[dir="rtl"] .psy-drawer-arrow {
    transform: rotate(180deg);
}

/* Villes phares dans drawer */
.psy-drawer-city-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.psy-drawer-city-pill {
    padding: 7px 10px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    text-align: center;
    border-radius: 0;
    transition: all 0.12s ease;
}

.psy-drawer-city-pill:hover {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
}

/* Sélecteur de langue tactile mobile */
.psy-drawer-lang-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.psy-drawer-lang-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    text-decoration: none;
    transition: all 0.12s ease;
}

.psy-drawer-lang-btn:hover {
    background: #f1f5f9;
}

.psy-drawer-lang-btn.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

/* CTA Pro Drawer */
.psy-drawer-pro-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: #ffffff;
    border: 1px solid #2563eb;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.psy-drawer-pro-btn:hover {
    background: #1d4ed8;
}

.psy-drawer-footer-info {
    margin-top: auto;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

/* Responsive Media Queries pour Header */
@media (max-width: 1240px) and (min-width: 1061px) {
    .psy-header-inner {
        padding: 8px 14px;
        gap: 8px;
    }

    .psy-brand-wrap {
        gap: 8px;
    }

    .psy-brand-tagline {
        display: none;
    }

    .psy-nav-item {
        padding: 6px 8px;
        font-size: 0.8rem;
        gap: 4px;
    }

    .psy-btn-sharp {
        padding: 0 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 1060px) {
    .psy-header-nav {
        display: none !important; /* Cacher le menu étalé sur tablette / mobile */
    }

    .psy-btn-register {
        display: none !important; /* Cacher le gros bouton CTA (présent dans le tiroir mobile) */
    }

    .psy-burger-btn {
        display: inline-flex !important; /* Afficher le bouton hamburger */
    }
}

@media (max-width: 580px) {
    .psy-header-inner {
        padding: 8px 14px;
    }

    .psy-brand-tagline {
        display: none; /* Simplifier sur très petits écrans pour garder tout sur une ligne nette */
    }

    .psy-brand-name {
        font-size: 1.2rem;
    }

    .psy-brand-mark {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}


/* ========================================================
   HERO BANNER SIMPLISTE
   ======================================================== */
.psy-hero-simple {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 30px 24px;
    margin-bottom: 20px;
}

.psy-hero-content {
    max-width: 980px;
    margin: 0 auto;
    text-align: center;
}

.psy-hero-headline {
    font-size: clamp(1.45rem, 2.6vw, 2rem);
    font-weight: 850;
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.psy-hero-subline {
    font-size: 0.94rem;
    color: #475569;
    max-width: 700px;
    margin: 0 auto 22px;
    line-height: 1.5;
}

/* Barre de recherche unifiée (Sans arrondis) */
.psy-search-bar-unified {
    display: flex;
    border: 2px solid #0f172a;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    margin-bottom: 16px;
}

.psy-search-block {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    border-right: 1px solid #cbd5e1;
    background: #ffffff;
}

[dir="rtl"] .psy-search-block {
    border-right: none;
    border-left: 1px solid #cbd5e1;
}

.psy-search-block:last-of-type {
    border-right: none;
}

.psy-search-block-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 0.9rem;
    pointer-events: none;
}

[dir="rtl"] .psy-search-block-icon {
    left: auto;
    right: 14px;
}

.psy-search-block-input,
.psy-search-block-select {
    width: 100%;
    padding: 12px 14px 12px 38px;
    border: none;
    font-size: 0.88rem;
    outline: none;
    background: transparent;
    color: #0f172a;
}

[dir="rtl"] .psy-search-block-input,
[dir="rtl"] .psy-search-block-select {
    padding: 12px 38px 12px 14px;
}

.psy-search-submit {
    background: var(--brand-primary);
    color: #ffffff;
    border: none;
    padding: 0 24px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
    white-space: nowrap;
}

.psy-search-submit:hover {
    background: #2563eb;
}

/* Bloc Ville Détectable & Recherchable */
.psy-search-city-block {
    position: relative;
}

.psy-city-search-input {
    padding-right: 68px !important;
}

[dir="rtl"] .psy-city-search-input {
    padding-right: 38px !important;
    padding-left: 68px !important;
}

.psy-city-actions {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 5;
}

[dir="rtl"] .psy-city-actions {
    right: auto;
    left: 8px;
}

.psy-city-action-btn {
    background: transparent;
    border: none;
    padding: 6px 8px;
    border-radius: 4px;
    color: #64748b;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background-color 0.15s, transform 0.15s;
}

.psy-city-action-btn:hover {
    color: var(--brand-primary);
    background-color: #f1f5f9;
}

.psy-geo-detect-btn {
    color: #0284c7;
}

.psy-geo-detect-btn:hover {
    color: #0369a1;
    background-color: #e0f2fe;
}

.psy-geo-detect-btn.is-locating {
    color: #0284c7;
    cursor: wait;
}

.psy-city-clear-btn {
    color: #94a3b8;
}

.psy-city-clear-btn:hover {
    color: #ef4444;
    background-color: #fee2e2;
}

/* Menu déroulant des suggestions */
.psy-city-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.psy-city-suggestions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 2;
}

.psy-city-option-all {
    background: transparent;
    border: none;
    color: var(--brand-primary);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}

.psy-city-option-all:hover {
    background: #e2e8f0;
    text-decoration: underline;
}

.psy-city-suggestions-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.psy-city-suggestion-item {
    padding: 8px 14px;
    font-size: 0.88rem;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: background-color 0.1s, color 0.1s;
}

.psy-city-suggestion-item:hover,
.psy-city-suggestion-item.is-active {
    background-color: #f1f5f9;
    color: var(--brand-primary);
}

.psy-city-suggestion-names {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.psy-city-name-primary {
    font-weight: 600;
}

.psy-city-name-secondary {
    font-size: 0.8rem;
    color: #64748b;
}

.psy-city-badge-major {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #f1f5f9;
    color: #475569;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    letter-spacing: 0.03em;
}

.psy-city-empty-item {
    padding: 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}

.psy-search-city-block.is-highlighted {
    animation: psyCityPulse 1.2s ease-out;
}

@keyframes psyCityPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(2, 132, 199, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(2, 132, 199, 0);
    }
}

/* Tags de recherche rapide */
.psy-hero-tags {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.8rem;
}

.psy-tags-label {
    font-weight: 700;
    color: #64748b;
}

.psy-tags-separator {
    color: #cbd5e1;
    margin: 0 4px;
}

.psy-tag-link {
    color: #2563eb;
    text-decoration: none;
    padding: 2px 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    transition: all 0.15s;
}

.psy-tag-link:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* ========================================================
   TOOLBAR & FILTRES PAR MOTIFS
   ======================================================== */
.psy-toolbar-sharp {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.psy-toolbar-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.psy-filter-tabs-sharp {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.psy-tab-sharp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: #f8fafc;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0;
    transition: all 0.15s;
}

.psy-tab-sharp:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.psy-tab-sharp.active {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
}

.psy-tab-count {
    background: rgba(0, 0, 0, 0.08);
    padding: 1px 6px;
    font-size: 0.72rem;
    font-weight: 700;
}

.psy-tab-sharp.active .psy-tab-count {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.psy-toolbar-right-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.psy-btn-sharp-reset {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.psy-btn-sharp-reset:hover {
    color: #ef4444;
    border-color: #ef4444;
}

/* Motifs fréquents (Chips rectilignes) */
.psy-reasons-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px dashed var(--border-subtle);
}

.psy-reasons-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
}

.psy-reason-chip {
    padding: 4px 9px;
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
    font-size: 0.76rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.15s;
}

.psy-reason-chip:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0369a1;
}

/* ========================================================
   GRILLE 2 COLONNES (DEUX CARTES PAR LIGNE SUR DESKTOP)
   ======================================================== */
.psy-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 992px) {
    .psy-grid-2col {
        grid-template-columns: 1fr;
    }
}

/* ========================================================
   CARTE PRATICIEN AVEC PHOTO (Style Rectiligne Sharp)
   ======================================================== */
.psy-card-sharp-2col {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
    position: relative;
    overflow: hidden;
}

.psy-card-sharp-2col:hover {
    border-color: #64748b;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

/* Bordures latérales d'accentuation */
.border-l-amber {
    border-left: 4px solid var(--accent-amber);
}
[dir="rtl"] .border-l-amber {
    border-left: 1px solid var(--border-color);
    border-right: 4px solid var(--accent-amber);
}

.border-l-emerald {
    border-left: 4px solid var(--accent-emerald);
}
[dir="rtl"] .border-l-emerald {
    border-left: 1px solid var(--border-color);
    border-right: 4px solid var(--accent-emerald);
}

.border-l-blue {
    border-left: 4px solid var(--accent-blue);
}
[dir="rtl"] .border-l-blue {
    border-left: 1px solid var(--border-color);
    border-right: 4px solid var(--accent-blue);
}

/* Corps interne de la carte */
.psy-card-inner {
    display: grid;
    grid-template-columns: 135px minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
    align-items: start;
}

@media (max-width: 540px) {
    .psy-card-inner {
        grid-template-columns: 1fr;
    }
}

/* Colonne Média (Photo / Note / Tarif) */
.psy-card-media-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.psy-photo-wrapper {
    width: 100%;
    height: 145px;
    position: relative;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    overflow: hidden;
}

.psy-practitioner-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.psy-photo-verified-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(25,69,130, 0.9);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 4px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Avatar Sharp de fallback */
.psy-avatar-sharp {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.4rem;
    border-radius: 0;
}

.psy-avatar-sharp.theme-amber {
    background: #fef3c7;
    color: #92400e;
}

.psy-avatar-sharp.theme-emerald {
    background: #d4e3f7;
    color: #102d55;
}

.psy-avatar-sharp.theme-blue {
    background: #dbeafe;
    color: #1e40af;
}

.psy-media-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.76rem;
}

.psy-stars-score {
    color: #eab308;
    font-weight: 800;
}

.psy-reviews-count {
    color: #64748b;
}

.psy-media-fee {
    display: flex;
    flex-direction: column;
    font-size: 0.78rem;
    width: 100%;
    border-top: 1px solid #f1f5f9;
    padding-top: 6px;
}

.psy-fee-amount {
    font-weight: 800;
    color: #0f172a;
}

.psy-fee-insurance {
    font-size: 0.7rem;
    color: #194582;
    font-weight: 600;
}

/* Colonne Données Praticien */
.psy-card-body-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.psy-card-header-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.psy-practitioner-fullname {
    font-size: 1.15rem;
    font-weight: 850;
    line-height: 1.25;
    margin: 0;
}

.psy-name-link {
    color: #0f172a;
    text-decoration: none;
}

.psy-name-link:hover {
    color: var(--brand-accent);
}

.psy-specialty-line {
    font-size: 0.84rem;
    color: #475569;
    margin-top: 2px;
}

.psy-spec-text {
    color: #1e293b;
    font-weight: 700;
}

.psy-meta-bullet {
    color: #cbd5e1;
    margin: 0 4px;
}

.psy-quick-icons {
    display: flex;
    gap: 4px;
}

.psy-icon-btn {
    background: none;
    border: 1px solid transparent;
    color: #94a3b8;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
}

.psy-icon-btn:hover {
    color: #0f172a;
    border-color: #cbd5e1;
    background: #f8fafc;
}

/* Badges de Disponibilité */
.psy-status-badges-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 3px 0;
}

.psy-badge-sharp {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 0 !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.psy-badge-availability {
    background: #f1f6fc;
    color: #18427d;
    border: 1px solid #bfd5f3;
}

.psy-badge-teleconsult {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.psy-badge-cabinet {
    background: #f8fafc;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.psy-live-dot {
    width: 6px;
    height: 6px;
    background: #1e529b;
    display: inline-block;
}

/* Lignes Adresse, Téléphone, Publics */
.psy-location-line {
    font-size: 0.8rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.psy-phone-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
}

.psy-phone-number {
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
}

.psy-copy-btn-minimal {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    font-size: 0.7rem;
    font-weight: 600;
    color: #475569;
    padding: 2px 6px;
    cursor: pointer;
}

.psy-copy-btn-minimal:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.psy-audiences-line {
    font-size: 0.76rem;
    color: #64748b;
}

/* Callout Citation */
.psy-card-quote {
    background: #f8fafc;
    border-left: 3px solid #6366f1;
    padding: 8px 10px;
    font-size: 0.78rem;
    color: #334155;
    line-height: 1.4;
    margin-top: 4px;
}

[dir="rtl"] .psy-card-quote {
    border-left: none;
    border-right: 3px solid #6366f1;
}

.psy-quote-symbol {
    color: #6366f1;
    font-weight: 800;
    margin-right: 3px;
}

[dir="rtl"] .psy-quote-symbol {
    margin-right: 0;
    margin-left: 3px;
}

/* Barre d'Actions (Boutons au bas de carte) */
.psy-card-actions-bar {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.3fr 0.8fr;
    gap: 6px;
    padding: 10px 14px;
    border-top: 1px solid #f1f5f9;
    background: #fcfdfe;
}

.psy-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 7px 6px;
    text-decoration: none;
    border-radius: 0;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.psy-action-wa {
    background: var(--whatsapp-green);
    color: #ffffff;
    border: 1px solid var(--whatsapp-green);
}

.psy-action-wa:hover {
    background: var(--whatsapp-green-hover);
}

.psy-action-call {
    background: #ffffff;
    color: var(--brand-accent);
    border: 1px solid var(--brand-accent);
}

.psy-action-call:hover {
    background: #eff6ff;
}

.psy-action-book {
    background: var(--brand-primary);
    color: #ffffff;
    border: 1px solid var(--brand-primary);
}

.psy-action-book:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.psy-action-profile {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.psy-action-profile:hover {
    background: #f8fafc;
    color: #0f172a;
}

/* ========================================================
   SECTIONS DU PORTAIL SEO & LIENS VILLES
   ======================================================== */
.psy-portal-sections {
    border-top: 1px solid var(--border-color);
    padding-top: 32px;
    margin-top: 40px;
}

.psy-portal-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 24px;
}

.psy-portal-block-title {
    font-size: 1.05rem;
    font-weight: 850;
    color: #0f172a;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.psy-portal-links-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.psy-portal-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: all 0.15s;
}

.psy-portal-link:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--brand-accent);
}

.psy-portal-info-box {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.psy-guarantee-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.82rem;
    color: #475569;
}

.psy-guarantee-item strong {
    color: #0f172a;
    display: block;
    margin-bottom: 2px;
}

.psy-guarantee-item p {
    margin: 0;
    line-height: 1.45;
}

/* Modales & Inputs Sharp */
.psy-input-sharp {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 0 !important;
    font-size: 0.85rem;
    outline: none;
    background: #ffffff;
}

.psy-input-sharp:focus {
    border-color: var(--brand-accent);
}

.psy-modal-overlay {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Empty State */
.psy-empty-state {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 48px 24px;
    text-align: center;
    margin-bottom: 30px;
}

/* Toast */
.psy-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 0 !important;
    font-size: 0.86rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: none;
    align-items: center;
    gap: 8px;
}

[dir="rtl"] .psy-toast {
    right: auto;
    left: 24px;
}

/* Footer */
.psy-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
    padding: 24px 20px;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .psy-search-bar-unified {
        flex-direction: column;
    }
    .psy-search-block {
        border-right: none;
        border-bottom: 1px solid #cbd5e1;
    }
    .psy-search-submit {
        padding: 14px;
        justify-content: center;
    }
    .psy-header-card {
        flex-direction: column;
        align-items: stretch;
    }
    .psy-header-actions {
        justify-content: space-between;
    }
    .psy-card-actions-bar {
        grid-template-columns: 1fr 1fr;
    }
}

/* ========================================================
   COMPOSANTS ISSUS DU MÉLANGE HARMONIEUX (Directory & Répertoire)
   ======================================================== */
.psy-kbd-hint {
    position: absolute;
    right: 12px;
    font-size: 11px;
    font-family: monospace;
    font-weight: 700;
    color: #94a3b8;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 0;
    padding: 1px 6px;
    pointer-events: none;
    line-height: 1.4;
}

[dir="rtl"] .psy-kbd-hint {
    right: auto;
    left: 12px;
}



.psy-approach-preview {
    background: #f8fafc;
    border-left: 3px solid #2563eb;
    padding: 8px 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.84rem;
    color: #334155;
    line-height: 1.4;
}

[dir="rtl"] .psy-approach-preview {
    border-left: none;
    border-right: 3px solid #2563eb;
}

/* Modales Standards Rectilignes */
.psy-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.psy-modal-container {
    background: #ffffff;
    border-radius: 0;
    border: 1px solid #cbd5e1;
    width: 100%;
    max-width: 640px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.psy-modal-header {
    background: #0f172a;
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #2563eb;
}

.psy-modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.psy-modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.15s;
}

.psy-modal-close:hover {
    color: #ffffff;
}



