/* General Body Styles - Apply the dark, geometric background to all pages */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #1a2a46 0%, #004d40 100%); /* Dark blue/teal gradient */
  color: #e0e0e0; /* Light text color for readability */
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden; /* Hide horizontal overflow from abstract shapes */
}

/* Abstract geometric shapes (basic approximation for all pages) */
body::before,
body::after {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  background: rgba(0, 150, 136, 0.15); /* Semi-transparent teal, slightly less opaque */
  border-radius: 15px;
  transform: rotate(45deg);
  pointer-events: none;
  z-index: 0;
  filter: blur(5px); /* Slightly blur shapes for softer look */
}

body::before {
  top: -120px;
  left: -120px;
  transform: rotate(20deg) scale(1.3);
  box-shadow: 0 0 50px rgba(0, 150, 136, 0.3);
}

body::after {
  bottom: -120px;
  right: -120px;
  transform: rotate(60deg) scale(1.2);
  box-shadow: 0 0 50px rgba(0, 150, 136, 0.3);
}

/* Container for all main content blocks (forms, admin table) */
.container {
  max-width: 900px;
  margin: 40px auto;
  background-color: rgba(26, 42, 70, 0.25); /* Opacité du fond à 25% */
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
  flex-grow: 1;
}

h1 {
  text-align: center;
  color: #1abc9c;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 2em;
}

.container > p {
  text-align: center;
  margin-bottom: 25px;
  color: #cccccc;
  font-size: 1.1em;
}

.disclaimer {
  background-color: rgba(255, 193, 7, 0.2);
  border-left: 5px solid #ffc107;
  padding: 15px;
  margin-bottom: 25px;
  color: #ffeb3b;
  text-align: left;
  font-size: 0.95em;
  border-radius: 5px;
}

fieldset {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  padding: 20px;
  margin-bottom: 25px;
  background-color: rgba(0, 0, 0, 0.2); /* Légèrement plus foncé pour le contraste */
}

legend {
  font-weight: bold;
  color: #1abc9c;
  padding: 0 10px;
  margin-left: -10px;
  background-color: rgba(26, 42, 70, 0.25); /* Opacité du fond à 25% */
  border-radius: 3px;
  font-size: 1.1em;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #e0e0e0;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  width: calc(100% - 24px);
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  font-size: 1em;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #1abc9c;
  box-shadow: 0 0 8px rgba(26, 188, 156, 0.5);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-group input[type="checkbox"] {
  margin-right: 10px;
  accent-color: #1abc9c;
}

.checkbox-group label {
  display: inline-block;
  font-weight: normal;
  color: #e0e0e0;
}

button {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background-color: #1abc9c;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1.15em;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-top: 25px;
  font-weight: bold;
  letter-spacing: 0.5px;
  box-sizing: border-box;
}

button:hover {
  background-color: #16a085;
  transform: translateY(-2px);
}

.message {
  margin-top: 25px;
  padding: 15px;
  border-radius: 5px;
  text-align: center;
  font-weight: bold;
  font-size: 1.05em;
}

.message.success {
  background-color: rgba(40, 167, 69, 0.3);
  color: #90ee90;
  border: 1px solid #28a745;
}

.message.error {
  background-color: rgba(220, 53, 69, 0.3);
  color: #ffbaba;
  border: 1px solid #dc3545;
}

small {
  display: block;
  color: #bbbbbb;
  font-size: 0.85em;
  margin-top: 5px;
}

/* --- Admin Dashboard Specific Styles --- */
.filter-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 20px;
  background-color: rgba(0, 0, 0, 0.1);
  padding: 15px;
  border-radius: 5px;
}

.filter-controls > div {
  flex: 1;
  min-width: 200px;
}

.filter-controls label {
  font-weight: bold;
  margin-right: 8px;
  color: #e0e0e0;
  display: block;
  margin-bottom: 5px;
}

.filter-controls input[type="text"],
.filter-controls select {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  font-size: 0.9em;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-sizing: border-box;
}

.filter-controls input[type="text"]:focus,
.filter-controls select:focus {
  border-color: #1abc9c;
  box-shadow: 0 0 5px rgba(26, 188, 156, 0.5);
  outline: none;
}


.export-buttons {
  display: flex;
  gap: 15px;
  margin-left: auto;
  flex-wrap: wrap;
}

.export-buttons button {
  width: auto;
  flex-grow: 1;
  padding: 10px 18px;
  margin-top: 0;
  font-size: 0.95em;
  border-radius: 4px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.export-buttons .xls-btn {
  background-color: #27ae60;
}
.export-buttons .xls-btn:hover {
  background-color: #229954;
  transform: translateY(-1px);
}

.export-buttons .pdf-btn {
  background-color: #e74c3c;
}
.export-buttons .pdf-btn:hover {
  background-color: #c0392b;
  transform: translateY(-1px);
}

/* Table responsiveness: Wrapper for horizontal scrolling */
.table-responsive-container {
  overflow-x: auto;
  margin-top: 20px;
  -webkit-overflow-scrolling: touch;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
  border-radius: 5px;
}

.admin-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: 5px;
  overflow: hidden;
}

.admin-table th, .admin-table td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px;
  text-align: left;
  font-size: 0.9em;
  color: #e0e0e0;
}

.admin-table th {
  background-color: #1abc9c;
  color: white;
  font-weight: bold;
  cursor: default;
  white-space: nowrap;
}

.admin-table tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.1);
}

.admin-table tr:hover {
  background-color: rgba(0, 0, 0, 0.25);
}

