
/* ============================================================
   🎨 PROFIL PAGE ISOLÉE (.profile-page)
   ============================================================ */
.profile-page {
  --app-height: 100vh;
  --primary: #10B981;
  --primary-dark: #059669;
  --primary-light: #34D399;
  --bg-dark: #0B0B0B;
  --bg-card: #1a1a1a;
  --bg-elevated: #242424;
  --border: #2a2a2a;
  --text: #ffffff;
  --text-muted: #888888;
  --text-subtle: #555555;
  --danger: #EF4444;
  --warning: #F59E0B;
  --info: #3B82F6;
  --success: #10B981;
  --header-height: 60px;
  --navbar-height: 70px;
  --avatar-size: 85px;
  --transition-fast: 0.2s;
  --transition-normal: 0.3s;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.15);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.25);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.35);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  background: var(--bg-dark);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: var(--app-height);
}

/* --- SCROLLABLE CONTENT --- */
.profile-page .main-content-scrollable {
  min-height: calc(var(--app-height) - var(--header-height));
  padding-top: var(--header-height);
  padding-bottom: var(--navbar-height);
  overflow-y: auto;
  background: var(--bg-dark);
  position: relative;
  z-index: 1;
}

/* --- HEADER PROFIL --- */
.profile-page .profile-header {
  position: relative;
  padding: 2rem 1.25rem 1.75rem;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-dark) 100%);
  border-bottom: 1px solid var(--border);
}

/* --- AVATAR --- */
.profile-page .avatar-container {
  position: relative;
  width: var(--avatar-size);
  height: var(--avatar-size);
  margin: 0 auto 1.25rem;
}

.profile-page .avatar-ring {
  position: absolute;
  inset: -4px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-full);
  padding: 4px;
  animation: pulse 2s ease-in-out infinite;
}

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

.profile-page .avatar {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-normal);
}

.profile-page .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- USERNAME --- */
.profile-page .profile-identity {
  text-align: center;
  margin-bottom: 1.5rem;
}

.profile-page .username-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.profile-page .username {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.profile-page .user-handle {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ============================================================
   📱 BARRE DE NAVIGATION INFÉRIEURE (mobile-navbar)
   ============================================================ */



/* ============================================================
   🎯 BOUTON FLOTTANT "POST GOAL" AU-DESSUS DE LA NAVBAR
   ============================================================ */




/* --- BOUTONS --- */
.profile-page .action-buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.profile-page .btn {
  position: relative;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-page .btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.profile-page .btn-secondary {
  background: var(--bg-card);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.profile-page .btn-secondary:hover {
  background: var(--primary);
  color: white;
}

/* --- STATS --- */
.profile-page .stats-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 0 1rem;
  margin-top: 1.5rem;
}

.profile-page .stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1rem 0.75rem;
  text-align: center;
  border: 1px solid var(--border);
}

.profile-page .stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.25rem;
}

.profile-page .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* --- TABS --- */
.profile-page .content-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem 1rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.profile-page .tab {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.profile-page .tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* --- VIDEO GRID --- */
.profile-page .video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
  padding: 12px 10px 90px;
  justify-items: center;
  align-content: start;
}

.profile-page .video-item {
  position: relative;
  aspect-ratio: 9 / 16;
  width: 100%;
  max-width: 220px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.profile-page .video-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-md);
}

.profile-page .thumbnail-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.profile-page .thumbnail-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- DELETE BUTTON --- */
.profile-page .btn-delete-video {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: 32px;
  height: 32px;
  background: rgba(239, 68, 68, 0.95);
  border-radius: var(--radius-full);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  z-index: 10;
}

.profile-page .btn-delete-video:hover {
  transform: scale(1.05);
}

/* --- EMPTY STATE --- */
.profile-page .empty-state {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted);
}

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

