/* 
  PassAsso - Core Design System & CSS Variables
*/

:root {
  --club-primary: #0055A5;
  --club-secondary: #FFFFFF;
  --club-accent: #EF4135;
  --club-bg: #071126;
  --club-primary-color: #0055A5;
  --club-secondary-color: #FFFFFF;
  --club-accent-color: #EF4135;
  --club-bg-color: #071126;
  --club-primary-rgb: 0, 85, 165;
  --club-secondary-rgb: 255, 255, 255;
  --club-accent-rgb: 239, 65, 53;
  --club-bg-rgb: 7, 17, 38;
  --club-primary-contrast: #ffffff;
  --club-secondary-contrast: #0f172a;
  --club-accent-contrast: #ffffff;
  --club-primary-on-dark: #38bdf8;
  --bg-dark: var(--club-bg);
  --card-bg: rgba(30, 41, 59, 0.75);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--club-bg, #071126) !important;
  color: var(--text-main, #f8fafc) !important;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ambiance Lumineuse et Dégradé d'Arrière-Plan aux Couleurs du Club */
body::before {
  content: '';
  position: fixed;
  top: -12vw;
  left: -10vw;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(var(--club-primary-rgb), 0.18) 0%, rgba(var(--club-secondary-rgb), 0.05) 55%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  filter: blur(50px);
}

body::after {
  content: '';
  position: fixed;
  bottom: -10vw;
  right: -10vw;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(var(--club-accent-rgb), 0.14) 0%, rgba(var(--club-primary-rgb), 0.05) 55%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  filter: blur(50px);
}

/* -------------------------------------------------------------
 * Dynamic Club Branding Utility Classes & Vibrant Styling
 * ------------------------------------------------------------- */
.bg-club-primary {
  background-color: var(--club-primary) !important;
  color: var(--club-primary-contrast) !important;
}
.bg-club-secondary {
  background-color: var(--club-secondary) !important;
  color: var(--club-secondary-contrast) !important;
}
.bg-club-accent {
  background-color: var(--club-accent) !important;
  color: var(--club-accent-contrast) !important;
}
.text-club-primary {
  color: var(--club-primary-on-dark) !important;
}
.text-club-secondary {
  color: var(--club-secondary) !important;
}
.text-club-accent {
  color: var(--club-accent) !important;
}
.border-club-primary {
  border-color: var(--club-primary) !important;
}
.border-club-secondary {
  border-color: var(--club-secondary) !important;
}
.border-club-accent {
  border-color: var(--club-accent) !important;
}
.bg-club-gradient {
  background: linear-gradient(135deg, var(--club-primary), var(--club-secondary)) !important;
  color: var(--club-primary-contrast) !important;
}
.bg-club-tricolor {
  background: linear-gradient(90deg, var(--club-primary) 0%, var(--club-secondary) 50%, var(--club-accent) 100%) !important;
}

.bg-club-gradient * {
  color: var(--club-primary-contrast) !important;
}

/* Redirection dynamique et harmonisée des teintes Tailwind vers le thème du club */
.bg-blue-600, .bg-blue-500, .bg-blue-700 {
  background-color: var(--club-primary) !important;
  color: var(--club-primary-contrast) !important;
}

.bg-blue-600 *, .bg-blue-500 *, .bg-blue-700 * {
  color: var(--club-primary-contrast) !important;
}

.hover\:bg-blue-500:hover, .hover\:bg-blue-600:hover {
  filter: brightness(1.12) !important;
  background-color: var(--club-primary) !important;
  color: var(--club-primary-contrast) !important;
}

.border-blue-400, .border-blue-400\/30, .border-blue-500, .border-blue-500\/30, .border-blue-500\/40, .border-blue-600 {
  border-color: rgba(var(--club-primary-rgb), 0.45) !important;
}

.text-blue-400, .text-blue-500, .text-blue-300, .text-blue-200 {
  color: var(--club-primary-on-dark) !important;
}

.bg-blue-950, .bg-blue-950\/80, .bg-blue-900\/50, .bg-blue-600\/20, .bg-blue-600\/30, .bg-blue-600\/40, .bg-blue-600\/80, .bg-blue-600\/90 {
  background-color: rgba(var(--club-primary-rgb), 0.18) !important;
  border-color: rgba(var(--club-primary-rgb), 0.35) !important;
}

.ring-blue-400, .ring-blue-300 {
  --tw-ring-color: var(--club-primary) !important;
}

.focus\:border-blue-500:focus {
  border-color: var(--club-primary) !important;
}

.bg-club-primary-subtle {
  background-color: rgba(var(--club-primary-rgb), 0.14) !important;
  border-color: rgba(var(--club-primary-rgb), 0.35) !important;
  color: var(--text-main) !important;
}
.bg-club-accent-subtle {
  background-color: rgba(var(--club-accent-rgb), 0.14) !important;
  border-color: rgba(var(--club-accent-rgb), 0.35) !important;
  color: var(--text-main) !important;
}
.badge-club-primary {
  background-color: rgba(var(--club-primary-rgb), 0.18) !important;
  color: var(--club-primary-on-dark) !important;
  border: 1px solid rgba(var(--club-primary-rgb), 0.35) !important;
}
.badge-club-accent {
  background-color: rgba(var(--club-accent-rgb), 0.18) !important;
  color: var(--club-accent) !important;
  border: 1px solid rgba(var(--club-accent-rgb), 0.35) !important;
}

/* Header Personnalisé aux Couleurs du Club */
header {
  background: linear-gradient(135deg, rgba(var(--club-primary-rgb), 0.22) 0%, rgba(var(--club-bg-rgb), 0.96) 50%, rgba(var(--club-accent-rgb), 0.18) 100%) !important;
  border-bottom: 1px solid rgba(var(--club-primary-rgb), 0.35) !important;
  box-shadow: 0 4px 25px -4px rgba(var(--club-primary-rgb), 0.2);
}

.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
  border-color: rgba(var(--club-primary-rgb), 0.35);
  box-shadow: 0 8px 32px 0 rgba(var(--club-primary-rgb), 0.15);
}

/* =============================================================
 * SYSTÈME DE THÈME CLAIR (FRANCE CLAIRE / FONDS CLAIRS)
 * Ajustement automatique de tous les contrastes, textes et cartes
 * ============================================================= */
:root[data-theme="light"] {
  --text-main: #0f172a !important;
  --text-muted: #334155 !important;
  --text-dim: #64748b !important;
  --card-bg: #ffffff !important;
  --border-color: #cbd5e1 !important;
  --club-primary-on-dark: var(--club-primary) !important;
}

:root[data-theme="light"] body {
  background-color: var(--club-bg, #f1f5f9) !important;
  color: #0f172a !important;
}

:root[data-theme="light"] header {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 2px solid var(--club-primary) !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.08) !important;
}

:root[data-theme="light"] header h1,
:root[data-theme="light"] header span {
  color: #0f172a !important;
}

:root[data-theme="light"] .glass-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06) !important;
  color: #0f172a !important;
}

