/* Postuler — candidature Caverne (dashboard / librairie / profil v3) */

:root {
  --post-bg: #050507;
  --post-line: rgba(255, 255, 255, 0.09);
  --post-muted: rgba(255, 255, 255, 0.55);
  --post-primary: #6e5bff;
  --post-primary-2: #9d7cff;
  --post-accent: #c45eff;
  --post-premium: #ffb84d;
  --post-success: #3ee6a1;
  --post-danger: #ff5e7e;
}

.post-page {
  position: relative;
  z-index: 10;
  min-height: 100vh;
}

.post-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--post-line);
  background: rgba(5, 5, 7, 0.82);
  backdrop-filter: blur(14px);
}

.post-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
}

.post-brand-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: #fff;
  color: #000;
  font-weight: 900;
  font-style: italic;
}

.post-brand small {
  display: block;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--post-muted);
}

.post-brand strong {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-toplink {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--post-muted);
  text-decoration: none;
  border: 1px solid var(--post-line);
  padding: 0.55rem 0.85rem;
  transition: 0.18s ease;
}

.post-toplink:hover {
  color: #fff;
  border-color: rgba(157, 124, 255, 0.4);
}

.post-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3.5rem;
  align-items: start;
}

.post-layout.is-solo,
.post-layout:not(:has(.post-sidebar:not(.hidden))) {
  grid-template-columns: 1fr;
  min-height: calc(100vh - 4.5rem);
  align-content: center;
  align-items: center;
}

.post-layout.is-solo .post-main,
.post-main.is-solo,
.post-layout:not(:has(.post-sidebar:not(.hidden))) .post-main {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.post-sidebar {
  position: sticky;
  top: 4.5rem;
  border: 1px solid var(--post-line);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
}

.post-sidebar-head {
  padding: 1.1rem 1rem;
  border-bottom: 1px solid var(--post-line);
}

.post-sidebar-kicker {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--post-primary-2);
}

.post-sidebar-title {
  margin-top: 0.45rem;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.post-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 13px 15px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: #a1a1aa;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: 0.18s ease;
}

.post-step b {
  font-size: 10px;
  font-weight: 900;
  color: var(--post-primary-2);
}

.post-step span {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.post-step.is-active,
.post-step.is-done {
  background: rgba(110, 91, 255, 0.08);
  color: #fff;
}

.post-step.is-done b {
  color: var(--post-success);
}

.post-sidebar-note {
  padding: 1rem;
  font-size: 11px;
  line-height: 1.55;
  color: #737373;
  border-top: 1px solid var(--post-line);
}

.post-main {
  min-width: 0;
}

.post-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--post-line);
  padding: 2rem;
  margin-bottom: 1.5rem;
  background:
    radial-gradient(circle at 15% 20%, rgba(110, 91, 255, 0.22), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(196, 94, 255, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.42));
}

.post-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(5, 5, 7, 0.15), rgba(5, 5, 7, 0.55));
}

.post-hero-content {
  position: relative;
  z-index: 1;
}

.post-hero-kicker {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--post-primary-2);
}

.post-hero h1 {
  margin-top: 0.85rem;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.post-hero-lead {
  margin-top: 1rem;
  max-width: 38rem;
  font-size: 14px;
  line-height: 1.65;
  color: var(--post-muted);
  border-left: 2px solid rgba(157, 124, 255, 0.45);
  padding-left: 1rem;
}

.post-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.25rem;
}

.post-pill {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--post-line);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a3a3a3;
  background: rgba(0, 0, 0, 0.28);
}

.post-panel {
  border: 1px solid var(--post-line);
  background: rgba(0, 0, 0, 0.28);
  padding: 1.35rem 1.4rem;
  margin-bottom: 1rem;
}

.post-panel.hidden {
  display: none !important;
}

.post-panel-kicker {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--post-primary-2);
}

