/* ─── Wellness Gamifié ─────────────────────────────────────────────── */

:root {
    --w-matin: #f9ca24;
    --w-journee: #00b894;
    --w-soir: #6c5ce7;
    --w-bg: rgba(255, 255, 255, 0.04);
    --w-bg-hover: rgba(255, 255, 255, 0.08);
    --w-border: rgba(255, 255, 255, 0.08);
    --w-text: #ffffff;
    --w-text-dim: rgba(255, 255, 255, 0.5);
    --w-radius: 16px;
    --w-radius-sm: 10px;
}

.wellness-outer {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 120px;
}

/* ─── Score Bar (sticky) ──────────────────────────────────────────── */

/* ─── Score + Tools Sticky Bar ────────────────────────────────────── */

.score-tools-sticky {
    position: sticky;
    top: 48px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.score-container {
    flex: 1;
    min-width: 0;
}

.score-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: rgba(20, 10, 40, 0.85);
    backdrop-filter: blur(20px);
    border-radius: var(--w-radius);
    border: 1px solid var(--w-border);
}

.tools-quick-bar {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: rgba(20, 10, 40, 0.85);
    backdrop-filter: blur(20px);
    border-radius: var(--w-radius);
    border: 1px solid var(--w-border);
    flex-shrink: 0;
}

.tool-quick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-quick-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.15);
}

/* ─── Score identity (level + streak) ─────────────────────────── */
.score-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.level-badge {
    background: linear-gradient(135deg, var(--w-soir), #a29bfe);
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.score-streak {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.score-streak.on-fire {
    animation: fireGlow 1.5s ease-in-out infinite alternate;
}

@keyframes fireGlow {
    from { filter: brightness(1); }
    to { filter: brightness(1.3); }
}

.streak-flame {
    font-size: 1rem;
}

.streak-count {
    font-weight: 600;
    font-size: 0.8rem;
    color: #fd9644;
}

/* ─── HP bars (rituel, quêtes, XP) ───────────────────────────── */
.score-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.hp-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hp-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--w-text-dim);
    width: 72px;
    flex-shrink: 0;
    white-space: nowrap;
}

.hp-track {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    overflow: hidden;
    min-width: 40px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hp-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.6s ease;
    position: relative;
}

.hp-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 5px;
    background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, transparent 60%);
}

.hp-rituel {
    background: linear-gradient(90deg, #00b894, #55efc4);
    box-shadow: 0 0 6px rgba(0, 184, 148, 0.4);
}

.hp-quests {
    background: linear-gradient(90deg, var(--w-soir), #a29bfe);
    box-shadow: 0 0 6px rgba(108, 92, 231, 0.4);
}

.hp-questions {
    background: linear-gradient(90deg, #0984e3, #74b9ff);
    box-shadow: 0 0 6px rgba(9, 132, 227, 0.4);
}

.hp-xp {
    background: linear-gradient(90deg, #f9ca24, #fdcb6e);
    box-shadow: 0 0 6px rgba(249, 202, 36, 0.4);
}

.hp-value {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    width: 48px;
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}

.hp-row-xp .hp-track {
    height: 6px;
}

.hp-value-xp {
    color: var(--w-matin);
    font-weight: 700;
}

/* ─── Date Switcher ───────────────────────────────────────────────── */

.date-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 2px;
}

.date-sw-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--w-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--w-text-dim);
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.date-sw-btn:hover:not([disabled]) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--w-text);
}

.date-sw-btn[disabled] {
    opacity: 0.3;
    cursor: default;
}

.date-sw-label {
    background: none;
    border: none;
    color: var(--w-text);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.date-sw-label:hover {
    background: rgba(255, 255, 255, 0.06);
}

.date-switcher.past-date .date-sw-label {
    color: #fd9644;
}

/* Bouton icône date (mobile uniquement) */
.date-mobile-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--w-border);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.date-mobile-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.date-picker-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

/* ─── Dashboard ───────────────────────────────────────────────────── */

.dashboard-container {
    margin-bottom: 12px;
}

.dashboard-card {
    background: rgba(20, 10, 40, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    padding: 14px 16px;
}

.dashboard-done {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--w-text-dim);
    font-size: 0.9rem;
}

.dashboard-done-icon {
    font-size: 1.3rem;
}

.dashboard-header {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: var(--w-text);
}

.dash-section {
    margin-bottom: 8px;
}

.dash-section:last-child {
    margin-bottom: 0;
}

