/* ==================== Reset & Variables ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-dark: #0b1e33;
    --secondary-dark: #013c58;
    --tertiary-dark: #00537a;
    --accent-orange: #ffba42;
    --accent-orange-light: #ffd35b;
    --accent-orange-dark: #f5a201;
    --accent-green:#94d2ae;  
    --accent-white:#ffffff;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b8c5d6;
    --text-muted: #7a8ca0;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;

    /* Notifications */
    --notification-duration: 1000ms;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: 
        linear-gradient(rgba(5,15,30,0.3), rgba(5,15,30,0.4)),
        url('/public/assets/images/fond-page.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* ==================== Header ==================== */
.header {
    background: rgba(10, 25, 45, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: none;
    /*background: var(--secondary-dark);
    box-shadow: var(--shadow-md); */
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid rgba(255,255,255,0.9);
    /* border-bottom: 2px solid var(--accent-orange); */
}

.header-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.05);
}

.logo span {
    color: var(--accent-orange);
    /* background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-orange-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; */
}

/* Search Bar */
.search-container {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: var(--spacing-sm);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 3rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 40px;
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

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

.search-input:focus {
    background: rgba(255,255,255,0.15);
    border-color: var(--accent-green);
    box-shadow: 0 0 25px rgba(148,210,174,0.5);
}

/* User Info */
.user-info {
    display: flex;
    align-items: center; 
    cursor: pointer;
    padding: 0.2rem 1.2rem 0.2rem 0.8rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 40px;
    color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.user-info:hover {
    background: rgba(255,255,255,0.15);
    border-color: var(--accent-green);
    box-shadow: 0 0 25px rgba(148,210,174,0.5);
    transform: translateY(-2px);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    /*background: var(--accent-white);*/
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.8)
}

.user-name {
    font-weight: 600;
    white-space: nowrap;
}

/* ==================== Main Content ==================== */
.main-content {
    max-width: 1800px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-lg);
}

/* ==================== Filters Sidebar ==================== */
.filters-sidebar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: var(--spacing-md);
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    /* background: var(--secondary-dark); */
    /* border-radius: var(--radius-lg); */
    /* padding: var(--spacing-md); */
    height: fit-content;
    /* position: sticky;
    top: calc(80px + var(--spacing-lg));
    box-shadow: var(--shadow-sm);*/
}

.filter-highlight {
    font-weight: 700;
    font-size: 1rem;
    margin: 1.5rem 0 0.5rem 0;
    padding-bottom: 0rem;
    color:rgba(0,0,0,0.8);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
    user-select: none;
}

.filter-highlight:hover {
    color: var(--accent-orange-dark);
    transform: translateX(4px);
}

.filter-section {
    margin-bottom: var(--spacing-md);
}

.filter-section:last-of-type {
    margin-bottom: var(--spacing-md);
}

.filter-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(0,0,0,0.4);
    margin: 1.5rem 0 0.5rem 0;
}

/*.filter-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
    color: var(--accent-orange);
    font-weight: 600;
}*/

.filter-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.filter-options p {
    text-align: center;
    font-style: italic;
    font-size: 0.9rem; 
    color: var(--text-muted);
    padding: 0.5rem;
}

.filter-option {
    color: rgba(0,0,0,0.8);
    background: transparent;
    border-radius: 6px;
    transition: all 0.25s ease;
}

.filter-option:hover {
    background: rgba(255,255,255,0.06);
    transform: translateX(6px);
}

.filter-option.active {
    background: rgba(0,0,0,0.1);
    padding-left:1rem;
}

/*.filter-option {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.6rem 0.75rem;
    background: var(--tertiary-dark);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.filter-option:hover {
    background: var(--primary-dark);
    transform: translateX(4px);
}

.filter-option.active {
    background: var(--accent-orange);
    border-color: var(--accent-orange-light);
    font-weight: 600;
}*/

/*.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-orange);
}*/

.filter-option label {
    cursor: pointer;
    flex: 1;
    font-size: 0.95rem;
}

