/* ==========================================================================
   ADMISSIONS STYLE · HAUTE ÉCOLE DE LANGUE (RIMAY LINGUA)
   Page indépendante d'admission et immatriculation
   ========================================================================== */

:root {
  /* Paleta cromática institucional */
  --adm-bg:        #F7F6F3;
  --adm-surface:   #FFFFFF;
  --adm-ink:       #18242F;
  --adm-ink-muted: #5E7282;
  --adm-line:      rgba(24, 36, 47, 0.16);
  --adm-line-fine: rgba(24, 36, 47, 0.08);
  --adm-accent:    #6a4858;
  --adm-accent-bg: rgba(106, 72, 88, 0.07);

  /* Sistema tipográfico exclusivo */
  --font-titulos:  'Jost', 'Futura', sans-serif;
  --font-lectura:  'Source Sans 3', sans-serif;
  --font-ui:       'Open Sauce One', sans-serif;
  --font-tecnica:  'Space Grotesk', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--adm-bg);
  color: var(--adm-ink);
  font-family: var(--font-lectura);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   1. BARRA SUPERIOR PROTOCOLAR
   -------------------------------------------------------------------------- */
.adm-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4.2rem;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(247, 246, 243, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--adm-line-fine);
  z-index: 100;
}

.adm-topbar__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.adm-topbar__monogram {
  font-family: var(--font-titulos);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--adm-accent);
}

.adm-topbar__separator {
  color: var(--adm-line);
  font-size: 0.85rem;
}

.adm-topbar__label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--adm-ink);
}

.adm-topbar__actions {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Conmutador de idioma */
.adm-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.adm-lang-opt {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--adm-ink-muted);
  transition: color 250ms ease;
}

.adm-lang-opt.active {
  color: var(--adm-ink);
  border-bottom: 1px solid var(--adm-ink);
}

.adm-lang-sep {
  color: var(--adm-line);
  font-size: 0.65rem;
}

/* Botón de cierre de pestaña */
.adm-btn-close {
  position: relative;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

.adm-btn-close span {
  position: absolute;
  top: 50%;
  left: 4px;
  width: 24px;
  height: 1.2px;
  background-color: var(--adm-ink);
  transition: background-color 250ms ease;
}

.adm-btn-close span:first-child { transform: rotate(45deg); }
.adm-btn-close span:last-child  { transform: rotate(-45deg); }

.adm-btn-close:hover {
  transform: rotate(90deg);
}

.adm-btn-close:hover span {
  background-color: var(--adm-accent);
}

/* --------------------------------------------------------------------------
   2. ESCENARIO CENTRAL & ENCABEZADO
   -------------------------------------------------------------------------- */
.adm-stage {
  max-width: 920px;
  margin: 0 auto;
  padding: calc(4.2rem + 4.5vh) clamp(1.5rem, 4vw, 3rem) 8vh clamp(1.5rem, 4vw, 3rem);
}

.adm-header {
  margin-bottom: 5.5rem;
  padding-bottom: 2.8rem;
  border-bottom: 1px solid var(--adm-line);
}

.adm-header__code {
  display: block;
  font-family: var(--font-tecnica);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--adm-accent);
  margin-bottom: 1.2rem;
}

.adm-header__title {
  margin: 0 0 1.6rem 0;
  font-family: var(--font-titulos);
  font-size: clamp(2.8rem, 5.2vw, 4.4rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--adm-ink);
}

.adm-header__mandate {
  margin: 0;
  font-family: var(--font-lectura);
  font-size: clamp(1.12rem, 1.4vw, 1.28rem);
  line-height: 1.68;
  color: #38454F;
  max-width: 48ch;
}

/* --------------------------------------------------------------------------
   3. SECCIONES Y LÍNEAS TIPOGRÁFICAS (PLIEGO EDITORIAL)
   -------------------------------------------------------------------------- */
.adm-ledger {
  display: flex;
  flex-direction: column;
  gap: 4.8rem;
}

