@import './components.css';

/* ==========================================================================
   SYSTÈME DE CONTENEURS UNIFIÉS - DOCUMENTATION COMPLÈTE
   ==========================================================================

   Introduction:
   Le système de conteneurs unifiés de la page watch utilise une approche
   cohérente pour structurer les éléments principaux (player vidéo, carousel
   de sous-titres, commentaires). Tous les conteneurs partagent une
   structure de base commune pour garantir la cohérence visuelle et la
   maintenabilité du code.

   Structure hiérarchique des conteneurs:
   ┌─────────────────────────────────────────────────────────────┐
   │ .watch-content-wrapper (flex-column, width: 100%)           │
   │  ├─ .watch-player-container (player vidéo)                  │
   │  ├─ .watch-carousel-container (sous-titres carousel)        │
   │  └─ .watch-comments-container (section commentaires)        │
   └─────────────────────────────────────────────────────────────┘

    Principes fondamentaux:
    1. Largeur fluide (width: 100%) - s'adapte à toute taille d'écran
    2. Box-sizing: border-box - padding inclus dans la largeur calculée
   3. Padding horizontal unifié via variables CSS (--space-2xl, etc.)
   4. Alignement à gauche pour cohérence du flux de lecture
   5. Responsive design progressif via media queries en cascade

   Breakpoints:
   - Desktop (par défaut): padding: 0 var(--space-2xl)
   - Tablette (≤1024px): collapse sidebar, padding ajusté
   - Mobile (≤768px): padding: 0 var(--space-md)
   - Petit mobile (≤480px): padding: 0 var(--space-sm)

   Voir aussi:
   - AGENTS.md - Section "Unified Container System"
   - CONTAINERS_MIGRATION.md - Guide de migration complet
   ========================================================================== */

/**
 * Wrapper principal pour le contenu de la page watch.
 * Utilise flexbox en colonne pour organiser les conteneurs verticalement.
 * Largeur fluide pour s'adapter à toute taille d'écran.
 *
 * @structure Wrapper de page
 * @parents .watch-page
 * @enfants .watch-player-container, .watch-carousel-container, .watch-comments-container
 */
.watch-content-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1000px;
    box-sizing: border-box;
}

/**
 * Conteneur principal pour le player vidéo.
 *
 * Rôle: Wrapper structurel qui encapsule le player vidéo et ses contrôles.
 * - Largeur: 100% du parent (flexible)
 * - Padding horizontal: var(--space-2xl) pour espacementlatéral
 * - Box-sizing: border-box inclus le padding dans la largeur
 * - Alignement: left pour cohérence avec le flux de lecture
 *
 * Relations:
 * @parent .watch-content-wrapper
 * @enfant .video-player-container (depuis video-player.css)
 * @frère .watch-carousel-container, .watch-comments-container
 *
 * Responsive:
 * @mobile (≤768px): padding réduit à var(--space-md)
 * @small (≤480px): padding réduit à var(--space-sm)
 *
 * Exemple HTML:
 * <div class="watch-player-container" id="watchPlayer"></div>
 */
.watch-player-container {
    width: 100%;
    max-width: 1280px;
    box-sizing: border-box;
    padding: 0;
    text-align: left;
    position: relative;
    margin: 0 auto;
    aspect-ratio: 16/9;
}

@supports not (aspect-ratio: 16/9) {
    .watch-player-container::before {
        content: '';
        display: block;
        width: 100%;
        padding-top: 56.25%;
    }

    .watch-player-container > * {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/**
 * Conteneur pour le carousel de sous-titres.
 *
 * Rôle: Wrapper pour le carousel interactif des sous-titres.
 * - Même largeur que le player vidéo pour cohérence visuelle
 * - Structure identique à .watch-player-container pour uniformité
 * - Permet le défilement horizontal des cuecards de sous-titres
 *
 * Relations:
 * @parent .watch-content-wrapper
 * @enfant .subtitles-carousel, .carousel-nav, .carousel-track
 * @frère .watch-player-container, .watch-comments-container
 *
 * Responsive:
 * @mobile (≤768px): padding ajusté, dimensions réduites
 * @small (≤480px): padding minimal, height réduit
 *
 * Exemple HTML:
 * <div class="watch-carousel-container" id="subtitlesCarousel">
 *     <button class="carousel-nav carousel-nav--prev">...</button>
 *     <div class="carousel-track">...</div>
 *     <button class="carousel-nav carousel-nav--next">...</button>
 * </div>
 */
.watch-carousel-container {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    text-align: left;
    position: relative;
    overflow: hidden;
    height: 85px;
    margin-top: var(--space-md);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/**
 * Conteneur pour la section commentaires.
 *
 * Rôle: Wrapper principal pour la section commentaires et notes.
 * - Même largeur que les autres conteneurs pour alignement
 * - Contient le formulaire de création et la liste des commentaires
 * - Gère l'infinite scroll et les interactions de modération
 *
 * Relations:
 * @parent .watch-content-wrapper
 * @enfant .comments-create, .watch-comments, .comments-list
 * @frère .watch-player-container, .watch-carousel-container
 *
 * Responsive:
 * @tablet (≤1024px): Passage en layout single-column
 * @mobile (≤768px): padding réduit
 * @small (≤480px): padding minimal, animations simplifiées
 *
 * Exemple HTML:
 * <div class="watch-comments-container" id="watchComments">
 *     <div class="comments-create">...</div>
 *     <div class="watch-comments">...</div>
 * </div>
 */
.watch-comments-container {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    text-align: left;
    margin-top: var(--space-xl);
}

body[data-page="watch"] {
    background: linear-gradient(180deg, var(--color-bg) 0%, #f5f0e8 100%);
    min-height: 100vh;
}

.watch-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: transparent;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.watch-header__title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--color-primary);
    margin: 0;
    letter-spacing: -0.01em;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 1rem;
}

.watch-page {
    padding: calc(90px + var(--space-xl)) var(--space-lg) var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 0.6s ease forwards;
}

.watch-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--space-xl);
    align-items: start;
}