.post-panel h2 {
  margin-top: 0.4rem;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.post-panel-desc {
  margin-top: 0.65rem;
  font-size: 13px;
  line-height: 1.6;
  color: #737373;
}

.post-lore-grid {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.post-lore-card {
  border-left: 3px solid var(--post-primary-2);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.85rem 0.95rem;
}

.post-lore-card strong {
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.post-lore-card p {
  margin-top: 0.4rem;
  font-size: 12px;
  line-height: 1.55;
  color: #a3a3a3;
}

.post-field {
  margin-top: 1rem;
}

.post-char-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.45rem;
  font-size: 10px;
  line-height: 1.4;
  color: #525252;
}

.post-char-hint strong {
  color: #a3a3a3;
  font-weight: 800;
}

.post-char-hint__count {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  color: #737373;
  white-space: nowrap;
}

.post-char-hint__count b {
  color: #f87171;
  font-weight: 800;
}

.post-char-hint.is-ok .post-char-hint__count b {
  color: var(--post-success);
}

.post-char-hint.is-ok strong {
  color: #86efac;
}

.post-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #737373;
}

.post-input,
.post-textarea,
.post-select {
  width: 100%;
  border: 1px solid var(--post-line);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  padding: 0.75rem 0.85rem;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s ease;
}

.post-textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.55;
}

.post-input:focus,
.post-textarea:focus,
.post-select:focus {
  border-color: rgba(157, 124, 255, 0.45);
}

.post-check {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.75rem;
  align-items: start;
  margin-top: 0.75rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--post-line);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.post-check:has(input:checked) {
  border-color: rgba(62, 230, 161, 0.35);
  background: rgba(62, 230, 161, 0.06);
}

.post-check input {
  margin-top: 0.15rem;
  accent-color: var(--post-success);
}

.post-check strong {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.post-check span {
  display: block;
  margin-top: 0.25rem;
  font-size: 11px;
  line-height: 1.45;
  color: #737373;
}

.post-referral-skip {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 184, 77, 0.28);
  background: linear-gradient(135deg, rgba(255, 184, 77, 0.08), rgba(110, 91, 255, 0.05));
}

.post-referral-skip-kicker {
  margin: 0;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--post-premium);
}

.post-referral-skip-title {
  margin: 0.45rem 0 0;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
}

.post-referral-skip-lead {
  margin: 0.55rem 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: #a3a3a3;
}

.post-referral-skip-reasons {
  margin: 1rem 0 0;
  padding: 0;
  border: 0;
}

.post-referral-skip-reasons .post-label {
  margin-bottom: 0.35rem;
}

.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

.post-btn {
  border: 1px solid var(--post-line);
  background: transparent;
  color: #e5e7eb;
  padding: 0.8rem 1.2rem;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.18s ease;
}

.post-btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.post-btn--primary {
  border-color: rgba(255, 255, 255, 0.35);
  background: #fff;
  color: #000;
}

.post-btn--primary:hover {
  background: var(--post-primary);
  border-color: var(--post-primary);
  color: #fff;
}

.post-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.post-error {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255, 94, 126, 0.35);
  background: rgba(255, 94, 126, 0.08);
  color: #ffb6c5;
  font-size: 12px;
}

.post-error.hidden,
.post-success.hidden {
  display: none !important;
}

.post-success {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px solid rgba(62, 230, 161, 0.35);
  background: rgba(62, 230, 161, 0.06);
}

.post-success h2 {
  font-size: 1.75rem;
  font-weight: 900;
  font-style: italic;
  color: #fff;
}

.post-success p {
  margin-top: 0.85rem;
  font-size: 13px;
  line-height: 1.6;
  color: #a3a3a3;
}

.post-protocol {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--post-line);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--post-success);
}

.post-closed {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px dashed rgba(255, 184, 77, 0.35);
  background: rgba(255, 184, 77, 0.06);
}

.post-member {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px solid rgba(157, 124, 255, 0.35);
  background: rgba(110, 91, 255, 0.08);
}

.post-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.post-reveal.visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 960px) {
  .post-layout {
    grid-template-columns: 1fr;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .post-sidebar {
    position: relative;
    top: auto;
  }

  .post-sidebar-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .post-sidebar-steps {
    grid-template-columns: 1fr;
  }

  .post-hero {
    padding: 1.35rem 1.1rem;
  }
}