:root[data-theme="light"] .text-slate-100,
:root[data-theme="light"] .text-slate-200,
:root[data-theme="light"] .text-slate-300 {
  color: #0f172a !important;
}

:root[data-theme="light"] .text-slate-400,
:root[data-theme="light"] .text-slate-500 {
  color: #475569 !important;
}

:root[data-theme="light"] .bg-slate-900,
:root[data-theme="light"] .bg-slate-900\/80,
:root[data-theme="light"] .bg-slate-900\/90,
:root[data-theme="light"] .bg-slate-900\/60,
:root[data-theme="light"] .bg-slate-900\/40,
:root[data-theme="light"] .bg-slate-950,
:root[data-theme="light"] .bg-slate-950\/90,
:root[data-theme="light"] .bg-slate-950\/80,
:root[data-theme="light"] .bg-slate-950\/60,
:root[data-theme="light"] .bg-slate-800,
:root[data-theme="light"] .bg-slate-800\/80,
:root[data-theme="light"] .bg-slate-800\/90,
:root[data-theme="light"] .bg-slate-800\/60,
:root[data-theme="light"] .bg-slate-800\/40 {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

:root[data-theme="light"] .border-slate-800,
:root[data-theme="light"] .border-slate-800\/80,
:root[data-theme="light"] .border-slate-800\/60,
:root[data-theme="light"] .border-slate-800\/40,
:root[data-theme="light"] .border-slate-700,
:root[data-theme="light"] .border-slate-700\/80,
:root[data-theme="light"] .border-slate-700\/60,
:root[data-theme="light"] .border-slate-700\/40,
:root[data-theme="light"] .border-slate-700\/70 {
  border-color: #e2e8f0 !important;
}

:root[data-theme="light"] .bg-amber-950,
:root[data-theme="light"] .bg-amber-950\/90,
:root[data-theme="light"] .bg-amber-950\/80,
:root[data-theme="light"] .bg-amber-950\/60,
:root[data-theme="light"] .bg-amber-950\/40,
:root[data-theme="light"] .bg-amber-950\/20 {
  background-color: #fefce8 !important;
  border-color: #fef08a !important;
  color: #713f12 !important;
}

:root[data-theme="light"] .bg-amber-950\/40 .text-amber-200,
:root[data-theme="light"] .bg-amber-950\/90 .text-amber-200,
:root[data-theme="light"] .bg-amber-950\/40 .text-amber-300,
:root[data-theme="light"] .bg-amber-950\/90 .text-amber-300 {
  color: #854d0e !important;
}

:root[data-theme="light"] input:not([type="color"]),
:root[data-theme="light"] select,
:root[data-theme="light"] textarea {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

:root[data-theme="light"] input::placeholder,
:root[data-theme="light"] textarea::placeholder {
  color: #94a3b8 !important;
}

.tab-nav {
  display: none !important;
}

:root[data-theme="light"] .bg-club-primary-subtle {
  background-color: rgba(var(--club-primary-rgb), 0.09) !important;
  border-color: rgba(var(--club-primary-rgb), 0.25) !important;
  color: #0f172a !important;
}

:root[data-theme="light"] .calendar-day-cell {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

:root[data-theme="light"] .calendar-day-cell:hover {
  background: #f8fafc !important;
  border-color: var(--club-primary) !important;
}

:root[data-theme="light"] .calendar-day-cell.is-today {
  background: rgba(var(--club-primary-rgb), 0.10) !important;
  border-color: var(--club-primary) !important;
}

:root[data-theme="light"] .calendar-day-number {
  color: #1e293b !important;
}

:root[data-theme="light"] .calendar-day-cell.is-today .calendar-day-number {
  color: var(--club-primary) !important;
}

:root[data-theme="light"] .calendar-day-header {
  color: #475569 !important;
}

:root[data-theme="light"] .app-card-pave {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05) !important;
}

/* -------------------------------------------------------------
 * HOME HUB TILES & CARDS STYLING (Mobile-First Full Hub)
 * ------------------------------------------------------------- */
.hub-tile-card {
  min-height: 94px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s ease, border-color 0.15s ease;
}

.hub-tile-card:hover {
  transform: translateY(-2px);
  border-color: var(--club-primary) !important;
  box-shadow: 0 6px 20px rgba(var(--club-primary-rgb), 0.25);
}

.hub-tile-card:active {
  transform: scale(0.96);
}

:root[data-theme="light"] .hub-tile-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05) !important;
}

