/* ================================================
   Events List Page Styles
   ================================================ */

.event-list {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  width: 100%;
}

@media (min-width: 640px) {
  .event-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .event-list {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (min-width: 1024px) {
  .event-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

.event-card {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.event-card-header {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  padding: 15px;
}

.event-card-header h3 {
  margin: 0;
  color: white;
  font-size: 1.3rem;
}

.event-card-body {
  padding: 15px;
}

.event-card-body p {
  margin-bottom: 8px;
  color: #666;
  font-size: 0.9rem;
}

.event-date {
  font-weight: bold;
  color: #0066cc;
  margin-bottom: 10px;
}

.event-card-footer {
  padding: 10px 15px;
  background-color: #f9f9f9;
  text-align: right;
  border-top: 1px solid #ddd;
}

.event-card-footer a {
  color: #0066cc;
  text-decoration: none;
  margin-left: 10px;
}

.event-card-footer a:hover {
  text-decoration: underline;
}

.event-container {
  margin-bottom: 50px;
}

@media (max-width: 768px) {
  .event-list {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 480px) {
  .event-list {
    grid-template-columns: 1fr;
  }
}

/* ================================================
   Event Detail Card
   ================================================ */

.event-detail-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
}

.event-detail-header {
  padding: 60px 40px; /* Un peu plus d'espace pour respirer */
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
  z-index: 1;
  display: flex; /* Force l'alignement propre */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px; /* Donne une taille fixe pour que le logo soit bien centré */
  padding-right: 180px; /* espace réservé pour le logo à droite */
}

/* Logo du club repositionné à droite, net et responsive */
.event-header-bg-logo {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 120px;
  height: 120px;
  object-fit: contain;
  z-index: 5; /* Au-dessus du fond mais derrière le texte principal si besoin */
  pointer-events: none;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 1; /* visible et net */
}

/* On s'assure que le contenu texte reste au-dessus */
.event-detail-header > div {
  position: relative;
  z-index: 10;
}

/* Mobile : réduire l'espace réservé et la taille du logo */
@media (max-width: 760px) {
  .event-detail-header {
    padding-right: 110px;
  }
  .event-header-bg-logo {
    right: 12px;
    top: 12px;
    width: 72px;
    height: 72px;
    padding: 6px;
  }
}

@media (max-width: 420px) {
  .event-detail-header {
    padding-right: 96px;
  }
  .event-header-bg-logo {
    width: 64px;
    height: 64px;
  }
}

.event-date-large {
  margin-bottom: 20px;
}

.event-date-large .day {
  display: block;
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
}

.event-date-large .month {
  display: block;
  font-size: 1.2rem;
  text-transform: capitalize;
  opacity: 0.9;
}

.event-detail-header h1 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  color: white;
}

.event-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.event-detail-body {
  padding: 40px;
}

.event-section {
  margin-bottom: 30px;
}

.event-section h3 {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eee;
}

.event-section h3 i {
  margin-right: 10px;
  color: #0066cc;
}

.event-reserved-card {
  background: #f8fafc;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  margin-top: 30px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.event-reserved-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.event-reserved-title {
  color: #1e293b;
  margin: 0;
  font-size: 1.25rem;
  border-bottom: 0;
  padding-bottom: 0;
}

.event-reserved-title i {
  color: #64748b;
}

.event-reserved-tag {
  background: #e0f2fe;
  color: #0369a1;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.event-reserved-section {
  margin-bottom: 20px;
}

.event-reserved-section h3 {
  margin-top: 0;
}

.event-reserved-grid {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.event-reserved-item {
  background: #fff;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  flex: 1;
  min-width: 150px;
}

.event-reserved-item small {
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.7rem;
}

.event-reserved-item p {
  margin: 5px 0 0 0;
  font-weight: 600;
  color: #059669;
}

.event-reserved-subtitle {
  font-size: 0.95rem;
  color: #475569;
  margin-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 5px;
}

.event-reserved-section--bordered {
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
}

.event-subscribers-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.event-subscribers-list li {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  border-radius: 10px;
  color: #1f2937;
  font-weight: 600;
}

.event-description-full {
  color: #555;
  line-height: 1.8;
  font-size: 1.05rem;
}

.event-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 25px;
  border-top: 2px solid #eee;
}

@media (max-width: 768px) {
  .event-detail-header {
    padding: 30px 20px;
  }

  .event-date-large .day {
    font-size: 3rem;
  }

  .event-detail-header h1 {
    font-size: 1.6rem;
  }

  .event-detail-body {
    padding: 25px 20px;
  }

  .event-actions {
    flex-direction: column;
  }

  .event-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .event-badges {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .event-detail-header {
    padding: 25px 15px;
  }

  .event-date-large .day {
    font-size: 2.5rem;
  }

  .event-date-large .month {
    font-size: 1rem;
  }

  .event-detail-header h1 {
    font-size: 1.4rem;
  }

  .event-detail-body {
    padding: 20px 15px;
  }

  .event-section h3 {
    font-size: 1.1rem;
  }

  .event-description-full {
    font-size: 0.95rem;
  }
}

.event-card-header h3 {
  font-size: 1.1rem;
}

/* ================================================
   Event Analytics Page Styles
   ================================================ */

.analytics-wrapper {
  background: #f4f6f9;
  min-height: 100vh;
  padding-bottom: 2rem;
}

.analytics-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.analytics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.event-header-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.event-header-title h1 {
  font-size: 1.75rem;
  color: #1a1a2e;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.event-header-title h1 i {
  color: #0066cc;
}

/* Stats Row */
.analytics-container .stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 1100px) {
  .analytics-container .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .analytics-container .stats-row {
    grid-template-columns: 1fr;
  }
}

.analytics-container .stat-box {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.analytics-container .stat-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.analytics-container .stat-box.blue::before {
  background: linear-gradient(90deg, #0066cc, #17a2b8);
}
.analytics-container .stat-box.green::before {
  background: linear-gradient(90deg, #28a745, #20c997);
}
.analytics-container .stat-box.orange::before {
  background: linear-gradient(90deg, #fd7e14, #ffc107);
}
.analytics-container .stat-box.red::before {
  background: linear-gradient(90deg, #dc3545, #e83e8c);
}

.analytics-container .stat-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.analytics-container .stat-box .number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.analytics-container .stat-box .label {
  color: #6c757d;
  font-size: 0.9rem;
}

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 992px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.chart-header {
  padding: 1.25rem 1.5rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chart-header.blue {
  background: linear-gradient(135deg, #0066cc 0%, #17a2b8 100%);
}
.chart-header.teal {
  background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
}
.chart-header.green {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}
.chart-header.purple {
  background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);
}
.chart-header.orange {
  background: linear-gradient(135deg, #fd7e14 0%, #ffc107 100%);
}
.chart-header.red {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.chart-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.chart-body {
  padding: 1.5rem;
}

.chart-container {
  position: relative;
  height: 280px;
}

/* Rankings */
.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ranking-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: #f4f6f9;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  gap: 1rem;
  transition: all 0.3s;
}

.ranking-item:last-child {
  margin-bottom: 0;
}

.ranking-item:hover {
  background: #e8f4fd;
  transform: translateX(5px);
}

.rank-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.rank-badge.gold {
  background: linear-gradient(135deg, #ffd700, #ffb347);
  color: #8b6914;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}
.rank-badge.silver {
  background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
  color: #5a5a5a;
  box-shadow: 0 4px 15px rgba(192, 192, 192, 0.4);
}
.rank-badge.bronze {
  background: linear-gradient(135deg, #cd7f32, #b87333);
  color: white;
  box-shadow: 0 4px 15px rgba(205, 127, 50, 0.4);
}
.rank-badge.default {
  background: #e9ecef;
  color: #6c757d;
}

.rank-info {
  flex: 1;
  min-width: 0;
}

.rank-info h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-info p {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #6c757d;
}

.rank-count {
  font-weight: 700;
  color: #0066cc;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

/* Event Rows */
.event-list-card {
  grid-column: 1 / -1;
}

.event-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.event-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f4f6f9;
  border-radius: 12px;
  transition: all 0.3s;
}

.event-row:hover {
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.event-date-box {
  min-width: 60px;
  text-align: center;
  background: white;
  padding: 0.75rem 0.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.event-date-box .day {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0066cc;
  line-height: 1;
}

.event-date-box .month {
  font-size: 0.7rem;
  color: #6c757d;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 2px;
}

.event-row-info {
  flex: 1;
  min-width: 0;
}

.event-row-info h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #1a1a2e;
}

.event-row-info p {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: #6c757d;
}

.event-row-info p i {
  margin-right: 0.25rem;
}

.subscribers-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #d4edda;
  color: #155724;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.alert-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #fff3cd;
  color: #856404;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* =====================================================
   EVENT CREATE/EDIT FORM STYLES
   ===================================================== */

/* Type Selector */
.type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.type-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.type-option:hover {
  border-color: #0066cc;
  background: #f0f7ff;
}

.type-option.selected {
  border-color: #0066cc;
  background: #e8f4fc;
}

.type-option input {
  display: none;
}

.type-option i {
  font-size: 2rem;
  color: #0066cc;
  margin-bottom: 10px;
}

.type-option span {
  font-weight: 600;
  color: #333;
}

.type-option small {
  color: #666;
  font-size: 0.8rem;
  margin-top: 5px;
}

/* Info Box */
.info-box {
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid;
}

.info-box-primary {
  background: #e8f4fc;
  border-color: #0066cc;
}

.info-box h4 {
  margin: 0 0 15px 0;
  color: #0066cc;
}

.info-box p {
  margin: 5px 0;
}

.info-box details {
  margin-top: 15px;
}

.info-box summary {
  cursor: pointer;
  font-weight: 500;
  color: #0066cc;
}

/* Event create guide block */
.submission-guide {
  margin-bottom: 25px;
  border-left-width: 5px;
  border-left-color: #0056b3;
  padding: 22px;
}

.submission-guide-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.submission-guide-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.submission-guide-type-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid #c8d8eb;
  border-radius: 10px;
  padding: 12px 14px;
}

.submission-guide-type-title {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #1e293b;
}

.submission-guide-type-title i {
  margin-right: 6px;
}

.submission-guide-type-card.event .submission-guide-type-title i {
  color: #ea580c;
}

.submission-guide-type-card.activity .submission-guide-type-title i {
  color: #16a34a;
}

.submission-guide-type-text {
  margin: 0;
  color: #334155;
  line-height: 1.45;
}

.submission-guide-dossier {
  background: #f8fafc;
  border: 1px solid #d5dee8;
  border-radius: 10px;
  padding: 14px;
}

.submission-guide-dossier h5 {
  margin: 0 0 8px;
  color: #1f2937;
  font-size: 1.07rem;
}

.submission-guide-dossier-intro {
  margin: 0 0 12px;
  color: #334155;
}

.submission-guide-dossier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 10px;
}

.submission-guide-dossier-item {
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.45;
}

.submission-guide-rules {
  margin-top: 2px;
}

.submission-guide-rules summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #0056b3;
  font-weight: 700;
}

.submission-guide-rules summary::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  margin-right: 2px;
  display: inline-block;
  transition: transform 0.2s ease;
}

.submission-guide-rules summary::-webkit-details-marker {
  display: none;
}

.submission-guide-rules summary::marker {
  content: "";
}

.submission-guide-rules[open] summary::before {
  transform: rotate(45deg);
}

.submission-guide-rules ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: #1f2937;
  line-height: 1.55;
}

@media (max-width: 768px) {
  .submission-guide {
    padding: 16px;
  }

  .submission-guide-types {
    grid-template-columns: 1fr;
  }

  .submission-guide-dossier-grid {
    grid-template-columns: 1fr;
  }
}

/* Required Field Indicator */
.required,
.event-required {
  color: #dc3545;
}

@media (max-width: 600px) {
  .type-selector {
    grid-template-columns: 1fr;
  }
}

/* ================================================
   Event Card Details
   ================================================ */

/* Club name in event cards (list view) */
.event-content .club-name {
  color: var(--color-gray-500, #666);
  font-weight: bold;
  font-size: 0.9em;
  margin-bottom: 5px;
}

/* Refusal reason in event cards (my_list) */
.event-card .refusal-reason {
  background-color: #ffe6e6;
  border-left: 4px solid var(--color-danger, #dc3545);
  padding: 8px 12px;
  border-radius: 4px;
  margin: 10px 0;
}

.event-card .refusal-reason small {
  color: #721c24;
}

/* Event card action buttons row */
.event-card .event-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.request-tracker {
  margin: 10px 0 12px;
  padding: 14px 14px 14px 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f7ff 100%);
}

.tracker-title {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: #0f2a43;
}

.tracker-subtitle {
  margin: -4px 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #334155;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 3px 9px;
}

.tracker-subtitle.tracker-subtitle-warning {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}

.tracker-subtitle.tracker-subtitle-info {
  color: #1e3a8a;
  background: #dbeafe;
  border-color: #bfdbfe;
}

.tracker-subtitle.tracker-subtitle-danger {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fecaca;
}

.tracker-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 6px;
}

.tracker-step {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 36px;
  color: #64748b;
}

.tracker-step:not(:last-child) {
  padding-bottom: 10px;
}

.tracker-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 30px;
  bottom: -2px;
  width: 2px;
  background: #cbd5e1;
}

.tracker-dot {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
}

.tracker-label {
  font-size: 0.89rem;
  font-weight: 500;
}

.tracker-step.is-done {
  color: #166534;
}

.tracker-step.is-done .tracker-dot {
  background: #22c55e;
  border-color: #22c55e;
  color: #ffffff;
}

.tracker-step.is-done:not(:last-child)::after {
  background: #86efac;
}

.tracker-step.is-current {
  color: #0f172a;
}

.tracker-step.is-current .tracker-dot {
  border-color: #2563eb;
  color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.tracker-step.is-rejected {
  color: #991b1b;
}

.tracker-step.is-rejected .tracker-dot {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

.tracker-step.is-rejected:not(:last-child)::after {
  background: #fca5a5;
}

.tracker-step.is-forced .tracker-dot {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* Inline forms in event cards */
.event-card form,
.event-card-actions form {
  display: inline-flex;
}

/* ================================================
   Event Report - Upload Zone
   ================================================ */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px 20px;
  border: 2px dashed var(--color-gray-300, #cbd5e1);
  border-radius: 12px;
  background: var(--color-gray-50, #f8fafc);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.upload-zone:hover {
  border-color: var(--color-primary, #0066cc);
  background: var(--color-primary-light, #e8f4fc);
}

.upload-zone:hover > i {
  color: var(--color-primary, #0066cc);
  transform: scale(1.1);
}

.upload-zone > i {
  font-size: 2.2rem;
  color: var(--color-gray-400, #94a3b8);
  transition: all 0.2s ease;
}

.upload-zone > p {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-gray-600, #475569);
}

.upload-zone > small {
  color: var(--color-gray-400, #94a3b8);
  font-size: 0.82rem;
}

/* Size error message */
.size-error {
  display: none;
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--color-warning-light, #fff3cd);
  color: #854d0e;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.size-error i {
  margin-right: 6px;
  color: #d97706;
}

/* Image preview grid */
#imagePreview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.preview-wrapper {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  border: 2px solid var(--color-gray-200, #e2e8f0);
  background: var(--color-gray-100, #f1f5f9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.preview-wrapper:hover {
  border-color: var(--color-primary, #0066cc);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.preview-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Remove button on preview */
.preview-wrapper .preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(220, 38, 38, 0.85);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.preview-wrapper:hover .preview-remove {
  opacity: 1;
}

@media (max-width: 500px) {
  #imagePreview {
    grid-template-columns: repeat(3, 1fr);
  }

  .request-tracker {
    padding: 12px;
  }

  .tracker-step {
    grid-template-columns: 24px 1fr;
    gap: 8px;
  }

  .tracker-step:not(:last-child)::after {
    left: 11px;
    top: 27px;
  }

  .tracker-dot {
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
  }

  .tracker-label {
    font-size: 0.84rem;
  }
}

/* Liste d'événements : affichage du logo à gauche du contenu */
.events-grid .event-card .event-content {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.event-card-logo {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex: 0 0 64px;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
}

/* Conteneur principal du texte à côté du logo */
.event-content-main {
  flex: 1 1 auto;
  min-width: 0;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .events-grid .event-card .event-content {
    flex-direction: column;
    align-items: stretch;
  }
  .event-card-logo {
    width: 56px;
    height: 56px;
    margin-bottom: 8px;
    align-self: start;
  }
}

/* Type badge (Activité / Événement) */
.type-badge {
  display: inline-block;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  margin-left: 8px;
  vertical-align: middle;
}
.type-badge.event {
  background: #2563eb;
} /* blue for events */
.type-badge.activity {
  background: #6b7280;
} /* gray for activities */

/* Public event list: professional tags and cleaner meta alignment */
body.event-list-page .event-meta {
  align-items: center;
  gap: 8px;
}

body.event-list-page .type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 0;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

body.event-list-page .type-badge.event {
  color: #0f4fb0;
  background: linear-gradient(180deg, #e8f2ff 0%, #dbeafe 100%);
  border-color: #a6c7fb;
}

body.event-list-page .type-badge.activity {
  color: #0f5a49;
  background: linear-gradient(180deg, #e8fbf5 0%, #d1fae5 100%);
  border-color: #98e8c9;
}

body.event-list-page .type-badge i {
  font-size: 0.72rem;
}

body.event-list-page .time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #1e3a5f;
  border: 1px solid #d5e2ef;
  font-size: 0.82rem;
  font-weight: 600;
}

body.event-list-page .time i {
  font-size: 0.78rem;
}

body.event-list-page .event-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

body.event-list-page .event-card-actions .btn {
  border-radius: 10px;
  font-weight: 700;
  padding: 8px 13px;
}

body.event-list-page .form-subscribe-inline {
  display: inline-flex;
  margin: 0;
}

/* ================================================
   Public Event List - Card Redesign (scoped)
   ================================================ */
body.event-list-page .events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 24px;
  align-items: stretch;
}

body.event-list-page .event-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid #d5e2ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 30px rgba(15, 42, 67, 0.09);
  padding: 16px 16px 14px;
  overflow: hidden;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

body.event-list-page .event-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #0b66c3 0%, #1c8be8 100%);
  opacity: 0.95;
}

body.event-list-page .event-card:hover {
  transform: translateY(-4px);
  border-color: #b7cde3;
  box-shadow: 0 18px 36px rgba(15, 42, 67, 0.14);
}

body.event-list-page .event-date-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  border-radius: 12px;
  min-width: 58px;
  padding: 8px 8px 7px;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(180deg, #0f74d1 0%, #005fc2 100%);
  box-shadow: 0 10px 20px rgba(0, 95, 194, 0.3);
}

body.event-list-page .event-date-badge .day {
  display: block;
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
}

body.event-list-page .event-date-badge .month {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.event-list-page .events-grid .event-card .event-content {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-right: 70px;
}

body.event-list-page .event-media {
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
}

body.event-list-page .event-card-logo {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #d8e3ef;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.12);
}

body.event-list-page .event-card-logo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 1px dashed #c3d6ea;
  background: linear-gradient(180deg, #f7fbff 0%, #edf4fb 100%);
  color: #6b89a7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

body.event-list-page .event-content-main h3 {
  margin: 2px 0 10px;
  color: #0f2a43;
  font-size: 1.08rem;
  line-height: 1.25;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}

body.event-list-page .event-content .club-name {
  color: #5f7389;
  font-size: 0.9rem;
  margin: 0;
  font-weight: 700;
}

body.event-list-page .event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

body.event-list-page .event-description {
  color: #455a72;
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.event-list-page .event-description-block {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  min-height: 74px;
}

body.event-list-page .event-description.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

body.event-list-page .event-see-more {
  align-self: flex-start;
  border: none;
  background: transparent;
  color: #0b66c3;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0;
  margin-top: -4px;
  cursor: pointer;
}

body.event-list-page .event-see-more,
body.event-list-page .event-see-more-placeholder {
  min-height: 18px;
  line-height: 1;
}

body.event-list-page .event-see-more-placeholder {
  color: transparent;
  user-select: none;
  pointer-events: none;
}

body.event-list-page .event-see-more:hover {
  color: #084d94;
  text-decoration: underline;
}

body.event-list-page .event-content-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
}

body.event-list-page .event-card-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

body.event-list-page .event-card-actions .btn,
body.event-list-page .event-card-actions form {
  min-height: 40px;
}

body.event-list-page .event-card-actions form {
  width: 100%;
  margin: 0;
}

body.event-list-page .event-card-actions .btn {
  width: 100%;
  justify-content: center;
  min-height: 46px;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 700px) {
  body.event-list-page .events-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  body.event-list-page .event-card {
    min-height: auto;
  }

  body.event-list-page .events-grid .event-card .event-content {
    padding-right: 0;
    flex-direction: column;
    align-items: stretch;
  }

  body.event-list-page .event-media {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
  }

  body.event-list-page .event-card-logo {
    width: 100%;
    height: 100%;
  }

  body.event-list-page .event-date-badge {
    min-width: 52px;
    top: 12px;
    right: 12px;
  }

  body.event-list-page .event-date-badge .day {
    font-size: 1.6rem;
  }

  body.event-list-page .event-content-main {
    gap: 9px;
    min-height: 0;
  }

  body.event-list-page .event-description-block {
    min-height: 0;
  }

  body.event-list-page .event-card-actions {
    margin-top: 8px;
  }
}

/* Make badge compact on small screens */
@media (max-width: 640px) {
  .type-badge {
    font-size: 0.7rem;
    padding: 3px 6px;
    margin-left: 6px;
  }

  body.event-list-page .type-badge {
    margin-left: 0;
  }
}

/* ================================================
   My Events - Card Redesign (scoped)
   ================================================ */
body.my-events-page .events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(390px, 1fr));
  gap: 28px;
  align-items: stretch;
}

body.my-events-page .event-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid #d6e1ee;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 42, 67, 0.09);
  overflow: hidden;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

body.my-events-page .event-card:hover {
  transform: translateY(-3px);
  border-color: #b7cde3;
  box-shadow: 0 16px 34px rgba(15, 42, 67, 0.14);
}

body.my-events-page .event-card-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

body.my-events-page .event-left {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
}

body.my-events-page .event-date-badge {
  position: static;
  min-width: 58px;
  padding: 9px 11px;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 102, 204, 0.22);
}

body.my-events-page .event-date-badge .day {
  font-size: 1.9rem;
  line-height: 0.95;
}

body.my-events-page .event-date-badge .month {
  font-size: 0.72rem;
  font-weight: 700;
}

body.my-events-page .event-body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 24px 22px 20px;
}

body.my-events-page .event-head {
  display: flex;
  flex-direction: row;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 0;
  text-align: left;
}

body.my-events-page .event-head-main {
  min-width: 0;
  flex: 1 1 auto;
}

body.my-events-page .event-title {
  margin: 0;
  color: #0f172a;
  max-width: 100%;
  font-size: 1.28rem;
  line-height: 1.28;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.my-events-page .event-head-right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  max-width: 100%;
}

body.my-events-page .event-body .badge,
body.my-events-page .event-body .campus-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  white-space: normal;
  text-align: center;
  background: #eef6ff;
  color: #005eb8;
  border: 1px solid #cfe4ff;
}

body.my-events-page .event-body .type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-left: 0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  border: 1px solid transparent;
}

body.my-events-page .event-body .badge-success,
body.my-events-page .event-body .badge-warning,
body.my-events-page .event-body .badge-danger {
  border: 1px solid transparent;
}

body.my-events-page .event-body .badge-success {
  background: #22a847;
  color: #ffffff;
}

body.my-events-page .event-body .badge-warning {
  background: #fff7d6;
  color: #8a5a00;
  border-color: #f5d56f;
}

body.my-events-page .event-body .badge-danger {
  background: #e3344b;
  color: #ffffff;
}

body.my-events-page .event-body .type-badge.event {
  color: #0f4fb0;
  background: #eef6ff;
  border-color: #cfe4ff;
}

body.my-events-page .event-body .type-badge.activity {
  color: #005eb8;
  background: #eef6ff;
  border-color: #cfe4ff;
}

body.my-events-page .event-card .refusal-reason {
  margin: 14px 0 2px;
  border-radius: 8px;
  border-left-width: 3px;
  padding: 10px 12px;
}

body.my-events-page .event-description-block {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #e3edf8;
  border-radius: 10px;
  background: #fcfdff;
}

body.my-events-page .event-section-title {
  margin: 0 0 8px;
  color: #0f2f55;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

body.my-events-page .request-tracker {
  width: min(100%, 450px);
  margin: 18px auto 0;
  padding: 16px 18px;
  border-radius: 10px;
  background: #f8fbff;
  border: 1px solid #dce8f5;
}

body.my-events-page .tracker-title {
  margin-bottom: 10px;
  font-size: 0.95rem;
}

body.my-events-page .tracker-step {
  min-height: 30px;
}

body.my-events-page .tracker-label {
  font-size: 0.86rem;
}

body.my-events-page .event-description {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #334155;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.my-events-page .event-meta-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px 14px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 0;
  color: #1e3a5f;
  font-size: 0.98rem;
}

body.my-events-page .event-meta-row .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid #e3edf8;
  border-radius: 9px;
  background: #f8fbff;
  font-size: 0.96rem;
  white-space: nowrap;
}

body.my-events-page .event-meta-row .meta-item span {
  color: #0f2f55;
}

body.my-events-page .event-meta-row .meta-item i {
  width: 16px;
  color: #0066cc;
  text-align: center;
}

body.my-events-page .event-actions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.my-events-page .event-actions form {
  display: inline-flex !important;
  margin-left: 0 !important;
}

body.my-events-page .event-actions .btn {
  border-radius: 8px;
  font-weight: 700;
  padding: 9px 14px;
}

@media (max-width: 900px) {
  body.my-events-page .events-grid {
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 18px;
  }
}

@media (max-width: 640px) {
  body.my-events-page .events-grid {
    grid-template-columns: 1fr;
  }

  body.my-events-page .event-head {
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    align-items: flex-start;
    text-align: left;
  }

  body.my-events-page .event-left {
    justify-content: flex-start;
  }

  body.my-events-page .event-body {
    padding: 20px 18px 18px;
  }

  body.my-events-page .event-title {
    font-size: 1.15rem;
  }

  body.my-events-page .event-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  body.my-events-page .request-tracker {
    width: 100%;
  }

  body.my-events-page .event-meta-row {
    align-items: stretch;
    flex-direction: column;
  }

  body.my-events-page .event-meta-row .meta-item {
    width: 100%;
  }
}

/* ================================================
   My Subscriptions - Layout Fixes
   ================================================ */
body.my-subscriptions-page,
body.event-report-page {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

body.my-subscriptions-page main,
body.event-report-page main {
  grid-row: 3;
  min-height: 0;
}

body.my-subscriptions-page .modern-footer,
body.event-report-page .modern-footer {
  grid-row: 4;
  margin-top: 0;
  margin-bottom: 0;
}

body.my-subscriptions-page .events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  align-items: stretch;
}

body.my-subscriptions-page .event-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid #d7e2ef;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 42, 67, 0.09);
  overflow: hidden;
}

body.my-subscriptions-page .event-date-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  min-width: 56px;
  padding: 8px 10px;
  border-radius: 9px;
}

body.my-subscriptions-page .event-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
  padding: 18px;
  padding-right: 88px;
}

body.my-subscriptions-page .event-content h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.25;
  color: #0f172a;
}

body.my-subscriptions-page .event-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

body.my-subscriptions-page .event-card-actions {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #e5edf5;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.my-subscriptions-page .event-card-actions .btn {
  border-radius: 10px;
  font-weight: 700;
  padding: 8px 12px;
}

body.my-subscriptions-page .event-card-actions .form-unsubscribe {
  display: inline-flex;
  margin: 0;
}

@media (max-width: 768px) {
  body.my-subscriptions-page .events-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  body.my-subscriptions-page .event-content {
    padding: 14px;
    padding-right: 76px;
  }

  body.my-subscriptions-page .event-content h3 {
    font-size: 1.05rem;
  }

  body.my-subscriptions-page .event-date-badge {
    top: 10px;
    right: 10px;
    min-width: 50px;
    padding: 7px 8px;
  }

  body.my-subscriptions-page .event-card-actions .btn,
  body.my-subscriptions-page .event-card-actions .form-unsubscribe {
    flex: 1 1 auto;
  }

  body.my-subscriptions-page .event-card-actions .btn {
    justify-content: center;
    width: 100%;
  }
}

/* Réserve l'espace du champ montant et cache/affiche sans déplacer les éléments */
#montantGroup {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px; /* réserve l'espace pour éviter les décalages */
  transition: opacity 0.18s ease;
  opacity: 0;
  pointer-events: none;
}

#montantGroup.montant-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Ajustement responsive : réduire la largeur réservée sur petits écrans */
@media (max-width: 600px) {
  #montantGroup {
    min-width: 0;
  }
}