.adm-section {
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
}

.adm-section__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--adm-line-fine);
}

.adm-section__num {
  font-family: var(--font-tecnica);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--adm-accent);
}

.adm-section__title {
  margin: 0;
  font-family: var(--font-titulos);
  font-size: 1.28rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--adm-ink);
}

.adm-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.2rem;
}

.adm-grid--duo {
  grid-template-columns: 1fr 1fr;
}

/* Campos de entrada con línea reactiva */
.adm-field {
  position: relative;
  display: flex;
  flex-direction: column;
}

.adm-input,
.adm-select {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.9rem 0 0.4rem 0;
  font-family: var(--font-lectura);
  font-size: 1.15rem;
  color: var(--adm-ink);
  outline: none;
  z-index: 1;
}

.adm-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background-color: var(--adm-line);
  transition: background-color 300ms ease;
}

.adm-line::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: var(--adm-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.adm-input:focus ~ .adm-line::after,
.adm-select:focus ~ .adm-line::after {
  transform: scaleX(1);
}

.adm-label {
  position: absolute;
  top: 0.9rem;
  left: 0;
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--adm-ink-muted);
  pointer-events: none;
  transform-origin: left top;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), color 300ms ease;
  z-index: 0;
}

/* Floating label al escribir */
.adm-input:focus ~ .adm-label,
.adm-input:not(:placeholder-shown) ~ .adm-label,
.adm-label--active {
  transform: translateY(-1.15rem) scale(0.85);
  color: var(--adm-accent);
  font-weight: 600;
}

.adm-select {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* --------------------------------------------------------------------------
   4. BÓVEDA DIGITAL DE ARCHIVOS (VAULT)
   -------------------------------------------------------------------------- */
.adm-vault {
  position: relative;
  width: 100%;
}

.adm-vault__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.adm-vault__frame {
  position: relative;
  border: 1px solid var(--adm-line);
  background: rgba(255, 255, 255, 0.45);
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: border-color 300ms ease, background-color 300ms ease;
}

.adm-vault:hover .adm-vault__frame,
.adm-vault.is-dragover .adm-vault__frame {
  border-color: var(--adm-accent);
  background-color: var(--adm-surface);
}

.adm-vault__idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.adm-vault__format {
  font-family: var(--font-tecnica);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--adm-accent);
}

.adm-vault__instruction {
  margin: 0;
  font-family: var(--font-lectura);
  font-size: 1.05rem;
  color: #38454F;
  max-width: 42ch;
}

.adm-vault__action {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--adm-ink);
  border-bottom: 1px solid var(--adm-ink);
  padding-bottom: 2px;
  margin-top: 0.6rem;
}

.adm-vault__attached {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.adm-vault.has-file .adm-vault__idle { display: none; }
.adm-vault.has-file .adm-vault__attached { display: flex; }

.adm-vault__filename {
  font-family: var(--font-tecnica);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--adm-ink);
}

.adm-vault__filesize {
  font-family: var(--font-tecnica);
  font-size: 0.82rem;
  color: var(--adm-accent);
}

.adm-vault__remove {
  background: none;
  border: none;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--adm-ink-muted);
  cursor: pointer;
  border-bottom: 1px solid var(--adm-line);
  padding-bottom: 2px;
  margin-top: 0.8rem;
  z-index: 20;
}

.adm-vault__remove:hover {
  color: var(--adm-accent);
  border-bottom-color: var(--adm-accent);
}

/* --------------------------------------------------------------------------
   5. CADRE JURIDIQUE & CHECKBOXES MINIMALISTAS (LOPDP)
   -------------------------------------------------------------------------- */
.adm-legal-summary {
  margin: 0;
  font-family: var(--font-lectura);
  font-size: 0.92rem;
  line-height: 1.7;
  color: #4A5568;
  text-align: justify;
}