:root[data-theme="light"] .hub-tile-card:hover {
  border-color: var(--club-primary) !important;
  box-shadow: 0 6px 18px rgba(var(--club-primary-rgb), 0.15) !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--club-primary), var(--club-secondary)) !important;
  color: var(--club-primary-contrast) !important;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(var(--club-primary-rgb), 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary * {
  color: var(--club-primary-contrast) !important;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--club-primary-rgb), 0.5);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tab-nav {
  position: fixed;
  /* Surélevé du bas de l'écran iPhone pour dégager la barre de balayage système iOS (Home Indicator) */
  bottom: max(12px, calc(8px + env(safe-area-inset-bottom, 0px)));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 1rem);
  max-width: 32rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.99) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(var(--club-primary-rgb), 0.35);
  border-radius: 20px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.65), 0 0 20px rgba(var(--club-primary-rgb), 0.22);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 4px;
  z-index: 1000;
  transition: all 0.25s ease-in-out;
}

/* Évite le défilement disgracieux si la largeur est très petite */
.tab-nav::-webkit-scrollbar {
  display: none;
}

/* Adaptation Spécifique iPad / Tablette (min-width: 640px) */
@media (min-width: 640px) {
  .tab-nav {
    bottom: max(20px, calc(14px + env(safe-area-inset-bottom, 0px)));
    width: calc(100% - 2.5rem);
    max-width: 48rem;
    border-radius: 24px;
    padding: 10px 12px;
  }
}

