/* Styles pour la page add-event.html */
.add-event-container {
  max-width: 800px;
  margin: 6rem auto;
  padding: 30px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.add-event-container h1 {
  font-size: 32px;
  color: #333;
  margin-bottom: 30px;
  text-align: center;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 15px;
}

.form-section {
  margin-bottom: 30px;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 6px;
}

.form-section h2 {
  font-size: 22px;
  color: #444;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.form-section h2 i {
  margin-right: 10px;
  color: #bb0b0b;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #BB0B0B;
  box-shadow: 0 0 0 2px rgba(187, 11, 11, 0.1);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-group .hint {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  color: #777;
}

.form-group .date-picker {
  display: flex;
  gap: 20px;
}

.form-group .date-field {
  flex: 1;
}

.form-check {
  margin-bottom: 15px;
}

.form-check label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: auto;
  margin-right: 10px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
}

.btn-submit {
  background-color: #BB0B0B;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-submit:hover {
  background-color: #9e0a0a;
}

.required-fields {
  font-size: 14px;
  color: #777;
}

/* Styles pour les lignes de formulaire */
.form-row {
  display: flex;
  gap: 20px;
}

.form-group.half {
  flex: 1;
  width: 50%;
}

.helper-text {
  color: #777;
  font-size: 13px;
  margin-top: 5px;
}

/* Afficher le loader pendant la soumission */
.loader {
  display: none;
  margin: 20px auto;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #BB0B0B;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Messages de succès et d'erreur */
.success-message, .error-message {
  padding: 15px;
  border-radius: 5px;
  margin-top: 20px;
  font-weight: 500;
}

.success-message {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Espace pour éviter le chevauchement avec la barre de recherche */
.spacer {
  height: 50px;
}
/* Styles pour les lignes de formulaire */
.form-row {
  display: flex;
  gap: 20px;
}

.form-group.half {
  flex: 1;
  width: 50%;
}

.helper-text {
  color: #777;
  font-size: 13px;
  margin-top: 5px;
}

/* Afficher le loader pendant la soumission */
.loader {
  display: none;
  margin: 20px auto;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #BB0B0B;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Messages de succès et d'erreur */
.success-message, .error-message {
  padding: 15px;
  border-radius: 5px;
  margin-top: 20px;
  font-weight: 500;
}

.success-message {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Espace pour éviter le chevauchement avec la barre de recherche */
.spacer {
  height: 50px;
}

/* Styles pour l'upload d'image */
.image-upload-container {
  margin-top: 10px;
}

.upload-tabs {
  display: flex;
  margin-bottom: 15px;
  border-bottom: 1px solid #ddd;
}

.tab-btn {
  padding: 10px 15px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
  color: #666;
}

.tab-btn.active {
  border-bottom: 2px solid #BB0B0B;
  color: #BB0B0B;
}

.tab-btn:hover {
  background-color: #f5f5f5;
}

.tab-content {
  padding: 15px 0;
}

/* Zone de glisser-déposer */
.drop-zone {
  border: 2px dashed #ccc;
  border-radius: 5px;
  padding: 25px;
  text-align: center;
  margin-bottom: 15px;
  transition: all 0.3s;
  cursor: pointer;
  background-color: #f9f9f9;
  position: relative;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: #BB0B0B;
  background-color: rgba(187, 11, 11, 0.05);
}

.drop-zone-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.drop-zone-prompt i {
  font-size: 32px;
  color: #BB0B0B;
  margin-bottom: 10px;
}

.image-preview {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
}

.image-preview img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
}

.remove-image {
  position: absolute;
  top: -10px;
  right: -10px;
  background-color: #BB0B0B;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Masquer l'input file natif */
#event-image-file {
  display: none;
}

/* Barre de progression */
.upload-progress {
  margin-top: 15px;
}

.progress-bar {
  height: 10px;
  background-color: #f0f0f0;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 5px;
}

.progress-bar-fill {
  height: 100%;
  background-color: #BB0B0B;
  width: 0%;
  transition: width 0.3s ease-in-out;
}

.progress-text {
  text-align: center;
  font-size: 12px;
  color: #666;
}

.upload-result {
  margin-top: 10px;
  font-size: 14px;
}

.upload-result.success {
  color: #28a745;
}

.upload-result.error {
  color: #dc3545;
}
