/* TopoclimbCH - Design System Modern */

/* Variables CSS personnalisées */
:root {
  /* Couleurs principales (sobres avec accent Teal) */
  --primary-gradient: linear-gradient(135deg, #00d1b2 0%, #00b89c 100%);
  --secondary-gradient: linear-gradient(135deg, #4a5568, #2d3748);
  --success-gradient: linear-gradient(135deg, #00b894, #00a085);
  --warning-gradient: linear-gradient(135deg, #fdcb6e, #f39c12);
  --danger-gradient: linear-gradient(135deg, #fd79a8, #e84393);
  --info-gradient: linear-gradient(135deg, #6c5ce7, #a29bfe);

  /* Les couleurs de base (primary, secondary, text, bg) sont désormais gérées par theme.css */
  --primary-dark: #00b89c;
  --primary-light: #e6faf6;
  --text-muted: #718096;
  --white: #ffffff;
  
  /* Grays scale */
  --gray-50: #f9fafb;
  --gray-100: #f7fafc;
  --gray-200: #edf2f7;
  --gray-300: #e2e8f0;
  --gray-400: #cbd5e0;
  --gray-500: #a0aec0;
  --gray-600: #718096;
  --gray-700: #4a5568;
  --gray-800: #2d3748;
  --gray-900: #1a202c;

  /* Spacing et sizing */
  --border-radius: 10px;
  --border-radius-lg: 15px;
  --border-radius-xl: 20px;
  --border-radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.06);

  /* Transitions */
  --transition-fast: all 0.15s ease;
  --transition: all 0.3s ease;
  --transition-slow: all 0.5s ease;

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
}

/* Reset et base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-normal);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Typography moderne */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--font-weight-semibold);
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-color);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}


/* Layout et conteneurs */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.main-content {
  min-height: calc(100vh - 200px);
}

/* ==============================================
   NAVIGATION MODERNE
   ============================================== */


/* Glassmorphism Header Effects */
.navbar-glass {
  background-color: rgba(var(--header-bg-rgb), 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}


/* Fix nav links colors */
.navbar-glass .nav-link,
.navbar-glass .navbar-text,
.navbar-glass .btn-link {
    color: var(--header-text) !important;
}
.navbar-glass .nav-link:hover,
.navbar-glass .btn-link:hover {
    color: var(--primary-color) !important;
}

/* Scaled down navigation icons */
.nav-icon {
  font-size: 0.9em;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon,
.dropdown-item:hover .nav-icon {
  opacity: 1;
}

/* Expandable search bar */

.search-expandable {
  width: 40px;
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.search-expandable:focus-within,
.search-expandable:hover {
  width: 200px;
}

.search-expandable .search-input {
  background: transparent;
  border: 1px solid transparent;
  color: var(--header-text);
  padding-right: 40px;
  opacity: 0;
  transition: all 0.3s ease;
  width: 100%;
  cursor: pointer;
}

.search-expandable:focus-within .search-input,
.search-expandable:hover .search-input {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  opacity: 1;
  cursor: text;
}

.search-expandable .search-icon-btn {
  color: var(--header-text);
  padding: 0 10px;
  border: none;
  background: transparent;
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  z-index: 1;
  pointer-events: none; /* Let clicks pass through to input */
}

.search-expandable:focus-within .search-icon-btn {
  pointer-events: auto; /* Enable clicking submit only when expanded */
}


.search-expandable .search-icon-btn:hover {
  color: var(--primary-color);
}


/* Profile avatar fixing oval issue */
.nav-avatar {
  width: 32px;
  height: 32px;
  object-fit: cover;
}

/* Header Actions container */

/* Fix hamburger color */
.navbar-toggler .nav-icon {
    color: var(--header-text) !important;
}

/* Fix mobile actions */
@media (max-width: 991.98px) {
  .header-actions {
    flex-direction: row !important;
    justify-content: flex-end !important;
    width: auto !important;
    border-top: none !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
    gap: 0.5rem !important;
  }
}




.navbar-modern {
  transition: transform 0.3s ease-in-out;
background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem 0;
}

.brand-modern {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none !important;
  color: var(--header-text) !important;
  font-weight: var(--font-weight-bold);
  font-size: 1.5rem;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.brand-text {
  letter-spacing: -0.5px;
}

.nav-modern .nav-link {
  color: var(--header-text) !important;
  font-weight: var(--font-weight-medium);
  padding: 0.75rem 1rem;
  margin: 0 0.25rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.nav-modern .nav-link:hover,
.nav-modern .nav-link.active {
  background: rgba(255, 255, 255, 0.15);
  color: var(--header-text) !important;
  transform: translateY(-1px);
}


/* Styles pour la barre de navigation améliorée */
.navbar-actions .btn-action {
    background-color: transparent;
    border: none;
    color: var(--header-text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease-in-out;
}

.navbar-actions .btn-action:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.dropdown-menu[data-bs-theme="dark"] {
    --bs-dropdown-bg: #212529;
    --bs-dropdown-link-hover-bg: #343a40;
    --bs-dropdown-link-active-bg: #495057;
    --bs-dropdown-link-color: #f8f9fa;
    --bs-dropdown-link-hover-color: #f8f9fa;
    --bs-dropdown-header-color: #adb5bd;
}

/* Animation du bouton hamburger */
.navbar-toggler {
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    position: relative;
    background: transparent;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--header-text);
    border-radius: 2px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    transform-origin: center;
}

.navbar-toggler span:nth-child(1) {
    transform: translate(-50%, -8px);
}

.navbar-toggler span:nth-child(3) {
    transform: translate(-50%, 8px);
}

.navbar-toggler:not(.collapsed) span:nth-child(1) {
    transform: translate(-50%, -50%) rotate(45deg);
}

.navbar-toggler:not(.collapsed) span:nth-child(2) {
    opacity: 0;
    transform: translate(-50%, -50%);
}

.navbar-toggler:not(.collapsed) span:nth-child(3) {
    transform: translate(-50%, -50%) rotate(-45deg);
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--header-bg);
        padding: 1rem;
        border-radius: var(--border-radius-lg);
        margin-top: 0.5rem;
    }

    .navbar-nav .dropdown-menu {
        background-color: transparent;
        border: none;
        box-shadow: none;
    }
}

/* Menu utilisateur */
.user-dropdown .user-menu {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--header-text) !important;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.user-dropdown .user-menu:hover {
  background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius-full);
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name {
  font-weight: var(--font-weight-medium);
}

.user-role {
  opacity: 0.8;
  font-size: 0.8rem;
}

.dropdown-menu-modern {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  margin-top: 0.5rem;
  padding: 0.5rem 0;
  min-width: 280px;
}

.dropdown-menu-modern .dropdown-header {
  padding: 1rem 1.5rem 0.5rem;
}

.user-dropdown-info strong {
  color: var(--text-color);
  font-weight: var(--font-weight-semibold);
}

.dropdown-menu-modern .dropdown-item {
  padding: 0.75rem 1.5rem;
  color: var(--text-color);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  font-weight: var(--font-weight-medium);
}

.dropdown-menu-modern .dropdown-item:hover {
  background: var(--gray-50);
  color: var(--primary-color);
}

.dropdown-menu-modern .dropdown-item i {
  width: 20px;
  opacity: 0.7;
}

/* ==============================================
   BREADCRUMBS MODERNES
   ============================================== */

.breadcrumb-section {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 0;
}

.breadcrumb-modern {
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}

.breadcrumb-modern .breadcrumb-item {
  color: var(--text-muted);
}

.breadcrumb-modern .breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
}

.breadcrumb-modern .breadcrumb-item a:hover {
  color: var(--primary-color);
}

.breadcrumb-modern .breadcrumb-item.active {
  color: var(--text-color);
  font-weight: var(--font-weight-medium);
}

.breadcrumb-modern .breadcrumb-item+.breadcrumb-item::before {
  content: "›";
  color: var(--gray-400);
  font-weight: bold;
}

/* ==============================================
   CARDS ET COMPOSANTS MODERNES
   ============================================== */

.card {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-modern {
  background: var(--background-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.card-modern:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.card-header {
  background: var(--background-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  font-weight: var(--font-weight-semibold);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  background: var(--background-color);
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
}

/* ==============================================
   HERO SECTIONS
   ============================================== */

.hero-modern {
  background: var(--background-color);
  color: var(--text-color);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M20,20 L80,20 L60,80 L40,80 Z" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
  opacity: 0.1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-modern h1 {
  font-size: 3.5rem;
  font-weight: var(--font-weight-bold);
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.hero-modern p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ==============================================
   BOUTONS MODERNES
   ============================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: var(--font-weight-medium);
  border-radius: var(--border-radius);
  border: none;
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

/* Boutons (Hérités de theme.css) */

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: var(--border-radius-lg);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* ==============================================
   STATS ET BADGES
   ============================================== */

.stats-grid {
  margin: 2rem 0;
}

.stat-item {
  background: var(--background-color);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border-left: 4px solid transparent;
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Stats couleurs retirées pour plus de minimalisme */

.stat-value {
  font-size: 2.5rem;
  font-weight: var(--font-weight-bold);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: var(--font-weight-medium);
}

/* Badges modernes */
.badge-modern {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border-radius: var(--border-radius-full);
  font-size: 0.8rem;
  font-weight: var(--font-weight-semibold);

  letter-spacing: 0.5px;
}

.badge-primary {
  background: var(--primary-gradient);
  color: var(--header-text);
}

.badge-secondary {
  background: var(--secondary-gradient);
  color: var(--header-text);
}

.badge-success {
  background: var(--success-gradient);
  color: var(--header-text);
}

.badge-warning {
  background: var(--warning-gradient);
  color: var(--header-text);
}

.badge-danger {
  background: var(--danger-gradient);
  color: var(--header-text);
}

.badge-info {
  background: var(--info-gradient);
  color: var(--header-text);
}

/* ==============================================
   FORMULAIRES MODERNES
   ============================================== */

.form-control {
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  background: var(--background-color);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 75, 155, 0.1);
  outline: none;
}

.form-label {
  font-weight: var(--font-weight-medium);
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.input-group-modern {
  display: flex;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.input-group-modern .form-control {
  border-radius: 0;
  border-right: none;
  margin: 0;
}

.input-group-modern .btn {
  border-radius: 0;
  border-left: none;
}

/* ==============================================
   FILTRES ET NAVIGATION
   ============================================== */

.filter-section {
  background: var(--background-color);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.nav-pills .nav-link {
  border-radius: var(--border-radius);
  padding: 0.75rem 1.5rem;
  font-weight: var(--font-weight-medium);
  color: var(--text-muted);
  transition: var(--transition);
  margin: 0 0.25rem;
}

.nav-pills .nav-link.active {
  background: var(--primary-gradient);
  color: var(--header-text);
  box-shadow: 0 4px 14px rgba(59, 75, 155, 0.3);
}

.nav-pills .nav-link:hover:not(.active) {
  background: var(--gray-100);
  color: var(--text-color);
}

/* ==============================================
   ALERTES MODERNES
   ============================================== */

.alert-modern {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--border-radius-lg);
  border: none;
  margin-bottom: 1.5rem;
  font-weight: var(--font-weight-medium);
}

.alert-modern .icon {
  font-size: 1.25rem;
  margin-top: 0.1rem;
}

.alert-info-modern {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(162, 155, 254, 0.1));
  color: #553c9a;
  border-left: 4px solid #6c5ce7;
}

.alert-warning-modern {
  background: linear-gradient(135deg, rgba(253, 203, 110, 0.1), rgba(243, 156, 18, 0.1));
  color: #b7791f;
  border-left: 4px solid #f39c12;
}

.alert-danger-modern {
  background: linear-gradient(135deg, rgba(253, 121, 168, 0.1), rgba(232, 67, 147, 0.1));
  color: #b83280;
  border-left: 4px solid #e84393;
}

.alert-success-modern {
  background: linear-gradient(135deg, rgba(0, 184, 148, 0.1), rgba(0, 160, 133, 0.1));
  color: #00695c;
  border-left: 4px solid #00a085;
}

/* ==============================================
   SECTIONS SPÉCIALISÉES
   ============================================== */

/* Section d'infos */
.info-section {
  background: var(--background-color);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
}

.section-title i {
  color: var(--primary-color);
}

.info-card {
  background: var(--background-color);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary-color);
}

/* ==============================================
   FOOTER MODERNE
   ============================================== */

.footer-modern {
  background-color: var(--background-color);
  color: var(--text-color);
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}

.footer-modern a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-modern a:hover {
  color: var(--primary-color);
}

.footer-content {
  padding: 3rem 0 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-brand .brand-icon {
  background: var(--primary-gradient);
}

.footer-brand h5 {
  color: var(--text-color);
  margin: 0;
  font-weight: var(--font-weight-bold);
}

.footer-description {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.footer-title {
  color: var(--text-color);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
  font-weight: var(--font-weight-medium);
}

.footer-links a:hover {
  color: var(--text-color);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-link {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: var(--transition);
  text-decoration: none;
}

.social-link:hover {
  background: var(--primary-color);
  color: var(--header-text);
  transform: translateY(-2px);
}

.footer-newsletter-text {
  color: var(--gray-400);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.newsletter-form .input-group-modern {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.newsletter-form .form-control {
  background: transparent;
  border: none;
  color: var(--header-text);
}

.newsletter-form .form-control::placeholder {
  color: var(--gray-400);
}

.btn-newsletter {
  background: var(--primary-gradient);
  color: var(--header-text);
  border: none;
  padding: 0.75rem 1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 0;
}

.copyright,
.made-with-love {
  margin: 0;
  color: var(--gray-400);
  font-size: 0.9rem;
}

/* ==============================================
   MODALES MODERNES
   ============================================== */

.modal-modern .modal-content {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.modal-modern .modal-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 1.5rem;
}

.modal-modern .modal-title {
  font-weight: var(--font-weight-semibold);
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-modern .modal-body {
  padding: 2rem;
}

.search-input-group {
  display: flex;
  gap: 0.5rem;
}

.search-suggestions h6 {
  color: var(--text-color);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 1rem;
}

.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.search-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--gray-100);
  color: var(--text-muted);
  border-radius: var(--border-radius-full);
  text-decoration: none;
  transition: var(--transition-fast);
  font-weight: var(--font-weight-medium);
}

.search-tag:hover {
  background: var(--primary-color);
  color: var(--header-text);
}

.quick-add-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.quick-add-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--gray-50);
  border-radius: var(--border-radius-lg);
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
  border: 2px solid transparent;
}

.quick-add-item:hover {
  background: var(--primary-color);
  color: var(--header-text);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.quick-add-item i {
  font-size: 2rem;
}

/* ==============================================
   LOADING ET UTILITAIRES
   ============================================== */

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(var(--background-color-rgb), 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-spinner {
  text-align: center;
}

.spinner-modern {
  width: 50px;
  height: 50px;
  border: 4px solid var(--gray-300);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.2s ease-out;
}

@keyframes slideInUp {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide-in-up {
  animation: slideInUp 0.2s ease-out;
}

/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */

@media (max-width: 768px) {
  .hero-modern h1 {
    font-size: 2.5rem;
  }

  .hero-modern p {
    font-size: 1rem;
  }

  .hero-modern {
    padding: 3rem 0;
  }

  .container {
    padding: 0 0.75rem;
  }

  .stat-item {
    padding: 1.5rem;
    margin-bottom: 1rem;
  }

  .stat-value {
    font-size: 2rem;
  }

  .quick-add-options {
    grid-template-columns: 1fr;
  }

  .footer-content {
    padding: 2rem 0 1rem;
  }

  .navbar-modern {
  transition: transform 0.3s ease-in-out;
padding: 0.5rem 0;
  }

  .nav-modern .nav-link {
    padding: 0.5rem 0.75rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  .hero-modern h1 {
    font-size: 2rem;
  }

  .card-body,
  .info-section {
    padding: 1.25rem;
  }

  .social-links {
    justify-content: center;
  }

  .navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* espace entre chaque bouton */
  }

  /* Style commun aux boutons */
  .btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.2s ease, transform 0.2s ease;
  }

  .btn-action:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
  }

  /* Icônes centrées */
  .btn-action i {
    font-size: 1.2rem;
    line-height: 1;
    pointer-events: none;
  }

  /* Badge notifications */
  #notificationBadge {
    font-size: 0.65rem;
    padding: 0.25rem 0.4rem;
  }
}

/* ==============================================
   UTILITAIRES ET HELPERS
   ============================================== */

.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: var(--primary-gradient);
}

.bg-gradient-secondary {
  background: var(--secondary-gradient);
}

.bg-gradient-success {
  background: var(--success-gradient);
}

.bg-gradient-warning {
  background: var(--warning-gradient);
}

.bg-gradient-danger {
  background: var(--danger-gradient);
}

.shadow-modern {
  box-shadow: var(--shadow-lg);
}

.border-radius-modern {
  border-radius: var(--border-radius-lg);
}

.transition-modern {
  transition: var(--transition);
}

.hover-lift:hover {
  transform: translateY(-2px);
}

.hover-grow:hover {
  transform: scale(1.02);
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}
.search-tag { color: #000 !important; font-weight: bold; background: #e9ecef !important; }


/* Layout shell: avoid forced full-viewport flex column that can create perceived empty band under header */
.app-container {
  display: block;
  min-height: auto;
}

.main-content-area {
  min-height: 0;
}


/* Mobile-first UX improvements for <=390px */
@media (max-width: 390px) {
  .navbar-actions {
    gap: 0.35rem;
  }

  .btn-action,
  .navbar-toggler {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .navbar-toggler {
    padding: 0.35rem;
  }

  .hero-modern {
    padding: 2.25rem 0;
  }

  .hero-modern h1 {
    font-size: 1.75rem;
    line-height: 1.2;
  }

  .hero-modern p {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
  }

  .mobile-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }

  .mobile-hero-actions .btn {
    width: 100%;
    margin: 0 !important;
  }

  .home-search-section {
    padding-top: 1.25rem !important;
  }

  .mobile-stats-grid {
    padding: 1rem 0;
  }

  .mobile-stats-grid .row:first-child {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-left: 0;
    margin-right: 0;
    scrollbar-width: thin;
  }

  .mobile-stats-grid .row:first-child > [class*="col-"] {
    flex: 0 0 72%;
    max-width: 72%;
    padding-left: 0;
    padding-right: 0;
  }

  .home-search-section .input-group {
    flex-wrap: wrap;
  }

  .home-search-section .input-group .form-control {
    border-radius: var(--border-radius) !important;
    margin-bottom: 0.5rem;
  }

  .home-search-section .input-group .form-select,
  .home-search-section .input-group .btn {
    width: 100%;
    max-width: 100% !important;
    border-left: none !important;
    border-radius: var(--border-radius) !important;
    margin-bottom: 0.5rem;
  }
}

/* Styles communs extraits de JS pour éviter les race conditions (topoclimb-common-styles) */
@keyframes slideInRight {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideOutRight {
    from { opacity: 1; }
    to { opacity: 0; }
}

.topoclimb-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.topoclimb-modal .modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.topoclimb-modal .modal-header {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topoclimb-modal .modal-body {
    padding: 1rem;
}

.topoclimb-modal .modal-footer {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    text-align: right;
}

.topoclimb-loader .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- UI.js dynamic styles --- */
.modal-open { overflow: hidden; }
.toast-show { transform: translateX(0) !important; }
.lightbox-open { overflow: hidden; }

/* --- App.js dynamic styles --- */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
.btn-loading::after {
    content: '';
    position: absolute;
    width: 1.2rem;
    height: 1.2rem;
    top: 50%;
    left: 50%;
    margin-top: -0.6rem;
    margin-left: -0.6rem;
    border: 2px solid rgba(255,255,255,0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: button-spin 0.6s linear infinite;
}
@keyframes button-spin {
    to { transform: rotate(360deg); }
}

/* Fix first-child dropdown items being darker */
.dropdown-menu li:first-child .dropdown-item, .dropdown-menu .dropdown-item:first-child {
    background-color: transparent;
    color: var(--bs-dropdown-link-color, var(--text-color));
}
.dropdown-menu li:first-child .dropdown-item:hover, .dropdown-menu .dropdown-item:first-child:hover {
    background-color: var(--bs-dropdown-link-hover-bg, var(--gray-50));
    color: var(--bs-dropdown-link-hover-color, var(--primary-color));
}
/* ======= WEATHER MAP ======= */
.weather-marker {
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--bs-primary);
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    min-width: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    cursor: pointer;
    font-weight: bold;
    color: var(--bs-dark);
    transition: transform 0.2s, opacity 0.2s ease-out;
}

.weather-marker:hover {
    background-color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
    z-index: 100;
} /* Animation pour le hover */

.weather-marker i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.sector-marker {
    background-color: var(--bs-success);
    border: 2px solid #fff;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.sector-marker:hover {
    transform: scale(1.5);
    background-color: #20c997; /* Lighter success color on hover */
    z-index: 100;
} /* Animation pour le hover */

/* Tooltips overrides for MapLibre inside our UI */
.maplibregl-popup-content {
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 15px;
}

[data-bs-theme="dark"] .weather-marker {
    background-color: rgba(33, 37, 41, 0.95);
    color: #fff;
    border-color: var(--bs-primary);
}

[data-bs-theme="dark"] .weather-marker:hover {
    background-color: var(--bs-dark);
}

[data-bs-theme="dark"] .maplibregl-popup-content {
    background-color: var(--bs-dark);
    color: #fff;
    border: 1px solid var(--bs-secondary);
}

[data-bs-theme="dark"] .maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
    border-top-color: var(--bs-secondary);
}

.navbar-hidden {
  transform: translateY(-100%);
}