.dash-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--w-text-dim);
    margin-bottom: 4px;
    padding-left: 2px;
}

.dash-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    border-radius: 6px;
    margin-bottom: 2px;
}

.dash-item[data-tab] {
    cursor: pointer;
    transition: filter 0.15s, transform 0.15s;
}

.dash-item[data-tab]:hover {
    filter: brightness(1.3);
    transform: translateX(3px);
}

.dash-item-rituel {
    border-left: 3px solid #00b894;
    background: rgba(0, 184, 148, 0.06);
}

.dash-item-quest {
    border-left: 3px solid var(--w-soir);
    background: rgba(108, 92, 231, 0.06);
}

.dash-item-question {
    border-left: 3px solid #0984e3;
    background: rgba(9, 132, 227, 0.06);
}

/* ─── Moment Tabs ─────────────────────────────────────────────────── */

.rituel-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 4px;
}

.rituel-header .moment-tabs {
    flex: 1;
    margin-bottom: 0;
}

.rituel-actions-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.rituel-refresh-btn {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: var(--w-text-dim);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.rituel-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--w-text);
}

.rituel-reset-btn {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: var(--w-text-dim);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.rituel-reset-btn:hover {
    background: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

@media (max-width: 600px) {
    .rituel-actions-bar {
        flex-direction: column;
    }

    .rituel-refresh-btn,
    .rituel-reset-btn {
        width: 100%;
    }
}

/* ─── Delete button on checklist items ──────────────────────────── */

.checklist-delete {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0;
}

.checklist-item:hover .checklist-delete {
    opacity: 1;
}

.checklist-delete:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

/* ─── Add ritual form ────────────────────────────────────────────── */

.checklist-add-form {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--w-radius-sm);
    margin-top: 8px;
    align-items: center;
}

.checklist-add-form .add-emoji {
    width: 42px;
    text-align: center;
    font-size: 1.1rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--w-text);
    padding: 4px;
}

.checklist-add-form .add-label {
    flex: 1;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--w-text);
    padding: 4px 10px;
    font-size: 0.85rem;
}

.checklist-add-form .add-label::placeholder {
    color: var(--w-text-dim);
}

.checklist-add-form .add-submit {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--w-accent, #6c5ce7);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
}

.checklist-add-form .add-submit:hover {
    transform: scale(1.1);
}

.moment-tabs {
    display: flex;
    gap: 6px;
    padding: 6px;
    background: var(--w-bg);
    border-radius: var(--w-radius);
    margin-bottom: 20px;
}

.moment-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    background: transparent;
    border: none;
    color: var(--w-text-dim);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--w-radius-sm);
    cursor: pointer;
    transition: all 0.25s ease;
}

.moment-tab:hover {
    color: var(--w-text);
    background: rgba(255, 255, 255, 0.06);
}

.moment-tab.active[data-moment="matin"] {
    background: rgba(249, 202, 36, 0.15);
    color: var(--w-matin);
    box-shadow: 0 0 20px rgba(249, 202, 36, 0.15);
}

.moment-tab.active[data-moment="journee"] {
    background: rgba(0, 184, 148, 0.15);
    color: var(--w-journee);
    box-shadow: 0 0 20px rgba(0, 184, 148, 0.15);
}

.moment-tab.active[data-moment="soir"] {
    background: rgba(108, 92, 231, 0.2);
    color: var(--w-soir);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.2);
}

.tab-icon {
    font-size: 1.2rem;
}

.tab-label {
    font-size: 0.85rem;
}

/* ─── Moment Panels ───────────────────────────────────────────────── */

.moment-panel {
    display: none;
}

.moment-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

#main-wellness-content.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Moment Header ───────────────────────────────────────────────── */

.moment-header {
    margin-bottom: 16px;
}

.moment-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.moment-icon {
    font-size: 2rem;
}

.moment-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--w-text);
    margin: 0;
}

.moment-subtitle {
    font-size: 0.8rem;
    color: var(--w-text-dim);
    margin: 2px 0 0;
}

.moment-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.moment-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.moment-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.moment-progress-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--w-text-dim);
    white-space: nowrap;
}

.moment-complete-badge {
    font-size: 0.75rem;
    color: var(--w-matin);
    font-weight: 600;
    animation: badgePop 0.4s ease;
}

@keyframes badgePop {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

/* ─── Checklist Items ─────────────────────────────────────────────── */

.checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--w-bg);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.checklist-item:hover {
    background: var(--w-bg-hover);
    transform: translateX(2px);
}

