/* Carte « Les pros près de chez toi » et profil public. Couleurs : variables du thème (clair et sombre). */
.pros { display: grid; gap: 1rem; }
.pros-head h1 { margin-bottom: .25rem; }
.pros-head p { margin: 0; }

.pros-filters { display: grid; gap: .75rem; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.pros-row { display: grid; gap: .6rem; grid-template-columns: 1fr; }
.pros-field { display: grid; gap: .3rem; font-size: .8rem; font-weight: 600; color: var(--text-secondary); min-width: 0; }
.pros-field select, .pros-field input { min-height: 44px; padding: 0 .75rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--background); color: var(--text-primary); font: inherit; font-size: .95rem; width: 100%; }
.pros-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.pros-actions .btn { min-height: 44px; }
.pros-filters .hint { margin: 0; }

.pros-layout { display: grid; gap: 1rem; }
.pros-map { position: relative; width: 100%; height: 360px; border-radius: var(--radius-md); border: 1px solid var(--border); overflow: hidden; background: var(--slate-soft); z-index: 0; }
.pros-side { display: grid; gap: .6rem; align-content: start; min-width: 0; }
.pros-list { display: grid; gap: .6rem; }
.pros-empty { display: grid; justify-items: center; gap: .4rem; padding: 1.5rem 1rem; text-align: center; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius-md); color: var(--text-secondary); }
.pros-empty p { margin: 0; }

/* Carte des professionnels : repères circulaires à la photo */
.pm-marker-host { background: none; border: 0; }
.pm-marker { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; border: 3px solid var(--surface); box-shadow: 0 2px 6px rgba(15,23,42,.25); background: var(--primary-soft); display: grid; place-items: center; cursor: pointer; }
.pm-marker.is-premium { border-color: var(--success); }
.pm-photo { width: 100%; height: 100%; object-fit: cover; }
.pm-initials { font-weight: 800; color: var(--primary); font-size: .9rem; }
.pm-popup { min-width: 200px; }

