/* ==========================================
   ONACVG - Formulaire multi-étapes
   ========================================== */

.onacvg-wizard {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  font-family: Arial, sans-serif;
  /*background-color: #ffffff;*/
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.onacvg-steps {
    background-color: #fafafa;
}

/* ==========================================
   INDICATEUR D'ÉTAPES (STEPPER)
   ========================================== */
.onacvg-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  padding: 10px;
  list-style: none;
  position: relative;
}

.onacvg-steps::before {
  content: '';
  position: absolute;
  top: 25px;
  left: 0;
  right: 0;
  height: 5px;
  background: #d6d6d6;
  /*z-index: -1;*/
}

.onacvg-steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  cursor: pointer;
}

.onacvg-steps .step-number {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #bdbdbd;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.onacvg-steps .step-label {
  font-size: 12px;
  color: #757575;
  text-align: center;
  transition: color 0.3s ease;
}

.onacvg-steps li.active .step-number {
  background: #0b3b82;
  transform: scale(1.1);
}

.onacvg-steps li.active .step-label {
  color: #0b3b82;
  font-weight: bold;
}

.onacvg-steps li.completed .step-number {
  background: #4caf50;
}

.onacvg-steps li.completed .step-label {
  color: #4caf50;
}

/* ==========================================
   CONTENU DES ÉTAPES
   ========================================== */
.step {
  display: none;
  animation: fadeIn 0.4s ease;
}

.step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step h2 {
  color: #0b3b82;
  font-size: 24px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  margin-left: 20px;
}

.nav-buttons {
  display: flex;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.help-details {
  margin-top: 6px;
}

.help-details summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: #0b3b82;
  font-weight: 500;
}

.help-details summary::marker {
  color: #0b3b82;
}

.help-details[open] summary {
  margin-bottom: 6px;
}

.help-details small {
  display: block;
  color: #666;
}


/* pousse le bouton suivant à droite */
.nav-buttons .next {
  margin-left: auto;
}


.step h3 {
  color: #333;
  font-size: 18px;
  margin: 20px 0 15px;
}

/* ==========================================
   SECTIONS ET FIELDSETS
   ========================================== */
fieldset {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 20px;
  background: #fafafa;
}

fieldset legend {
  font-weight: bold;
  color: #0b3b82;
  font-size: 16px;
  padding: 0 10px;
}

