/* home.css — Dashboard principal */

/* ══ Layout dashboard ══════════════════════════════════════════ */
.dash { display: flex; flex-direction: column; gap: 20px; }

/* ══ Stat cards — 4 seulement ══════════════════════════════════ */
.dash-stats--4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 920px) { .dash-stats--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .dash-stats--4 { grid-template-columns: 1fr 1fr; gap: 10px; } }

/* Stat card cliquable */
.stat-card--link {
  text-decoration: none;
  cursor: pointer;
}
.stat-card--link:hover {
  box-shadow: 0 4px 14px rgba(28,33,40,.09);
  border-color: rgba(94,92,230,.28);
  transform: translateY(-2px);
  text-decoration: none;
}

/* Sous-label alerte */
.stat-sub--alert { color: #c2410c !important; font-weight: 600; }

/* ══ Stat cards ════════════════════════════════════════════════ */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 920px) { .dash-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .dash-stats { grid-template-columns: 1fr 1fr; gap: 10px; } }

.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--sh-panel);
  transition: box-shadow .18s, border-color .18s, transform .14s;
  position: relative; overflow: hidden;
}
.stat-card:hover {
  box-shadow: var(--sh-lg);
  border-color: rgba(31,122,255,.30);
  transform: translateY(-2px);
}

.stat-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
}
.stat-icon svg { width: 18px; height: 18px; }

/* Couleurs icônes */
.stat-icon--blue   { background: #e8f0fe; color: #1a56db; }
.stat-icon--violet { background: #ede9fe; color: #7c3aed; }
.stat-icon--green  { background: #dcfce7; color: #16a34a; }
.stat-icon--orange { background: #fff4e5; color: #c2410c; }
.stat-icon--purple { background: #f3e8ff; color: #7c3aed; }
.stat-icon--teal   { background: #ccfbf1; color: #0f766e; }
.stat-icon--pink   { background: #fce7f3; color: #db2777; }
.stat-icon--yellow { background: #fef3c7; color: #d97706; }

.stat-content { flex: 1; min-width: 0; }
.stat-label {
  font-size: 11px; font-weight: 500; color: var(--muted);
  margin-bottom: 2px; letter-spacing: .01em;
}
.stat-value {
  font-size: 20px; font-weight: 800; letter-spacing: -.03em;
  line-height: 1; color: var(--text);
}
.stat-sub {
  font-size: 10px; color: var(--subtle); margin-top: 2px; font-weight: 500;
}

/* ══ Banner (image nette, pas de recherche dedans) ══════════════ */
.home-banner {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  height: 180px;
  background: #1e293b;
}
@media (max-width: 640px) { .home-banner { height: 130px; } }

.home-banner img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: .75;
}

.home-banner-overlay {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  background: linear-gradient(90deg, rgba(15,23,42,.55) 0%, rgba(15,23,42,.15) 100%);
}
@media (max-width: 640px) { .home-banner-overlay { padding: 0 16px; } }

.home-banner-text h1 {
  margin: 0 0 4px;
  font-size: 26px; font-weight: 800; letter-spacing: -.03em; color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
@media (max-width: 640px) { .home-banner-text h1 { font-size: 18px; } }
.home-banner-text p {
  margin: 0; font-size: 14px; color: rgba(255,255,255,.85);
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
@media (max-width: 640px) { .home-banner-text p { display: none; } }

.home-banner-greet {
  font-size: 14px; color: rgba(255,255,255,.9); white-space: nowrap;
  background: rgba(255,255,255,.15); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.25);
  padding: 6px 14px; border-radius: 999px;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
@media (max-width: 560px) { .home-banner-greet { display: none; } }

/* ══ CTA barre (non-aidant) ════════════════════════════════════ */
.home-cta-bar {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #f5f3ff 0%, #eff6ff 100%);
  border: 1px solid rgba(94,92,230,.22);
  border-radius: var(--r-xl); padding: 14px 20px;
}
.home-cta-bar-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  background: rgba(94,92,230,.12); border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center; color: var(--primary);
}
.home-cta-bar-icon svg { width: 18px; height: 18px; }
.home-cta-bar-text { flex: 1; min-width: 0; }
.home-cta-bar-text strong { display: block; font-size: 13px; font-weight: 700; color: var(--text); }
.home-cta-bar-text span  { font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .home-cta-bar-text span { display: none; } }

/* ══ Recherche pleine largeur — champs côte à côte ═════════════ */
.search-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}
@media (max-width: 680px) {
  .search-row { grid-template-columns: 1fr; }
  .search-row-submit label { display: none; }
}
.search-row-need,
.search-row-where { margin-bottom: 0; }
.search-row-submit { display: flex; flex-direction: column; justify-content: flex-end; }
.search-row-submit .hsf-submit { white-space: nowrap; width: auto; padding: 10px 20px; transform: none; }
@media (max-width: 680px) { .search-row-submit .hsf-submit { transform:none; width:100%; } }

/* ══ Grille centrale ══════════════════════════════════════════ */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } }

.dash-aside { display: flex; flex-direction: column; gap: 14px; }

/* ══ Dash cards ═══════════════════════════════════════════════ */
.dash-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-panel);
  overflow: hidden;
}
.dash-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
}
.dash-card-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--text);
}
.dash-card-title svg { width: 15px; height: 15px; color: var(--primary); flex-shrink: 0; }
.dash-card-action {
  font-size: 12px; font-weight: 500; color: var(--primary);
  text-decoration: none; white-space: nowrap;
}
.dash-card-action:hover { text-decoration: underline; }
.dash-card-body { padding: 16px; }

