/* assets/css/styles.css — styles simples compatibles CDN Tailwind (pas de @apply) */

/* Inputs & selects */
.input {
  display: inline-block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem; /* text-sm */
  line-height: 1.25rem;
  color: #111827; /* gray-900 */
  background-color: #fff;
  border: 1px solid #d1d5db; /* gray-300 */
  border-radius: 0.375rem; /* rounded-md */
  box-shadow: 0 1px 1px rgba(0,0,0,0.02);
}
.input:focus {
  outline: none;
  border-color: #3b82f6; /* blue-500 */
  box-shadow: 0 0 0 3px rgba(59,130,246,0.3); /* ring */
}

/* Boutons */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .02s;
  user-select: none;
}
.btn-primary {
  background: #2563eb;      /* blue-600 */
  color: #fff;
  border-color: #2563eb;
}
.btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; } /* blue-700 */
.btn-primary:active { transform: translateY(1px); }

.btn-secondary {
  background: #e5e7eb;      /* gray-200 */
  color: #111827;           /* gray-900 */
  border-color: #e5e7eb;
}
.btn-secondary:hover { background: #d1d5db; }  /* gray-300 */
.btn-secondary:active { transform: translateY(1px); }

/* Alerts */
.alert-success,
.alert-error {
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  border: 1px solid;
  font-size: 0.875rem;
}
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; } /* green */
.alert-error   { background: #fef2f2; border-color: #fecaca; color: #991b1b; } /* red */

/* Carte */
#map {
  height: 65vh;            /* mobile par défaut */
  min-height: 420px;
}
@media (min-width: 1024px) { /* lg */
  #map { height: 75vh; }
}

/* Carte: popup image responsive */
.leaflet-popup-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.375rem;
}

/* Liste */
.card {
  display: flex;
  gap: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.5rem;
  align-items: center;
}
.card:hover { background: #f9fafb; } /* gray-50 */

.card img.thumb {
  width: 64px;
  height: 64px;
  border-radius: 0.375rem;
  object-fit: cover;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.card .meta {
  font-size: 0.75rem;
  color: #6b7280; /* gray-500 */
}
/* Popups Leaflet */
.dm-leaflet-popup .leaflet-popup-content {
  margin: 0;
}
.dm-popup {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  max-width: 360px;
}
.dm-popup-media { overflow: hidden; border-radius: 8px; }
.dm-popup-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  display: block;
  background: #f1f5f9;
}
.dm-popup-img--placeholder {
  display: grid;
  place-items: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}
.dm-popup-body { padding-top: 2px; }
.dm-popup-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: #2563eb;
  text-decoration: underline;
}

/* Base inputs/boutons pour correspondre aux classes utilisées dans les pages */
.input {
  appearance: none;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  color: #0f172a;
  transition: box-shadow .15s, border-color .15s;
}
.input:focus { outline: none; border-color:#2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.2); }
.btn-primary, .btn-secondary {
  display:inline-flex; align-items:center; justify-content:center;
  border-radius: 0.5rem; padding: 0.5rem 0.9rem; font-weight:600; font-size:0.95rem;
  border: 1px solid transparent; cursor:pointer;
}
.btn-primary { background:#2563eb; color:#fff; }
.btn-primary:hover { background:#1e40af; }
.btn-secondary { background:#f8fafc; color:#0f172a; border-color:#cbd5e1; }
.btn-secondary:hover { background:#f1f5f9; }
#map { height: 70vh; min-height: 420px; }

/* Marqueurs personnalisés (couleur par catégorie) */
.dm-marker {}
.dm-marker .dm-marker-i{
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--c, #64748b);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,.15);
}

/* Popups Leaflet */
.dm-leaflet-popup .leaflet-popup-content{ margin:0; }
.dm-popup{ display:grid; grid-template-columns:120px 1fr; gap:10px; max-width:360px; }
.dm-popup-media{ overflow:hidden; border-radius:8px; }
.dm-popup-img{ width:120px; height:120px; object-fit:cover; display:block; background:#f1f5f9; }
.dm-popup-img--placeholder{ display:grid; place-items:center; color:#64748b; font-size:12px; font-weight:500; }
.dm-popup-body{ padding-top:2px; }

/* Clusters ronds lisibles */
.marker-cluster div{
  background: rgba(37,99,235,.9);
  color:#fff; border: 3px solid rgba(255,255,255,.9);
  box-shadow: 0 2px 8px rgba(2,8,23,.25);
}
.marker-cluster-small div{ background: rgba(37,99,235,.85); }
.marker-cluster-medium div{ background: rgba(30,64,175,.9); }
.marker-cluster-large div{ background: rgba(30,58,138,.95); }