.checklist-item.checked {
    background: rgba(76, 175, 80, 0.08);
    border-color: rgba(76, 175, 80, 0.2);
}

.checklist-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: transparent;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.checklist-checkbox.checked {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
}

.checklist-emoji {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.checklist-content {
    flex: 1;
    min-width: 0;
}

.checklist-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--w-text);
    transition: opacity 0.25s;
}

.checklist-item.checked .checklist-label {
    opacity: 0.5;
    text-decoration: line-through;
}

.checklist-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--w-text-dim);
    margin-top: 2px;
}

.checklist-points {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--w-text-dim);
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    white-space: nowrap;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checklist-points.earned {
    color: var(--w-matin);
    background: rgba(249, 202, 36, 0.12);
}

/* ─── Check Animation ─────────────────────────────────────────────── */

.check-bounce {
    animation: checkBounce 0.4s ease;
}

@keyframes checkBounce {
    0% { transform: scale(1); }
    30% { transform: scale(0.95); }
    60% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* ─── Streak Pulse ────────────────────────────────────────────────── */

.streak-pulse {
    animation: streakPulse 0.6s ease;
}

@keyframes streakPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ─── Questions Card ──────────────────────────────────────────────── */

.questions-card {
    background: var(--w-bg);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    margin-bottom: 16px;
    overflow: hidden;
}

.questions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--w-text);
    list-style: none;
}

.questions-header::-webkit-details-marker {
    display: none;
}

.questions-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    background: rgba(108, 92, 231, 0.2);
    color: var(--w-soir);
    border-radius: 10px;
    font-weight: 600;
}

.questions-body {
    padding: 0 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.question-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.question-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--w-text);
    font-weight: 500;
}

.question-icon {
    font-size: 1.1rem;
}

.question-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Slider */
.question-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

.question-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--w-soir);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.4);
}

.question-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--w-matin);
    min-width: 40px;
    text-align: right;
}

/* Rating Stars */
.rating-group {
    display: flex;
    gap: 6px;
}

.rating-star {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
    padding: 2px;
}

.rating-star.active {
    color: var(--w-matin);
}

.rating-star:hover {
    transform: scale(1.2);
}

/* Counter */
.counter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.counter-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--w-border);
    background: var(--w-bg);
    color: var(--w-text);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.counter-btn:hover {
    background: var(--w-bg-hover);
}

.counter-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--w-journee);
    min-width: 24px;
    text-align: center;
}

/* Text input */
.question-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.question-textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    color: var(--w-text);
    font-size: 0.85rem;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.question-textarea::placeholder {
    color: var(--w-text-dim);
}

.question-save-btn {
    align-self: flex-end;
    padding: 6px 16px;
    background: var(--w-soir);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.question-save-btn:hover {
    opacity: 0.85;
}

/* ─── Top Tabs ────────────────────────────────────────────────────── */

.wellness-top-tabs {
    display: flex;
    gap: 4px;
    padding: 5px;
    background: rgba(20, 10, 40, 0.7);
    backdrop-filter: blur(16px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

.wellness-top-tabs::-webkit-scrollbar {
    display: none;
}

.wellness-top-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 10px;
    background: transparent;
    border: none;
    color: var(--w-text-dim);
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    min-width: 0;
    position: relative;
}

.wtab-ico {
    font-size: 1.05rem;
    line-height: 1;
    flex-shrink: 0;
}

.wtab-lbl {
    overflow: hidden;
    text-overflow: ellipsis;
}

.wellness-top-tab:hover {
    color: var(--w-text);
    background: rgba(255, 255, 255, 0.06);
}

.wellness-top-tab.active {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.35), rgba(162, 155, 254, 0.2));
    color: #fff;
    box-shadow: 0 2px 16px rgba(108, 92, 231, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

@media (max-width: 600px) {
    /* tools-quick-bar : colonne verticale à droite de la score bar (plus de 2e ligne) */
    .score-tools-sticky {
        flex-direction: row;
        align-items: stretch;
        gap: 6px;
    }
    .tools-quick-bar {
        flex-direction: column;
        padding: 4px 3px;
        gap: 2px;
        justify-content: space-around;
    }
    .tool-quick-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    /* score bar adaptations */
    .score-bar {
        gap: 8px;
        padding: 10px 12px;
    }
    .score-identity {
        flex-direction: row;
        gap: 6px;
    }
    .hp-label {
        width: 56px;
        font-size: 0.65rem;
    }
    .hp-value {
        width: 40px;
        font-size: 0.65rem;
    }

    /* date-switcher : masqué, remplacé par le bouton icône */
    .date-switcher {
        display: none;
    }
    .date-mobile-btn {
        display: flex;
    }

    .wellness-top-tabs {
        gap: 2px;
        padding: 4px;
    }
    .wellness-top-tab {
        padding: 10px 6px;
        font-size: 0.78rem;
        gap: 4px;
        flex: 0 0 auto;
        min-width: 60px;
    }
    .wtab-lbl {
        display: none;
    }
    .wtab-ico {
        font-size: 1.2rem;
    }
}

/* ─── Tab Panels ──────────────────────────────────────────────────── */

.wellness-tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.wellness-tab-panel.active {
    display: block;
}

/* ─── Questions rapides (panneau dédié) ───────────────────────────── */

.questions-all-moments {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.questions-moment-group {
    background: var(--w-bg);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    padding: 16px;
}

.questions-moment-header {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--w-text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── Reports ─────────────────────────────────────────────────────── */

.report-section {
    background: var(--w-bg);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    padding: 20px;
    margin-bottom: 16px;
}

.report-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--w-text);
    margin: 0 0 16px;
}

.report-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.report-stat {
    text-align: center;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--w-radius-sm);
}

.report-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--w-soir);
}