/* --- RESPONSIVE --- */
@media (max-width: 480px) {
  .profile-page .video-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 481px) and (max-width: 1024px) {
  .profile-page .video-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1025px) {
  .profile-page .video-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
/* ============================================================
   🌟 VERSION COMPACTE PRO (TikTok / Instagram)
   ============================================================ */

/* Header réduit */
.profile-page .profile-header {
    padding: 1.2rem 1rem 0.8rem !important;
}

/* Avatar légèrement plus petit */
.profile-page .avatar-container {
    width: 85px !important;
    height: 85px !important;
    margin-bottom: 0.5rem !important;
}

.profile-page .avatar-ring {
    inset: -3px !important;
}

/* Nom et handle rapprochés */
.profile-page .profile-identity {
    margin-bottom: 0.6rem !important;
}

.profile-page .username {
    font-size: 1.35rem !important;
}

.profile-page .user-handle {
    font-size: 0.85rem !important;
}

/* Stats plus compactes */
.profile-page .stats-container {
    margin-top: 0.6rem !important;
    gap: 0.5rem !important;
}

.profile-page .stat-card {
    padding: 0.7rem 0.5rem !important;
}

.profile-page .stat-value {
    font-size: 1.2rem !important;
}

/* Boutons réduits */
.profile-page .action-buttons {
    margin: 0.8rem 0 !important;
}

.profile-page .btn {
    padding: 0.55rem 1.4rem !important;
    font-size: 0.85rem !important;
}

/* Tabs rapprochées */
.profile-page .content-tabs {
    padding-top: 0.5rem !important;
    padding-bottom: 0.3rem !important;
}

/* Grille plus haute dans la page */
.profile-page .video-grid {
    padding-top: 8px !important;
}

/* Miniatures légèrement plus grandes */
.profile-page .video-item {
    border-radius: 10px !important;
    max-width: none !important;
}

@media(max-width:480px) {
    .profile-page .video-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ===== FEED MODAL OVERLAY (STYLE TIKTOK) ===== */

.feed-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Pour mobile */
    background: #000;
    z-index: 99999; /* Au-dessus de tout */
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    display: none;
    overscroll-behavior: contain;
}

/* Masquer la scrollbar */
.feed-modal-overlay::-webkit-scrollbar {
    display: none;
}

.feed-modal-overlay {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ===== BOUTON FERMER (style TikTok) ===== */
#closeFeedButton {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#closeFeedButton:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

#closeFeedButton:active {
    transform: scale(0.95);
}

/* ===== FEED ITEMS (VIDÉOS PLEIN ÉCRAN) ===== */
.feed-item {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
    contain: layout style paint;
    content-visibility: auto;
    contain-intrinsic-size: 100vw 100vh;
}

/* ===== PLAYER VIDÉO - FIX DU ZOOM ===== */
.feed-video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;      /* ← était 100vw/100vh, doit être 100% relatif au parent */
    object-fit: cover;
    background: #000;
    display: block;
}

/* ===== RESPONSIVE DESKTOP - Mode cinéma ===== */
@media (min-width: 768px) {
    .feed-video-player {
        position: relative;
        max-width: 450px;
        width: auto;
        height: 100vh;
        object-fit: contain; /* Sur desktop, mode cinéma */
    }
    
    .feed-item {
        background: #0a0a0a;
    }
}


/* ===== MASQUER ÉLÉMENTS QUAND FEED OUVERT ===== */
/* On MAINTIENT la navbar visible */

body.feed-active header,
body.feed-active .post-goal-navbar-btn {
    display: none !important;
}


body.feed-active {
    overflow: hidden !important;
}

/* ===== CURSEUR POINTER SUR MINIATURES ===== */
.profile-page .video-item {
    cursor: pointer !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.profile-page .video-item:hover {
    transform: scale(1.03) translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3) !important;
}

.profile-page .video-item:active {
    transform: scale(0.98) !important;
}

/* ===== PERFORMANCE ===== */
.feed-video-player,
.feed-item,
#closeFeedButton {
    transform: translateZ(0);
    will-change: transform;
}

/* ===== 💬 PANEL COMMENTAIRES (Style Instagram/TikTok) ===== */

.comments-panel {
    position: fixed; /* ← CHANGÉ de absolute à fixed */
    bottom: 0;
    left: 0;
    right: 0;
    height: 60vh;
    max-height: 600px;
    background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.98) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    z-index: 100002; /* ← AUGMENTÉ */
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header */
.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: white;
}

/* Liste des commentaires */
.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
}

.comments-list::-webkit-scrollbar {
    width: 6px;
}

.comments-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
}

/* Item commentaire */
.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(16, 185, 129, 0.5);
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.comment-author {
    font-weight: 700;
    font-size: 14px;
    color: white;
}

.comment-time {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

.comment-text {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    margin: 0;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Zone de saisie */
.comments-input-wrapper {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.5);
}

.comment-input {
    flex: 1;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 25px;
    padding: 12px 20px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.comment-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.comment-input:focus {
    background: rgba(255,255,255,0.15);
    border-color: #10B981;
}

.comment-send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10B981, #059669);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.comment-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.comment-send-btn:active {
    transform: scale(0.95);
}

/* Badge compteur */
.feed-action-btn span {
    animation: pop 0.3s ease;
}

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

/* Par défaut : invisible */
.btn-delete-video {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* En mode édition : visible */
body.editing-mode .btn-delete-video {
    opacity: 1;
    pointer-events: auto;
}
#followBtn {
    transition: all 0.25s ease;
    padding: 10px 18px;
    font-size: 16px;
    border-radius: 12px;
    font-weight: 600;
}

#followBtn.following {
    background-color: #0d1117; /* noir profond */
    color: #00e676; /* vert néon */
    border: 2px solid #00e676;
}

