/* validation.css — États visuels de validation */

.req-star{
  margin-left:4px;
  font-size:.85em;
  font-weight:800;
  color:#c00000;
  vertical-align:super;
}

.req-title-missing{
  color:#c00000 !important;
}

.req-title-missing .req-star{
  color:#c00000 !important;
}

/* Champs classiques : encore utilisé pour le tableau, nationalité, champs conditionnels, etc. */
input.req-missing:not([type="radio"]):not([type="checkbox"]),
textarea.req-missing,
select.req-missing{
  border-color:#c00000 !important;
  box-shadow:none !important;
  outline:none !important;
}

.req-missing-group{
  border-color:#c00000 !important;
  box-shadow:none !important;
  outline:none !important;
}

.req-missing-zone{
  border-color:#c00000 !important;
  box-shadow:none !important;
  outline:none !important;
}

/* Tableau famille : inchangé */
.famille-table input.req-missing{
  background:rgba(192,0,0,.08) !important;
  border-color:#000 !important;
  box-shadow:none !important;
  outline:none !important;
}

/* Fichiers : état rouge de validation */
.fichier-drop.req-missing-zone{
  border-color:#c00000 !important;
  background:
    radial-gradient(160% 200% at 50% 40%,
      rgba(255,255,255,.96) 0%,
      rgba(255,242,242,.96) 45%,
      rgba(255,225,225,.92) 100%) !important;
}

/* Empêche le texte de remonter quand il y a une erreur */
.fichier-drop{
  position:relative;
}

.fichier-drop.req-missing-zone .fichier-drop-row,
.fichier-drop.has-error .fichier-drop-row{
  transform:none !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:var(--drop-head-h) !important;
  margin:0 !important;
}

/* Quand c’est juste une erreur “champ obligatoire”, pas de message texte */
.fichier-drop.req-missing-zone:not(.has-error) .fichier-error{
  display:none !important;
  height:0 !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
}

/* Fichiers : état rouge de validation */
.fichier-drop.req-missing-zone{
  border-color:#c00000 !important;
  background:
    radial-gradient(160% 200% at 50% 40%,
      rgba(255,255,255,.96) 0%,
      rgba(255,242,242,.96) 45%,
      rgba(255,225,225,.92) 100%) !important;
}

/* Quand fichier.js déclenche une vraie erreur : format, poids, doublon, autre colonne */
.fichier-drop.has-error{
  border-color:#c00000 !important;
  background:
    radial-gradient(160% 200% at 50% 40%,
      rgba(255,255,255,.96) 0%,
      rgba(255,242,242,.96) 45%,
      rgba(255,225,225,.92) 100%) !important;
}

/* Empêche la ligne "Glissez-déposez..." de remonter */
.fichier-drop.has-error .fichier-drop-row,
.fichier-drop.req-missing-zone .fichier-drop-row{
  transform:none !important;
}

/* Erreur obligatoire simple : pas de message texte affiché */
.fichier-drop.req-missing-zone:not(.has-error) .fichier-error{
  display:none !important;
  height:0 !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
}

/* Erreur réelle fichier.js : message à son emplacement normal, sous la ligne */
.fichier-drop.has-error .fichier-error{
  display:block !important;
  position:static !important;

  height:18px !important;
  min-height:18px !important;
  overflow:visible !important;

  margin-top:4px !important;
  margin-bottom:0 !important;
  padding:0 !important;

  font-size:.78rem !important;
  line-height:1.15 !important;
  font-weight:700 !important;
  text-align:center !important;
  color:#c00000 !important;
}

/* Consentement : contour du bloc, pas de contour sur la petite checkbox */
input[type="checkbox"].req-missing{
  outline:none !important;
  box-shadow:none !important;
}

/* N° Sécurité sociale : jamais de rouge sur la case */
#num_secu.req-missing,
input[name="num_secu"].req-missing,
input[name*="secu"].req-missing,
input[id*="secu"].req-missing{
  border-color:#000 !important;
  background:#fff !important;
  box-shadow:none !important;
  outline:none !important;
}

