body {
  font-family: system-ui, sans-serif;
  line-height: 1.5;
  padding: 1rem;
  max-width: 600px;
  margin: auto;
  background: #f9f9f9;
}
h1 {
  font-size: 2rem;
}
header {
  background: linear-gradient(to right, #007bff, #00bfff);
  color: white;
  padding: 2rem 1rem 1rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.logo-title img {
  max-width: 100%;
  height: auto;
  width: 260px; /* ajustable selon ton logo */
}

.subtitle {
  margin-top: 1rem;
  font-size: 1.1rem;
  opacity: 0.95;
}
.form-line {
  margin-bottom: 1rem;
}
input,
button,
select {
  font-size: 1rem;
  padding: 0.5rem;
  width: 100%;
  max-width: 100%;
}
fieldset {
  border: 1px solid #ccc;
  padding: 0.5rem;
  border-radius: 5px;
}
button {
  background: #007bff;
  color: white;
  border: none;
  cursor: pointer;
}
button:hover {
  background: #0056b3;
}
pre {
  background: #eee;
  padding: 0.5rem;
  border-radius: 4px;
  overflow-x: auto;
}
.hide {
  display: none;
}

.toggle-group {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.toggle {
  position: relative;
  cursor: pointer;
}

.toggle input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle span {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #eee;
  border: 2px solid #ccc;
  border-radius: 6px;
  transition: background 0.2s, border-color 0.2s;
}

.toggle input[type="radio"]:checked + span {
  background-color: #007bff;
  border-color: #0056b3;
  color: white;
  font-weight: bold;
}

@keyframes pop-flash {
  0% {
    background-color: #fffbcc;
    transform: scale(1.02);
    box-shadow: 0 0 0.5rem rgba(255, 235, 59, 0.5);
  }
  100% {
    background-color: transparent;
    transform: scale(1);
    box-shadow: none;
  }
}

.highlight {
  animation: pop-flash 0.6s ease-out;
}

footer {
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  padding: 2rem 1rem 1rem;
  margin-top: 3rem;
  border-top: 1px solid #ddd;
  background: #f9f9f9;
}

footer a {
  color: #007bff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

legend.with-help {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

legend.with-help button {
  background: #007bff;
  border: none;
  color: #ffffff;
  font-weight: bold;
  font-size: 0.9rem;
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  line-height: 1.5rem;
  cursor: pointer;
  text-align: center;
  padding: 0;
  transition: background 0.3s;
}

legend.with-help button:hover {
  background: #0056b3;
}

.help-text {
  margin-top: 1rem;
  background: #f8f8f8;
  padding: 1rem;
  border-left: 4px solid #007bff;
  border-radius: 6px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.help-text ul {
  margin: 0.5em 0 0.5em 1.2em;
  padding-left: 0;
}

@media (max-width: 480px) {
  main {
    padding: 1rem;
  }
  header h1 {
    font-size: 1.6rem;
  }
  header .subtitle {
    font-size: 1rem;
  }

  .logo-title img {
    width: 180px;
  }
  .subtitle {
    font-size: 1rem;
  }

  .toggle span {
    font-size: 0.9rem;
    padding: 0.5rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  button[type="submit"] {
    font-size: 1rem;
    padding: 0.65rem;
  }
}