.reset-filters {
    width: 100%;
    border: 0px;
    background: transparent;
    border-radius: 6px;
    padding: 0.3rem;
    color: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.reset-filters:hover {
    cursor: pointer;
    background: rgba(0,0,0,0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.3rem;
    width: 100%;
    font-weight: 500;
    color: rgba(0,0,0,0.9);
}

/*.reset-filters {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: 2px solid var(--accent-orange);
    border-radius: var(--radius-sm);
    color: var(--accent-orange);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    transition: all var(--transition-fast);
}

.reset-filters:hover {
    background: var(--accent-orange);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}*/

/* ==================== Content Area ==================== */
.content-area {
    min-height: 100vh;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.page-title {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

.view-options {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.video-count {
    color: var(--text-secondary);
    font-weight: 500;
}

/* =========== Liste de Tri ============= */
.custom-select {
    position: relative;
    width: 200px;
    font-size: 0.9rem;
}

.custom-select-trigger {
    padding: 0.8rem 1.2rem;
    border-radius: 40px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-select-trigger:hover {
    background: rgba(255,255,255,0.15);
}

.custom-select.open .custom-select-trigger {
    border-color: var(--accent-orange);
    box-shadow: 0 0 25px rgba(255,186,66,0.4);
}

.custom-options {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    border-radius: 18px;
    overflow: hidden;

    background: rgba(10,25,45,0.7);
    backdrop-filter: blur(20px);

    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);

    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 100;
}

.custom-select.open .custom-options {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.custom-option {
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.custom-option:hover {
    background: rgba(255,186,66,0.2);
}


.sort-select {
    position: relative;
    display: inline-block;
    padding: 4px;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
}

.sort-select select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    padding: 0.75rem 3rem 0.75rem 1.2rem;
    border-radius: 40px;

    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);

    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;

    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-select select:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
}

.sort-select select:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 25px rgba(255,186,66,0.4);
    background: rgba(255,255,255,0.18);
}

.sort-select:hover select {
    box-shadow: 0 0 20px rgba(255,255,255,0.1);
}

.sort-select::after {
    content: "";
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(255,255,255,0.7);
    border-bottom: 2px solid rgba(255,255,255,0.7);
    transform: translateY(-50%) rotate(45deg);
    pointer-events: none;
    transition: all 0.3s ease;
}

.sort-select select:focus + .sort-select::after,
.sort-select:focus-within::after {
    border-color: var(--accent-orange);
}

/*.sort-select select {
    padding: 0.6rem 1rem 0.6rem 1rem;
    background: transparent;
    border: border: 1px solid rgba(255,255,255,0.08);;
    border-radius: 40px;
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}
*/
/*.sort-select select:hover {
    border-color: var(--accent-green);
}
*/
/*.sort-select select:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 4px rgba(255, 140, 66, 0.1);
}*/

/* ==================== Video Grid ==================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}
    
.video-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio : 16 / 9;
    opacity: 0.9;
    transform: translateY(0px) scale(0.95);
/*    transform: translateY(40px) scale(0.95);*/
    transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
    perspective: 1200px;
    border: 1px solid transparent;
}

/*.video-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}*/

.video-card.active {
    box-shadow:
        0 0 0 2px rgba(255,186,66,0.8),
        0 0 40px rgba(255,186,66,0.6),
        0 0 80px rgba(255,186,66,0.3);
}

.video-card:hover {
    transform: scale(1.07);
    transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
/*    transform: translateY(-4px); /* Hauteur du mouvement vers le haut au survol */
    box-shadow: 0 30px 70px rgba(0,0,0,0.7);
    border-color: rgba(255, 255, 255, 1.0);
}

.video-thumbnail {
    position: absolute;
    inset: 0;
    padding-top: 0;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.95) 0%,
        rgba(0,0,0,0.4) 40%,
        rgba(0,0,0,0.2) 75%,
        rgba(0,0,0,0) 100%
    );
    z-index: 0;
}

.video-card:hover::after {
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.92) 0%,      /* Très sombre : bas → durée/badges */
        rgba(0,0,0,0.82) 46%,     /* Sombre constant jusqu'au titre */
        rgba(0,0,0,0.82) 48.3%,   /* Début transition invisible */
        rgba(0,0,0,0.08) 49.6%,   /* Transition quasi-instantanée */
        rgba(0,0,0,0) 66%         /* Transparent total : haut/titre */
    );
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.2);
    transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(26, 35, 50, 0.9);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 1;
}

.play-overlay {
    position: absolute;
    top: 17%;
    left: 44%;
    /*transform: translate(-50%, -50%);*/
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.video-card:hover .play-overlay {
    opacity: 1; 
    transform: scale(1.1);
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
}

.play-overlay svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-dark);
    margin-left: 0px;
}

.video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    z-index: 2;
   /* padding: var(--spacing-sm); */
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    line-height: 1.1;
    color: #ffffff;
    /*font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;*/
}

.video-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* color: var(--text-secondary); */
    /* font-size: 0.9rem;*/
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
}

.video-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.video-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.20rem 0.55rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-channel {
    background: rgba(255, 186, 66, 0.85);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.8);
    z-index: 1;
}

