/* My Force One — identité visuelle propre : energie/discipline familiale.
   Accent corail chaleureux (reveil, motivation) sur fond creme, marine pour
   l'autorite tranquille (titres, coucher, cadre). Deux polices : Fredoka
   (ronde, accessible, adaptee aux enfants) pour les titres, Inter pour le
   texte courant. */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --creme: #fdf6ee;
  --creme-carte: #ffffff;
  --marine: #1e2749;
  --marine-clair: #3a4472;
  --corail: #ff6b4a;
  --corail-clair: #ffe4dc;
  --jaune: #ffb84d;
  --vert: #3fb27f;
  --rouge: #e85c5c;
  --gris: #7a7f8f;
  --bordure: #ece3d6;
  --ombre: 0 2px 10px rgba(30, 39, 73, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --creme: #191a22;
    --creme-carte: #23253266;
    --creme-carte: #24263380;
    --marine: #f4f2ee;
    --marine-clair: #c9cbe0;
    --corail-clair: #3a2a26;
    --bordure: #33354a;
    --gris: #a3a6bb;
    --ombre: 0 2px 14px rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="dark"] {
  --creme: #191a22;
  --creme-carte: #24263380;
  --marine: #f4f2ee;
  --marine-clair: #c9cbe0;
  --corail-clair: #3a2a26;
  --bordure: #33354a;
  --gris: #a3a6bb;
  --ombre: 0 2px 14px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--creme);
  color: var(--marine);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.5;
}
h1, h2, h3, h4 { font-family: 'Fredoka', 'Inter', sans-serif; text-wrap: balance; margin: 0 0 8px; }
a { color: var(--corail); }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ── Barre d'entête ─────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; background: var(--marine); color: white;
}
.topbar .logo { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 1.3rem; color: white; text-decoration: none; }
.topbar .logo span { color: var(--jaune); }
.topbar nav a { color: white; text-decoration: none; margin-left: 18px; font-weight: 500; font-size: 0.95rem; }
.topbar nav a:hover { color: var(--jaune); }

/* ── Composants ─────────────────────────────────────────────────────── */
.card {
  background: var(--creme-carte); border: 1px solid var(--bordure); border-radius: 14px;
  padding: 24px; box-shadow: var(--ombre);
}
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 11px 22px; border-radius: 999px; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.95rem;
  text-decoration: none; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--corail); color: white; }
.btn-primary:hover { box-shadow: 0 4px 14px rgba(255,107,74,.35); }
.btn-marine { background: var(--marine); color: white; }
.btn-outline { background: transparent; color: var(--marine); border: 1.5px solid var(--bordure); }
.btn-danger { background: var(--rouge); color: white; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 9px; border: 1.5px solid var(--bordure);
  font-family: 'Inter', sans-serif; font-size: 0.95rem; background: var(--creme-carte); color: var(--marine);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--corail); outline-offset: 1px; }
label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 5px; color: var(--marine-clair); }
.field { margin-bottom: 14px; }

.pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.pill-vert { background: #e3f6ec; color: var(--vert); }
.pill-jaune { background: #fff3e0; color: #b8720a; }
.pill-rouge { background: #fdeaea; color: var(--rouge); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.muted { color: var(--gris); font-size: 0.88rem; }
.error-box { background: #fdeaea; color: var(--rouge); padding: 10px 14px; border-radius: 9px; font-size: 0.9rem; margin-bottom: 14px; }
.success-box { background: #e3f6ec; color: var(--vert); padding: 10px 14px; border-radius: 9px; font-size: 0.9rem; margin-bottom: 14px; }
[hidden] { display: none !important; }

footer { text-align: center; padding: 30px; color: var(--gris); font-size: 0.85rem; }
