/* ============================================================
   COURTIERS.CSS — Page "Trouver votre courtier"
   ACE Cover v1.0
============================================================ */

/* Fix : [hidden] doit toujours masquer même si une classe force display */
[hidden] { display: none !important; }

/* ─── HERO ───────────────────────────────────────────────── */
.crt-hero {
  position: relative;
  padding: 100px 0 64px;
  background: var(--navy-dark);
  overflow: hidden;
}
.crt-hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 20% 50%, rgba(10,92,245,.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 80% 30%, rgba(91,155,213,.10) 0%, transparent 55%);
  pointer-events: none;
}
.crt-hero-inner { position: relative; z-index: 1; max-width: 680px; }

.crt-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: .8rem; color: rgba(255,255,255,.38);
  margin-bottom: 24px;
}
.crt-breadcrumb a { color: rgba(255,255,255,.38); text-decoration: none; transition: color .2s; }
.crt-breadcrumb a:hover { color: rgba(255,255,255,.7); }

.crt-hero-label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--sky); background: rgba(91,155,213,.12); border: 1px solid rgba(91,155,213,.22);
  border-radius: var(--r-pill); padding: 5px 14px; margin-bottom: 20px;
}
.crt-hero-label svg { width: 13px; height: 13px; stroke: var(--sky); fill: none; }

.crt-hero-title {
  font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 900;
  color: var(--white); line-height: 1.1; margin-bottom: 14px;
  letter-spacing: -.02em;
}
.crt-hero-title em { font-style: normal; color: var(--sky); }

.crt-hero-sub {
  font-size: 1rem; color: rgba(255,255,255,.52);
  line-height: 1.65; margin-bottom: 36px; max-width: 560px;
}

/* Barre de recherche */
.crt-search-bar { margin-bottom: 32px; }
.crt-search-inner {
  display: flex; align-items: center; gap: 0;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.18);
  border-radius: 14px; overflow: hidden;
  transition: border-color .2s, background .2s;
}
.crt-search-inner:focus-within {
  border-color: rgba(255,255,255,.45);
  background: rgba(255,255,255,.12);
}
.crt-search-ico {
  flex-shrink: 0; width: 16px; height: 16px;
  stroke: rgba(255,255,255,.38); margin-left: 18px;
}
.crt-search-input {
  flex: 1; background: transparent; border: none; outline: none;
  padding: 16px 14px; color: var(--white);
  font-size: 1rem; font-family: inherit; font-weight: 500;
  letter-spacing: .05em;
}
.crt-search-input::placeholder { color: rgba(255,255,255,.30); font-weight: 400; letter-spacing: 0; }
.crt-search-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--cobalt); color: var(--white);
  border: none; cursor: pointer; padding: 16px 24px;
  font-size: .9rem; font-weight: 700; font-family: inherit;
  transition: background .2s; white-space: nowrap; flex-shrink: 0;
}
.crt-search-btn:hover { background: var(--cobalt-dark); }

/* Stats hero */
.crt-hero-stats {
  display: flex; align-items: center; gap: 20px;
  flex-wrap: wrap;
}
.crt-stat { display: flex; flex-direction: column; gap: 2px; }
.crt-stat-val { font-size: 1.1rem; font-weight: 800; color: var(--white); }
.crt-stat-label { font-size: .75rem; color: rgba(255,255,255,.38); }
.crt-stat-sep { width: 1px; height: 32px; background: rgba(255,255,255,.12); }

/* ─── ZONE RÉSULTATS ─────────────────────────────────────── */
.crt-results-wrap { padding: 56px 0 80px; min-height: 320px; }

