/* Base styles */
body {
  font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f0f4f8; 
  color: #333;
  margin: 0;
  padding: 20px;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-top: 4px solid #0056b3; 
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 30px;
  padding: 30px;
  background-color: #0056b3; 
  background-image: linear-gradient(135deg, #0056b3, #003366);
  border-radius: 12px;
  color: white;
  position: relative;
}

.header h1 {
  margin: 0;
  font-size: 2.5em;
  text-transform: uppercase;
  letter-spacing: 1px;
}


.header nav {
  margin-top: 15px;
}

.header nav a {
  margin: 0 10px;
  color: white;
  text-decoration: none;
  font-size: 1.1em;
  font-weight: 500;
  transition: all 0.3s;
  padding: 5px 10px;
  border-radius: 4px;
}

.header nav a:hover {
  background-color: rgba(255, 255, 255, 0.15);
  opacity: 1;
}

/* Filters */
.filters {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #0056b3;
}

.filters select,
.filters input {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s;
}

.filters select:focus,
.filters input:focus {
  border-color: #0056b3;
  box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.2);
  outline: none;
}

.filters button {
  padding: 10px 20px;
  border: none;
  background-color: #0056b3; /* Bleu assorti au header */
  color: white;
  cursor: pointer;
  border-radius: 8px;
  font-weight: bold;
  transition: all 0.3s;
}

.filters button:hover {
  background-color: #003d80;
  transform: translateY(-2px);
}

/* Table styles */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  background-color: white;
}

th, td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background-color: #e9f0f8; /* Fond bleuté léger */
  color: #0056b3;
  font-weight: 600;
  font-size: 1.1em;
  border-bottom: 2px solid #0056b3;
}

tr:hover {
  background-color: #f5f9ff;
}

tr:last-child td {
  border-bottom: none;
}

/* Buttons */
.action-buttons {
  display: flex;
  gap: 12px;
}

.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s;
}

.btn-primary { background-color: #0056b3; color: white; } 
.btn-success { background-color: #21a945; color: white; } 
.btn-info { background-color: #17a2b8; color: white; }
.btn-warning { background-color: #ffc107; color: #333; }
.btn-danger { background-color: #dc3545; color: white; }

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border-top: 4px solid #0056b3;
}

.close {
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
  transition: color 0.3s;
}

.close:hover {
  color: #0056b3;
}

/* Modal grid and details */
.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.modal-grid div {
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.detail-row {
  display: flex;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.detail-label {
  font-weight: 600;
  width: 220px;
  color: #0056b3;
}

.detail-value {
  flex: 1;
}

/* Form elements */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 1.1em;
  font-weight: 500;
  color: #0056b3;
}

.form-group input,
.form-group select {
  width: 95%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
  transition: all 0.3s;
  background-color: #f9fbfd;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #0056b3;
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
  outline: none;
  background-color: white;
}

/* Document display */
.document-image {
  max-width: 300px;
  max-height: 200px;
  width: auto;
  height: auto;
  margin-top: 10px;
  object-fit: contain;
  transition: transform 0.3s ease;
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.document-image:hover {
  transform: scale(2);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.document-pdf {
  width: 100%;
  height: 500px;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Loading indicators */
.spinner,
.loader {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: #0056b3;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-left: 10px;
}

.loader {
  width: 16px;
  height: 16px;
  border-width: 3px;
  border-top-color: white;
  border-left-color: rgba(255, 255, 255, 0.3);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Payment history section */
.payment-history {
  margin-top: 30px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 10px;
  border-left: 4px solid #0056b3;
}

.payment-history h3 {
  margin-bottom: 15px;
  font-size: 1.3em;
  color: #0056b3;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

/* Ajouter un logo */
.logo {
  max-height: 80px;
  margin-bottom: 15px;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  color: #666;
  font-size: 0.9em;
  border-top: 1px solid #eee;
}