.report-stat-label {
    font-size: 0.75rem;
    color: var(--w-text-dim);
}

.report-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 120px;
    padding: 8px 0;
}

.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.bar-value {
    font-size: 0.65rem;
    color: var(--w-text-dim);
    margin-bottom: 4px;
}

.bar {
    width: 100%;
    max-width: 36px;
    background: linear-gradient(180deg, var(--w-soir), #a29bfe);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.5s ease;
}

.bar-label {
    font-size: 0.7rem;
    color: var(--w-text-dim);
    margin-top: 6px;
}

.report-empty {
    color: var(--w-text-dim);
    font-size: 0.85rem;
    text-align: center;
    padding: 20px;
}

/* ─── Health Metrics ──────────────────────────────────────────────── */

.health-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.health-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--w-radius-sm);
    border: 1px solid var(--w-border);
}

.health-metric.good {
    border-color: rgba(0, 184, 148, 0.2);
}

.health-metric.warn {
    border-color: rgba(249, 202, 36, 0.2);
}

.health-icon {
    font-size: 1.3rem;
}

.health-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--w-text);
}

.health-label {
    font-size: 0.7rem;
    color: var(--w-text-dim);
    text-align: center;
}

.health-trend {
    font-size: 0.65rem;
    color: var(--w-text-dim);
}

/* ─── Weekly Objectives ───────────────────────────────────────────── */

.objectives-section {
    padding: 4px 0;
}

.objectives-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--w-text);
    margin: 0 0 16px;
}

.objectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.obj-day-col {
    background: var(--w-bg);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    padding: 12px;
    min-height: 80px;
}

.obj-day-col.today {
    border-color: rgba(108, 92, 231, 0.3);
    background: rgba(108, 92, 231, 0.06);
}

.obj-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.obj-day-name {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--w-text);
}

.obj-day-count {
    font-size: 0.7rem;
    color: var(--w-text-dim);
}

.obj-day-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.obj-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--w-text);
    transition: all 0.2s;
}

.obj-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.obj-item.completed {
    opacity: 0.5;
    text-decoration: line-through;
}

.obj-cat-icon {
    font-size: 0.85rem;
    flex-shrink: 0;
}

.obj-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.obj-delete-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-size: 1rem;
    padding: 0 2px;
    opacity: 0;
    transition: opacity 0.2s;
}

.obj-item:hover .obj-delete-btn {
    opacity: 1;
}

.obj-delete-btn:hover {
    color: #e74c3c;
}

.obj-empty {
    color: var(--w-text-dim);
    font-size: 0.75rem;
}

.add-objective-btn {
    display: inline-block;
    padding: 8px 20px;
    background: var(--w-bg);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--w-radius-sm);
    color: var(--w-text-dim);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.add-objective-btn:hover {
    background: var(--w-bg-hover);
    color: var(--w-text);
    border-color: rgba(255, 255, 255, 0.25);
}

.objectives-add {
    text-align: center;
}

/* ─── Objective Modal ─────────────────────────────────────────────── */

.objective-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    backdrop-filter: blur(4px);
}

.objective-modal-content {
    background: rgba(30, 15, 60, 0.95);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
    padding: 24px;
    width: 90%;
    max-width: 400px;
}

