/* ============================================================
   Suivi du poids — Préfixe .wt- pour éviter tout conflit avec
   EasyAdmin et les autres pages custom (.tk- suivi journalier,
   .ac- compte, .pf- profil, …).
   Variables --wt-* scopées sous .wt-wrap (jamais sur :root).
   ============================================================ */

.wt-wrap {
    --wt-brand:      #6366f1;
    --wt-brand-d:    #4f46e5;
    --wt-brand-2:    #8b5cf6;
    --wt-brand-soft: #eef0fe;
    --wt-ink:        #23263a;
    --wt-mut:        #6b7080;
    --wt-line:       #e7e9ee;
    --wt-card:       #fff;
    --wt-good:       #16a34a;
    --wt-bad:        #dc2626;

    color-scheme: light;
    font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: var(--wt-ink);
    font-size: 14px;
    box-sizing: border-box;
}
.wt-wrap *, .wt-wrap *::before, .wt-wrap *::after { box-sizing: border-box; }

.wt-inner { max-width: 640px; margin: 0 auto; }

/* ════ En-tête ════ */
.wt-head { margin-bottom: 18px; }
.wt-back {
    display: inline-flex; align-items: center; gap: 4px; color: var(--wt-mut);
    font-size: 13.5px; font-weight: 700; text-decoration: none; margin-bottom: 6px;
}
.wt-back:hover { color: var(--wt-brand-d); }
.wt-head h1 { margin: 0; font-size: 25px; font-weight: 800; letter-spacing: -.025em; }

/* ════ Héros ════ */
.wt-hero {
    position: relative; background: linear-gradient(150deg, var(--wt-brand-d), var(--wt-brand-2) 88%);
    border-radius: 24px; padding: 22px 24px; color: #fff; overflow: hidden;
    box-shadow: 0 16px 34px rgba(79, 70, 229, .28); margin-bottom: 18px;
}
.wt-hero-glow { position: absolute; top: -60px; right: -40px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%); }
.wt-hero-row { display: flex; align-items: flex-start; gap: 22px; position: relative; flex-wrap: wrap; }
.wt-hero-kpi { display: flex; flex-direction: column; gap: 4px; }
.wt-hero-kpi span { font-size: 11.5px; font-weight: 700; opacity: .8; text-transform: uppercase; letter-spacing: .04em; }
.wt-hero-kpi b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.wt-hero-kpi b.over { color: #fecaca; }
.wt-hero-kpi b.under { color: #bbf7d0; }

/* ════ Ajout / mise à jour du poids du jour ════ */
.wt-add-card {
    background: var(--wt-card); border: 1px solid var(--wt-line); border-radius: 16px;
    padding: 18px 20px; margin-bottom: 18px;
}
.wt-add-card label { display: block; font-size: 13px; font-weight: 700; color: var(--wt-mut); margin-bottom: 10px; }
.wt-add-row { display: flex; align-items: center; gap: 10px; }
.wt-add-row .unit { font-weight: 700; color: var(--wt-mut); font-size: 13.5px; }
.wt-add-row input {
    flex: 1; min-width: 0; border: 1px solid var(--wt-line); border-radius: 10px;
    padding: 10px 12px; font: inherit; font-weight: 700; font-size: 16px; color: var(--wt-ink);
}
.wt-add-row input:focus { outline: none; border-color: var(--wt-brand); box-shadow: 0 0 0 3px var(--wt-brand-soft); }
.wt-add-btn {
    display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 10px;
    background: var(--wt-brand); color: #fff; font: inherit; font-weight: 800; font-size: 13.5px;
    padding: 11px 16px; cursor: pointer; white-space: nowrap;
}
.wt-add-btn:hover { background: var(--wt-brand-d); }
.wt-add-btn:disabled { opacity: .6; cursor: default; }
.wt-add-msg { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: var(--wt-good); }
.wt-add-msg.is-error { color: var(--wt-bad); }

/* ════ Graphique ════ */
.wt-chart-card { background: var(--wt-card); border: 1px solid var(--wt-line); border-radius: 16px; padding: 18px 20px 8px; }
.wt-chart-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.wt-tabs { display: inline-flex; background: #f5f5fa; border-radius: 999px; padding: 3px; gap: 2px; }
.wt-tab {
    border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 700; color: var(--wt-mut);
    padding: 7px 16px; border-radius: 999px; cursor: pointer;
}
.wt-tab.is-active { background: #fff; color: var(--wt-brand-d); box-shadow: 0 1px 4px rgba(40, 40, 90, .12); }
.wt-delta-period { font-size: 13px; font-weight: 800; color: var(--wt-mut); }

.wt-chart { position: relative; height: 220px; }
.wt-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.wt-chart[hidden] { display: none; }
.wt-empty {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
    color: var(--wt-mut); font-size: 13.5px; padding: 0 30px;
}
.wt-empty[hidden] { display: none; }

.wt-point { fill: var(--wt-brand-d); stroke: #fff; stroke-width: 2; }
.wt-point-hit { fill: transparent; cursor: pointer; }
.wt-line { fill: none; stroke: var(--wt-brand-d); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.wt-area { fill: url(#wtAreaGrad); stroke: none; }
.wt-xlabel { font-size: 10px; font-weight: 700; fill: #9aa0b4; }

.wt-tooltip {
    position: absolute; z-index: 5; transform: translate(-50%, calc(-100% - 10px));
    background: var(--wt-ink); color: #fff; border-radius: 8px; padding: 6px 10px;
    font-size: 12px; font-weight: 700; white-space: nowrap; pointer-events: none;
    box-shadow: 0 6px 16px rgba(20, 20, 50, .25);
}
.wt-tooltip[hidden] { display: none; }
.wt-tooltip small { display: block; font-weight: 600; opacity: .75; font-size: 10.5px; margin-top: 1px; }
