.events-page {
  padding: 20px 10px 60px;
  background: linear-gradient(#379cd0, #00293f);
  min-height: 100vh;
}

.events-page .container {
  margin: 0 auto;
  padding: 0 20px;
}

.eventhead {
  text-align: center;
  padding: 30px 0 20px;
  color: white;
}

.eventhead h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.eventhead p {
  opacity: 0.85;
  font-size: 1rem;
}

.eventhead-manage {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.btn-manage {
  padding: 7px 18px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  transition: all 0.18s;
}

.btn-manage:hover {
  background: rgba(255, 255, 255, 0.35);
}

.events-filters {
  background: #e0f4ff;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.filter-search {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 10px;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.filter-search:focus {
  outline: none;
  border-color: #379cd0;
}

.filters-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filters-row select {
  padding: 12px 25px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s;
}

.filters-row select:focus {
  outline: none;
  border-color: #379cd0;
}

.filter-reset-btn {
  padding: 12px 25px;
  background: #379CD0;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  color: #ffffff;
  transition: all 0.15s;
}

.filter-reset-btn:hover {
  background: #2d7bb5;
}


.calendar-wrap {
  background: #fff;
  border-radius: 14px;
  padding: 0;
  margin-bottom: 24px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.cal-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cal-nav-btn {
  width: 34px;
  height: 34px;
  border: 1.5px solid #ddd;
  border-radius: 50%;
  background: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.cal-nav-btn:hover {
  background: #379cd0;
  color: #fff;
  border-color: #379cd0;
}

.cal-period-label {
  font-size: 1rem;
  font-weight: 700;
  color: #222;
  min-width: 180px;
  text-align: center;
}

.cal-view-toggle {
  display: flex;
  gap: 4px;
  background: #f0f0f0;
  border-radius: 8px;
  padding: 3px;
}

.cal-view-btn {
  padding: 5px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  color: #666;
  transition: all 0.15s;
}

.cal-view-btn--active {
  background: #fff;
  color: #379cd0;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.cal-loading {
  display: none;
  text-align: center;
  padding: 8px;
  font-size: 0.85rem;
  color: #888;
  background: #f8fbfd;
  border-bottom: 1px solid #eee;
}

.cal-grid {
  display: grid;
  grid-template-columns: 52px repeat(var(--day-count, 7), 1fr);
  overflow-x: auto;
}

.cal-hours {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #eee;
}

.cal-hours-header {
  height: 54px;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}

.cal-hour-slot {
  height: 64px;
  display: flex;
  align-items: flex-start;
  padding: 4px 6px 0;
  font-size: 0.7rem;
  color: #aaa;
  border-bottom: 1px solid #f5f5f5;
}

.cal-day {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #eee;
  min-width: 80px;
}

.cal-day:last-child {
  border-right: none;
}

.cal-day--today .cal-day-header {
  background: #e8f4fb;
}

.cal-day-header {
  height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-bottom: 2px solid #eee;
  background: #fafafa;
  position: sticky;
  top: 0;
  z-index: 5;
}

.cal-day-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
}

.cal-day-num {
  font-size: 1.05rem;
  font-weight: 700;
  color: #333;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.cal-day-num--today {
  background: #379cd0;
  color: #fff;
}

.cal-day-body {
  position: relative;
  height: calc(var(--hour-count, 15) * 64px);
  --hour-count: 15;
}

.cal-bg-slot {
  height: 64px;
  border-bottom: 1px solid #f5f5f5;
}

.cal-bg-slot--even {
  background: rgba(0, 0, 0, 0.01);
}

.cal-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #f44336;
  z-index: 4;
}

.cal-now-line::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -4px;
  width: 10px;
  height: 10px;
  background: #f44336;
  border-radius: 50%;
}

.cal-event {
  position: absolute;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.72rem;
  overflow: hidden;
  cursor: pointer;
  z-index: 3;
  transition:
    filter 0.15s,
    transform 0.1s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cal-event:hover {
  filter: brightness(1.08);
  transform: scale(1.02);
  z-index: 10;
}

.cal-event--cancelled {
  opacity: 0.5;
  text-decoration: line-through;
}

.cal-event--postponed {
  opacity: 0.75;
  border: 2px dashed rgba(255, 255, 255, 0.6);
}

.cal-event-name {
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-event-time {
  font-size: 0.65rem;
  opacity: 0.85;
}

.cal-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.cal-modal--open {
  display: flex;
}

.cal-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.cal-modal__box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 480px;
  width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.cal-modal__close {
  position: sticky;
  top: 12px;
  float: right;
  margin: 12px 12px 0 0;
  width: 30px;
  height: 30px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 2;
}

.cal-modal__close:hover {
  background: #ddd;
}

.cal-modal__content {
  padding: 16px;
  clear: both;
}

.cal-modal-group-title {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 12px;
  font-weight: 600;
}

.cal-modal-event {
  border-left: 4px solid #379cd0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cal-modal-event__header {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cal-modal-event__assos {
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}

.cal-modal-event__body {
  padding: 12px 14px;
}

.cal-modal-event__name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.cal-modal-event__time,
.cal-modal-event__loc,
.cal-modal-event__reg {
  font-size: 0.85rem;
  color: #555;
  margin: 3px 0;
}

.cal-modal-event__footer {
  padding: 10px 14px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
}

.cal-modal-event__link {
  font-size: 0.85rem;
  font-weight: 600;
  color: #379cd0;
  text-decoration: none;
}

.cal-modal-event__link--helloasso {
  color: #e05a2b;
}
.cal-modal-event__link:hover {
  text-decoration: underline;
}

.events-results {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
  margin-bottom: 16px;
}

.result-span {
  font-weight: 700;
  color: #379cd0;
  font-size: 0.9rem;
}

.events-container {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.event-item {
  display: flex;
  background: #fafafa;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid #eee;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.20);
  transition: all 0.18s;
}

.event-item:hover {
  border-color: #379cd0;
  box-shadow: 0 4px 16px rgba(55, 156, 208, 0.12);
  transform: translateY(-1px);
}

.event-item--status-cancelled {
  opacity: 0.65;
  border-color: #f44336;
}

.event-item--status-postponed {
  border-color: #ff9800;
}

.event-item a {
  display: flex;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.event-item-image {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  overflow: hidden;
}

.event-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-item-image--placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.8);
}

.event-item-date {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.event-status-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
}

.event-status-badge--cancelled {
  background: #f44336;
}
.event-status-badge--postponed {
  background: #ff9800;
}
.event-status-badge--draft {
  background: #9e9e9e;
}

.event-item-content {
  flex: 1;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.event-item-asso {
  font-size: 0.78rem;
  color: #379cd0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.event-co-tag {
  background: #f0f0f0;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.72rem;
  color: #555;
}

.event-item-titre {
  font-size: 1.05rem;
  font-weight: 700;
  color: #222;
  margin: 0;
}

.event-item-description {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-item-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

.event-item-lieu,
.event-item-time {
  font-size: 0.78rem;
  color: #888;
}

.event-item-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  background: #e8f5e9;
  color: #388e3c;
  border-radius: 10px;
}

.no-event {
  text-align: center;
  color: #aaa;
  padding: 40px;
  font-size: 0.95rem;
}


.event-page {
  max-width: 860px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  margin-top: 30px;
  margin-bottom: 40px;
}

.event-banniere {
  position: relative;
  height: 280px;
  overflow: hidden;
}

.event-banniere img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-banniere-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.5));
}

.event-banniere--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-header {
  padding: 24px 32px;
  border-bottom: 1px solid #eee;
}

.event-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.event-assos-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.event-asso-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #f0f8fd;
  color: #379cd0;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.event-asso-tag:hover {
  background: #d6eef8;
}
.event-asso-tag img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.event-co-sep {
  font-size: 0.9rem;
  color: #aaa;
}

