/* Le gros du style vient de Tailwind (classes utilitaires dans les templates).
   Ce fichier ne couvre que ce qui est plus simple en CSS classique :
   les connecteurs du stepper (pseudo-éléments) et le piège anti-robot. */

.stepper-item {
  position: relative;
}

.stepper-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 55%;
  width: 90%;
  height: 2px;
  background-color: #e2e8f0; /* slate-200 */
  z-index: 0;
}

.stepper-item.done:not(:last-child)::after {
  background-color: #16a34a; /* green-600 */
}

.stepper-item.active .stepper-circle {
  background-color: #0984D3; /* brand-500 (bleu du logo) */
  color: #fff;
}
.stepper-item.active .stepper-label {
  color: #0984D3;
  font-weight: 600;
}
.stepper-item.done .stepper-circle {
  background-color: #16a34a; /* green-600 */
  color: #fff;
}
.stepper-item.done .stepper-label {
  color: #16a34a;
}

@media (max-width: 420px) {
  .stepper-label {
    display: none;
  }
}

/* Bordure rouge sur les champs invalides, ajoutée dynamiquement par wizard.js */
.is-invalid {
  border-color: #dc2626 !important; /* red-600 */
}

/* Piège anti-robot : masqué visuellement (hors écran), mais toujours
   présent dans le DOM. On évite display:none, que certains robots
   ignorent lors du remplissage automatique des formulaires. */
.hp-wrapper {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* Prévisualisation des photos */
.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}

.photo-preview-card {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #ffffff;
}

.photo-preview-card img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.photo-preview-caption {
  padding: 0.4rem 0.5rem;
  font-size: 0.75rem;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* États visibles de la géolocalisation */
.gps-status-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
}

.gps-found {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.gps-insufficient,
.gps-retry,
.gps-cancelled {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.gps-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.gps-spinner {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin-top: 0.1rem;
  border-radius: 9999px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: gps-spin 0.8s linear infinite;
}

.photo-preview-item {
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.5rem;
}

.photo-preview-item img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 0.5rem;
    background: #f1f5f9;
}

.photo-preview-number {
    display: block;
    margin-top: 0.5rem;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
}

.photo-remove-button {
    width: 100%;
    min-height: 40px;
    margin-top: 0.5rem;
    border: 1px solid #dc2626;
    border-radius: 0.5rem;
    color: #b91c1c;
    background: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.photo-remove-button:hover {
    background: #fef2f2;
}

.photo-remove-button:focus-visible {
    outline: 3px solid rgba(220, 38, 38, 0.25);
    outline-offset: 2px;
}

@keyframes gps-spin {
  to { transform: rotate(360deg); }
}

/* Bouton inactif : modifications manager/superviseur sans motif */
.btn-disabled,
button:disabled,
input[type="submit"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(20%);
}
