/* Reset et base */
* {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
}

body {
     font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
     background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
     min-height: 100vh;
     color: #333;
}

header {
     background: white;
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
     padding: 1.5rem 2rem;
     margin-bottom: 2rem;
}

header h1 {
     color: #667eea;
     margin-bottom: 1rem;
}

nav {
     display: flex;
     gap: 1rem;
}

nav a {
     color: #667eea;
     text-decoration: none;
     padding: 0.5rem 1rem;
     border-radius: 5px;
     transition: all 0.3s;
}

nav a:hover {
     background: #667eea;
     color: white;
}

main {
     max-width: 1200px;
     margin: 0 auto;
     padding: 2rem;
}

/* Événement en cours */
.current-event {
     background: white;
     border-radius: 15px;
     padding: 2rem;
     margin-bottom: 2rem;
     box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
     position: relative;
}

.event-badge {
     position: absolute;
     top: 20px;
     right: 20px;
     background: #ff4757;
     color: white;
     padding: 0.5rem 1rem;
     border-radius: 20px;
     font-weight: bold;
     font-size: 0.9rem;
     animation: pulse 2s infinite;
}

@keyframes pulse {
     0%,
     100% {
          transform: scale(1);
     }
     50% {
          transform: scale(1.05);
     }
}

.current-event h2 {
     color: #667eea;
     margin-bottom: 1rem;
}

.event-meta {
     display: flex;
     gap: 2rem;
     margin-bottom: 1rem;
     color: #666;
}

.current-event img {
     width: 100%;
     max-height: 400px;
     object-fit: cover;
     border-radius: 10px;
     margin: 1rem 0;
}