/* Cartes de la liste */
.pro-item { display: grid; gap: .5rem; padding: .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer; transition: border-color .15s; }
.pro-item:hover { border-color: var(--primary); }
.pro-item.is-selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.pro-item-top { display: flex; gap: .75rem; align-items: flex-start; min-width: 0; }
.pro-item-top > .pm-photo, .pro-item-top > .pm-initials, .pro-item-top > img { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--primary-soft); }
.pro-item-body { display: grid; gap: .2rem; min-width: 0; }
.pro-item-name { font-weight: 800; color: var(--text-primary); overflow-wrap: anywhere; }
.pro-item-headline { margin: 0; font-size: .9rem; color: var(--text-primary); }
.pro-item-meta { margin: 0; }
.pro-chips-sm { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.pro-chips-sm li { padding: .15rem .5rem; border-radius: 999px; background: var(--slate-soft); font-size: .75rem; font-weight: 600; color: var(--text-secondary); }
.pro-item .btn { justify-self: start; }
.pill-premium { flex: none; width: fit-content; padding: .05rem .4rem; border-radius: 999px; font-size: .66rem; font-weight: 700; color: var(--success-ink); background: var(--success-soft); border: 1px solid var(--success); }

/* Profil public */
.pro-profile { display: grid; justify-items: center; gap: .6rem; padding: 1.75rem 1.25rem; max-width: 560px; margin: 0 auto; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.pro-avatar { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; }
.pro-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pro-name { margin: 0; font-size: 1.35rem; font-weight: 800; color: var(--text-primary); }
.pro-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.pro-headline { margin: 0; font-weight: 600; color: var(--text-primary); }
.pro-block { width: 100%; text-align: left; display: grid; gap: .4rem; }
.pro-block h2 { margin: 0; font-size: 1rem; font-weight: 800; }
.pro-block p { margin: 0; }
.pro-chips { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.pro-chips li { padding: .2rem .6rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .8rem; font-weight: 600; }

/* Visibilité sur la carte (page Profil, modification) */
.pro-visibility { display: grid; gap: .75rem; }
.pro-visibility h2 { margin: 0; }
.pro-visibility p { margin: 0; }
.pro-gps-form, .pro-city-form { display: grid; gap: .4rem; }
.pro-city-row { display: grid; gap: .5rem; grid-template-columns: 1fr; }
.pro-city-row select { min-height: 44px; padding: 0 .75rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--background); color: var(--text-primary); font: inherit; }

/* Tablette et ordinateur : carte à gauche, liste à droite */
@media (min-width: 640px) {
    .pros-row { grid-template-columns: repeat(3, 1fr); }
    .pro-city-row { grid-template-columns: 1fr auto; }
}
@media (min-width: 1024px) {
    .pros-layout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
    .pros-map { height: 620px; position: sticky; top: 1rem; }
    .pros-side { max-height: 620px; overflow-y: auto; padding-right: .25rem; }
}

/* Repère avec nom : photo ronde + étiquette du nom */
.pm-pin { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 140px; }
.pm-pin .pm-marker { flex: none; }
.pm-pin.is-premium .pm-marker { border-color: var(--success); }
.pm-label { max-width: 130px; padding: 2px 8px; border-radius: 999px; background: var(--surface); color: var(--text-primary); border: 1px solid var(--border); box-shadow: 0 2px 6px rgba(15, 23, 42, .18); font-size: 12px; font-weight: 700; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Liste des pros ===== */
.pros-list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.pros-list-head p { margin: .2rem 0 0; }
.pros-map-btn { min-height: 48px; display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; }
.pros-sector-note { margin: .25rem 0 .75rem; }
.pro-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 640px) { .pro-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .pro-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pro-card { position: relative; display: grid; gap: .6rem; align-content: start; height: 100%; min-width: 0; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: border-color .18s ease, box-shadow .18s ease; }
.pro-card:hover { border-color: var(--primary); box-shadow: 0 6px 18px rgba(37, 99, 235, .12); }
.pro-card.is-sector { border-left: 4px solid var(--success); }
.pro-card-link { position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.pro-card-link:focus-visible { outline: 3px solid var(--primary-ring, rgba(37,99,235,.35)); outline-offset: 3px; }
.pro-card-top, .pro-card-rating, .pro-chips-domain, .pro-card-meta { position: relative; z-index: 1; pointer-events: none; }
.pro-card-top { display: flex; gap: .85rem; align-items: flex-start; min-width: 0; }
.pro-card-photo { flex: none; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--primary-soft); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--border); }
.pro-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.pro-card-initials { font-weight: 800; font-size: 1.2rem; color: var(--primary); }
.pro-card-id { min-width: 0; display: grid; gap: .25rem; }
.pro-card-name { margin: 0; font-size: 1.02rem; font-weight: 800; color: var(--text-primary); overflow-wrap: anywhere; }
.pro-card-head { margin: 0; font-size: .88rem; color: var(--text-primary); }
.pro-card-badges { display: flex; flex-wrap: wrap; gap: .35rem; }
.pro-card-rating { margin: 0; font-size: .9rem; }
.pro-card-meta { margin: 0; }
.badge-sector { display: inline-flex; align-items: center; padding: .15rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 800; color: #047857; background: #D1FAE5; border: 1px solid #10B981; white-space: nowrap; }
.pro-item-rating { margin: 0; font-size: .85rem; font-weight: 700; color: var(--text-primary); }
.pro-item-badges { display: flex; flex-wrap: wrap; gap: .35rem; }
.pro-chips-domain { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.pro-chips-domain li { padding: .15rem .55rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .74rem; font-weight: 700; }
.pros-filters[hidden] { display: none; }
.stars-sm { color: #F59E0B; letter-spacing: .05em; }

/* ===== Carte plein écran ===== */
.pros-full { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: auto auto 1fr auto; background: var(--background); }
.pros-full-top { display: flex; align-items: center; gap: .75rem; padding: calc(env(safe-area-inset-top, 0px) + .6rem) .9rem .6rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.pros-full-title { flex: 1; margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--text-primary); text-align: center; }
.pros-back, .pros-toggle { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: 0 .85rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-primary); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.pros-back:hover, .pros-toggle:hover { border-color: var(--primary); color: var(--primary); }
.pros-filters-full { max-height: 46vh; overflow-y: auto; margin: 0; border-radius: 0; border-left: 0; border-right: 0; box-shadow: 0 8px 24px rgba(15,23,42,.12); z-index: 2; }
.pros-map-full { width: 100%; height: 100%; min-height: 240px; z-index: 0; }
.pros-sheet { display: grid; grid-template-rows: auto 1fr; max-height: 38vh; padding: .6rem .9rem calc(env(safe-area-inset-bottom, 0px) + .7rem); background: var(--surface); border-top: 1px solid var(--border); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 24px rgba(15,23,42,.10); }
.pros-sheet-count { margin: 0 0 .4rem; }
.pros-sheet .pros-list { display: flex; gap: .7rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .4rem; }
.pros-sheet .pro-item { flex: 0 0 min(78vw, 300px); scroll-snap-align: start; }
@media (min-width: 900px) {
  .pros-full { grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: auto auto 1fr; }
  .pros-full-top { grid-column: 1 / -1; }
  .pros-filters-full { grid-column: 1 / -1; }
  .pros-map-full { grid-column: 1; grid-row: 3; }
  .pros-sheet { grid-column: 2; grid-row: 3; grid-template-rows: auto 1fr; max-height: none; border-radius: 0; border-top: 0; border-left: 1px solid var(--border); overflow-y: auto; }
  .pros-sheet .pros-list { flex-direction: column; overflow: visible; }
  .pros-sheet .pro-item { flex: none; }
}

/* ===== Avis ===== */
.review-card { display: grid; gap: .75rem; }
.review-card h2 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.review-card p { margin: 0; }
.stars-field { border: 0; padding: 0; margin: 0; }
.stars-field legend { font-weight: 700; font-size: .9rem; margin-bottom: .4rem; }
.stars-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.stars-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-input label { font-size: 2.1rem; line-height: 1; padding: 0 .08rem; color: var(--border); cursor: pointer; transition: color .12s ease; }
.stars-input label:hover, .stars-input label:hover ~ label, .stars-input input:checked ~ label { color: #F59E0B; }
.stars-input input:focus-visible ~ label { outline: 2px solid var(--primary); outline-offset: 2px; }

/* « Ma position » : toujours visible sur la carte plein écran */
.pros-locate-bar { position: absolute; top: 3.9rem; right: .75rem; z-index: 5; display: grid; gap: .35rem; justify-items: end; max-width: min(92vw, 300px); }
.pros-locate-btn { min-height: 46px; padding: 0 1rem; border-radius: 999px; box-shadow: 0 6px 18px rgba(15, 23, 42, .22); }
.pros-locate-status { margin: 0; padding: .4rem .7rem; border-radius: 12px; background: var(--surface); color: var(--text-primary); font-size: .8rem; line-height: 1.35; box-shadow: 0 2px 8px rgba(15, 23, 42, .15); text-align: right; }
.pros-locate-status:empty { display: none; }
.pros-full { position: fixed; }
