/* ============================================================
   RESILIA PARTNERS — PAGE CANDIDATURE
   ============================================================ */

.cand-body {
  background: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 2000;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--bleu);
  color: var(--blanc);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

/* ===== EN-TÊTE ===== */
.cand-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(27, 79, 114, 0.1);
}

.cand-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cand-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.cand-header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.cand-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gris-fonce);
  transition: color 0.2s ease;
}

.cand-back:hover {
  color: var(--bleu);
}

.cand-lang {
  display: inline-flex;
  padding: 0.2rem;
  border: 1px solid var(--gris-clair);
  border-radius: 999px;
  background: var(--blanc);
}

.cand-lang-btn {
  border: 0;
  background: transparent;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gris-moyen);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.cand-lang-btn.active {
  background: var(--bleu);
  color: var(--blanc);
}

/* ===== MISE EN PAGE ===== */
.cand-main {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 2rem;
  align-items: start;
}

/* ===== COLONNE INTRO ===== */
.cand-aside {
  position: sticky;
  top: 92px;
  border-radius: 1.25rem;
  overflow: hidden;
  color: #f7fbff;
  background:
    radial-gradient(circle at 110% -10%, rgba(232, 163, 61, 0.34), transparent 46%),
    radial-gradient(circle at -20% 110%, rgba(42, 111, 151, 0.65), transparent 52%),
    linear-gradient(155deg, #153f5c 0%, #1b4f72 55%, #173e58 100%);
  box-shadow: 0 24px 60px -28px rgba(21, 63, 92, 0.55);
}

.cand-aside::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  pointer-events: none;
}

.cand-aside-inner {
  position: relative;
  z-index: 1;
  padding: 2.4rem 2.1rem;
}

.cand-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
  padding: 0.38rem 0.75rem;
  border: 1px solid rgba(245, 212, 138, 0.4);
  border-radius: 999px;
  background: rgba(245, 212, 138, 0.12);
  color: var(--or-clair);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cand-aside h1 {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: clamp(1.7rem, 2.8vw, 2.25rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.cand-lead {
  color: rgba(247, 251, 255, 0.78);
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 2rem;
}

.cand-steps {
  list-style: none;
  display: grid;
  gap: 1.15rem;
  padding: 0;
  margin: 0 0 2rem;
}

.cand-steps li {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.cand-step-num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid rgba(245, 212, 138, 0.38);
  border-radius: 0.6rem;
  color: var(--or-clair);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.04);
}

.cand-steps strong {
  display: block;
  font-size: 0.93rem;
  font-weight: 650;
  margin-bottom: 0.12rem;
}

.cand-steps small {
  display: block;
  color: rgba(247, 251, 255, 0.62);
  font-size: 0.82rem;
  line-height: 1.45;
}

.cand-aside-note {
  display: flex;
  gap: 0.7rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.055);
}

.cand-aside-note svg {
  flex: 0 0 auto;
  color: var(--or-clair);
  margin-top: 0.15rem;
}

.cand-aside-note p {
  font-size: 0.8rem;
  line-height: 1.55;
  color: rgba(247, 251, 255, 0.72);
}

.cand-contact {
  margin-top: 1.4rem;
  font-size: 0.82rem;
  color: rgba(247, 251, 255, 0.62);
}

.cand-contact a {
  color: var(--or-clair);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== CARTE FORMULAIRE ===== */
.cand-card {
  background: var(--blanc);
  border: 1px solid rgba(27, 79, 114, 0.1);
  border-radius: 1.25rem;
  padding: 2.4rem 2.3rem;
  box-shadow: 0 24px 60px -34px rgba(21, 63, 92, 0.35);
}

.cand-card-head {
  padding-bottom: 1.4rem;
  margin-bottom: 1.7rem;
  border-bottom: 1px solid var(--gris-clair);
}

.cand-card-kicker {
  color: #a16207;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.cand-card-head h2,
.cand-success h2 {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: clamp(1.45rem, 2.2vw, 1.75rem);
  line-height: 1.25;
  color: var(--bleu);
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
}

.cand-card-head p:last-child,
.cand-success > p {
  color: var(--gris-moyen);
  font-size: 0.92rem;
}

/* ===== FORMULAIRE ===== */
.cand-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 2rem;
}

.cand-fieldset legend {
  width: 100%;
  padding-bottom: 0.75rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px dashed var(--gris-clair);
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bleu);
}

