/* ==================================================
   TABLE OF CONTENTS
   ==================================================

   01. SETTINGS: Root Variables
   02. BASE: Body, Theme, & Typography
   03. LAYOUT: Header, Sidebar, Main Content, Footer
   04. COMPONENT: Buttons
   05. COMPONENT: Cards (Base)
   06. COMPONENT: Stat Card
   07. COMPONENT: Ranking Card
   08. COMPONENT: Parcours Card
   09. COMPONENT: Character Card
   10. COMPONENT: Guide Steps
   11. COMPONENT: Forms
   12. COMPONENT: Map
   13. COMPONENT: Navigation
   14. COMPONENT: Tips Widget
   15. COMPONENT: Promo Widget
   16. VENDOR: GamiPress + GravityForms Overrides
   17. UTILITIES: Gradients, Animations, Helpers
   18. RESPONSIVE: Media Queries

================================================== */

/* ========================================
   01. SETTINGS: Root Variables
=========================================== */
:root {
  /* Colors */
  --color-primary: #c0a596;
  --color-secondary: #c38260;
  --color-dark: #0a0a0f;
  --color-darker: #05050a;
  --color-surface: rgba(20, 20, 30, 0.8);
  --color-surface-light: rgba(30, 30, 45, 0.9);
  --color-text-light: #e0e0e0;
  --color-text-dark: #1a1a1a;
  --color-text-muted: #999;
  --color-text-light-mode-muted: #495057;
  --color-yellow: #ffd700;
  --color-red: #dc143c;
  --color-violet: #9370db;
  --color-orange: #ff6b35;

  /* Typography */
  --font-family-default: "Open Sans", sans-serif;

  /* Sizing & Spacing */
  --header-height: 70px;
  --sidebar-width: 320px;

  /* Borders & Shadows */
  --border-radius-lg: 12px;
  --border-radius-md: 8px;
  --border-radius-sm: 10px;
  /* From avatar */
  --border-color-dark: rgba(192, 165, 150, 0.2);
  --border-color-light: rgba(195, 130, 96, 0.4);
  --shadow-default: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 12px 40px rgba(192, 165, 150, 0.2);
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.08);

  /* Transitions */
  --transition-default: all 0.3s ease;
  --transition-transform: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========================================
   02. BASE: Body, Theme, & Typography
=========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family-default);
  transition: background-color 0.4s ease, color 0.4s ease;
  min-height: 100vh;
}

body.dark-mode {
  background: linear-gradient(135deg, var(--color-dark) 0%, #1a1a2e 100%);
  color: var(--color-text-light);
}

body.light-mode {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: var(--color-text-dark);
}

/* Base Text Utilities */

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 0.5em;
  color: var(--color-primary);
}

.text-primary-custom {
  color: var(--color-primary);
}

body.light-mode .text-primary-custom {
  color: var(--color-secondary);
}

.fs-custom-12 {
  font-size: 12px;
}

.fs-custom-14 {
  font-size: 14px;
}

.lh-custom {
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ========================================
   03. LAYOUT: Header, Sidebar, Main, Footer
=========================================== */

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(20, 20, 30, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-default);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 20px;
  transition: background-color 0.4s ease;
  gap: 15px;
  border-bottom: 1px solid var(--border-color-dark);
}

body.light-mode .header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: var(--color-primary);
}

.logo-header h5 {
  color: var(--color-primary);
  font-weight: 700;
  margin: 0;
  font-size: 20px;
  text-shadow: 0 2px 10px rgba(192, 165, 150, 0.3);
}

.logo-header span {
  color: var(--color-secondary);
}

.header-actions {
  display: flex;
  align-items: center;
}

/* --- Sidebar --- */
.sidebar-wrap {
  position: fixed;
  left: 0;
  top: var(--header-height);
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  background: rgba(20, 20, 30, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.5);
  transform: translateX(-100%);
  transition: var(--transition-transform);
  z-index: 999;
  overflow-y: auto;
  padding-top: 20px;
  border-right: 1px solid var(--border-color-dark);
  transform: translateX(-100%);
}

body.light-mode .sidebar-wrap {
  background: rgba(255, 255, 255, 0.95);
  border-right-color: var(--color-primary);
}

body.sidebar-open .sidebar-wrap {
  transform: translateX(0);
}

.closemenu {
  padding: 15px 20px;
  text-align: right;
  font-size: 12px;
  cursor: pointer;
  color: var(--color-text-muted);
  font-weight: 600;
  transition: var(--transition-default);
}