.badge-collection {
    background: rgba(184, 197, 214, 0.2);
    color: var(--text-secondary);
    border: 1px solid var(--text-muted);
}

/* ==================== Pagination ==================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xxl);
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.75rem 1.5rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 40px;
    color: rgba(255,255,255,0.8);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.15);
    border-color: var(--accent-green);
    /*color: var(--primary-dark);*/
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(148,210,174,0.5);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: var(--text-muted);
}

.pagination-info {
    padding: 0.75rem 1.5rem;
    /*background: var(--secondary-dark);*/
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: rgba(255,255,255,0.8);
}

/* ==================== Loading Overlay ==================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 35, 50, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
    backdrop-filter: blur(10px);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--tertiary-dark);
    border-top-color: var(--accent-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ==================== Empty State ==================== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--spacing-xl);
    background: var(--secondary-dark);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--tertiary-dark);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

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

/* ==================== Notifications ==================== */
.notification-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 9999;
    pointer-events: none; /* ne bloque pas les clics derrière */
}

.notification {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 280px;
    max-width: 420px;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    pointer-events: all;
    cursor: pointer;
    backdrop-filter: blur(8px);

    /* Animation d'entrée */
    animation: notif-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.notification.hiding {
    animation: notif-out 0.25s ease-in forwards;
}

/* Variantes */
.notification--error {
    background: rgba(220, 53, 69, 0.92);
    border-left: 4px solid #ff6b6b;
    color: #fff;
}

.notification--warning {
    background: rgba(255, 152, 0, 0.92);
    border-left: 4px solid #ffba42;
    color: #1a2332;
}

.notification--success {
    background: rgba(40, 167, 69, 0.92);
    border-left: 4px solid #5eda7e;
    color: #fff;
}

.notification--info {
    background: rgba(30, 60, 100, 0.95);
    border-left: 4px solid #4a9eff;
    color: #e8f0fe;
}

/* Icône */
.notification__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
}

/* Corps du message */
.notification__body {
    flex: 1;
}

.notification__title {
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.3;
    margin-bottom: 0.2rem;
}

.notification__message {
    font-size: 0.8rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* Bouton fermeture */
.notification__close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.15s;
    line-height: 1;
}

.notification__close:hover {
    opacity: 1;
}

/* Barre de progression */
.notification__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 0 0 10px 10px;
    animation: notif-progress linear forwards;
    animation-duration: var(--notification-duration);
}

.notification {
    position: relative;
    overflow: hidden;
}

/* Keyframes */
@keyframes notif-in {
    from {
        opacity: 0;
        transform: translateX(110%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes notif-out {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
        max-height: 120px;
        margin-bottom: 0;
    }
    to {
        opacity: 0;
        transform: translateX(110%) scale(0.95);
        max-height: 0;
        margin-bottom: -0.75rem;
        padding-top: 0;
        padding-bottom: 0;
    }
}

@keyframes notif-progress {
    from { width: 100%; }
    to   { width: 0%; }
}

/* ==================== Responsive Design ==================== */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .search-container {
        max-width: 100%;
        order: 3;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .pagination {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: var(--spacing-sm);
    }
    
    .user-name {
        display: block; /* ou retirer la règle display: none */
        font-size: 0.8rem; /* optionnel : réduire la taille */
        /*display: none;*/
    }
}

/* ==================== Widget "Pour vous" ==================== */
/*
 * Le widget s'affiche dans .content-area (colonne 1fr du grid principal).
 * Il occupe toute la largeur de cette colonne, au-dessus de la grille vidéos.
 * Les cards du widget sont plus petites que les cards principales :
 *   - pas d'aspect-ratio 16/9 imposé
 *   - hauteur fixe + thumbnail compacte
 *   - minmax(180px) au lieu de minmax(360px)
 */

#for-you-widget {
    width: 100%;
    margin-bottom: var(--spacing-lg);
    overflow: hidden; /* stoppe tout débordement */
}

/* En-tête du widget */
.for-you-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.for-you-header h2 {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

/* Grille spécifique au widget — cards plus petites */
#for-you-widget .videos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* exactement 4 colonnes */
    gap: 12px;
    width: 100%;
}

/* Cards du widget : compactes, pas d'aspect-ratio hérité */
#for-you-widget .video-card {
    aspect-ratio: unset;       /* annule le 16/9 des cards principales */
    height: 160px;             /* hauteur fixe compacte */
    border-radius: 12px;
    transform: translateY(0) scale(1); /* reset l'animation d'entrée */
    opacity: 1;
    min-width: 0;              /* empêche le débordement grid */
}

#for-you-widget .video-card:hover {
    transform: scale(1.03);   /* hover plus discret que les cards principales */
}