/* États génériques */
.crt-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  padding: 64px 20px; gap: 12px;
}
.crt-state-icon svg {
  width: 56px; height: 56px;
  stroke: var(--gray-300); fill: none;
  margin-bottom: 8px;
}
.crt-state-icon--empty svg { stroke: var(--sky); }
.crt-state-icon--error svg { stroke: #f87171; }
.crt-state-title { font-size: 1.2rem; font-weight: 700; color: var(--gray-700); }
.crt-state-sub { font-size: .9rem; color: var(--gray-400); max-width: 440px; line-height: 1.6; }
.crt-empty-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* Spinner */
.crt-spinner { width: 44px; height: 44px; margin-bottom: 8px; }
.crt-spinner-ring {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid var(--ice);
  border-top-color: var(--cobalt);
  animation: crt-spin .8s linear infinite;
}
@keyframes crt-spin { to { transform: rotate(360deg); } }

/* Header résultats */
.crt-results-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.crt-results-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crt-results-count {
  font-size: 1.05rem; font-weight: 700; color: var(--gray-800);
}
.crt-results-cp {
  font-size: .85rem; color: var(--gray-400);
  background: var(--frost); border-radius: var(--r-pill);
  padding: 3px 10px;
}
.crt-reset-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--gray-200);
  border-radius: var(--r-pill); padding: 7px 14px;
  font-size: .82rem; font-weight: 600; color: var(--gray-500);
  cursor: pointer; transition: var(--t);
}
.crt-reset-btn:hover { border-color: var(--cobalt); color: var(--cobalt); }

/* Grille courtiers */
.crt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* Carte courtier */
.crt-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  display: flex; flex-direction: column; gap: 16px;
}
.crt-card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-3px);
  border-color: var(--ice);
}

/* En-tête carte */
.crt-card-head { display: flex; align-items: flex-start; gap: 14px; }
.crt-card-avatar {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: var(--ice);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800; color: var(--cobalt);
  letter-spacing: -.02em;
}
.crt-card-avatar img {
  width: 100%; height: 100%; object-fit: contain;
  border-radius: 12px; padding: 4px;
}
.crt-card-identity { flex: 1; min-width: 0; }
.crt-card-name {
  font-size: 1rem; font-weight: 700; color: var(--gray-800);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 3px;
}
.crt-card-location {
  display: flex; align-items: center; gap: 5px;
  font-size: .8rem; color: var(--gray-400);
  text-decoration: none; transition: color .2s;
}
.crt-card-location:hover { color: var(--cobalt); }
.crt-card-location svg { width: 11px; height: 11px; stroke: var(--gray-300); fill: none; flex-shrink: 0; transition: stroke .2s; }
.crt-card-location:hover svg { stroke: var(--cobalt); }