.closemenu:hover {
  color: var(--color-primary);
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  z-index: 998;
  backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
  display: block;
}

/* --- Sidebar Profile --- */
.profile-sidebar {
  padding: 20px 20px;
  text-align: center;
  background: linear-gradient(135deg,
      rgba(192, 165, 150, 0.15) 0%,
      rgba(195, 130, 96, 0.15) 100%);
  backdrop-filter: blur(10px);
  color: white;
  margin: 0 10px 20px 10px;
  border-radius: var(--border-radius-lg);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(192, 165, 150, 0.3);
  box-shadow: var(--shadow-default);
}

.profile-sidebar::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200px;
  height: 200px;
  background: rgba(195, 130, 96, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.profile-sidebar h5 {
  font-weight: 700;
  margin-bottom: 5px;
  position: relative;
  z-index: 1;
  color: var(--color-primary);
}

.profile-sidebar p {
  font-size: 14px;
  opacity: 0.8;
  position: relative;
  z-index: 1;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
  display: block;
  margin: 0 auto 15px;
  background: rgba(192, 165, 150, 0.1);
  box-shadow: 0 8px 25px rgba(192, 165, 150, 0.3);
  border: 3px solid rgba(192, 165, 150, 0.5);
  transition: transform 0.3s ease;
}

.avatar:hover {
  transform: scale(1.05);
}

/* --- Main Content --- */
.main-content {
  margin-top: var(--header-height);
  margin-left: 0;
  transition: margin-left 0.4s ease;
  min-height: calc(100vh - var(--header-height));
  padding: 30px 20px 100px 20px;
}

/* This class is toggled by JS on the BODY tag */
body.sidebar-open .main-content {
  margin-left: var(--sidebar-width);
}

/* --- Main Hero Section --- */
.hero-section {
  position: relative;
  padding: 50px 30px;
  border-radius: var(--border-radius-lg);
  color: white;
  margin-bottom: 30px;
  overflow: hidden;
  background: linear-gradient(135deg,
      rgba(192, 165, 150, 0.2) 0%,
      rgba(195, 130, 96, 0.15) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color-dark);
  box-shadow: var(--shadow-default);
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle,
      rgba(195, 130, 96, 0.2) 0%,
      transparent 70%);
  border-radius: 50%;
  transform: translate(50%, -50%);
}

.hero-section h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
  color: var(--color-primary);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-section .subtitle {
  font-size: 14px;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.profile-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 20px;
  position: relative;
  z-index: 1;
}

#main-dashboard-row {
  min-height: 400px;
}

#hero-welcome-card {
  background: linear-gradient(135deg,
      rgba(192, 165, 150, 0.6) 0%,
      rgba(195, 130, 96, 0.5) 100%),
    url("../img/image_bienvenue.jpg");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}

#hero-welcome-card .hero-overlay {
  background: linear-gradient(135deg,
      rgba(192, 165, 150, 0.7) 0%,
      rgba(195, 130, 96, 0.6) 100%);
}

.subtitle-custom {
  font-size: 13px;
  line-height: 1.5;
}

/* --- Section Title --- */
.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-primary);
}

body.light-mode .section-title {
  color: var(--color-secondary);
}

.section-title a {
  font-size: 12px;
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-default);
}

.section-title a:hover {
  color: var(--color-secondary);
  gap: 5px;
}

/* --- Footer --- */
.footer {
  background: rgba(20, 20, 30, 0.9);
  backdrop-filter: blur(10px);
  padding: 30px 20px;
  text-align: center;
  color: var(--color-text-muted);
  margin-top: 50px;
  border-top: 1px solid var(--border-color-dark);
}

body.light-mode .footer {
  background: rgba(255, 255, 255, 0.95);
  border-top-color: rgba(195, 130, 96, 0.3);
  color: var(--color-text-dark);
}

.footer a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-default);
}

.footer a:hover {
  color: var(--color-secondary);
}

/* ========================================
   04. COMPONENT: Buttons
=========================================== */
.btn-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 30px;
}

.btn-action,
.gform_button {
  padding: 12px 20px;
  border: none;
  border-radius: var(--border-radius-lg);
  font-weight: 600;
  transition: var(--transition-default);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: white;
}

.btn-action:hover,
.gform_button:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.btn-invite,
.gform_button {
  background: linear-gradient(135deg,
      var(--color-primary) 0%,
      var(--color-secondary) 100%);
}