/* --- Login Page Styles (Minimal Login) --- */
.customer-login-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh; /* Ensure it takes full viewport height for centering */
}

/* The .login-container now adopts the same padding, max-width and margin as .container */
.login-container {
  max-width: 900px; /* Same as .container */
  margin: 40px auto; /* Same as .container */
  padding: 40px; /* Same as .container */
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  text-align: center;
  width: 100%;
  position: relative;
  z-index: 1;
  /* No specific background-color here, the .minimal-login class will handle it */
}

/* Specific styles for the minimal login container */
.minimal-login {
  background-color: rgba(26, 42, 70, 0.25); /* Opacité du fond à 25% */
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
  /* Dimensions are now inherited from .login-container which matches .container */
}

.minimal-login .login-header {
  font-size: 2.2em;
  font-weight: bold;
  color: #1abc9c;
  margin-bottom: 30px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding-bottom: 0;
  border-bottom: none;
}

.minimal-login .input-group {
  position: relative;
  margin-bottom: 20px;
  border-bottom: none;
  padding-bottom: 0;
}

.minimal-login .input-group input {
  width: calc(100% - 40px);
  padding: 10px 0 10px 35px;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 1.2em;
  caret-color: #ffffff;
  text-align: center;
}

.minimal-login .input-group input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.minimal-login .input-group .icon {
  left: 50%;
  transform: translate(-50%, -50%);
  top: 50%;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5em;
}

.minimal-login .separator-line {
  width: 100%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.2);
  margin: 20px 0;
}

.minimal-login .options-group {
  display: none;
}

.minimal-login .login-button {
  background-color: #1abc9c;
  color: #ffffff;
  padding: 15px 0;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.3em;
  font-weight: bold;
  letter-spacing: 1.5px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  width: 100%;
  margin-top: 30px;
}

.minimal-login .login-button:hover {
  background-color: #16a085;
}

.minimal-login .error-message {
  color: #ffcccc;
  font-size: 0.9em;
  margin-top: 15px;
  margin-bottom: 15px;
  font-weight: bold;
}


/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
  .container {
      margin: 20px;
      padding: 25px;
  }

  h1 {
      font-size: 1.8em;
  }

  .container > p {
      font-size: 1em;
  }
}

@media (max-width: 768px) {
  body::before, body::after {
      width: 250px;
      height: 250px;
      filter: blur(3px);
  }
  body::before {
      top: -80px;
      left: -80px;
  }
  body::after {
      bottom: -80px;
      right: -80px;
  }

  .container {
      margin: 15px;
      padding: 20px;
  }

  h1 {
      font-size: 1.6em;
      letter-spacing: 1px;
  }

  .container > p {
      font-size: 0.95em;
  }

  legend {
      font-size: 1em;
      margin-left: -5px;
      background-color: rgba(26, 42, 70, 0.25); /* Maintenir l'opacité sur mobile */
  }

  .form-group label {
      font-size: 0.95em;
  }

  .form-group input[type="text"],
  .form-group input[type="tel"],
  .form-group select,
  .form-group textarea {
      padding: 10px;
      font-size: 0.95em;
  }

  button {
      padding: 12px 15px;
      font-size: 1em;
  }

  .filter-controls {
      flex-direction: column;
      align-items: stretch;
      gap: 15px;
      padding: 12px;
  }
  .filter-controls > div {
      min-width: unset;
      width: 100%;
  }

  .export-buttons {
      flex-direction: column;
      width: 100%;
      margin-left: 0;
  }
  .export-buttons button {
      width: 100%;
  }

  .admin-table th, .admin-table td {
      padding: 8px;
      font-size: 0.8em;
  }

  .login-container {
      max-width: 90%;
      padding: 30px 25px;
      margin: auto; /* Ensure it stays centered even with max-width */
  }

  .minimal-login .login-header {
      font-size: 1.8em;
      letter-spacing: 1px;
      margin-bottom: 25px;
  }
  .minimal-login .input-group input {
      font-size: 1.1em;
  }
  .minimal-login .input-group .icon {
      font-size: 1.2em;
  }
  .minimal-login .separator-line {
      margin: 15px 0;
  }
  .minimal-login .login-button {
      padding: 12px 0;
      font-size: 1.1em;
      margin-top: 25px;
  }
}

@media (max-width: 480px) {
  body::before, body::after {
      width: 200px;
      height: 200px;
  }
  body::before {
      top: -60px;
      left: -60px;
  }
  body::after {
      bottom: -60px;
      right: -60px;
  }

  .container {
      margin: 10px;
      padding: 15px;
  }
  h1 {
      font-size: 1.4em;
  }
  .container > p {
      font-size: 0.9em;
  }
  .disclaimer {
      padding: 10px;
      font-size: 0.85em;
  }
  fieldset {
      padding: 15px;
  }
  legend {
      font-size: 0.95em;
  }
  .admin-table th, .admin-table td {
      font-size: 0.75em;
      padding: 6px;
  }

  .minimal-login {
      padding: 25px;
  }
  .minimal-login .login-header {
      font-size: 1.5em;
      margin-bottom: 20px;
  }
  .minimal-login .input-group input {
      font-size: 1em;
  }
  .minimal-login .input-group .icon {
      font-size: 1em;
  }
  .minimal-login .separator-line {
      margin: 10px 0;
  }
  .minimal-login .login-button {
      padding: 10px 0;
      font-size: 1em;
      margin-top: 20px;
  }
}