/* ============================================================
   Kids Chores Tracker — Design System Cartoon
   Inspiré de la maquette mobile "Mes Tâches"
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700;800&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:           #FFF8E7;
  --bg-card:      #FFFDF4;
  --brown:        #8B5E3C;
  --brown-light:  #D4A96A;
  --brown-dark:   #5C3A1E;
  --green:        #4CAF50;
  --green-dark:   #2E7D32;
  --green-light:  #81C784;
  --blue:         #42A5F5;
  --blue-dark:    #1976D2;
  --purple:       #7E57C2;
  --purple-dark:  #512DA8;
  --red:          #E53935;
  --red-dark:     #B71C1C;
  --yellow:       #FFD600;
  --yellow-dark:  #F9A825;
  --orange:       #FF9800;
  --gray:         #BDBDBD;
  --gray-dark:    #9E9E9E;
  --text:         #4E342E;
  --radius-card:  20px;
  --radius-btn:   14px;
  --font-title:   'Fredoka One', cursive;
  --font-body:    'Nunito', sans-serif;
  --container:    680px;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 0;
  -webkit-tap-highlight-color: transparent;
}

.app-container {
  max-width: var(--container);
  margin: 0 auto;
  padding-bottom: 70px;
}

/* ══════════════════════════════════════════════════════════════
   BOUTONS 3D CARTOON
   ══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: var(--radius-btn);
  padding: 0.55rem 1.2rem;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  letter-spacing: 0.2px;
}
.btn:active {
  transform: translateY(4px) !important;
  box-shadow: 0 1px 0 currentColor !important;
}

/* Vert — bouton "Fait!" */
.btn-green {
  background: linear-gradient(180deg, #66BB6A 0%, #43A047 100%);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
  box-shadow: 0 5px 0 #2E7D32, 0 7px 10px rgba(0,0,0,0.15);
}

/* Vert clair — bouton "Fait!" déjà coché */
.btn-green-done {
  background: linear-gradient(180deg, #A5D6A7 0%, #81C784 100%);
  color: #1B5E20;
  border-color: rgba(255,255,255,0.5);
  box-shadow: 0 5px 0 #4CAF50, 0 7px 10px rgba(0,0,0,0.1);
}

.btn-blue {
  background: linear-gradient(180deg, #64B5F6 0%, #1E88E5 100%);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
  box-shadow: 0 5px 0 #1565C0, 0 7px 10px rgba(0,0,0,0.15);
}

.btn-purple {
  background: linear-gradient(180deg, #9575CD 0%, #7E57C2 100%);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
  box-shadow: 0 5px 0 #4527A0, 0 7px 10px rgba(0,0,0,0.15);
}

.btn-red {
  background: linear-gradient(180deg, #EF5350 0%, #D32F2F 100%);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
  box-shadow: 0 5px 0 #B71C1C, 0 7px 10px rgba(0,0,0,0.15);
}

.btn-brown {
  background: linear-gradient(180deg, #A1887F 0%, var(--brown) 100%);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
  box-shadow: 0 5px 0 var(--brown-dark), 0 7px 10px rgba(0,0,0,0.15);
}

.btn-gray {
  background: linear-gradient(180deg, #E0E0E0 0%, #BDBDBD 100%);
  color: #616161;
  border-color: rgba(255,255,255,0.5);
  box-shadow: 0 5px 0 #9E9E9E, 0 7px 10px rgba(0,0,0,0.1);
}

.btn-yellow {
  background: linear-gradient(180deg, #FFEE58 0%, #FDD835 100%);
  color: var(--brown-dark);
  border-color: rgba(255,255,255,0.5);
  box-shadow: 0 5px 0 #F9A825, 0 7px 10px rgba(0,0,0,0.15);
}

.btn-sm   { font-size: 0.8rem; padding: 0.3rem 0.8rem; border-radius: 12px; }
.btn-lg   { font-size: 1.1rem; padding: 0.65rem 1.6rem; }
.btn-xl   { font-size: 1.2rem; padding: 0.8rem 2rem; width: 100%; border-radius: 16px; }
.btn-full { width: 100%; }

/* Hover (desktop) */
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); }
}

/* ══════════════════════════════════════════════════════════════
   CARTES
   ══════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 2.5px solid var(--brown-light);
  border-radius: var(--radius-card);
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ══════════════════════════════════════════════════════════════
   HEADER ENFANT — Logo image
   ══════════════════════════════════════════════════════════════ */
.kids-header {
  text-align: center;
  position: relative;
  overflow: hidden;
  background: #f0f6fb;
}

.header-logo {
  display: block;
  width: 100%;
  object-fit: contain;
}

.app-title {
  font-family: var(--font-title);
  font-size: 2.2rem;
  color: #FFF;
  -webkit-text-stroke: 1.5px var(--brown-dark);
  text-shadow:
    3px 3px 0 var(--brown-dark),
    -1px -1px 0 var(--brown-dark),
    1px -1px 0 var(--brown-dark),
    -1px 1px 0 var(--brown-dark);
  letter-spacing: 1px;
  line-height: 1.1;
  position: relative;
  z-index: 2;
}

/* ══════════════════════════════════════════════════════════════
   SÉLECTEUR AVATARS
   ══════════════════════════════════════════════════════════════ */
.avatar-selector {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: -50px;
  padding-bottom: 0.5rem;
  position: relative;
  z-index: 2;
}
.avatar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s;
}
.avatar-item:active { transform: scale(0.93); }
.avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  background: linear-gradient(135deg, #fff 60%, #f0f0f0 100%);
  box-shadow:
    0 4px 0 rgba(0,0,0,0.12),
    0 6px 14px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  overflow: hidden;
  position: relative;
}
.avatar-circle img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-item.active .avatar-circle {
  transform: scale(1.12);
  border-color: rgba(255,255,255,0.95);
  box-shadow:
    0 4px 0 rgba(0,0,0,0.18),
    0 8px 20px rgba(0,0,0,0.22);
}
.avatar-item:not(.active) {
  opacity: 0.55;
  filter: grayscale(0.2);
}
.avatar-label {
  margin-top: -14px;
  padding: 4px 20px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.82rem;
  color: #fff;
  box-shadow: 0 3px 0 rgba(0,0,0,0.25);
  position: relative;
  z-index: 3;
  letter-spacing: 0.5px;
  border: 2px solid rgba(255,255,255,0.5);
}

/* ══════════════════════════════════════════════════════════════
   BARRE D'ÉTOILES (Planche de bois)
   ══════════════════════════════════════════════════════════════ */
.stars-bar {
  background: linear-gradient(180deg, #A1887F 0%, var(--brown) 40%, #6D4C41 100%);
  border-radius: 14px;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow:
    0 4px 0 var(--brown-dark),
    inset 0 2px 4px rgba(255,255,255,0.2),
    0 6px 12px rgba(0,0,0,0.15);
  border: 2px solid rgba(255,255,255,0.15);
}
.stars-icons {
  display: flex;
  gap: 1px;
  flex-wrap: wrap;
  flex: 1;
  justify-content: center;
}
.star-icon {
  font-size: 1.1rem;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.3));
}
.stars-count {
  white-space: nowrap;
  font-size: 0.85rem;
  font-family: var(--font-title);
}

/* ══════════════════════════════════════════════════════════════
   GRILLE DE TÂCHES (compact comme la maquette)
   ══════════════════════════════════════════════════════════════ */
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.task-card {
  background: linear-gradient(180deg, #FFFDF4 0%, #FFF8E7 100%);
  border: 2px solid #E8D5B5;
  border-radius: 14px;
  padding: 0.55rem 0.3rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  text-align: center;
  transition: transform 0.15s, background 0.2s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.task-card.done {
  background: linear-gradient(180deg, #F1F8E9 0%, #DCEDC8 100%);
  border-color: #AED581;
}
.task-icon {
  font-size: 1.4rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12));
}
.task-title {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  min-height: 2em;
  display: flex;
  align-items: center;
}
.task-points {
  font-size: 0.6rem;
  color: var(--brown);
  font-weight: 700;
}

/* Bouton dans la carte de tâche — Style maquette cartoon */
.task-btn {
  display: block;
  width: 100%;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0.3px;
  border: none;
  border-radius: 10px;
  padding: 0.4rem 0.3rem;
  cursor: pointer;
  user-select: none;
  transition: transform 0.08s, box-shadow 0.08s;
  margin-top: auto;
  text-align: center;
}
.task-btn:active {
  transform: translateY(4px);
  box-shadow: none !important;
}
/* À Faire = vert comme la maquette */
.task-btn-todo {
  background: linear-gradient(180deg, #78D67A 0%, #4CAF50 50%, #43A047 100%);
  color: #fff;
  box-shadow: 0 5px 0 #2E7D32, inset 0 2px 0 rgba(255,255,255,0.35);
  border: 2px solid rgba(255,255,255,0.3);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
/* Fait! = vert plus clair */
.task-btn-done {
  background: linear-gradient(180deg, #A5D6A7 0%, #81C784 50%, #66BB6A 100%);
  color: #1B5E20;
  box-shadow: 0 5px 0 #4CAF50, inset 0 2px 0 rgba(255,255,255,0.4);
  border: 2px solid rgba(255,255,255,0.4);
  text-shadow: none;
}

/* ══════════════════════════════════════════════════════════════
   BOUTON "VOIR RÉSULTATS"
   ══════════════════════════════════════════════════════════════ */
.btn-results {
  background: linear-gradient(180deg, #B39DDB 0%, #7E57C2 50%, #5E35B1 100%);
  color: #fff;
  border: 3px solid rgba(255,255,255,0.4);
  border-radius: 50px;
  padding: 0.9rem 2rem;
  font-size: 1.15rem;
  font-family: var(--font-title);
  font-weight: 400;
  letter-spacing: 0.5px;
  box-shadow:
    0 6px 0 #4527A0,
    inset 0 2px 0 rgba(255,255,255,0.25),
    0 10px 16px rgba(0,0,0,0.15);
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.08s, box-shadow 0.08s;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.25);
}
.btn-results:active {
  transform: translateY(5px);
  box-shadow: 0 1px 0 #4527A0;
}

/* ══════════════════════════════════════════════════════════════
   CONFETTIS
   ══════════════════════════════════════════════════════════════ */
@keyframes confetti-fall {
  0%   { transform: translateY(-10px) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translateY(80px) rotate(720deg) scale(0.5); opacity: 0; }
}
.confetti-particle {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  pointer-events: none;
  animation: confetti-fall 1s ease-out forwards;
  z-index: 9999;
}

/* ══════════════════════════════════════════════════════════════
   ONGLETS PARENT
   ══════════════════════════════════════════════════════════════ */
.tab-bar {
  background: var(--brown);
  border-radius: 50px;
  padding: 5px;
  display: flex;
  gap: 4px;
  box-shadow: 0 3px 0 var(--brown-dark);
}
.tab-btn {
  flex: 1;
  padding: 0.5rem 0.6rem;
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.8rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: var(--font-body);
}
.tab-btn.active {
  background: var(--brown-dark);
  color: #fff;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}
.tab-btn:not(.active) {
  background: var(--bg);
  color: var(--brown-dark);
}

/* ══════════════════════════════════════════════════════════════
   CHECKLIST PARENT
   ══════════════════════════════════════════════════════════════ */
.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed rgba(212,169,106,0.5);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border: 3px solid var(--brown-light);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.checklist-item input[type="checkbox"]:checked {
  background: var(--green);
  border-color: var(--green-dark);
}
.checklist-item input[type="checkbox"]:checked::after {
  content: '✓';
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
}
.checklist-item .task-label {
  flex: 1;
  font-weight: 700;
  font-size: 0.9rem;
}

/* ══════════════════════════════════════════════════════════════
   RÉCOMPENSES
   ══════════════════════════════════════════════════════════════ */
.reward-box {
  background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
  border: 2px solid var(--brown-light);
  border-radius: 14px;
  padding: 0.8rem 1rem;
}
.reward-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.reward-desc {
  flex: 1;
  font-weight: 700;
  font-size: 0.95rem;
}

/* ══════════════════════════════════════════════════════════════
   BILAN SEMAINE / RÉSULTATS
   ══════════════════════════════════════════════════════════════ */
.summary-kid-card {
  background: var(--bg-card);
  border: 2.5px solid var(--brown-light);
  border-radius: var(--radius-card);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}
.summary-total {
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: var(--brown-dark);
}

/* ══════════════════════════════════════════════════════════════
   SCRATCH CARD
   ══════════════════════════════════════════════════════════════ */
.scratch-wrapper {
  position: relative;
  display: inline-block;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  cursor: crosshair;
}
.scratch-reveal {
  background: linear-gradient(135deg, #FFF8E7, #FFE082);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--brown-dark);
  text-align: center;
  padding: 2rem 1.5rem;
  min-width: 260px;
  min-height: 140px;
}
.scratch-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 16px;
}

/* ══════════════════════════════════════════════════════════════
   MODAL PIN
   ══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}
.modal-box {
  background: var(--bg);
  border: 3px solid var(--brown-light);
  border-radius: 28px;
  padding: 2rem 1.5rem;
  width: 90%;
  max-width: 340px;
  text-align: center;
  box-shadow:
    0 8px 0 rgba(139,94,60,0.3),
    0 15px 35px rgba(0,0,0,0.3);
}
.modal-title {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--brown-dark);
  margin-bottom: 1rem;
}
.pin-input {
  width: 100%;
  font-size: 2rem;
  text-align: center;
  letter-spacing: 0.5em;
  border: 3px solid var(--brown-light);
  border-radius: 14px;
  padding: 0.6rem;
  background: #fff;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 800;
  margin-bottom: 1rem;
  outline: none;
}
.pin-input:focus { border-color: var(--blue); }

/* ══════════════════════════════════════════════════════════════
   UTILITAIRES
   ══════════════════════════════════════════════════════════════ */
.section-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  color: var(--brown-dark);
  margin-bottom: 0.5rem;
}
.text-muted  { color: var(--gray-dark); font-size: 0.85rem; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-1 { gap: 0.5rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* ── Inputs ─────────────────────────────────────────────────── */
.input-field {
  width: 100%;
  border: 2.5px solid var(--brown-light);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: #fff;
  color: var(--text);
  outline: none;
}
.input-field:focus { border-color: var(--blue); }

.select-field {
  width: 100%;
  border: 2.5px solid var(--brown-light);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: #fff;
  color: var(--text);
  outline: none;
  cursor: pointer;
}
.select-field:focus { border-color: var(--blue); }

/* ══════════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--brown-dark), var(--brown));
  color: #fff;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.95rem;
  z-index: 2000;
  box-shadow: 0 4px 0 rgba(0,0,0,0.2), 0 6px 14px rgba(0,0,0,0.25);
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
  border: 2px solid rgba(255,255,255,0.2);
}

/* ══════════════════════════════════════════════════════════════
   HEADER PARENT
   ══════════════════════════════════════════════════════════════ */
.parent-header {
  background: linear-gradient(180deg, #FFF8E7 0%, #FFECB3 50%, #FFE0B2 100%);
  padding: 1.2rem 1rem 1.5rem;
  text-align: center;
  position: relative;
}
.parent-title {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--brown-dark);
  text-shadow: 2px 2px 0 rgba(212,169,106,0.5);
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════════════════════════════
   NAVIGATION BASSE
   ══════════════════════════════════════════════════════════════ */
.nav-bottom {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  background: linear-gradient(180deg, rgba(255,248,231,0.97), var(--bg));
  border-top: 2.5px solid var(--brown-light);
  display: flex;
  justify-content: space-around;
  padding: 0.4rem 0 0.55rem;
  z-index: 100;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--gray-dark);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  transition: color 0.2s, transform 0.15s;
  padding: 0.2rem 0.5rem;
}
.nav-item:active { transform: scale(0.92); }
.nav-item.active { color: var(--brown-dark); }
.nav-item .nav-icon { font-size: 1.6rem; line-height: 1; }

/* ══════════════════════════════════════════════════════════════
   PAGE RÉSULTATS
   ══════════════════════════════════════════════════════════════ */
.results-header {
  background: linear-gradient(180deg, #C8E6C9 0%, #A5D6A7 50%, #81C784 100%);
  padding: 1.2rem 1rem 1.5rem;
  text-align: center;
  position: relative;
}
.results-title {
  font-family: var(--font-title);
  font-size: 2rem;
  color: #fff;
  -webkit-text-stroke: 1.5px var(--green-dark);
  text-shadow: 3px 3px 0 var(--green-dark);
}

/* ══════════════════════════════════════════════════════════════
   LOADER
   ══════════════════════════════════════════════════════════════ */
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  font-size: 2.5rem;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ══════════════════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-green  { background: #C8E6C9; color: var(--green-dark); }
.badge-orange { background: #FFE0B2; color: #E65100; }
.badge-gray   { background: #EEEEEE; color: #757575; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
/* Petit mobile */
@media (max-width: 340px) {
  .tasks-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .task-title { font-size: 0.62rem; }
  .task-btn   { font-size: 0.7rem; padding: 0.3rem 0.2rem; }
  .avatar-circle { width: 64px; height: 64px; }
  .stars-bar { font-size: 0.75rem; padding: 0.4rem 0.6rem; }
}

/* Tablette / Desktop */
@media (min-width: 600px) {
  html { font-size: 18px; }
  .tasks-grid { gap: 14px; }
  .task-card { padding: 0.8rem 0.5rem 0.7rem; border-radius: 18px; }
  .task-icon { font-size: 1.8rem; }
  .task-title { font-size: 0.8rem; }
  .task-btn { font-size: 0.9rem; padding: 0.5rem 0.4rem; border-radius: 12px; }
  .avatar-circle { width: 90px; height: 90px; }
  .avatar-label { font-size: 0.9rem; padding: 5px 22px; }
  .stars-bar { padding: 0.65rem 1.2rem; font-size: 0.95rem; }
  .btn-results { font-size: 1.3rem; padding: 1rem 2.5rem; }
  .summary-kid-card { padding: 1.3rem; }
}

/* Grand écran */
@media (min-width: 900px) {
  html { font-size: 20px; }
  .tasks-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .avatar-circle { width: 100px; height: 100px; }
  .avatar-selector { gap: 2rem; }
}
