/* 🎨 Styles pour les nouvelles fonctionnalités */

/* === CALENDRIER MENSUEL === */
.cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}
.cal-title {
    font-weight: 700;
    text-transform: capitalize;
}
.cal-nav {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.cal-nav:disabled { opacity: .25; cursor: default; }
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.cal-dow {
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    opacity: .5;
}
.cal-cell {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    background: color-mix(in srgb, var(--text-secondary) 8%, transparent);
}
/* Jours des mois voisins : la grille garde sa forme, sans rien afficher. */
.cal-out { background: transparent; }
.cal-future { opacity: .35; }
.cal-num {
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}
/* Un jour avec des cacas se voit d'un coup d'œil, sans dégradé à décoder. */
.cal-done {
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    cursor: pointer;
}
.cal-done:hover { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.cal-today {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}
.cal-dots {
    display: flex;
    align-items: center;
    gap: 1px;
    font-size: 8px;
    line-height: 1;
}
.cal-x {
    font-size: 9px;
    font-weight: 700;
    color: var(--accent);
}

/* === RÉACTIONS FEED === */
.reaction-bar {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 7px;
    border-radius: 99px;
    font-size: 12px;
    border: 1.5px solid transparent;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    cursor: pointer;
    transition: all .15s;
    user-select: none;
}
.reaction-btn.mine {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 20%, transparent);
    font-weight: bold;
}
.reaction-btn:active { transform: scale(.92); }

/* === SKELETON LOADING (feature 6) === */
@keyframes skeleton-wave {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton {
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--accent) 7%, rgba(0,0,0,0.06)) 25%,
        color-mix(in srgb, var(--accent) 16%, rgba(0,0,0,0.06)) 50%,
        color-mix(in srgb, var(--accent) 7%, rgba(0,0,0,0.06)) 75%);
    background-size: 200% 100%;
    animation: skeleton-wave 1.4s ease-in-out infinite;
    border-radius: 0.75rem;
}
.skeleton-line  { height: 12px; margin-bottom: 8px; }
.skeleton-short { width: 45%; }
.skeleton-med   { width: 70%; }
.skeleton-full  { width: 100%; }
.skeleton-circle { border-radius: 50%; width: 40px; height: 40px; flex-shrink: 0; }

/* === PULL-TO-REFRESH (feature 2) === */
#ptr-indicator {
    position: sticky;
    top: 0;
    left: 0; right: 0;
    z-index: 20;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    font-weight: bold;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, var(--card-bg));
    border-radius: 0 0 1rem 1rem;
    transition: transform .2s;
}

/* === IMPRESSION PDF (feature 8) === */
@media print {
    body > * { display: none !important; }
    #print-report { display: block !important; }
    #print-report {
        font-family: 'Georgia', serif;
        font-size: 12pt;
        color: #000;
        max-width: 100%;
        padding: 20px;
    }
    .print-section { page-break-inside: avoid; margin-bottom: 24px; }
    .print-bar-bg  { background: #e5e7eb; height: 8px; border-radius: 99px; overflow: hidden; }
    .print-bar-fill { background: #d97706; height: 100%; border-radius: 99px; }
}
#print-report { display: none; }

/* === GRAPHIQUES ===
   Une seule teinte (celle du thème) + de l'encre neutre. Les marques restent
   fines, les valeurs s'écrivent en texte plutôt qu'en couleur, et seule la
   donnée saillante (pic, record) passe en accent plein. */
.chart-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1.5rem;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.chart-title {
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: 2px;
}
.chart-sub {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.4;
}

/* --- Barres horizontales (heures, couleurs, textures) --- */
.hb-chart { display: flex; flex-direction: column; gap: 6px; }
.hb-row { display: grid; grid-template-columns: 76px 1fr 36px; align-items: center; gap: 8px; }
.hb-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hb-label-peak { color: var(--text-primary); font-weight: 700; }
.hb-track {
    height: 8px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--text-secondary) 12%, transparent);
    overflow: hidden;
}
.hb-fill {
    height: 100%;
    border-radius: 99px;                 /* extrémité arrondie, ancrée à zéro */
    background: color-mix(in srgb, var(--accent) 45%, transparent);
    transition: width .4s ease;
}
.hb-peak { background: var(--accent); }
.hb-value {
    font-size: 11px;
    font-weight: 700;
    text-align: right;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* --- Colonnes verticales (jours de la semaine) --- */
.vb-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; }
.vb-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.vb-value {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}
.vb-track {
    width: 100%;
    height: 96px;
    display: flex;
    align-items: flex-end;
    border-radius: 6px;
    background: color-mix(in srgb, var(--text-secondary) 8%, transparent);
}
.vb-fill {
    width: 100%;
    border-radius: 6px 6px 0 0;
    background: color-mix(in srgb, var(--accent) 45%, transparent);
    transition: height .4s ease;
}
.vb-peak { background: var(--accent); }
.vb-label { font-size: 11px; color: var(--text-secondary); }
.vb-label-peak { color: var(--text-primary); font-weight: 700; }

/* --- Courbe 12 mois --- */
.tr-svg { width: 100%; height: 110px; display: block; overflow: visible; }
.tr-area { fill: color-mix(in srgb, var(--accent) 14%, transparent); stroke: none; }
.tr-line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;   /* le viewBox s'étire, pas le trait */
}
.tr-dot {
    fill: var(--accent);
    stroke: var(--card-bg);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}