.objective-modal-content h4 {
    margin: 0 0 16px;
    color: var(--w-text);
    font-size: 1rem;
}

.obj-form-group {
    margin-bottom: 12px;
}

.obj-form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--w-text-dim);
    margin-bottom: 4px;
}

.obj-form-group select,
.obj-form-group input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--w-border);
    border-radius: 8px;
    color: var(--w-text);
    font-size: 0.85rem;
    box-sizing: border-box;
}

/* Assure la lisibilite des listes natives sur Windows (sinon blanc sur blanc) */
.obj-form-group select option,
.obj-form-group select optgroup {
    color: #1f2937;
    background: #ffffff;
}

.obj-form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}

.obj-cancel-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--w-border);
    border-radius: 8px;
    color: var(--w-text-dim);
    cursor: pointer;
    font-size: 0.85rem;
}

.obj-save-btn {
    padding: 8px 16px;
    background: var(--w-soir);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ─── Week Planning Section (inside Semaine panel) ────────────────── */

.week-planning-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--w-border);
}

.week-planning-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.week-planning-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--w-text);
    margin: 0;
}

.week-planning-header .new-week-btn {
    padding: 6px 14px;
    background: var(--w-soir);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.week-planning-header .new-week-btn:hover {
    opacity: 0.85;
}

/* ─── Gamification Animations ─────────────────────────────────────── */

.bonus-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(249, 202, 36, 0.9);
    color: #1a1a2e;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s ease;
    white-space: nowrap;
}

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

.bonus-pts {
    color: #e17055;
    font-weight: 800;
}

.levelup-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.levelup-overlay.active {
    opacity: 1;
}

.levelup-content {
    text-align: center;
    transform: scale(0.5);
    transition: transform 0.4s ease;
}

.levelup-overlay.active .levelup-content {
    transform: scale(1);
}

.levelup-icon {
    font-size: 4rem;
    animation: spin 1s ease;
}

@keyframes spin {
    from { transform: rotate(0deg) scale(0.5); }
    to { transform: rotate(360deg) scale(1); }
}

.levelup-text {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--w-matin);
    margin-top: 10px;
    text-shadow: 0 0 30px rgba(249, 202, 36, 0.5);
}

/* ─── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .wellness-outer {
        padding: 12px 10px 120px;
    }

    .score-bar {
        gap: 10px;
        padding: 10px 14px;
    }

    .hp-label {
        width: 56px;
        font-size: 0.65rem;
    }

    .hp-value {
        width: 40px;
        font-size: 0.65rem;
    }

    .level-badge {
        font-size: 0.7rem;
    }

    .checklist-item {
        padding: 12px;
        gap: 10px;
    }

    .checklist-desc {
        display: none;
    }

    .objectives-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .moment-tabs {
        gap: 4px;
    }

    .tab-label {
        font-size: 0.75rem;
    }

    .report-bar-chart {
        height: 80px;
    }
}

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

/* ─── Daily Quests (Gamified Planning Tasks) ──────────────────────── */

.daily-quests-section {
    margin-top: 24px;
    padding: 20px;
    background: var(--w-bg);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius);
}

.daily-quests-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.daily-quests-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--w-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quest-icon {
    font-size: 1.2rem;
}

.daily-quests-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    max-width: 280px;
}

.quest-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.quest-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--w-journee), #55efc4);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.quest-progress-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--w-text-dim);
    white-space: nowrap;
}

.quest-xp {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--w-matin);
    white-space: nowrap;
}

.quest-complete-badge {
    font-size: 1rem;
    animation: badgePop 0.4s ease;
}

.quest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--w-radius-sm);
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    margin-bottom: 6px;
}

.quest-item:hover {
    background: var(--w-bg-hover);
    transform: translateX(2px);
}

.quest-item.completed {
    background: rgba(76, 175, 80, 0.06);
    border-color: rgba(76, 175, 80, 0.15);
}

.quest-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: transparent;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.quest-checkbox.checked {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
}

.quest-priority {
    font-size: 0.8rem;
    flex-shrink: 0;
}

.quest-content {
    flex: 1;
    min-width: 0;
}

.quest-name {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--w-text);
    transition: all 0.25s;
}

.quest-item.completed .quest-name {
    opacity: 0.5;
    text-decoration: line-through;
}

.quest-note {
    display: block;
    font-size: 0.72rem;
    color: var(--w-text-dim);
    margin-top: 2px;
}