.btn-message {
  background: linear-gradient(135deg, var(--color-violet) 0%, #8b7fbf 100%);
}

/* --- Menu Button (from Header) --- */
.menu-btn {
  background: rgba(192, 165, 150, 0.1);
  border: 1px solid rgba(192, 165, 150, 0.3);
  font-size: 24px;
  color: var(--color-primary);
  cursor: pointer;
  padding: 10px 12px;
  border-radius: var(--border-radius-md);
  transition: var(--transition-default);
}

.menu-btn:hover {
  background: rgba(192, 165, 150, 0.2);
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(192, 165, 150, 0.3);
}

body.light-mode .menu-btn {
  background: #f5f5f5;
  color: var(--color-secondary);
  border-color: var(--color-secondary);
}

/* --- Theme Toggle Button --- */
.theme-toggle {
  background: rgba(192, 165, 150, 0.1);
  border: 1px solid rgba(192, 165, 150, 0.3);
  font-size: 20px;
  color: #ffc107;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: var(--border-radius-md);
  transition: var(--transition-default);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  transform: rotate(20deg);
  background: rgba(192, 165, 150, 0.2);
}

body.light-mode .theme-toggle {
  background: #f5f5f5;
  border-color: var(--color-secondary);
}

/* ========================================
   05. COMPONENT: Cards (Base)
=========================================== */
.card,
.gamipress-notification {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-default);
  transition: var(--transition-default);
  overflow: hidden;
  background: var(--color-surface-light) !important;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color-dark);
  color: var(--color-text-light);
}

body.light-mode .card,
body.light-mode .gamipress-notification {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: var(--shadow-sm);
  border-color: var(--border-color-light);
  color: var(--color-text-dark);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(192, 165, 150, 0.4);
}

.card-body {
  padding: 25px;
}

/* ========================================
   06. COMPONENT: Stat Card
=========================================== */
.stat-card {
  background: var(--color-surface-light);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-lg);
  padding: 12px 15px;
  text-align: left;
  box-shadow: var(--shadow-default);
  transition: var(--transition-default);
  border: 1px solid var(--border-color-dark);
  color: var(--color-text-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-align: center;
}

body.light-mode .stat-card {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-color: var(--border-color-light);
  color: var(--color-text-dark);
}

.stat-card:hover {
  /* No hover effect */
}

.stat-card .icon {
  width: 35px;
  height: 35px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: 18px;
  flex-shrink: 0;
}

.stat-card .value {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--color-primary);
  line-height: 1;
}

.stat-card .label {
  font-size: 10px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px;
  min-height: 0;
}

/* ========================================
   07. COMPONENT: Ranking Card
=========================================== */
.ranking-grid {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 12px;
  min-height: 0;
}

.ranking-card {
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-lg);
  padding: 15px;
}