/* ══ CTA prestataire ══════════════════════════════════════════ */
.dash-cta {
  background: linear-gradient(135deg, #f5f3ff 0%, #eff6ff 100%);
  border: 1px solid rgba(94,92,230,.20);
  border-radius: var(--r-xl);
  padding: 20px 16px;
  text-align: center;
}
.dash-cta-icon {
  width: 40px; height: 40px;
  margin: 0 auto 10px;
  background: rgba(94,92,230,.12);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
}
.dash-cta-icon svg { width: 20px; height: 20px; }
.dash-cta h4 { font-size: 14px; font-weight: 700; margin: 0 0 6px; color: var(--text); }
.dash-cta p  { font-size: 12px; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }

/* ══ Quicklinks grid ══════════════════════════════════════════ */
.quicklinks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.quicklink-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-light);
  background: var(--bg);
  text-decoration: none; color: var(--text);
  font-size: 13px; font-weight: 500;
  transition: border-color .14s, background .14s;
}
.quicklink-item svg { flex-shrink: 0; color: var(--muted); }
.quicklink-item:hover { border-color: var(--primary); background: var(--primary-bg); color: var(--primary); text-decoration: none; }
.quicklink-item:hover svg { color: var(--primary); }

/* ══ Comment ça marche ════════════════════════════════════════ */
.how-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 860px) { .how-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .how-steps { grid-template-columns: 1fr; } }

.how-step { display: flex; gap: 12px; align-items: flex-start; }
.how-step-num {
  width: 28px; height: 28px; flex-shrink: 0;
  background: var(--primary); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.how-step-body strong { font-size: 13px; font-weight: 700; color: var(--text); display: block; margin-bottom: 4px; }
.how-step-body p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.5; }

/* ══ Partenaires ══════════════════════════════════════════════ */
.dash-partners-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}
@media (max-width: 640px) { .dash-partners-grid { grid-template-columns: repeat(2, 1fr); } }

.partner-card {
  display: flex; align-items: center; justify-content: center;
  min-height: 60px; padding: 10px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.partner-card:hover { border-color: var(--primary); box-shadow: var(--sh-sm); }
.partner-card img { height: 36px; width: auto; max-width: 100%; object-fit: contain; }
.partner-card img[src*="/BFA2/"] { height: 48px; }
.partner-placeholder { border-style: dashed; opacity: .45; }
.dash-partners-note { font-size: 12px; color: var(--subtle); margin: 0; }

/* ══ Search form (hsf) ════════════════════════════════════════ */
.hsf-field { margin-bottom: 14px; }
.hsf-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px;
}
.hsf-label svg { width: 12px; height: 12px; color: var(--muted); }
.hsf-input-wrap { position: relative; display: flex; align-items: center; }
.hsf-input {
  width: 100%; font-size: 14px; padding: 10px 70px 10px 12px;
  border-radius: var(--r-lg); border: 1.5px solid var(--border);
  transition: border-color .15s, box-shadow .15s;
  background: var(--bg); color: var(--text);
}
.hsf-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.hsf-clear, .hsf-geo {
  position: absolute; display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--r-sm); border: none;
  background: transparent; cursor: pointer; color: var(--muted);
  font-size: 18px; line-height: 1;
}
.hsf-clear { right: 34px; }
.hsf-geo   { right: 5px; }
.hsf-clear:hover, .hsf-geo:hover { background: var(--bg); color: var(--text); }
.geo-state { font-size: 11px; color: var(--muted); margin-top: 3px; }
.geo-state:empty { margin-top: 0; }