.tr-axis {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    margin-top: 4px;
    font-size: 10px;
    text-align: center;
    color: var(--text-secondary);
    opacity: .7;
}
.tr-label-now { font-weight: 700; opacity: 1; color: var(--accent); }
.tr-up   { color: #16a34a; font-weight: 700; }
.tr-down { color: #dc2626; font-weight: 700; }

/* === PREDICTIONS === */
.predictions-section {
    padding: 0;
    background: transparent;
    border-radius: 0;
    margin: 0;
}

.prediction-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1.5rem;
    padding: 20px;
    margin: 12px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.main-prediction {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 30px;
}

.prediction-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.prediction-text {
    font-size: 18px;
    font-weight: 600;
    margin: 10px 0;
}

.confidence-bar {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    margin: 15px 0 5px 0;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: white;
    border-radius: 10px;
    transition: width 0.8s ease;
}

.confidence-label {
    font-size: 12px;
    opacity: 0.9;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--accent);
    margin: 10px 0;
}

.stat-detail {
    color: var(--text-secondary);
    font-size: 14px;
}

/* === ACHIEVEMENTS === */
.achievements-section {
    padding: 0;
    background: transparent;
    border-radius: 0;
    margin: 0;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.achievement-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.3s ease;
}

.achievement-card.unlocked {
    border: 2px solid var(--accent);
}

.achievement-card.locked {
    opacity: 0.5;
    filter: grayscale(100%);
}

.achievement-card:hover {
    transform: translateY(-2px);
}

.achievement-icon {
    font-size: 40px;
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.achievement-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.achievement-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.achievement-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.achievement-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.achievement-content .achievement-icon {
    font-size: 60px;
}

.achievement-details h3 {
    margin: 0 0 10px 0;
}

/* === ANIMATIONS === */
.dancing-poop {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    z-index: 9999;
    pointer-events: none;
}

.dancing-poop.dancing {
    animation: dance 0.5s ease infinite;
}

@keyframes dance {
    0%, 100% { transform: translate(-50%, -50%) rotate(-10deg); }
    50% { transform: translate(-50%, -50%) rotate(10deg) scale(1.2); }
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

.confetti {
    position: absolute;
    top: -10px;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.streak-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 30px 50px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    text-align: center;
}

.streak-animation.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.streak-icon {
    font-size: 60px;
    animation: pulse 0.6s ease infinite;
}

.streak-text {
    font-size: 24px;
    font-weight: bold;
    margin-top: 10px;
}

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

.fireworks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

.firework {
    position: absolute;
}

.firework-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffd700;
    border-radius: 50%;
    animation: firework-explode 1s ease-out forwards;
}

@keyframes firework-explode {
    to {
        transform: translate(var(--x), var(--y));
        opacity: 0;
    }
}

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

@keyframes pulse-animation {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.bounce {
    animation: bounce-animation 1s ease;
}

@keyframes bounce-animation {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

.shake {
    animation: shake-animation 0.5s ease;
}

@keyframes shake-animation {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.spin {
    animation: spin-animation 1s ease;
}

@keyframes spin-animation {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* === SOUND CONTROL === */
.sound-control {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    margin: 10px 0;
}

#volumeSlider {
    flex: 1;
    height: 6px;
    border-radius: 5px;
    outline: none;
}

#volumeLabel {
    min-width: 40px;
    text-align: right;
    font-weight: 600;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .prediction-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 24px;
    }
}

/* ============================================================ */
/*  v2.11.0 — ENRICHISSEMENTS SOCIAUX                           */
/* ============================================================ */

/* --- Toasts --- */
#ui-toast-host {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: max-content; max-width: 92vw;
}
.ui-toast {
  display: flex; align-items: center; gap: 8px;
  background: var(--card-bg, #fff); color: var(--text-primary, #0f172a);
  border: 1.5px solid var(--card-border, rgba(0,0,0,.08));
  border-radius: 999px; padding: 10px 16px; font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  opacity: 0; transform: translateY(12px) scale(.96); transition: all .28s cubic-bezier(.4,0,.2,1);
}
.ui-toast.show { opacity: 1; transform: translateY(0) scale(1); }
.ui-toast-success { border-color: #22c55e; }
.ui-toast-error   { border-color: #ef4444; }
.ui-toast-party   { border-color: var(--accent, #f97316); }
.ui-toast-icon { font-size: 15px; }

/* --- Modales --- */
.ui-modal-overlay {
  position: fixed; inset: 0; z-index: 190; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.6); backdrop-filter: blur(6px); padding: 20px;
  opacity: 0; transition: opacity .2s ease;
}
.ui-modal-overlay.show { opacity: 1; }
.ui-modal {
  background: var(--card-bg, #fff); color: var(--text-primary, #0f172a);
  border-radius: 1.5rem; padding: 22px; width: 100%; max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  transform: translateY(16px) scale(.97); transition: transform .22s cubic-bezier(.4,0,.2,1);
}
.ui-modal-overlay.show .ui-modal { transform: translateY(0) scale(1); }
.ui-modal-title { font-weight: 800; font-size: 17px; margin-bottom: 12px; }
.ui-modal-text  { font-size: 14px; opacity: .85; line-height: 1.5; }
.ui-modal-input {
  width: 100%; margin-top: 12px; padding: 12px 14px; font-size: 14px;
  border: 1.5px solid var(--card-border, rgba(0,0,0,.12)); border-radius: 1rem;
  background: var(--card-bg, #fff); color: var(--text-primary, #0f172a);
}
.ui-modal-input:focus { outline: none; border-color: var(--accent, #f97316); }
.ui-modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.ui-btn {
  flex: 1; padding: 11px; border-radius: 1rem; font-weight: 700; font-size: 14px;
  cursor: pointer; border: none; transition: transform .12s, opacity .12s;
}
.ui-btn:active { transform: scale(.96); }
.ui-btn-primary { background: linear-gradient(135deg, var(--header-from, #f97316), var(--header-to, #ea580c)); color: #fff; }
.ui-btn-danger  { background: #ef4444; color: #fff; }
.ui-btn-ghost   { background: color-mix(in srgb, var(--text-secondary, #64748b) 14%, transparent); color: var(--text-primary, #0f172a); }

/* --- Commentaires du feed (feature #1) --- */
.feed-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.comment-toggle {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600;
  padding: 2px 9px; border-radius: 999px; cursor: pointer; user-select: none;
  background: color-mix(in srgb, var(--text-secondary, #64748b) 10%, transparent);
  color: var(--text-primary, #0f172a); border: none;
}
.comment-toggle:active { transform: scale(.94); }
.comment-thread { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.comment-item {
  display: flex; gap: 6px; align-items: flex-start; font-size: 13px;
  background: color-mix(in srgb, var(--accent, #f97316) 5%, transparent);
  padding: 6px 9px; border-radius: 12px;
}
.comment-item .c-body { flex: 1; min-width: 0; word-break: break-word; }
.comment-item .c-del { opacity: .45; cursor: pointer; font-size: 11px; }
.comment-item .c-del:hover { opacity: 1; color: #ef4444; }
.comment-input-row { display: flex; gap: 6px; margin-top: 4px; }
.comment-input {
  flex: 1; padding: 8px 12px; font-size: 13px; border-radius: 999px;
  border: 1.5px solid var(--card-border, rgba(0,0,0,.12));
  background: var(--card-bg, #fff); color: var(--text-primary, #0f172a);
}
.comment-input:focus { outline: none; border-color: var(--accent, #f97316); }
.comment-send {
  padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--header-from, #f97316), var(--header-to, #ea580c)); color: #fff;
}

/* --- Badge unlock dans le feed (feature #3) --- */
.feed-badge {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 1rem; font-size: 13px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent, #f97316) 16%, transparent), color-mix(in srgb, #f59e0b 12%, transparent));
  border: 1.5px solid color-mix(in srgb, var(--accent, #f97316) 30%, transparent);
}
.feed-badge .fb-emoji { font-size: 22px; }

/* --- Nudge (feature #2) --- */
.nudge-btn {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; cursor: pointer; border: none;
  background: color-mix(in srgb, var(--accent, #f97316) 15%, transparent); color: var(--accent, #f97316);
  white-space: nowrap;
}
.nudge-btn:active { transform: scale(.94); }
.nudge-btn:disabled { opacity: .5; }

/* --- Couronne reine du mois (feature #6) --- */
#queen-crown { display: inline-block; animation: queen-bounce 2.4s ease-in-out infinite; }
@keyframes queen-bounce { 0%,100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-2px) rotate(6deg); } }

/* --- Chip type de défi (feature #4) --- */
.challenge-chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px; margin-left: 6px;
  background: color-mix(in srgb, var(--accent, #f97316) 15%, transparent); color: var(--accent, #f97316);
}

/* --- Hall of Fame (feature #5) --- */
.hof-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 4px; font-size: 13px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.hof-row:last-child { border-bottom: none; }
.hof-week { font-size: 11px; opacity: .55; white-space: nowrap; }
.trophy-count { font-size: 11px; font-weight: 700; color: #f59e0b; }

/* --- Récap hebdo Wrapped (feature #7) --- */
.wrapped-card {
  background: linear-gradient(150deg, var(--header-from, #f97316), var(--header-to, #ea580c));
  color: #fff; border-radius: 2rem; padding: 20px; box-shadow: 0 12px 32px rgba(0,0,0,.18);
  position: relative; overflow: hidden;
}
.wrapped-card h4 { font-weight: 800; font-size: 16px; }
.wrapped-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.wrapped-stat { background: rgba(255,255,255,.16); border-radius: 1rem; padding: 10px 12px; }
.wrapped-stat .ws-val { font-size: 20px; font-weight: 800; line-height: 1.1; }
.wrapped-stat .ws-label { font-size: 11px; opacity: .85; margin-top: 2px; }
.wrapped-dismiss {
  position: absolute; top: 12px; right: 14px; font-size: 13px; opacity: .8; cursor: pointer;
  background: rgba(255,255,255,.2); border: none; color: #fff; width: 24px; height: 24px; border-radius: 999px;
}

/* --- Célébration gagnante (feature #5) --- */
.winner-overlay {
  position: fixed; inset: 0; z-index: 210; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.65); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s;
}
.winner-overlay.show { opacity: 1; }
.winner-card {
  background: var(--card-bg, #fff); color: var(--text-primary, #0f172a);
  border-radius: 2rem; padding: 28px; text-align: center; max-width: 340px; width: 88vw;
  transform: scale(.9); transition: transform .3s cubic-bezier(.34,1.56,.64,1); box-shadow: 0 24px 64px rgba(0,0,0,.4);
}
.winner-overlay.show .winner-card { transform: scale(1); }
.winner-crown { font-size: 54px; animation: queen-bounce 1.6s ease-in-out infinite; }

/* === ICÔNES SVG INLINE (remplacent Font Awesome) === */
.icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.125em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.icon-fill { fill: currentColor; stroke: none; }
.icon-5    { width: 1.25rem; height: 1.25rem; }

/* === ONBOARDING (première ouverture) === */
.onb-dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--text-secondary) 30%, transparent);
    transition: width .2s ease, background .2s ease;
}
.onb-dot.active {
    width: 22px;
    background: var(--accent);
}

/* === POOPMAP (carte des lieux) === */
.poopmap-canvas {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    touch-action: none;              /* le déplacement du doigt pilote la carte */
    cursor: grab;
    /* Damier discret : ce qu'on voit si les tuiles ne chargent pas (hors ligne) */
    background-color: color-mix(in srgb, var(--accent) 8%, transparent);
    background-image:
        linear-gradient(45deg, rgba(0,0,0,.04) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.04) 75%),
        linear-gradient(45deg, rgba(0,0,0,.04) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.04) 75%);
    background-size: 24px 24px;
    background-position: 0 0, 12px 12px;
}
.poopmap-canvas:active { cursor: grabbing; }
.poopmap-layer { position: absolute; inset: 0; }
.poopmap-tile {
    position: absolute;
    width: 256px;
    height: 256px;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}
.poopmap-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 34px;
    height: 34px;
    border-radius: 99px;
    border: 2px solid #fff;
    background: var(--card-bg, #fff);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    font-size: 17px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.poopmap-pin:hover { transform: translate(-50%, -50%) scale(1.12); }
.poopmap-pin-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    padding: 0 4px;
    border-radius: 99px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
}
.poopmap-controls {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}
.poopmap-controls button {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.12);
    background: rgba(255,255,255,.92);
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.poopmap-controls button:hover { background: #fff; }
.poopmap-style {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 48px;                /* laisse la place aux contrôles de zoom */
    display: flex;
    gap: 2px;
    z-index: 2;
    padding: 2px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.12);
    background: rgba(255,255,255,.92);
    overflow-x: auto;
    scrollbar-width: none;      /* masque la barre de défilement */
}
.poopmap-style::-webkit-scrollbar { display: none; }
.poopmap-style button {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.poopmap-style button.is-on {
    background: var(--accent);
    color: #fff;
}
.poopmap-attrib {
    position: absolute;
    bottom: 4px;
    right: 6px;
    z-index: 2;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 6px;
    background: rgba(255,255,255,.8);
    color: #334155;
    text-decoration: none;
}

/* === CHAT DE GROUPE === */
.chat-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-row-mine { flex-direction: row-reverse; }
.chat-avatar { font-size: 20px; flex-shrink: 0; }
.chat-bubble-wrap { max-width: 78%; }
.chat-author { font-size: 11px; opacity: .6; margin-bottom: 2px; }
.chat-bubble {
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
}
.chat-time { font-size: 10px; opacity: .4; margin-top: 2px; }

/* === FICHE MEMBRE (lignes cliquables du podium) === */
.member-row { cursor: pointer; transition: background .15s ease; }
.member-row:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* === ÉCHELLE DE BRISTOL === */
.br-row {
    display: grid;
    grid-template-columns: 18px 22px 1fr 62px;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--text-secondary) 10%, transparent);
}
.br-row:last-of-type { border-bottom: none; }
.br-off { opacity: .4; }
.br-num {
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    color: var(--text-secondary);
}
.br-icon { font-size: 15px; text-align: center; }
.br-desc { font-size: 11px; font-weight: 600; line-height: 1.3; }
.br-tag {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 99px;
    background: rgba(16,185,129,.15);
    color: #10b981;
}
.br-track {
    height: 6px;
    border-radius: 99px;
    margin-top: 4px;
    background: color-mix(in srgb, var(--text-secondary) 12%, transparent);
    overflow: hidden;
}
.br-fill { height: 100%; border-radius: 99px; transition: width .4s ease; }
.br-value {
    font-size: 11px;
    font-weight: 700;
    text-align: right;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}
.br-pct { font-weight: 400; opacity: .7; }

/* === BASCULE SEGMENTÉE (bilan année / mois) === */
.seg {
    display: inline-flex;
    padding: 2px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--text-secondary) 10%, transparent);
}
.seg-btn {
    border: none;
    background: transparent;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
}
.seg-on {
    background: var(--accent);
    color: #fff;
}

/* === RÉORGANISATION DES TUILES (onglet Stats) === */
.tile-editing {
    outline: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent);
    outline-offset: 2px;
}
.tile-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid color-mix(in srgb, var(--text-secondary) 15%, transparent);
}
.tile-name {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tile-move {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.tile-move:disabled { opacity: .3; cursor: default; }

/* ============================================================
   v2.18.0 — accueil, saisie, badges, social, Caca Wrapped
   ============================================================ */

/* === SÉRIE EN ATTENTE === */
/* La série d'hier tient jusqu'à minuit : même flamme, pâlie, qui respire. */
#streak-badge.streak-pending { background: rgba(239, 68, 68, .45); animation: pendingPulse 2.4s ease-in-out infinite; }
.home-stat.streak-pending .home-stat-num { opacity: .55; }
@keyframes pendingPulse { 50% { opacity: .6; } }

/* === CARTE « AUJOURD'HUI » === */
.mascot {
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.mascot-svg { width: 100%; height: 100%; overflow: visible; transform-origin: 50% 100%; }
.mascot-happy   .mascot-body { animation: mascotBounce 1.8s ease-in-out infinite; transform-origin: 50% 100%; }
.mascot-party   .mascot-body { animation: mascotWiggle .9s ease-in-out infinite; transform-origin: 50% 100%; }
.mascot-waiting .mascot-body { animation: mascotBreathe 3s ease-in-out infinite; transform-origin: 50% 100%; }
.mascot-sleepy  .mascot-body { animation: mascotBreathe 4.5s ease-in-out infinite; transform-origin: 50% 100%; }
.mascot-worried .mascot-body { animation: mascotShiver 2.5s ease-in-out infinite; transform-origin: 50% 100%; }
.mascot-jump { animation: mascotJump .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes mascotBounce  { 50% { transform: translateY(-4px) scaleY(1.03); } }
@keyframes mascotWiggle  { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@keyframes mascotBreathe { 50% { transform: scale(1.03, .98); } }
@keyframes mascotShiver  { 0%, 80%, 100% { transform: none; } 85% { transform: translateX(-2px); } 90% { transform: translateX(2px); } 95% { transform: translateX(-1px); } }
@keyframes mascotJump    { 40% { transform: translateY(-18px) scale(1.05, .95); } }

.mascot-bubble {
    position: relative;
    margin-top: 4px;
    padding: 10px 12px;
    border-radius: 16px;
    line-height: 1.3;
    color: var(--text-primary);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.mascot-bubble::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 16px;
    border: 6px solid transparent;
    border-left: 0;
    border-right-color: color-mix(in srgb, var(--accent) 12%, transparent);
}
.home-stat {
    padding: 8px 4px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--text-secondary) 8%, transparent);
}
.home-stat-num { font-size: 24px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.home-stat-label { font-size: 11px; color: var(--text-secondary); }

.home-more { border-radius: 1.5rem; }
.home-more-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 1.5rem;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    user-select: none;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.home-more-head::-webkit-details-marker { display: none; }
.home-more-chevron { transition: transform .2s; }
.home-more[open] .home-more-chevron { transform: rotate(180deg); }

/* === SAISIE === */
.tex-art { display: flex; justify-content: center; align-items: center; height: 44px; font-size: 28px; }
.tex-art svg { display: block; }
.texture-btn.selected .tex-art svg { animation: mascotBounce .6s ease-in-out 1; }

.health-details summary { list-style: none; }
.health-details summary::-webkit-details-marker { display: none; }
.health-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1.5px solid rgba(100, 116, 139, .35);
    font-size: 13px;
    font-weight: 600;
    color: inherit;
    background: transparent;
    transition: background .15s, border-color .15s, transform .1s;
}
.health-chip:active { transform: scale(.95); }
.health-chip.on {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 20%, transparent);
}
.health-details { color: #1e293b; }
[data-theme="dark"] .health-details,
[data-theme="galaxy"] .health-details,
[data-theme="neon"] .health-details { color: #e2e8f0; }

/* Saisie plein écran sur téléphone : plus de place pour les nouveaux champs,
   boutons toujours visibles en bas. */
@media (max-width: 640px) {
    #drawer .drawer-inner {
        max-height: 100dvh;
        height: 100dvh;
        border-radius: 0;
        padding-top: env(safe-area-inset-top);
    }
}
.drawer-actions {
    position: sticky;
    bottom: 0;
    padding-top: 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    background: var(--drawer-bg, #fff);
    z-index: 1;
}

/* === BADGES === */
.badge-cat {
    border-radius: 1.5rem;
    padding: 4px 4px 8px;
    background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.badge-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.badge-cat-head::-webkit-details-marker { display: none; }
.badge-cat-head::after { content: "▾"; margin-left: 8px; transition: transform .2s; opacity: .6; }
.badge-cat[open] .badge-cat-head::after { transform: rotate(180deg); }
.badge-cat-count {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.badge-cat > .grid { padding: 0 8px; }

.rarity-chip {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.rarity-commun     { color: #475569; background: rgba(100, 116, 139, .18); }
.rarity-rare       { color: #1d4ed8; background: rgba(59, 130, 246, .18); }
.rarity-epique     { color: #7e22ce; background: rgba(168, 85, 247, .2); }
.rarity-legendaire { color: #92400e; background: linear-gradient(90deg, #fde68a, #fbbf24); }
.rarity-inedit     { color: #0f766e; background: rgba(20, 184, 166, .18); }
[data-theme="dark"] .rarity-commun, [data-theme="galaxy"] .rarity-commun { color: #cbd5e1; }
[data-theme="dark"] .rarity-rare,   [data-theme="galaxy"] .rarity-rare   { color: #93c5fd; }
[data-theme="dark"] .rarity-epique, [data-theme="galaxy"] .rarity-epique { color: #d8b4fe; }
[data-theme="dark"] .rarity-inedit, [data-theme="galaxy"] .rarity-inedit { color: #5eead4; }

/* === SOCIAL === */
.group-streak {
    padding: 10px 12px;
    border-radius: 1.25rem;
    background: color-mix(in srgb, #f97316 12%, transparent);
}
.group-streak-flame { font-size: 30px; line-height: 1; animation: mascotBounce 1.6s ease-in-out infinite; }
.group-streak-flame.off { filter: grayscale(1); opacity: .5; animation: none; }
.league-mine { background: color-mix(in srgb, var(--accent) 12%, transparent); }

.comment-sticker-btn {
    flex-shrink: 0;
    width: 36px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    cursor: pointer;
}
.sticker-tray {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 6px;
}
.sticker-tray.hidden { display: none; }
.sticker-pick {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    border: none;
    border-radius: 14px;
    color: var(--text-primary);
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    cursor: pointer;
}
.sticker-pick:active { transform: scale(.94); }
.sticker-pick:disabled { opacity: .5; }
.sticker-bubble {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 12px;
    margin-top: 2px;
    border-radius: 16px;
    transform: rotate(-2deg);
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    box-shadow: 0 2px 0 color-mix(in srgb, var(--accent) 30%, transparent);
}
.sticker-art { font-size: 26px; line-height: 1.1; }
.sticker-text { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }

/* === CHOIX (UI.choose) === */
.ui-choices { display: grid; gap: 8px; margin-top: 8px; }
.ui-choice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    border: none;
    border-radius: 14px;
    text-align: left;
    color: var(--text-primary, #0f172a);
    background: color-mix(in srgb, var(--accent, #f97316) 12%, transparent);
    cursor: pointer;
}
.ui-choice:active { transform: scale(.98); }
.ui-choice-label { font-weight: 700; font-size: 15px; }
.ui-choice-sub { font-size: 12px; opacity: .7; }

/* === CACA WRAPPED (stories) === */
.wr-modal { background: #000; }
.wr-frame {
    position: relative;
    height: 100%;
    max-width: 480px;
    margin: 0 auto;
    overflow: hidden;
}
.wr-progress {
    position: absolute;
    top: calc(10px + env(safe-area-inset-top));
    left: 12px;
    right: 52px;
    z-index: 2;
    display: flex;
    gap: 4px;
}
.wr-bar { flex: 1; height: 3px; border-radius: 3px; overflow: hidden; background: rgba(255,255,255,.3); }
.wr-bar-fill { height: 100%; width: 0; background: #fff; }
.wr-bar-fill.done { width: 100%; }
.wr-bar-fill.run { animation: wrBar var(--wr-ms, 6000ms) linear forwards; }
@keyframes wrBar { to { width: 100%; } }
.wr-close {
    position: absolute;
    top: calc(2px + env(safe-area-inset-top));
    right: 8px;
    z-index: 3;
    width: 40px;
    height: 40px;
    border: none;
    font-size: 22px;
    color: #fff;
    background: none;
    cursor: pointer;
}
.wr-scene {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 28px 40px;
    color: #fff;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: background .4s;
}
.wr-s1  { background: linear-gradient(160deg, #7c3aed, #ec4899); }
.wr-s2  { background: linear-gradient(160deg, #f59e0b, #ef4444); }
.wr-s3  { background: linear-gradient(160deg, #059669, #0ea5e9); }
.wr-s4  { background: linear-gradient(160deg, #1e1b4b, #4338ca); }
.wr-s5  { background: linear-gradient(160deg, #92400e, #d97706); }
.wr-s6  { background: linear-gradient(160deg, #dc2626, #f97316); }
.wr-s7  { background: linear-gradient(160deg, #0f766e, #65a30d); }
.wr-s8  { background: linear-gradient(160deg, #0369a1, #7c3aed); }
.wr-s9  { background: linear-gradient(160deg, #be185d, #7c3aed); }
.wr-s10 { background: linear-gradient(160deg, #f59e0b, #ec4899, #7c3aed); }
.wr-slide { width: 100%; animation: wrIn .5s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes wrIn { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.wr-kicker { font-size: 16px; font-weight: 700; opacity: .85; text-transform: uppercase; letter-spacing: .12em; }
.wr-big-title { font-size: 46px; font-weight: 800; line-height: 1; margin-top: 8px; }
.wr-year { font-size: 80px; font-weight: 800; line-height: 1; }
.wr-num { font-size: 110px; font-weight: 800; line-height: 1; margin-top: 12px; font-variant-numeric: tabular-nums; }
.wr-num-sm { font-size: 60px; }
.wr-unit { font-size: 24px; font-weight: 700; margin-top: 4px; }
.wr-line { font-size: 17px; line-height: 1.4; margin-top: 22px; opacity: .92; }
.wr-emoji { font-size: 110px; line-height: 1.1; margin-top: 12px; }
.wr-mascot { width: 180px; height: 180px; margin: 16px auto; }
.wr-hint { font-size: 13px; opacity: .7; margin-top: 12px; }
.wr-recap { display: flex; justify-content: center; gap: 16px; font-size: 14px; margin: 8px 0 24px; }
.wr-recap strong { display: block; font-size: 28px; }
.wr-share, .wr-replay {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 10px;
    padding: 14px;
    border: none;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
}
.wr-share  { color: #7c3aed; background: #fff; }
.wr-replay { color: #fff; background: rgba(255,255,255,.2); }

@media (prefers-reduced-motion: reduce) {
    .mascot-body, .mascot-jump, .wr-slide, .group-streak-flame, #streak-badge.streak-pending { animation: none !important; }
    .wr-bar-fill.run { animation-duration: 1ms; }
}

/* ============================================================
   TEST DU MAÏS 🌽 (v2.20.0) — carte des Stats et case de la saisie
   ============================================================ */
.mais-block {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--card-border);
}
.mais-btn {
    width: 100%;
    min-height: 46px;
    border: none;
    border-radius: 999px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--header-from), var(--header-to));
    color: #fff;
}
.mais-btn.ghost {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent);
    min-height: 38px;
    font-size: 13px;
}
.mais-result { text-align: center; }
.mais-hours {
    font-size: 44px;
    font-weight: 800;
    line-height: 1;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.mais-verdict {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    padding: 10px 12px;
    border-radius: 1rem;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.mais-run {
    padding: 12px;
    border-radius: 1.25rem;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}
/* Saisie : le drawer est clair, on garde les couleurs des autres champs. */
.mais-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 1.25rem;
    border: 1.5px solid #fcd34d;
    background: #fffbeb;
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.mais-row.hidden { display: none; }
.mais-row input { width: 20px; height: 20px; accent-color: #f59e0b; flex-shrink: 0; }
.mais-row-info { font-weight: 500; opacity: .7; font-size: 12px; }

/* ============================================================
   Profil et connexion (v2.21.0) : une fiche, trois onglets
   ============================================================ */
.pf-modal { background: rgba(0,0,0,.7); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pf-modal.hidden { display: none; }
.pf-sheet {
  width: 100%; max-width: 24rem; max-height: min(90vh, 720px);
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 2rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,.4);
  background: var(--bg-via); color: var(--text-primary); border: 1px solid var(--card-border);
}
/* Hauteur fixe : les onglets ne sautent pas d'un onglet court à un long */
#profile-modal .pf-sheet { height: min(90vh, 720px); }
.pf-head { display: flex; align-items: center; gap: 14px; padding: 20px 56px 12px 20px; position: relative; }
.pf-avatar {
  width: 64px; height: 64px; flex-shrink: 0; border-radius: 20px; font-size: 38px; line-height: 64px; text-align: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.pf-id { flex: 1; min-width: 0; }
.pf-name { font-weight: 800; font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-mail { font-size: .75rem; opacity: .6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-status { display: inline-block; margin-top: 4px; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.pf-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 99px; font-size: 1rem; opacity: .55; }
.pf-close:hover { opacity: 1; background: color-mix(in srgb, var(--text-primary) 8%, transparent); }
.pf-cta {
  display: block; width: calc(100% - 40px); margin: 4px 20px 8px; padding: 14px; border-radius: 1.25rem;
  font-weight: 700; color: #fff; text-align: center;
  background: linear-gradient(135deg, var(--header-from), var(--header-to));
}
.pf-body .pf-cta { width: 100%; margin: 0; }
.pf-cta.hidden { display: none; }
.pf-tabs { display: flex; gap: 4px; margin: 4px 20px 0; padding: 4px; border-radius: 1rem;
  background: color-mix(in srgb, var(--text-primary) 7%, transparent); }
.pf-tab { flex: 1; padding: 8px 4px; border-radius: .8rem; font-size: .8rem; font-weight: 700; opacity: .6; transition: background .15s, opacity .15s; }
.pf-tab.is-on { opacity: 1; background: var(--bg-via); color: var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.pf-body { padding: 16px 20px 20px; overflow-y: auto; overscroll-behavior: contain; }
.pf-pane.hidden { display: none; }
.pf-sub { font-size: .75rem; font-weight: 700; opacity: .65; margin: 14px 0 8px; }
.pf-pane > .pf-sub:first-child { margin-top: 0; }
.pf-sub-row { display: flex; justify-content: space-between; gap: 8px; }
.pf-count { color: var(--accent); }
.pf-hint { font-size: .7rem; opacity: .5; margin-top: 8px; text-align: center; }
.pf-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 15%, transparent); }
.pf-group { border-radius: 1.1rem; overflow: hidden; background: color-mix(in srgb, var(--text-primary) 5%, transparent); }
.pf-group + .pf-sub, .pf-group + .pf-group { margin-top: 14px; }
.pf-group:not(:has(.pf-item:not(.hidden))):not(:has(.pf-row)) { display: none; }
.pf-item { display: block; width: 100%; text-align: left; padding: 13px 14px; font-size: .9rem; font-weight: 600; }
.pf-item.hidden { display: none; }
.pf-item:not(.hidden) ~ .pf-item:not(.hidden) { border-top: 1px solid color-mix(in srgb, var(--text-primary) 8%, transparent); }
.pf-item:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.pf-group.pf-danger { margin-top: 20px; }
.pf-danger .pf-item { color: #dc2626; }
.pf-link { display: block; width: 100%; padding: 6px; font-size: .8rem; font-weight: 600; opacity: .6; text-align: center; }
.pf-link:hover { opacity: 1; text-decoration: underline; }
.pf-auth-head { position: relative; text-align: center; padding: 22px 48px 10px; display: grid; gap: 4px; justify-items: center; }
.pf-field { display: block; }
.pf-field > span { display: block; font-size: .75rem; font-weight: 700; opacity: .7; margin: 0 0 4px 4px; }
.pf-field em { font-weight: 400; opacity: .7; }
.pf-field input {
  width: 100%; padding: 12px 14px; border-radius: 1rem; font-size: 1rem; color: inherit;
  background: color-mix(in srgb, var(--text-primary) 5%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--text-primary) 12%, transparent);
}
.pf-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }

/* Grille d'avatars */
.av-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.av-opt {
  position: relative; aspect-ratio: 1; border-radius: .8rem; font-size: 1.5rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 8%, transparent); border: 2px solid transparent;
  transition: transform .12s;
}
.av-opt:active { transform: scale(.92); }
.av-opt.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 20%, transparent); }
.av-locked-emoji { filter: grayscale(1); opacity: .35; }
.av-lock { position: absolute; right: 2px; bottom: 1px; font-size: .7rem; }

/* Avatars animés */
.av-anim { display: inline-block; }
.av-anim-danse     { animation: avDanse 1.1s ease-in-out infinite; transform-origin: 50% 90%; }
.av-anim-flamme    { animation: avFlamme .9s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.av-anim-brille    { animation: avBrille 2.2s ease-in-out infinite; }
.av-anim-scintille { animation: avScintille 1.6s ease-in-out infinite; }
.av-anim-decolle   { animation: avDecolle 1.4s ease-in-out infinite; }
.av-anim-tourne    { animation: avTourne 1.2s linear infinite; }
.av-anim-hoche     { animation: avHoche 2.4s ease-in-out infinite; }
.av-anim-tremble   { animation: avTremble .35s linear infinite; }
.av-anim-arcenciel { animation: avArcEnCiel 3s linear infinite; }
.av-anim-aiguille  { animation: avAiguille 2s ease-in-out infinite; }
.av-anim-saute     { animation: avSaute .8s cubic-bezier(.3,.6,.5,1) infinite; }
@keyframes avDanse { 0%,100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg) translateY(-6%); } }
@keyframes avFlamme { from { transform: scale(1,1); } to { transform: scale(.94,1.12); filter: brightness(1.2); } }
@keyframes avBrille { 0%,70%,100% { transform: scale(1) rotate(0); filter: none; } 80% { transform: scale(1.15) rotate(-8deg); filter: brightness(1.35) drop-shadow(0 0 4px gold); } 90% { transform: scale(1.1) rotate(8deg); } }
@keyframes avScintille { 0%,100% { filter: brightness(1); transform: scale(1); } 50% { filter: brightness(1.5) drop-shadow(0 0 5px #7dd3fc); transform: scale(1.08); } }
@keyframes avDecolle { 0%,100% { transform: translate(0,0); } 50% { transform: translate(4%,-14%); } 60% { transform: translate(2%,-10%) rotate(3deg); } }
@keyframes avTourne { to { transform: rotate(360deg); } }
@keyframes avHoche { 0%,40%,100% { transform: rotate(0); } 50% { transform: rotate(-18deg); } 65% { transform: rotate(14deg); } 80% { transform: rotate(0); } }
@keyframes avTremble { 0%,100% { transform: translate(0,0); } 25% { transform: translate(-3%,2%); } 50% { transform: translate(3%,-2%); } 75% { transform: translate(-2%,-3%); } }
@keyframes avArcEnCiel { to { filter: hue-rotate(360deg); } }
@keyframes avAiguille { 0%,100% { transform: rotate(-25deg); } 50% { transform: rotate(25deg); } }
@keyframes avSaute { 0%,100% { transform: translateY(0) scale(1,1); } 15% { transform: translateY(0) scale(1.1,.9); } 50% { transform: translateY(-22%) scale(.95,1.05); } }
@media (prefers-reduced-motion: reduce) { .av-anim { animation: none !important; } }

/* ===================== SOUS-ONGLETS SOCIAL (v2.23.0) ===================== */
.social-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 1rem;
  background: color-mix(in srgb, var(--text-primary) 7%, transparent); }
.social-tab-btn { flex: 1; position: relative; padding: 9px 4px; border-radius: .8rem;
  font-size: .78rem; font-weight: 700; opacity: .6; transition: background .15s, opacity .15s; }
.social-tab-btn.is-on { opacity: 1; background: var(--bg-via); color: var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.social-pane.hidden { display: none; }
.unread-badge { position: absolute; top: -5px; right: -3px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 999px; background: #ef4444; color: #fff;
  font-size: .65rem; font-weight: 800; line-height: 16px; text-align: center; }
.unread-badge.hidden { display: none; }
.unread-dot { position: absolute; top: 3px; right: 6px; width: 8px; height: 8px; border-radius: 99px; background: #ef4444; }
.unread-dot.hidden { display: none; }
.nav-badge { position: absolute; top: 0; right: 2px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: #ef4444; color: #fff; font-size: .6rem; font-weight: 800;
  line-height: 16px; text-align: center; pointer-events: none; }
.nav-badge.hidden { display: none; }

/* ===================== SOUS-ONGLETS « MOI » (v2.23.0) ===================== */
.moi-subtabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 16px; border-radius: 1rem;
  background: color-mix(in srgb, var(--text-primary) 7%, transparent); }
.moi-subtab { flex: 1; padding: 9px 4px; border-radius: .8rem; font-size: .8rem; font-weight: 700;
  opacity: .6; transition: background .15s, opacity .15s; }
.moi-subtab.active { opacity: 1; background: var(--bg-via); color: var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