.adm-legal-summary code {
  font-family: var(--font-tecnica);
  font-size: 0.88rem;
  color: var(--adm-accent);
}

.adm-legal-consents {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-top: 0.5rem;
}

.adm-checkbox {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: flex-start;
  gap: 1.1rem;
  cursor: pointer;
  user-select: none;
}

.adm-checkbox__native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.adm-checkbox__custom {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1.2px solid var(--adm-line);
  border-radius: 2px;
  background-color: var(--adm-surface);
  margin-top: 0.2rem;
  transition: all 250ms ease;
}

.adm-checkbox:hover .adm-checkbox__custom {
  border-color: var(--adm-accent);
}

.adm-checkbox__native:checked + .adm-checkbox__custom {
  background-color: var(--adm-accent);
  border-color: var(--adm-accent);
}

.adm-checkbox__native:checked + .adm-checkbox__custom::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #FFFFFF;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.adm-checkbox__label {
  font-family: var(--font-lectura);
  font-size: 0.96rem;
  line-height: 1.55;
  color: #2D3748;
}

/* --------------------------------------------------------------------------
   6. BOUTON DE SOUMISSION HAUTE COUTURE
   -------------------------------------------------------------------------- */
.adm-footer {
  padding-top: 2rem;
  border-top: 1px solid var(--adm-line);
  display: flex;
  justify-content: flex-start;
}

.adm-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 3.2rem;
  background-color: var(--adm-accent);
  color: #FFFFFF;
  border: none;
  border-radius: 2px;
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 300ms ease, transform 300ms ease, box-shadow 300ms ease;
  box-shadow: 0 10px 28px rgba(106, 72, 88, 0.18);
}

.adm-submit-btn:hover {
  background-color: #553746;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(106, 72, 88, 0.26);
}

.adm-submit-btn:disabled {
  background-color: #B5B2AC;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   7. RÉCÉPISSÉ NOTARIÉ (PANTALLA DE ÉXITO)
   -------------------------------------------------------------------------- */
.adm-receipt {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
  padding: 6vh 2rem;
  animation: apparaitreReceipt 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.adm-receipt.is-visible {
  display: flex;
}

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

.adm-receipt__seal {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1px solid var(--adm-accent);
  color: var(--adm-accent);
  font-family: var(--font-titulos);
  font-size: 1.4rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.08em;
}

.adm-receipt__code {
  font-family: var(--font-tecnica);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--adm-accent);
}

.adm-receipt__title {
  margin: 0;
  font-family: var(--font-titulos);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 500;
  color: var(--adm-ink);
}

.adm-receipt__dossier {
  width: 100%;
  max-width: 540px;
  background-color: var(--adm-surface);
  border: 1px solid var(--adm-line-fine);
  padding: 2rem 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.adm-receipt__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--adm-line-fine);
  padding-bottom: 0.6rem;
}

.adm-receipt__k {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--adm-ink-muted);
}

.adm-receipt__v {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--adm-ink);
}

.adm-receipt__v--highlight {
  font-family: var(--font-tecnica);
  font-size: 0.8rem;
  color: var(--adm-accent);
}

.adm-receipt__notice {
  margin: 0;
  font-family: var(--font-lectura);
  font-size: 1.05rem;
  line-height: 1.7;
  color: #38454F;
  max-width: 52ch;
}

.adm-receipt__close-btn {
  background: none;
  border: none;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--adm-ink);
  border-bottom: 1.5px solid var(--adm-ink);
  padding-bottom: 4px;
  cursor: pointer;
  margin-top: 1rem;
  transition: color 250ms ease, border-color 250ms ease;
}

.adm-receipt__close-btn:hover {
  color: var(--adm-accent);
  border-color: var(--adm-accent);
}

/* --------------------------------------------------------------------------
   8. ADAPTATION MOBILE
   -------------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
  .adm-grid--duo {
    grid-template-columns: 1fr;
  }
  .adm-submit-btn {
    width: 100%;
  }
}