/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Comic Neue', cursive, sans-serif;
  background-color: #FFF9C4;
  color: #333;
  min-height: 100vh;
  /* Confettis en arrière-plan */
  background-image:
    radial-gradient(circle 8px at 10% 15%, #FF6F6133 80%, transparent 80%),
    radial-gradient(circle 6px at 85% 10%, #42A5F533 80%, transparent 80%),
    radial-gradient(circle 10px at 50% 5%, #AB47BC22 80%, transparent 80%),
    radial-gradient(circle 7px at 25% 90%, #66BB6A33 80%, transparent 80%),
    radial-gradient(circle 9px at 75% 85%, #FF6F6122 80%, transparent 80%),
    radial-gradient(circle 5px at 90% 50%, #42A5F522 80%, transparent 80%),
    radial-gradient(circle 8px at 5% 55%, #AB47BC33 80%, transparent 80%),
    radial-gradient(circle 6px at 60% 95%, #66BB6A22 80%, transparent 80%),
    radial-gradient(circle 7px at 35% 45%, #FF6F6118 80%, transparent 80%),
    radial-gradient(circle 9px at 15% 75%, #42A5F518 80%, transparent 80%);
}

/* === Layout === */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* === Titre === */
.title {
  font-family: 'Bubblegum Sans', cursive;
  font-size: 2.8rem;
  text-align: center;
  color: #FF6F61;
  text-shadow: 2px 2px 0 #fbc02d55;
  margin-bottom: 4px;
  animation: slideDown 0.5s ease-out;
}

.subtitle {
  text-align: center;
  font-size: 1.15rem;
  color: #AB47BC;
  font-weight: 700;
  margin-bottom: 24px;
}

/* === Cartes === */
.card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  animation: slideIn 0.4s ease-out;
}

/* === Étape 1 : Prénom === */
.card label {
  display: block;
  font-family: 'Bubblegum Sans', cursive;
  font-size: 1.3rem;
  color: #42A5F5;
  margin-bottom: 12px;
}

.name-row {
  display: flex;
  gap: 10px;
}

.name-row input {
  flex: 1;
}

input[type="text"],
input[type="date"] {
  font-family: 'Comic Neue', cursive;
  font-size: 1rem;
  padding: 10px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

input[type="text"]:focus,
input[type="date"]:focus {
  border-color: #42A5F5;
}

/* === Boutons === */
button {
  font-family: 'Bubblegum Sans', cursive;
  font-size: 1.1rem;
  border: none;
  border-radius: 14px;
  padding: 10px 22px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

button:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

button:active {
  transform: scale(0.97);
}

#btn-go {
  background: #FF6F61;
  color: #fff;
  white-space: nowrap;
}

#btn-submit {
  background: #66BB6A;
  color: #fff;
  width: 100%;
  font-size: 1.25rem;
  padding: 14px;
  margin-top: 8px;
}

#btn-back {
  background: #42A5F5;
  color: #fff;
  width: 100%;
  font-size: 1.1rem;
  padding: 12px;
}

/* === Étape 2 : Questions === */
#step-questions h2 {
  font-family: 'Bubblegum Sans', cursive;
  color: #AB47BC;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.question {
  margin-bottom: 18px;
}

.question p {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

/* === Toggle buttons === */
.toggle-group {
  display: flex;
  gap: 10px;
}

.toggle-btn {
  flex: 1;
  background: #f5f5f5;
  color: #777;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 10px;
  font-family: 'Comic Neue', cursive;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s;
}

.toggle-btn.active[data-value="true"] {
  background: #66BB6A;
  color: #fff;
  border-color: #66BB6A;
}

.toggle-btn.active[data-value="false"] {
  background: #FF6F61;
  color: #fff;
  border-color: #FF6F61;
}

/* === Erreur === */
.error {
  color: #FF6F61;
  font-weight: 700;
  text-align: center;
  margin-top: 8px;
}

/* === Confirmation === */
.done-msg {
  font-family: 'Bubblegum Sans', cursive;
  font-size: 1.3rem;
  color: #66BB6A;
  text-align: center;
  margin-bottom: 16px;
}

/* === Résultats === */
#results {
  margin-top: 8px;
}

#results h2 {
  font-family: 'Bubblegum Sans', cursive;
  font-size: 1.6rem;
  color: #42A5F5;
  text-align: center;
  margin-bottom: 16px;
}

#no-results {
  text-align: center;
  color: #999;
  font-style: italic;
}

.result-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-left: 5px solid;
  animation: slideIn 0.35s ease-out;
}

.result-card:nth-child(4n+1) { border-left-color: #FF6F61; }
.result-card:nth-child(4n+2) { border-left-color: #42A5F5; }
.result-card:nth-child(4n+3) { border-left-color: #66BB6A; }
.result-card:nth-child(4n)   { border-left-color: #AB47BC; }

.result-card .name {
  font-family: 'Bubblegum Sans', cursive;
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 6px;
}

.result-card .details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  background: #f0f0f0;
  color: #555;
}

.badge.yes { background: #E8F5E9; color: #2E7D32; }
.badge.no  { background: #FFEBEE; color: #C62828; }
.badge.date { background: #E3F2FD; color: #1565C0; }

/* === Récap === */
#summary {
  margin-top: 8px;
}

#summary h2 {
  font-family: 'Bubblegum Sans', cursive;
  font-size: 1.6rem;
  color: #AB47BC;
  text-align: center;
  margin-bottom: 16px;
}

.summary-day {
  background: #fff;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideIn 0.35s ease-out;
}

.summary-day .day-label {
  font-family: 'Bubblegum Sans', cursive;
  font-size: 1.1rem;
  color: #333;
}

.summary-day .day-count {
  font-weight: 700;
  font-size: 1rem;
  background: #E3F2FD;
  color: #1565C0;
  padding: 4px 12px;
  border-radius: 10px;
}

.summary-box {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  margin-top: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: #FF6F61;
  animation: slideIn 0.35s ease-out;
}

/* === Utilitaires === */
.hidden {
  display: none !important;
}

/* === Animations === */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Responsive === */
@media (max-width: 480px) {
  .title { font-size: 2.2rem; }
  .card { padding: 18px; }
  .name-row { flex-direction: column; }
  #btn-go { width: 100%; }
}