@media (min-width: 1024px) {
  .tab-nav {
    max-width: 64rem;
  }
}

.tab-item {
  flex: 1 1 0px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.65rem;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease, transform 0.15s ease;
  padding: 2px 1px;
  text-align: center;
}

@media (min-width: 400px) {
  .tab-item {
    font-size: 0.72rem;
  }
}

.tab-item svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-bottom: 3px;
  flex-shrink: 0;
}

@media (min-width: 400px) {
  .tab-item svg {
    width: 1.4rem;
    height: 1.4rem;
  }
}

.tab-item span.tab-label,
.tab-item span:not(.tab-label):not([class*="badge"]) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.1;
  display: block;
}

.tab-item.active {
  color: #ffffff !important;
  font-weight: 700;
}

.tab-item.active svg {
  stroke: var(--club-primary) !important;
  filter: drop-shadow(0 0 6px rgba(var(--club-primary-rgb), 0.7));
}

.tab-item.active::after {
  content: '';
  position: absolute;
  top: -8px;
  width: 18px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--club-primary), var(--club-secondary));
  box-shadow: 0 0 10px rgba(var(--club-primary-rgb), 0.8);
}

.admin-sec-tab {
  background-color: rgba(30, 41, 59, 0.6);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}
.admin-sec-tab:hover {
  background-color: rgba(var(--club-primary-rgb), 0.2);
  color: var(--club-primary);
  border-color: rgba(var(--club-primary-rgb), 0.4);
}
.admin-sec-tab.active {
  background: linear-gradient(135deg, var(--club-primary), var(--club-secondary)) !important;
  color: #ffffff;
  border-color: var(--club-primary);
  box-shadow: 0 4px 12px rgba(var(--club-primary-rgb), 0.35);
}

