/* ===================================================================
   IrisKids Home — style.css
   =================================================================== */

:root {
  --accent:      #7b3fe4;
  --accent-dark: #6d28d9;
  --bg:          #fffafc;
  --text:        #1a1033;
  --muted:       #6b7280;
  --border:      rgba(0,0,0,.07);
  --radius:      18px;
  --font:        'Baloo 2', system-ui, -apple-system, sans-serif;
  --nav-h:       64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: radial-gradient(circle at 20% 0%, #ede9fe 0%, #fffafc 40%, #fef3c7 100%);
  color: var(--text);
  min-height: 100vh;
}

/* ── Overlay parent ── */
.parent-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 10, 30, .72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}
.parent-overlay.visible { display: flex; animation: fadeIn .2s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.parent-card {
  background: #fff;
  border-radius: 28px;
  padding: 28px 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 48px rgba(15,10,30,.4);
  text-align: center;
  animation: slideUp .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.parent-card h2       { font-size: 1.5rem; font-weight: 800; color: var(--accent); margin-bottom: 8px; }
.parent-card p        { font-size: .9rem; color: var(--muted); margin-bottom: 18px; line-height: 1.5; }
.parent-card label    { display: block; font-size: .85rem; margin-bottom: 6px; color: var(--text); }
.parent-card input    { width: 100%; padding: 12px; border-radius: 999px; border: 1px solid #e5e7eb; text-align: center; font-size: 1.1rem; font-family: var(--font); margin-bottom: 12px; }
.parent-card button[type=submit] {
  width: 100%; padding: 12px; border-radius: 999px; border: none;
  background: var(--accent); color: #fff; font-family: var(--font);
  font-size: 1rem; font-weight: 700; cursor: pointer; margin-bottom: 8px;
  transition: background .15s;
}
.parent-card button[type=submit]:hover { background: var(--accent-dark); }
.parent-card-skip {
  display: block; width: 100%; padding: 8px; border: none; background: none;
  font-family: var(--font); font-size: .85rem; color: var(--muted); cursor: pointer;
  margin-bottom: 14px;
}
.parent-card-skip:hover { color: var(--text); }
.parent-card small { display: block; font-size: .75rem; color: #9ca3af; line-height: 1.6; }

/* ── Page layout ── */
.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 16px calc(var(--nav-h) + 16px);
}

/* ── Hero header ── */
.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(125deg, #7b3fe4, #c026d3 60%, #f97316);
  border-radius: 24px;
  padding: 16px 18px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,.1); border-radius: 50%;
}
.hero-brand { display: flex; align-items: center; gap: 14px; z-index: 1; }
.hero-logo  { width: 64px; height: 64px; border-radius: 14px; object-fit: contain; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.hero-title { font-size: 1.6rem; font-weight: 800; color: #fff; line-height: 1.1; }
.hero-sub   { font-size: .8rem; color: rgba(255,255,255,.8); margin-top: 2px; }
.hero-parent-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.2); border: none;
  font-size: 18px; cursor: pointer; flex-shrink: 0; z-index: 1;
  transition: background .15s, transform .12s;
}
.hero-parent-btn:hover  { background: rgba(255,255,255,.3); }
.hero-parent-btn:active { transform: scale(.9); }

/* ── Section label ── */
.section-label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
  padding: 0 4px 10px;
}

/* ── Cards grid ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.card {
  text-decoration: none;
  background: rgba(255,255,255,.92);
  border-radius: var(--radius);
  padding: 14px 12px 12px;
  border: 0.5px solid var(--border);
  box-shadow: 0 4px 16px rgba(15,10,30,.07);
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  overflow: hidden;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s ease;
  -webkit-tap-highlight-color: transparent;
}
/* Barre couleur en haut */
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--accent-card, var(--accent));
  border-radius: var(--radius) var(--radius) 0 0;
}
.card:hover  { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15,10,30,.13); }
.card:active { transform: scale(.96); }