#followBtn.following:hover {
    background-color: #ff0033 !important; /* rouge unfollow */
    border-color: #ff0033 !important;
    color: white;
}

#followBtn:hover:not(.following) {
    background-color: #00e676;
    color: #0d1117;
}
/* ============================================================
   🌟 GOALCLIPS SIGNATURE — FOLLOW BUTTON PREMIUM
   ============================================================ */

#followBtn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 8px 22px !important;
    font-size: 14px !important;
    font-weight: 600;

    background: linear-gradient(135deg, #10B981, #059669) !important;
    color: #ffffff !important;

    border: none !important;
    border-radius: 14px !important;

    width: auto !important;
    cursor: pointer;

    box-shadow: 0 3px 15px rgba(16, 185, 129, 0.25);
    transition: all 0.25s ease, transform 0.1s ease;
}

/* 🔥 Hover — effet premium */
#followBtn:hover:not(.following) {
    background: linear-gradient(135deg, #34D399, #10B981) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

/* 🔍 Effet click */
#followBtn:active {
    transform: scale(0.96);
}

/* 🎯 État “Déjà abonné” */
#followBtn.following {
    background: #0d1117 !important;
    border: 2px solid #10B981 !important;
    color: #10B981 !important;
    box-shadow: none !important;
}

/* Hover rouge — style TikTok premium */
#followBtn.following:hover {
    background: #ff0033 !important;
    border-color: #ff0033 !important;
    color: white !important;
    box-shadow: 0 5px 18px rgba(255, 0, 51, 0.35);
}

/* Désactivation temporaire lors du chargement */
#followBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}
/* ----- Actions flottantes style TikTok ----- */
.feed-actions-floating {
    position: absolute;
    right: 20px;
    bottom: 140px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    z-index: 100;
}

.feed-actions-floating button {
    background: rgba(0,0,0,0.45);
    padding: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.25);
    color: white;
    font-size: 22px;
    cursor: pointer;
    width: 60px;
    height: 60px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    transition: transform .2s ease;
}

.feed-actions-floating button:hover {
    transform: scale(1.1);
}

.feed-actions-floating .like-count,
.feed-actions-floating .comment-count {
    font-size: 12px;
    margin-top: 6px;
}

.feed-actions-floating i.liked {
    color: #ff0050 !important;
}
.feed-sound-btn i.fa-volume-high {
  color: #10B981;
}

/* ===== ANIMATION DE FERMETURE DU PANEL COMMENTAIRES ===== */

.comments-panel.close-animation {
    animation: slideDown 0.25s ease forwards;
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}
/* ===== BACKDROP (fond noir semi-transparent) ===== */
.comments-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100001; /* ← AUGMENTÉ */
    animation: fadeIn 0.3s ease-out;
}

.comments-backdrop.close-animation {
    animation: fadeOut 0.25s ease-in forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* ===== FIX BOUTONS DU PROFIL SUR MOBILE ===== */

@media (max-width: 480px) {
    .action-buttons {
        flex-wrap: wrap;                /* Permet de passer sur plusieurs lignes */
        justify-content: center;
    }

    .action-buttons .btn {
        flex: 0 0 calc(50% - 0.75rem);  /* 2 boutons par ligne */
        text-align: center;
        margin-bottom: 0.5rem;
    }
}


.action-buttons .btn {
    flex: 1;
}
.reaction-menu {
    position: absolute;
    right: 80px; /* À côté du bouton principal */
    bottom: 180px;
    display: none; /* Masqué par défaut */
    align-items: center;
    gap: 8px;
    z-index: 150;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.reaction-option {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.reaction-option:hover {
    transform: scale(1.15);
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.4);
}

.reaction-option:active {
    transform: scale(0.95);
}


/* ===== 📊 RÉSUMÉ DES RÉACTIONS (sous la vidéo) ===== */

.reactions-summary {
    position: absolute;
    bottom: 100px;
    left: 20px;
    display: none; /* Masqué si aucune réaction */
    align-items: center;
    gap: 8px;
    z-index: 100;
    animation: fadeIn 0.3s ease;
}

.reaction-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.reaction-badge .emoji {
    font-size: 18px;
}

.reaction-badge .count {
    font-size: 13px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}


/* ===== 💫 ANIMATION EMOJI FLOTTANT (TikTok style) ===== */

.floating-emoji {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    pointer-events: none;
    z-index: 200;
    animation: floatUp 1s ease-out forwards;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -200%) scale(1.5);
    }
}


