/* --- Base --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Gabarito", sans-serif;
  background: #f5f7fb;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 590px;
  margin: auto;
  background: white;
  padding: 10px;
  border-radius: 25px;
  box-shadow: 0 0 10px rgba(25, 97, 172, 0.1);
}

h1 {
  color: #1961ac;
  font-size: 24px;
  text-align: center;
  margin-bottom: 15px;
}

hr {
  border: 0;
  border-top: 1px solid #bbb;
  width: 80%;
  margin: 15px auto;
}

p:not(.total-to-save) {
  margin-bottom: 1em;
}

::placeholder {
  color: #aaa;
  font-size: 0.8em;
}

#custom-alert .toggle-button {
  padding: 5px 10px;
}

/* --- Boutons capsules (pills) --- */
.small-text-button {
  font-size: 0.85em;
  color: #888;
  font-weight: 300;
  margin-bottom: 0 !important;
}
.pill-toggle {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 20px;
}

.pill-toggle .toggle-button {
  padding: 12px 20px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: #f0f2f7;
  color: #1961ac;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  display: inline-block;
  min-width: 100px;
  text-align: center;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  margin-top: -1em;
  max-width: 30%;
}

.pill-toggle .toggle-button:hover {
  background: #dbe6f7;
}

.pill-toggle .toggle-button.active {
  background: #1961ac;
  color: white;
  border-color: #144b83;
  box-shadow: 0 2px 8px rgba(25, 97, 172, 0.25);
}

form .toggle-button {
  background: #1961ac;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

form .toggle-button:hover {
  background: #144b83;
}

.toggle-button:focus-visible {
  outline: 2px solid #1961ac;
  outline-offset: 2px;
}

/* --- Formulaire --- */
form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

input, select {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 12px;
  width: 100%;
  box-sizing: border-box;
}

/* --- Résultat --- */
#result-box {
  margin-top: 20px;
  padding: 8px 15px;
  background: linear-gradient(135deg, #f6f9fc, #e6f0fa);
  border: 2px solid #1961ac;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(25, 97, 172, 0.1);
  text-align: center;
}

#enough-money {
  text-align: left;
}

.hide-if-enough-money {
  text-align: left;
  display: block;
}

.hide-if-pension-is-know {
  display: block;
}

.total-to-save {
  font-size: 42px;
  font-weight: 700;
}

.monthly-detail {
  font-size: 16px;
  color: #333;
  font-weight: 400;
}

/* --- Utilitaires --- */

.hidden {
  display: none !important;
}