.card-emoji { font-size: 30px; line-height: 1; margin-bottom: 2px; }
.card-name  { font-size: .95rem; font-weight: 700; color: var(--text); }
.card-desc  { font-size: .78rem; color: var(--muted); line-height: 1.3; }

/* ── Footer ── */
footer {
  margin-top: 20px;
  font-size: .75rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.8;
}
.parent-info  { font-size: .7rem; color: #9ca3af; }
.build-version{ font-size: .65rem; color: #c4b5d6; }

/* ── Bottom navigation ── */
.ik-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,250,252,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px 4px;
  z-index: 100;
}

.ik-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 16px; border-radius: 12px;
  border: none; background: transparent; cursor: pointer;
  transition: background .15s, transform .15s;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font);
}
.ik-nav-item:active { transform: scale(.88); }

.ik-nav-icon  { font-size: 22px; line-height: 1; transition: transform .2s cubic-bezier(.34,1.56,.64,1); }
.ik-nav-label { font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }

.ik-nav-active .ik-nav-icon  { transform: scale(1.2); }
.ik-nav-active .ik-nav-label { color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 1.4rem; }
}

@media (max-width: 360px) {
  .cards { grid-template-columns: 1fr; }
}

@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(5, 1fr); }
  /* Sur PC large, bottom nav moins utile — on la rend discrète */
  .ik-bottom-nav { max-width: 480px; left: 50%; transform: translateX(-50%); border-radius: 20px 20px 0 0; border: 0.5px solid var(--border); }
}

/* ═══════════════════════════════════════════════════════════════════════
 * Auth UI (sprint 1)
 * ═══════════════════════════════════════════════════════════════════════ */

/* Container dans le footer ou hero — affichage compact email/login/signup */
/* Modal */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity .2s;
  padding: 16px;
}
.auth-overlay.visible { opacity: 1; }

.auth-card {
  background: #fff;
  border-radius: 18px;
  padding: 28px 24px 22px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  position: relative;
  font-family: inherit;
}

.auth-close {
  position: absolute;
  top: 10px; right: 14px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
}
.auth-close:hover { color: #1f2937; }

.auth-modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 18px;
  color: #1f2937;
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .92rem;
  color: #334155;
  font-weight: 600;
}
.auth-form label.signup-only {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  font-weight: 400;
  font-size: .85rem;
  color: #475569;
  line-height: 1.4;
}
.auth-form label.signup-only a { color: #7b3fe4; text-decoration: underline; }

.auth-form input[type="email"],
.auth-form input[type="password"] {
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 1rem;
  font-family: inherit;
}
.auth-form input:focus {
  outline: none;
  border-color: #7b3fe4;
  box-shadow: 0 0 0 3px rgba(123, 63, 228, .15);
}

.auth-error {
  color: #dc2626;
  font-size: .88rem;
  margin: 0;
  min-height: 1.2em;
}

.auth-submit {
  background: #7b3fe4;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  margin-top: 4px;
}
.auth-submit:hover  { background: #6c2ed8; }
.auth-submit:disabled { background: #c4b5fd; cursor: wait; }

.auth-switch {
  text-align: center;
  margin: 14px 0 0;
}
.auth-switch-link {
  background: none;
  border: none;
  color: #7b3fe4;
  font-size: .9rem;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

/* ═══════════════════════════════════════════════════════════════════════
 * Sprint 2 — Profils enfants : modal « Qui joue ? » + avatar
 * ═══════════════════════════════════════════════════════════════════════ */

/* Modal "Qui joue?" — réutilise auth-overlay/auth-card mais on ajoute
   des variantes pour les avatars en grille */
.children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 16px;
  padding: 8px 4px;
}

.child-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  background: #f8fafc;
  border: 2px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  transition: transform .15s, border-color .15s, background .15s;
  font-family: inherit;
  font-size: 14px;
  color: #1f2937;
  width: 100%;
}
.child-tile:hover {
  border-color: #7b3fe4;
  background: #fff;
  transform: translateY(-2px);
}
.child-tile:active { transform: scale(.97); }
.child-tile.add-tile {
  border: 2px dashed #cbd5e1;
  background: #fff;
  color: #64748b;
}
.child-tile.add-tile:hover {
  border-color: #7b3fe4;
  color: #7b3fe4;
}
.child-tile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  font-size: 36px;
}
.child-tile-avatar img,
.child-tile-avatar svg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.child-tile-pseudo {
  font-weight: 700;
  text-align: center;
  word-break: break-word;
  max-width: 100%;
}
.child-tile-delete {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: -4px;
}
.child-tile-delete:hover { color: #ef4444; background: #fee2e2; }

/* Header actif quand un profil est sélectionné — avatar + dropdown */
.ik-user-zone {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 100;
}
.ik-user-avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.15);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s, border-color .15s;
}
.ik-user-avatar-btn:hover { border-color: #fff; transform: scale(1.05); }
.ik-user-avatar-btn img,
.ik-user-avatar-btn svg { width: 100%; height: 100%; border-radius: 50%; }

.ik-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  padding: 6px;
  display: none;
  z-index: 101;
}
.ik-user-dropdown.open { display: block; }
.ik-user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #1f2937;
  text-decoration: none;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}