.ranking-card--gold {
  background: linear-gradient(135deg,
      rgba(255, 193, 7, 0.15) 0%,
      rgba(255, 152, 0, 0.1) 100%);
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.ranking-card--silver {
  background: linear-gradient(135deg,
      rgba(192, 192, 192, 0.15) 0%,
      rgba(128, 128, 128, 0.1) 100%);
  border: 1px solid rgba(192, 192, 192, 0.3);
}

.ranking-card--bronze {
  background: linear-gradient(135deg,
      rgba(205, 127, 50, 0.15) 0%,
      rgba(139, 69, 19, 0.1) 100%);
  border: 1px solid rgba(205, 127, 50, 0.3);
}

.ranking-card--user {
  background: linear-gradient(135deg,
      rgba(107, 142, 35, 0.2) 0%,
      rgba(143, 188, 143, 0.15) 100%);
  border: 2px solid rgba(107, 142, 35, 0.5);
}

.rank-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.rank-icon--gold {
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
}

.rank-icon--silver {
  background: linear-gradient(135deg, #c0c0c0 0%, #808080 100%);
}

.rank-icon--bronze {
  background: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
}

.rank-icon--user {
  background: linear-gradient(135deg, #6b8e23 0%, #8fbc8f 100%);
}

.rank-avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--border-radius-md);
}

.rank-avatar--gold {
  border: 2px solid rgba(255, 193, 7, 0.4);
}

.rank-avatar--silver {
  border: 2px solid rgba(192, 192, 192, 0.4);
}

.rank-avatar--bronze {
  border: 2px solid rgba(205, 127, 50, 0.4);
}

.rank-avatar--user {
  border: 2px solid rgba(107, 142, 35, 0.6);
}

.rank-name {
  font-size: 12px;
}

.rank-name--gold {
  color: #ffc107;
}

.rank-name--silver {
  color: #c0c0c0;
}

.rank-name--bronze {
  color: #cd7f32;
}

.rank-name--user {
  color: #8fbc8f;
}

.rank-details {
  margin-top: 2px !important;
  font-size: 10px;
  color: var(--color-text-muted);
}

body.light-mode .rank-details {
  color: var(--color-text-light-mode-muted);
}

.rank-points {
  margin-top: 2px !important;
  font-size: 11px;
}

.rank-points--gold {
  color: #ffc107;
}

.rank-points--silver {
  color: #c0c0c0;
}

.rank-points--bronze {
  color: #cd7f32;
}

.rank-points--user {
  color: #8fbc8f;
}

/* ========================================
   08. COMPONENT: Parcours Card
=========================================== */
.parcours-grid {
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 12px;
}

.parcours-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* This overrides the default .card-body padding (25px) */
.parcours-card .card-body {
  padding: 20px;
}

.parcours-card__arrow {
  position: absolute;
  top: 0;
  right: 0;
  width: 45px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  text-decoration: none;
  transition: var(--transition-default);
  z-index: 10;
  opacity: 0.7;
  color: var(--theme-color);
}

.parcours-card:hover .parcours-card__arrow {
  opacity: 1;
  transform: translateX(-5px);
}

/* Arrow Color Modifiers */
.parcours-card__arrow--primary {
  color: var(--color-primary);
}

.parcours-card__arrow--fire {
  color: var(--color-orange);
}

.parcours-card__arrow--ice {
  color: #4dd0e1;
}

.parcours-card__arrow--nature {
  color: #6b8e23;
}

.parcours-card__icon {
  width: 45px;
  height: 45px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
  background: var(--theme-color);
  color: #fff;
}

.parcours-card__icon img {
  width: 80%;
  display: block;
}

.parcours-card__title {
  font-size: 13px;
  /* Color is handled by .text-primary-custom */
}

.parcours-card__location {
  font-size: 13px;
  /* Color is handled by .text-muted */
}

/* NEW: Styles for the stats grid */
.parcours-card__stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 11px;
}

.parcours-card__stat {
  color: var(--color-text-muted);
}

body.light-mode .parcours-card__stat {
  color: var(--color-text-light-mode-muted);
}

.parcours-card__stat-label {
  color: var(--color-primary);
  font-weight: 600;
}

body.light-mode .parcours-card__stat-label {
  color: var(--color-secondary);
}

/* ========================================
   09. COMPONENT: Character Card
=========================================== */
.char-card__image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(192, 165, 150, 0.1);
}

.char-card__image--placeholder {
  object-fit: cover;
  background: rgba(147, 112, 219, 0.1);
}

body.light-mode .char-card__image {
  background: rgba(192, 165, 150, 0.1);
}

.char-card__subtitle {
  font-size: 12px;
}

body.light-mode .char-card__subtitle {
  color: var(--color-text-light-mode-muted);
}

.char-card__description {
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

body.light-mode .char-card__description {
  color: var(--color-text-light-mode-muted);
}

.char-card__rating {
  font-size: 13px;
  color: #ffc107;
}

/* ========================================
   10. COMPONENT: Guide Steps
=========================================== */
.guide-step__number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.guide-step__number--1 {
  background: linear-gradient(135deg,
      var(--color-primary) 0%,
      var(--color-secondary) 100%);
}

.guide-step__number--2 {
  background: linear-gradient(135deg,
      var(--color-orange) 0%,
      var(--color-secondary) 100%);
}

.guide-step__number--3 {
  background: linear-gradient(135deg, #6b8e23 0%, #8fbc8f 100%);
}

.guide-step__title {
  font-size: 14px;
}

.guide-step__description {
  margin-top: 3px !important;
  font-size: 12px;
}

body.light-mode .guide-step__description {
  color: var(--color-text-light-mode-muted);
}

/* ========================================
   11. COMPONENT: Forms
=========================================== */
.form-control-custom,
.gform_wrapper.gravity-theme input[type="text"],
.gform_wrapper.gravity-theme input[type="email"] {
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color-dark);
  background: rgba(0, 0, 0, 0.2);
  color: var(--color-text-light);
}

.form-control-custom:focus,
.gform_wrapper.gravity-theme input[type="text"]:focus,
.gform_wrapper.gravity-theme input[type="email"]:focus {
  background: rgba(0, 0, 0, 0.2);
  color: var(--color-text-light);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.25rem rgba(192, 165, 150, 0.25);
}

.form-control-custom::placeholder,
.gform_wrapper.gravity-theme input[type="text"]::placeholder,
.gform_wrapper.gravity-theme input[type="email"]::placeholder {
  color: var(--color-text-muted);
}

body.light-mode .form-control-custom,
body.light-mode .gform_wrapper.gravity-theme input[type="text"],
body.light-mode .gform_wrapper.gravity-theme input[type="email"] {
  background: #f8f9fa;
  border-color: var(--border-color-light);
  color: var(--color-text-dark);
}

body.light-mode .form-control-custom:focus,
body.light-mode .gform_wrapper.gravity-theme input[type="text"]:focus,
body.light-mode .gform_wrapper.gravity-theme input[type="email"]:focus {
  background: #f8f9fa;
  color: var(--color-text-dark);
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 0.25rem rgba(195, 130, 96, 0.25);
}

body.light-mode .form-control-custom::placeholder,
body.light-mode .gform_wrapper.gravity-theme input[type="text"]::placeholder,
body.light-mode .gform_wrapper.gravity-theme input[type="email"]::placeholder {
  color: #6c757d;
}

.gform_wrapper.gravity-theme .gfield_label {
  color: var(--color-primary);
}

/* --- Filter Box Styles --- */
.filter-box {
  background: var(--color-surface-light);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color-dark);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

body.light-mode .filter-box {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--border-color-light);
}

