/* ==========================================================
   MPP OPERATIONS CENTER
   Style principal
   Thème : Militaire + World of Tanks
   ========================================================== */


/* ------------------------------
   Base générale
------------------------------ */

body {
  margin: 0;
  min-height: 100vh;
  background: #1E1E1E;
  color: #EAEAEA;
  font-family: Arial, sans-serif;

  display: flex;
  justify-content: center;
  align-items: center;
}


/* ------------------------------
   Carte principale dynamique
------------------------------ */

.login-card {
  background: #2A2A2A;
  border: 2px solid #4B6B3C;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);

  width: 420px;
  max-width: 95vw;
}

/* Mode large : utilisé pour l’espace officier et les tableaux */
.login-card.mode-large {
  width: 95vw;
  max-width: 1600px;
  min-height: 80vh;
}


/* ------------------------------
   Logo / en-tête
------------------------------ */

.logo-zone {
  text-align: center;
  margin-bottom: 30px;
}

.logo-mpp {

  width: 140px;
  height: 140px;

  object-fit: contain;

  display: block;

  margin: 0 auto 15px auto;

  border-radius: 12px;

}

h1 {
  margin: 0;
  color: #FF6A00;
}

h2 {
  color: #FF6A00;
  text-align: center;
}

h3 {
  margin-bottom: 5px;
  color: #EAEAEA;
}

p {
  color: #CFCFCF;
}


/* ------------------------------
   Formulaires
------------------------------ */

.form-zone {
  width: 100%;
}

label {
  display: block;
  margin-bottom: 8px;
}

input,
select {
  width: 100%;
  padding: 12px;
  box-sizing: border-box;

  border: 1px solid #4B6B3C;
  border-radius: 6px;

  background: #1E1E1E;
  color: #EAEAEA;

  margin-bottom: 15px;
}


/* ------------------------------
   Boutons
------------------------------ */

button {
  width: 100%;
  padding: 12px;
  margin-top: 8px;

  background: #FF6A00;
  color: white;

  border: none;
  border-radius: 6px;

  font-weight: bold;
  cursor: pointer;
}

button:hover {
  background: #ff8126;
}

.secondary-button {
  background: #4B6B3C;
}

.secondary-button:hover {
  background: #5f854b;
}


/* ------------------------------
   Messages
------------------------------ */

#message {
  margin-top: 15px;
  text-align: center;
}

.error {
  color: #ff5555;
  text-align: center;
}

.small-link {
  text-align: center;
  margin-top: 18px;
  cursor: pointer;
  color: #CFCFCF;
  text-decoration: underline;
}


/* ------------------------------
   Cartes compétition / dates
------------------------------ */

.competition-card,
.date-card,
.recap-box {
  border: 1px solid #4B6B3C;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background: #1E1E1E;
}

.select-statut {
  width: 100%;
  padding: 10px;
  background: #2A2A2A;
  color: #EAEAEA;
  border: 1px solid #4B6B3C;
  border-radius: 6px;
}


/* ------------------------------
   Tableau officier
------------------------------ */

.table-container {
  width: 100%;
  overflow-x: visible;
  margin-top: 20px;
}

.presence-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.presence-table th,
.presence-table td {
  border: 1px solid #4B6B3C;
  padding: 10px;
  text-align: center;
  vertical-align: middle;
}

.presence-table th {
  background: #1E1E1E;
  color: #FF6A00;
  font-weight: bold;
}

.presence-table tr:nth-child(even) {
  background: #242424;
}

.presence-table td:first-child,
.presence-table th:first-child {
  width: 160px;
  text-align: left;
}

.presence-table td:last-child,
.presence-table th:last-child {
  width: 140px;
}


/* ------------------------------
   Boutons sous tableau
------------------------------ */

.table-actions {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.table-actions button {
  flex: 1;
}


/* ------------------------------
   Responsive sécurité
------------------------------ */

@media (max-width: 900px) {
  body {
    align-items: flex-start;
    padding: 20px;
  }

  .login-card,
  .login-card.mode-large {
    width: 95vw;
    min-height: auto;
  }

  .presence-table {
    table-layout: auto;
  }

  .table-container {
    overflow-x: auto;
  }

  .table-actions {
    flex-direction: column;
  }
}

.stats-box {
  border: 1px solid #4B6B3C;
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
  margin-bottom: 20px;
  background: #1E1E1E;
}

.stats-box h3 {
  color: #FF6A00;
  margin-top: 0;
}

#modal-overlay {
  position: fixed;
  top: 0;
  left: 0;

  width: 100vw;
  height: 100vh;

  background: rgba(0, 0, 0, 0.75);

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 9999;
}

.modal-box {
  width: 420px;
  max-width: 90vw;

  background: #2A2A2A;
  border: 2px solid #4B6B3C;
  border-radius: 12px;

  padding: 25px;

  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
  text-align: center;
}

.modal-box h2 {
  color: #FF6A00;
  margin-top: 0;
}

.modal-box p {
  color: #EAEAEA;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.modal-actions button {
  flex: 1;
}

.roles-selection {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.checkbox-role {
  display: flex;
  align-items: center;
  gap: 8px;

  background: #1E1E1E;
  border: 1px solid #4B6B3C;
  border-radius: 6px;

  padding: 10px 15px;
  cursor: pointer;
}

.checkbox-role input {
  width: auto;
  margin: 0;
}

#version-site {

  margin-top: 10px;

  font-size: 12px;

  color: #AAAAAA;

  text-align: center;

}

.date-admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 15px;

  border: 1px solid #4B6B3C;
  border-radius: 8px;

  background: #1E1E1E;

  padding: 12px;
  margin-bottom: 10px;
}

.date-admin-row span {
  color: #EAEAEA;
}

.danger-button {
  background: #8B1E1E;
  width: auto;
  min-width: 130px;
}

.danger-button:hover {
  background: #A52828;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 25px;
  margin-bottom: 25px;
}

.dashboard-card {
  background: #1E1E1E;
  border: 1px solid #4B6B3C;
  border-radius: 10px;
  padding: 18px;
}

.dashboard-card h3 {
  color: #FF6A00;
  margin-top: 0;
}

.dashboard-card p {
  margin: 8px 0;
}

@media (max-width: 1000px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.horaires-zone {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #4B6B3C;
  border-radius: 8px;
  background: #151515;
}

.horaires-selection {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}