/* ========================================== */
/* STRUCTURE DE BASE - SORTIES */
/* Pas de couleurs ici, uniquement la structure */
/* ========================================== */

body {
  background-image: url('body_photo.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.sortie-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 120px 20px 40px 20px;
}

.sortie-header {
  text-align: center;
  margin-bottom: 40px;
}

.sortie-header h1 {
  font-size: 3em;
  margin-bottom: 10px;
}

.sortie-header h1 .emoji {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
}

.sortie-header h1 .gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.btn-create-sortie {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0 30px;
  border: none;
  border-radius: 60px;
  font-size: 1.15em;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  height: 64px;
  white-space: nowrap;
  font-weight: 500;
}

.btn-create-sortie:hover {
  transform: translateY(-2px);
}

/* Filtres */
.sortie-filters {
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.sortie-search-container {
  position: relative;
  width: 100%;
  max-width: 650px;
}

.sortie-search-input {
  width: 100%;
  padding: 0 70px 0 50px;
  height: 64px;
  border-radius: 60px;
  font-size: 1.15em;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.sortie-search-input:focus {
  outline: none;
  transform: translateY(-3px) scale(1.01);
}

.sortie-search-input::placeholder {
  font-weight: 400;
  letter-spacing: 0.5px;
}

.sortie-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  font-size: 1.4em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.sortie-search-btn:hover {
  transform: translateY(-50%) scale(1.15);
}

.sortie-search-btn:active {
  transform: translateY(-50%) scale(0.9);
}

/* Animation de pulsation subtile */
@keyframes searchPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(102, 126, 234, 0);
  }
}

.sortie-search-input:focus + .sortie-search-btn {
  animation: searchPulse 2s infinite;
}

/* Grille de sorties */
.sorties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 25px;
  margin-top: 30px;
  justify-content: center;
}

/* Desktop : centrer les cartes quand elles ne remplissent pas toute la ligne */
@media (min-width: 768px) {
  .sorties-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 420px));
  }
}

.sortie-card {
  border-radius: 15px;
  padding: 25px;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}

.sortie-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  margin-bottom: 0;
  gap: 10px;
}

.sortie-datetime {
  background: #28a745;
  color: white;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.85em;
  white-space: nowrap;
}

.sortie-location {
  background: #17a2b8;
  color: white;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.85em;
  white-space: nowrap;
}

.sortie-creator-info {
  font-style: italic;
  opacity: 0.9;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.sortie-card:hover {
  transform: translateY(-5px);
}

.sortie-card h3 {
  margin-bottom: 15px;
  font-size: 1.5em;
}

.sortie-card-clickable {
  cursor: pointer;
  user-select: none;
  transition: opacity 0.3s;
  text-align: center;
}

.sortie-card-clickable:hover {
  opacity: 0.8;
}

.sortie-details {
  margin-top: 15px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
  }
  to {
    opacity: 1;
    max-height: 1000px;
    overflow: visible;
  }
}

.sortie-stats-preview {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  margin: 15px 0;
  padding: 12px;
  border-radius: 10px;
}

.sortie-stats-preview .stat {
  font-size: 0.95em;
}

.btn-voir-mini {
  min-width: 80px;
  padding: 8px 12px;
  font-size: 0.9em;
}

.sortie-voir-container {
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  user-select: none;
}

.sortie-voir-emoji {
  display: inline-block;
  transform: translateY(-1px);
}

.sortie-voir-link {
  text-decoration: underline;
  font-size: 1em;
  transition: opacity 0.3s;
}

.sortie-voir-container:hover .sortie-voir-link {
  opacity: 0.7;
}

.sortie-expand-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  margin-top: 15px;
  border-top: 1px solid rgba(102, 126, 234, 0.2);
  cursor: pointer;
  transition: all 0.3s;
  user-select: none;
  font-size: 0.9em;
  opacity: 0.7;
}

.sortie-expand-hint:hover {
  opacity: 1;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 8px;
}

.sortie-expand-arrow {
  font-size: 1.2em;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
  60% {
    transform: translateY(-3px);
  }
}

.sortie-info {
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sortie-adresse-link {
  text-decoration: underline;
  cursor: pointer;
  transition: opacity 0.3s;
  color: inherit;
}

.sortie-adresse-link:hover {
  opacity: 0.7;
}

.sortie-description {
  margin: 15px 0;
  line-height: 1.6;
}

.sortie-stats {
  display: flex;
  gap: 20px;
  margin: 20px 0;
  padding: 15px;
  border-radius: 10px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1em;
}

.stat-participe {
  color: #28a745;
}

.stat-reflechit {
  color: #ffc107;
}

.sortie-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  align-items: stretch;
}

