/* ==========================================================================
   Archijeunes FSE – ACF Forms
   Styles des formulaires ACF génériques
   ========================================================================== */

/* --------------------------------------------------------------------------
   ACF Spinner
   -------------------------------------------------------------------------- */

.acf-spinner {
  display: inline-block;
  height: 20px;
  width: 20px;
  right: -135px;
  left: 0;
  margin: auto;
  top: 34px;
  vertical-align: text-top;
  position: absolute;
  background: transparent !important;
}

.acf-spinner .spinner-box {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
}

.acf-spinner .spinner-box .circle-border {
  width: 40px;
  height: 40px;
  padding: 3px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: linear-gradient(
    0deg,
    rgba(63, 249, 220, 0.1) 33%,
    rgba(63, 249, 220, 1) 100%
  );
  animation: spin 0.8s linear infinite;
}

.acf-spinner .spinner-box .circle-core {
  width: 100%;
  height: 100%;
  background-color: white;
  border-radius: 50%;
}

/* --------------------------------------------------------------------------
   ACF messages
   -------------------------------------------------------------------------- */

.notices-wrapper .message {
  text-align: center;
  background: #6dbe51;
  color: white !important;
  padding: 1rem;
}

/* --------------------------------------------------------------------------
   Repeater arrow
   -------------------------------------------------------------------------- */

.acf-repeater th.acf-row-handle:last-child:before {
  display: inline-block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 10px 0 10px;
  border-color: #011689 transparent transparent transparent;
}

/* --------------------------------------------------------------------------
   ACF form
   -------------------------------------------------------------------------- */

#acf-form .acf-fields {
  padding: 0 0 2rem 0 !important;
}

#acf-form .acf-fields .acf-field {
  border: none;
}

@media (max-width: 768px) {
  #acf-form .acf-fields .acf-field {
    min-width: 100%;
  }
}

#acf-form .acf-fields .acf-field input {
  border-radius: 0;
  border: 1px solid var(--wp--preset--color--secondary);
  color: var(--wp--preset--color--secondary);
  padding: 6px 8px;
}

#acf-form .acf-field:not(.acf-field-file) > .acf-label > label,
#acf-form .acf-field:not(.acf-field-file) > .acf-label > label .acf-required {
  color: var(--wp--preset--color--base);
  font-size: 0.9rem;
}

#acf-form
  .acf-repeater
  .acf-field:not(.acf-field-file)
  > .acf-label
  > label
  .acf-required {
  color: var(--wp--preset--color--secondary);
  font-size: 0.9rem;
}

#acf-form .acf-field.acf-field-file > .acf-label > label,
#acf-form .acf-field.acf-field-file > .acf-label > label > .acf-required {
  color: var(--wp--preset--color--base);
  font-size: 0.9rem;
}

#acf-form .acf-field.acf-field-file > .acf-label > .description {
  color: var(--wp--preset--color--primary);
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   participant_equipe
   -------------------------------------------------------------------------- */

#acf-form .acf-fields .acf-field[data-name="participant_equipe"] .acf-actions {
  top: 0.5rem;
  position: relative;
}

#acf-form
  .acf-fields
  .acf-field[data-name="participant_equipe"]
  .acf-actions
  .acf-button {
  padding: 0.5rem 1rem;
  background: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--base);
  text-decoration: none;
}

#acf-form
  .acf-fields
  .acf-field[data-name="participant_equipe"]
  .acf-actions
  .acf-button:hover {
  background: var(--wp--preset--color--base);
  color: var(--wp--preset--color--primary);
}

/* --------------------------------------------------------------------------
   Fake input
   -------------------------------------------------------------------------- */

#acf-form .acf-repeater .fake-input {
  width: 100%;
  position: relative;
  background: white;
  height: 50px;
  margin-bottom: 20px;
}

#acf-form .acf-repeater .fake-input div {
  text-align: right;
  position: absolute;
  right: 10px;
  top: 20px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 10px 0 10px;
  border-color: #253678 transparent transparent transparent;
}

/* --------------------------------------------------------------------------
   ACF table
   -------------------------------------------------------------------------- */

#acf-form .acf-table {
  background: transparent;
}

#acf-form .acf-table .acf-fields .acf-field label,
#acf-form .acf-table .acf-fields .acf-field .acf-required {
  color: var(--wp--preset--color--secondary);
}

#acf-form .acf-input input {
  font-size: 1.8rem;
}

/* --------------------------------------------------------------------------
   ACF field message
   -------------------------------------------------------------------------- */

.acf-field-message {
  color: var(--wp--preset--color--base);
  font-size: 0.9rem;
}

.acf-field-message .form-title-message {
  text-transform: uppercase;
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Upload field
   -------------------------------------------------------------------------- */

.acf-basic-uploader {
  width: 100%;
  min-height: 150px;
  background-color: rgba(63, 249, 220, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  position: relative;
  cursor: pointer;
}

/* On rend l'input invisible mais cliquable */
.acf-basic-uploader input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Bouton custom */
.acf-basic-uploader::after {
  content: "Sélectionner votre fichier";
  background: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--secondary);
  padding: 1rem 3.5rem;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
html[lang="en"] .acf-basic-uploader::after {
  content: "Select your file";
  background: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--secondary);
  padding: 1rem 3.5rem;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

/* Texte "Aucun fichier choisi" */
.acf-basic-uploader::before {
  content: "Aucun fichier choisi";
  color: var(--wp--preset--color--primary);
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Version anglaise - spécificité augmentée */
html[lang="en"] .acf-basic-uploader::before {
  content: "No file chosen" !important;
  color: var(--wp--preset--color--primary);
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Quand un fichier est sélectionné */
/* Quand un fichier est sélectionné */
html[lang="en"] .acf-basic-uploader.has-file::before {
  content: var(--acf-file-name, "File uploaded successfully") !important;
  color: var(--wp--preset--color--primary);
}
.acf-basic-uploader.has-file::before {
  content: var(--acf-file-name, "Fichier sélectionné");
  color: var(--wp--preset--color--primary);
}

/* --------------------------------------------------------------------------
   Submit
   -------------------------------------------------------------------------- */

.acf-form-submit {
  text-align: center;
  padding-top: 20px;
}

.acf-form-submit input {
  border: 0;
  font-weight: 800;
  background: white;
  color: var(--wp--preset--color--secondary);
  border-radius: 0;
  font-size: 0.85rem;
  padding: 2.5rem 1.5rem;
}

/* --------------------------------------------------------------------------
   Dépot de dossier
   -------------------------------------------------------------------------- */

.single-participant #acf-form .acf-field.acf-field-file > .acf-label > label,
.single-participant #acf-form .acf-field.acf-field-file > .acf-label > label > .acf-required {
    color: var(--wp--preset--color--secondary);
  font-size: var(--wp-reset-font-size-xl);
}
