@import url('./variables.css');

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-family);
  font-size: 1.05rem;
  background-color: var(--bg);
  /* petits pois discrets */
  background-image: radial-gradient(rgba(232, 71, 95, 0.16) 2px, transparent 2.5px);
  background-size: 28px 28px;
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.15; font-weight: 600; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }

:focus-visible { outline: 3px dashed var(--belgian-red); outline-offset: 3px; }

/* ---------- Navigation ---------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: var(--outline);
  padding: 0.7rem 0;
}
/* ruban tricolore sous la barre */
.navbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -9px; height: 6px;
  background: linear-gradient(90deg, var(--belgian-black) 33.3%, var(--belgian-gold) 33.3% 66.6%, var(--belgian-red) 66.6%);
  border-bottom: var(--outline);
}
.nav-content { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; }

.logo { display: flex; align-items: center; gap: 0.7rem; font-family: var(--font-title); font-weight: 600; font-size: 1.25rem; color: var(--ink); }
.logo-img { width: 44px; height: 44px; border-radius: 50%; border: var(--outline); object-fit: cover; background: var(--belgian-gold); }

.nav-content nav { display: flex; justify-content: center; }
.nav-links { display: flex; gap: 0.4rem; list-style: none; }
.nav-links a {
  display: block; padding: 0.35rem 1rem; border-radius: 50px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem;
  border: 2.5px solid transparent; transition: var(--transition);
}
.nav-links a:hover { background: var(--bg-soft); border-color: var(--line); transform: rotate(-3deg); }

/* ---------- Boutons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  background: var(--belgian-gold); color: var(--on-gold);
  font-family: var(--font-title); font-weight: 600; font-size: 1.05rem;
  padding: 0.6rem 1.6rem; border-radius: 50px; border: var(--outline);
  box-shadow: var(--shadow-sm); text-decoration: none; cursor: pointer;
  transition: var(--transition);
}
.btn-primary:hover { transform: translate(-2px, -3px) rotate(-1.5deg); box-shadow: 6px 7px 0 var(--shadow-color); background: #ffc94d; }
.btn-primary:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--shadow-color); }
.btn-icon { height: 1.5em; width: auto; flex-shrink: 0; display: block; }
.btn-disboard { background: #4272de; color: #fff; }
.btn-disboard:hover { background: #5b8def; }
.btn-large { padding: 0.9rem 2rem; font-size: 1.2rem; width: 100%; }

/* ---------- Hero ---------- */
.hero-section { padding: 4.5rem 0 5rem; }
.badge {
  display: inline-block; background: var(--lilac); color: var(--on-gold);
  font-weight: 800; font-size: 0.95rem; padding: 0.4rem 1.2rem;
  border-radius: 50px; border: var(--outline); box-shadow: var(--shadow-sm);
  margin-bottom: 2rem; transform: rotate(-2deg);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 3.5rem; align-items: start; }

.hero-title { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 1.6rem; font-weight: 700; }
.hero-title .intro { display: block; margin-bottom: 0.8rem; }