.ik-user-dropdown-item:hover { background: #f1f5f9; }
.ik-user-dropdown-item.danger { color: #b91c1c; }
.ik-user-dropdown-item.danger:hover { background: #fee2e2; }
.ik-user-dropdown-divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 4px 0;
}
.ik-user-pseudo {
  font-weight: 700;
  padding: 8px 12px 4px;
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}


/* ═══════════════════════════════════════════════════════════════════════
 * Auth UI — bloc final (priorité cascade) — sprint 1 + 2
 * ═══════════════════════════════════════════════════════════════════════ */
footer #auth-btn-container {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 4px;
  font-size: 13px;
  color: #475569;
  flex-wrap: wrap;
}
footer #auth-btn-container .auth-link {
  background: #7b3fe4 !important;
  color: #ffffff !important;
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
  display: inline-block;
}
footer #auth-btn-container .auth-link:hover { background: #6c2ed8 !important; }
footer #auth-btn-container .auth-email {
  background: #f1f5f9;
  color: #1f2937 !important;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════
 * Sprint 3 — Bandeau cookies
 * ═══════════════════════════════════════════════════════════════════════ */
#ik-cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 999;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 16px;
  animation: ikCookieSlideUp .25s ease-out;
}
@keyframes ikCookieSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.ik-cookie-card {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  color: #fff;
  font-size: 14px;
}
.ik-cookie-text {
  flex: 1 1 320px;
  line-height: 1.5;
}
.ik-cookie-text a { color: #c4b5fd; text-decoration: underline; }
.ik-cookie-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}
.ik-cookie-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.ik-cookie-btn:active { transform: scale(.97); }
.ik-cookie-btn-primary {
  background: #7b3fe4;
  color: #fff;
}
.ik-cookie-btn-primary:hover { background: #6c2ed8; }
.ik-cookie-btn-secondary {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
}
.ik-cookie-btn-secondary:hover { background: rgba(255,255,255,.25); }

/* Sprint 3 — Lien "mot de passe oublié" dans la modal auth */
.auth-forgot-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  color: #7b3fe4;
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.auth-forgot-link:hover { color: #6c2ed8; }

/* =========================================================================
 * Sprint VITRINE — Widget "Météo des activités du week-end"
 * Affiché entre le hero violet et la grille des jeux sur la page d'accueil.
 * ========================================================================= */

.wt-section {
  max-width: 920px;
  margin: 24px auto 4px;
  padding: 0 16px;
}

.wt-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 6px;
}

.wt-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #5b21b6;
  letter-spacing: -0.02em;
}

.wt-status {
  font-size: 0.75rem;
  color: #888;
  font-weight: 500;
}

.wt-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 720px) {
  .wt-cards {
    grid-template-columns: 1fr;
  }
}