.watch-main {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 900px;
    position: relative;
    text-align: left;
}

    /**
     * OBSOLÈTE: Cette classe n'est plus utilisée dans le HTML.
     * Le player vidéo utilise maintenant .watch-player-container comme wrapper principal.
     * Conservée pour référence uniquement.
     */
    .watch-player-wrapper {
        /* text-align: left;
        box-sizing: border-box;
        margin: 0 0 var(--space-md) 0;
        padding: 0 var(--space-2xl);
        max-height: 60vh;
        width: 100%; */
    }

    /**
 * OBSOLÈTE: Cette classe est maintenant gérée par video-player.css
 * Conservée pour référence uniquement - NE PAS UTILISER
 * Le conteneur du player vidéo utilise maintenant .watch-player-container (wrapper)
 * et la classe .video-player-container depuis video-player.css pour le style du player
 */
.video-player-container {
    /* Styles supprimés - теперь gérés dans video-player.css */
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-md);
    position: relative;
    width: 100%;
    height: 100%;
}

.watch-info {
    background: var(--color-surface);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.video-info__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    letter-spacing: -0.01em;
}

.video-info__description {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

.video-info__meta {
    display: flex;
    gap: var(--space-md);
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.video-info__tags {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
}

.tag {
    padding: var(--space-xs) var(--space-md);
    background: var(--color-hover);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.tag:hover {
    background: var(--color-primary);
    color: white;
}

.video-info__actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.watch-sidebar {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: fit-content;
    max-height: calc(100vh - 90px - var(--space-xl));
    overflow-y: auto;
    position: sticky;
    top: 90px;
}

.watch-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}

.watch-tab {
    flex: 1;
    padding: var(--space-md);
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.watch-tab:hover {
    color: var(--color-primary);
    background: var(--color-hover);
}

.watch-tab--active {
    color: var(--color-primary);
    font-weight: 600;
}

.watch-tab--active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary);
}

.watch-content {
    padding: var(--space-lg);
    min-height: 300px;
}

.watch-tab-content {
    display: none;
    animation: fadeIn 0.3s ease forwards;
}

.watch-tab-content--active {
    display: block;
}

.subtitles-toggle {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.subtitles-toggle:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.subtitles-current {
    background: transparent;
    color: white;
    padding: 16px 20px;
    border-radius: 4px;
    transition: all var(--transition-fast);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 80%;
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    text-align: center;
    pointer-events: none;
}

.subtitles-current .subtitle-text {
    pointer-events: auto;
}

.subtitles-current.fullscreen-mode {
    max-width: 90%;
    bottom: 120px;
}

/**
 * Responsive layout for comments section.
 *
 * RATIONALE: Sur les écrans plus petits (≤1024px), la sidebar se réduit
 * et passe en layout single-column. L'alignement à gauche offre une
 * meilleure lisibilité pour les commentaires en créant un flux de lecture
 * naturel depuis le bord gauche, correspondant au player vidéo.
 *
 * SYSTÈME RESPONSIVE UNIFIÉ:
 * Le système de conteneurs (.watch-player-container, .watch-carousel-container,
 * .watch-comments-container) gère la largeur fluide (100%) de manière
 * cohérente pour toutes les sections. Les breakpoints 768px et 480px
 * ajustent le padding mais préservent la largeur fluide.
 *
 * Breakpoints utilisés:
 * - @media (max-width: 1024px)  : Tablette paysage / Petit desktop
 * - @media (max-width: 768px)   : Tablette portrait / Grand mobile
 * - @media (max-width: 480px)   : Petit mobile
 *
 * Pour les nouveaux conteneurs, suivre ce pattern:
 * 1. width: 100% (toujours fluide)
 * 2. padding: 0 var(--space-2xl) (desktop)
 * 3. Media queries pour réduire padding progressivement
 */

.subtitles-carousel {
    box-sizing: border-box;
    position: relative;
    width: 100%;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin: var(--space-md) 0 0;
    padding: 0 var(--space-2xl);
    overflow: hidden;
    height: 85px;
}

.subtitles-carousel::before,
.subtitles-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 10;
    pointer-events: none;
}

.subtitles-carousel::before {
    left: 0;
    background: linear-gradient(to right, var(--color-surface) 0%, transparent 100%);
}

.subtitles-carousel::after {
    right: 0;
    background: linear-gradient(to left, var(--color-surface) 0%, transparent 100%);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 20;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.carousel-nav svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.carousel-nav:hover {
    background: var(--color-primary);
    box-shadow: 0 4px 20px rgba(26, 54, 93, 0.2);
}

.carousel-nav:hover svg {
    stroke: white;
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-nav--prev {
    left: 8px;
    z-index: 30;
}

.carousel-nav--next {
    right: 8px;
    z-index: 30;
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.carousel-track {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 50px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: auto !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
    height: 100%;
    align-items: center;
    box-sizing: border-box;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    flex-shrink: 0;
    width: 200px;
    height: 55px;
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.6;
    flex-grow: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Transitions légères pour hover/active - pas sur transform pour éviter les problèmes de scroll */
    transition: opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

@media (max-width: 1024px) {
    .carousel-item {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .carousel-item {
        width: 160px;
    }
}

@media (max-width: 480px) {
    .carousel-item {
        width: 140px;
    }
}

.carousel-item:hover {
    opacity: 1;
    transform: scale(1);
    border-color: rgba(201, 169, 97, 0.3);
    background: rgba(201, 169, 97, 0.05);
}

.carousel-item--active {
    opacity: 1;
    transform: scale(1.02);
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.12) 0%, rgba(201, 169, 97, 0.08) 100%);
    border-color: var(--color-secondary);
    box-shadow: 0 4px 16px rgba(201, 169, 97, 0.25);
}

.carousel-item__text {
    font-size: 0.85rem;
    color: var(--color-text);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 40px;
    text-align: center;
}

.carousel-placeholder {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: var(--space-lg);
    width: 100%;
}

.watch-comments {
    box-sizing: border-box;
    margin: 0;
    text-align: left;
    width: 100%;
    padding: 0 var(--space-2xl);
    position: relative;
}

.watch-comments__title {
    font-size: 1.75rem;
    color: var(--color-primary);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    text-align: left;
}



/* ============================================================================
   Comment Item - Clean horizontal layout
   Layout: [Avatar] [Username] [Message] [Actions on hover]
   ============================================================================ */

.comment-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    position: relative;
    animation: commentFadeIn 0.3s ease forwards;
    opacity: 0;
}

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

.comment-item:hover .comment-item__actions {
    opacity: 1;
}



/* Disable hover effects on touch devices */
@media (hover: none) {
    .comment-item__actions {
        opacity: 1;
    }
}

/* Avatar in comment - uses unified-avatar from profile.css */
.comment-item .unified-avatar {
    flex-shrink: 0;
}

/* Username in comment */
.comment-item__username {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Comment content - takes remaining space */
.comment-item__content {
    flex: 1;
    color: var(--color-text);
    line-height: 1.6;
    font-size: 0.95rem;
    text-align: left;
    min-width: 0; /* Allow text to wrap properly in flex */
}

/* Actions - hidden by default, visible on hover */
.comment-item__actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    opacity: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.comment-item__edit-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-item__edit-btn:hover {
    background: rgba(201, 169, 97, 0.1);
    color: var(--color-primary);
}

.comment-item__edit-btn svg {
    width: 16px;
    height: 16px;
}

.comment-item__editing-indicator {
    font-size: 0.8rem;
    color: var(--color-primary);
    font-weight: 600;
    background: rgba(201, 169, 97, 0.1);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Edit mode - full width layout */
.comment-item--editing {
    flex-wrap: wrap;
}

.comment-item__main {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.comment-item__edit-container {
    width: 100%;
    margin-top: var(--space-sm);
    padding-left: calc(32px + var(--space-md)); /* Align with content after avatar */
}

.comment-edit-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.comment-edit-input {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid rgba(201, 169, 97, 0.3);
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: 0.95rem;
    resize: vertical;
    background: rgba(255, 255, 255, 0.95);
    color: #2d3748;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.comment-edit-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.15);
    transform: translateY(-1px);
}

.comment-edit-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
}

.comment-edit-btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.comment-edit-btn--cancel {
    background: rgba(255, 0, 0, 0.1);
    color: #e53e3e;
    border: 1px solid rgba(255, 0, 0, 0.2);
}

.comment-edit-btn--cancel:hover {
    background: rgba(255, 0, 0, 0.2);
    transform: translateY(-1px);
}

.comment-edit-btn--save {
    background: linear-gradient(135deg, #c9a961 0%, #d4af37 100%);
    color: #1a365d;
    box-shadow: 0 2px 8px rgba(201, 169, 97, 0.3);
}

.comment-edit-btn--save:hover {
    background: linear-gradient(135deg, #d4af37 0%, #e5c156 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.5);
}

.manual-timestamp {
    color: #1a365d;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    background: rgba(201, 169, 97, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(201, 169, 97, 0.2);
    user-select: none;
}

.manual-timestamp:hover {
    background: #c9a961;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(201, 169, 97, 0.3);
}

.comments-empty {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.comments-loader {
    text-align: center;
    padding: var(--space-lg);
    color: var(--color-text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.comments-loader::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-border);
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

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

.notes-list::-webkit-scrollbar-track {
    background: var(--color-bg);
    border-radius: 3px;
}

.notes-list::-webkit-scrollbar-thumb {
    background: var(--color-secondary);
    border-radius: 3px;
}

.note-item {
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    animation: commentFloatIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
    will-change: transform, box-shadow;
    /* Reduce floating effect for better readability */
    --float-duration: 12s;
}

.note-item::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.08) 0%, rgba(201, 169, 97, 0.03) 50%, rgba(26, 54, 93, 0.03) 100%);
    border-radius: var(--radius-xl);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: scale(1.02);
}

.note-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 6px 20px rgba(0, 0, 0, 0.08);
}

.note-item:hover::before {
    opacity: 0.6;
}

.note-item--highlighted {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.1) 0%, rgba(201, 169, 97, 0.2) 100%);
    border-left: 4px solid var(--color-primary);
    animation: highlightPulse 0.5s ease forwards;
}

.note-item__time {
    font-size: 0.8rem;
    color: var(--color-primary);
    font-family: 'Courier New', monospace;
    font-weight: 600;
    background: rgba(201, 169, 97, 0.12);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(201, 169, 97, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.note-item__time:hover {
    background: #c9a961;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(201, 169, 97, 0.3);
}

.note-item__content {
    color: #2d3748;
    line-height: 1.7;
    font-size: 0.95rem;
}

.playlist-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-height: 500px;
    overflow-y: auto;
}

.playlist-items::-webkit-scrollbar {
    width: 6px;
}

.playlist-items::-webkit-scrollbar-track {
    background: var(--color-bg);
    border-radius: 3px;
}

.playlist-items::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 3px;
}

.playlist-item {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    align-items: center;
}

.playlist-item:hover {
    border-color: var(--color-primary);
    background: var(--color-hover);
}

.playlist-item__thumbnail {
    width: 80px;
    height: 45px;
    background: var(--color-hover);
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.playlist-item__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-item__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.playlist-item__title {
    font-size: 0.9rem;
    color: var(--color-text);
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.playlist-item__duration {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.playlist-empty {
    text-align: center;
    padding: var(--space-xl);
    color: var(--color-text-muted);
}



@keyframes commentFloatIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.subtitles-current .no-subtitles {
    display: none;
}

.subtitles-current .error-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    color: #fca5a5;
    font-style: italic;
    text-align: center;
    font-size: 0.95rem;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    padding: 12px;
}

.subtitle-timestamp {
    display: none;
}

.subtitle-text {
    font-size: 1.25rem;
    line-height: 1.5;
    color: white;
    font-weight: 600;
    text-shadow: 
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        2px 2px 0 #000,
        -2px 0 0 #000,
        2px 0 0 #000,
        0 -2px 0 #000,
        0 2px 0 #000;
}

.subtitle-duration {
    display: none;
}

.subtitles-list-interactive {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.subtitles-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    max-height: 600px;
    overflow-y: auto;
    padding-right: var(--space-sm);
}

.subtitles-items::-webkit-scrollbar {
    width: 6px;
}

.subtitles-items::-webkit-scrollbar-track {
    background: var(--color-bg);
    border-radius: 3px;
}

.subtitles-items::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 3px;
}

.subtitle-interactive-item {
    display: grid;
    grid-template-columns: 80px 1fr 40px;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    align-items: center;
}

.subtitle-interactive-item:hover {
    border-color: var(--color-primary);
    background: var(--color-hover);
    transform: translateX(4px);
}

.subtitle-interactive-item.active {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.1) 0%, rgba(201, 169, 97, 0.15) 100%);
    border-color: var(--color-secondary);
    box-shadow: 0 2px 8px rgba(201, 169, 97, 0.2);
}

.subtitle-interactive-time {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
    font-family: monospace;
}

.subtitle-interactive-text {
    font-size: 0.85rem;
    color: var(--color-text);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.subtitle-interactive-jump {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    border-radius: var(--radius-sm);
    color: white;
    opacity: 0;
    transition: all var(--transition-fast);
}

.subtitle-interactive-item:hover .subtitle-interactive-jump {
    opacity: 1;
}

.subtitle-interactive-item.active .subtitle-interactive-jump {
    opacity: 1;
    background: var(--color-secondary);
}

.subtitles-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.subtitles-list__title {
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.subtitle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.subtitle-item:hover {
    border-color: var(--color-primary);
    background: var(--color-hover);
}

.subtitle-item--default {
    border-color: var(--color-secondary);
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.05) 0%, rgba(201, 169, 97, 0.1) 100%);
}

.subtitle-item__language {
    font-weight: 500;
    color: var(--color-text);
}

.subtitle-item__badge {
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-secondary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.subtitles-empty,
.notes-empty {
    text-align: center;
    padding: var(--space-xl);
    color: var(--color-text-muted);
}

.notes-create {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: rgba(201, 169, 97, 0.08);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(201, 169, 97, 0.2);
    box-shadow: 0 8px 32px rgba(201, 169, 97, 0.1);
}

.note-input {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid rgba(201, 169, 97, 0.2);
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: 0.95rem;
    resize: vertical;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.95);
    color: #2d3748;
}

.note-input:focus {
    outline: none;
    border-color: #c9a961;
    box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.15), 0 4px 16px rgba(201, 169, 97, 0.2);
    transform: translateY(-1px);
}

.note-input::placeholder {
    color: #718096;
}

.note-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
}