.cand-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.cand-field {
  margin-bottom: 1.05rem;
  min-width: 0;
}

.cand-field label,
.cand-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--gris-fonce);
}

.cand-field label span[aria-hidden='true'] {
  color: #c2410c;
}

.cand-field input,
.cand-field select,
.cand-field textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d7dde3;
  border-radius: 0.55rem;
  background: #fbfcfd;
  color: var(--noir);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cand-field textarea {
  resize: vertical;
  min-height: 9rem;
  line-height: 1.6;
}

.cand-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.2rem;
}

.cand-field input:hover,
.cand-field select:hover,
.cand-field textarea:hover {
  border-color: #b9c4ce;
}

.cand-field input:focus,
.cand-field select:focus,
.cand-field textarea:focus,
.cand-chip input:focus-visible + span,
.cand-consent-label input:focus-visible {
  outline: none;
  border-color: var(--bleu-clair);
  background: var(--blanc);
  box-shadow: 0 0 0 3px rgba(42, 111, 151, 0.16);
}

.cand-field input[aria-invalid='true'],
.cand-field select[aria-invalid='true'],
.cand-field textarea[aria-invalid='true'] {
  border-color: #b91c1c;
  background: #fff7f7;
}

.cand-field input[aria-invalid='true']:focus,
.cand-field select[aria-invalid='true']:focus,
.cand-field textarea[aria-invalid='true']:focus {
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.14);
}

.cand-help-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.35rem;
}

.cand-help {
  color: var(--gris-moyen);
  font-size: 0.74rem;
  line-height: 1.45;
  margin-top: 0.35rem;
}

.cand-counter {
  flex: 0 0 auto;
  color: var(--gris-moyen);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.cand-counter.is-warning {
  color: #b45309;
}

.cand-counter.is-over {
  color: #b91c1c;
}

.cand-error {
  margin-top: 0.35rem;
  color: #b91c1c;
  font-size: 0.76rem;
  font-weight: 550;
}

/* Langues */
.cand-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cand-chip {
  position: relative;
  cursor: pointer;
}

.cand-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.cand-chip span {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.75rem;
  border: 1px solid #d7dde3;
  border-radius: 999px;
  background: #fbfcfd;
  color: var(--gris-fonce);
  font-size: 0.8rem;
  font-weight: 550;
  transition: all 0.18s ease;
}

.cand-chip input:checked + span {
  border-color: var(--bleu);
  background: rgba(27, 79, 114, 0.08);
  color: var(--bleu);
  font-weight: 650;
}

.cand-chip:hover span {
  border-color: #b9c4ce;
}

/* Consentement */
.cand-consent {
  padding: 1rem 1.1rem;
  margin: 0 0 1.4rem;
  border: 1px solid rgba(27, 79, 114, 0.14);
  border-radius: 0.7rem;
  background: rgba(27, 79, 114, 0.035);
}

.cand-consent-label {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--gris-fonce);
}

.cand-consent-label input {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.16rem;
  accent-color: var(--bleu);
  cursor: pointer;
}

.cand-consent-label a {
  display: inline-block;
  margin-left: 0.25rem;
  color: var(--bleu-clair);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Anti-robots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Envoi */
.cand-submit-row {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  padding-top: 0.3rem;
}

.cand-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.8rem 1.5rem;
  border: 0;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, var(--bleu), var(--bleu-clair));
  color: var(--blanc);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(27, 79, 114, 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.cand-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -14px rgba(27, 79, 114, 0.8);
}

.cand-submit:focus-visible {
  outline: 3px solid rgba(232, 163, 61, 0.65);
  outline-offset: 3px;
}

.cand-submit:disabled {
  opacity: 0.72;
  cursor: progress;
  transform: none;
}