/* Formulaires */
.submit-event,
.add-event {
     background: white;
     border-radius: 15px;
     padding: 2rem;
     margin-bottom: 2rem;
     box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.submit-event h2,
.add-event h2 {
     color: #667eea;
     margin-bottom: 1.5rem;
}

.form-row {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 1rem;
     margin-bottom: 1rem;
}

.form-group {
     margin-bottom: 1rem;
}

.form-group label {
     display: block;
     margin-bottom: 0.5rem;
     font-weight: 600;
     color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
     width: 100%;
     padding: 0.75rem;
     border: 2px solid #e0e0e0;
     border-radius: 8px;
     font-size: 1rem;
     transition: border 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
     outline: none;
     border-color: #667eea;
}

/* Boutons */
.btn-submit,
.btn-register,
.btn-approve,
.btn-reject,
.btn-cancel {
     padding: 0.75rem 2rem;
     border: none;
     border-radius: 8px;
     font-size: 1rem;
     font-weight: 600;
     cursor: pointer;
     transition: all 0.3s;
     margin-right: 0.5rem;
}

.btn-submit,
.btn-register,
.btn-approve {
     background: #667eea;
     color: white;
}

.btn-submit:hover,
.btn-register:hover,
.btn-approve:hover {
     background: #5568d3;
     transform: translateY(-2px);
     box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-reject {
     background: #ff4757;
     color: white;
}

.btn-reject:hover {
     background: #ee3344;
}

.btn-cancel {
     background: #95a5a6;
     color: white;
}

.btn-view {
     background: #3498db;
     color: white;
     padding: 0.5rem 1rem;
     border: none;
     border-radius: 5px;
     cursor: pointer;
}

/* Messages */
.success-message,
.error-message {
     padding: 1rem;
     border-radius: 8px;
     margin-top: 1rem;
}

.success-message {
     background: #d4edda;
     color: #155724;
     border: 1px solid #c3e6cb;
}

.error-message {
     background: #f8d7da;
     color: #721c24;
     border: 1px solid #f5c6cb;
}

/* Calendrier */
.calendar-section {
     background: white;
     border-radius: 15px;
     padding: 2rem;
     box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
     margin-bottom: 2rem;
}

.calendar-section h2 {
     color: #667eea;
     margin-bottom: 1.5rem;
}

.calendar-month {
     display: block;
     width: 100%;
}

.view-toggle {
     margin-bottom: 1rem;
     display: flex;
     gap: 0.5rem;
}

.view-btn {
     padding: 0.5rem 1.5rem;
     border: 2px solid #667eea;
     background: white;
     color: #667eea;
     border-radius: 8px;
     cursor: pointer;
     transition: all 0.3s;
}

.view-btn.active,
.view-btn:hover {
     background: #667eea;
     color: white;
}

.calendar-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 1.5rem;
     padding: 1rem;
     background: #f8f9fa;
     border-radius: 10px;
}

.calendar-header h3 {
     color: #667eea;
     margin: 0;
     font-size: 1.5rem;
}

.btn-nav-month {
     background: #667eea;
     color: white;
     border: none;
     padding: 0.75rem 1.5rem;
     border-radius: 8px;
     font-weight: 600;
     cursor: pointer;
     transition: all 0.3s;
     font-size: 1rem;
}

.btn-nav-month:hover {
     background: #5568d3;
     transform: translateY(-2px);
     box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-nav-month:active {
     transform: translateY(0);
}

.calendar-grid {
     display: grid;
     grid-template-columns: repeat(7, 1fr);
     gap: 0.5rem;
     min-height: 400px;
}

.day-header {
     text-align: center;
     font-weight: 600;
     padding: 0.5rem;
     color: #667eea;
     background: #f8f9fa;
     border-radius: 5px;
}

.calendar-day {
     aspect-ratio: 1;
     border: 2px solid #e0e0e0;
     border-radius: 8px;
     padding: 0.5rem;
     position: relative;
     transition: all 0.3s;
     display: flex;
     align-items: flex-start;
     justify-content: center;
     min-height: 60px;
     background: white;
}

.calendar-day.empty {
     background: #f5f5f5;
     cursor: default;
}

.calendar-day.today {
     border-color: #667eea;
     background: #f0f4ff;
}

.calendar-day.has-events {
     background: #e8f4fd;
     border-color: #667eea;
}

.calendar-day.has-events:hover {
     transform: scale(1.05);
     box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.day-number {
     font-weight: 600;
}

.event-indicator {
     position: absolute;
     bottom: 5px;
     right: 5px;
     background: #667eea;
     color: white;
     border-radius: 50%;
     width: 24px;
     height: 24px;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 0.8rem;
     font-weight: bold;
}

/* Liste des événements */
.event-list {
     display: grid;
     gap: 1rem;
}

.event-card {
     display: flex;
     background: #f8f9fa;
     border-radius: 10px;
     padding: 1rem;
     cursor: pointer;
     transition: all 0.3s;
     border: 2px solid transparent;
}

.event-card:hover {
     border-color: #667eea;
     box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
     transform: translateX(5px);
}

.event-date-badge {
     background: #667eea;
     color: white;
     border-radius: 8px;
     padding: 1rem;
     text-align: center;
     min-width: 70px;
     margin-right: 1rem;
     font-weight: bold;
     font-size: 1.5rem;
}

.event-date-badge span {
     display: block;
     font-size: 0.8rem;
     text-transform: uppercase;
}

.event-content h3 {
     color: #333;
     margin-bottom: 0.5rem;
}

.event-time,
.event-location {
     color: #666;
     font-size: 0.9rem;
     margin: 0.25rem 0;
}

/* Section d'affichage des événements par date */
.date-events-section {
     margin-top: 2rem;
     background: #f8f9fa;
     border-radius: 10px;
     padding: 1.5rem;
     border: 2px solid #667eea;
}

.date-events-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 1.5rem;
     padding-bottom: 1rem;
     border-bottom: 2px solid #667eea;
}

.date-events-header h3 {
     color: #667eea;
     margin: 0;
}

.btn-close-date {
     background: #ff4757;
     color: white;
     border: none;
     border-radius: 50%;
     width: 35px;
     height: 35px;
     font-size: 1.2rem;
     cursor: pointer;
     transition: all 0.3s;
     display: flex;
     align-items: center;
     justify-content: center;
}

.btn-close-date:hover {
     background: #ee3344;
     transform: rotate(90deg);
}

.date-events-list {
     display: grid;
     gap: 1.5rem;
}

.date-event-card {
     background: white;
     border-radius: 10px;
     padding: 1.5rem;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
     display: flex;
     gap: 1.5rem;
}

.date-event-time {
     background: #667eea;
     color: white;
     border-radius: 8px;
     padding: 1rem;
     text-align: center;
     font-weight: bold;
     min-width: 100px;
     height: fit-content;
     white-space: nowrap;
     line-height: 1.6;
}

.date-event-content {
     flex: 1;
}

.date-event-content h4 {
     color: #333;
     margin-bottom: 0.75rem;
     font-size: 1.3rem;
}

.date-event-location {
     color: #666;
     margin-bottom: 0.5rem;
     font-size: 0.95rem;
}

.date-event-description {
     color: #555;
     line-height: 1.6;
     margin-bottom: 1rem;
}

.date-event-video {
     position: relative;
     padding-bottom: 56.25%;
     height: 0;
     overflow: hidden;
     margin: 1rem 0;
     border-radius: 8px;
}

.date-event-video iframe {
     position: absolute;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     border-radius: 8px;
}

.date-event-actions {
     display: flex;
     gap: 1rem;
     margin-top: 1rem;
}

.btn-register-small,
.btn-details-small {
     padding: 0.5rem 1.25rem;
     border: none;
     border-radius: 6px;
     font-size: 0.9rem;
     font-weight: 600;
     cursor: pointer;
     transition: all 0.3s;
     text-decoration: none;
     display: inline-block;
}

.btn-register-small {
     background: #667eea;
     color: white;
}

.btn-register-small:hover {
     background: #5568d3;
     transform: translateY(-2px);
}

.btn-details-small {
     background: #95a5a6;
     color: white;
}

.btn-details-small:hover {
     background: #7f8c8d;
}

/* Modal */
.modal {
     display: none;
     position: fixed;
     z-index: 1000;
     left: 0;
     top: 0;
     width: 100%;
     height: 100%;
     background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
     background-color: white;
     margin: 5% auto;
     padding: 2rem;
     border-radius: 15px;
     width: 90%;
     max-width: 800px;
     max-height: 80vh;
     overflow-y: auto;
     position: relative;
}

.close {
     color: #aaa;
     float: right;
     font-size: 28px;
     font-weight: bold;
     cursor: pointer;
     line-height: 20px;
}

.close:hover {
     color: #000;
}

.video-container {
     position: relative;
     padding-bottom: 56.25%;
     height: 0;
     overflow: hidden;
     margin: 1rem 0;
}

.video-container iframe {
     position: absolute;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
}

/* Page Admin */
.admin-container {
     max-width: 1400px;
}

.pending-events {
     background: white;
     border-radius: 15px;
     padding: 2rem;
     margin-bottom: 2rem;
     box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.pending-events h2 {
     color: #ff4757;
     margin-bottom: 1.5rem;
}

.pending-list {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
     gap: 1rem;
}

.pending-card {
     background: #fff3cd;
     border: 2px solid #ffc107;
     border-radius: 10px;
     padding: 1rem;
}

.pending-card h3 {
     color: #333;
     margin-bottom: 0.5rem;
}

.pending-actions {
     margin-top: 1rem;
     display: flex;
     gap: 0.5rem;
     flex-wrap: wrap;
}

.pending-actions button {
     padding: 0.5rem 1rem;
     border: none;
     border-radius: 5px;
     cursor: pointer;
     font-weight: 600;
}

/* Tableau */
.all-events {
     background: white;
     border-radius: 15px;
     padding: 2rem;
     box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.all-events h2 {
     color: #667eea;
     margin-bottom: 1.5rem;
}

.events-table {
     width: 100%;
     border-collapse: collapse;
}

.events-table th {
     background: #667eea;
     color: white;
     padding: 1rem;
     text-align: left;
}

.events-table td {
     padding: 1rem;
     border-bottom: 1px solid #e0e0e0;
}

.events-table tr:hover {
     background: #f8f9fa;
}

.status-badge {
     padding: 0.25rem 0.75rem;
     border-radius: 20px;
     font-size: 0.9rem;
     font-weight: 600;
}

.status-approved {
     background: #d4edda;
     color: #155724;
}

.status-pending {
     background: #fff3cd;
     color: #856404;
}

.status-rejected {
     background: #f8d7da;
     color: #721c24;
}

.actions {
     display: flex;
     gap: 0.5rem;
}

.btn-edit,
.btn-delete {
     background: none;
     border: none;
     font-size: 1.5rem;
     cursor: pointer;
     transition: transform 0.2s;
}

.btn-edit:hover,
.btn-delete:hover {
     transform: scale(1.2);
}

/* Page de connexion */
.login-container {
     display: flex;
     justify-content: center;
     align-items: center;
     min-height: 100vh;
     padding: 2rem;
}

.login-box {
     background: white;
     border-radius: 15px;
     padding: 3rem;
     box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
     width: 100%;
     max-width: 400px;
}

.login-box h1 {
     color: #667eea;
     text-align: center;
     margin-bottom: 2rem;
}

.login-footer {
     text-align: center;
     margin-top: 1.5rem;
}

.login-footer a {
     color: #667eea;
     text-decoration: none;
}

.login-info {
     margin-top: 2rem;
     padding: 1rem;
     background: #f8f9fa;
     border-radius: 8px;
     font-size: 0.9rem;
}

.login-info p {
     margin: 0.25rem 0;
}

/* Responsive */
@media (max-width: 768px) {
     .form-row {
          grid-template-columns: 1fr;
     }

     .event-meta {
          flex-direction: column;
          gap: 0.5rem;
     }

     .calendar-grid {
          gap: 0.25rem;
     }

     .calendar-day {
          padding: 0.25rem;
          font-size: 0.9rem;
     }

     .pending-list {
          grid-template-columns: 1fr;
     }

     .events-table {
          font-size: 0.9rem;
     }

     .events-table th,
     .events-table td {
          padding: 0.5rem;
     }

     .date-event-card {
          flex-direction: column;
     }

     .date-event-time {
          width: 100%;
     }

     .date-event-actions {
          flex-direction: column;
     }

     .btn-register-small,
     .btn-details-small {
          width: 100%;
          text-align: center;
     }
}
