/* style_devis.css - Version modernisée Glass UI */

body {
  font-family: "Segoe UI", sans-serif;
  background: linear-gradient(to bottom, #ecf0f3, #e6ebf1);
  margin: 0;
  padding: 0;
  font-size: 15px;
  color: #2d3436;
}

header {
  background: #1e272e;
  color: white;
  padding: 14px 25px;
  font-size: 24px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.container {
  max-width: 1100px;
  margin: 40px auto;
  background: rgba(255, 255, 255, 0.9);
  padding: 30px 40px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.07);
  backdrop-filter: blur(8px);
}

label {
  font-weight: 600;
  display: block;
  margin: 15px 0 5px;
  color: #34495e;
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  margin-bottom: 15px;
  border: 1px solid #dcdde1;
  border-radius: 8px;
  background: white;
  transition: border 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #3498db;
  outline: none;
  background: #ecf9ff;
}

textarea {
  resize: vertical;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

th, td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f0f3f7;
  font-weight: bold;
  border-bottom: 2px solid #dcdde1;
}

td {
  border-bottom: 1px solid #ecf0f1;
}

.button,
.button_green,
.button_grey {
  padding: 8px 18px;
  font-size: 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  text-decoration: none;
  font-weight: 500;
}

.button {
  background: #3498db;
  color: white;
}

.button:hover {
  background: #2980b9;
  transform: translateY(-1px);
}

.button_green {
  background: #27ae60;
  color: white;
}

.button_green:hover {
  background: #1e8449;
  transform: translateY(-1px);
}

.button_grey {
  background: #7f8c8d;
  color: white;
}

.button_grey:hover {
  background: #636e72;
  transform: translateY(-1px);
}

.danger {
  background: #e74c3c;
  color: white;
}

.danger:hover {
  background: #c0392b;
}

.piece-block {
  border: 1px solid #dfe6e9;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 30px;
  background: #f9f9f9;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.piece-block h3 {
  margin-top: 0;
  color: #2c3e50;
}

.actions {
  margin-top: 20px;
  display: flex;
  gap: 15px;
}

.group-desc {
  background: #f4f6f9;
  padding: 12px 15px;
  border-radius: 6px;
  font-size: 14px;
  color: #2d3436;
  margin-top: 10px;
  line-height: 1.5;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}

.total-cell {
  font-weight: bold;
  font-size: 16px;
  text-align: right;
  padding-right: 10px;
  color: #2c3e50;
}

.row-button {
  text-align: center;
}

.row-button button {
  margin: 0 auto;
}

.form-actions {
  margin-top: 40px;
}

.modal-content {
  background: white;
  padding: 20px 25px;
  border-radius: 12px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid #ecf0f1;
}

#modal-regroupement {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}


/* ========== Responsive Mobile ========== */
@media (max-width: 768px) {
  .container {
    padding: 20px;
    margin: 20px 10px;
    border-radius: 12px;
  }

  header {
    font-size: 20px;
    padding: 12px 16px;
    text-align: center;
  }

  .button,
  .button_green,
  .button_grey {
    display: block;
    width: 100%;
    margin: 10px 0;
    text-align: center;
    font-size: 16px;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  tr {
    margin-bottom: 15px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
  }

  td {
    text-align: right;
    padding-left: 50%;
    position: relative;
  }

  td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    width: 45%;
    padding-right: 10px;
    font-weight: bold;
    text-align: left;
    white-space: nowrap;
    color: #34495e;
  }

  input[type="text"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px;
  }

  .piece-block {
    padding: 15px;
  }

  .modal-content {
    width: 90%;
    padding: 15px;
  }
}