.btn-reset {
  background: linear-gradient(135deg, var(--color-violet) 0%, #8b7fbf 100%);
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-default);
}

.btn-reset:hover {
  opacity: 0.8;
  transform: scale(1.05);
}

.filter-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 5px;
  display: block;
}

body.light-mode .filter-label {
  color: var(--color-text-light-mode-muted);
}

.filter-select {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color-dark);
  background: rgba(0, 0, 0, 0.2);
  color: var(--color-text-light);
  font-size: 12px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23c0a596' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.25rem rgba(192, 165, 150, 0.25);
}

body.light-mode .filter-select {
  background-color: #f8f9fa;
  border-color: var(--border-color-light);
  color: var(--color-text-dark);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23c38260' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

body.light-mode .filter-select:focus {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 0.25rem rgba(195, 130, 96, 0.25);
}

/* ========================================
   12. COMPONENT: Map
=========================================== */
.map-layout-grid {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 15px;
  height: 660px;
  /* This was inline, kept it as requested */
}

.map-container {
  background: var(--color-surface-light);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color-dark);
  border-radius: var(--border-radius-lg);
  padding: 0;
  overflow: hidden;
}

body.light-mode .map-container {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--border-color-light);
}

.map-container__background {
  background: linear-gradient(135deg,
      rgba(192, 165, 150, 0.1) 0%,
      rgba(195, 130, 96, 0.05) 100%);
}

body.light-mode .map-container__background {
  background: linear-gradient(135deg,
      rgba(192, 165, 150, 0.1) 0%,
      rgba(195, 130, 96, 0.05) 100%);
}

.map-svg {
  /* No specific styles needed, uses Bootstrap utilities */
}

.map-grid-line {
  stroke: rgba(192, 165, 150, 0.15);
  stroke-width: 1;
}

body.light-mode .map-grid-line {
  stroke: rgba(195, 130, 96, 0.15);
}

.map-point {
  stroke-width: 2;
  cursor: pointer;
  transition: var(--transition-default);
}

.map-point:hover {
  r: 15;
}

.map-point--mountain {
  fill: rgba(192, 165, 150, 0.8);
  stroke: var(--color-primary);
}

.map-point--dragon {
  fill: rgba(255, 107, 53, 0.8);
  stroke: var(--color-orange);
}

.map-point--ice {
  fill: rgba(77, 208, 225, 0.8);
  stroke: #4dd0e1;
}

.map-point--nature {
  fill: rgba(107, 142, 35, 0.8);
  stroke: #6b8e23;
}

.map-point--bonus {
  fill: rgba(195, 130, 96, 0.8);
  stroke: #c38260;
}

.map-point__icon {
  text-anchor: middle;
  fill: #1a1a1a;
  font-size: 10px;
  font-weight: bold;
  pointer-events: none;
  /* So click goes to the circle */
}

.map-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(20, 20, 30, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(192, 165, 150, 0.3);
  border-radius: var(--border-radius-md);
  padding: 10px;
  font-size: 11px;
  color: var(--color-text-muted);
  z-index: 10;
}

body.light-mode .map-legend {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--border-color-light);
  color: var(--color-text-light-mode-muted);
}

.map-legend__item {
  margin-bottom: 6px;
}

.map-legend__item:last-child {
  margin-bottom: 0;
}

