/* --- RESET DE BASE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.5;
}

/* --- CONTAINER --- */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

/* --- TITRES --- */
h1, h2, h3 {
  color: #2a6fd3;
  margin-bottom: 1rem;
}

h1 {
  text-align: center;
  font-size: 2rem;
}

/* --- MENU --- */
.menu {
  background: #2a6fd3;
  padding: 0.5rem 1rem;
}
.menu ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 0;
  padding: 0;
}
.menu li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: background 0.2s;
}
.menu li a.active,
.menu li a:hover {
  background: #1d4fa3;
}

/* --- FORMULAIRES --- */
.form-container,
.login-form,
.add-activity {
  background: #fff;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin: 2rem auto;
  max-width: 450px;
}

form label {
  display: block;
  margin: 0.5rem 0 0.2rem;
  font-weight: bold;
}

form input,
form select,
form textarea {
  width: 100%;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin-bottom: 1rem;
}

form button {
  width: 100%;
  background: #2a6fd3;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

form button:hover {
  background: #1e4c9c;
}

.error,
.info {
  text-align: center;
  color: red;
  margin-bottom: 1rem;
}

/* --- DASHBOARD / TABLES --- */
.trip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.trip-card,
.activity-card,
.add-payment,
.file-upload {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.trip-card:hover,
.activity-card:hover {
  transform: translateY(-4px);
}

.trip-card h2,
.activity-card h3 {
  margin-bottom: 0.5rem;
}

.trip-card a,
.btn,
.add-participant button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #2a6fd3;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}

.trip-card a:hover,
.btn:hover,
.add-participant button:hover {
  background: #1d4fa3;
}

.payment-table,
.dashboard-table,
.trip-table,
.participant-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.payment-table th,
.dashboard-table th,
.trip-table th,
.participant-table th,
.payment-table td,
.dashboard-table td,
.trip-table td,
.participant-table td {
  border: 1px solid #ccc;
  padding: 0.6rem;
  text-align: center;
}

.payment-table th,
.dashboard-table th,
.trip-table th,
.participant-table th {
  background: #f3f6fa;
}

/* --- ACTIVITÉS / FICHIERS --- */
.activity-list,
.file-list ul {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.activity-list li,
.file-list li {
  padding: 0.6rem;
  background: #f8faff;
  margin-bottom: 0.5rem;
  border-radius: 8px;
}

.file-list li a {
  color: #2a6fd3;
  text-decoration: none;
  font-weight: 500;
}

.file-list li .meta {
  font-size: 0.85rem;
  color: #777;
  margin-top: 0.3rem;
}

/* --- BOUTONS SECONDAIRES --- */
.btn-secondary {
  display: inline-block;
  background: #ddd;
  color: #000;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-secondary:hover {
  background: #ccc;
}

/* --- SUPPRESSION --- */
.delete-btn {
  background: none;
  border: none;
  color: #d33;
  cursor: pointer;
  font-size: 1.2rem;
  margin-left: 0.5rem;
  transition: transform 0.2s;
}
.delete-btn:hover {
  transform: scale(1.2);
}

/* --- AJOUT PARTICIPANT --- */
.add-participant select {
  padding: 0.4rem;
  margin-right: 0.5rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  .form-container,
  .login-form,
  .add-activity {
    padding: 1rem;
    max-width: 90%;
  }
  .trip-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  .menu ul {
    flex-direction: column;
    align-items: center;
  }
}