.note-btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    letter-spacing: 0.02em;
}

.note-btn--timestamp {
    background: rgba(201, 169, 97, 0.1);
    color: var(--color-primary);
    border: 1px solid rgba(201, 169, 97, 0.2);
}

.note-btn--timestamp:hover {
    background: rgba(201, 169, 97, 0.2);
    border-color: rgba(201, 169, 97, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.15);
}

.note-btn--primary {
    background: linear-gradient(135deg, #c9a961 0%, #d4af37 100%);
    color: #1a365d;
    box-shadow: 0 4px 16px rgba(201, 169, 97, 0.3);
}

.note-btn--primary:hover {
    background: linear-gradient(135deg, #d4af37 0%, #e5c156 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(201, 169, 97, 0.5);
}

.note-item__header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    position: relative;
}

.note-item__delete {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.note-item__delete:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #e53e3e;
    transform: scale(1.1);
}

/* Comments Create - Minimal inline style */
.comments-create {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
}

.comment-input {
    flex: 1;
    padding: var(--space-sm) 0;
    border: none;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: transparent;
    color: var(--color-text);
    outline: none;
}

.comment-input::placeholder {
    color: var(--color-text-muted);
}

.comment-input:focus {
    outline: none;
}

.comments-create:focus-within {
    border-bottom-color: var(--color-primary);
}

.comment-btn {
    padding: var(--space-xs) var(--space-sm);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    background: transparent;
    color: var(--color-text-muted);
}

.comment-btn:hover {
    color: var(--color-primary);
}

.comment-btn--timestamp {
    padding: var(--space-xs);
}

.comment-btn--timestamp:hover {
    background: rgba(201, 169, 97, 0.1);
}

.comment-btn--primary {
    color: var(--color-primary);
    font-weight: 600;
}

.comment-btn--primary:hover {
    background: rgba(201, 169, 97, 0.1);
}

.subtitles-empty p,
.notes-empty p {
    margin-bottom: var(--space-sm);
}

.watch-error {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--color-text-muted);
}

