/* =====================
   Design Tokens
===================== */
:root {
  --primary: #0D62E1;
  --primary-dark: #0D1FE0;
  --primary-light: #0DA4E0;
  --primary-soft: #588FE0;

  --bg-main: #ffffff;
  --bg-soft: #f2f7ff;
  --bg-accent: #e8f1ff;

  --text-main: #0f172a;
  --text-muted: #64748b;

  --border: #e2e8f0;

  --radius: 14px;
  --transition: 0.25s ease;
}

/* =====================
   Reset
===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(
    180deg,
    #eaf2ff 0%,
    #f5f9ff 35%,
    #ffffff 100%
  );
  color: var(--text-main);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.dashboard .container {
  max-width: 1600px; /* ou 1400px si tu veux un peu moins large */
  padding: 0 2rem;   /* padding latéral propre */
}

/* =====================
   Navbar
===================== */
.navbar {
  background: linear-gradient( 135deg, var(--primary), var(--primary-soft) );
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.logo {
  font-weight: 600;
  font-size: 1.1rem;
  color: rgba(255, 255, 255);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.75rem;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: #ffffff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.nav-links a:hover {
  color: #ffffff;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.6rem;
  cursor: pointer;
}

/* Connexion (outline) */
.login-btn {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-size: 1rem; /* ↑ cohérent avec les liens */
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.login-btn:hover {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.login-btn::after {
    display: none !important;
}

/* =====================
   Hero
===================== */
.hero {
  padding: 8rem 0 7rem;
  text-align: center;
}

.hero-content {
  max-width: 900px; /* plus large qu’avant */
}

.hero h1 {
  font-size: 3.2rem;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.15rem;
  margin-bottom: 3rem;
}



.hero-content {
  max-width: 720px;
}

.feature-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 2.8rem;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero p {
  color: var(--gray-500);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

/* =====================
   Buttons
===================== */
.primary-btn {
  background: linear-gradient(
    135deg,
    var(--primary),
    var(--primary-dark)
  );
  color: #ffffff;
  border: none;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(13, 98, 225, 0.45);
}

.secondary-btn {
  background: #ffffff;
  color: var(--primary);
  border: 1px solid var(--gray-300);
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.secondary-btn:hover {
  background: rgba(13, 98, 225, 0.06);
  transform: translateY(-2px);
}

/* =====================
   Features
===================== */
.features {
  padding: 6rem 0;
  background: var(--bg-soft);
}

.features h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 4rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
}

.feature-card {
  padding: 2.5rem;
  border-radius: var(--radius);
  background: linear-gradient( 180deg, #ffffff, var(--bg-accent) );
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(13, 98, 225, 0.12);
}

.icon-placeholder {
  width: 52px;
  height: 52px;
  background: linear-gradient( 135deg, var(--primary-light), var(--primary) );
  border-radius: 14px;
  margin-bottom: 1.5rem;
  transition: background var(--transition), transform var(--transition);
}

.feature-card:hover .icon-placeholder {
  background: var(--primary);
  transform: scale(1.05);
}

.feature-card h3 {
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--gray-500);
  font-size: 0.95rem;
}

/* =====================
   CTA
===================== */
.cta {
  padding: 5rem 0;
  background: linear-gradient( 135deg, var(--primary), var(--primary-light) );
  color: #ffffff;
}

.cta-content {
  text-align: center;
  max-width: 620px;
}

.cta p {
  margin: 1.25rem 0 2.5rem;
  color: rgba(255, 255, 255, 0.85);
}

/* =====================
   Footer
===================== */
.footer {
  background: #050b1a;
  padding: 2rem 0; /* ↓ moins haut */
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem; /* ↓ moins d’espace */
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.85rem;
}

.footer p {
  font-size: 0.8rem;
  opacity: 0.7;
  color: rgba(255, 255, 255);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #ffffff;
}

.discord-btn img {
  width: 42px;
  transition: transform 0.25s ease;
}

.discord-btn:hover img {
  transform: scale(1.1);
}


.theme-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: rotate(15deg);
}

/* =====================
   Testimonials
===================== */

.testimonials {
  padding: 5rem 0;
  overflow: hidden;
}

.testimonials h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.testimonial-wrapper {
  overflow: hidden;
  position: relative;
}

/* Track */
.testimonial-track {
  display: flex;
  gap: 2rem;
  width: max-content;
  animation: scroll 32s linear infinite;
  will-change: transform;
}

/* Card */
.testimonial {
  min-width: 320px;
  background: linear-gradient(
    180deg,
    #ffffff,
    #f4f8ff
  );
  padding: 2.2rem;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(13, 98, 225, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect */
.testimonial:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(13, 98, 225, 0.25);
}

/* Text */
.testimonial p {
  font-style: italic;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.testimonial span {
  font-weight: 600;
  color: var(--primary);
}

/* Infinite scroll */
@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 768px) {

  .menu-toggle { display: block; } .nav-right { position: relative; } .nav-links { position: absolute; top: 64px; right: 0; background: linear-gradient( 135deg, var(--primary), var(--primary-soft) ); flex-direction: column; gap: 1.25rem; padding: 1.5rem; border-radius: 16px; display: none; } .nav-links.show { display: flex; }

  .logo {
    font-size: 1.2rem;
  }

  .login-btn {
    padding: 0.45rem 1.1rem;
    font-size: 0.95rem;
  }

  /* HERO */
  .hero {
    padding: 6rem 1.5rem 5rem;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero h1 {
    font-size: 2.2rem;
    line-height: 1.2;
  }

  .hero p {
    font-size: 1.05rem;
  }

  .primary-btn {
    width: 100%;
    max-width: 320px;
  }
  /* FEATURES */
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .feature-card {
    padding: 2rem;
  }
  /* TESTIMONIALS */
  .testimonial {
    min-width: 260px;
    padding: 1.8rem;
  }

  .testimonial-track {
    animation-duration: 40s;
  }
  /* CTA */
  .cta-content {
    padding: 0 1.5rem;
  }

  .secondary-btn {
    width: 100%;
    max-width: 280px;
  }
  /* FOOTER */
  .footer-conent {
      text-align: center;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  
  .footer-links a {
      text-align: center;
  }

  .discord-btn img {
    width: 36px;
  }
}

/* =====================
   Connexion Page
===================== */

.login-page {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(
    180deg,
    #ffffff,
    #f4f8ff
  );
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(13, 98, 225, 0.25);
  text-align: center;
}

.login-card h1 {
  margin-bottom: 0.5rem;
}

.login-card p {
  margin-bottom: 2.5rem;
  color: var(--text-muted);
}

/* Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  left: 0;
}

.form-group {
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  transition: border var(--transition), box-shadow var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 98, 225, 0.15);
}

/* Button */
.login-form .primary-btn {
  margin-top: 1rem;
  width: 100%;
}

/* Footer link */
.login-footer {
  margin-top: 2rem;
}

.login-footer a {
  font-size: 0.85rem;
  color: var(--primary);
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* =====================
   Responsive
===================== */

@media (max-width: 768px) {
  .login-card {
    padding: 2.5rem 2rem;
  }
}

.auth-page {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
}

.auth-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 480px;
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(13, 98, 225, 0.25);
}

.auth-form {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.2rem;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, z-index 0s linear 0.35s;
  z-index: 5;
  pointer-events: auto;
}

.auth-form input {
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.login-form {
  left: 0;
}

.register-form {
  left: 0;
  transform: translateX(0);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}

.auth-overlay {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #ffffff;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  pointer-events: none;
  z-index: 3;
}

.overlay-panel {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.38s ease, transform 0.7s cubic-bezier(0.4,0,0.2,1);
  pointer-events: auto;
  z-index: 4;
}

.overlay-left {
  left: 0;
  transform: translateX(-20px);
}

.overlay-right {
  right: 0;
  transform: translateX(20px);
}

.ghost-btn {
  background: transparent;
  border: 1px solid #ffffff;
  color: #ffffff;
  padding: 0.6rem 1.8rem;
  border-radius: 999px;
  cursor: pointer;
  pointer-events: auto;
  z-index: 10;
}

.auth-container:not(.active) .overlay-right {
  opacity: 1;
  transform: translateX(0);
  pointer-events: none;
}

.auth-container.active .overlay-left {
  opacity: 1;
  transform: translateX(0);
  pointer-events: none;
}

.auth-container.active .overlay-right {
  opacity: 0;
  transform: translateX(20px);
}

.auth-container:not(.active) .overlay-left {
  opacity: 0;
  transform: translateX(-20px);
}

.auth-container.active .auth-overlay {
  transform: translateX(-100%);
  transition-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
}

.auth-container.active .login-form {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.auth-container.active .register-form {
  transform: translateX(100%);
  opacity: 1;
  pointer-events: auto;
  z-index: 5;
}

.auth-container:not(.active) .register-form {
  transform: translateX(0);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.auth-container:not(.active) .login-form {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  z-index: 5;
}

.overlay-panel {
  pointer-events: none;
}

.auth-container.active .overlay-left,
.auth-container:not(.active) .overlay-right {
  pointer-events: auto;
}

.auth-container.active .overlay-left {
  z-index: 10;
}

.auth-container:not(.active) .overlay-right {
  z-index: 10;
}

.auth-form input {
  position: relative;
  background: transparent;
  outline: none;
  border: 2px solid var(--border);
  padding: 1.4rem 0.9rem 0.7rem;
  transition: border-color 0.25s ease, border-width 0.25s ease;
}

.auth-form input:focus {
  border-color: var(--primary);
  border-width: 3px;
}


.auth-form input::placeholder {
  color: var(--text-muted);
  transition:
    transform 0.25s ease,
    color 0.25s ease,
    background 0.25s ease,
    padding 0.25s ease;
  transform-origin: left top;
}

/* Placeholder flottant */
.auth-form input:focus::placeholder,
.auth-form input:not(:placeholder-shown)::placeholder {
  transform: translateY(-0.9rem) scale(0.85);
  color: var(--primary);
  background: #ffffff;
  padding: 0 0.35rem;
}


/* Placeholder discret quand champ vide */
.auth-form input:not(:focus):placeholder-shown::placeholder {
  opacity: 0.6;
}

/* =====================
   Dashboard Page
===================== */

/* =====================
   Dashboard Layout 3 zones
===================== */
.dashboard {
  padding-top: 3rem; /* espace entre navbar et contenu */
  padding-bottom: 3rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* moitié gauche / moitié droite */
  gap: 2rem;
  min-height: calc(100vh - 120px);
}

/* SECTION 1 : Actualités */
.dashboard-news {
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2rem;
  box-shadow: 0 12px 32px rgba(13, 98, 225, 0.08);
  display: flex;
  flex-direction: column;
}

.dashboard-news h2 {
  margin-bottom: 1.5rem;
}

/* Colonne droite contenant les deux sections */
.dashboard-right {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* SECTION 2 : User info */
.dashboard-userinfo {
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2rem;
  box-shadow: 0 12px 32px rgba(13, 98, 225, 0.08);
}

.dashboard-userinfo h2 {
  margin-bottom: 1rem;
}

/* SECTION 3 : À venir */
.dashboard-upcoming {
  flex: 1; /* prend tout l’espace restant */
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2rem;
  box-shadow: 0 12px 32px rgba(13, 98, 225, 0.08);
}

.dashboard-upcoming h2 {
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}


/* =====================
   Unauthorized Page
===================== */

.unauthorized-page {
  min-height: calc(100vh - 72px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem 1.5rem;
}

.unauthorized-box {
  background: #ffffff;
  padding: 3rem 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  box-shadow: 0 20px 40px rgba(13, 98, 225, 0.15);
}

.unauthorized-box h1 {
  font-size: 2rem;
  color: #e63946;
  margin-bottom: 1rem;
}

.unauthorized-box p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Avatar utilisateur */
.userinfo-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.user-avatar {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: 0 6px 18px rgba(13, 98, 225, 0.25);
}
