/* ==================== RESET & BASE ==================== */
* {
  box-sizing: border-box;
}

/* ==================== PAGE HEADER (RÉDUIT) ==================== */
.admission-hero {
  position: relative;
  min-height: 35vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rich-black);
  overflow: hidden;
}

.admission-hero .container {
  padding-top: 5rem;
  padding-bottom: 3rem;
}

/* ==================== PROGRESS STEPS (RÉDUIT) ==================== */
.steps-section {
  background: white;
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cream);
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  transition: var(--transition);
  border: 2px solid transparent;
  flex-shrink: 0;
}

.step-item.active .step-number {
  background: linear-gradient(135deg, var(--gold), var(--dark-gold));
  color: var(--rich-black);
  box-shadow: 0 4px 15px rgba(229, 184, 48, 0.4);
}

.step-item.completed .step-number {
  background: var(--dark-gold);
  color: white;
  font-size: 0;
}

.step-item.completed .step-number::after {
  content: '✓';
  font-size: 0.85rem;
}

.step-label {
  color: #999;
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
}

.step-item.active .step-label {
  color: var(--rich-black);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--cream-dark);
  margin: 0 0.5rem;
  min-width: 20px;
}

/* ==================== FORM STEPS ==================== */
.form-step {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.form-step.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ==================== FORM CARDS ==================== */
.form-card {
  background: white;
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 10px 40px -15px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.04);
  margin-bottom: 1.5rem;
  width: 100%;
  overflow: hidden;
}

@media (min-width: 768px) {
  .form-card {
    padding: 2rem;
  }
}

.form-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.form-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(229, 184, 48, 0.15), rgba(200, 150, 12, 0.1));
  color: var(--dark-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.form-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rich-black);
  margin-bottom: 0.25rem;
}

.form-card-desc {
  color: #666;
  font-size: 0.85rem;
}

/* ==================== FORM ELEMENTS ==================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.form-label {
  font-weight: 600;
  color: var(--rich-black);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
}

.required {
  color: #dc2626;
  margin-left: 0.25rem;
}

.form-input {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
  font-size: 0.95rem;
  transition: var(--transition);
  background: white;
  color: var(--rich-black);
  font-family: inherit;
  outline: none;
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(229, 184, 48, 0.12);
}

.form-input.error {
  border-color: #dc2626 !important;
  background-color: #fef2f2;
}

/* ==================== VALIDATION ==================== */

/* Message d'erreur sous le champ concerné. */
.field-error {
  display: block;
  margin-top: 0.35rem;
  color: #dc2626;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
}

/* Cases à cocher : elles ne portent pas .form-input, d'où un traitement propre. */
input[type="checkbox"].error,
input[type="file"].error {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

/* Zone de téléversement dont le fichier est refusé. */
.upload-zone:has(.upload-input.error) {
  border-color: #dc2626;
  background-color: #fef2f2;
}

/* Encart d'information en tête d'étape. */
.form-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
  background: rgba(229, 184, 48, 0.09);
  border: 1px solid rgba(229, 184, 48, 0.35);
  border-left: 4px solid var(--gold);
  border-radius: 0.75rem;
  color: #5a4a12;
  font-size: 0.875rem;
  line-height: 1.5;
}

.form-notice i {
  color: var(--dark-gold);
  margin-top: 0.15rem;
  flex-shrink: 0;
}

/* Bloc tuteur signalé comme incomplet. */
.form-card.guardian-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