.watch-error h2 {
    font-size: 2rem;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.watch-error p {
    font-size: 1.1rem;
    margin-bottom: var(--space-xl);
}

.loader {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.text-muted {
    color: var(--color-text-muted);
}

@media (max-width: 1024px) {
    .watch-container {
        grid-template-columns: 1fr;
    }

    .watch-sidebar {
        position: static;
    }

    .watch-player-container {
        max-width: 800px;
    }
}

@media (max-width: 768px) {
    .watch-header {
        height: 70px;
    }

    .watch-header__title {
        font-size: 1.25rem;
    }

    .watch-page {
        padding: calc(70px + var(--space-lg)) var(--space-sm) var(--space-lg);
    }

    .watch-container {
        gap: var(--space-lg);
    }

    .watch-player-container {
        max-width: 100%;
    }

    .watch-info {
        padding: var(--space-lg);
    }

    .video-info__title {
        font-size: 1.5rem;
    }

    .video-info__description {
        font-size: 1rem;
    }

    .watch-tabs {
        flex-wrap: wrap;
    }

    .watch-tab {
        flex: 1 1 auto;
        min-width: 120px;
    }

    .watch-content {
        padding: var(--space-md);
    }

    .subtitles-current {
        padding: 12px 16px;
        min-height: 50px;
        bottom: 55px;
        max-width: 90%;
    }

    .subtitles-toggle {
        width: 28px;
        height: 28px;
        bottom: 8px;
        right: 8px;
    }

    .subtitle-text {
        font-size: 1.1rem;
    }

    .subtitles-carousel {
        height: 80px;
        padding: 0 var(--space-md);
    }

    .watch-carousel-container {
        height: 80px;
    }

    .carousel-track {
        padding: var(--space-md) 45px;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
    }

    .carousel-nav--prev {
        left: 6px;
    }

    .carousel-nav--next {
        right: 6px;
    }

    .carousel-item {
        width: 200px;
        height: 52px;
    }

    .carousel-item__text {
        font-size: 0.82rem;
    }

    .watch-comments {
        box-sizing: border-box;
        padding: 0 var(--space-md);
    }

    .watch-comments__title {
        font-size: 1.4rem;
    }

    .comments-create {
        padding: var(--space-md);
    }

    .comment-input {
        padding: var(--space-md);
        font-size: 0.9rem;
    }

    .note-input {
        padding: var(--space-md);
        font-size: 0.9rem;
    }

    .comment-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .note-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .comment-item {
        padding: var(--space-md);
    }

    .note-item {
        padding: var(--space-md);
    }

    .comment-item__avatar {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .comment-item__user-info {
        gap: var(--space-xs);
    }

    .comment-item__username {
        font-size: 0.9rem;
    }

    .comment-item__content {
        font-size: 0.9rem;
    }

    .comment-item__actions {
        gap: var(--space-xs);
    }

    .comment-item__edit-btn,
    .comment-item__delete-btn {
        padding: 6px;
        min-width: 32px;
        min-height: 32px;
    }

    .comment-item__edit-btn svg,
    .comment-item__delete-btn svg {
        width: 16px;
        height: 16px;
    }

    .comment-item__editing-indicator {
        font-size: 0.75rem;
        padding: 4px var(--space-sm);
    }

    .comment-edit-input {
        padding: var(--space-sm);
        font-size: 0.9rem;
    }

    .comment-edit-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Delete Dialog Styles */
.delete-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease forwards;
}

.delete-dialog {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 8px 32px rgba(201, 169, 97, 0.2);
    border: 1px solid rgba(201, 169, 97, 0.3);
    max-width: 400px;
    width: 90%;
    margin: var(--space-lg);
    transform: scale(0.9);
    animation: dialogScaleIn 0.3s ease forwards;
}

.delete-dialog__content {
    padding: var(--space-2xl);
    text-align: center;
}

.delete-dialog__icon {
    color: #e53e3e;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-dialog__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: var(--space-md);
}

.delete-dialog__message {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: var(--space-xl);
}

.delete-dialog__actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

.delete-dialog__btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 100px;
}

.delete-dialog__btn--cancel {
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.delete-dialog__btn--cancel:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.delete-dialog__btn--confirm {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(229, 62, 62, 0.3);
}

.delete-dialog__btn--confirm:hover {
    background: linear-gradient(135deg, #c53030 0%, #9b2c2c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(229, 62, 62, 0.5);
}

.delete-dialog__btn--confirm:active {
    transform: translateY(0);
}

/* Delete Button Styles */
.comment-item__delete-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-item__delete-btn:hover {
    background: rgba(229, 62, 62, 0.1);
    color: #e53e3e;
    transform: scale(1.1);
}

.comment-item__delete-btn svg {
    width: 16px;
    height: 16px;
}

@keyframes dialogScaleIn {
     0% { transform: scale(0.9); opacity: 0; }
     100% { transform: scale(1); opacity: 1; }
 }

/* Role Badge Styles */
.role-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 12px;
    margin-left: var(--space-xs);
    color: white;
    letter-spacing: 0.03em;
    line-height: 1;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.role-badge--admin {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.role-badge--moderator {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.3);
}

.role-badge--premium {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
}

.role-badge--membre {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 2px 6px rgba(107, 114, 128, 0.3);
}

@media (max-width: 480px) {
    /* Header & Page Layout */
    .watch-header {
        height: 60px;
    }

    .watch-header__title {
        font-size: 1.1rem;
        padding: 0 0.5rem;
    }

    .watch-page {
        padding: calc(60px + var(--space-md)) var(--space-sm) var(--space-md);
    }

    .watch-container {
        gap: var(--space-md);
    }

    /* Video Info */
    .watch-info {
        padding: var(--space-md);
    }

    .video-info__title {
        font-size: 1.25rem;
    }

    .video-info__description {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .video-info__meta {
        font-size: 0.85rem;
        gap: var(--space-sm);
    }

    /* Sidebar */
    .watch-sidebar {
        max-height: calc(100vh - 60px - var(--space-md));
        top: 60px;
        border-radius: var(--radius-md);
    }

    .watch-tabs {
        overflow-x: auto;
    }

    .watch-tab {
        flex: 0 0 auto;
        min-width: 100px;
        padding: var(--space-sm) var(--space-md);
        font-size: 0.85rem;
    }

    /* Subtitles */
    .subtitles-current {
        bottom: 50px;
        padding: 10px 12px;
        min-height: 45px;
        max-width: 95%;
    }

    .subtitle-text {
        font-size: 1rem;
    }

    /* Carousel */
    .subtitles-carousel {
        height: 70px;
        border-radius: var(--radius-md);
        padding: 0 var(--space-sm);
    }

    .watch-carousel-container {
        height: 70px;
    }

    .carousel-track {
        padding: var(--space-sm) 38px;
        gap: var(--space-sm);
    }

    .carousel-nav {
        width: 32px;
        height: 32px;
    }

    .carousel-nav--prev {
        left: 4px;
    }

    .carousel-nav--next {
        right: 4px;
    }

    .carousel-item {
        width: 160px;
        height: 46px;
        padding: var(--space-xs) var(--space-sm);
        border-radius: var(--radius-md);
    }

    .carousel-item__text {
        font-size: 0.75rem;
    }

    /* ===== COMMENT SECTION ===== */
    .watch-comments {
        box-sizing: border-box;
        padding: 0 var(--space-sm);
        border-radius: var(--radius-lg);
        max-height: none;
    }

    .watch-comments__title {
        font-size: 1.15rem;
        margin-bottom: var(--space-md);
        gap: var(--space-sm);
    }

    /* Comments Create Form - Mobile */
    .comments-create {
        gap: var(--space-xs);
    }

    .comment-input {
        font-size: 0.9rem;
    }

    .comment-btn {
        padding: var(--space-xs);
        font-size: 0.8rem;
    }

    .comment-btn--primary {
        padding: var(--space-xs) var(--space-sm);
    }

    /* Comment Item - Vertical layout on mobile */
    .comment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
        padding: var(--space-md) 0;
    }

    .comment-item .unified-avatar {
        width: 32px;
        height: 32px;
    }

    /* Top row: avatar + username */
    .comment-item > .unified-avatar,
    .comment-item > .comment-item__username {
        display: inline-flex;
    }

    .comment-item__username {
        font-size: 0.85rem;
    }

    /* Content takes full width below */
    .comment-item__content {
        width: 100%;
        font-size: 0.9rem;
        line-height: 1.6;
        padding-left: calc(32px + var(--space-sm)); /* Align with text after avatar */
    }

    /* Actions always visible on mobile (touch) */
    .comment-item__actions {
        opacity: 1;
        padding-left: calc(32px + var(--space-sm));
    }

    .comment-item__edit-btn,
    .comment-item__delete-btn {
        padding: 8px;
        min-width: 36px;
        min-height: 36px;
        border-radius: var(--radius-sm);
        background: var(--color-hover);
    }

    .comment-item__edit-btn svg,
    .comment-item__delete-btn svg {
        width: 16px;
        height: 16px;
    }

    /* Edit container full width */
    .comment-item__edit-container {
        padding-left: 0;
        width: 100%;
    }

    .comment-item__main {
        gap: var(--space-sm);
    }

    /* Edit Form */
    .comment-edit-form {
        gap: var(--space-sm);
    }

    .comment-edit-input {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.85rem;
        min-height: 70px;
    }

    .comment-edit-actions {
        gap: var(--space-sm);
        flex-wrap: wrap;
    }

    .comment-edit-btn {
        flex: 1;
        padding: 8px 12px;
        font-size: 0.8rem;
        min-width: 70px;
        justify-content: center;
    }

    /* Role Badges - Responsive */
    .role-badge {
        font-size: 0.6rem;
        padding: 2px 5px;
        margin-left: 4px;
        vertical-align: middle;
    }

    .note-item__time {
        font-size: 0.6rem;
        padding: 2px 5px;
        margin-left: 4px;
        vertical-align: middle;
    }

    /* Empty State */
    .comments-empty {
        padding: var(--space-lg);
        font-size: 0.9rem;
    }

    /* ===== DELETE DIALOG - Mobile Optimized ===== */
    .delete-dialog-overlay {
        padding: var(--space-md);
        align-items: flex-end;
        animation: fadeInMobile 0.25s ease forwards;
    }

    .delete-dialog {
        width: 100%;
        max-width: none;
        margin: 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        transform: translateY(0);
        animation: dialogSlideUp 0.3s ease forwards;
    }

    .delete-dialog__content {
        padding: var(--space-lg);
    }

    .delete-dialog__icon {
        margin-bottom: var(--space-md);
    }

    .delete-dialog__icon svg {
        width: 48px;
        height: 48px;
    }

    .delete-dialog__title {
        font-size: 1.2rem;
        margin-bottom: var(--space-sm);
    }

    .delete-dialog__message {
        font-size: 0.9rem;
        margin-bottom: var(--space-lg);
        line-height: 1.5;
    }

    .delete-dialog__actions {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .delete-dialog__btn {
        width: 100%;
        padding: 14px 16px;
        font-size: 0.95rem;
        min-height: 48px;
    }

    /* Optimized Animations for Mobile */
    @keyframes commentFadeInMobile {
        0% {
            opacity: 0;
            transform: translateY(15px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes dialogSlideUp {
        0% {
            transform: translateY(100%);
            opacity: 0;
        }
        100% {
            transform: translateY(0);
            opacity: 1;
        }
    }

    @keyframes fadeInMobile {
        0% { opacity: 0; }
        100% { opacity: 1; }
    }
}

/* ==========================================================================
   Media Queries pour les conteneurs unifiés
   Ces styles préparent la structure pour les futures modifications
   en utilisant les nouvelles classes unifiées.
   ========================================================================== */

/**
 * Tablette (max-width: 768px)
 * Ajustements pour écrans moyens
 */
@media (max-width: 768px) {
    .watch-carousel-container {
        height: 80px;
    }
}

/**
 * Mobile (max-width: 480px)
 * Ajustements pour petits écrans
 */
@media (max-width: 480px) {
    .watch-carousel-container {
        height: 70px;
    }
}

/* ==========================================================================
   GUIDE DE RÉFÉRENCE POUR NOUVEAUX CONTENEURS
   ==========================================================================

   Ce guide montre comment ajouter une nouvelle section au système de
   conteneurs unifiés de la page watch.

   ÉTAPE 1: Ajouter le HTML dans watch.js
   -------------------------------------------------------------------------
   <div class="watch-[section]-container" id="[sectionId]">
       <!-- Contenu de votre section -->
   </div>

   ÉTAPE 2: Ajouter les styles de base (copier-coller ce template)
   -------------------------------------------------------------------------

   /**
    * Conteneur pour [DESCRIPTION DE LA SECTION].
    *
    * Rôle: [Explication rapide du rôle de cette section]
    *
    * Relations:
    * @parent .watch-content-wrapper
    * @enfant [Éléments enfants directs, ex: .my-section__item]
    * @frère .watch-player-container, .watch-carousel-container,
    *        .watch-comments-container
    *
    * Responsive:
    * @mobile (≤768px): [Ajustements spécifiques]
    * @small (≤480px): [Ajustements spécifiques]
    *
    * Exemple HTML:
    * <div class="watch-[section]-container">
    *     <div class="my-section__item">...</div>
    * </div>
    */
   .watch-[section]-container {
       width: 100%;
       box-sizing: border-box;
       padding: 0 var(--space-2xl);
       text-align: left;
   }

   ÉTAPE 3: Ajouter le responsive (dans les media queries existants)
   -------------------------------------------------------------------------

   /* Dans @media (max-width: 768px) */
   .watch-[section]-container {
       padding: 0 var(--space-md);
   }

   /* Dans @media (max-width: 480px) */
   .watch-[section]-container {
       padding: 0 var(--space-sm);
   }

   ÉTAPE 4: Vérifier la hiérarchie
   -------------------------------------------------------------------------
   Le nouveau conteneur doit être un enfant direct de .watch-content-wrapper:

   <div class="watch-content-wrapper">
       <div class="watch-player-container">...</div>
       <div class="watch-carousel-container">...</div>
       <div class="watch-comments-container">...</div>
       <div class="watch-[section]-container">NOUVEAU</div>
   </div>

   ==========================================================================
   FIN DU GUIDE
   ==========================================================================