.cand-submit-note {
  flex: 1;
  min-width: 12rem;
  color: var(--gris-moyen);
  font-size: 0.76rem;
  line-height: 1.5;
}

.cand-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--blanc);
  border-radius: 50%;
  animation: cand-spin 0.7s linear infinite;
}

@keyframes cand-spin {
  to {
    transform: rotate(360deg);
  }
}

.cand-status {
  margin-top: 0.6rem;
  color: var(--gris-moyen);
  font-size: 0.8rem;
}

/* Alertes */
.cand-alert {
  padding: 0.9rem 1rem;
  margin-bottom: 1.4rem;
  border: 1px solid rgba(232, 163, 61, 0.45);
  border-radius: 0.7rem;
  background: rgba(232, 163, 61, 0.1);
  color: #6b4a12;
  font-size: 0.84rem;
  line-height: 1.5;
}

.cand-alert strong {
  display: block;
  margin-bottom: 0.15rem;
}

.cand-alert-error {
  border-color: rgba(185, 28, 28, 0.35);
  background: #fff5f5;
  color: #7f1d1d;
}

/* ===== SUCCÈS ===== */
.cand-success {
  text-align: center;
  padding: 1.2rem 0.5rem 0.5rem;
}

.cand-success-icon {
  display: grid;
  place-items: center;
  width: 4.4rem;
  height: 4.4rem;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  background: rgba(27, 79, 114, 0.08);
  color: var(--bleu);
}

.cand-success h2 {
  margin-bottom: 0.6rem;
}

.cand-success > p {
  max-width: 34rem;
  margin: 0 auto 1.1rem;
}

.cand-ref {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 1.4rem;
  margin-bottom: 1.6rem;
  border: 1px dashed rgba(27, 79, 114, 0.3);
  border-radius: 0.6rem;
  color: var(--gris-moyen);
  font-size: 0.76rem;
}

.cand-ref strong {
  color: var(--bleu);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
}

.cand-success-actions {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.cand-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.3rem;
  border: 1px solid var(--gris-clair);
  border-radius: 0.6rem;
  background: var(--blanc);
  color: var(--gris-fonce);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.cand-secondary:hover {
  border-color: var(--bleu-clair);
  color: var(--bleu);
}

/* ===== PIED DE PAGE ===== */
.cand-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 1.4rem 1.5rem 2rem;
  border-top: 1px solid rgba(27, 79, 114, 0.1);
  color: var(--gris-moyen);
  font-size: 0.78rem;
}

.cand-footer nav {
  display: flex;
  gap: 1.1rem;
}

.cand-footer a {
  color: var(--gris-fonce);
  font-weight: 550;
}

.cand-footer a:hover {
  color: var(--bleu);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .cand-main {
    grid-template-columns: 1fr;
    max-width: 760px;
  }

  .cand-aside {
    position: static;
  }

  .cand-aside-inner {
    padding: 1.9rem 1.8rem;
  }

  .cand-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
  }

  .cand-steps li {
    flex-direction: column;
    gap: 0.5rem;
  }

  .cand-card {
    padding: 2rem 1.8rem;
  }
}

@media (max-width: 680px) {
  .cand-header-inner {
    padding: 0.8rem 1rem;
  }

  .cand-back span {
    display: none;
  }

  .cand-main {
    padding: 1.2rem 0.9rem 2.5rem;
    gap: 1.2rem;
  }

  .cand-aside-inner {
    padding: 1.6rem 1.25rem;
  }

  .cand-aside h1 {
    font-size: 1.55rem;
  }

  .cand-steps {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .cand-steps li {
    flex-direction: row;
  }

  .cand-card {
    padding: 1.5rem 1.15rem;
    border-radius: 1rem;
  }

  .cand-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .cand-card-head {
    margin-bottom: 1.3rem;
  }

  .cand-submit-row {
    align-items: stretch;
  }

  .cand-submit {
    width: 100%;
  }

  .cand-footer {
    padding: 1.2rem 1rem 1.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