/* Champ leurre anti-robots : retiré du flux sans utiliser display:none ni
   visibility:hidden, que certains robots savent détecter pour l'ignorer. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

select.form-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23C8960C' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* ==================== CLASS SELECTOR ==================== */
.class-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .class-selector {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

.class-option {
  padding: 1.25rem 0.75rem;
  background: var(--cream);
  border: 2px solid transparent;
  border-radius: 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.class-option:hover {
  background: rgba(229, 184, 48, 0.08);
  transform: translateY(-2px);
}

.class-option.selected {
  background: linear-gradient(135deg, rgba(229, 184, 48, 0.12), rgba(200, 150, 12, 0.08));
  border-color: var(--gold);
  box-shadow: 0 10px 30px -10px rgba(200, 150, 12, 0.3);
}

.class-option.selected::after {
  content: '✓';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 20px;
  height: 20px;
  background: var(--gold);
  color: var(--rich-black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.class-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--gold), var(--dark-gold));
  color: var(--rich-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: var(--transition);
}

.class-name {
  font-weight: 700;
  color: var(--rich-black);
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.class-age {
  color: #666;
  font-size: 0.75rem;
}

/* ==================== CLASSES DÉSACTIVÉES ==================== */
.class-option.disabled-class {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f9fafb;
  border: 2px dashed #e5e7eb;
}

.class-option.disabled-class:hover {
  transform: none;
  background: #f3f4f6;
}

.disabled-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(2px);
  border-radius: 1rem;
  color: #9ca3af;
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.class-option.disabled-class:hover .disabled-overlay {
  opacity: 1;
}

/* ==================== RADIO GRID ==================== */
.radio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .radio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.radio-item {
  cursor: pointer;
}

.radio-item input {
  display: none;
}

.radio-content {
  padding: 1rem;
  background: var(--cream);
  border: 2px solid transparent;
  border-radius: 0.75rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;
  height: 100%;
}

.radio-content i {
  font-size: 1.25rem;
  color: var(--dark-gold);
  margin-bottom: 0.25rem;
}

.radio-content strong {
  color: var(--rich-black);
  font-size: 0.9rem;
}

.radio-content span {
  color: #666;
  font-size: 0.75rem;
  line-height: 1.3;
}

.radio-item:hover .radio-content {
  background: rgba(229, 184, 48, 0.08);
}

.radio-item input:checked ~ .radio-content {
  background: linear-gradient(135deg, rgba(229, 184, 48, 0.15), rgba(200, 150, 12, 0.08));
  border-color: var(--gold);
}

/* ==================== UPLOAD ZONES ==================== */
.upload-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .upload-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.upload-zone {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--cream);
  border: 2px dashed rgba(200, 150, 12, 0.3);
  border-radius: 0.75rem;
  transition: var(--transition);
  position: relative;
  flex-wrap: wrap;
}

.upload-zone:hover {
  background: rgba(229, 184, 48, 0.06);
  border-color: var(--gold);
}

.upload-zone.has-file {
  background: linear-gradient(135deg, rgba(229, 184, 48, 0.12), rgba(200, 150, 12, 0.05));
  border-style: solid;
  border-color: var(--gold);
}

.upload-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.5rem;
  background: white;
  color: var(--dark-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.upload-info {
  flex: 1;
  min-width: 0;
}

.upload-info h4 {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--rich-black);
  margin-bottom: 0.15rem;
}

.upload-filename {
  color: #666;
  font-size: 0.75rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.upload-btn {
  padding: 0.5rem 0.85rem;
  background: white;
  border: 1px solid var(--gold);
  color: var(--dark-gold);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  z-index: 1;
  pointer-events: none;
}

.upload-zone:hover .upload-btn {
  background: var(--gold);
  color: var(--rich-black);
}

/* ==================== CONSENT ==================== */
.consent-box {
  padding: 1.25rem;
  background: var(--cream);
  border-radius: 0.75rem;
}

.checkbox-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  position: relative;
}

.checkbox-consent input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.35rem;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.checkbox-consent input:checked ~ .checkmark {
  background: var(--gold);
  border-color: var(--gold);
}

.checkbox-consent input:checked ~ .checkmark::after {
  content: '✓';
  color: var(--rich-black);
  font-weight: 700;
  font-size: 0.75rem;
}

.consent-text {
  font-size: 0.85rem;
  color: #444;
  line-height: 1.5;
}

/* ==================== NAVIGATION ==================== */
.form-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-next, .btn-prev, .btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: inherit;
  flex: 1;
  max-width: 200px;
}

@media (max-width: 640px) {
  .btn-next, .btn-prev, .btn-submit {
    width: 100%;
    max-width: 100%;
  }
  .btn-prev {
    order: 2;
  }
  .btn-next, .btn-submit {
    order: 1;
  }
}

.btn-next {
  background: linear-gradient(135deg, var(--gold), var(--dark-gold));
  color: var(--rich-black);
  box-shadow: 0 8px 20px rgba(200, 150, 12, 0.3);
}

.btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(200, 150, 12, 0.4);
}

.btn-prev {
  background: white;
  color: var(--rich-black);
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.btn-prev:hover {
  border-color: var(--gold);
  color: var(--dark-gold);
}

.btn-submit {
  background: linear-gradient(135deg, var(--rich-black), #1a1a1a);
  color: var(--gold);
  border: 2px solid var(--gold);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-submit:hover {
  background: var(--gold);
  color: var(--rich-black);
  transform: translateY(-2px);
}

/* ==================== INFO SECTION ==================== */
.info-section {
  background: white;
}

.info-card {
  background: var(--cream);
  padding: 1.5rem 1.25rem;
  border-radius: 1rem;
  text-align: center;
  position: relative;
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.1);
}

.info-number {
  width: 44px;
  height: 44px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--gold), var(--dark-gold));
  color: var(--rich-black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
}

.info-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rich-black);
  margin-bottom: 0.5rem;
}

.info-card p {
  color: #555;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ==================== MODALS ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: white;
  border-radius: 1.5rem;
  padding: 2rem 1.5rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  position: relative;
  animation: slideUp 0.4s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content.modal-large {
  max-width: 700px;
  text-align: left;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(25px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, var(--gold), var(--dark-gold));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rich-black);
  font-size: 2rem;
}

.modal-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--rich-black);
  margin-bottom: 0.5rem;
}

.modal-content p {
  color: #555;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.modal-ref {
  padding: 0.85rem;
  background: var(--cream);
  border-radius: 0.75rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.modal-ref strong {
  font-family: 'JetBrains Mono', monospace;
  color: var(--dark-gold);
}

.modal-close-btn {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--rich-black), #1a1a1a);
  color: var(--gold);
  border: 2px solid var(--gold);
  border-radius: 9999px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  font-size: 0.9rem;
}

.modal-close-btn:hover {
  background: var(--gold);
  color: var(--rich-black);
}