.version-footer {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 15px 0 70px 0;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* -------------------------------------------------------------
 * CALENDRIER INTERACTIF PLANNING
 * ------------------------------------------------------------- */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-day-header {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  padding: 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calendar-day-cell {
  min-height: 82px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: all 0.15s ease;
}

.calendar-day-cell:hover {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(var(--club-primary-rgb), 0.5);
}

.calendar-day-cell.is-today {
  border: 2px solid var(--club-primary) !important;
  background: rgba(var(--club-primary-rgb), 0.15) !important;
  box-shadow: 0 0 12px rgba(var(--club-primary-rgb), 0.25);
}

.calendar-day-cell.is-other-month {
  opacity: 0.25;
  background: rgba(15, 23, 42, 0.2);
}

.calendar-day-number {
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 3px;
  color: #cbd5e1;
}

.calendar-day-cell.is-today .calendar-day-number {
  color: var(--club-primary-on-dark) !important;
}

/* Marqueurs d'activité RSVP */
.schedule-marker {
  font-size: 0.65rem;
  line-height: 1.1;
  padding: 3px 5px;
  border-radius: 6px;
  margin-bottom: 3px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  items-center: center;
  gap: 3px;
  transition: transform 0.1s ease, filter 0.1s ease;
}

.schedule-marker:hover {
  transform: scale(1.03);
  filter: brightness(1.15);
}

.marker-present {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.marker-absent {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.marker-pending {
  background: rgba(100, 116, 139, 0.35);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* -------------------------------------------------------------
 * SYSTÈME DE TOASTS ANIMÉS (Feedback Ergonomique)
 * ------------------------------------------------------------- */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 420px;
}

.toast-item {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
  border: 1px solid rgba(59, 130, 246, 0.4);
  backdrop-filter: blur(12px);
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 0.825rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-item.toast-success {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(6, 78, 59, 0.92);
  color: #ecfdf5;
}

.toast-item.toast-error {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(127, 29, 29, 0.92);
  color: #fef2f2;
}

.toast-item.toast-warning {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(120, 53, 15, 0.92);
  color: #fffbeb;
}

.toast-item.toast-hiding {
  opacity: 0;
  transform: translateY(12px) scale(0.95);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* -------------------------------------------------------------
 * MODALES BOTTOM SHEET (Tiroir mobile glissant)
 * ------------------------------------------------------------- */
@media (max-width: 639px) {
  .modal-bottom-sheet {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 24px !important;
    border-top-right-radius: 24px !important;
    max-height: 88vh !important;
    overflow-y: auto !important;
    animation: sheetSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
}

@keyframes sheetSlideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* -------------------------------------------------------------
 * GESTION DES MODALES - SUPERPOSITION & AUTONOMIE HAUTEUR
 * Place les modales au z-index: 2000 (au-dessus du menu .tab-nav a z-index: 1000)
 * et adapte la hauteur pour ne jamais déborder ou être masqué.
 * ------------------------------------------------------------- */
.fixed.inset-0,
div[id*="modal"],
div[id*="Modal"],
.modal-overlay,
.modal-backdrop {
  z-index: 2000 !important;
}

/* Restreint la hauteur maximale du conteneur de la modale avec défilement interne */
.fixed.inset-0 > div,
div[id*="modal"] > div,
div[id*="Modal"] > div {
  max-height: min(88vh, calc(100dvh - 2.5rem)) !important;
  margin-top: auto !important;
  margin-bottom: auto !important;
  overflow-y: auto !important;
}

/* -------------------------------------------------------------
 * AMÉLIORATIONS ERGONOMIZATIONS & CONFORT D'UTILISATION GLOBAL
 * ------------------------------------------------------------- */
* {
  scroll-behavior: smooth;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb {
  background: rgba(51, 65, 85, 0.8);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 1);
}

button:active, .btn-primary:active, .tab-item:active {
  transform: scale(0.97);
  transition: transform 0.1s ease;
}

input:focus-visible, select:focus-visible, button:focus-visible {
  outline: 2px solid var(--club-primary);
  outline-offset: 2px;
}

.animate-fade-in {
  animation: fadeIn 0.25s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------------------------------------------------------
 * STYLE PAVÉS SUCCESSIFS (MOBILE NATIVE APP CARDS)
 * ------------------------------------------------------------- */
.app-card-pave {
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.25rem;
  padding: 1rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-card-pave:hover {
  border-color: rgba(var(--club-primary-rgb), 0.4);
}

@media (max-width: 639px) {
  .app-card-pave {
    padding: 0.875rem;
    border-radius: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .hide-on-mobile-compact {
    display: none !important;
  }

  .mobile-pave-title {
    font-size: 0.9375rem;
    line-height: 1.25rem;
    font-weight: 700;
  }

  .mobile-touch-btn {
    min-height: 42px;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
    font-size: 0.8125rem;
  }
}

/* -------------------------------------------------------------
 * WEEK PLANNING CALENDAR RESPONSIVE & LIGHT THEME OPTIMIZATION
 * ------------------------------------------------------------- */
#planning-week-container {
  width: 100%;
}

:root[data-theme="light"] #planning-week-container .border-dashed {
  border-color: #cbd5e1 !important;
  background-color: #f8fafc !important;
}

:root[data-theme="light"] #planning-week-container .border-dashed span {
  color: #64748b !important;
}

/* -------------------------------------------------------------
 * J-1 ATTENDANCE REMINDER BANNER STYLES (DARK & LIGHT THEMES)
 * ------------------------------------------------------------- */
.j1-reminder-banner {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.4) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.6);
  color: #f8fafc;
}

.j1-reminder-banner .j1-title {
  color: #fbbf24;
}

.j1-reminder-banner .j1-action-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fef08a;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.j1-reminder-banner .j1-desc {
  color: #cbd5e1;
}

.j1-reminder-banner .j1-desc strong {
  color: #ffffff;
}

.j1-reminder-banner .j1-icon-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Mode Clair pour Rappel J-1 */
:root[data-theme="light"] .j1-reminder-banner {
  background: #fffbeb !important;
  border: 1.5px solid #f59e0b !important;
  box-shadow: 0 6px 20px 0 rgba(245, 158, 11, 0.18) !important;
  color: #78350f !important;
}

:root[data-theme="light"] .j1-reminder-banner .j1-title {
  color: #92400e !important;
}

:root[data-theme="light"] .j1-reminder-banner .j1-action-badge {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border: 1px solid #fcd34d !important;
}

:root[data-theme="light"] .j1-reminder-banner .j1-desc {
  color: #451a03 !important;
}

:root[data-theme="light"] .j1-reminder-banner .j1-desc strong {
  color: #0f172a !important;
}

:root[data-theme="light"] .j1-reminder-banner .j1-icon-badge {
  background: #fef3c7 !important;
  border: 1px solid #fde68a !important;
}