.intro-message,
.rgpd-section {
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.intro-message h3,
.rgpd-section h3 {
  color: #0b3b82;
  margin-top: 20px;
  margin-bottom: 10px;
}

.intro-message ul,
.rgpd-section ul {
  margin-left: 20px;
}

.intro-message a,
.rgpd-section a {
  color: #0b3b82;
  text-decoration: underline;
}

/* ==========================================
   GROUPES DE FORMULAIRES
   ========================================== */
.form-group {
  margin-bottom: 20px;
  margin-left: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 15px;
  color: #fff;
}

.form-group label.required {
  font-weight: bold;
}

.form-group abbr {
  color: #d32f2f;
  text-decoration: none;
  font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0b3b82;
  box-shadow: 0 0 0 3px rgba(11, 59, 130, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group input[type="file"] {
  padding: 8px;
  border: 1px dashed #ccc;
  border-radius: 4px;
  width: 100%;
  cursor: pointer;
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
  margin-right: 8px;
  cursor: pointer;
}

.help-text,
small {
  display: block;
  font-size: 12px;
  color: #757575;
  margin-top: 5px;
  line-height: 1.4;
}

.help-text ul {
  margin: 5px 0 0 20px;
}

/* ==========================================
   DISPOSITION DES CHAMPS (ROWS)
   ========================================== */
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-group.half {
  flex: 1;
}

.form-group.third {
  flex: 0 0 30%;
}

.form-group.two-thirds {
  flex: 0 0 calc(65% - 20px);
}

/* ==========================================
   GROUPES DE RADIO/CHECKBOX
   ========================================== */
.radio-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.radio-group label {
  display: inline-flex;
  align-items: center;
  font-weight: normal;
  cursor: pointer;
}

/* ==========================================
   SECTIONS CONDITIONNELLES
   ========================================== */
.hidden {
  display: none !important;
}

/* ==========================================
   BOUTONS DE NAVIGATION
   ========================================== */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

button {
  padding: 12px 30px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

button.prev {
  background: #e0e0e0;
  color: #333;
}

button.prev:hover {
  background: #bdbdbd;
}

button.next,
button.submit {
  background: #0b3b82;
  color: #fff;
}

button.next:hover,
button.submit:hover {
  background: #083060;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.prev.hidden,
button.next.hidden,
button.submit.hidden {
  display: none;
}

/* ==========================================
   MESSAGES D'ERREUR (ACCESSIBILITÉ RGAA)
   ========================================== */
.messages--error,
.messages--error p {
  color: #C41E3A !important;
  background-color: #FFF5F5 !important;
  border-left: 4px solid #C41E3A;
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
}

.messages--error a {
  color: #B71C1C !important;
  text-decoration: underline;
  font-weight: 600;
}

.messages--error a:hover,
.messages--error a:focus {
  color: #8B0000 !important;
  background-color: #FFE0E0 !important;
  outline: 2px solid #B71C1C;
  outline-offset: 2px;
}

.error-message {
  color: #d32f2f;
  font-size: 13px;
  margin-top: 5px;
  display: block;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: #d32f2f;
}

/* ==========================================
   PAGE DE VALIDATION
   ========================================== */
.validation-summary {
  background: #f5f5f5;
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.validation-summary h3 {
  color: #0b3b82;
  margin-top: 0;
}

.validation-item {
  margin-bottom: 15px;
  padding: 10px;
  background: #fff;
  border-left: 3px solid #0b3b82;
}

.validation-item strong {
  display: block;
  color: #333;
  margin-bottom: 5px;
}

/* ==========================================
   PAGE DE CONFIRMATION
   ========================================== */
.confirmation-page {
  text-align: center;
  padding: 40px 20px;
}

.confirmation-page .success-icon {
  font-size: 64px;
  color: #4caf50;
  margin-bottom: 20px;
}

.confirmation-page h2 {
  color: #4caf50;
  margin-bottom: 20px;
}

.confirmation-page .submission-number {
  font-size: 24px;
  font-weight: bold;
  color: #0b3b82;
  margin: 20px 0;
}

.confirmation-page p {
  line-height: 1.8;
  color: #555;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
  .onacvg-wizard {
    padding: 15px;
  }

  .onacvg-steps {
    flex-wrap: wrap;
  }

  .onacvg-steps li {
    flex: 0 0 calc(25% - 10px);
    margin-bottom: 20px;
  }

  .onacvg-steps .step-label {
    font-size: 10px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-group.half,
  .form-group.third,
  .form-group.two-thirds {
    flex: 1 1 100%;
  }

  .radio-group {
    flex-direction: column;
    gap: 10px;
  }

  .civilite-radio-group {
    flex-direction: row !important;
  }

  .nav-buttons {
    flex-direction: column-reverse;
    gap: 10px;
  }

  button {
    width: 100%;
  }
}


/* ============= Section Téléversement des fichiers ============= */

.upload-field {
  margin-bottom: 2rem;
}

/* Label principal */
.upload-field .label {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  margin-bottom: 8px;
  display: block;
}

.upload-field .label.required::after {
  content: "*";
  color: #dc3545;
  margin-left: 4px;
}

/* Conteneur principal */
.upload-container {
  border: 2px dashed #BFBFBF;
  border-radius: 8px;
  padding: 0.2rem;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.upload-container:hover {
  border-color: #030191;
  background-color: #f8f9fa;
}

/* Input file caché (technique d'accessibilité) */
.upload-container input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Bouton de téléversement */
.upload-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background-color: #030191;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border: none;
  font-weight: 600;
}

.upload-button:hover {
  background-color: #1e40af;
}

/* Icône SVG */
.upload-icon {
  width: 20px;
  height: 20px;
}

/* Zone d'informations */
.upload-info {
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
  position: relative;
}

.file-details {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

/* Bouton toggle pour afficher/masquer les infos */
.toggle-info {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #030191;
  cursor: pointer;
  padding: 0.25rem 0;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  align-self: flex-start;
  font-weight: 500;
}

.toggle-info:hover {
  color: #1e40af;
}

.toggle-arrow {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.toggle-info[aria-expanded="true"] .toggle-arrow {
  transform: rotate(180deg);
}

/* Zone des exigences/informations */
.upload-requirements {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.4;
  margin-top: 0.5rem;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-radius: 4px;
  border-left: 3px solid #030191;
}

.upload-requirements p {
  margin: 0.25rem 0;
}

.upload-requirements[hidden] {
  display: none;
}

.upload-requirements:not([hidden]) {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Indication visuelle quand un fichier est sélectionné */
.upload-container.has-file {
  border-color: #10b981;
  background-color: #f0fdf4;
}

/* Liste des fichiers sélectionnés */
.file-list {
  margin-top: 1rem;
  padding: 0;
  list-style: none;
  width: 100%;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.file-name {
  font-weight: 500;
  color: #333;
}

.file-size {
  font-size: 0.875rem;
  color: #64748b;
  margin-left: 8px;
}

.file-remove {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  padding: 0.25rem;
  margin-left: 0.5rem;
  font-weight: bold;
}

.file-remove:hover {
  color: #bb2d3b;
}

/* Responsive */
@media (max-width: 768px) {
  .upload-container {
    padding: 1rem;
    gap: 1rem;
  }

  .upload-button {
    width: 100%;
    justify-content: center;
  }
  
  .upload-info {
    width: 100%;
  }
}

/* Mode sombre (si applicable) */
[data-theme="dark"] .upload-container {
  border-color: #595959;
}

[data-theme="dark"] .upload-container:hover {
  background-color: #1e293b;
  border-color: #030191;
}

[data-theme="dark"] .file-details {
  color: #e2e8f0;
}

[data-theme="dark"] .upload-requirements {
  background-color: #1e293b;
  color: #94a3b8;
}

[data-theme="dark"] .file-item {
  background-color: #1e293b;
}

[data-theme="dark"] .file-name {
  color: #e2e8f0;
}