/* Le nom du serveur en 3 stickers : noir / jaune / rouge */
.name-sticker {
  display: inline-block; padding: 0.05em 0.5em 0.12em; margin: 0 0.2rem 0.5rem 0;
  border: var(--outline); border-radius: 18px; box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.name-sticker:hover { transform: rotate(0deg) scale(1.06); }
.text-black  { background: var(--belgian-black); color: #fff5f8; transform: rotate(-2.5deg); }
.text-yellow { background: var(--belgian-gold);  color: var(--on-gold);   transform: rotate(1.5deg); }
.text-red    { background: var(--belgian-red);   color: #fff;         transform: rotate(-1deg); }

.hero-description { color: var(--ink-soft); margin-bottom: 1.4rem; max-width: 62ch; }
.hero-description strong { color: var(--ink); }

.perk-list { list-style: none; display: grid; gap: 0.55rem; margin-bottom: 1.6rem; }
.perk-list li {
  background: var(--frame); border: var(--outline); border-radius: 16px;
  padding: 0.5rem 1rem; font-weight: 600; font-size: 0.98rem;
  box-shadow: 3px 3px 0 var(--shadow-color); max-width: 560px;
}
.perk-list li:nth-child(odd) { transform: rotate(-0.6deg); }
.perk-list li:nth-child(even) { transform: rotate(0.6deg); margin-left: 0.6rem; }

.hero-note {
  background: var(--note-bg); border: var(--outline); border-radius: 18px;
  padding: 0.9rem 1.2rem; font-style: italic; font-weight: 600; max-width: 560px;
}

/* ---------- Carte Discord ---------- */
.hero-card-wrapper { display: flex; justify-content: center; position: sticky; top: 110px; }
.discord-card {
  position: relative; width: 100%; max-width: 400px; text-align: center;
  background: var(--frame); border: var(--outline); border-radius: var(--radius-lg);
  box-shadow: 8px 8px 0 var(--shadow-color); padding: 3.2rem 2rem 2.2rem;
  transform: rotate(2deg); transition: var(--transition);
  overflow: hidden;
}
.discord-card:hover { transform: rotate(0deg) translateY(-4px); }
.discord-card::before { /* le petit ruban tricolore */
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 18px;
  border-bottom: var(--outline);
  background: linear-gradient(90deg, var(--belgian-black) 33.3%, var(--belgian-gold) 33.3% 66.6%, var(--belgian-red) 66.6%);
}
.server-avatar-container { position: relative; width: 130px; height: 130px; margin: 0 auto 1.3rem; }
.server-avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: var(--outline); box-shadow: var(--shadow-sm); background: var(--bg-soft); }
.online-indicator { position: absolute; bottom: 6px; right: 6px; width: 24px; height: 24px; background: #5fd68a; border: var(--outline); border-radius: 50%; }
.server-title { font-size: 1.6rem; margin-bottom: 0.7rem; }
.server-stats { display: flex; justify-content: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.6rem; font-size: 0.9rem; font-weight: 700; }
.server-stats span { background: var(--bg-soft); border: 2px solid var(--line); border-radius: 50px; padding: 0.1rem 0.8rem; }
.dot-green { display: inline-block; width: 8px; height: 8px; background: #3fbf6e; border-radius: 50%; margin-right: 5px; }

/* ---------- Sections ---------- */
.section-padding { padding: 5rem 0; }
.section-alt { background: var(--paper); border-top: var(--outline); border-bottom: var(--outline); }
.section-header { text-align: center; max-width: 620px; margin: 0 auto 3rem; }
.section-title { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 0.6rem; }
.section-subtitle { color: var(--ink-soft); }

/* ---------- Pourquoi nous rejoindre ---------- */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.8rem; }
.feature-card {
  border: var(--outline); border-radius: var(--radius-md); box-shadow: var(--shadow);
  padding: 1.8rem 1.5rem; transition: var(--transition);
}
.feature-card:nth-child(1) { background: var(--card-1); transform: rotate(-1.2deg); }
.feature-card:nth-child(2) { background: var(--card-2); transform: rotate(1deg); }
.feature-card:nth-child(3) { background: var(--card-3); transform: rotate(-0.8deg); }
.feature-card:nth-child(4) { background: var(--card-4); transform: rotate(1.3deg); }
.feature-card:hover { transform: rotate(0deg) translateY(-5px); }
.feature-icon { font-size: 2.3rem; margin-bottom: 0.6rem; }
.feature-card h3 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.feature-card p { font-size: 0.97rem; }

/* ---------- Règles ---------- */
.rules-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 1.2rem; max-width: 1000px; margin: 0 auto; }
.rule-box {
  display: flex; gap: 1.1rem; align-items: flex-start;
  background: var(--frame); border: var(--outline); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: 1.3rem 1.5rem; transition: var(--transition);
}
.rule-box:last-child:nth-child(odd) { grid-column: 1 / -1; }
.rule-box:hover { transform: translateX(6px); }
.rule-number {
  flex-shrink: 0; width: 48px; height: 48px; display: grid; place-items: center;
  font-family: var(--font-title); font-weight: 600; font-size: 1.3rem; color: var(--on-gold);
  border: var(--outline); border-radius: 50%; background: var(--belgian-gold);
}
.rule-box:nth-child(3n+2) .rule-number { background: var(--lilac); }
.rule-box:nth-child(3n) .rule-number { background: var(--belgian-red); color: #fff; }
.rule-content h4 { font-size: 1.15rem; margin-bottom: 0.15rem; }
.rule-content p { color: var(--ink-soft); font-size: 0.97rem; }

.section-subtitle a, .rules-footer a { color: var(--belgian-red); font-weight: 800; text-underline-offset: 3px; }
.rules-footer {
  max-width: 1000px; margin: 2rem auto 0; display: grid; gap: 0.6rem;
  background: var(--note-bg); border: var(--outline); border-radius: var(--radius-md);
  padding: 1.2rem 1.5rem; font-weight: 600;
}

/* ---------- Footer ---------- */
.footer { background: var(--belgian-black); color: #fff5f8; border-top: var(--outline); text-align: center; padding: 2.2rem 0 2.5rem; font-size: 0.92rem; }
.footer .hearts { font-size: 1.4rem; margin-bottom: 0.3rem; }
.btn-dashboard { margin: 0.8rem 0 1.2rem; padding: 0.45rem 1.3rem; font-size: 0.95rem; background: var(--lilac); }
.btn-dashboard:hover { background: #eadfff; }

/* ---------- Bouton thème ---------- */
.nav-right { justify-self: end; display: flex; align-items: center; gap: 0.8rem; }
.theme-toggle, .menu-toggle {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  background: var(--paper); border: var(--outline); box-shadow: var(--shadow-sm);
  font-size: 1.2rem; line-height: 1; transition: var(--transition);
}
.theme-toggle::before { content: '☀️'; }
:root[data-theme="light"] .theme-toggle::before { content: '🌙'; }
.menu-toggle { display: none; font-family: var(--font-title); font-weight: 600; color: var(--ink); }
.menu-toggle::before { content: '☰'; }
.navbar.menu-open .menu-toggle::before { content: '✕'; }
.theme-toggle:hover, .menu-toggle:hover { transform: rotate(-12deg) scale(1.08); }
.theme-toggle:active, .menu-toggle:active { transform: translate(2px, 2px); box-shadow: none; }

/* ---------- Apparition douce ---------- */
.reveal {
  opacity: 0; translate: 0 18px;
  transition: opacity .6s ease var(--d, 0ms), translate .6s ease var(--d, 0ms), transform var(--transition);
}
.reveal.visible { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; translate: 0 0; transition: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-card-wrapper { position: static; }
  .menu-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    flex-direction: column; gap: 0.3rem; padding: 1rem 1.1rem 1.3rem;
    background: var(--paper); border-bottom: var(--outline);
  }
  .navbar.menu-open .nav-links { display: flex; }
  .nav-links a { text-align: center; font-size: 1.1rem; padding: 0.6rem 1rem; }
  .nav-content { display: flex; justify-content: space-between; }
  .hero-section { padding-top: 3rem; }
}
@media (max-width: 600px) {
  .container { padding: 0 1.1rem; }
  .logo { font-size: 1.05rem; }
  .logo-img { width: 38px; height: 38px; }
  .btn-primary { padding: 0.5rem 1.2rem; font-size: 0.95rem; }
  .perk-list li:nth-child(even) { margin-left: 0; }
  .discord-card { padding: 2.8rem 1.3rem 1.8rem; box-shadow: 5px 5px 0 var(--shadow-color); }
}
@media (max-width: 380px) { .logo span { display: none; } }