.event-status-banner {
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.event-status-banner--cancelled {
  background: #ffebee;
  color: #c62828;
}
.event-status-banner--postponed {
  background: #fff8e1;
  color: #e65100;
}
.event-status-banner--draft {
  background: #f5f5f5;
  color: #757575;
}

.event-titre {
  font-size: 1.8rem;
  font-weight: 900;
  color: #1a1a1a;
  margin: 0;
}

.event-header-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.event-inscrit-badge {
  padding: 6px 14px;
  background: #e8f5e9;
  color: #388e3c;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.btn-event-edit {
  padding: 8px 18px;
  background: #379cd0;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s;
}

.btn-event-edit:hover {
  background: #2a7db0;
}

.event-meta {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  background: #f8f8f8;
  border-radius: 10px;
  overflow: hidden;
}

.event-meta-item {
  flex: 1;
  min-width: 140px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.event-meta-divider {
  width: 1px;
  background: #eee;
  align-self: stretch;
  margin: 10px 0;
}

.event-meta-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.event-meta-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: #333;
}

.event-meta-link {
  color: #379cd0;
  text-decoration: none;
}

.event-body {
  padding: 24px 32px;
}

.event-section-titre {
  font-size: 1.1rem;
  font-weight: 700;
  color: #379cd0;
  margin-bottom: 12px;
}

.event-description {
  line-height: 1.7;
  color: #333;
}

.event-inscription {
  padding: 24px 32px;
  border-top: 1px solid #eee;
  text-align: center;
  background: #f8fbfd;
}

.event-inscription-texte {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.event-deja-inscrit {
  color: #388e3c;
  font-weight: 600;
  margin-bottom: 10px;
}

.event-btn-inscription {
  display: inline-block;
  padding: 12px 32px;
  background: #379cd0;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.18s;
}

.event-btn-inscription:hover {
  background: #2a7db0;
}
.event-btn-inscription--secondary {
  background: #555;
}
.event-btn-inscription--secondary:hover {
  background: #333;
}

.event-back {
  padding: 16px 32px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.event-back a {
  font-size: 0.85rem;
  color: #379cd0;
  text-decoration: none;
  font-weight: 600;
}

.event-back a:hover {
  text-decoration: underline;
}


.event-form .form-dates-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.co-orgs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.co-org-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1.5px solid #eee;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.15s;
}

.co-org-label input {
  display: none;
}

.co-org-label:has(input:checked),
.co-org-label--selected {
  border-color: var(--co-color, #379cd0);
  background: rgba(55, 156, 208, 0.06);
  color: var(--co-color, #379cd0);
}

.co-org-label img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

.co-org-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(#379cd0, #00293f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.event-form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-delete {
  padding: 10px 18px;
  background: #f44336;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-delete:hover {
  background: #c62828;
}


.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Notifications panel */
.notifs-panel {
  background: #fff8e1;
  border: 1.5px solid #ff9800;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.notifs-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.notifs-panel__header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e65100;
}

.notifs-read-all {
  font-size: 0.78rem;
  color: #888;
  background: none;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 3px 10px;
  cursor: pointer;
  font-family: inherit;
}

.notifs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  border-left: 3px solid #ff9800;
}

.notif-item--event_ended {
  border-color: #9e9e9e;
}
.notif-item--event_cancelled {
  border-color: #f44336;
}
.notif-item--event_conflict {
  border-color: #ff5722;
}

.notif-item__body strong {
  font-size: 0.88rem;
  color: #333;
}

.notif-item__body p {
  font-size: 0.8rem;
  color: #666;
  margin: 3px 0 0;
}

.notif-item__link {
  font-size: 0.78rem;
  color: #379cd0;
  text-decoration: none;
}

.notif-item__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.notif-item__meta span {
  font-size: 0.72rem;
  color: #aaa;
}

.notif-read-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  font-size: 0.7rem;
  color: #4caf50;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.notif-read-btn:hover {
  background: #4caf50;
  color: #fff;
  border-color: #4caf50;
}

.manage-event-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
  gap: 12px;
}

.manage-event-row:last-child {
  border-bottom: none;
}

.manage-event-row__info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.manage-event-row__date {
  font-size: 0.78rem;
  color: #aaa;
  white-space: nowrap;
}

.manage-event-row__name {
  font-weight: 600;
  color: #222;
  text-decoration: none;
  font-size: 0.92rem;
}

.manage-event-row__name:hover {
  color: #379cd0;
}

.manage-event-row__count {
  font-size: 0.78rem;
  color: #888;
}

.manage-event-row__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-delete-sm {
  padding: 4px 10px;
  background: #ffebee;
  color: #f44336;
  border: 1px solid #f44336;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.15s;
}

.btn-delete-sm:hover {
  background: #f44336;
  color: #fff;
}