.hsf-chips-zone {
  background: var(--bg); border: 1px solid var(--border-light);
  border-radius: var(--r-lg); padding: 10px 12px; margin-bottom: 14px; min-height: 44px;
}
.hsf-chips-hint { font-size: 12px; color: var(--subtle); font-style: italic; }
.hsf-chips-list { display: flex; flex-wrap: wrap; gap: 6px; }
.hsf-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; font-size: 12px; font-weight: 500;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text-2);
  cursor: pointer; user-select: none;
}
.hsf-chip:hover { border-color: var(--primary); color: var(--primary); }
.hsf-chip.selected { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

.hsf-filters { margin-bottom: 14px; }
.hsf-filters[open] .hsf-chevron { transform: rotate(180deg); }
.hsf-filters-toggle {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  cursor: pointer; user-select: none; list-style: none; padding: 5px 0;
}
.hsf-filters-toggle::-webkit-details-marker { display: none; }
.hsf-filters-toggle svg:first-child { width: 13px; height: 13px; color: var(--muted); }
.hsf-chevron { width: 13px; height: 13px; margin-left: auto; color: var(--muted); transition: transform .15s; }
.hsf-filters-body { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; }
.hsf-filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; cursor: pointer; user-select: none;
  border: 1px solid var(--border); background: var(--panel);
  font-size: 12px; font-weight: 500; color: var(--text-2);
}
.hsf-filter-pill:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.hsf-filter-pill input { display: none; }
.hsf-filter-pill:has(input:checked) { background: var(--primary-bg); border-color: rgba(94,92,230,.35); color: var(--primary); font-weight: 600; }

.hsf-submit { width: 100%; padding: 11px 18px; gap: 8px; }
.hsf-legal { font-size: 11px; color: var(--subtle); text-align: center; margin: 8px 0 0; }
.hsf-legal a { color: var(--muted); }

/* ══ Responsive mobile ════════════════════════════════════════ */
@media (max-width: 860px) {
  /* Grille dashboard : une colonne */
  .dash-grid { grid-template-columns: 1fr !important; }

  /* Stats : 2 colonnes compactes */
  .dash-stats, .dash-stats--4 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card { padding: 10px; gap: 8px; }
  .stat-icon { width: 30px; height: 30px; flex-shrink: 0; }
  .stat-icon svg { width: 15px; height: 15px; }
  .stat-label { font-size: 10px; }
  .stat-value { font-size: 15px; }
  .stat-sub { font-size: 9px; }

  /* Banner */
  .home-banner { height: 110px; border-radius: var(--r-lg); }
  .home-banner-text h1 { font-size: 15px; }

  /* Quicklinks */
  .quicklinks-grid { gap: 6px; }
  .quicklink-item { padding: 7px 9px; font-size: 12px; }

  /* How steps : 2 cols */
  .how-steps { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Partenaires : 3 cols */
  .dash-partners-grid { grid-template-columns: repeat(3, 1fr); }

  /* CTA bar */
  .home-cta-bar { padding: 10px 12px; gap: 8px; }
}

@media (max-width: 480px) {
  .dash-stats, .dash-stats--4 { gap: 6px; }
  .stat-card { padding: 8px; gap: 6px; }
  .stat-icon { width: 26px; height: 26px; border-radius: 6px; }
  .stat-icon svg { width: 13px; height: 13px; }
  .stat-value { font-size: 14px; }
  .stat-label { font-size: 9px; }

  /* Search row vertical */
  .search-row { grid-template-columns: 1fr; gap: 8px; }

  /* How steps : 1 col */
  .how-steps { grid-template-columns: 1fr; }
}