.quest-points {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--w-text-dim);
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    white-space: nowrap;
    transition: all 0.3s;
    flex-shrink: 0;
}

.quest-points.earned {
    color: var(--w-matin);
    background: rgba(249, 202, 36, 0.12);
}

.quest-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.2s;
}

.quest-item:hover .quest-actions {
    opacity: 1;
}

.quest-edit-btn,
.quest-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 4px;
}

.add-quest-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--w-radius-sm);
    color: var(--w-text-dim);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.add-quest-btn:hover {
    background: var(--w-bg-hover);
    color: var(--w-text);
    border-color: rgba(255, 255, 255, 0.25);
}

.no-quests {
    color: var(--w-text-dim);
    font-size: 0.85rem;
    text-align: center;
    padding: 16px;
}

/* ─── Weekly Quest Map (Gamified Week Grid) ───────────────────────── */

.weekly-quest-section {
    margin-top: 24px;
}

.weekly-quest-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.weekly-quest-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--w-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.weekly-quest-header .new-week-btn {
    padding: 6px 14px;
    background: var(--w-soir);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.weekly-quest-header .new-week-btn:hover {
    opacity: 0.85;
}

/* Week summary bar */
.wq-week-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--w-bg);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    margin-bottom: 12px;
}

.wq-week-stat {
    text-align: center;
    min-width: 0;
}

.wq-week-val {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--w-matin);
    white-space: nowrap;
}

.wq-week-label {
    font-size: 0.7rem;
    color: var(--w-text-dim);
    white-space: nowrap;
}

/* 7-day grid — toujours en carrousel horizontal */
.wq-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
    gap: 8px;
    padding-bottom: 8px;
}

.wq-grid::-webkit-scrollbar {
    height: 4px;
}

.wq-grid::-webkit-scrollbar-track {
    background: transparent;
}

.wq-grid::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
}

.wq-day {
    min-width: 200px;
    max-width: 200px;
    flex-shrink: 0;
    scroll-snap-align: start;
    background: var(--w-bg);
    border: 1px solid var(--w-border);
    border-radius: var(--w-radius-sm);
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    min-height: 120px;
}

.wq-day.wq-today {
    border-color: rgba(108, 92, 231, 0.4);
    background: rgba(108, 92, 231, 0.06);
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.1);
}

.wq-day.wq-all-done {
    border-color: rgba(76, 175, 80, 0.3);
    background: rgba(76, 175, 80, 0.04);
}

.wq-head {
    text-align: center;
    margin-bottom: 6px;
}

.wq-day-name {
    display: block;
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--w-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wq-date {
    font-size: 0.65rem;
    color: var(--w-text-dim);
}

.wq-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.wq-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--w-journee), #55efc4);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.wq-all-done .wq-bar-fill {
    background: linear-gradient(90deg, #4caf50, #81c784);
}

.wq-xp {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--w-matin);
    margin-bottom: 6px;
}

.wq-xp-max {
    font-weight: 400;
    color: var(--w-text-dim);
}

.wq-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.wq-task {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--w-text);
    cursor: pointer;
    transition: all 0.2s;
}

.wq-task:hover {
    background: rgba(255, 255, 255, 0.08);
}

.wq-task.wq-done {
    opacity: 0.5;
}

.wq-task.wq-done .wq-name {
    text-decoration: line-through;
}

.wq-check {
    font-size: 0.65rem;
    width: 14px;
    flex-shrink: 0;
    text-align: center;
}

.wq-task.wq-done .wq-check {
    color: #4caf50;
}

.wq-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wq-pts {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--w-text-dim);
    flex-shrink: 0;
}

.wq-task.wq-done .wq-pts {
    color: var(--w-matin);
}

.wq-p-high { border-left: 2px solid #e74c3c; }
.wq-p-medium { border-left: 2px solid var(--w-matin); }
.wq-p-low { border-left: 2px solid var(--w-journee); }

.wq-empty {
    color: var(--w-text-dim);
    font-size: 0.7rem;
    text-align: center;
    padding: 8px 0;
}

.wq-add {
    display: block;
    width: 100%;
    padding: 4px;
    margin-top: 4px;
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: var(--w-text-dim);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.wq-add:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--w-text);
}

/* Responsive weekly quest */
@media (max-width: 700px) {
    .wq-day {
        min-width: 80vw;
        max-width: 80vw;
    }
    .wq-pts {
        display: none;
    }
    .daily-quests-section {
        padding: 14px 12px;
    }
    .quest-actions {
        opacity: 1;
    }
}
