/* ============================================================
   NOVALYS — Académie Roleplay
   Feuille de style principale
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --nav-h: 62px;
  --dark: #1a1a2e;
  --dark-hover: #14142a;
  --gold: #c9a84c;
  --gold-light: #f5ecd4;
  --gold-muted: #9a7230;
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --transition: 0.15s ease;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: #f4f2ef;
  color: #1a1a1a;
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* ── Navigation ── */
nav {
  background: #fff;
  border-bottom: 1px solid #e8e5e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: var(--nav-h);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--dark) 55%, var(--gold) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Serif Display', serif;
  font-size: 17px;
  color: var(--gold-light);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.nav-name {
  font-family: 'DM Serif Display', serif;
  font-size: 19px;
  letter-spacing: -0.3px;
  color: #1a1a1a;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-btn {
  background: none;
  border: none;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  color: #666;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  transition: background var(--transition), color var(--transition);
}

.nav-btn:hover {
  background: #f4f2ef;
  color: #1a1a1a;
}

.nav-btn.active {
  color: #1a1a1a;
  font-weight: 500;
  background: #f0ede8;
}

.nav-btn-cta {
  background: var(--dark);
  color: var(--gold-light);
  border: none;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  transition: background var(--transition);
}

.nav-btn-cta:hover {
  background: var(--dark-hover);
}

/* ── Pages ── */
.page { display: none; }
.page.active { display: block; }

/* ── Hero ── */
.hero {
  padding: 4.5rem 2rem 3.5rem;
  background: #fff;
  border-bottom: 1px solid #e8e5e0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, #f5ecd4 0%, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}

.hero-tag {
  display: inline-block;
  background: var(--gold-light);
  color: var(--gold-muted);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 1.3rem;
}

.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 44px;
  line-height: 1.12;
  letter-spacing: -0.8px;
  margin-bottom: 1rem;
  color: #1a1a1a;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero p {
  font-size: 15px;
  color: #666;
  max-width: 460px;
  margin: 0 auto 2.2rem;
  line-height: 1.7;
  font-weight: 300;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
}

.hero-stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: #1a1a1a;
  display: block;
  line-height: 1;
  margin-bottom: 3px;
}

.hero-stat-lbl {
  font-size: 12px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ── Main Layout ── */
.main {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Sidebar ── */
.sidebar {
  width: 230px;
  flex-shrink: 0;
}

.sidebar-card {
  background: #fff;
  border: 1px solid #e8e5e0;
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-card);
}

.sidebar-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #aaa;
  font-weight: 500;
  margin-bottom: 0.9rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.filter-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #555;
  transition: all var(--transition);
  user-select: none;
  border: 1px solid transparent;
}

.filter-chip:hover {
  background: #f4f2ef;
  color: #1a1a1a;
}

.filter-chip.active {
  background: var(--dark);
  color: var(--gold-light);
}

.filter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.filter-count {
  margin-left: auto;
  font-size: 11px;
  opacity: 0.55;
}

/* ── Content ── */
.content {
  flex: 1;
  min-width: 0;
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}

.content-header h2 {
  font-size: 14px;
  font-weight: 400;
  color: #888;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e0dcd6;
  border-radius: 9px;
  padding: 0 12px;
  flex: 1;
  max-width: 300px;
  transition: border-color var(--transition);
}

.search-bar:focus-within {
  border-color: var(--gold);
}

.search-bar input {
  border: none;
  background: none;
  font-size: 13px;
  outline: none;
  padding: 9px 0;
  flex: 1;
  font-family: 'DM Sans', sans-serif;
  color: #1a1a1a;
}