/* Thumbnail du widget */
#for-you-widget .video-thumb-placeholder {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

#for-you-widget .video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay texte en bas de card */
#for-you-widget .video-card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    z-index: 2;
}

#for-you-widget .video-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

#for-you-widget .video-card-meta {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.06) 25%,
        rgba(255,255,255,0.12) 50%,
        rgba(255,255,255,0.06) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

#for-you-widget .video-card .skeleton {
    position: absolute;
    inset: 0;
    border-radius: 12px;
}

/* Badge accent (raison recommandation) */
.badge-accent {
    background: rgba(148, 210, 174, 0.2);
    color: var(--accent-green);
    border: 1px solid rgba(148, 210, 174, 0.4);
    padding: 0.15rem 0.4rem;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 600;
}

.badge-gray {
    background: rgba(255,255,255,0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 0.15rem 0.4rem;
    border-radius: 100px;
    font-size: 0.65rem;
}

/* Responsive widget */
@media (max-width: 1200px) {
    #for-you-widget .videos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    #for-you-widget .videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #for-you-widget .video-card {
        height: 130px;
    }
}

@media (max-width: 480px) {
    #for-you-widget .videos-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== Lien Confidentialité — Header ==================== */
.privacy-header-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem 0.4rem 0.7rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 40px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.privacy-header-link:hover {
    background: rgba(148, 210, 174, 0.1);
    border-color: rgba(148, 210, 174, 0.35);
    color: #94d2ae;
}

.privacy-header-label {
    /* Masqué sur petits écrans */
}

/* ==================== Footer confidentialité ==================== */
.privacy-footer {
    margin-top: auto;
    padding: 1rem var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.privacy-footer-inner {
    max-width: 1800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.privacy-footer-copy {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
}

.privacy-footer-links {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.privacy-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    transition: color 0.2s ease;
}

.privacy-footer-link:hover {
    color: #94d2ae;
}

.privacy-footer-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.privacy-footer-sep {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
}

/* ==================== Responsive confidentialité ==================== */
@media (max-width: 768px) {
    .privacy-header-label {
        display: none; /* Masquer le texte, garder uniquement l'icône */
    }

    .privacy-header-link {
        padding: 0.4rem 0.6rem;
    }

    .privacy-footer-inner {
        justify-content: center;
        text-align: center;
    }

    .privacy-footer-copy {
        width: 100%;
        text-align: center;
    }
}

/* ==================== Carrousel Nouveautés ==================== */

#nouveautes-zone {
    width: 100%;
    margin-bottom: var(--spacing-lg);
}

.carousel-wrapper {
    width: 100%;
    position: relative;
}

.carousel-slide {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16 / 7;
    background: #0b1e33;
    box-shadow: var(--shadow-lg);
    transition: box-shadow 0.3s ease;
}

.carousel-slide:hover {
    box-shadow: 0 16px 60px rgba(0,0,0,0.7);
}

.carousel-thumbnail {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.carousel-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.carousel-slide:hover .carousel-thumbnail img {
    transform: scale(1.04);
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.92) 0%,
        rgba(0,0,0,0.45) 40%,
        rgba(0,0,0,0.10) 80%,
        rgba(0,0,0,0)   100%
    );
    z-index: 1;
}

/* ── Info texte ─────────────────────────────────────────────── */
.carousel-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 2rem;
    z-index: 2;
}

.carousel-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.carousel-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 0.6rem;
}

.carousel-views {
    margin-left: auto;
}

.carousel-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ── Boutons navigation ─────────────────────────────────────── */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-nav:hover {
    background: rgba(255,255,255,0.30);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 16px;
}

.carousel-next {
    right: 16px;
}

/* ── Dots indicateurs ───────────────────────────────────────── */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
    padding: 0;
}

.carousel-dot.active {
    background: var(--accent-orange);
    transform: scale(1.35);
}

/* ── Grille recommandations sous le carrousel ───────────────── */
#nouveautes-recommendations .videos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
}

#nouveautes-recommendations .video-card {
    aspect-ratio: 16 / 9;
}

/* Responsive carrousel */
@media (max-width: 900px) {
    .carousel-title {
        font-size: 1.2rem;
    }

    .carousel-info {
        padding: 1rem 1.2rem;
    }

    #nouveautes-recommendations .videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .carousel-slide {
        aspect-ratio: 16 / 9;
    }

    #nouveautes-recommendations .videos-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Nouveautés : surbrillance quand actif ── */
.filter-highlight.active {
    color: var(--accent-orange-dark);
    transform: translateX(4px);
}

/* ── Titre au-dessus du carrousel ── */
.carousel-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}