.wt-card {
  background: #fff;
  border: 1px solid #e9e3f5;
  border-radius: 14px;
  padding: 14px 14px 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  min-height: 150px;
}

.wt-card:hover {
  transform: translateY(-2px);
  border-color: #7b3fe4;
  box-shadow: 0 6px 16px rgba(123, 63, 228, 0.12);
}

.wt-card-cat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #7b3fe4;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wt-card-emoji { font-size: 1.1rem; }
.wt-card-cat-label { line-height: 1; }

.wt-card-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1f1f1f;
  line-height: 1.3;
  flex-grow: 1;
}

.wt-card-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.78rem;
  color: #555;
  font-weight: 500;
  margin-top: 2px;
}

.wt-card-meta span { display: flex; align-items: center; gap: 5px; }

.wt-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  line-height: 1.2;
}
.wt-badge-free { background: #dcfce7; color: #15803d; }
.wt-badge-paid { background: #fef3c7; color: #a16207; }

.wt-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  margin-top: 12px;
  border-top: 1px dashed #e9e3f5;
  gap: 12px;
  flex-wrap: wrap;
}

.wt-cta-text {
  font-size: 0.78rem;
  color: #888;
  font-weight: 500;
}

.wt-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fde047;
  color: #1a1a1a;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}

.wt-cta-btn:hover { background: #facc15; transform: translateY(-1px); }

/* Skeleton loader (avant fetch) */
.wt-card-skeleton {
  border-color: #ececec;
  pointer-events: none;
}
.wt-skel {
  background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 50%, #f3f4f6 100%);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: wt-shimmer 1.4s linear infinite;
}
@keyframes wt-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ════════════════════════════════════════════════════════════════════════
   Sprint UX.AUTH — Page parent anonyme (découverte + CTA conversion)
   Mobile-first ; les media queries élargissent à partir de 640px / 1024px.
   ════════════════════════════════════════════════════════════════════════ */

.pa-hero {
  padding: 32px 20px 24px;
  text-align: center;
  background: linear-gradient(135deg, #7b3fe4 0%, #a855f7 100%);
  color: #ffffff;
}
.pa-hero-title {
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 800;
  margin: 0 0 12px;
  line-height: 1.2;
}
.pa-hero-sub {
  font-size: clamp(15px, 3vw, 18px);
  margin: 0 auto 24px;
  max-width: 600px;
  opacity: 0.95;
}

.pa-cta-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  max-width: 400px;
  margin: 0 auto;
}
.pa-cta-primary,
.pa-cta-secondary {
  width: 100%;
  min-height: 48px;       /* cible tactile mobile */
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}
.pa-cta-primary {
  background: #ffffff;
  color: #7b3fe4;
}
.pa-cta-primary:hover  { background: #f8fafc; }
.pa-cta-primary:active { transform: scale(0.97); }
.pa-cta-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.4);
}
.pa-cta-secondary:hover  { background: rgba(255, 255, 255, 0.25); }
.pa-cta-secondary:active { transform: scale(0.97); }

@media (min-width: 640px) {
  .pa-cta-group { flex-direction: row; max-width: 600px; }
  .pa-cta-primary, .pa-cta-secondary { flex: 1; }
}

.pa-section-title {
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 700;
  text-align: center;
  margin: 32px 16px 20px;
  color: #1e293b;
}

/* ── Bénéfices ─────────────────────────────────────────────────────────── */
.pa-benefits {
  padding: 0 16px 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.pa-benefit-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .pa-benefit-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .pa-benefit-list { grid-template-columns: repeat(4, 1fr); }
}
.pa-benefit-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.05);
}
.pa-benefit-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 12px;
}
.pa-benefit-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #1e293b;
}
.pa-benefit-soon {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  background: #fde68a;
  color: #92400e;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}
.pa-benefit-desc {
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
  color: #475569;
}

/* ── Réassurance ──────────────────────────────────────────────────────── */
.pa-trust {
  background: #f8fafc;
  padding: 24px 16px 32px;
}
.pa-trust .pa-section-title { margin-top: 0; }
.pa-trust-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .pa-trust-list { grid-template-columns: repeat(2, 1fr); }
}
.pa-trust-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 16px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  font-size: 14px;
  flex-wrap: wrap;
}
.pa-trust-check {
  color: #16a34a;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}
.pa-trust-item strong { color: #1e293b; }
.pa-trust-item span { color: #64748b; font-size: 13px; }

/* ── CTA bottom ───────────────────────────────────────────────────────── */
.pa-cta-bottom {
  padding: 32px 16px;
  text-align: center;
}
.pa-cta-bottom .pa-cta-primary {
  background: #7b3fe4;
  color: #ffffff;
}
.pa-cta-bottom .pa-cta-primary:hover { background: #6c2ed8; }
.pa-cta-bottom .pa-cta-secondary {
  background: #ffffff;
  color: #7b3fe4;
  border: 2px solid #7b3fe4;
}
.pa-cta-bottom .pa-cta-secondary:hover { background: #f5f3ff; }
.pa-legal {
  margin-top: 16px;
  font-size: 12px;
  color: #64748b;
}
.pa-legal a { color: #7b3fe4; text-decoration: underline; }

/* ════════════════════════════════════════════════════════════════════════
   Sprint GAMIF.1 — Section "Records des enfants" dans /parent
   Mobile-first ; le grid s'élargit à partir de 640px.
   ════════════════════════════════════════════════════════════════════════ */

#family-stats-section {
  margin: 28px 0;
}
.stats-child {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.stats-child-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px;
  color: #1e293b;
}
.stats-child--empty .stats-child-empty {
  color: #64748b;
  font-size: 14px;
  margin: 0;
  font-style: italic;
}
.stats-game-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 540px) { .stats-game-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .stats-game-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .stats-game-grid { grid-template-columns: repeat(4, 1fr); } }

.stats-game-card {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.05);
}
.stats-game-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.stats-game-emoji { font-size: 22px; line-height: 1; }
.stats-game-name {
  font-weight: 600;
  font-size: 14px;
  color: #334155;
}
.stats-game-best {
  font-size: 16px;
  color: #1e293b;
  margin: 4px 0;
}
.stats-game-best strong { color: #7b3fe4; }
.stats-game-meta {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}
.stats-game-meta em { color: #16a34a; font-style: normal; font-weight: 600; }

.stats-empty, .stats-error {
  color: #64748b;
  font-size: 14px;
  text-align: center;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}
.stats-error { color: #b45309; background: #fef3c7; }

/* ════════════════════════════════════════════════════════════════════════
   Sprint GAMIF.2 — Section "Badges" mini-grille de stickers par enfant
   ════════════════════════════════════════════════════════════════════════ */

.stats-badges {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(15, 23, 42, 0.1);
}
.stats-badges-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.stats-badges-title {
  font-weight: 600;
  font-size: 14px;
  color: #334155;
}
.stats-badges-count {
  font-size: 12px;
  color: #7b3fe4;
  font-weight: 600;
}
.stats-badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.badge-sticker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 20px;
  line-height: 1;
  user-select: none;
  cursor: help;
  transition: transform 0.1s;
}
.badge-sticker:hover  { transform: scale(1.15); }
.badge-sticker--on    { background: #ede9fe; border: 2px solid #7b3fe4; box-shadow: 0 2px 6px rgba(123, 63, 228, 0.2); }
.badge-sticker--off   { background: #f1f5f9; border: 2px solid #cbd5e1; opacity: 0.55; filter: grayscale(0.6); font-size: 16px; }

/* ════════════════════════════════════════════════════════════════════════
   Sprint KID.PROFILE — Bouton 🎮 dans le hero + bannière de bienvenue
   ════════════════════════════════════════════════════════════════════════ */

.hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-kid-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  text-decoration: none;
  border-radius: 50%;
  font-size: 18px;
  transition: background 0.15s, transform 0.1s;
}
.hero-kid-btn:hover  { background: rgba(255, 255, 255, 0.3); }
.hero-kid-btn:active { transform: scale(0.9); }
.hero-kid-btn[hidden] { display: none; }

/* Bannière de bienvenue personnalisée pour l'enfant connecté */
.kid-welcome-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #fce7f3 0%, #f3e8ff 100%);
  border: 2px solid #e9d5ff;
  border-radius: 18px;
  padding: 14px 16px;
  margin: 14px 0 20px;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.08);
}
.kid-welcome-banner[hidden] { display: none; }

.kid-welcome-emoji {
  font-size: 36px;
  line-height: 1;
  flex-shrink: 0;
}
.kid-welcome-body { flex: 1; min-width: 0; }
.kid-welcome-title {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 2px;
  color: #4c1d95;
}
.kid-welcome-pseudo {
  background: linear-gradient(90deg, #7b3fe4, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kid-welcome-sub {
  font-size: 13px;
  color: #6b21a8;
  margin: 0;
}
.kid-welcome-cta {
  background: linear-gradient(135deg, #7b3fe4, #a855f7);
  color: #ffffff;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.1s, box-shadow 0.15s;
  flex-shrink: 0;
}
.kid-welcome-cta:hover  { box-shadow: 0 4px 12px rgba(123, 63, 228, 0.4); }
.kid-welcome-cta:active { transform: scale(0.95); }

@media (max-width: 480px) {
  .kid-welcome-banner { padding: 12px; gap: 10px; }
  .kid-welcome-emoji { font-size: 28px; }
  .kid-welcome-title { font-size: 15px; }
  .kid-welcome-sub { font-size: 12px; }
  .kid-welcome-cta { padding: 8px 14px; font-size: 13px; }
}

/* Sprint FAMILY.SHARE-CHILDREN — Badge "partagé" sur les enfants créés par un co-parent */
.stats-child-shared {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ddd6fe, #fbcfe8);
  color: #6b21a8;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
  cursor: help;
}

/* ═════════════════════════════════════════════════════════════════════════
 * Sprint INVITE.UX-PREFILL — Bannière invitation famille + email verrouillé
 * ═════════════════════════════════════════════════════════════════════════ */

.ik-invite-banner {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #fbcfe8 0%, #ddd6fe 100%);
  border-bottom: 2px solid rgba(123, 63, 228, 0.18);
  padding: 12px 16px;
  font-family: 'Baloo 2', system-ui, sans-serif;
  box-shadow: 0 2px 12px rgba(123, 63, 228, 0.12);
  animation: ik-invite-slide-down .35s ease;
}

@keyframes ik-invite-slide-down {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.ik-invite-banner-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ik-invite-banner-emoji {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.ik-invite-banner-text {
  flex: 1;
  min-width: 200px;
  font-size: 0.96rem;
  color: #4b1f8a;
  line-height: 1.45;
}

.ik-invite-banner-action {
  flex-shrink: 0;
  padding: 10px 22px;
  border-radius: 9999px;
  background: #7b3fe4;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
  box-shadow: 0 2px 8px rgba(123, 63, 228, 0.3);
}

.ik-invite-banner-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(123, 63, 228, 0.4);
}

.ik-invite-banner-dismiss {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  color: #4b1f8a;
  font-size: 1.3rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
}

.ik-invite-banner-dismiss:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* Email verrouillé dans la modale auth */
.auth-email-locked {
  background: #f9fafb !important;
  color: #4b3a72;
  cursor: not-allowed;
  border-color: #d1d5db !important;
}

.auth-email-locked:focus {
  outline: none !important;
  box-shadow: none !important;
}

.auth-email-hint {
  margin: -8px 0 12px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #ddd6fe, #fbcfe8);
  border-radius: 8px;
  font-size: 0.85rem;
  color: #6b21a8;
  line-height: 1.4;
}

/* Toast pour notifs invite */
.ik-invite-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 2000;
  padding: 14px 24px;
  border-radius: 12px;
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: opacity .25s, transform .25s;
  max-width: 480px;
  text-align: center;
}

.ik-invite-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.ik-invite-toast--success {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  border: 1px solid #10b981;
}

.ik-invite-toast--error {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
  border: 1px solid #ef4444;
}

.ik-invite-toast--info {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e3a8a;
  border: 1px solid #3b82f6;
}

/* ═════════════════════════════════════════════════════════════════════════
 * Sprint CATALOG.AGE — Sections de jeux par tranche d'âge
 * ═════════════════════════════════════════════════════════════════════════ */

.age-section {
  margin-bottom: 28px;
  animation: ik-age-fade-in .35s ease both;
}

.age-section:nth-child(1) { animation-delay: 0ms; }
.age-section:nth-child(2) { animation-delay: 60ms; }
.age-section:nth-child(3) { animation-delay: 120ms; }
.age-section:nth-child(4) { animation-delay: 180ms; }
.age-section:nth-child(5) { animation-delay: 240ms; }

@keyframes ik-age-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.age-section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 12px;
  padding: 0 2px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.age-section-emoji {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.age-section-text {
  flex: 1;
  letter-spacing: -0.01em;
}

.age-section-range {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(123, 63, 228, 0.08);
  padding: 3px 10px;
  border-radius: 9999px;
  flex-shrink: 0;
}

/* Section "Bientôt amélioré" : visuellement plus discrète */
.age-section--upcoming .age-section-title {
  color: var(--muted);
}
.age-section--upcoming .age-section-range {
  background: rgba(156, 163, 175, 0.12);
  color: #6b7280;
}

/* Card placeholder pour "Bientôt un nouveau jeu" (tout-petits) */
.card--placeholder {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.06), rgba(123, 63, 228, 0.06));
  border: 1px dashed rgba(6, 182, 212, 0.45);
  cursor: default;
  pointer-events: none;
}

.card--placeholder::before {
  background: linear-gradient(90deg, #06b6d4, #7b3fe4);
  opacity: 0.6;
}

.card--placeholder .card-emoji {
  animation: ik-placeholder-sparkle 2.4s ease-in-out infinite;
}

@keyframes ik-placeholder-sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.85; }
  50%      { transform: scale(1.12) rotate(8deg); opacity: 1; }
}

/* Card "Prochainement" pour Le Conteur (sprint MARTINE-V2) */
.card--upcoming {
  background: rgba(255, 255, 255, 0.72);
  filter: grayscale(0.7);
  cursor: default;
  pointer-events: none;
  opacity: 0.78;
}

.card--upcoming::before {
  background: linear-gradient(90deg, #9ca3af, #6b7280);
  opacity: 0.5;
}

.card--upcoming .card-emoji {
  opacity: 0.65;
}

.card--upcoming .card-desc {
  font-style: italic;
}

/* Petit ruban "En travaux" en coin haut-droit des cards upcoming */
.card--upcoming::after {
  content: '🚧';
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 1rem;
  opacity: 0.75;
}

/* Responsive : sur mobile, padding ajusté */
@media (max-width: 480px) {
  .age-section { margin-bottom: 22px; }
  .age-section-title {
    font-size: 0.98rem;
    flex-wrap: wrap;
  }
  .age-section-range {
    font-size: 0.72rem;
    padding: 2px 8px;
  }
}

/* Card "NOUVEAU" (badge en coin haut-droit pour les jeux fraîchement sortis) */
.card--new::after {
  content: '✨ Nouveau';
  position: absolute;
  top: 6px;
  right: 6px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
  animation: ik-new-glow 2s ease-in-out infinite;
}

@keyframes ik-new-glow {
  0%, 100% { box-shadow: 0 1px 3px rgba(245, 158, 11, 0.35); }
  50%      { box-shadow: 0 2px 10px rgba(245, 158, 11, 0.65); }
}

/* Placeholder pour les jeux 2-5 ans (Tap'Animaux, Couleurs & Formes) */
.card--upcoming {
  /* règle déjà définie au sprint CATALOG.AGE, on garde le même style */
}