/* Badge spécialités */
.crt-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.crt-tag {
  font-size: .72rem; font-weight: 600; letter-spacing: .03em;
  padding: 3px 9px; border-radius: var(--r-pill);
  background: var(--ice); color: var(--cobalt);
  border: 1px solid rgba(10,92,245,.12);
}
.crt-tag--ri { background: #FFF3E0; color: #E65100; border-color: rgba(230,81,0,.15); }
.crt-tag--pno { background: var(--success-bg); color: #00695C; border-color: rgba(0,168,120,.15); }

/* Séparateur */
.crt-card-sep { border: none; border-top: 1px solid var(--gray-100); }

/* Contacts */
.crt-card-contacts { display: flex; flex-direction: column; gap: 8px; }
.crt-contact-row {
  display: flex; align-items: center; gap: 9px;
  font-size: .84rem; color: var(--gray-600);
  text-decoration: none; transition: color .2s;
}
.crt-contact-row:hover { color: var(--cobalt); }
.crt-contact-row svg { width: 14px; height: 14px; stroke: var(--gray-300); fill: none; flex-shrink: 0; transition: stroke .2s; }
.crt-contact-row:hover svg { stroke: var(--cobalt); }

/* ORIAS badge — non cliquable, icône bleue */
.crt-orias { cursor: default; }
.crt-orias:hover { color: var(--gray-600); }
.crt-orias:hover svg { stroke: var(--gray-300); }
.crt-orias svg { stroke: var(--cobalt); opacity: .7; }

/* Action carte */
.crt-card-action {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--cobalt); color: var(--white);
  border: none; border-radius: 10px;
  padding: 11px; font-size: .84rem; font-weight: 700;
  font-family: inherit; cursor: pointer; text-decoration: none;
  transition: background .2s;
}
.crt-card-action:hover { background: var(--cobalt-dark); }
.crt-card-action svg { width: 14px; height: 14px; stroke: currentColor; fill: none; flex-shrink: 0; }

/* ─── MODAL ──────────────────────────────────────────────── */
.crt-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.crt-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(10,18,40,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}
.crt-modal-panel {
  position: relative; z-index: 1;
  background: var(--white);
  border-radius: 20px;
  width: 100%; max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.22);
  animation: modalIn .22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* Bouton fermer */
.crt-modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  background: var(--gray-50, #f8f9fb); border: none; border-radius: 50%;
  font-size: 1.1rem; line-height: 1; color: var(--gray-400);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s; z-index: 2;
}
.crt-modal-close:hover { background: var(--gray-100); color: var(--gray-700); }

/* Carte Google Maps dans le modal */
.crt-modal-map {
  width: 100%; height: 220px;
  border: none; display: block;
  border-radius: 14px 14px 0 0;
}

/* Corps du modal */
.crt-modal-body { padding: 22px 24px 28px; }

/* En-tête modal */
.crt-modal-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
}
.crt-modal-avatar {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--cobalt) 0%, var(--cobalt-dark,#1a3a7a) 100%);
  color: var(--white); font-size: 1rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.crt-modal-avatar img { width: 100%; height: 100%; object-fit: cover; }
.crt-modal-name {
  font-size: 1.05rem; font-weight: 800; color: var(--gray-800);
  line-height: 1.3;
}
.crt-modal-location {
  display: flex; align-items: center; gap: 5px;
  font-size: .83rem; color: var(--gray-400); margin-top: 3px;
  text-decoration: none; transition: color .2s;
}
.crt-modal-location:hover { color: var(--cobalt); }
.crt-modal-location svg { width: 12px; height: 12px; stroke: var(--gray-300); fill: none; flex-shrink: 0; transition: stroke .2s; }
.crt-modal-location:hover svg { stroke: var(--cobalt); }

/* Adresse complète */
.crt-modal-address {
  font-size: .84rem; color: var(--gray-500);
  padding: 10px 12px;
  background: var(--gray-50, #f8f9fb);
  border-radius: 10px;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* Séparateur */
.crt-modal-sep { border: none; border-top: 1px solid var(--gray-100); margin: 14px 0; }

/* Contacts dans le modal */
.crt-modal-contacts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.crt-modal-contacts .crt-contact-row { font-size: .88rem; }

/* Badges spécialités */
.crt-modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }

/* Bouton action modal */
.crt-modal-action {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--cobalt); color: var(--white);
  border-radius: 12px; padding: 13px;
  font-size: .9rem; font-weight: 700; text-decoration: none;
  transition: background .2s; width: 100%;
}
.crt-modal-action:hover { background: var(--cobalt-dark); }
.crt-modal-action svg { width: 15px; height: 15px; stroke: currentColor; fill: none; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .crt-hero { padding: 90px 0 48px; }
  .crt-hero-title { font-size: clamp(1.7rem, 6vw, 2.4rem); }
  .crt-search-btn span { display: none; }
  .crt-search-btn { padding: 16px 18px; }
  .crt-hero-stats { gap: 14px; }
}

@media (max-width: 480px) {
  .crt-search-inner { border-radius: 12px; }
  .crt-grid { grid-template-columns: 1fr; }
  .crt-hero-stats { flex-direction: column; align-items: flex-start; gap: 10px; }
  .crt-stat-sep { display: none; }
}