.search-bar input::placeholder { color: #bbb; }

.search-icon {
  font-size: 16px;
  color: #bbb;
}

/* ── Job Cards ── */
.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.job-card {
  background: #fff;
  border: 1px solid #e8e5e0;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  cursor: pointer;
  transition: border-color var(--transition), transform 0.12s ease, box-shadow var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: var(--shadow-card);
}

.job-card:hover {
  border-color: #ccc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.job-card.featured {
  border-color: var(--gold);
  border-width: 1.5px;
}

.job-avatar {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  font-family: 'DM Serif Display', serif;
}

.job-body { flex: 1; min-width: 0; }

.job-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.job-title {
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.3;
}

.job-badges {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-new      { background: #e8f4e8; color: #2d6e2d; }
.badge-featured { background: var(--gold-light); color: var(--gold-muted); }
.badge-urgent   { background: #fce8e8; color: #8f2222; }

.job-dept {
  font-size: 12px;
  color: #999;
  margin-bottom: 7px;
}

.job-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.55;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.job-tag {
  font-size: 12px;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 4px;
}

.job-cta {
  margin-left: auto;
  background: none;
  border: 1px solid #e0dcd6;
  font-size: 12px;
  padding: 5px 13px;
  border-radius: 7px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  color: #555;
  transition: background var(--transition), border-color var(--transition);
}

.job-cta:hover {
  background: #f4f2ef;
  border-color: #ccc;
}

.empty {
  text-align: center;
  padding: 4rem 1rem;
  color: #aaa;
  font-size: 14px;
}

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 10, 20, 0.45);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(2px);
}

.modal-overlay.open { display: flex; }

.modal {
  background: #fff;
  border-radius: 18px;
  border: 1px solid #e8e5e0;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modal-in 0.2s ease;
}

@keyframes modal-in {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
  padding: 1.6rem 1.6rem 1.1rem;
  border-bottom: 1px solid #f0ede8;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.modal-close {
  background: none;
  border: 1px solid #e8e5e0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  color: #888;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.modal-close:hover {
  background: #f4f2ef;
  color: #1a1a1a;
}

.modal-body { padding: 1.6rem; }

.modal-section { margin-bottom: 1.8rem; }

.modal-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #bbb;
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.modal-section p,
.modal-section li {
  font-size: 14px;
  line-height: 1.7;
  color: #333;
}

.modal-section ul {
  padding-left: 1.2rem;
}

.modal-section li { margin-bottom: 5px; }

/* ── Forms ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-size: 12px;
  font-weight: 500;
  color: #888;
}

.form-input,
.form-textarea,
.form-select {
  background: #faf9f7;
  border: 1px solid #e8e5e0;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  color: #1a1a1a;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--gold);
  background: #fff;
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

.form-submit {
  width: 100%;
  background: var(--dark);
  color: var(--gold-light);
  border: none;
  border-radius: 9px;
  padding: 13px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  cursor: pointer;
  margin-top: 6px;
  transition: background var(--transition);
  letter-spacing: 0.2px;
}

.form-submit:hover { background: var(--dark-hover); }

.form-success {
  text-align: center;
  padding: 2.5rem 1rem;
}

.form-success .check {
  width: 52px;
  height: 52px;
  background: #e8f4e8;
  color: #2d6e2d;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 1.2rem;
}

.form-success h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.form-success p {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
}

/* ── Admin Panel ── */
.admin-panel {
  padding: 2.5rem 2rem;
  max-width: 680px;
  margin: 0 auto;
}

.admin-panel h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  margin-bottom: 0.3rem;
  color: #1a1a1a;
}

.admin-panel > p {
  font-size: 13px;
  color: #888;
  margin-bottom: 1.8rem;
}

.admin-form-card {
  background: #fff;
  border: 1px solid #e8e5e0;
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-card);
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-grid .full { grid-column: 1 / -1; }

.admin-save {
  background: var(--dark);
  color: var(--gold-light);
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}

.admin-save:hover { background: var(--dark-hover); }

.admin-notify {
  background: #e8f4e8;
  color: #2d6e2d;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 12px;
  margin-bottom: 14px;
  display: none;
  border: 1px solid #c3e4c3;
}

.admin-list { margin-top: 2rem; }

.admin-list-title {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 0.8rem;
}

.admin-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #f0ede8;
  font-size: 13px;
}

.admin-item:last-child { border-bottom: none; }

.admin-item-info { flex: 1; }

.admin-item-title { font-weight: 500; color: #1a1a1a; }

.admin-item-dept {
  font-size: 11px;
  color: #aaa;
  margin-top: 2px;
}

.admin-del {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 15px;
  padding: 5px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.admin-del:hover {
  color: #c0392b;
  background: #fce8e8;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .main { flex-direction: column; padding: 1rem; }
  .sidebar { width: 100%; }
  .hero h1 { font-size: 32px; }
  .hero-stats { gap: 1.5rem; }
  .form-grid, .admin-grid { grid-template-columns: 1fr; }
  .form-group.full, .admin-grid .full { grid-column: 1; }
  nav { padding: 0 1rem; }
}