/* ========================================
   13. COMPONENT: Navigation
=========================================== */
.nav {
  flex-direction: column;
}

.nav-link {
  color: var(--color-text-light);
  padding: 12px 15px;
  margin: 5px 10px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-default);
  text-decoration: none;
  border-left: 4px solid transparent;
  font-weight: 500;
  position: relative;
}

body.light-mode .nav-link {
  color: var(--color-text-dark);
}

.nav-link:hover {
  background: rgba(192, 165, 150, 0.15);
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(192, 165, 150, 0.2);
}

body.light-mode .nav-link:hover {
  background: rgba(192, 165, 150, 0.1);
}

.nav-link.active {
  background: linear-gradient(90deg,
      rgba(192, 165, 150, 0.3) 0%,
      rgba(195, 130, 96, 0.2) 100%);
  color: var(--color-primary);
  font-weight: 600;
  border-left-color: var(--color-primary);
  box-shadow: 0 4px 15px rgba(192, 165, 150, 0.3);
  border: 1px solid var(--border-color-dark);
  border-radius: var(--border-radius-lg);
}

.nav-link .icon {
  min-width: 40px;
  text-align: center;
  font-size: 20px;
}

/* ========================================
   14. COMPONENT: Tips Widget
=========================================== */
.widget-tips {
  background: linear-gradient(135deg,
      rgba(147, 112, 219, 0.4) 0%,
      rgba(195, 130, 96, 0.25) 100%) !important;
  border: 2px solid rgba(147, 112, 219, 0.8);
  box-shadow: 0 8px 32px rgba(147, 112, 219, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* This overrides the default .card-body padding (25px) to be the 20px you specified */
.widget-tips .card-body {
  padding: 20px;
}

.widget-tips__decoration {
  top: -50%;
  right: -50%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle,
      rgba(195, 130, 96, 0.3) 0%,
      transparent 70%);
  z-index: 0;
}

.widget-tips__icon {
  font-size: 40px;
  animation: pulse 2s ease-in-out infinite;
}

.widget-tips__title {
  color: var(--color-yellow);
  text-shadow: 0 0 20px rgba(147, 112, 219, 0.6);
}

.widget-tips__text {
  font-size: 14px;
}

.widget-tips__highlight {
  color: var(--color-yellow);
  font-size: 15px;
}

.widget-tips__subtext {
  color: #e0e0e0;
}

/* ========================================
   15. COMPONENT: Promo Widget
=========================================== */
.promo-widget__body {
  /* Overrides .card-body default padding of 25px */
  padding: 20px;
}

.promo-widget__box {
  /* We use your theme's --border-color-dark variable */
  border: 2px solid var(--border-color-dark);
  background: rgba(192, 165, 150, 0.1);
  cursor: pointer;
  /* We use your theme's --transition-default variable */
  transition: var(--transition-default);
}

/* Added a hover effect consistent with your other cards */
.promo-widget__box:hover {
  transform: scale(1.02);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
}

.promo-widget__overlay {
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.2),
      rgba(0, 0, 0, 0.5));
}

