/* === STYLE PRINCIPAL — School Battle Platform === */

/* --- Reset & Base --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #0f1923;
  color: #e0e0e0;
  line-height: 1.6;
}

/* --- Navigation --- */
nav {
  background: linear-gradient(135deg, #1a2a3a, #243447);
  padding: 15px 30px;
  display: flex;
  align-items: center;
  gap: 30px;
  border-bottom: 3px solid #00d4ff;
  box-shadow: 0 2px 15px rgba(0, 212, 255, 0.2);
}

nav .logo {
  font-size: 1.5em;
  font-weight: bold;
  color: #00d4ff;
  text-decoration: none;
}

nav .logo span {
  color: #ff6b35;
}

nav a {
  color: #b0bec5;
  text-decoration: none;
  font-size: 0.95em;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.3s;
}

nav a:hover,
nav a.active {
  color: #ffffff;
  background-color: rgba(0, 212, 255, 0.15);
}

/* --- Container principal --- */
.container {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
}

/* --- Titres --- */
h1 {
  font-size: 1.8em;
  color: #00d4ff;
  margin-bottom: 10px;
}

h2 {
  font-size: 1.3em;
  color: #ff6b35;
  margin-bottom: 15px;
  margin-top: 30px;
}

.subtitle {
  color: #78909c;
  margin-bottom: 25px;
}

/* --- Cartes / Sections --- */
.card {
  background: #1a2a3a;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid #2a3a4a;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* --- Formulaire d'upload --- */
.upload-zone {
  border: 2px dashed #3a4a5a;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
}

.upload-zone:hover {
  border-color: #00d4ff;
  background: rgba(0, 212, 255, 0.05);
}

.upload-zone input[type="file"] {
  display: none;
}

.upload-zone label {
  cursor: pointer;
  display: block;
}

.upload-zone .icon {
  font-size: 3em;
  margin-bottom: 10px;
}

/* --- Boutons --- */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  color: #0f1923;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #ff4757, #c0392b);
  color: #ffffff;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

.btn-small {
  padding: 5px 12px;
  font-size: 0.85em;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* --- Messages de feedback --- */
.message {
  padding: 12px 20px;
  border-radius: 8px;
  margin: 15px 0;
  display: none;
}

.message.success {
  background: rgba(46, 213, 115, 0.15);
  border: 1px solid #2ed573;
  color: #2ed573;
  display: block;
}

.message.error {
  background: rgba(255, 71, 87, 0.15);
  border: 1px solid #ff4757;
  color: #ff4757;
  display: block;
}

/* --- Filtres --- */
.filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filters select {
  background: #243447;
  color: #e0e0e0;
  border: 1px solid #3a4a5a;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.95em;
}

/* --- Tableau de questions --- */
.questions-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.questions-table th {
  background: #243447;
  color: #00d4ff;
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.questions-table td {
  padding: 10px 15px;
  border-bottom: 1px solid #2a3a4a;
  font-size: 0.9em;
}

.questions-table tr:hover td {
  background: rgba(0, 212, 255, 0.05);
}

.questions-table .correct {
  color: #2ed573;
  font-weight: bold;
}

/* Badge discipline */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-maths { background: #574b90; color: #d2b4ff; }
.badge-histoire { background: #6b4226; color: #ffb87a; }
.badge-français { background: #1e6b5a; color: #7fffd4; }
.badge-géographie { background: #2a6496; color: #87ceeb; }
.badge-sciences { background: #5a6b1e; color: #c8e67e; }
.badge-default { background: #4a4a5a; color: #c0c0c0; }

/* --- Compteur --- */
.counter {
  font-size: 1.1em;
  color: #78909c;
  margin-bottom: 15px;
}

.counter strong {
  color: #00d4ff;
  font-size: 1.3em;
}

/* --- Stats d'accueil --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.stat-card {
  background: linear-gradient(135deg, #1a2a3a, #243447);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  border: 1px solid #2a3a4a;
}

.stat-card .number {
  font-size: 2.5em;
  font-weight: bold;
  color: #00d4ff;
}

.stat-card .label {
  color: #78909c;
  margin-top: 5px;
  font-size: 0.9em;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    gap: 10px;
  }

  .questions-table {
    font-size: 0.8em;
  }

  .questions-table th,
  .questions-table td {
    padding: 8px 6px;
  }
}
