:root {
  color-scheme: dark;
  --bg: #07070b;
  --panel: #11111a;
  --panel-2: #171726;
  --text: #f5f2ff;
  --muted: #b8b4c9;
  --accent: #8a63ff;
  --accent-2: #d4b7ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--bg), #16111f);
  color: var(--text);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

/* ---- Barre de navigation ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 6vw;
  background: rgba(7, 7, 11, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-2);
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  padding: 4rem 6vw 3rem;
  align-items: center;
  min-height: 90vh;
}

/* ---- Accueil avec grande image de fond ---- */
.hero-image {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 0;
  min-height: 88vh;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: 0;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 6rem 6vw 4rem;
  background: linear-gradient(
    to top,
    rgba(7, 7, 11, 0.95) 0%,
    rgba(7, 7, 11, 0.7) 45%,
    rgba(7, 7, 11, 0) 100%
  );
}

.hero-overlay .hero-text {
  max-width: 640px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--accent-2);
  font-size: 0.8rem;
  margin-bottom: 0.7rem;
}

h1,
h2,
h3 {
  margin: 0 0 0.8rem;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
}

h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
}

.hero-text,
.section p,
.card p,
.value-list p {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn {
  text-decoration: none;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-media img {
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  background: var(--panel);
  padding: 1rem;
}

.section {
  padding: 3rem 6vw;
}

.section-alt {
  background: rgba(255, 255, 255, 0.03);
}

.section-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: start;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card,
.value-list > div {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.1rem;
}

.value-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.contact {
  text-align: center;
}

.contact .btn {
  display: inline-block;
  margin-top: 1rem;
}

/* ---- Section trône (image + texte) ---- */
.throne-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 2.5rem;
  align-items: center;
}

.throne-media img {
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---- En-tête de page (page Membres) ---- */
.page-header {
  padding: 4rem 6vw 2rem;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.page-header-text {
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
}

/* ---- Membre mis en avant ---- */
.member-featured {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 2.5rem;
  align-items: center;
}

.member-featured-media img {
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.member-role {
  color: var(--accent-2);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

/* ---- Grille des membres ---- */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
}

.member-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.member-card:hover {
  transform: translateY(-4px);
  border-color: rgba(138, 99, 255, 0.5);
}

.member-avatar {
  width: 84px;
  height: 84px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-2);
  background: var(--panel-2);
  border: 2px solid var(--accent);
  overflow: hidden;
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-card .member-role {
  font-size: 0.9rem;
}

/* ---- Phrase culte du membre ---- */
.member-quote {
  margin-top: 1rem;
  padding: 0.6rem 0.9rem;
  font-style: italic;
  color: var(--accent-2);
  background: rgba(138, 99, 255, 0.08);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  font-size: 0.95rem;
}

.member-featured-text .member-quote {
  display: inline-block;
  margin-top: 1.2rem;
}

/* ---- Pied de page ---- */
.site-footer {
  text-align: center;
  padding: 2.5rem 6vw;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
}

/* ---- Compteur de fidèles ---- */
.stats-section {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.5rem 1rem;
}

.stat-number {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--accent-2);
  line-height: 1;
}

.stat-label {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---- Livre Sacré : commandements ---- */
.commandments {
  list-style: none;
  counter-reset: cmd;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.8rem;
  max-width: 780px;
}

.commandments li {
  counter-increment: cmd;
  position: relative;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1rem 1rem 1rem 3.5rem;
  color: var(--muted);
}

.commandments li::before {
  content: counter(cmd);
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 700;
}

/* ---- Formulaire "Rejoindre" ---- */
.join-wrapper {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 2rem;
  align-items: start;
}

.join-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.join-form label {
  font-weight: 600;
  margin-top: 0.8rem;
}

.join-form input,
.join-form textarea {
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  resize: vertical;
}

.join-form input:focus,
.join-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.join-form .btn {
  margin-top: 1.2rem;
  align-self: flex-start;
  cursor: pointer;
  border: none;
}

.join-status {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(138, 99, 255, 0.12);
  border: 1px solid var(--accent);
  color: var(--accent-2);
}

.join-side {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.5rem;
}

.join-side .btn {
  margin-top: 1rem;
  display: inline-block;
}

/* ---- Le Test d'Entrée (QCM) ---- */
.quiz-form {
  display: grid;
  gap: 1.5rem;
  max-width: 760px;
}

.quiz-q {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.2rem 1.3rem;
  margin: 0;
  background: var(--panel);
}

.quiz-q legend {
  font-weight: 700;
  padding: 0 0.5rem;
  color: var(--text);
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  margin-top: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  color: var(--muted);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.quiz-option:hover {
  border-color: rgba(138, 99, 255, 0.5);
}

.quiz-option input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.quiz-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(138, 99, 255, 0.12);
  color: var(--text);
}

.quiz-form .btn {
  justify-self: start;
  cursor: pointer;
  border: none;
}

.quiz-result {
  margin-top: 1.5rem;
  max-width: 760px;
  padding: 1.8rem;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--accent);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.quiz-result h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.quiz-score {
  color: var(--accent-2);
  font-weight: 600;
}

.quiz-result .btn {
  margin-top: 1rem;
  display: inline-block;
}

/* ---- Widget musique flottant (bouton + volume) ---- */
.music-widget {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(17, 17, 26, 0.9);
  backdrop-filter: blur(6px);
}

.music-toggle {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.music-toggle.playing {
  color: var(--accent-2);
}

/* Curseur de volume */
.music-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.music-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  cursor: pointer;
}

.music-volume::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

/* ---- Easter egg : pluie de bougies ---- */
.falling-candle {
  position: fixed;
  top: -40px;
  z-index: 50;
  pointer-events: none;
  animation-name: fall;
  animation-timing-function: linear;
}

@keyframes fall {
  to {
    transform: translateY(105vh) rotate(40deg);
    opacity: 0.2;
  }
}

/* ---- Easter egg : message secret ---- */
.secret-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 60;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  text-align: center;
  padding: 2rem 2.5rem;
  border-radius: 20px;
  background: rgba(17, 17, 26, 0.97);
  border: 1px solid var(--accent);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.secret-popup.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.secret-popup p {
  margin: 0.3rem 0;
  color: var(--accent-2);
}

@media (max-width: 900px) {
  .hero,
  .section-grid,
  .cards,
  .value-list,
  .throne-grid,
  .member-featured,
  .join-wrapper {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: auto;
    padding-top: 3rem;
  }

  .hero-overlay {
    padding-top: 4rem;
  }
}