.promo-widget__title {
  color: var(--color-yellow);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.promo-widget__subtitle {
  /* Using the 18px font-size from your inline style */
  font-size: 18px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* ========================================
   12. COMPONENT: Referral Widget
=========================================== */
.widget-referral {
  background: linear-gradient(135deg,
      rgba(195, 130, 96, 0.4) 0%,
      rgba(192, 165, 150, 0.25) 100%) !important;
  /* Use !important to override .card */
  border: 2px solid rgba(195, 130, 96, 0.8);
  box-shadow: 0 8px 32px rgba(195, 130, 96, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.widget-referral .card-body {
  padding: 20px;
}

.widget-referral__icon {
  font-size: 40px;
  animation: pulse 2s ease-in-out infinite;
}

.widget-referral__title {
  font-size: 18px;
  text-shadow: 0 0 20px rgba(195, 130, 96, 0.6);
}

.widget-referral__text {
  font-size: 13px;
}

.widget-referral__highlight {
  font-size: 14px;
  color: var(--color-primary);
  /* Already has fw-bold class */
}

.widget-referral__subtext {
  color: #e0e0e0;
  /* or var(--color-text-light) */
}

.widget-referral__link-box {
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--border-radius-md);
  /* 8px */
  padding: 10px;
  border: 1px solid var(--border-color-dark);
}

body.light-mode .widget-referral__link-box {
  background: rgba(0, 0, 0, 0.1);
}

.widget-referral__link-text {
  font-size: 11px;
}

/* ========================================
   13. COMPONENT: Feature Card
=========================================== */
.feature-card .card-body {
  /* Assure une hauteur minimale si le contenu est court */
  min-height: 160px;
}

.feature-card__icon {
  font-size: 32px;
  line-height: 1;
}

.feature-card__title {
  font-size: 15px;
  /* La couleur est gérée par .text-primary-custom */
}

.feature-card__text {
  font-size: 13px;
  color: var(--color-text-light);
  /* Correspond à #e0e0e0 */
}

.feature-card__highlight {
  color: #6b8e23;
  /* La couleur "éco" de la surbrillance */
}

/* Gestion du mode clair */
body.light-mode .feature-card__text {
  color: var(--color-text-dark);
}

body.light-mode .feature-card__highlight {
  color: #6b8e23;
  /* Cette couleur reste lisible */
}

/* ========================================
   16. VENDOR: GamiPress + GravityForms Overrides
=========================================== */
#gamipress-achievements-container .gamipress-achievement-title,
.gamipress-leaderboard-title,
.gamipress-achievement-steps-heading,
.gamipress-notification-title,
.gamipress-notification-step-title {
  font-size: 1.25rem;
}

.gamipress-notification-content {
  max-width: 600px;
}

.gamipress_notifyjs-corner {
  margin: 15px;
}

body.dark-mode .gform_wrapper.gravity-theme .gform_delete_file {
  color: #fff;
}

.form-profile .gpfup__file {
  padding: 0 !important;
}

.form-profile .gpfup__droprea--maxed,
.form-profile .ginput_preview_list {
  display: none !important;
}

/* ========================================
   17. UTILITIES: Gradients, Animations, Helpers
=========================================== */

/* --- Gradients --- */
.gradient-primary {
  background: linear-gradient(135deg,
      var(--color-primary) 0%,
      var(--color-secondary) 100%);
}

.gradient-fire {
  background: linear-gradient(135deg,
      var(--color-orange) 0%,
      var(--color-secondary) 100%);
}

.gradient-nature {
  background: linear-gradient(135deg, #6b8e23 0%, #8fbc8f 100%);
}

.gradient-magic {
  background: linear-gradient(135deg, var(--color-violet) 0%, #8b7fbf 100%);
}

.gradient-ice {
  background: linear-gradient(135deg, #4dd0e1 0%, #00a8cc 100%);
}

/* --- Animations --- */
@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: slideIn 0.5s ease;
}

/* --- Helpers --- */
.border-bottom-custom {
  border-bottom: 1px solid var(--border-color-dark);
}

body.light-mode .border-bottom-custom {
  border-bottom-color: var(--border-color-light);
}

.progress {
  background: rgba(0, 0, 0, 0.3) !important;
  border-radius: var(--border-radius-sm);
  height: 8px;
}

.progress-bar {
  background: linear-gradient(90deg,
      var(--color-primary),
      var(--color-secondary)) !important;
  border-radius: var(--border-radius-sm);
}

.partner-logo {
  height: 60px;
  object-fit: contain;
}

/* Bootstrap Negative Margin Utility */
.mt-n2 {
  margin-top: -0.5rem !important;
}

.single-character .character,
.single-parcours .parcours {
  margin: 0 auto;
  max-width: 800px;
  padding: 80px 0;
}

.single-character .entry-header,
.single-parcours .entry-header {
  margin-bottom: 4em;
  text-align: center;
  color: var(--color-text-light);
}

.single-character .entry-header h1,
.single-parcours .entry-header h1 {
  color: var(--color-yellow);
}

.single-character .character .entry-content :is(h2, h3, h4, h5, h6):not(:first-child) {
  margin-top: 1em;
}

.single-parcours .gform_heading {
  padding: 1em 0;
}

.single-parcours .gform_title {
  color: var(--color-yellow);
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  font-weight: 900;
}

.gf_progressbar_wrapper {
  margin-bottom: 40px;
}

.gform_wrapper.gravity-theme .gf_progressbar_percentage {
  background: linear-gradient(90deg,
      var(--color-primary),
      var(--color-orange)) !important;
}

.gform-page-footer {
  display: flex;
  gap: 12px;
  justify-content: center;
  position: relative;
}

.gform-page-footer .button {
  padding: 16px 32px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--color-text-light) !important;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gform-page-footer .gform_previous_button {
  background: linear-gradient(135deg, #9370db 0%, #8b7fbf 100%);
}

.gform-page-footer .gform_next_button {
  background: linear-gradient(135deg, #c0a596 0%, #c38260 100%);
}

/* ========== DIALOGUE SECTION ========== */
.dialogue-container {
  margin: 30px 0;
}

.dialogue-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-violet);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dialogue {
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 12px;
  border-left: 4px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 85%;
  background: var(--accent-bg,
      linear-gradient(135deg,
        rgba(192, 165, 150, 0.15) 0%,
        rgba(195, 130, 96, 0.1) 100%));
  border-left-color: var(--accent-color, --color-primary);
}

.dialogue.left {
  margin-left: 0;
  margin-right: auto;
}

.dialogue.right {
  margin-left: auto;
  margin-right: 0;
  align-items: flex-end;
  text-align: right;
}

.dialogue-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dialogue.right .dialogue-header {
  justify-content: flex-end;
  flex-direction: row-reverse;
}

.dialogue-avatar {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(192, 165, 150, 0.1);
}

.dialogue-speaker {
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-color, --color-primary);
}

.dialogue-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-light);
}

.dialogue-text p:last-child {
  margin-bottom: 0;
}

.dialogue.right .dialogue-text {
  text-align: right;
}

.dialogue-text strong {
  color: var(--color-yellow);
}

/* ========== CARD INFO ========== */
.card-info {
  background: linear-gradient(135deg,
      var(--card-bg-color, rgba(107, 142, 35, 0.4)) 0%,
      rgba(143, 188, 143, 0.25) 100%);
  border: 3px solid var(--card-border-color, rgba(107, 142, 35, 0.8));
  border-radius: 12px;
  padding: 30px;
  margin: 30px 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px var(--card-shadow-color, rgba(107, 142, 35, 0.3)),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.card-info::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle,
      rgba(143, 188, 143, 0.3) 0%,
      transparent 70%);
  border-radius: 50%;
}

.card-info-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--color-yellow);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 20px var(--card-shadow-color, rgba(107, 142, 35, 0.3));
  position: relative;
  z-index: 1;
}

