:root {
    --bg-color:      #0D1117;
    --card-bg:       #161B27;
    --text-main:     #F1F5F9;
    --text-muted:    #94A3B8;
    --success-color: #10B981;
    --success-light: rgba(16, 185, 129, 0.15);
    --border-color:  #334155;
    --danger-color:  #F43F5E;
    --danger-light:  rgba(244, 63, 94, 0.12);
    --streak-color:  #F59E0B;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }

html, body {
    overscroll-behavior: none;
    overscroll-behavior-x: none;
    overflow-x: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

body {
    background: linear-gradient(135deg, #0a0f1e 0%, #0d1829 40%, #0a1520 70%, #0d0f1e 100%);
    background-size: 200% 200%;
    animation: bgShift 8s ease infinite;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    transition: background 1s ease;
}
@keyframes bgShift {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}
/* Désactive l'animation quand un fond perso est actif */
body.has-wallpaper {
    animation: none;
    background-size: cover;
}

/* ── WALLPAPER MODE — glassmorphism renforcé ───────────────
   S'active UNIQUEMENT quand body.has-wallpaper est présent.
   Toutes les surfaces opaques passent en dark-glass 72%.
   Ne touche pas au design par défaut (fond bgShift).
──────────────────────────────────────────────────────────── */
body.has-wallpaper header,
body.has-wallpaper .task-card,
body.has-wallpaper .glass-card,
body.has-wallpaper .stats-bar,
body.has-wallpaper .day-stats-widget,
body.has-wallpaper .reset-notif,
body.has-wallpaper .premium-banner,
body.has-wallpaper .referral-banner,
body.has-wallpaper .day-stats-widget,
body.has-wallpaper .view-toggle-btn,
body.has-wallpaper .pill-row {
    background: rgba(13, 17, 23, 0.72) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
}
/* Modal boxes : opacité un peu plus forte pour confort lecture */
body.has-wallpaper .modal-box {
    background: rgba(13, 17, 23, 0.88) !important;
    backdrop-filter: blur(28px) !important;
    -webkit-backdrop-filter: blur(28px) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
}
/* Préserve les bordures gauche colorées des tâches */
body.has-wallpaper .task-card:not(.done) {
    border-left: 3px solid rgba(139,92,246,0.55) !important;
}
body.has-wallpaper .task-card.done {
    border-left: 3px solid #10B981 !important;
}
body.has-wallpaper .task-card[data-assigned-to]:not([data-assigned-to=""]):not(.done) {
    border-left: 3px solid #06B6D4 !important;
}
body.has-wallpaper .task-card.urgent:not(.done) {
    border-left: 3px solid #EF4444 !important;
}
/* App container : léger tinted background pour lisibilité texte */
body.has-wallpaper .app-container {
    background: rgba(7, 13, 26, 0.35);
}

.app-container {
    width: 100%;
    max-width: 420px;
    padding: 40px 24px 40px;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.view { display: none; flex-direction: column; animation: fadeIn 0.4s ease-out; }
.view.active { display: flex; }

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

/* ========== LOGIN / ONBOARDING ========== */
.onboarding-content { text-align: center; margin-top: 60px; }
.logo-icon { font-size: 60px; color: var(--success-color); background: var(--success-light); width: 120px; height: 120px; border-radius: 35px; display: flex; justify-content: center; align-items: center; margin: 0 auto 30px; }
.onboarding-title { font-size: 36px; margin-bottom: 10px; }
.onboarding-text { color: var(--text-muted); margin-bottom: 40px; line-height: 1.6; }
.login-hint { font-size: 12px; color: var(--text-muted); margin-top: -4px; }

.join-panel { overflow: hidden; max-height: 0; transition: max-height 0.35s ease, opacity 0.3s ease; opacity: 0; }
.join-panel.active { max-height: 200px; opacity: 1; margin-top: 10px; }
.join-panel input { width: 100%; padding: 15px; background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 14px; color: var(--text-main); font-size: 15px; outline: none; margin-bottom: 12px; text-align: center; transition: border-color 0.2s; }
.join-panel input:focus { border-color: var(--success-color); }

/* ========== BOUTONS ========== */
.btn-full { width: 100%; padding: 18px; border: none; border-radius: 18px; font-size: 16px; font-weight: 600; cursor: pointer; transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s; margin-bottom: 15px; }
.btn-full:active { transform: scale(0.98); opacity: 0.85; }
.btn-primary   { background: var(--text-main); color: var(--bg-color); }
.btn-primary:hover {
    box-shadow: 0 0 20px rgba(16,185,129,0.4), 0 4px 16px rgba(0,0,0,0.3);
    transform: translateY(-1px);
}
.btn-secondary { background: var(--card-bg); color: var(--text-main); border: 1px solid var(--border-color); }

.btn-mini {
    background: var(--card-bg); border: 1px solid var(--border-color);
    color: var(--text-muted); padding: 8px 14px; border-radius: 20px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: color 0.2s, border-color 0.2s; white-space: nowrap;
}
.btn-mini:hover { color: var(--text-main); border-color: var(--text-muted); }

/* ========== AVATAR BOX ========== */
.avatar-box {
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0; border: 2px solid var(--border-color);
    background: var(--bg-color); color: var(--text-muted);
    line-height: 1;
}
.avatar-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-box i   { font-size: 11px; }

.avatar-box-sm { width: 28px; height: 28px; font-size: 17px; }
.avatar-box-lg { width: 52px; height: 52px; font-size: 30px; border-width: 2px; }
.avatar-box-xl { width: 72px; height: 72px; font-size: 42px; border-width: 3px; }

.avatar-box-sm i { font-size: 10px; }
.avatar-box-lg i { font-size: 18px; }
.avatar-box-xl i { font-size: 24px; }

/* ========== USER PROFILE — HEADER ========== */
.user-profile-btn {
    display: flex; align-items: center; gap: 6px;
    background: none; border: none; cursor: pointer;
    padding: 2px; border-radius: 50px; transition: opacity 0.2s;
}
.user-profile-btn:hover { opacity: 0.8; }

.user-name {
    font-size: 13px; font-weight: 600; color: var(--text-main);
    max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ========== NOTIFICATION RESET ========== */
.reset-notif {
    border-radius: 16px; padding: 0 18px; font-size: 14px; line-height: 1.5;
    text-align: center; max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease, margin-bottom 0.4s ease, padding 0.4s ease;
}
.reset-notif.visible { max-height: 100px; opacity: 1; margin-bottom: 20px; padding: 14px 18px; }
.reset-notif.success { background: rgba(245, 158, 11, 0.1); border: 1px solid var(--streak-color); }
.reset-notif.neutral { background: var(--card-bg); border: 1px solid var(--border-color); }

/* ========== HEADER ========== */
header {
    background: linear-gradient(180deg, rgba(16,185,129,0.08) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 0.5px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.header-top { display: flex; align-items: center; justify-content: space-between; }
.header-top h1 { font-size: 20px; white-space: nowrap; }
.header-right { display: flex; align-items: center; gap: 8px; }
.header-sub { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.header-date { font-size: 12px; color: #64748B; }
.header-streak { font-size: 12px; color: #F59E0B; font-weight: 600; }
.header-actions { display: flex; gap: 8px; margin-top: 12px; }

.btn-settings {
    background: none; border: none; font-size: 16px; cursor: pointer;
    padding: 2px 4px; border-radius: 8px; transition: transform 0.15s;
    line-height: 1;
}
.btn-settings:hover { transform: scale(1.15); }

.streak-badge {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(245, 158, 11, 0.12); color: var(--streak-color);
    border: 1px solid rgba(245, 158, 11, 0.3); border-radius: 50px;
    padding: 4px 12px; font-size: 13px; font-weight: 700;
    animation: streakPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes streakPop { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Tiers de couleur dynamique (classe ajoutée par JS) */
.streak-badge.streak-low  { color: #06B6D4; background: rgba(6,182,212,0.12); border-color: rgba(6,182,212,0.3); }
.streak-badge.streak-med  { color: #10B981; background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.3); }
.streak-badge.streak-high { color: #F59E0B; background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.3); }
.streak-badge.streak-fire {
    color: #EF4444; background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3);
    animation: streakPop 0.4s cubic-bezier(0.34,1.56,0.64,1), streakFire 0.9s ease-in-out infinite alternate;
}
@keyframes streakFire {
    from { box-shadow: 0 0 6px rgba(239,68,68,0.3); }
    to   { box-shadow: 0 0 22px rgba(239,68,68,0.65), 0 0 34px rgba(249,115,22,0.35); }
}

#connectionStatus { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; transition: background-color 0.4s, box-shadow 0.4s; }
.status-online  { background-color: var(--success-color); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25); }
.status-offline { background-color: var(--text-muted); box-shadow: none; }

/* ========== CARTES TÂCHES ========== */
.tasks-grid { display: flex; flex-direction: column; gap: 8px; }

.task-card {
    background: rgba(255,255,255,0.04);
    border: 0.5px solid rgba(255,255,255,0.08);
    border-left: 3px solid rgba(139,92,246,0.55);   /* violet — tâche normale */
    border-radius: 16px; padding: 11px 12px;
    display: flex; align-items: center;
    cursor: pointer; transition: all 0.2s;
    animation: slideIn 0.3s ease-out;
    position: relative;
}
.task-card:active { transform: scale(0.98); }
/* Tâche faite → bordure verte */
.task-card.done {
    background: rgba(16,185,129,0.05);
    border: 0.5px solid rgba(16,185,129,0.2);
    border-left: 3px solid #10B981;
    opacity: 1;
}
/* Tâche assignée → bordure cyan (si non faite) */
.task-card[data-assigned-to]:not([data-assigned-to=""]):not(.done) {
    border-left: 3px solid #06B6D4;
}
/* Tâche urgente → bordure rouge (classe ajoutée par JS) */
.task-card.urgent:not(.done) {
    border-left: 3px solid #EF4444;
}

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

.icon-box { width: 42px; height: 42px; background: rgba(255,255,255,0.06); border-radius: 12px; display: flex; justify-content: center; align-items: center; font-size: 20px; flex-shrink: 0; }

.task-info { margin-left: 10px; flex: 1; min-width: 0; }
.task-title  { font-weight: 600; font-size: 14px; color: #F1F5F9; white-space: normal; word-break: break-word; line-height: 1.3; }
.task-status { font-size: 12px; color: #64748B; margin-top: 3px; }
.task-card.done .task-title { text-decoration: line-through; color: #94A3B8; }
.task-card.done .task-status { color: #10B981; }

.action-btns { display: flex; gap: 1px; margin-right: 4px; flex-shrink: 0; opacity: 0; transition: opacity 0.2s; }
.task-card:hover .action-btns,
.task-card:focus-within .action-btns,
.task-card.done .action-btns { opacity: 1; }
.edit-btn, .delete-btn { padding: 4px 5px; color: var(--text-muted); font-size: 11px; border-radius: 6px; transition: color 0.2s, background 0.2s; }
.edit-btn:hover   { color: var(--text-main); background: var(--bg-color); }
.delete-btn:hover { color: var(--danger-color); background: var(--danger-light); }

/* Sur mobile : toujours afficher les boutons (pas de hover) */
@media (hover: none) {
    .action-btns { opacity: 1; }
}

.check-circle { width: 26px; height: 26px; border: 1.5px solid rgba(255,255,255,0.15); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: transparent; flex-shrink: 0; transition: all 0.3s; }
.task-card.done .check-circle { background: #10B981; border-color: #10B981; color: white; }
/* 🔒 Tâche verrouillée une fois cochée — se déverrouille à minuit */
.task-card.done { cursor: default !important; }
.task-card.done .check-circle { cursor: default; pointer-events: none; }

/* ========== BOUTON AJOUTER ========== */
.add-btn {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white; border: none; border-radius: 16px;
    padding: 14px; font-size: 14px; font-weight: 700;
    cursor: pointer; width: 100%; margin-top: 20px;
    box-shadow: 0 0 24px rgba(16,185,129,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}
.add-btn:active { transform: scale(0.98); }
.add-btn.locked { background: linear-gradient(135deg, #F97316, #F59E0B); box-shadow: 0 0 24px rgba(249,115,22,0.2); }
.add-btn.locked:active { transform: scale(0.98); }

/* ========== ÉTAT VIDE ========== */
.empty-state {
    flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 48px 24px;
    animation: fadeIn 0.4s ease-out;
}
.empty-icon  { font-size: 52px; margin-bottom: 16px; }
.empty-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.empty-text  { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ========== BANNIÈRE PREMIUM ========== */
.premium-banner {
    align-items: center; gap: 12px;
    background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(249,115,22,0.1));
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 16px; padding: 14px 18px;
    margin-bottom: 20px; font-size: 14px; line-height: 1.4;
    animation: fadeIn 0.4s ease-out;
}
.premium-banner > span:first-child { font-size: 26px; flex-shrink: 0; }
.premium-banner strong { display: block; color: var(--streak-color); font-size: 15px; }
.premium-banner > div > span { color: var(--text-muted); font-size: 12px; }

/* ========== DELETE CONFIRM ========== */
.delete-btn-confirm {
    color: var(--danger-color) !important;
    background: var(--danger-light) !important;
    border-radius: 8px;
    font-size: 11px !important;
    font-weight: 700;
    padding: 6px 8px !important;
    white-space: nowrap;
}

/* ========== MODALES — BASE ========== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px); display: none;
    justify-content: center; align-items: flex-end; z-index: 100;
}
.modal-overlay.active { display: flex; animation: overlayIn 0.25s ease; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
    background: var(--card-bg); width: 100%; max-width: 420px;
    padding: 28px 24px 36px; border-radius: 28px 28px 0 0;
    text-align: center; border-top: 1px solid var(--border-color);
    animation: slideUp 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.modal-box-scroll { max-height: 88vh; overflow-y: auto; }

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

.modal-box h2    { font-size: 20px; margin-bottom: 6px; }
.modal-hint      { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 4px; }

.modal-box input {
    width: 100%; padding: 15px; background: var(--bg-color);
    border: 1px solid var(--border-color); border-radius: 14px;
    color: var(--text-main); font-size: 16px; margin: 14px 0 12px;
    outline: none; transition: border-color 0.2s;
}
.modal-box input:focus { border-color: var(--success-color); }
#shareUrl { font-size: 13px; color: var(--text-muted); cursor: text; user-select: all; }

.btn-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 15px; padding: 8px; margin-top: 4px; transition: color 0.2s; }
.btn-close:hover { color: var(--text-main); }

/* ========== BADGE PLAN ========== */
.plan-badge { display: inline-flex; align-items: center; border-radius: 50px; padding: 3px 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.plan-free    { background: rgba(148, 163, 184, 0.1); color: var(--text-muted); border: 1px solid rgba(148, 163, 184, 0.2); }
.plan-premium { background: rgba(245, 158, 11, 0.12); color: var(--streak-color); border: 1px solid rgba(245, 158, 11, 0.3); }

/* ========== MODALE PARAMÈTRES ========== */
.settings-user-info {
    display: flex; align-items: center; gap: 14px;
    padding: 4px 0 18px; text-align: left;
}
.settings-user-text { flex: 1; min-width: 0; }
.settings-name  { font-size: 17px; font-weight: 700; }
.settings-email { font-size: 12px; color: var(--text-muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.settings-edit-btn   { margin-bottom: 0; }
.settings-divider    { border: none; border-top: 1px solid var(--border-color); margin: 18px 0; }
.settings-signout-btn { color: var(--danger-color); border-color: rgba(244, 63, 94, 0.3); margin-bottom: 0; }
.settings-signout-btn:hover { background: var(--danger-light); }
.settings-close-btn  { display: block; margin: 12px auto 0; }

/* Info premium dans paramètres */
.settings-premium-info {
    background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px; padding: 10px 14px; font-size: 12px;
    color: var(--streak-color); margin-bottom: 4px; text-align: center;
}

/* Chips suggestions nom du foyer */
.foyer-name-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.foyer-name-chip {
    background: var(--bg-color); border: 1px solid var(--border-color);
    border-radius: 50px; padding: 5px 11px; font-size: 12px; color: var(--text-muted);
    cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.foyer-name-chip:hover { border-color: var(--success-color); color: var(--text-main); }

/* ─── Éditeur de profil ─── */
.profile-avatar-wrap {
    display: flex; justify-content: center; margin-bottom: 20px;
}
.profile-section-label {
    font-size: 11px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.6px;
    text-align: left; margin-bottom: 10px;
}

/* Grille des 8 avatars prédéfinis */
.avatar-grid {
    display: grid; grid-template-columns: repeat(8, 1fr);
    gap: 6px; margin-bottom: 4px;
}
.avatar-option {
    aspect-ratio: 1; border-radius: 12px; font-size: 22px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-color); border: 2px solid var(--border-color);
    cursor: pointer; transition: border-color 0.15s, transform 0.1s, background 0.15s;
}
.avatar-option:hover    { border-color: var(--text-muted); transform: scale(1.08); }
.avatar-option.selected { border-color: var(--success-color); background: var(--success-light); }

/* Upload photo (premium) */
.profile-upload-label {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer; margin-bottom: 4px;
}
.profile-upload-hint { font-size: 11px; color: var(--text-muted); margin-bottom: 0; }

/* Note "1 abonnement = tout le foyer" */
.upgrade-foyer-note {
    background: var(--success-light); border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px; padding: 10px 14px; font-size: 12px;
    color: var(--success-color); margin-bottom: 14px; text-align: center;
}

/* ========== MODALE UPGRADE ========== */
.upgrade-header { margin-bottom: 18px; }
.upgrade-icon   { font-size: 36px; margin-bottom: 6px; }

/* Plan Free — carte résumé */
.plan-free-card {
    background: var(--bg-color); border: 1px solid var(--border-color);
    border-radius: 16px; padding: 14px 16px; margin-bottom: 16px;
    text-align: left;
}
.plan-free-card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
}
.plan-free-name { font-size: 13px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.plan-current-badge {
    font-size: 10px; font-weight: 700; padding: 3px 10px;
    background: var(--success-light); color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3); border-radius: 50px;
    white-space: nowrap;
}

.plan-free-features { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.pf-col { display: flex; flex-direction: column; gap: 5px; }
.pf-item { font-size: 11.5px; line-height: 1.4; }
.pf-yes { color: var(--text-main); }
.pf-no  { color: var(--text-muted); }

/* Plans payants — 2 cartes */
.upgrade-cards { display: flex; gap: 12px; margin-bottom: 12px; align-items: flex-start; }

.upgrade-card {
    flex: 1; background: var(--bg-color); border: 1px solid var(--border-color);
    border-radius: 18px; padding: 16px 12px; text-align: center; position: relative;
}
.upgrade-card-featured {
    border-color: var(--streak-color);
    background: rgba(245, 158, 11, 0.05);
    flex: 1.1;
    padding-top: 22px;
}
.upgrade-card-badge {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: var(--streak-color); color: var(--bg-color);
    font-size: 9px; font-weight: 700; padding: 2px 8px;
    border-radius: 50px; white-space: nowrap;
}
.upgrade-card-label {
    font-size: 10px; color: var(--text-muted); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;
}
.upgrade-card-price {
    font-size: 17px; font-weight: 700; color: var(--text-main); margin-bottom: 2px;
}
.upgrade-card-yearly .upgrade-card-price { font-size: 20px; }
.upgrade-card-price span { font-size: 10px; color: var(--text-muted); font-weight: 400; }
.upgrade-card-sub { font-size: 10px; color: var(--text-muted); margin-bottom: 6px; }

/* Badge "Votre plan" dans les cartes payantes */
.upgrade-card .plan-current-badge { display: inline-block; margin-bottom: 6px; }

.upgrade-card-features {
    list-style: none; text-align: left; margin: 8px 0 12px;
    display: flex; flex-direction: column; gap: 4px;
}
.upgrade-card-features li { font-size: 10.5px; color: var(--text-main); line-height: 1.4; }

.btn-upgrade {
    background: var(--text-main); color: var(--bg-color);
    padding: 10px 8px; font-size: 12px; margin-bottom: 0; border-radius: 12px;
}
.upgrade-card-featured .btn-upgrade {
    background: linear-gradient(135deg, #F97316, #F59E0B); color: white;
}

/* Note fondateur */
.upgrade-founder-note {
    font-size: 11px;
    color: var(--streak-color);
    text-align: center;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(245,158,11,0.08);
    border-radius: 10px;
    line-height: 1.4;
}

/* Mobile : cartes empilées */
@media (max-width: 480px) {
    .upgrade-cards { flex-direction: column; }
    .upgrade-card-featured { flex: 1; padding-top: 22px; }
}

/* ========== MEMBRES ========== */
.members-list { display: flex; flex-direction: column; gap: 6px; }

.member-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; background: var(--bg-color);
    border-radius: 12px; border: 1px solid var(--border-color);
}
.member-item-name { flex: 1; font-size: 14px; font-weight: 500; text-align: left; }

.guest-avatar { font-size: 22px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.member-child-badge {
    font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
    background: rgba(16, 185, 129, 0.12); color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3); border-radius: 50px;
    padding: 2px 7px;
}
.member-delete-btn {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    padding: 4px 6px; border-radius: 6px; font-size: 12px;
    transition: color 0.2s, background 0.2s;
}
.member-delete-btn:hover { color: var(--danger-color); background: var(--danger-light); }

/* Assign button on task card */
.assign-btn {
    padding: 4px 5px; color: var(--text-muted); font-size: 11px;
    border-radius: 6px; cursor: pointer; transition: color 0.2s, background 0.2s;
}
.assign-btn:hover { color: var(--success-color); background: var(--success-light); }

/* Member picker modal */
.member-picker-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }

.member-pick-btn {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 12px 16px;
    background: var(--bg-color); border: 1px solid var(--border-color);
    border-radius: 14px; cursor: pointer; text-align: left;
    font-size: 15px; font-weight: 500; color: var(--text-main);
    transition: border-color 0.2s, background 0.2s;
}
.member-pick-btn:hover { border-color: var(--success-color); background: var(--success-light); }
.member-pick-btn-me { border-color: rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.05); }

/* ── BOUTON RÉACTION ───────────────────────────────────────── */
.react-btn {
  cursor: pointer;
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(16,185,129,0.1);
  border: 0.5px solid rgba(16,185,129,0.25);
  color: #10B981;
  font-weight: 600;
  transition: transform 0.15s, opacity 0.15s;
  line-height: 1.4;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.react-btn:hover { transform: scale(1.05); background: rgba(16,185,129,0.18); }

/* ── PICKER RÉACTION ───────────────────────────────────────── */
.reaction-picker {
  position: fixed;
  display: flex;
  gap: 2px;
  background: #1E293B;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 40px;
  padding: 6px 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  z-index: 9000;
  animation: reactionPickerIn 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reaction-picker button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 7px;
  border-radius: 14px;
  transition: transform 0.15s, background 0.15s;
  line-height: 1;
}
.reaction-picker button:hover { transform: scale(1.35); background: rgba(255,255,255,0.08); }
@keyframes reactionPickerIn {
  from { opacity: 0; transform: scale(0.65) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── PLUIE D'EMOJIS ────────────────────────────────────────── */
.emoji-rain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
  overflow: hidden;
}
.emoji-rain-particle {
  position: absolute;
  bottom: -5%;
  animation: emojiRise 2.5s ease-out forwards;
  user-select: none;
}
@keyframes emojiRise {
  0%   { transform: translateY(0) scale(0.5) rotate(-12deg); opacity: 1; }
  75%  { opacity: 1; }
  100% { transform: translateY(-105vh) scale(1.3) rotate(18deg); opacity: 0; }
}

/* ── TOAST RÉACTION ────────────────────────────────────────── */
.reaction-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-90px);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 28px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  z-index: 10000;
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  backdrop-filter: blur(10px);
  pointer-events: none;
}
.reaction-toast.visible { transform: translateX(-50%) translateY(0); }

/* ── BOUTON ⭐ PREMIUM DANS LE HEADER ──────────────────────── */
.btn-premium-peek {
  background: linear-gradient(135deg, rgba(251,191,36,0.15), rgba(251,191,36,0.05));
  border: 1px solid rgba(251,191,36,0.35);
  color: #FCD34D;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.btn-premium-peek:hover {
  background: linear-gradient(135deg, rgba(251,191,36,0.25), rgba(251,191,36,0.1));
  border-color: rgba(251,191,36,0.6);
}

/* ── SECTION ABONNEMENT (PARAMÈTRES) ──────────────────────── */
.subscription-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 12px;
  padding: 12px 14px;
}
.subscription-plan {
  font-size: 15px;
  font-weight: 600;
  color: var(--success-color);
}
.subscription-since {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── PLAN FREE — items compacts ────────────────────────────── */
.pf-item { font-size: 11.5px; }

/* ── BOUTON 🏆 HEADER ──────────────────────────────────────── */
.lb-header-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 8px;
  transition: transform 0.15s;
  line-height: 1;
  margin-right: 2px;
}
.lb-header-btn:hover { transform: scale(1.2); }

/* ── OVERLAY LEADERBOARD ───────────────────────────────────── */
.lb-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0);
  z-index: 1100;
  pointer-events: none;
  transition: background 0.3s;
}
.lb-overlay.open { background: rgba(0,0,0,0.5); pointer-events: auto; }

/* ── PANNEAU LEADERBOARD ───────────────────────────────────── */
.lb-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
  border-left: 1px solid rgba(255,255,255,0.08);
  z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.lb-panel.open { transform: translateX(0); }

.lb-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.lb-panel-title { font-size: 18px; font-weight: 700; }
.lb-close-btn {
  background: rgba(255,255,255,0.06);
  border: none; color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.lb-close-btn:hover { background: rgba(255,255,255,0.12); }

.lb-panel > * { flex-shrink: 0; }
.lb-list { flex: 1; overflow-y: auto; padding: 0 16px; }

/* ── CHALLENGE BANNER ──────────────────────────────────────── */
.challenge-active-box {
  margin: 12px 16px;
  background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(245,158,11,0.05));
  border: 1px solid rgba(245,158,11,0.35);
  border-radius: 16px;
  padding: 14px 16px;
}
.challenge-reward-row { display: flex; align-items: center; gap: 12px; }
.challenge-big-emoji  { font-size: 32px; line-height: 1; }
.challenge-reward-title { font-size: 14px; font-weight: 700; color: #FCD34D; margin-bottom: 4px; }
.challenge-countdown    { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.countdown-urgent       { color: #EF4444 !important; font-weight: 600; }

.no-challenge-box { margin: 12px 16px; text-align: center; }
.no-challenge-hint { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.btn-challenge-launch {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #000; border: none; border-radius: 12px;
  padding: 10px 20px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
  width: 100%;
}
.btn-challenge-launch:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(245,158,11,0.35); }

/* ── PODIUM ────────────────────────────────────────────────── */
.lb-podium  { padding: 16px 16px 8px; }
.lb-empty   { text-align: center; color: var(--text-muted); font-size: 13px; padding: 20px 0; }
.podium-row {
  display: flex; align-items: flex-end; justify-content: center; gap: 8px; height: 200px;
}
.podium-slot {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; max-width: 100px;
}
.podium-avatar { margin-bottom: 6px; }
.podium-av, .lb-av, .hof-av, .victory-av {
  border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.podium-av { width: 52px; height: 52px; font-size: 26px; }
.av-img    { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.av-emoji  { line-height: 1; }
.av-letter { background: #334155; font-weight: 700; font-size: 1.2em; color: #fff; }
.podium-medal  { font-size: 20px; margin-bottom: 2px; }
.podium-name   { font-size: 11px; font-weight: 600; text-align: center; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-pts    { font-size: 11px; color: var(--text-muted); }
.podium-base   { width: 100%; border-radius: 8px 8px 0 0; margin-top: 6px; }
.podium-0 .podium-base { background: linear-gradient(180deg, #F59E0B, #D97706); }
.podium-1 .podium-base { background: linear-gradient(180deg, #94A3B8, #64748B); }
.podium-2 .podium-base { background: linear-gradient(180deg, #CD7F32, #A0522D); }

/* ── LISTE CLASSEMENT ──────────────────────────────────────── */
.lb-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.lb-row-me { background: rgba(16,185,129,0.06); border-radius: 12px; padding: 10px 8px; }
.lb-rank   { font-size: 13px; font-weight: 700; color: var(--text-muted); width: 20px; text-align: center; }
.lb-av     { width: 36px; height: 36px; font-size: 18px; flex-shrink: 0; }
.lb-info   { flex: 1; min-width: 0; }
.lb-member-name { font-size: 13px; font-weight: 600; }
.lb-you    { font-size: 11px; color: var(--success-color); font-weight: 400; }
.lb-bar-wrap { height: 4px; background: rgba(255,255,255,0.08); border-radius: 4px; margin-top: 4px; overflow: hidden; }
.lb-bar    { height: 100%; background: linear-gradient(90deg, var(--success-color), #34D399); border-radius: 4px; transition: width 0.4s; }
.lb-pts-col   { text-align: right; flex-shrink: 0; }
.lb-month-pts { font-size: 14px; font-weight: 700; color: #FCD34D; }
.lb-week-pts  { font-size: 11px; color: var(--text-muted); }

/* ── HALL OF FAME ──────────────────────────────────────────── */
.hof-section { padding: 12px 16px 20px; flex-shrink: 0; }
.hof-toggle  {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  color: #fff; width: 100%; padding: 10px 14px; border-radius: 12px;
  font-size: 13px; font-weight: 600; cursor: pointer; text-align: left;
  display: flex; justify-content: space-between; transition: background 0.15s;
}
.hof-toggle:hover { background: rgba(255,255,255,0.08); }
.hof-list  { margin-top: 8px; }
.hof-empty { font-size: 12px; color: var(--text-muted); padding: 8px 0; }
.hof-row   { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.hof-av    { width: 32px; height: 32px; font-size: 16px; flex-shrink: 0; }
.hof-info  { flex: 1; min-width: 0; }
.hof-winner { font-size: 13px; font-weight: 600; }
.hof-reward { color: #FCD34D; font-size: 12px; }
.hof-month  { font-size: 11px; color: var(--text-muted); }
.hof-medal  { font-size: 18px; flex-shrink: 0; }

/* ── MODALE DÉFI ───────────────────────────────────────────── */
.challenge-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.challenge-chip  {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; border-radius: 20px; padding: 6px 12px; font-size: 12px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.challenge-chip:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.25); }
.challenge-duration-row { display: flex; gap: 8px; margin: 12px 0 4px; }
.challenge-dur-btn {
  flex: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; border-radius: 12px; padding: 10px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.challenge-dur-btn.active { background: rgba(16,185,129,0.2); border-color: var(--success-color); color: var(--success-color); }
.challenge-preview {
  background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3);
  border-radius: 12px; padding: 12px; font-size: 13px; color: #FCD34D;
  text-align: center; margin: 10px 0; min-height: 42px;
}

/* ── BADGE POINTS FLOTTANT ─────────────────────────────────── */
.points-badge {
    position: absolute; top: -8px; right: 12px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #000; font-size: 11px; font-weight: 800;
    padding: 3px 8px; border-radius: 50px;
    box-shadow: 0 0 12px rgba(245,158,11,0.5);
    animation: pointsPop 1.6s ease-out forwards;
    pointer-events: none;
    z-index: 50;
    white-space: nowrap;
}
@keyframes pointsPop {
    0%   { opacity: 0; transform: translateY(2px) scale(0.6); }
    12%  { opacity: 1; transform: translateY(-6px) scale(1.25); }
    35%  { transform: translateY(-10px) scale(1); }
    78%  { opacity: 1; transform: translateY(-16px) scale(1); }
    100% { opacity: 0; transform: translateY(-26px) scale(0.85); }
}

/* ── CONFETTIS ─────────────────────────────────────────────── */
.confetti-overlay {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9980; overflow: hidden;
}
.confetti-piece {
  position: absolute; top: -20px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0%   { transform: translateY(0) rotate(0deg);    opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ── CARTE VICTOIRE ────────────────────────────────────────── */
.victory-card {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.75); z-index: 9985;
  backdrop-filter: blur(6px);
}
.victory-inner {
  background: linear-gradient(135deg, #1E293B, #0F172A);
  border: 2px solid #F59E0B;
  border-radius: 24px; padding: 32px 28px;
  text-align: center; max-width: 320px; width: 90%;
  animation: victoryPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 60px rgba(245,158,11,0.25);
}
@keyframes victoryPop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.victory-avatar { margin-bottom: 4px; display: flex; justify-content: center; }
.victory-av { width: 80px; height: 80px; font-size: 48px; }
.victory-crown { font-size: 28px; margin-bottom: 8px; animation: crownBounce 0.8s ease-in-out infinite alternate; }
@keyframes crownBounce { from { transform: translateY(0); } to { transform: translateY(-6px); } }
.victory-name   { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.victory-reward { font-size: 14px; color: #FCD34D; font-weight: 600; margin-bottom: 4px; }
.victory-points { font-size: 12px; color: var(--text-muted); }

.pick-avatar-emoji { font-size: 24px; width: 28px; text-align: center; flex-shrink: 0; }

/* ========== TÂCHE PONCTUELLE ========== */
.ponctuelle-badge {
    display: inline-block; font-size: 10px; font-weight: 600;
    color: #A78BFA; background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 50px; padding: 1px 7px; margin-top: 4px;
}
.task-card.done .ponctuelle-badge { display: none; }

.diff-badge {
    display: inline-block; font-size: 10px; font-weight: 600;
    border-radius: 50px; padding: 1px 7px; margin-top: 3px;
}
.diff-badge-easy {
    color: #34D399; background: rgba(52,211,153,0.1);
    border: 1px solid rgba(52,211,153,0.25);
}
.diff-badge-hard {
    color: #F97316; background: rgba(249,115,22,0.1);
    border: 1px solid rgba(249,115,22,0.25);
}
.task-card.done .diff-badge { display: none; }

/* Toggle récurrent dans les modales */
.recurring-toggle-row {
    display: flex; align-items: center; gap: 8px;
    margin: -2px 0 12px; text-align: left;
}
.recurring-toggle-row input[type="checkbox"] {
    width: auto; margin: 0; padding: 0; flex-shrink: 0;
    accent-color: var(--success-color);
}
.recurring-toggle-row label {
    font-size: 13px; color: var(--text-muted); cursor: pointer; margin: 0;
}

/* ========== DIFFICULTÉ TÂCHE ========== */
.difficulty-row {
    margin: 4px 0 12px;
}
.difficulty-label {
    display: block; font-size: 12px; color: var(--text-muted);
    margin-bottom: 6px; text-align: left;
}
.difficulty-btns {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px;
}
.diff-btn {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 4px; border-radius: 10px; border: 1.5px solid var(--border-color);
    background: rgba(255,255,255,0.03); color: var(--text-muted);
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: all 0.18s ease;
}
.diff-btn:hover { border-color: rgba(16,185,129,0.4); color: var(--text-main); }
.diff-btn-active {
    border-color: var(--success-color); color: var(--text-main);
    background: rgba(16,185,129,0.12);
}
.diff-pts {
    font-size: 10px; font-weight: 700; color: #F59E0B; letter-spacing: 0.3px;
}
.diff-btn-active .diff-pts { color: var(--success-color); }

/* ========== STATS JOURNALIÈRES — grille 4 colonnes ========== */
.stats-bar {
    margin-bottom: 14px;
    background: rgba(255,255,255,0.04);
    border: 0.5px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
}
/* Grille 4 colonnes avec dividers CSS */
.stats-4col {
    display: grid;
    grid-template-columns: 1fr 0.5px 1fr 0.5px 1fr 0.5px 1fr;
    align-items: center;
}
.stats-divider-v {
    background: rgba(255,255,255,0.1);
    width: 0.5px;
    align-self: stretch;
}
.stats-col {
    display: flex; flex-direction: column; align-items: center;
    padding: 10px 4px;
    gap: 2px;
}
.stats-col-val {
    font-size: 16px; font-weight: 700; color: var(--text-main);
    line-height: 1;
}
.stats-col-val.col-done    { color: #10B981; }
.stats-col-val.col-remain  { color: var(--text-muted); }
.stats-col-val.col-pts     { color: #F59E0B; }
.stats-col-val.col-pct     { color: #06B6D4; }
.stats-col-lbl {
    font-size: 9px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.8px; color: rgba(255,255,255,0.35);
}

/* Anciennes classes conservées pour compatibilité éventuelle */
.stats-progress {
    font-size: 12px; font-weight: 700; color: var(--text-muted);
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: 50px; padding: 3px 10px;
}
.stat-chip {
    font-size: 12px; color: var(--text-muted);
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: 50px; padding: 3px 10px;
}
.stat-chip strong { color: var(--success-color); }
.stat-chip-me { border-color: rgba(16, 185, 129, 0.3); color: var(--text-main); }

/* ── Member dot ── */
.member-dot {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%;
    font-size: 9px; font-weight: 700; color: #fff;
    background: var(--success-color);
    flex-shrink: 0; line-height: 1;
    text-transform: uppercase;
}

/* ── VIEW TOGGLE ───────────────────────────────────────────── */
.view-toggle {
    display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto;
    scrollbar-width: none; -ms-overflow-style: none;
}
.view-toggle::-webkit-scrollbar { display: none; }
.view-toggle-btn {
    background: rgba(255,255,255,0.04); border: 0.5px solid rgba(255,255,255,0.08);
    color: #64748B; padding: 8px 16px; border-radius: 50px;
    font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
    transition: all 0.2s;
}
.view-toggle-btn.active {
    background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.3);
    color: #10B981;
}

/* ── WEEK PLANNING CONTAINER ───────────────────────────────── */
#weekPlanning { padding-bottom: 80px; }

/* ── WEEK NAV ──────────────────────────────────────────────── */
.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 12px;
  gap: 8px;
}
.week-nav-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.week-nav-btn:hover { background: rgba(255,255,255,0.14); }
.week-nav-label { font-size: 13px; font-weight: 600; text-align: center; flex: 1; }

/* ── WEEK GRID ─────────────────────────────────────────────── */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
}
@media (max-width: 600px) {
  .week-grid {
    grid-template-columns: repeat(7, minmax(100px, 1fr));
  }
}

/* ── DAY COLUMN ────────────────────────────────────────────── */
.week-day-col {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 8px 6px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scroll-snap-align: start;
}
.week-day-today {
  border-color: rgba(16,185,129,0.4);
  background: rgba(16,185,129,0.04);
}
.week-day-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 6px;
}
.week-day-name { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.week-day-num  { font-size: 16px; font-weight: 700; margin-top: 2px; }
.today-num     { color: var(--success-color); }

/* ── PLANNED TASK CARD ─────────────────────────────────────── */
.week-task-list { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.planned-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 6px 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.15s;
}
.planned-card:hover { background: rgba(255,255,255,0.09); }
.planned-done {
  opacity: 0.55;
  background: rgba(16,185,129,0.08) !important;
  border-color: rgba(16,185,129,0.25) !important;
}
.planned-icon  { font-size: 14px; flex-shrink: 0; }
.planned-info  { flex: 1; min-width: 0; }
.planned-title { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.planned-done .planned-title { text-decoration: line-through; }
.planned-member {
  display: flex; align-items: center; gap: 3px; margin-top: 2px;
  font-size: 10px; color: var(--text-muted);
}
.planned-av, .planned-av-img { width: 14px; height: 14px; border-radius: 50%; object-fit: cover; }
.planned-av-emoji { font-size: 12px; }
.planned-av-letter { width: 14px; height: 14px; border-radius: 50%; background: #334155; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; }
.planned-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: none; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 9px;
  transition: background 0.15s, border-color 0.15s;
}
.planned-check:hover { border-color: var(--success-color); }
.planned-check-done { background: var(--success-color); border-color: var(--success-color); color: #fff; }

/* ── ADD BUTTON PER DAY ────────────────────────────────────── */
.week-add-btn {
  margin-top: auto;
  width: 100%; height: 26px;
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 16px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.week-add-btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.3); }

/* ── MANAGE RECURRING BUTTON ───────────────────────────────── */
.btn-manage-rec {
  display: block; width: 100%; margin-top: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted); border-radius: 12px;
  padding: 10px 16px; font-size: 13px; cursor: pointer;
  transition: background 0.15s;
}
.btn-manage-rec:hover { background: rgba(255,255,255,0.08); }

/* ── PLAN MODAL ────────────────────────────────────────────── */
.plan-days-row { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
.plan-day-btn {
  flex: 1; min-width: 36px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted); border-radius: 10px;
  padding: 7px 4px; font-size: 11px; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
}
.plan-day-btn.active { background: rgba(16,185,129,0.2); border-color: var(--success-color); color: var(--success-color); }
.plan-rec-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.plan-radio-label { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.plan-radio-label input { accent-color: var(--success-color); }
.plan-member-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.plan-member-btn {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff; border-radius: 20px; padding: 5px 10px;
  font-size: 12px; cursor: pointer; transition: all 0.15s;
}
.plan-member-btn.active { background: rgba(16,185,129,0.2); border-color: var(--success-color); }
.plan-av-img    { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.plan-av-emoji  { font-size: 16px; }
.plan-av-letter { width: 20px; height: 20px; border-radius: 50%; background: #334155; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.plan-preview {
  background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.2);
  border-radius: 12px; padding: 12px 14px;
  font-size: 13px; color: var(--success-color);
  white-space: pre-wrap; min-height: 40px; margin: 10px 0;
}

/* ── MANAGE RECURRING LIST ─────────────────────────────────── */
.recurring-list { display: flex; flex-direction: column; gap: 8px; }
.rec-item {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 12px 14px;
}
.rec-icon  { font-size: 22px; }
.rec-info  { flex: 1; min-width: 0; }
.rec-title { font-size: 14px; font-weight: 600; }
.rec-meta  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.rec-delete-btn { background: none; border: none; font-size: 18px; cursor: pointer; opacity: 0.6; }
.rec-delete-btn:hover { opacity: 1; }

/* ========== FOND D'ÉCRAN PREMIUM ========== */
.ambiance-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.ambiance-swatch {
    aspect-ratio: 1.6 / 1;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
    display: flex; flex-direction: column;
    align-items: center; justify-content: flex-end;
    padding-bottom: 4px;
}
.ambiance-swatch:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.ambiance-swatch.active {
    border-color: #10B981;
    box-shadow: 0 0 0 1px #10B981, 0 4px 16px rgba(16,185,129,0.35);
}
.ambiance-swatch-emoji {
    font-size: 16px;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.ambiance-swatch-label {
    font-size: 9px;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.ambiance-custom-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.ambiance-upload-btn {
    flex: 1;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px dashed rgba(255,255,255,0.2);
    color: var(--text-muted);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.ambiance-upload-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.35);
    color: var(--text-main);
}
.ambiance-reset-btn {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.ambiance-reset-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-main);
}
.ambiance-preview-bar {
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--success-color);
    text-align: center;
    margin-bottom: 4px;
}

/* ========== PARRAINAGE ========== */
.referral-banner {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(234,179,8,0.12));
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 16px;
    padding: 20px 16px;
    margin-bottom: 16px;
    position: relative;
    animation: referralPulse 2s ease-in-out infinite alternate;
    text-align: center;
}
@keyframes referralPulse {
    from { box-shadow: 0 0 0 0 rgba(245,158,11,0.2); }
    to   { box-shadow: 0 0 20px 4px rgba(245,158,11,0.15); }
}
.referral-banner-icon { font-size: 36px; }
.referral-banner-text { display: flex; flex-direction: column; gap: 4px; }
.referral-banner-text strong { color: #F59E0B; font-size: 15px; }
.referral-banner-text span { color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.referral-banner-close {
    position: absolute; top: 8px; right: 10px;
    background: none; border: none; color: var(--text-muted);
    font-size: 18px; cursor: pointer; padding: 4px;
}
.btn-referral-trial {
    background: linear-gradient(135deg, #F59E0B, #D97706) !important;
    color: #000 !important;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 6px;
    width: 100%;
}
.btn-referral-trial:active { transform: scale(0.97); }

/* Badge trial dans modale upgrade */
.referral-trial-badge {
    display: block;
    background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(234,179,8,0.12));
    border: 1px solid rgba(245,158,11,0.4);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #F59E0B;
    margin-top: 10px;
    animation: referralPulse 2s ease-in-out infinite alternate;
}

/* Section parrainage dans paramètres */
.referral-hint {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}
.referral-link-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}
.referral-link-input {
    flex: 1;
    background: var(--bg-color) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
}
.btn-referral-copy {
    background: var(--success-color);
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
}
.btn-referral-copy:active { transform: scale(0.93); }
.referral-stats {
    display: none;
    align-items: center;
    gap: 6px;
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 10px;
}
.referral-stats span {
    font-size: 13px;
    color: var(--success-color);
    font-weight: 600;
}
.btn-referral-share {
    margin-top: 4px;
}

/* ========== CGV / RGPD ========== */
.cgv-content {
    text-align: center;
    margin-top: 40px;
    animation: fadeIn 0.4s ease-out;
}
.cgv-logo {
    color: #F43F5E;
    background: rgba(244, 63, 94, 0.12);
    margin-bottom: 16px;
}
.cgv-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}
.cgv-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.6;
}
.cgv-checks {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    margin-bottom: 10px;
}
.cgv-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 16px;
    transition: border-color 0.2s, background 0.2s;
}
.cgv-label:has(input:checked) {
    border-color: var(--success-color);
    background: var(--success-light);
}
/* Cache la checkbox native */
.cgv-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
/* Checkbox custom */
.cgv-box {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    border: 2px solid var(--border-color);
    background: var(--bg-color);
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}
.cgv-label:has(input:checked) .cgv-box {
    border-color: var(--success-color);
    background: var(--success-color);
}
.cgv-label:has(input:checked) .cgv-box::after {
    content: '';
    display: block;
    width: 6px;
    height: 10px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
}
.cgv-text {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.5;
}
.cgv-link {
    color: var(--success-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cgv-required {
    color: #F43F5E;
    font-weight: 700;
    margin-left: 2px;
}
.cgv-optional {
    color: var(--text-muted);
    font-size: 12px;
}
.cgv-required-hint {
    font-size: 11px;
    color: var(--text-muted);
    text-align: left;
    margin-bottom: 24px;
}
.btn-cgv-start {
    background: var(--border-color);
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 18px;
    cursor: not-allowed;
    transition: background 0.3s, color 0.3s, transform 0.1s, box-shadow 0.3s;
}
.btn-cgv-start:not(:disabled) {
    background: var(--success-color);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
    animation: cgvBtnPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-cgv-start:not(:disabled):active {
    transform: scale(0.97);
}
@keyframes cgvBtnPop {
    from { transform: scale(0.92); }
    to   { transform: scale(1); }
}

/* ── DAY STATS WIDGET ──────────────────────────────────────── */
.day-stats-widget {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.15);
    border-radius: 16px; padding: 12px 16px; margin-bottom: 16px;
}
.day-stats-left { display: flex; gap: 16px; }
.day-stat { display: flex; flex-direction: column; align-items: center; }
.day-stat-value { font-size: 18px; font-weight: 700; color: #F1F5F9; }
.day-stat-value.day-stat-pts { color: #10B981; }
.day-stat-label { font-size: 10px; color: #64748B; text-transform: uppercase; letter-spacing: 0.3px; }
.day-progress-wrap { flex: 1; max-width: 100px; margin-left: 16px; }
.day-progress-bar { height: 6px; background: rgba(255,255,255,0.08); border-radius: 6px; overflow: hidden; }
.day-progress-fill { height: 100%; background: linear-gradient(90deg, #10B981, #34D399); border-radius: 6px; transition: width 0.4s ease; }
.day-progress-pct { font-size: 11px; color: #10B981; font-weight: 600; text-align: right; margin-top: 3px; }

/* ── SECTION SEPARATORS ────────────────────────────────────── */
.section-separator {
    color: rgba(255,255,255,0.4);
    font-size: 11px; text-transform: uppercase;
    letter-spacing: 1px; font-weight: 600;
    margin: 16px 0 10px; padding-left: 4px;
}

/* ========== ONBOARDING TUTORIAL ========== */
#onboardingOverlay {
    position: fixed; inset: 0; z-index: 99999;
    pointer-events: none; /* le conteneur ne bloque rien */
    display: none;
}

.ob-rect {
    position: fixed;
    background: rgba(0,0,0,0.78);
    pointer-events: auto; /* les zones sombres bloquent les clics */
    z-index: 99999;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}

.ob-highlight {
    position: fixed;
    border-radius: 16px;
    border: 2px solid rgba(16,185,129,0.85);
    box-shadow: 0 0 0 3px rgba(16,185,129,0.18), 0 0 24px rgba(16,185,129,0.45);
    pointer-events: none;
    z-index: 100000;
    animation: obHighlightPulse 1.5s ease-in-out infinite;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
@keyframes obHighlightPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(16,185,129,0.18), 0 0 24px rgba(16,185,129,0.45); }
    50%       { box-shadow: 0 0 0 5px rgba(16,185,129,0.10), 0 0 36px rgba(16,185,129,0.25); }
}

.onboarding-card {
    background: linear-gradient(160deg, #1a2332 0%, #0f1923 100%);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 20px;
    padding: 20px 18px 16px;
    text-align: center;
    position: fixed;
    z-index: 100001;
    pointer-events: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 30px rgba(16,185,129,0.1);
    animation: obCardIn 0.4s cubic-bezier(0.34,1.2,0.64,1);
    overflow: visible; /* pour que les flèches ::before/::after débordent */
}
@keyframes obCardIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.onboarding-robot {
    margin: -40px auto 10px;
    width: 90px; height: 90px;
    position: relative;
}
.robot-neo {
    position: relative;
    width: 100%; height: 100%;
}
.robot-head {
    width: 64px; height: 64px;
    background: radial-gradient(circle at 30% 30%, #1a2c42, #0a0f18);
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
    box-shadow: inset -3px -3px 10px rgba(0,0,0,0.5), 0 0 15px rgba(16,185,129,0.15);
    animation: robotNeoFloat 3.5s ease-in-out infinite;
    z-index: 2;
}
.robot-visor {
    position: absolute;
    top: 38%; left: 12%; width: 76%; height: 18px;
    background: rgba(0,0,0,0.85);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    border: 0.5px solid rgba(16,185,129,0.4);
    overflow: hidden;
}
.robot-eyes {
    display: flex; gap: 10px; align-items: center;
    transition: opacity 0.2s;
}
.robot-eye-l, .robot-eye-r {
    font-size: 12px; font-weight: 700;
    color: #10B981;
    text-shadow: 0 0 8px #10B981, 0 0 16px rgba(16,185,129,0.5);
    font-family: monospace;
    line-height: 1;
    animation: eyePulse 2.5s ease-in-out infinite;
}
.robot-body {
    width: 36px; height: 22px;
    background: linear-gradient(180deg, #1a2c42 0%, transparent 100%);
    border-radius: 50% 50% 20% 20%;
    margin: -5px auto 0;
    opacity: 0.7;
}
.robot-ring {
    position: absolute;
    bottom: 2px; left: 50%;
    transform: translateX(-50%) rotateX(75deg);
    width: 70px; height: 70px;
    border: 1.5px solid #10B981;
    border-radius: 50%;
    opacity: 0.2;
    animation: ringPulseNeo 2s ease-out infinite;
}
.robot-shadow {
    width: 40px; height: 6px;
    background: #10B981;
    filter: blur(10px);
    margin: 4px auto 0;
    opacity: 0.15;
    animation: shadowSyncNeo 3.5s ease-in-out infinite;
}
@keyframes robotNeoFloat {
    0%, 100% { transform: translateY(0) rotate(1deg); }
    50% { transform: translateY(-10px) rotate(-1deg); }
}
@keyframes eyePulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}
@keyframes ringPulseNeo {
    0% { transform: translateX(-50%) rotateX(75deg) scale(0.85); opacity: 0.25; }
    100% { transform: translateX(-50%) rotateX(75deg) scale(1.3); opacity: 0; }
}
@keyframes shadowSyncNeo {
    0%, 100% { transform: scale(1.1); opacity: 0.1; }
    50% { transform: scale(0.8); opacity: 0.25; }
}

.onboarding-bubble {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
    color: #F1F5F9;
    margin-bottom: 12px;
    text-align: left;
}
.onboarding-dots {
    display: flex; justify-content: center; gap: 6px; margin-bottom: 10px;
}
.onboarding-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.15);
    transition: all 0.3s;
}
.onboarding-dot.active {
    background: #10B981; width: 20px; border-radius: 4px;
}
.onboarding-btn {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white; border: none; border-radius: 12px;
    padding: 12px 24px; font-size: 14px; font-weight: 600;
    cursor: pointer; width: 100%;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 16px rgba(16,185,129,0.3);
}
.onboarding-btn:active { transform: scale(0.97); }

/* ── Flèches de la carte onboarding ── */
.onboarding-card.ob-arrow-down::before,
.onboarding-card.ob-arrow-up::before,
.onboarding-card.ob-arrow-down::after,
.onboarding-card.ob-arrow-up::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-style: solid;
}
/* Flèche vers le BAS (carte au-dessus du trou) */
.onboarding-card.ob-arrow-down::before {
    bottom: -15px;
    border-width: 13px 13px 0 13px;
    border-color: rgba(16,185,129,0.3) transparent transparent transparent;
}
.onboarding-card.ob-arrow-down::after {
    bottom: -12px;
    border-width: 11px 11px 0 11px;
    border-color: #0f1923 transparent transparent transparent;
}
/* Flèche vers le HAUT (carte en dessous du trou) */
.onboarding-card.ob-arrow-up::before {
    top: -15px;
    border-width: 0 13px 13px 13px;
    border-color: transparent transparent rgba(16,185,129,0.3) transparent;
}
.onboarding-card.ob-arrow-up::after {
    top: -12px;
    border-width: 0 11px 11px 11px;
    border-color: transparent transparent #1a2332 transparent;
}

/* ── Robot comment dans le classement ─────────────────────── */
.robot-lb-comment {
    display: flex; align-items: center; gap: 10px;
    margin: 12px 16px; padding: 10px 14px;
    background: rgba(16,185,129,0.06);
    border: 1px solid rgba(16,185,129,0.15);
    border-radius: 12px;
    font-size: 12px; color: #94A3B8; line-height: 1.4;
}
.robot-lb-eyes {
    flex-shrink: 0;
    width: 32px; height: 32px;
    background: radial-gradient(circle at 30% 30%, #1a2c42, #0a0f18);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 700; color: #10B981;
    text-shadow: 0 0 6px #10B981;
    font-family: monospace;
    letter-spacing: 2px;
}

/* ── Robot Fait — Message Popup ───────────────────────────── */
.robot-message-popup {
    position: fixed;
    top: 20px; left: 50%;
    transform: translateX(-50%) translateY(-100px);
    display: flex; align-items: center; gap: 12px;
    background: linear-gradient(160deg, #1a2332 0%, #0f1923 100%);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 18px;
    padding: 12px 18px;
    max-width: 340px; width: calc(100% - 40px);
    z-index: 99000;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 20px rgba(16,185,129,0.1);
    transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}
.robot-message-popup.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.robot-msg-head {
    width: 38px; height: 38px; flex-shrink: 0;
    background: radial-gradient(circle at 30% 30%, #1a2c42, #0a0f18);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 10px rgba(16,185,129,0.15);
}
.robot-msg-visor {
    background: rgba(0,0,0,0.85);
    border-radius: 8px;
    padding: 3px 6px;
    display: flex; gap: 5px; align-items: center;
    border: 0.5px solid rgba(16,185,129,0.3);
}
.robot-msg-eye {
    font-size: 9px; font-weight: 700;
    color: #10B981;
    text-shadow: 0 0 6px #10B981;
    font-family: monospace;
}
.robot-msg-text {
    font-size: 13px; color: #F1F5F9;
    line-height: 1.4;
}