/* ===== 😀 EMOJI PICKER (dans les commentaires) ===== */

.emoji-picker {
    position: absolute;
    bottom: 100%; /* Au-dessus de l'input */
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.98) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100003;
    animation: slideUpEmoji 0.3s ease-out;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

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

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 15px;
}

.emoji-btn {
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.2);
}

.emoji-btn:active {
    transform: scale(0.95);
}

/* Scrollbar du picker */
.emoji-picker::-webkit-scrollbar {
    width: 6px;
}

.emoji-picker::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}


/* ===== 😊 BOUTON TOGGLE EMOJI (dans l'input) ===== */

.emoji-toggle-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 50%;
    flex-shrink: 0;
}

.emoji-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    transform: scale(1.05);
}

.emoji-toggle-btn:active {
    transform: scale(0.95);
}

.emoji-toggle-btn i {
    font-size: 20px;
}


/* ===== 🎯 AJUSTEMENTS DE L'INPUT COMMENTAIRE ===== */

.comments-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
    position: relative; /* Important pour le picker */
}

.comment-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 12px 18px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.comment-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.comment-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #10B981;
}


/* ===== 📱 RESPONSIVE ===== */

@media (max-width: 480px) {
    .emoji-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 6px;
        padding: 12px;
    }

    .emoji-btn {
        font-size: 24px;
        padding: 6px;
    }

    .reaction-option {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }

    .floating-emoji {
        font-size: 60px;
    }

    .reaction-badge {
        padding: 5px 10px;
    }

    .reaction-badge .emoji {
        font-size: 16px;
    }

    .reaction-badge .count {
        font-size: 12px;
    }
}


/* ===== 🎨 AMÉLIORATION DU BOUTON RÉACTION ===== */

.feed-reaction-btn {
    position: relative;
}

.feed-reaction-btn i {
    transition: all 0.3s ease;
}

/* Quand l'utilisateur a réagi */
.feed-reaction-btn.has-reacted i {
    color: #FF3366 !important;
    transform: scale(1.1);
}

/* Animation de pulsation */
@keyframes heartPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.feed-reaction-btn.has-reacted i {
    animation: heartPulse 0.5s ease;
}


/* ===== ✨ ANIMATIONS GÉNÉRALES ===== */

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

/* Performance optimizations */
.reaction-menu,
.reaction-option,
.emoji-picker,
.floating-emoji,
.reactions-summary {
    transform: translateZ(0);
    will-change: transform, opacity;
}


/* ===== 🌙 MODE NUIT (optionnel) ===== */

@media (prefers-color-scheme: dark) {
    .emoji-picker {
        background: linear-gradient(180deg, rgba(10,10,10,0.98) 0%, rgba(5,5,5,0.99) 100%);
    }

    .emoji-btn:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    .reaction-option {
        background: rgba(10, 10, 10, 0.85);
    }
}


/* ===== 🎯 FIX POUR ÉVITER LES CONFLITS ===== */

/* S'assurer que le panel commentaires est au-dessus */
.comments-panel {
    z-index: 100002 !important;
}

.comments-backdrop {
    z-index: 100001 !important;
}

.emoji-picker {
    z-index: 100003 !important;
}


/* === FIX BOUTONS PROFIL SUR MOBILE === */

.profile-page .action-buttons {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    padding: 0 1rem;
}

.profile-page .action-buttons .btn {
    flex: 1 1 calc(50% - 10px); /* 2 par ligne */
    text-align: center;
}

/* 📱 Ultra-optimisé pour petits téléphones (iPhone SE, Android 360px) */
@media (max-width: 420px) {
    .profile-page .action-buttons .btn {
        flex: 1 1 100% !important; /* 1 bouton par ligne */
        font-size: 0.9rem !important;
        padding: 0.75rem !important;
    }
}
.delete-video-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(220, 38, 38, 0.85);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 10;
}

.delete-video-btn:hover {
    background: rgb(220, 38, 38);
}

/* ✅ Mobile : overlay et poubelle toujours visibles */
@media (max-width: 768px) {
    .profile-page .video-overlay {
        opacity: 1 !important;
        background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%) !important;
    }

    .profile-page .delete-video-btn {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}
.profile-page .thumbnail-wrapper .delete-video-btn {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    z-index: 999 !important;
    width: 30px !important;
    height: 30px !important;
    background: rgba(220, 38, 38, 0.85) !important;
    border-radius: 50% !important;
    border: none !important;
    color: white !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 🔄 FEED LOADER (lazy loading) */
.feed-video-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    z-index: 5;
}

.feed-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #10B981;
    border-radius: 50%;
    animation: feedSpin 0.7s linear infinite;
}

@keyframes feedSpin {
    to { transform: rotate(360deg); }
}