body {
  font-family: "Segoe UI", Arial, sans-serif;
  margin: 0;
  background: #f4f7fb;
  color: #333;
}

header {
  display: flex;
  justify-content: flex-end;
  padding: 12px 20px;
  background: #1a3d6d;
  color: white;
}

header select {
  margin-left: 5px;
  padding: 5px;
  border-radius: 4px;
  border: none;
}

main {
  max-width: 1000px;
  margin: 40px auto;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

h1 {
  text-align: center;
  margin-bottom: 25px;
  color: #1a3d6d;
}

.input-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
}

textarea {
  width: 90%;
  height: 100px;
  padding: 12px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 12px;
  resize: vertical;
}

button {
  padding: 10px 24px;
  font-size: 15px;
  border: none;
  background: #1a3d6d;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}
button:hover {
  background: #2a5aa7;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
thead {
  background: #1a3d6d;
  color: white;
}
th, td {
  padding: 10px;
  text-align: left;
  font-size: 14px;
}
th, td {
  padding: 10px;
  text-align: left;  /* défaut : texte aligné à gauche */
  font-size: 14px;
}

td.num {
  text-align: right;               /* chiffres alignés à droite */
  font-variant-numeric: tabular-nums; /* pour alignement type Excel */
}
tr:nth-child(even) {
  background: #f9f9f9;
}
tr:hover {
  background: #eef3fb;
}
tfoot {
  background: #e6eef9;
  font-weight: bold;
}
tfoot td {
  border-top: 2px solid #1a3d6d;
}
button.loading {
  position: relative;
  color: transparent !important; /* cache le texte */
}

button.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.progress-msg {
  margin-top: 8px;
  font-size: 13px;
  color: #1a3d6d;
  text-align: center;
}
.num {
  text-align: right; 
  font-variant-numeric: tabular-nums; /* alignement type Excel */
}
.link-times {
  margin-top: 16px;
  color: #333;
  display: none;               /* hidden by default */
}

.link-times.has-data {
  display: block;              /* shown only when we have items */
  padding-top: 8px;
  border-top: 1px dashed rgba(0,0,0,0.1);
}

.link-times h3 {
  margin: 6px 0 4px;
  font-size: 14px;
  color: #1a3d6d;
}
.link-times .tz-note {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}
.link-times ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.link-times li {
  font-size: 13px;
  margin: 2px 0;
}