.card-info-title i {
  font-size: 26px;
  color: var(--card-accent-color, #8fbc8f);
}

.card-info-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text-light);
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  border-radius: 10px;
}

.card-info-text strong {
  color: var(--color-yellow);
  font-weight: 700;
}

.explor-quiz--riddle {
  background: linear-gradient(135deg,
      rgba(255, 107, 53, 0.25) 0%,
      rgba(195, 130, 96, 0.15) 100%);
  border: 3px solid rgba(255, 107, 53, 0.6);
  border-radius: 12px;
  padding: 30px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(255, 107, 53, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.explor-quiz--riddle .explor-quiz-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--color-yellow);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
  position: relative;
  z-index: 1;
}

.explor-quiz--riddle .explor-quiz-title i {
  font-size: 26px;
  color: var(--color-orange);
}

.explor-quiz--riddle .gfield_label {
  color: var(--color-text-light) !important;
  margin-bottom: 20px !important;
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, 0.3) !important;
  padding: 20px !important;
  border-radius: 10px !important;
  font-weight: 400 !important;
}

.explor-quiz--riddle .ginput_container>div {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.explor-quiz--riddle .gchoice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 15px;
  border-radius: 10px;
  border: 2px solid rgba(255, 107, 53, 0.3);
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.explor-quiz--riddle .gchoice:hover {
  background: rgba(255, 107, 53, 0.15);
  border-color: rgba(255, 107, 53, 0.6);
}

.explor-quiz--riddle .gchoice label {
  flex-grow: 1;
  padding: 15px 0;
}

.gform_wrapper .gform-loader {
  position: absolute !important;
  right: 0;
}

.explor-confirmation-summary {
  margin: 1rem 0;
  font-size: 15px;
}

.explor-confirmation-summary ol {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  margin-bottom: 1em;
  padding: 0;
  margin-left: 1.2em;
}

.explor-confirmation-warn,
.explor-warning,
.explor-confirmation-ok {
  padding: 1rem;
  background: var(--color-red);
  border-radius: var(--border-radius-lg);
}

.explor-confirmation-ok,
.explor-warning {
  background: var(--color-primary);
}

.explor-coordinates-box {
  text-align: center;
}

.explor-coordinates-box code {
  font-size: 2em;
}

/* ========================================
   18. RESPONSIVE: Media Queries
=========================================== */
@media (max-width: 576px) {
  .hero-section h1 {
    font-size: 28px;
  }

  .section-title {
    font-size: 16px;
  }

  .main-content {
    padding: 25px 15px 120px 15px;
  }

  .profile-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .btn-container {
    grid-template-columns: 1fr 1fr;
  }
}