:root {
  --ld-bg: #0b0204;
  --ld-bg-alt: #1a0508;
  --ld-accent: #ff4d6d;
  --ld-accent-soft: rgba(255, 77, 109, 0.16);
  --ld-text: #fff2f4;
  --ld-muted: #caa4ab;
  --ld-danger: #ff4c4c;
}

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

body {
  margin: 0;
  font-family: "Rajdhani", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #3a0d15 0, #0b0204 55%);
  color: var(--ld-text);
}

.ld-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER */

.ld-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  border-bottom: 1px solid rgba(255, 77, 109, 0.28);
  background: linear-gradient(90deg, #0b0204, #1a0508 55%, #0b0204);
  position: sticky;
  top: 0;
  z-index: 20;
}

.ld-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ld-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 0 22px rgba(255, 77, 109, 0.55);
}

.ld-title {
  font-family: "Oswald", sans-serif;
  letter-spacing: 4px;
  font-size: 24px;
}

.ld-subtitle {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--ld-muted);
  letter-spacing: 2px;
}

.ld-header-center {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex: 1;
}

/* NAV */

.ld-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}

.ld-nav a,
.ld-nav span {
  text-decoration: none;
  color: var(--ld-muted);
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: 0.18s;
  white-space: nowrap;
}

.ld-nav-tag {
  border-color: rgba(255, 77, 109, 0.12);
}

.ld-nav-tag.disabled {
  opacity: 0.4;
}

.ld-nav a:hover,
.ld-nav span:hover {
  border-color: rgba(255, 77, 109, 0.55);
  color: var(--ld-accent);
  background: rgba(255, 77, 109, 0.07);
}

.ld-nav-login,
.ld-nav-logout {
  border-color: rgba(255, 77, 109, 0.45);
  color: var(--ld-accent);
}

.ld-nav-login:hover,
.ld-nav-logout:hover {
  background: rgba(255, 77, 109, 0.2);
}

/* USER BOX */

.ld-user-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(11, 2, 4, 0.82);
  border: 1px solid rgba(255, 77, 109, 0.4);
}

.ld-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 10px rgba(255, 77, 109, 0.55);
}

.ld-user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.ld-user-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ld-accent);
}

.ld-user-tag {
  font-size: 11px;
  color: var(--ld-muted);
}

/* MAIN */

.ld-main {
  flex: 1;
  padding: 32px 40px;
}

/* HERO (index) */

.ld-hero {
  position: relative;
  border-radius: 18px;
  padding: 32px 32px;
  overflow: hidden;
  background: radial-gradient(circle at center, #3a0d15 0, #0b0204 70%);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.65);
}

.ld-hero-overlay {
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at center, rgba(255, 77, 109, 0.2), transparent 60%),
    radial-gradient(circle at left, rgba(0, 0, 0, 0.9), transparent 50%);
  mix-blend-mode: screen;
  opacity: 0.85;
  pointer-events: none;
}

.ld-hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
}

.ld-hero h2 {
  font-family: "Oswald", sans-serif;
  font-size: 40px;
  letter-spacing: 3px;
  margin: 0 0 10px;
}

.ld-hero p {
  margin: 0 0 16px;
  color: var(--ld-muted);
  font-size: 17px;
}

.ld-hero-note {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--ld-muted);
}

/* BUTTONS */

.ld-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 77, 109, 0.7);
  background: linear-gradient(135deg, var(--ld-accent), #ffd1d9);
  color: #140205;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.ld-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(255, 77, 109, 0.55);
  filter: brightness(1.05);
}

/* GUILDS LIST (index) */

.ld-guild-section {
  margin-top: 26px;
}

.ld-guild-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ld-guild-header h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 1px;
}

.ld-guild-header p {
  margin: 4px 0 0;
  color: var(--ld-muted);
  font-size: 14px;
}

.ld-guild-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.ld-guild-card {
  position: relative;
  background: rgba(11, 2, 4, 0.9);
  border-radius: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 77, 109, 0.22);
  text-decoration: none;
  color: var(--ld-text);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.ld-guild-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 77, 109, 0.7);
}

.ld-guild-accent {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at center, rgba(255, 77, 109, 0.16), transparent 55%);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.ld-guild-card:hover .ld-guild-accent {
  opacity: 1;
}

.ld-guild-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.ld-guild-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.7);
}

.ld-guild-icon-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 2, 4, 0.9);
  border: 1px solid rgba(255, 77, 109, 0.55);
  color: var(--ld-accent);
  font-weight: 700;
  font-size: 18px;
}

.ld-guild-text {
  display: flex;
  flex-direction: column;
}

.ld-guild-name {
  font-weight: 600;
  font-size: 18px;
}

.ld-guild-badge {
  margin-top: 4px;
  display: inline-flex;
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 77, 109, 0.55);
  color: var(--ld-accent);
}

.ld-guild-empty {
  margin-top: 14px;
  font-size: 15px;
  color: var(--ld-muted);
}

/* FLASHES */

.ld-flashes {
  margin-bottom: 12px;
}

.ld-flash {
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.ld-flash-success {
  background: rgba(255, 77, 109, 0.2);
  border: 1px solid rgba(255, 77, 109, 0.55);
}

/* ERREURS */

.ld-error {
  background: rgba(11, 2, 4, 0.96);
  border-radius: 18px;
  border: 1px solid rgba(255, 76, 76, 0.6);
  padding: 24px;
}

/* FOOTER */

.ld-footer {
  padding: 10px 32px 18px;
  font-size: 11px;
  color: var(--ld-muted);
  text-align: right;
}

/* ========================= */
/* RESPONSIVE – TABLETTE     */
/* ========================= */

@media (max-width: 1024px) {
  .ld-main {
    padding: 24px 20px;
  }

  .ld-hero {
    padding: 26px 22px;
  }

  .ld-guild-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

/* ========================= */
/* RESPONSIVE – MOBILE       */
/* Design vraiment différent */
/* ========================= */

@media (max-width: 768px) {
  body {
    background: #0b0204;
  }

  .ld-header {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 14px;
    gap: 10px;
  }

  .ld-header-center {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .ld-nav {
    font-size: 13px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .ld-nav::-webkit-scrollbar {
    height: 4px;
  }

  .ld-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 77, 109, 0.55);
    border-radius: 999px;
  }

  .ld-user-box {
    justify-content: flex-start;
  }

  .ld-main {
    padding: 18px 12px 24px;
  }

  .ld-hero {
    border-radius: 14px;
    padding: 20px 14px;
    background: linear-gradient(180deg, #2b0a10 0, #0b0204 70%);
    box-shadow: 0 0 26px rgba(0, 0, 0, 0.8);
  }

  .ld-hero h2 {
    font-size: 26px;
  }

  .ld-hero p {
    font-size: 14px;
  }

  .ld-guild-section {
    margin-top: 18px;
  }

  .ld-guild-header h3 {
    font-size: 18px;
  }

  .ld-guild-header p {
    font-size: 13px;
  }

  .ld-guild-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ld-guild-card {
    padding: 14px 14px;
  }

  .ld-guild-icon {
    width: 36px;
    height: 36px;
  }

  .ld-guild-name {
    font-size: 16px;
  }

  .ld-footer {
    text-align: center;
    padding: 10px 12px 18px;
  }
}

/* 🔧 Nettoyage d'anciennes barres verticales dans le header */
.ld-nav a::before,
.ld-nav span::before {
  content: none !important;
}