.sortie-actions {
  display: flex;
  gap: 10px;
  flex: 1;
}

.btn-participe, .btn-reflechit, .btn-annuler, .btn-voir-participants {
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.sortie-actions .btn-participe,
.sortie-actions .btn-reflechit,
.sortie-actions .btn-annuler {
  flex: 1;
}

.btn-voir-participants {
  min-width: 100px;
  white-space: nowrap;
}

.btn-delete-sortie {
  margin-top: 10px;
  width: 100%;
}

.btn-participe {
  background: #28a745;
  color: white;
}

.btn-participe:hover {
  background: #218838;
}

.btn-participe.active {
  background: #1e7e34;
  border: 2px solid #155724;
}

.btn-reflechit {
  background: #ffc107;
  color: #333;
}

.btn-reflechit:hover {
  background: #e0a800;
}

.btn-reflechit.active {
  background: #d39e00;
  border: 2px solid #b38600;
}

.btn-annuler {
  background: #dc3545;
  color: white;
}

.btn-annuler:hover {
  background: #c82333;
}

.btn-voir-participants {
  background: #17a2b8;
  color: white;
}

.btn-voir-participants:hover {
  background: #138496;
}

/* Modal */
.sortie-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.sortie-modal-content {
  margin: 50px auto;
  padding: 30px;
  border-radius: 15px;
  width: 90%;
  max-width: 600px;
}

.sortie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
}

.sortie-modal-header h2 {
  margin: 0;
}

.sortie-modal-close {
  font-size: 2em;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.sortie-form-group {
  margin-bottom: 20px;
}

.sortie-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.sortie-form-group input,
.sortie-form-group textarea,
.sortie-form-group select {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-size: 1em;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.sortie-form-group input:focus,
.sortie-form-group textarea:focus,
.sortie-form-group select:focus {
  outline: none;
}

.sortie-form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.sortie-btn-submit {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.sortie-btn-submit:hover {
  transform: translateY(-2px);
}

.no-sorties {
  text-align: center;
  padding: 60px 20px;
  font-size: 1.2em;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  margin-top: -100px;
}

.loading {
  text-align: center;
  padding: 40px;
  font-size: 1.2em;
}

.participants-list {
  max-height: 400px;
  overflow-y: auto;
}

.participant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 8px;
}

.participant-name {
  font-weight: 500;
}

.participant-status {
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.9em;
  font-weight: 500;
}

.status-participe {
  background: #28a745;
  color: white;
}

.status-reflechit {
  background: #ffc107;
  color: #333;
}

.btn-map-mini {
  margin-left: 10px;
  padding: 5px 12px;
  background: #17a2b8;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background 0.3s;
}

.btn-map-mini:hover {
  background: #138496;
}

/* Style pour l'autocomplétion Google */
.pac-container {
  z-index: 10000 !important;
}

/* Notifications Toast */
.sortie-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 16px 24px;
  border-radius: 10px;
  font-size: 1em;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease-out;
  max-width: 400px;
  word-wrap: break-word;
}

.sortie-toast-show {
  opacity: 1;
  transform: translateY(0);
}

.sortie-toast-success {
  background: #28a745;
  color: white;
}

.sortie-toast-error {
  background: #dc3545;
  color: white;
}

.sortie-toast-warning {
  background: #ffc107;
  color: #333;
}

/* Modal de confirmation de suppression */
.sortie-confirm-modal {
  max-width: 500px;
}

.sortie-confirm-content {
  padding: 20px 0;
  text-align: center;
}

.sortie-confirm-content p {
  font-size: 1.1em;
  margin: 10px 0;
}

.sortie-confirm-warning {
  font-size: 0.95em;
  opacity: 0.8;
  font-style: italic;
}

.sortie-confirm-actions {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.sortie-btn-cancel,
.sortie-btn-confirm-delete {
  flex: 1;
  padding: 15px;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.sortie-btn-cancel {
  background: #6c757d;
  color: white;
}

.sortie-btn-cancel:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

.sortie-btn-confirm-delete {
  background: #dc3545;
  color: white;
}

.sortie-btn-confirm-delete:hover {
  background: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}
